From 34b6acd8cac724d46af8165f655fd7e40c64d7a7 Mon Sep 17 00:00:00 2001 From: fukaoi Date: Thu, 1 Feb 2024 18:03:39 +0900 Subject: [PATCH 01/15] updated --- packages/suite-airdrop/package.json | 4 ---- packages/suite-compressed-nft/package.json | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/packages/suite-airdrop/package.json b/packages/suite-airdrop/package.json index 0663a6208..2c324b587 100644 --- a/packages/suite-airdrop/package.json +++ b/packages/suite-airdrop/package.json @@ -44,13 +44,9 @@ "publish": "../../scripts/after-publish.mjs" }, "dependencies": { - "@solana/spl-token": "^0.3.8", - "@metaplex-foundation/mpl-token-metadata": "^2.13.0", "@solana/web3.js": "^1.78.5", "@solana-suite/config": "workspace:^", "bignumber.js": "^9.1.2", - "@metaplex-foundation/mpl-bubblegum": "^3.0.0", - "mpl-bubblegum-instruction": "github:atonoy/mpl-bubblegum-instructions", "bn.js": "^5.2.1", "bs58": "^4.0.1" }, diff --git a/packages/suite-compressed-nft/package.json b/packages/suite-compressed-nft/package.json index 8171e0133..23f878c1c 100644 --- a/packages/suite-compressed-nft/package.json +++ b/packages/suite-compressed-nft/package.json @@ -45,7 +45,7 @@ }, "dependencies": { "@irys/sdk": "^0.0.3", - "@metaplex-foundation/mpl-bubblegum": "^3.0.0", + "@metaplex-foundation/mpl-bubblegum": "3.0.0", "@metaplex-foundation/mpl-token-metadata": "^2.13.0", "@solana-suite/config": "workspace:*", "@solana/spl-account-compression": "^0.2.0", From c68c7ca9d783b7805b09b1083091f46ede3a2a2c Mon Sep 17 00:00:00 2001 From: fukaoi Date: Thu, 1 Feb 2024 19:36:33 +0900 Subject: [PATCH 02/15] wip --- packages/converter/dist/index.d.mts | 615 ------- packages/converter/dist/index.d.ts | 615 ------- packages/converter/dist/index.js | 1529 ---------------- packages/converter/dist/index.mjs | 1514 ---------------- packages/converter/package.json | 1 + packages/converter/src/collection-details.ts | 30 +- packages/converter/src/memo.ts | 2 +- packages/converter/src/mint.ts | 2 +- packages/converter/src/nft.ts | 2 +- packages/converter/src/properties.ts | 2 +- packages/converter/src/token-metadata.ts | 2 +- packages/converter/src/transfer-checked.ts | 2 +- packages/converter/src/transfer.ts | 2 +- packages/shared/dist/exports-8dfab8bf.d.ts | 546 ------ packages/shared/dist/exports.d.mts | 4 - packages/shared/dist/exports.d.ts | 4 - packages/shared/dist/exports.js | 1581 ---------------- packages/shared/dist/exports.mjs | 1552 ---------------- packages/shared/dist/index.d.mts | 66 - packages/shared/dist/index.d.ts | 66 - packages/shared/dist/index.js | 1585 ----------------- packages/shared/dist/index.mjs | 1554 ---------------- packages/suite-airdrop/package.json | 6 +- packages/{shared => suite-utils}/package.json | 7 +- .../{shared => suite-utils}/src/constants.ts | 0 .../{shared => suite-utils}/src/exports.ts | 0 packages/{shared => suite-utils}/src/index.ts | 0 .../{shared => suite-utils}/src/result.ts | 0 .../{shared => suite-utils}/src/shared.ts | 0 .../test/constants.test.ts | 0 .../test/result.test.ts | 0 .../{shared => suite-utils}/tsconfig.json | 0 .../{shared => suite-utils}/tsup.config.ts | 0 33 files changed, 26 insertions(+), 11263 deletions(-) delete mode 100644 packages/converter/dist/index.d.mts delete mode 100644 packages/converter/dist/index.d.ts delete mode 100644 packages/converter/dist/index.js delete mode 100644 packages/converter/dist/index.mjs delete mode 100644 packages/shared/dist/exports-8dfab8bf.d.ts delete mode 100644 packages/shared/dist/exports.d.mts delete mode 100644 packages/shared/dist/exports.d.ts delete mode 100644 packages/shared/dist/exports.js delete mode 100644 packages/shared/dist/exports.mjs delete mode 100644 packages/shared/dist/index.d.mts delete mode 100644 packages/shared/dist/index.d.ts delete mode 100644 packages/shared/dist/index.js delete mode 100644 packages/shared/dist/index.mjs rename packages/{shared => suite-utils}/package.json (93%) rename packages/{shared => suite-utils}/src/constants.ts (100%) rename packages/{shared => suite-utils}/src/exports.ts (100%) rename packages/{shared => suite-utils}/src/index.ts (100%) rename packages/{shared => suite-utils}/src/result.ts (100%) rename packages/{shared => suite-utils}/src/shared.ts (100%) rename packages/{shared => suite-utils}/test/constants.test.ts (100%) rename packages/{shared => suite-utils}/test/result.test.ts (100%) rename packages/{shared => suite-utils}/tsconfig.json (100%) rename packages/{shared => suite-utils}/tsup.config.ts (100%) diff --git a/packages/converter/dist/index.d.mts b/packages/converter/dist/index.d.mts deleted file mode 100644 index b9bcdf6f8..000000000 --- a/packages/converter/dist/index.d.mts +++ /dev/null @@ -1,615 +0,0 @@ -import { PublicKey, ParsedTransactionWithMeta, TransactionSignature, Keypair } from '@solana/web3.js'; -import { Metadata as Metadata$2, DataV2 } from '@metaplex-foundation/mpl-token-metadata'; -import BN from 'bn.js'; -import { MetadataArgs } from 'mpl-bubblegum-instruction'; - -declare const pubKeyNominality: unique symbol; -declare const secretNominality: unique symbol; -type Pubkey$1 = (string & { - [pubKeyNominality]: never; -}) | string; -type Secret = (string & { - [secretNominality]: never; -}) | string; - -type bignum = number | BN; -type Option = T | null; -declare enum UseMethod { - Burn = 0, - Multiple = 1, - Single = 2 -} -type Uses = { - useMethod: UseMethod; - remaining: bignum; - total: bignum; -}; -type InputCreators = { - address: Pubkey$1; - secret: Secret; - share: number; -}; - -type FileType = string | File; - -type InternalCollection = { - key: PublicKey; - verified: boolean; -}; -type InternalCreators = { - address: PublicKey; - verified: boolean; - share: number; -}; - -type Metadata$1 = { - name: string; - symbol: string; - token_standard: string; -}; -type Grouping = { - group_key: string; - group_value: string; -}; -type Asset = { - interface: string; - id: Pubkey$1; - content: { - json_uri: string; - files: string[]; - metadata: Metadata$1; - links: string[]; - }; - authorities: { - address: Pubkey$1; - scopes: string[]; - }[]; - compression: { - eligible: boolean; - compressed: boolean; - data_hash: Pubkey$1; - creator_hash: Pubkey$1; - asset_hash: Pubkey$1; - tree: Pubkey$1; - seq: number; - leaf_id: number; - }; - grouping: Grouping[]; - royalty: { - royalty_model: 'creators' | 'fanout' | 'single'; - target: null; - percent: number; - basis_points: number; - primary_sale_happened: boolean; - locked: boolean; - }; - creators: InternalCreators[]; - ownership: { - frozen: boolean; - delegated: boolean; - delegate: Pubkey$1; - ownership_model: 'single' | 'token'; - owner: Pubkey$1; - }; - supply: { - print_max_supply: number; - print_current_supply: number; - edition_nonce: number; - }; - mutable: boolean; - burnt: boolean; -}; - -type StorageType = 'nftStorage' | 'arweave' | string; -type MetadataAndOffchain = { - onchain: Metadata$2; - offchain: Offchain; -}; -type AssetAndOffchain = { - onchain: Asset; - offchain: Offchain; -}; -type Offchain = { - name?: string; - symbol?: string; - description?: string; - seller_fee_basis_points?: number; - image?: string; - external_url?: string; - attributes?: Attribute[]; - properties?: Properties; - collection?: { - name?: string; - family?: string; - [key: string]: unknown; - }; - collectionDetails?: { - kind: string; - size: number; - }; - created_at?: number; -}; -type Properties = { - creators?: { - address?: string; - share?: number; - [key: string]: unknown; - }[]; - files?: { - type?: string; - filePath?: FileType; - [key: string]: unknown; - }[]; - [key: string]: unknown; -}; -type Attribute = { - trait_type?: string; - value?: string; - [key: string]: unknown; -}; - -type InputCollection = Pubkey$1; -type Options = { - [key: string]: unknown; -}; -type InputNftMetadata = { - name: string; - symbol: string; - royalty?: number; - storageType?: StorageType; - filePath?: FileType; - uri?: string; - isMutable?: boolean; - description?: string; - external_url?: string; - attributes?: Attribute[]; - properties?: Properties; - maxSupply?: bignum; - creators?: InputCreators[]; - uses?: Uses; - collection?: InputCollection; - options?: Options; -}; - -type Collection = { - address: Pubkey$1; - verified: boolean; -}; - -declare namespace Converter$d { - namespace CompressedNftMetadata { - const intoInfra: (input: InputNftMetadata, uri: string, sellerFeeBasisPoints: number) => MetadataArgs; - } -} - -declare namespace Converter$c { - namespace Collection { - const intoInfra: (input: Option | undefined) => Option; - const intoUser: (output: Option) => Collection | undefined; - } - namespace CollectionMint { - const intoUser: (output: Grouping[]) => Pubkey; - } -} - -declare namespace Converter$b { - namespace Creators { - const intoInfra: (input: Option | undefined) => Option; - const intoCompressedNftInfra: (input: Option | undefined) => InternalCreators[]; - const intoUser: (output: Option) => Creators[] | undefined; - } -} - -type Authority = { - address: Pubkey$1; - scopes: string[]; -}; -type Creators = { - address: Pubkey$1; - share: number; - verified: boolean; -}[]; -type Metadata = { - mint: Pubkey$1; - collectionMint: Pubkey$1; - authorities: Authority[]; - royalty: number; - name: string; - symbol: string; - uri: string; - creators: Creators; - treeAddress: Pubkey$1; - isCompressed: boolean; - isMutable: boolean; - isBurn: boolean; - editionNonce: number; - primarySaleHappened: boolean; - dateTime: Date; - offchain: Offchain; -}; - -declare namespace Converter$a { - namespace Nft { - const intoUser: (output: AssetAndOffchain) => Metadata; - } -} - -type PostTokenAccount = { - account: string; - owner: string; -}; -type MintTo = { - parsed: { - info: { - account: Pubkey$1; - mint: Pubkey$1; - mintAuthority: Pubkey$1; - tokenAmount: string; - }; - type: string; - }; - program: string; - programId?: PublicKey; -}; -type TransferChecked = { - parsed: { - info: { - destination: Pubkey$1; - mint: Pubkey$1; - multisigAuthority: Pubkey$1; - signers: Pubkey$1[]; - source: Pubkey$1; - tokenAmount: string; - }; - type: string; - }; - program: string; - programId?: PublicKey; -}; - -type History = { - sol?: string; - account?: string; - destination?: Pubkey$1; - source?: Pubkey$1; - authority?: Pubkey$1; - multisigAuthority?: Pubkey$1; - signers?: Pubkey$1[]; - mint?: Pubkey$1; - mintAuthority?: Pubkey$1; - tokenAmount?: string; - memo?: string; - dateTime?: Date; - type?: string; - sig?: string; - innerInstruction?: boolean; -}; - -declare namespace Converter$9 { - namespace Memo { - const intoUserSide: (output: Memo, meta: ParsedTransactionWithMeta, outputTransfer?: TransferChecked, mappingTokenAccount?: PostTokenAccount[]) => History | undefined; - } -} - -declare namespace Converter$8 { - namespace Mint { - const intoUserSide: (output: MintTo, meta: ParsedTransactionWithMeta) => History | undefined; - } -} - -declare namespace Converter$7 { - namespace RegularNftMetadata { - const intoInfra: (input: InputNftMetadata, uri: string, sellerFeeBasisPoints: number) => DataV2; - } -} - -declare abstract class AbstractResult { - protected abstract _chain(ok: (value: T) => Result, err: (error: E) => Result): Result; - unwrap(): T; - unwrap(ok: (value: T) => U): U; - unwrap(ok: (value: T) => U, err: (error: E) => V): U | V; - unwrap(ok: (value: T) => U, err: (error: E) => U): U; - map(ok: (value: T) => U): Result; - map(ok: (value: T) => U, err: (error: E) => F): Result; - chain(ok: (value: T) => Result): Result; - chain(ok: (value: T) => Result): Result; - chain(ok: (value: T) => Result, err: (error: E) => Result): Result; - match(ok: (value: T) => U, err: (error: E) => F): void | Promise; - submit(feePayer?: Secret): Promise>; -} -declare global { - interface Array { - submit(feePayer?: Secret): Promise>; - } -} -declare class InternalOk extends AbstractResult { - readonly value: T; - readonly isOk = true; - readonly isErr = false; - constructor(value: T); - protected _chain(ok: (value: T) => Result, _err: (error: E) => Result): Result; -} -declare class InternalErr extends AbstractResult { - readonly error: E; - readonly isOk = false; - readonly isErr = true; - constructor(error: E); - protected _chain(_ok: (value: T) => Result, err: (error: E) => Result): Result; -} -declare namespace Result { - export type Ok = InternalOk; - export type Err = InternalErr; - export function ok(value: T): Result; - export function err(error?: E): Result; - type U = Result; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3]): Result<[ - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2]): Result<[OkType, OkType, OkType], ErrType>; - export function all(obj: [R0, R1]): Result<[OkType, OkType], ErrType>; - export function all(obj: [R0]): Result<[OkType], ErrType>; - export function all(obj: []): Result<[]>; - export function all>(obj: T): Result<{ - [K in keyof T]: T[K] extends Result ? I : never; - }, { - [K in keyof T]: T[K] extends Result ? E : never; - }[keyof T]>; - export {}; -} -type Result = Result.Ok | Result.Err; -type OkType> = R extends Result ? O : never; -type ErrType> = R extends Result ? E : never; - -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 namespace Converter$6 { - namespace Properties { - const intoInfra: (input: Properties | undefined, callbackFunc: (filePath: FileType, storageType: StorageType, feePayer?: Secret) => Promise>, storageType: StorageType, feePayer?: Secret) => Promise; - } -} - -declare namespace Converter$5 { - namespace Royalty { - const THRESHOLD = 100; - const intoInfra: (percentage: number) => number; - const intoUser: (percentage: number) => number; - } -} - -type InputTokenMetadata = { - name: string; - symbol: string; - filePath?: FileType; - uri?: string; - storageType?: StorageType; - description?: string; - royalty?: number; - uses?: Uses; - creators?: InputCreators[]; - attributes?: Attribute[]; - options?: Options; -}; - -declare namespace Converter$4 { - namespace TokenMetadata { - const intoInfra: (input: InputTokenMetadata, uri: string, sellerFeeBasisPoints: number) => DataV2; - const intoUser: (output: MetadataAndOffchain, tokenAmount: string) => TokenMetadata; - const deleteNullStrings: (str: string) => string; - } -} - -declare namespace Converter$3 { - namespace TransferChecked { - const intoUserSide: (output: TransferChecked, meta: ParsedTransactionWithMeta, mappingTokenAccount?: PostTokenAccount[]) => History | undefined; - } -} - -declare namespace Converter$2 { - namespace Transfer { - const intoUserSide: (output: Transfer, meta: ParsedTransactionWithMeta) => History | undefined; - } -} - -declare namespace Converter$1 { - namespace Uses { - const intoUserSide: (output: Option) => Uses | undefined; - } -} - -declare const Converter: { - Uses: typeof Converter$1.Uses; - Transfer: typeof Converter$2.Transfer; - TransferChecked: typeof Converter$3.TransferChecked; - TokenMetadata: typeof Converter$4.TokenMetadata; - Royalty: typeof Converter$5.Royalty; - Properties: typeof Converter$6.Properties; - RegularNftMetadata: typeof Converter$7.RegularNftMetadata; - Mint: typeof Converter$8.Mint; - Memo: typeof Converter$9.Memo; - Nft: typeof Converter$a.Nft; - Creators: typeof Converter$b.Creators; - Collection: typeof Converter$c.Collection; - CollectionMint: typeof Converter$c.CollectionMint; - CompressedNftMetadata: typeof Converter$d.CompressedNftMetadata; -}; - -export { Converter }; diff --git a/packages/converter/dist/index.d.ts b/packages/converter/dist/index.d.ts deleted file mode 100644 index b9bcdf6f8..000000000 --- a/packages/converter/dist/index.d.ts +++ /dev/null @@ -1,615 +0,0 @@ -import { PublicKey, ParsedTransactionWithMeta, TransactionSignature, Keypair } from '@solana/web3.js'; -import { Metadata as Metadata$2, DataV2 } from '@metaplex-foundation/mpl-token-metadata'; -import BN from 'bn.js'; -import { MetadataArgs } from 'mpl-bubblegum-instruction'; - -declare const pubKeyNominality: unique symbol; -declare const secretNominality: unique symbol; -type Pubkey$1 = (string & { - [pubKeyNominality]: never; -}) | string; -type Secret = (string & { - [secretNominality]: never; -}) | string; - -type bignum = number | BN; -type Option = T | null; -declare enum UseMethod { - Burn = 0, - Multiple = 1, - Single = 2 -} -type Uses = { - useMethod: UseMethod; - remaining: bignum; - total: bignum; -}; -type InputCreators = { - address: Pubkey$1; - secret: Secret; - share: number; -}; - -type FileType = string | File; - -type InternalCollection = { - key: PublicKey; - verified: boolean; -}; -type InternalCreators = { - address: PublicKey; - verified: boolean; - share: number; -}; - -type Metadata$1 = { - name: string; - symbol: string; - token_standard: string; -}; -type Grouping = { - group_key: string; - group_value: string; -}; -type Asset = { - interface: string; - id: Pubkey$1; - content: { - json_uri: string; - files: string[]; - metadata: Metadata$1; - links: string[]; - }; - authorities: { - address: Pubkey$1; - scopes: string[]; - }[]; - compression: { - eligible: boolean; - compressed: boolean; - data_hash: Pubkey$1; - creator_hash: Pubkey$1; - asset_hash: Pubkey$1; - tree: Pubkey$1; - seq: number; - leaf_id: number; - }; - grouping: Grouping[]; - royalty: { - royalty_model: 'creators' | 'fanout' | 'single'; - target: null; - percent: number; - basis_points: number; - primary_sale_happened: boolean; - locked: boolean; - }; - creators: InternalCreators[]; - ownership: { - frozen: boolean; - delegated: boolean; - delegate: Pubkey$1; - ownership_model: 'single' | 'token'; - owner: Pubkey$1; - }; - supply: { - print_max_supply: number; - print_current_supply: number; - edition_nonce: number; - }; - mutable: boolean; - burnt: boolean; -}; - -type StorageType = 'nftStorage' | 'arweave' | string; -type MetadataAndOffchain = { - onchain: Metadata$2; - offchain: Offchain; -}; -type AssetAndOffchain = { - onchain: Asset; - offchain: Offchain; -}; -type Offchain = { - name?: string; - symbol?: string; - description?: string; - seller_fee_basis_points?: number; - image?: string; - external_url?: string; - attributes?: Attribute[]; - properties?: Properties; - collection?: { - name?: string; - family?: string; - [key: string]: unknown; - }; - collectionDetails?: { - kind: string; - size: number; - }; - created_at?: number; -}; -type Properties = { - creators?: { - address?: string; - share?: number; - [key: string]: unknown; - }[]; - files?: { - type?: string; - filePath?: FileType; - [key: string]: unknown; - }[]; - [key: string]: unknown; -}; -type Attribute = { - trait_type?: string; - value?: string; - [key: string]: unknown; -}; - -type InputCollection = Pubkey$1; -type Options = { - [key: string]: unknown; -}; -type InputNftMetadata = { - name: string; - symbol: string; - royalty?: number; - storageType?: StorageType; - filePath?: FileType; - uri?: string; - isMutable?: boolean; - description?: string; - external_url?: string; - attributes?: Attribute[]; - properties?: Properties; - maxSupply?: bignum; - creators?: InputCreators[]; - uses?: Uses; - collection?: InputCollection; - options?: Options; -}; - -type Collection = { - address: Pubkey$1; - verified: boolean; -}; - -declare namespace Converter$d { - namespace CompressedNftMetadata { - const intoInfra: (input: InputNftMetadata, uri: string, sellerFeeBasisPoints: number) => MetadataArgs; - } -} - -declare namespace Converter$c { - namespace Collection { - const intoInfra: (input: Option | undefined) => Option; - const intoUser: (output: Option) => Collection | undefined; - } - namespace CollectionMint { - const intoUser: (output: Grouping[]) => Pubkey; - } -} - -declare namespace Converter$b { - namespace Creators { - const intoInfra: (input: Option | undefined) => Option; - const intoCompressedNftInfra: (input: Option | undefined) => InternalCreators[]; - const intoUser: (output: Option) => Creators[] | undefined; - } -} - -type Authority = { - address: Pubkey$1; - scopes: string[]; -}; -type Creators = { - address: Pubkey$1; - share: number; - verified: boolean; -}[]; -type Metadata = { - mint: Pubkey$1; - collectionMint: Pubkey$1; - authorities: Authority[]; - royalty: number; - name: string; - symbol: string; - uri: string; - creators: Creators; - treeAddress: Pubkey$1; - isCompressed: boolean; - isMutable: boolean; - isBurn: boolean; - editionNonce: number; - primarySaleHappened: boolean; - dateTime: Date; - offchain: Offchain; -}; - -declare namespace Converter$a { - namespace Nft { - const intoUser: (output: AssetAndOffchain) => Metadata; - } -} - -type PostTokenAccount = { - account: string; - owner: string; -}; -type MintTo = { - parsed: { - info: { - account: Pubkey$1; - mint: Pubkey$1; - mintAuthority: Pubkey$1; - tokenAmount: string; - }; - type: string; - }; - program: string; - programId?: PublicKey; -}; -type TransferChecked = { - parsed: { - info: { - destination: Pubkey$1; - mint: Pubkey$1; - multisigAuthority: Pubkey$1; - signers: Pubkey$1[]; - source: Pubkey$1; - tokenAmount: string; - }; - type: string; - }; - program: string; - programId?: PublicKey; -}; - -type History = { - sol?: string; - account?: string; - destination?: Pubkey$1; - source?: Pubkey$1; - authority?: Pubkey$1; - multisigAuthority?: Pubkey$1; - signers?: Pubkey$1[]; - mint?: Pubkey$1; - mintAuthority?: Pubkey$1; - tokenAmount?: string; - memo?: string; - dateTime?: Date; - type?: string; - sig?: string; - innerInstruction?: boolean; -}; - -declare namespace Converter$9 { - namespace Memo { - const intoUserSide: (output: Memo, meta: ParsedTransactionWithMeta, outputTransfer?: TransferChecked, mappingTokenAccount?: PostTokenAccount[]) => History | undefined; - } -} - -declare namespace Converter$8 { - namespace Mint { - const intoUserSide: (output: MintTo, meta: ParsedTransactionWithMeta) => History | undefined; - } -} - -declare namespace Converter$7 { - namespace RegularNftMetadata { - const intoInfra: (input: InputNftMetadata, uri: string, sellerFeeBasisPoints: number) => DataV2; - } -} - -declare abstract class AbstractResult { - protected abstract _chain(ok: (value: T) => Result, err: (error: E) => Result): Result; - unwrap(): T; - unwrap(ok: (value: T) => U): U; - unwrap(ok: (value: T) => U, err: (error: E) => V): U | V; - unwrap(ok: (value: T) => U, err: (error: E) => U): U; - map(ok: (value: T) => U): Result; - map(ok: (value: T) => U, err: (error: E) => F): Result; - chain(ok: (value: T) => Result): Result; - chain(ok: (value: T) => Result): Result; - chain(ok: (value: T) => Result, err: (error: E) => Result): Result; - match(ok: (value: T) => U, err: (error: E) => F): void | Promise; - submit(feePayer?: Secret): Promise>; -} -declare global { - interface Array { - submit(feePayer?: Secret): Promise>; - } -} -declare class InternalOk extends AbstractResult { - readonly value: T; - readonly isOk = true; - readonly isErr = false; - constructor(value: T); - protected _chain(ok: (value: T) => Result, _err: (error: E) => Result): Result; -} -declare class InternalErr extends AbstractResult { - readonly error: E; - readonly isOk = false; - readonly isErr = true; - constructor(error: E); - protected _chain(_ok: (value: T) => Result, err: (error: E) => Result): Result; -} -declare namespace Result { - export type Ok = InternalOk; - export type Err = InternalErr; - export function ok(value: T): Result; - export function err(error?: E): Result; - type U = Result; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3]): Result<[ - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2]): Result<[OkType, OkType, OkType], ErrType>; - export function all(obj: [R0, R1]): Result<[OkType, OkType], ErrType>; - export function all(obj: [R0]): Result<[OkType], ErrType>; - export function all(obj: []): Result<[]>; - export function all>(obj: T): Result<{ - [K in keyof T]: T[K] extends Result ? I : never; - }, { - [K in keyof T]: T[K] extends Result ? E : never; - }[keyof T]>; - export {}; -} -type Result = Result.Ok | Result.Err; -type OkType> = R extends Result ? O : never; -type ErrType> = R extends Result ? E : never; - -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 namespace Converter$6 { - namespace Properties { - const intoInfra: (input: Properties | undefined, callbackFunc: (filePath: FileType, storageType: StorageType, feePayer?: Secret) => Promise>, storageType: StorageType, feePayer?: Secret) => Promise; - } -} - -declare namespace Converter$5 { - namespace Royalty { - const THRESHOLD = 100; - const intoInfra: (percentage: number) => number; - const intoUser: (percentage: number) => number; - } -} - -type InputTokenMetadata = { - name: string; - symbol: string; - filePath?: FileType; - uri?: string; - storageType?: StorageType; - description?: string; - royalty?: number; - uses?: Uses; - creators?: InputCreators[]; - attributes?: Attribute[]; - options?: Options; -}; - -declare namespace Converter$4 { - namespace TokenMetadata { - const intoInfra: (input: InputTokenMetadata, uri: string, sellerFeeBasisPoints: number) => DataV2; - const intoUser: (output: MetadataAndOffchain, tokenAmount: string) => TokenMetadata; - const deleteNullStrings: (str: string) => string; - } -} - -declare namespace Converter$3 { - namespace TransferChecked { - const intoUserSide: (output: TransferChecked, meta: ParsedTransactionWithMeta, mappingTokenAccount?: PostTokenAccount[]) => History | undefined; - } -} - -declare namespace Converter$2 { - namespace Transfer { - const intoUserSide: (output: Transfer, meta: ParsedTransactionWithMeta) => History | undefined; - } -} - -declare namespace Converter$1 { - namespace Uses { - const intoUserSide: (output: Option) => Uses | undefined; - } -} - -declare const Converter: { - Uses: typeof Converter$1.Uses; - Transfer: typeof Converter$2.Transfer; - TransferChecked: typeof Converter$3.TransferChecked; - TokenMetadata: typeof Converter$4.TokenMetadata; - Royalty: typeof Converter$5.Royalty; - Properties: typeof Converter$6.Properties; - RegularNftMetadata: typeof Converter$7.RegularNftMetadata; - Mint: typeof Converter$8.Mint; - Memo: typeof Converter$9.Memo; - Nft: typeof Converter$a.Nft; - Creators: typeof Converter$b.Creators; - Collection: typeof Converter$c.Collection; - CollectionMint: typeof Converter$c.CollectionMint; - CompressedNftMetadata: typeof Converter$d.CompressedNftMetadata; -}; - -export { Converter }; diff --git a/packages/converter/dist/index.js b/packages/converter/dist/index.js deleted file mode 100644 index 841e35c4f..000000000 --- a/packages/converter/dist/index.js +++ /dev/null @@ -1,1529 +0,0 @@ -"use strict"; -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var src_exports = {}; -__export(src_exports, { - Converter: () => Converter5 -}); -module.exports = __toCommonJS(src_exports); - -// src/collection.ts -var Converter; -((Converter15) => { - let Collection; - ((Collection2) => { - Collection2.intoInfra = (input) => { - if (!input) { - return null; - } - return { - key: input.toPublicKey(), - verified: false - }; - }; - Collection2.intoUser = (output) => { - if (!output) { - return void 0; - } - return { - address: output.key.toString(), - verified: output.verified - }; - }; - })(Collection = Converter15.Collection || (Converter15.Collection = {})); - let CollectionMint; - ((CollectionMint2) => { - CollectionMint2.intoUser = (output) => { - const res = output.find((value) => { - if (value.group_key === "collection") { - return value.group_value; - } - }); - return res ? res.group_value : ""; - }; - })(CollectionMint = Converter15.CollectionMint || (Converter15.CollectionMint = {})); -})(Converter || (Converter = {})); - -// src/creators.ts -var Converter2; -((Converter15) => { - let Creators; - ((Creators2) => { - Creators2.intoInfra = (input) => { - if (!input) { - return null; - } - return input.map((data) => { - return { - address: data.address.toPublicKey(), - share: data.share, - verified: false - }; - }); - }; - Creators2.intoCompressedNftInfra = (input) => { - if (!input) { - return []; - } - return input.map((data) => { - return { - address: data.address.toPublicKey(), - share: data.share, - verified: false - }; - }); - }; - Creators2.intoUser = (output) => { - if (!output) { - return void 0; - } - return output.map((data) => { - return { - address: data.address.toString(), - share: data.share, - verified: data.verified - }; - }); - }; - })(Creators = Converter15.Creators || (Converter15.Creators = {})); -})(Converter2 || (Converter2 = {})); - -// src/compressed-nft-metadata.ts -var import_mpl_bubblegum_instruction = require("mpl-bubblegum-instruction"); -var Converter3; -((Converter15) => { - let CompressedNftMetadata; - ((CompressedNftMetadata2) => { - CompressedNftMetadata2.intoInfra = (input, uri, sellerFeeBasisPoints) => { - return { - name: input.name, - symbol: input.symbol, - uri, - sellerFeeBasisPoints, - creators: Converter2.Creators.intoCompressedNftInfra(input.creators), - collection: Converter.Collection.intoInfra(input.collection), - uses: input.uses || null, - primarySaleHappened: false, - isMutable: input.isMutable ?? false, - editionNonce: 0, - tokenStandard: import_mpl_bubblegum_instruction.TokenStandard.NonFungible, - tokenProgramVersion: import_mpl_bubblegum_instruction.TokenProgramVersion.Original - }; - }; - })(CompressedNftMetadata = Converter15.CompressedNftMetadata || (Converter15.CompressedNftMetadata = {})); -})(Converter3 || (Converter3 = {})); - -// src/royalty.ts -var Converter4; -((Converter15) => { - let Royalty; - ((Royalty2) => { - Royalty2.THRESHOLD = 100; - Royalty2.intoInfra = (percentage) => { - return percentage * Royalty2.THRESHOLD; - }; - Royalty2.intoUser = (percentage) => { - return percentage * Royalty2.THRESHOLD; - }; - })(Royalty = Converter15.Royalty || (Converter15.Royalty = {})); -})(Converter4 || (Converter4 = {})); - -// ../shared/src/constants.ts -var import_web3 = require("@solana/web3.js"); -var import_load = __toESM(require("@solana-suite/config/load")); -var Config = import_load.default; -var Constants; -((Constants2) => { - let WarnningMessage; - ((WarnningMessage2) => { - const THRESHHOLD = 50; - let isDisplay = false; - WarnningMessage2.NFT_STORAGE_API_KEY = ` - [YOU HAVE TO DO] - -------------------------------------- - You need to update nftStorageApiKey define parameter in solana-suite.json. - Can get api key from https://nft.storage/ - -------------------------------------- - `; - WarnningMessage2.DAS_API_URL = ` - [YOU HAVE TO DO] - -------------------------------------- - You need to update dasApiUrl define parameter in solana-suite.json. - can get api url from https://www.helius.dev/ - -------------------------------------- - `; - WarnningMessage2.ANNOUNCE = ` - [DEPRECATED] - -------------------------------------- - Account, Node, toExplorer, Pubkey, Secret have been moved to - @solana-suite/utils - ------------------------------------- - `; - WarnningMessage2.calculateProbability = () => { - const randomValue = Math.random(); - const probability = 1 / THRESHHOLD; - if (!isDisplay && randomValue < probability) { - isDisplay = true; - return true; - } - return false; - }; - })(WarnningMessage = Constants2.WarnningMessage || (Constants2.WarnningMessage = {})); -})(Constants || (Constants = {})); -((Constants2) => { - Constants2.currentCluster = Config.cluster.type; - Constants2.customClusterUrl = Config.cluster.customClusterUrl; - Constants2.isDebugging = Config.debugging; - Constants2.nftStorageApiKey = Config.nftStorageApiKey; - Constants2.dasApiUrl = Config.dasApiUrl; - let Cluster; - ((Cluster2) => { - Cluster2["prd"] = "mainnet-beta"; - Cluster2["prdMetaplex"] = "mainnet-beta-metaplex"; - Cluster2["dev"] = "devnet"; - Cluster2["test"] = "testnet"; - Cluster2["localhost"] = "localhost-devnet"; - })(Cluster = Constants2.Cluster || (Constants2.Cluster = {})); - let EndPointUrl; - ((EndPointUrl2) => { - EndPointUrl2["prd"] = "https://api.mainnet-beta.solana.com"; - EndPointUrl2["prdMetaplex"] = "https://api.metaplex.solana.com"; - EndPointUrl2["dev"] = "https://api.devnet.solana.com"; - EndPointUrl2["test"] = "https://api.testnet.solana.com"; - EndPointUrl2["localhost"] = "http://api.devnet.solana.com"; - })(EndPointUrl = Constants2.EndPointUrl || (Constants2.EndPointUrl = {})); - let BundlrUrl; - ((BundlrUrl2) => { - BundlrUrl2["prd"] = "https://node1.irys.xyz,https://node2.irys.xyz"; - BundlrUrl2["dev"] = "https://devnet.irys.xyz"; - })(BundlrUrl = Constants2.BundlrUrl || (Constants2.BundlrUrl = {})); - let DasApiUrl; - ((DasApiUrl2) => { - DasApiUrl2["dev"] = "https://devnet.helius-rpc.com/?api-key=15319bf4-5b40-4958-ac8d-6313aa55eb92,https://rpc-devnet.helius.xyz?api-key=9f70a843-3274-4ffd-a0a9-323f8b7c0639"; - })(DasApiUrl = Constants2.DasApiUrl || (Constants2.DasApiUrl = {})); - let NftstorageApiKey; - ((NftstorageApiKey2) => { - NftstorageApiKey2["dev"] = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJkaWQ6ZXRocjoweERGMjcyN2VkODZhRGU1RTMyZDZDZEJlODc0YzRFNDlEODY1OWZmOEMiLCJpc3MiOiJuZnQtc3RvcmFnZSIsImlhdCI6MTYyMDI2NDk0MzcwNiwibmFtZSI6ImRlbW8ifQ.d4J70mikxRB8a5vwNu6SO5HDA8JaueuseAj7Q_ytMCE"; - })(NftstorageApiKey = Constants2.NftstorageApiKey || (Constants2.NftstorageApiKey = {})); - Constants2.loadConfig = async () => { - Config = await import("@solana-suite/config/load"); - }; - Constants2.switchCluster = (param) => { - const { cluster: env, customClusterUrl: customClusterUrl2 } = param; - if (customClusterUrl2 && customClusterUrl2.length > 0) { - const index = Date.now() % customClusterUrl2.length; - return customClusterUrl2[index]; - } - switch (env) { - case "mainnet-beta" /* prd */: - return "https://api.mainnet-beta.solana.com" /* prd */; - case "mainnet-beta-metaplex" /* prdMetaplex */: - return "https://api.metaplex.solana.com" /* prdMetaplex */; - case "testnet" /* test */: - return "https://api.testnet.solana.com" /* test */; - case "devnet" /* dev */: - return "https://api.devnet.solana.com" /* dev */; - default: - return "http://api.devnet.solana.com" /* localhost */; - } - }; - Constants2.switchBundlr = (env) => { - switch (env) { - case "mainnet-beta" /* prd */: { - const urls = "https://node1.irys.xyz,https://node2.irys.xyz" /* prd */.split(","); - const index = Date.now() % urls.length; - return urls[index]; - } - default: { - return "https://devnet.irys.xyz" /* dev */; - } - } - }; - Constants2.switchDasApi = (env) => { - switch (env) { - case "mainnet-beta" /* prd */: { - if (Constants2.dasApiUrl.length < 1) { - throw Error(Constants2.WarnningMessage.DAS_API_URL); - } - const urls = "https://node1.irys.xyz,https://node2.irys.xyz" /* prd */.split(","); - const index = Date.now() % urls.length; - return urls[index]; - } - default: { - const urls = "https://devnet.helius-rpc.com/?api-key=15319bf4-5b40-4958-ac8d-6313aa55eb92,https://rpc-devnet.helius.xyz?api-key=9f70a843-3274-4ffd-a0a9-323f8b7c0639" /* dev */.split(","); - const index = Date.now() % urls.length; - return urls[index]; - } - } - }; - Constants2.switchNftStorage = (env) => { - switch (env) { - case "mainnet-beta" /* prd */: - if (!Constants2.nftStorageApiKey) { - throw Error(Constants2.WarnningMessage.NFT_STORAGE_API_KEY); - } - return Constants2.nftStorageApiKey; - default: { - return "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJkaWQ6ZXRocjoweERGMjcyN2VkODZhRGU1RTMyZDZDZEJlODc0YzRFNDlEODY1OWZmOEMiLCJpc3MiOiJuZnQtc3RvcmFnZSIsImlhdCI6MTYyMDI2NDk0MzcwNiwibmFtZSI6ImRlbW8ifQ.d4J70mikxRB8a5vwNu6SO5HDA8JaueuseAj7Q_ytMCE" /* dev */; - } - } - }; - Constants2.WRAPPED_TOKEN_PROGRAM_ID = new import_web3.PublicKey( - "So11111111111111111111111111111111111111112" - ); - Constants2.MEMO_PROGRAM_ID = new import_web3.PublicKey( - "Memo1UhkJRfHyvLMcVucJwxXeuD728EqVDDwQDxFMNo" - ); - Constants2.METAPLEX_PROGRAM_ID = new import_web3.PublicKey( - "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s" - ); - Constants2.COMMITMENT = "confirmed"; - Constants2.NFT_STORAGE_GATEWAY_URL = "https://ipfs.io/ipfs"; - Constants2.IRYS_GATEWAY_URL = "https://gateway.irys.xyz"; - Constants2.BUNDLR_NETWORK_URL = (0, Constants2.switchBundlr)(Config.cluster.type); - Constants2.DAS_API_URL = (0, Constants2.switchDasApi)(Config.cluster.type); - Constants2.NFT_STORAGE_API_KEY = (0, Constants2.switchNftStorage)(Config.cluster.type); - Constants2.EXPLORER_SOLSCAN_URL = "https://solscan.io"; - Constants2.EXPLORER_SOLANAFM_URL = "https://solana.fm"; - Constants2.EXPLORER_XRAY_URL = "https://xray.helius.xyz"; -})(Constants || (Constants = {})); -console.log(Constants.WarnningMessage.ANNOUNCE); - -// ../transaction-builder/src/batch.ts -var import_web34 = require("@solana/web3.js"); - -// ../node/src/index.ts -var import_web32 = require("@solana/web3.js"); -var Node; -((Node2) => { - const setted = { - clusterUrl: "", - commitment: Constants.COMMITMENT, - customClusterUrl: [] - }; - Node2.getConnection = () => { - if (setted.customClusterUrl.length > 0) { - setted.clusterUrl = Constants.switchCluster({ - customClusterUrl: setted.customClusterUrl - }); - } else if (Constants.customClusterUrl.length > 0) { - setted.clusterUrl = Constants.switchCluster({ - customClusterUrl: Constants.customClusterUrl - }); - } else if (!setted.clusterUrl) { - setted.clusterUrl = Constants.switchCluster({ - cluster: Constants.currentCluster - }); - } - if (!setted.commitment) { - setted.commitment = Constants.COMMITMENT; - } - return new import_web32.Connection(setted.clusterUrl, setted.commitment); - }; - Node2.changeConnection = (param) => { - setted.clusterUrl = ""; - setted.customClusterUrl = []; - setted.commitment = Constants.COMMITMENT; - const { cluster, commitment, customClusterUrl } = param; - if (commitment) { - setted.commitment = commitment; - debugLog("# Node change commitment: ", setted.commitment); - } - if (cluster) { - setted.clusterUrl = Constants.switchCluster({ cluster }); - debugLog("# Node change clusterUrl: ", setted.clusterUrl); - } - if (customClusterUrl) { - debugLog("# customClusterUrl: ", customClusterUrl); - setted.clusterUrl = Constants.switchCluster({ customClusterUrl }); - setted.customClusterUrl = customClusterUrl; - debugLog( - "# Node change cluster, custom cluster url: ", - setted.clusterUrl - ); - } - }; - Node2.confirmedSig = async (signature, commitment = Constants.COMMITMENT) => { - const connection = Node2.getConnection(); - const latestBlockhash = await connection.getLatestBlockhash(); - return await connection.confirmTransaction( - { - blockhash: latestBlockhash.blockhash, - lastValidBlockHeight: latestBlockhash.lastValidBlockHeight, - signature - }, - commitment - ).then(Result.ok).catch(Result.err); - }; -})(Node || (Node = {})); - -// ../transaction-builder/src/common.ts -var import_web33 = require("@solana/web3.js"); -var MAX_RETRIES = 3; -var TransactionBuilder; -((TransactionBuilder7) => { - class Common2 { - static MAX_TRANSACTION_SIZE = 1232; - instructions; - signers; - feePayer; - data; - constructor(instructions, signers, feePayer, data) { - this.instructions = instructions; - this.signers = signers; - this.feePayer = feePayer; - this.data = data; - } - submit = async () => { - return Try(async () => { - if (!(this instanceof Common2)) { - throw Error("only Instruction object that can use this"); - } - const transaction = new import_web33.Transaction(); - const blockhashObj = await Node.getConnection().getLatestBlockhash(); - transaction.lastValidBlockHeight = blockhashObj.lastValidBlockHeight; - transaction.recentBlockhash = blockhashObj.blockhash; - let finalSigners = this.signers; - if (this.feePayer) { - transaction.feePayer = this.feePayer.publicKey; - finalSigners = [this.feePayer, ...this.signers]; - } - this.instructions.forEach((inst) => transaction.add(inst)); - const options = { - maxRetries: MAX_RETRIES - }; - return await (0, import_web33.sendAndConfirmTransaction)( - Node.getConnection(), - transaction, - finalSigners, - options - ); - }); - }; - } - TransactionBuilder7.Common = Common2; -})(TransactionBuilder || (TransactionBuilder = {})); - -// ../shared/src/shared.ts -var overwriteObject = (object, targets) => { - const that = object; - targets.forEach((target) => { - delete that[target.existsKey]; - that[target.will.key] = target.will.value; - }); - return that; -}; -var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { - if (Constants.isDebugging === "true" || process.env.DEBUG === "true") { - console.log("[DEBUG]", data1, data2, data3, data4); - } -}; -var sleep = async (sec) => { - return new Promise((r) => setTimeout(r, sec * 1e3)); -}; -var isPromise = (obj) => { - return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; -}; -function Try(input, finallyInput) { - try { - const v = input(); - if (isPromise(v)) { - return v.then( - (x) => Result.ok(x), - (err) => Result.err(err) - ); - } else { - return Result.ok(v); - } - } catch (e) { - if (e instanceof Error) { - return Result.err(e); - } - return Result.err(Error(e)); - } finally { - if (finallyInput) { - debugLog("# finally input:", finallyInput); - finallyInput(); - } - } -} -var convertTimestampToDateTime = (created_at) => { - if (created_at) { - return new Date(created_at * 1e3); - } - return; -}; - -// ../transaction-builder/src/batch.ts -var TransactionBuilder2; -((TransactionBuilder7) => { - class Batch { - submit = async (arr) => { - return Try(async () => { - let i = 0; - for (const a of arr) { - if (!a.instructions && !a.signers) { - throw Error( - `only Instruction object that can use batchSubmit(). - Index: ${i}, Set value: ${JSON.stringify(a)}` - ); - } - i++; - } - const instructions = arr.flatMap((a) => a.instructions); - const signers = arr.flatMap((a) => a.signers); - const feePayers = arr.filter((a) => a.feePayer !== void 0); - let feePayer = signers[0]; - if (feePayers.length > 0 && feePayers[0].feePayer) { - feePayer = feePayers[0].feePayer; - } - const transaction = new import_web34.Transaction(); - let finalSigners = signers; - if (feePayer) { - transaction.feePayer = feePayer.publicKey; - finalSigners = [feePayer, ...signers]; - } - instructions.map((inst) => transaction.add(inst)); - const options = { - maxRetries: MAX_RETRIES - }; - return await (0, import_web34.sendAndConfirmTransaction)( - Node.getConnection(), - transaction, - finalSigners, - options - ); - }); - }; - } - TransactionBuilder7.Batch = Batch; -})(TransactionBuilder2 || (TransactionBuilder2 = {})); - -// ../transaction-builder/src/mint.ts -var import_web35 = require("@solana/web3.js"); -var TransactionBuilder3; -((TransactionBuilder7) => { - class Mint { - instructions; - signers; - feePayer; - data; - constructor(instructions, signers, feePayer, data) { - this.instructions = instructions; - this.signers = signers; - this.data = data; - this.feePayer = feePayer; - } - submit = async () => { - return Try(async () => { - if (!(this instanceof Mint)) { - throw Error("only MintInstruction object that can use this"); - } - const transaction = new import_web35.Transaction(); - const blockhashObj = await Node.getConnection().getLatestBlockhash(); - transaction.lastValidBlockHeight = blockhashObj.lastValidBlockHeight; - transaction.recentBlockhash = blockhashObj.blockhash; - let finalSigners = this.signers; - if (this.feePayer) { - transaction.feePayer = this.feePayer.publicKey; - finalSigners = [this.feePayer, ...this.signers]; - } - this.instructions.forEach((inst) => transaction.add(inst)); - const options = { - maxRetries: MAX_RETRIES - }; - if (Node.getConnection().rpcEndpoint === Constants.EndPointUrl.prd) { - debugLog("# Change metaplex cluster on mainnet-beta"); - Node.changeConnection({ cluster: Constants.Cluster.prdMetaplex }); - } - return await (0, import_web35.sendAndConfirmTransaction)( - Node.getConnection(), - transaction, - finalSigners, - options - ); - }); - }; - } - TransactionBuilder7.Mint = Mint; -})(TransactionBuilder3 || (TransactionBuilder3 = {})); - -// ../transaction-builder/src/partial-sign.ts -var import_web36 = require("@solana/web3.js"); -var TransactionBuilder4; -((TransactionBuilder7) => { - class PartialSign { - hexInstruction; - data; - canSubmit; - constructor(instructions, mint, canSubmit = false) { - this.hexInstruction = instructions; - this.data = mint; - this.canSubmit = canSubmit; - } - submit = async (feePayer) => { - return Try(async () => { - if (!(this instanceof PartialSign)) { - throw Error("only PartialSignInstruction object that can use this"); - } - const decode = Buffer.from(this.hexInstruction, "hex"); - const transactionFromJson = import_web36.Transaction.from(decode); - transactionFromJson.partialSign(feePayer.toKeypair()); - const options = { - maxRetries: MAX_RETRIES - }; - const wireTransaction = transactionFromJson.serialize(); - return await Node.getConnection().sendRawTransaction( - wireTransaction, - options - ); - }); - }; - } - TransactionBuilder7.PartialSign = PartialSign; -})(TransactionBuilder4 || (TransactionBuilder4 = {})); - -// ../transaction-builder/src/calculate-txsize.ts -var TransactionBuilder5; -((TransactionBuilder7) => { - const LOW_VALUE = 127; - const HIGH_VALUE = 16383; - const MAX_TRANSACTION_SIZE = 1232; - const compactHeader = (n) => n <= LOW_VALUE ? 1 : n <= HIGH_VALUE ? 2 : 3; - const compactArraySize = (n, size) => compactHeader(n) + n * size; - TransactionBuilder7.calculateTxSize = (transaction, feePayer) => { - const feePayerPk = [feePayer.toBase58()]; - const signers = new Set(feePayerPk); - const accounts = new Set(feePayerPk); - const ixsSize = transaction.instructions.reduce((acc, ix) => { - ix.keys.forEach(({ pubkey, isSigner }) => { - const pk = pubkey.toBase58(); - if (isSigner) - signers.add(pk); - accounts.add(pk); - }); - accounts.add(ix.programId.toBase58()); - const nIndexes = ix.keys.length; - const opaqueData = ix.data.length; - return acc + 1 + // PID index - compactArraySize(nIndexes, 1) + compactArraySize(opaqueData, 1); - }, 0); - return compactArraySize(signers.size, 64) + // signatures - 3 + // header - compactArraySize(accounts.size, 32) + // accounts - 32 + // blockhash - compactHeader(transaction.instructions.length) + // instructions - ixsSize; - }; - TransactionBuilder7.isOverTransactionSize = (transaction, feePayer) => { - return (0, TransactionBuilder7.calculateTxSize)(transaction, feePayer) > MAX_TRANSACTION_SIZE; - }; -})(TransactionBuilder5 || (TransactionBuilder5 = {})); - -// ../global/src/index.ts -var import_web39 = require("@solana/web3.js"); - -// ../account/src/associated.ts -var import_spl_token = require("@solana/spl-token"); - -// ../account/src/keypair.ts -var import_web37 = require("@solana/web3.js"); -var import_bs58 = __toESM(require("bs58")); -var Account; -((Account5) => { - class Keypair4 { - secret; - pubkey; - constructor(params) { - if (!params.pubkey) { - const keypair = params.secret.toKeypair(); - this.pubkey = keypair.publicKey.toString(); - } else { - this.pubkey = params.pubkey; - } - this.secret = params.secret; - } - toPublicKey() { - return new import_web37.PublicKey(this.pubkey); - } - toKeypair() { - const decoded = import_bs58.default.decode(this.secret); - return import_web37.Keypair.fromSecretKey(decoded); - } - static isPubkey = (value) => /^[0-9a-zA-Z]{32,44}$/.test(value); - static isSecret = (value) => /^[0-9a-zA-Z]{87,88}$/.test(value); - static create = () => { - const keypair = import_web37.Keypair.generate(); - return new Keypair4({ - pubkey: keypair.publicKey.toString(), - secret: import_bs58.default.encode(keypair.secretKey) - }); - }; - static toKeyPair = (keypair) => { - return new Keypair4({ - pubkey: keypair.publicKey.toString(), - secret: import_bs58.default.encode(keypair.secretKey) - }); - }; - } - Account5.Keypair = Keypair4; -})(Account || (Account = {})); - -// ../account/src/associated.ts -var Account2; -((Account5) => { - let Associated; - ((Associated2) => { - const RETRY_OVER_LIMIT = 10; - const RETRY_SLEEP_TIME = 3; - const get = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const res = await (0, Associated2.makeOrCreateInstruction)( - mint, - owner, - new Account.Keypair({ secret: feePayer }).pubkey, - allowOwnerOffCurve - ); - if (!res.inst) { - return res.tokenAccount; - } - return new TransactionBuilder6.Common( - [res.inst], - [], - feePayer.toKeypair(), - res.tokenAccount - ); - }; - Associated2.retryGetOrCreate = async (mint, owner, feePayer) => { - let counter = 1; - while (counter < RETRY_OVER_LIMIT) { - try { - const inst = await get(mint, owner, feePayer, true); - if (inst && typeof inst === "string") { - debugLog("# associatedTokenAccount: ", inst); - return inst; - } else if (inst instanceof TransactionBuilder6.Common) { - (await inst.submit()).map( - async (ok) => { - await Node.confirmedSig(ok); - return inst.data; - }, - (err) => { - debugLog("# Error submit retryGetOrCreate: ", err); - throw err; - } - ); - } - } catch (e) { - debugLog(`# retry: ${counter} create token account: `, e); - debugLog(`# mint: ${mint}, owner: ${owner}, feePayer: ${feePayer}`); - } - await sleep(RETRY_SLEEP_TIME); - counter++; - } - throw Error(`retry action is over limit ${RETRY_OVER_LIMIT}`); - }; - Associated2.makeOrCreateInstruction = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const associatedTokenAccount = (0, import_spl_token.getAssociatedTokenAddressSync)( - mint.toPublicKey(), - owner.toPublicKey(), - allowOwnerOffCurve, - import_spl_token.TOKEN_PROGRAM_ID, - import_spl_token.ASSOCIATED_TOKEN_PROGRAM_ID - ); - debugLog("# associatedTokenAccount: ", associatedTokenAccount.toString()); - try { - await (0, import_spl_token.getAccount)( - Node.getConnection(), - associatedTokenAccount, - Node.getConnection().commitment, - import_spl_token.TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst: void 0 - }; - } catch (error) { - if (!(error instanceof import_spl_token.TokenAccountNotFoundError) && !(error instanceof import_spl_token.TokenInvalidAccountOwnerError)) { - throw Error("Unexpected error"); - } - const payer = !feePayer ? owner : feePayer; - const inst = (0, import_spl_token.createAssociatedTokenAccountInstruction)( - payer.toPublicKey(), - associatedTokenAccount, - owner.toPublicKey(), - mint.toPublicKey(), - import_spl_token.TOKEN_PROGRAM_ID, - import_spl_token.ASSOCIATED_TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst - }; - } - }; - })(Associated = Account5.Associated || (Account5.Associated = {})); -})(Account2 || (Account2 = {})); - -// ../account/src/pda.ts -var import_web38 = require("@solana/web3.js"); -var import_mpl_token_metadata = require("@metaplex-foundation/mpl-token-metadata"); -var import_mpl_bubblegum = require("@metaplex-foundation/mpl-bubblegum"); -var import_bn = __toESM(require("bn.js")); -var Account3; -((Account5) => { - let Pda; - ((Pda2) => { - Pda2.getMetadata = (address) => { - const [publicKey] = import_web38.PublicKey.findProgramAddressSync( - [ - Buffer.from("metadata"), - import_mpl_token_metadata.PROGRAM_ID.toBuffer(), - address.toPublicKey().toBuffer() - ], - import_mpl_token_metadata.PROGRAM_ID - ); - return publicKey; - }; - Pda2.getMasterEdition = (address) => { - const [publicKey] = import_web38.PublicKey.findProgramAddressSync( - [ - Buffer.from("metadata"), - import_mpl_token_metadata.PROGRAM_ID.toBuffer(), - address.toPublicKey().toBuffer(), - Buffer.from("edition") - ], - import_mpl_token_metadata.PROGRAM_ID - ); - return publicKey; - }; - Pda2.getTreeAuthority = (address) => { - const [publicKey] = import_web38.PublicKey.findProgramAddressSync( - [address.toPublicKey().toBuffer()], - import_mpl_bubblegum.MPL_BUBBLEGUM_PROGRAM_ID.toPublicKey() - ); - return publicKey; - }; - Pda2.getBgumSigner = () => { - const [publicKey] = import_web38.PublicKey.findProgramAddressSync( - [Buffer.from("collection_cpi", "utf8")], - import_mpl_bubblegum.MPL_BUBBLEGUM_PROGRAM_ID.toPublicKey() - ); - return publicKey; - }; - Pda2.getAssetId = (address, leafIndex) => { - const node = new import_bn.default.BN(leafIndex); - const [assetId] = import_web38.PublicKey.findProgramAddressSync( - [ - Buffer.from("asset", "utf8"), - address.toPublicKey().toBuffer(), - Uint8Array.from(node.toArray("le", 8)) - ], - import_mpl_bubblegum.MPL_BUBBLEGUM_PROGRAM_ID.toPublicKey() - ); - return assetId.toString(); - }; - })(Pda = Account5.Pda || (Account5.Pda = {})); -})(Account3 || (Account3 = {})); - -// ../account/src/index.ts -var Account4 = { - ...Account2, - ...Account, - ...Account3 -}; - -// ../global/src/index.ts -var import_bignumber = require("bignumber.js"); -var import_bs582 = __toESM(require("bs58")); -String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, options = {}) { - const endPointUrl = Node.getConnection().rpcEndpoint; - debugLog("# toExplorerUrl rpcEndpoint:", endPointUrl); - let cluster = ""; - if (endPointUrl === Constants.EndPointUrl.prd) { - cluster = Constants.Cluster.prd; - } else if (endPointUrl === Constants.EndPointUrl.test) { - cluster = Constants.Cluster.test; - } else if (endPointUrl === Constants.EndPointUrl.dev) { - cluster = Constants.Cluster.dev; - } else { - cluster = Constants.Cluster.dev; - } - const addressOrSignature = this.toString(); - let url = ""; - if (options.replacePath) { - if (explorer === "solanafm" /* SolanaFM */) { - url = `${Constants.EXPLORER_SOLANAFM_URL}/${options.replacePath}/${addressOrSignature}?cluster=${cluster}`; - } else if (explorer === "xray" /* Xray */) { - url = `${Constants.EXPLORER_XRAY_URL}/${options.replacePath}/${addressOrSignature}?network=${cluster}`; - } else { - url = `${Constants.EXPLORER_SOLSCAN_URL}/${options.replacePath}/${addressOrSignature}?cluster=${cluster}`; - } - return url; - } - if (Account4.Keypair.isPubkey(addressOrSignature)) { - if (explorer === "solanafm" /* SolanaFM */) { - url = `${Constants.EXPLORER_SOLANAFM_URL}/address/${addressOrSignature}?cluster=${cluster}`; - } else if (explorer === "xray" /* Xray */) { - url = `${Constants.EXPLORER_XRAY_URL}/account/${addressOrSignature}?network=${cluster}`; - } else { - url = `${Constants.EXPLORER_SOLSCAN_URL}/account/${addressOrSignature}?cluster=${cluster}`; - } - } else { - if (explorer === "solanafm" /* SolanaFM */) { - url = `${Constants.EXPLORER_SOLANAFM_URL}/tx/${addressOrSignature}?cluster=${cluster}`; - } else if (explorer === "xray" /* Xray */) { - url = `${Constants.EXPLORER_XRAY_URL}/tx/${addressOrSignature}?network=${cluster}`; - } else { - url = `${Constants.EXPLORER_SOLSCAN_URL}/tx/${addressOrSignature}?cluster=${cluster}`; - } - } - return url; -}; -String.prototype.toPublicKey = function() { - if (!Account4.Keypair.isPubkey(this.toString())) { - throw Error(`No match KeyPair.PubKey: ${this.toString()}`); - } - return new import_web39.PublicKey(this.toString()); -}; -String.prototype.toKeypair = function() { - if (!Account4.Keypair.isSecret(this.toString())) { - throw Error(`No match KeyPair.Secret: ${this.toString()}`); - } - const decoded = import_bs582.default.decode(this.toString()); - return import_web39.Keypair.fromSecretKey(decoded); -}; -Number.prototype.toSol = function() { - return (0, import_bignumber.BigNumber)(this).div(import_web39.LAMPORTS_PER_SOL).toNumber(); -}; -Number.prototype.toLamports = function() { - return (0, import_bignumber.BigNumber)(this).times(import_web39.LAMPORTS_PER_SOL).toNumber(); -}; - -// ../transaction-builder/src/index.ts -var TransactionBuilder6 = { - ...TransactionBuilder2, - ...TransactionBuilder5, - ...TransactionBuilder3, - ...TransactionBuilder, - ...TransactionBuilder4 -}; - -// ../shared/src/result.ts -var AbstractResult = class { - unwrap(ok, err) { - const r = this._chain( - (value) => Result.ok(ok ? ok(value) : value), - (error) => err ? Result.ok(err(error)) : Result.err(error) - ); - if (r.isErr) { - throw r.error; - } - return r.value; - } - map(ok, err) { - return this._chain( - (value) => Result.ok(ok(value)), - (error) => Result.err(err ? err(error) : error) - ); - } - chain(ok, err) { - return this._chain(ok, err || ((error) => Result.err(error))); - } - match(ok, err) { - this._chain( - (value) => Result.ok(ok(value)), - (error) => Result.err(err(error)) - ); - } - /// single TransactionBuilder //// - /* eslint-disable @typescript-eslint/no-explicit-any */ - async submit(feePayer) { - const res = this.map( - async (ok) => { - debugLog("# result single submit: ", ok); - if (feePayer) { - const obj = ok; - return await obj.submit(feePayer); - } else { - const obj = ok; - return await obj.submit(); - } - }, - (err) => { - return err; - } - ); - if (res.isErr) { - return Result.err(res.error); - } - return res.value; - } -}; -Array.prototype.submit = async function(feePayer) { - if (feePayer) { - let i = 1; - for await (const obj of this) { - if (obj.isErr) { - return obj; - } else if (obj.value.canSubmit) { - debugLog("# Result batch canSubmit"); - const sig = await obj.submit(feePayer); - if (sig.isErr) { - return sig; - } - await Node.confirmedSig(sig.value); - } else { - debugLog("# Result batch other than canSubmit"); - if (this.length == i) { - return obj.submit(feePayer); - } - obj.submit(feePayer); - } - i++; - } - } else { - const instructions = []; - for (const obj of this) { - if (obj.isErr) { - return obj; - } else if (obj.isOk) { - instructions.push(obj.value); - } else { - return Result.err(Error("Only Array Instruction object")); - } - } - debugLog("# Result batch submit: ", instructions); - return new TransactionBuilder6.Batch().submit(instructions); - } -}; -var InternalOk = class extends AbstractResult { - constructor(value) { - super(); - this.value = value; - } - isOk = true; - isErr = false; - /* eslint-disable @typescript-eslint/no-unused-vars */ - _chain(ok, _err) { - return ok(this.value); - } -}; -var InternalErr = class extends AbstractResult { - constructor(error) { - super(); - this.error = error; - } - isOk = false; - isErr = true; - _chain(_ok, err) { - return err(this.error); - } -}; -var Result; -((Result7) => { - function ok(value) { - return new InternalOk(value); - } - Result7.ok = ok; - function err(error) { - return new InternalErr(error || Error()); - } - Result7.err = err; - function all(obj) { - if (Array.isArray(obj)) { - const resArr = []; - for (const item of obj) { - if (item.isErr) { - return item; - } - resArr.push(item.value); - } - return Result7.ok(resArr); - } - const res = {}; - const keys = Object.keys(obj); - for (const key of keys) { - const item = obj[key]; - if (item.isErr) { - return item; - } - res[key] = item.value; - } - return Result7.ok(res); - } - Result7.all = all; -})(Result || (Result = {})); - -// ../validator/src/index.ts -var Validator; -((Validator2) => { - let Message; - ((Message2) => { - Message2.SUCCESS = "success"; - Message2.SMALL_NUMBER = "too small"; - Message2.BIG_NUMBER = "too big"; - Message2.LONG_LENGTH = "too long"; - Message2.EMPTY = "invalid empty value"; - Message2.INVALID_URL = "invalid url"; - Message2.ONLY_NODE_JS = "`string` type is only Node.js"; - })(Message = Validator2.Message || (Validator2.Message = {})); - Validator2.NAME_LENGTH = 32; - Validator2.SYMBOL_LENGTH = 10; - Validator2.URL_LENGTH = 200; - Validator2.ROYALTY_MAX = 100; - Validator2.SELLER_FEE_BASIS_POINTS_MAX = 1e4; - Validator2.ROYALTY_MIN = 0; - Validator2.isRoyalty = (royalty) => { - return Try(() => { - const key = "royalty"; - if (royalty !== 0 && !royalty) { - throw createError(key, Message.EMPTY, royalty); - } - if (royalty < Validator2.ROYALTY_MIN) { - throw createError(key, Message.SMALL_NUMBER, royalty, { - threshold: Validator2.ROYALTY_MIN, - condition: "underMin" - }); - } else if (royalty > Validator2.ROYALTY_MAX) { - throw createError(key, Message.BIG_NUMBER, royalty, { - threshold: Validator2.ROYALTY_MAX, - condition: "overMax" - }); - } - return Message.SUCCESS; - }); - }; - Validator2.isSellerFeeBasisPoints = (royalty) => { - return Try(() => { - const key = "sellerFeeBasisPoints/seller_fee_basis_points"; - if (royalty !== 0 && !royalty) { - throw createError(key, Message.EMPTY, royalty); - } - if (royalty < Validator2.ROYALTY_MIN) { - throw createError(key, Message.SMALL_NUMBER, royalty, { - threshold: Validator2.ROYALTY_MIN, - condition: "underMin" - }); - } else if (royalty > Validator2.ROYALTY_MAX * Converter5.Royalty.THRESHOLD) { - throw createError(key, Message.BIG_NUMBER, royalty, { - threshold: Validator2.SELLER_FEE_BASIS_POINTS_MAX, - condition: "overMax" - }); - } - return Message.SUCCESS; - }); - }; - Validator2.isName = (name) => { - return Try(() => { - const key = "name"; - if (!name) { - throw createError(key, Message.EMPTY, name); - } - if (byteLength(name) > Validator2.NAME_LENGTH) { - throw createError(key, Message.LONG_LENGTH, name, { - threshold: Validator2.NAME_LENGTH, - condition: "overMax" - }); - } - return Message.SUCCESS; - }); - }; - Validator2.isSymbol = (symbol) => { - return Try(() => { - const key = "symbol"; - if (!symbol) { - throw createError(key, Message.EMPTY, symbol); - } - if (byteLength(symbol) > Validator2.SYMBOL_LENGTH) { - throw createError(key, Message.LONG_LENGTH, symbol, { - threshold: Validator2.SYMBOL_LENGTH, - condition: "overMax" - }); - } - return Message.SUCCESS; - }); - }; - Validator2.isImageUrl = (image) => isUriOrImage(image, "image"); - Validator2.checkAll = (metadata) => { - return Try(() => { - const keys = Object.keys(metadata); - const results = []; - keys.map((key) => { - let res; - switch (key) { - case "image": - if (key in metadata && metadata.image) { - res = (0, Validator2.isImageUrl)(metadata.image); - } - break; - case "royalty": - if (key in metadata && metadata.royalty) { - res = (0, Validator2.isRoyalty)(metadata.royalty); - } - break; - case "seller_fee_basis_points": - if (key in metadata && metadata.seller_fee_basis_points) { - res = (0, Validator2.isSellerFeeBasisPoints)(metadata.seller_fee_basis_points); - } - break; - case "sellerFeeBasisPoints": - if (key in metadata) { - res = (0, Validator2.isSellerFeeBasisPoints)(metadata.sellerFeeBasisPoints); - } - break; - case "name": - if (metadata.name) { - res = (0, Validator2.isName)(metadata.name); - } - break; - case "symbol": - if (metadata.symbol) { - res = (0, Validator2.isSymbol)(metadata.symbol); - } - break; - } - if (res && res.isErr) { - results.push(...res.error.details); - } - }); - if (results.length > 0) { - const message = "Caught in the validation errors. see information e.g: err.details"; - throw new ValidatorError(message, results); - } - return Message.SUCCESS; - }); - }; - const byteLength = (value) => { - const text = new TextEncoder(); - return text.encode(value).length; - }; - const createError = (key, message, actual, limit) => { - let error; - if (limit) { - error = new ValidatorError(message, [{ key, message, actual, limit }]); - } else { - error = new ValidatorError(message, [{ key, message, actual }]); - } - return error; - }; - const isUriOrImage = (imageOrUri, key) => { - return Try(() => { - if (!imageOrUri) { - throw createError(key, Message.EMPTY, imageOrUri); - } - if (byteLength(imageOrUri) > Validator2.URL_LENGTH) { - throw createError(key, Message.LONG_LENGTH, imageOrUri, { - threshold: Validator2.URL_LENGTH, - condition: "overMax" - }); - } - if (!/https?:\/\/[-_.!~*\\()a-zA-Z0-9;?:&=+,%#]+/g.test(imageOrUri)) { - throw createError(key, Message.INVALID_URL, imageOrUri); - } - return Message.SUCCESS; - }); - }; -})(Validator || (Validator = {})); -var ValidatorError = class extends Error { - details; - constructor(message, details) { - super(message); - this.details = details; - } -}; - -// src/nft.ts -var Converter6; -((Converter15) => { - let Nft; - ((Nft2) => { - Nft2.intoUser = (output) => { - return { - mint: output.onchain.id.toString(), - collectionMint: Converter.CollectionMint.intoUser( - output.onchain.grouping - ), - authorities: output.onchain.authorities, - royalty: Converter4.Royalty.intoUser(output.onchain.royalty.percent), - name: output.onchain.content.metadata.name, - symbol: output.onchain.content.metadata.symbol, - uri: output.onchain.content.json_uri, - creators: Converter2.Creators.intoUser(output.onchain.creators), - treeAddress: output.onchain.compression.tree, - isCompressed: output.onchain.compression.compressed, - isMutable: output.onchain.mutable, - isBurn: output.onchain.burnt, - editionNonce: output.onchain.supply.edition_nonce, - primarySaleHappened: output.onchain.royalty.primary_sale_happened, - dateTime: convertTimestampToDateTime(output.offchain.created_at), - offchain: output.offchain - }; - }; - })(Nft = Converter15.Nft || (Converter15.Nft = {})); -})(Converter6 || (Converter6 = {})); - -// src/memo.ts -var Converter7; -((Converter15) => { - let Memo; - ((Memo2) => { - Memo2.intoUserSide = (output, meta, outputTransfer, mappingTokenAccount) => { - const history = {}; - if (outputTransfer && outputTransfer.program !== "") { - if (mappingTokenAccount && outputTransfer.program === "spl-token") { - const foundSource = mappingTokenAccount.find( - (m) => m.account === outputTransfer.parsed.info.source - ); - const foundDest = mappingTokenAccount.find( - (m) => m.account === outputTransfer.parsed.info.destination - ); - history.mint = outputTransfer.parsed.info.mint; - foundSource && (history.source = foundSource.owner); - foundDest && (history.destination = foundDest.owner); - } else { - history.source = outputTransfer.parsed.info.source; - history.destination = outputTransfer.parsed.info.destination; - } - } - history.memo = output.parsed; - history.type = output.program; - history.dateTime = convertTimestampToDateTime(meta.blockTime); - history.sig = meta.transaction.signatures[0]; - history.innerInstruction = false; - if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { - history.innerInstruction = true; - } - return history; - }; - })(Memo = Converter15.Memo || (Converter15.Memo = {})); -})(Converter7 || (Converter7 = {})); - -// src/mint.ts -var Converter8; -((Converter15) => { - let Mint; - ((Mint2) => { - Mint2.intoUserSide = (output, meta) => { - const history = {}; - history.mint = output.parsed.info.mint; - history.mintAuthority = output.parsed.info.mintAuthority; - history.tokenAmount = output.parsed.info.tokenAmount; - history.account = output.parsed.info.account; - history.type = output.program; - history.dateTime = convertTimestampToDateTime(meta.blockTime); - history.sig = meta.transaction.signatures[0]; - history.innerInstruction = false; - if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { - history.innerInstruction = true; - } - return history; - }; - })(Mint = Converter15.Mint || (Converter15.Mint = {})); -})(Converter8 || (Converter8 = {})); - -// src/regular-nft-metadata.ts -var Converter9; -((Converter15) => { - let RegularNftMetadata; - ((RegularNftMetadata2) => { - RegularNftMetadata2.intoInfra = (input, uri, sellerFeeBasisPoints) => { - return { - name: input.name, - symbol: input.symbol, - uri, - sellerFeeBasisPoints, - creators: Converter2.Creators.intoInfra(input.creators), - collection: Converter.Collection.intoInfra(input.collection), - uses: input.uses || null - }; - }; - })(RegularNftMetadata = Converter15.RegularNftMetadata || (Converter15.RegularNftMetadata = {})); -})(Converter9 || (Converter9 = {})); - -// src/properties.ts -var Converter10; -((Converter15) => { - let Properties; - ((Properties2) => { - Properties2.intoInfra = async (input, callbackFunc, storageType, feePayer) => { - if (!input || !input.files) { - return {}; - } - const files = await Promise.all( - input.files.map(async (file) => { - if (!file.filePath) { - return {}; - } - const res = await callbackFunc(file.filePath, storageType, feePayer); - if (res.isErr) { - throw Error(res.error.message); - } - return overwriteObject(file, [ - { - existsKey: "filePath", - will: { key: "uri", value: res.value } - } - ]); - }) - ); - return { ...input, files }; - }; - })(Properties = Converter15.Properties || (Converter15.Properties = {})); -})(Converter10 || (Converter10 = {})); - -// src/uses.ts -var Converter11; -((Converter15) => { - let Uses; - ((Uses2) => { - Uses2.intoUserSide = (output) => { - if (!output) { - return void 0; - } - return output; - }; - })(Uses = Converter15.Uses || (Converter15.Uses = {})); -})(Converter11 || (Converter11 = {})); - -// src/token-metadata.ts -var Converter12; -((Converter15) => { - let TokenMetadata; - ((TokenMetadata2) => { - TokenMetadata2.intoInfra = (input, uri, sellerFeeBasisPoints) => { - return { - name: input.name, - symbol: input.symbol, - uri, - sellerFeeBasisPoints, - creators: Converter2.Creators.intoInfra(input.creators), - collection: null, - uses: input.uses || null - }; - }; - TokenMetadata2.intoUser = (output, tokenAmount) => { - return { - mint: output.onchain.mint.toString(), - royalty: output.onchain.data.sellerFeeBasisPoints, - name: (0, TokenMetadata2.deleteNullStrings)(output.onchain.data.name), - symbol: (0, TokenMetadata2.deleteNullStrings)(output.onchain.data.symbol), - tokenAmount, - uri: (0, TokenMetadata2.deleteNullStrings)(output.onchain.data.uri), - creators: Converter2.Creators.intoUser(output.onchain.data.creators), - uses: Converter11.Uses.intoUserSide(output.onchain.uses), - dateTime: convertTimestampToDateTime(output.offchain.created_at), - offchain: output.offchain - }; - }; - TokenMetadata2.deleteNullStrings = (str) => { - return str.replace(/\0/g, ""); - }; - })(TokenMetadata = Converter15.TokenMetadata || (Converter15.TokenMetadata = {})); -})(Converter12 || (Converter12 = {})); - -// src/transfer-checked.ts -var Converter13; -((Converter15) => { - let TransferChecked; - ((TransferChecked2) => { - TransferChecked2.intoUserSide = (output, meta, mappingTokenAccount) => { - const history = {}; - if (mappingTokenAccount) { - const foundSource = mappingTokenAccount.find( - (m) => m.account === output.parsed.info.source - ); - const foundDest = mappingTokenAccount.find( - (m) => m.account === output.parsed.info.destination - ); - foundSource && (history.source = foundSource.owner); - foundDest && (history.destination = foundDest.owner); - } - history.tokenAmount = output.parsed.info.tokenAmount; - history.mint = output.parsed.info.mint; - history.multisigAuthority = output.parsed.info.multisigAuthority; - history.signers = output.parsed.info.signers; - history.type = output.program; - history.dateTime = convertTimestampToDateTime(meta.blockTime); - history.sig = meta.transaction.signatures[0]; - history.innerInstruction = false; - if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { - history.innerInstruction = true; - } - return history; - }; - })(TransferChecked = Converter15.TransferChecked || (Converter15.TransferChecked = {})); -})(Converter13 || (Converter13 = {})); - -// src/transfer.ts -var Converter14; -((Converter15) => { - let Transfer; - ((Transfer2) => { - Transfer2.intoUserSide = (output, meta) => { - const history = {}; - if (!output.parsed.info.destination || !output.parsed.info.lamports) { - return; - } - history.source = output.parsed.info.source; - history.destination = output.parsed.info.destination; - history.sol = output.parsed.info.lamports?.toSol().toString(); - history.type = output.program; - history.dateTime = convertTimestampToDateTime(meta.blockTime); - history.sig = meta.transaction.signatures[0]; - history.innerInstruction = false; - if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { - history.innerInstruction = true; - } - return history; - }; - })(Transfer = Converter15.Transfer || (Converter15.Transfer = {})); -})(Converter14 || (Converter14 = {})); - -// src/index.ts -var Converter5 = { - ...Converter3, - ...Converter, - ...Converter2, - ...Converter6, - ...Converter7, - ...Converter8, - ...Converter9, - ...Converter10, - ...Converter4, - ...Converter12, - ...Converter13, - ...Converter14, - ...Converter11 -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - Converter -}); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uL3NyYy9jb2xsZWN0aW9uLnRzIiwgIi4uL3NyYy9jcmVhdG9ycy50cyIsICIuLi9zcmMvY29tcHJlc3NlZC1uZnQtbWV0YWRhdGEudHMiLCAiLi4vc3JjL3JveWFsdHkudHMiLCAiLi4vLi4vc2hhcmVkL3NyYy9jb25zdGFudHMudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvYmF0Y2gudHMiLCAiLi4vLi4vbm9kZS9zcmMvaW5kZXgudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY29tbW9uLnRzIiwgIi4uLy4uL3NoYXJlZC9zcmMvc2hhcmVkLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL21pbnQudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvcGFydGlhbC1zaWduLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2NhbGN1bGF0ZS10eHNpemUudHMiLCAiLi4vLi4vZ2xvYmFsL3NyYy9pbmRleC50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9hc3NvY2lhdGVkLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2tleXBhaXIudHMiLC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nbmVycztcblxuICAgICAgICBpZiAodGhpcy5mZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gdGhpcy5mZWVQYXllci5wdWJsaWNLZXk7XG4gICAgICAgICAgZmluYWxTaWduZXJzID0gW3RoaXMuZmVlUGF5ZXIsIC4uLnRoaXMuc2lnbmVyc107XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLmluc3RydWN0aW9ucy5mb3JFYWNoKChpbnN0KSA9PiB0cmFuc2FjdGlvbi5hZGQoaW5zdCkpO1xuXG4gICAgICAgIGNvbnN0IG9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IE1BWF9SRVRSSUVTLFxuICAgICAgICB9O1xuXG4gICAgICAgIHJldHVybiBhd2FpdCBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uKFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICBvcHRpb25zLFxuICAgICAgICApO1xuICAgICAgfSk7XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IEFueU9iamVjdCB9IGZyb20gJ34vdHlwZXMvc2hhcmVkJztcbmltcG9ydCB7IENvbnN0YW50cyB9IGZyb20gJy4vY29uc3RhbnRzJztcbmltcG9ydCB7IFJlc3VsdCB9IGZyb20gJy4vcmVzdWx0JztcblxuLyoqXG4gKiBjb252ZXJ0IGJ1ZmZlciB0byBBcnJheVxuICpcbiAqIEBwYXJhbSB7QnVmZmVyfSBidWZmZXJcbiAqIEByZXR1cm5zIG51bWJlcltdXG4gKi9cbmV4cG9ydCBjb25zdCBidWZmZXJUb0FycmF5ID0gKGJ1ZmZlcjogQnVmZmVyKTogbnVtYmVyW10gPT4ge1xuICBjb25zdCBudW1zID0gW107XG4gIGZvciAoY29uc3QgYnl0ZSBvZ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WNjb3VudDtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uPFB1YmtleT4oXG4gICAgICAgIFtyZXMuaW5zdF0sXG4gICAgICAgIFtdLFxuICAgICAgICBmZWVQYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgcmVzLnRva2VuQWNjb3VudCEsXG4gICAgICApO1xuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiBSZXRyeSBmdW5jdGlvbiBpZiBjcmVhdGUgbmV3IHRva2VuIGFjY291aW50XG4gICAgICpcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gbWludFxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBvd25lclxuICAgICAqIEBwYXJhbSB7U2VjcmV0fSBmZWVQYXllclxuICAgICAqIEByZXR1cm5zIFByb21pc2U8c3RyaW5nPlxuICAgICAqL1xuICAgIGV4cG9ydCBjb25zdCByZXRyeUdldE9yQ3JlYXRlID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyOiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxzdHJpbmc+ID0+IHtcbiAgICAgIGxldCBjb3VudGVyID0gMTtcbiAgICAgIHdoaWxlIChjb3VudGVyIDwgUkVUUllfT1ZFUl9MSU1JVCkge1xuICAgICAgICB0cnkge1xuICAgICAgICAgIGNvbnN0IGluc3QgPSBhd2FpdCBnZXQobWludCwgb3duZXIsIGZlZVBheWVyLCB0cnVlKTtcblxuICAgICAgICAgIGlmIChpbnN0ICYmIHR5cGVvZiBpbnN0ID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgaW5zdCk7XG4gICAgICAgICAgICByZXR1cm4gaW5zdDtcbiAgICAgICAgICB9IGVsc2UgaWYgKGluc3QgaW5zdGFuY2VvZiBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uKSB7XG4gICAgICAgICAgICAoYXdhaXQgaW5zdC5zdWJtaXQoKSkubWFwKFxuICAgICAgICAgICAgICBhc3luYyAob2s6IHN0cmluZykgPT4ge1xuICAgICAgICAgICAgICAgIGF3YWl0IE5vZGUuY29uZmlybWVkU2lnKG9rKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gaW5zdC5kYXRhO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAoZXJyOiBFcnJvcikgPT4ge1xuICAgICAgICAgICAgICAgIGRlYnVnTG9nKCcjIEVycm9yIHN1Ym1pdCByZXRyeUdldE9yQ3JlYXRlOiAnLCBlcnIpO1xuICAgICAgICAgICAgICAgIHRocm93IGVycjtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgZGVidWdMb2coYCMgcmV0cnk6ICR7Y291bnRlcn0gY3JlYXRlIHRva2VuIGFjY291bnQ6IGAsIGUpO1xuICAgICAgICAgIGRlYnVnTG9nKGAjIG1pbnQ6ICR7bWludH0sIG93bmVyOiAke293bmVyfSwgZmVlUGF5ZXI6ICR7ZmVlUGF5ZXJ9YCk7XG4gICAgICAgIH1cbiAgICAgICAgYXdhaXQgc2xlZXAoUkVUUllfU0xFRVBfVElNRSk7XG4gICAgICAgIGNvdW50ZXIrKztcbiAgICAgIH1cbiAgICAgIHRocm93IEVycm9yKGByZXRyeSBhY3Rpb24gaXMgb3ZlciBsaW1pdCAke1JFVFJZX09WRVJfTElNSVR9YCk7XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIFtNYWluIGxvZ2ljXUdldCBBc3NvY2lhdGVkIHRva2VuIEFjY291bnQuXG4gICAgICogaWYgbm90IGNyZWF0ZWQsIGNyZWF0ZSBuZXcgdG9rZW4gYWNjb3VpbnRcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBtaW50XG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAgICogQHBhcmFtIHtQdWJrZXl9IGZlZVBheWVyXG4gICAgICogQHJldHVybnMgUHJvbWlzZTxzdHJpbmc+XG4gICAgICovXG4gICAgZXhwb3J0IGNvbnN0IG1ha2VPckNyZWF0ZUluc3RydWN0aW9uID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyPzogUHVia2V5LFxuICAgICAgYWxsb3dPd25lck9mZkN1cnZlID0gZmFsc2UsXG4gICAgKTogUHJvbWlzZTx7XG4gICAgICB0b2tlbkFjY291bnQ6IHN0cmluZztcbiAgICAgIGluc3Q6IFRyYW5zYWN0aW9uSW5zdHJ1Y3Rpb24gfCB1bmRlZmluZWQ7XG4gICAgfT4gPT4ge1xuICAgICAgY29uc3QgYXNzb2NpYXRlZFRva2VuQWNjb3VudCA9IGdldEFzc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jKFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSxcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3QsXG4gICAgICAgIH07XG4gICAgICB9XG4g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kge1xuICAgICAgICAgICAgICByZXMgPSBpc1JveWFsdHkobWV0YWRhdGEucm95YWx0eSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ25hbWUnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLm5hbWUpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNOYW1lKG1ldGFkYXRhLm5hbWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc3ltYm9sJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5zeW1ib2wpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTeW1ib2wobWV0YWRhdGEuc3ltYm9sKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgICAgIGlmIChyZXMgJiYgcmVzLmlzRXJyKSB7XG4gICAgICAgICAgcmVzdWx0cy5wdXNoKC4u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CAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJpbXBvcnRfd2ViMyIsICJpbXBvcnRfd2ViMyIsICJBY2NvdW50IiwgIktleXBhaXIiLCAiYnMiLCAiT3JpZ2luYWwiLCAiQWNjb3VudCIsICJBc3NvY2lhdGVkIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJpbXBvcnRfd2ViMyIsICJBY2NvdW50IiwgIlBkYSIsICJCTiIsICJBY2NvdW50IiwgImltcG9ydF9iczU4IiwgIkFjY291bnQiLCAiYnMiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJSZXN1bHQiLCAiVmFsaWRhdG9yIiwgIk1lc3NhZ2UiLCAiQ29udmVydGVyIiwgIkNvbnZlcnRlciIsICJOZnQiLCAiQ29udmVydGVyIiwgIk1lbW8iLCAiQ29udmVydGVyIiwgIk1pbnQiLCAiQ29udmVydGVyIiwgIlJlZ3VsYXJOZnRNZXRhZGF0YSIsICJDb252ZXJ0ZXIiLCAiUHJvcGVydGllcyIsICJDb252ZXJ0ZXIiLCAiVXNlcyIsICJDb252ZXJ0ZXIiLCAiVG9rZW5NZXRhZGF0YSIsICJDb252ZXJ0ZXIiLCAiVHJhbnNmZXJDaGVja2VkIiwgIkNvbnZlcnRlciIsICJUcmFuc2ZlciIsICJDb252ZXJ0ZXIiXQp9Cg== \ No newline at end of file diff --git a/packages/converter/dist/index.mjs b/packages/converter/dist/index.mjs deleted file mode 100644 index 8e7ccde69..000000000 --- a/packages/converter/dist/index.mjs +++ /dev/null @@ -1,1514 +0,0 @@ -// src/collection.ts -var Converter; -((Converter15) => { - let Collection; - ((Collection2) => { - Collection2.intoInfra = (input) => { - if (!input) { - return null; - } - return { - key: input.toPublicKey(), - verified: false - }; - }; - Collection2.intoUser = (output) => { - if (!output) { - return void 0; - } - return { - address: output.key.toString(), - verified: output.verified - }; - }; - })(Collection = Converter15.Collection || (Converter15.Collection = {})); - let CollectionMint; - ((CollectionMint2) => { - CollectionMint2.intoUser = (output) => { - const res = output.find((value) => { - if (value.group_key === "collection") { - return value.group_value; - } - }); - return res ? res.group_value : ""; - }; - })(CollectionMint = Converter15.CollectionMint || (Converter15.CollectionMint = {})); -})(Converter || (Converter = {})); - -// src/creators.ts -var Converter2; -((Converter15) => { - let Creators; - ((Creators2) => { - Creators2.intoInfra = (input) => { - if (!input) { - return null; - } - return input.map((data) => { - return { - address: data.address.toPublicKey(), - share: data.share, - verified: false - }; - }); - }; - Creators2.intoCompressedNftInfra = (input) => { - if (!input) { - return []; - } - return input.map((data) => { - return { - address: data.address.toPublicKey(), - share: data.share, - verified: false - }; - }); - }; - Creators2.intoUser = (output) => { - if (!output) { - return void 0; - } - return output.map((data) => { - return { - address: data.address.toString(), - share: data.share, - verified: data.verified - }; - }); - }; - })(Creators = Converter15.Creators || (Converter15.Creators = {})); -})(Converter2 || (Converter2 = {})); - -// src/compressed-nft-metadata.ts -import { - TokenProgramVersion, - TokenStandard -} from "mpl-bubblegum-instruction"; -var Converter3; -((Converter15) => { - let CompressedNftMetadata; - ((CompressedNftMetadata2) => { - CompressedNftMetadata2.intoInfra = (input, uri, sellerFeeBasisPoints) => { - return { - name: input.name, - symbol: input.symbol, - uri, - sellerFeeBasisPoints, - creators: Converter2.Creators.intoCompressedNftInfra(input.creators), - collection: Converter.Collection.intoInfra(input.collection), - uses: input.uses || null, - primarySaleHappened: false, - isMutable: input.isMutable ?? false, - editionNonce: 0, - tokenStandard: TokenStandard.NonFungible, - tokenProgramVersion: TokenProgramVersion.Original - }; - }; - })(CompressedNftMetadata = Converter15.CompressedNftMetadata || (Converter15.CompressedNftMetadata = {})); -})(Converter3 || (Converter3 = {})); - -// src/royalty.ts -var Converter4; -((Converter15) => { - let Royalty; - ((Royalty2) => { - Royalty2.THRESHOLD = 100; - Royalty2.intoInfra = (percentage) => { - return percentage * Royalty2.THRESHOLD; - }; - Royalty2.intoUser = (percentage) => { - return percentage * Royalty2.THRESHOLD; - }; - })(Royalty = Converter15.Royalty || (Converter15.Royalty = {})); -})(Converter4 || (Converter4 = {})); - -// ../shared/src/constants.ts -import { PublicKey } from "@solana/web3.js"; -import SolanaJsonConfig from "@solana-suite/config/load"; -var Config = SolanaJsonConfig; -var Constants; -((Constants2) => { - let WarnningMessage; - ((WarnningMessage2) => { - const THRESHHOLD = 50; - let isDisplay = false; - WarnningMessage2.NFT_STORAGE_API_KEY = ` - [YOU HAVE TO DO] - -------------------------------------- - You need to update nftStorageApiKey define parameter in solana-suite.json. - Can get api key from https://nft.storage/ - -------------------------------------- - `; - WarnningMessage2.DAS_API_URL = ` - [YOU HAVE TO DO] - -------------------------------------- - You need to update dasApiUrl define parameter in solana-suite.json. - can get api url from https://www.helius.dev/ - -------------------------------------- - `; - WarnningMessage2.ANNOUNCE = ` - [DEPRECATED] - -------------------------------------- - Account, Node, toExplorer, Pubkey, Secret have been moved to - @solana-suite/utils - ------------------------------------- - `; - WarnningMessage2.calculateProbability = () => { - const randomValue = Math.random(); - const probability = 1 / THRESHHOLD; - if (!isDisplay && randomValue < probability) { - isDisplay = true; - return true; - } - return false; - }; - })(WarnningMessage = Constants2.WarnningMessage || (Constants2.WarnningMessage = {})); -})(Constants || (Constants = {})); -((Constants2) => { - Constants2.currentCluster = Config.cluster.type; - Constants2.customClusterUrl = Config.cluster.customClusterUrl; - Constants2.isDebugging = Config.debugging; - Constants2.nftStorageApiKey = Config.nftStorageApiKey; - Constants2.dasApiUrl = Config.dasApiUrl; - let Cluster; - ((Cluster2) => { - Cluster2["prd"] = "mainnet-beta"; - Cluster2["prdMetaplex"] = "mainnet-beta-metaplex"; - Cluster2["dev"] = "devnet"; - Cluster2["test"] = "testnet"; - Cluster2["localhost"] = "localhost-devnet"; - })(Cluster = Constants2.Cluster || (Constants2.Cluster = {})); - let EndPointUrl; - ((EndPointUrl2) => { - EndPointUrl2["prd"] = "https://api.mainnet-beta.solana.com"; - EndPointUrl2["prdMetaplex"] = "https://api.metaplex.solana.com"; - EndPointUrl2["dev"] = "https://api.devnet.solana.com"; - EndPointUrl2["test"] = "https://api.testnet.solana.com"; - EndPointUrl2["localhost"] = "http://api.devnet.solana.com"; - })(EndPointUrl = Constants2.EndPointUrl || (Constants2.EndPointUrl = {})); - let BundlrUrl; - ((BundlrUrl2) => { - BundlrUrl2["prd"] = "https://node1.irys.xyz,https://node2.irys.xyz"; - BundlrUrl2["dev"] = "https://devnet.irys.xyz"; - })(BundlrUrl = Constants2.BundlrUrl || (Constants2.BundlrUrl = {})); - let DasApiUrl; - ((DasApiUrl2) => { - DasApiUrl2["dev"] = "https://devnet.helius-rpc.com/?api-key=15319bf4-5b40-4958-ac8d-6313aa55eb92,https://rpc-devnet.helius.xyz?api-key=9f70a843-3274-4ffd-a0a9-323f8b7c0639"; - })(DasApiUrl = Constants2.DasApiUrl || (Constants2.DasApiUrl = {})); - let NftstorageApiKey; - ((NftstorageApiKey2) => { - NftstorageApiKey2["dev"] = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJkaWQ6ZXRocjoweERGMjcyN2VkODZhRGU1RTMyZDZDZEJlODc0YzRFNDlEODY1OWZmOEMiLCJpc3MiOiJuZnQtc3RvcmFnZSIsImlhdCI6MTYyMDI2NDk0MzcwNiwibmFtZSI6ImRlbW8ifQ.d4J70mikxRB8a5vwNu6SO5HDA8JaueuseAj7Q_ytMCE"; - })(NftstorageApiKey = Constants2.NftstorageApiKey || (Constants2.NftstorageApiKey = {})); - Constants2.loadConfig = async () => { - Config = await import("@solana-suite/config/load"); - }; - Constants2.switchCluster = (param) => { - const { cluster: env, customClusterUrl: customClusterUrl2 } = param; - if (customClusterUrl2 && customClusterUrl2.length > 0) { - const index = Date.now() % customClusterUrl2.length; - return customClusterUrl2[index]; - } - switch (env) { - case "mainnet-beta" /* prd */: - return "https://api.mainnet-beta.solana.com" /* prd */; - case "mainnet-beta-metaplex" /* prdMetaplex */: - return "https://api.metaplex.solana.com" /* prdMetaplex */; - case "testnet" /* test */: - return "https://api.testnet.solana.com" /* test */; - case "devnet" /* dev */: - return "https://api.devnet.solana.com" /* dev */; - default: - return "http://api.devnet.solana.com" /* localhost */; - } - }; - Constants2.switchBundlr = (env) => { - switch (env) { - case "mainnet-beta" /* prd */: { - const urls = "https://node1.irys.xyz,https://node2.irys.xyz" /* prd */.split(","); - const index = Date.now() % urls.length; - return urls[index]; - } - default: { - return "https://devnet.irys.xyz" /* dev */; - } - } - }; - Constants2.switchDasApi = (env) => { - switch (env) { - case "mainnet-beta" /* prd */: { - if (Constants2.dasApiUrl.length < 1) { - throw Error(Constants2.WarnningMessage.DAS_API_URL); - } - const urls = "https://node1.irys.xyz,https://node2.irys.xyz" /* prd */.split(","); - const index = Date.now() % urls.length; - return urls[index]; - } - default: { - const urls = "https://devnet.helius-rpc.com/?api-key=15319bf4-5b40-4958-ac8d-6313aa55eb92,https://rpc-devnet.helius.xyz?api-key=9f70a843-3274-4ffd-a0a9-323f8b7c0639" /* dev */.split(","); - const index = Date.now() % urls.length; - return urls[index]; - } - } - }; - Constants2.switchNftStorage = (env) => { - switch (env) { - case "mainnet-beta" /* prd */: - if (!Constants2.nftStorageApiKey) { - throw Error(Constants2.WarnningMessage.NFT_STORAGE_API_KEY); - } - return Constants2.nftStorageApiKey; - default: { - return "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJkaWQ6ZXRocjoweERGMjcyN2VkODZhRGU1RTMyZDZDZEJlODc0YzRFNDlEODY1OWZmOEMiLCJpc3MiOiJuZnQtc3RvcmFnZSIsImlhdCI6MTYyMDI2NDk0MzcwNiwibmFtZSI6ImRlbW8ifQ.d4J70mikxRB8a5vwNu6SO5HDA8JaueuseAj7Q_ytMCE" /* dev */; - } - } - }; - Constants2.WRAPPED_TOKEN_PROGRAM_ID = new PublicKey( - "So11111111111111111111111111111111111111112" - ); - Constants2.MEMO_PROGRAM_ID = new PublicKey( - "Memo1UhkJRfHyvLMcVucJwxXeuD728EqVDDwQDxFMNo" - ); - Constants2.METAPLEX_PROGRAM_ID = new PublicKey( - "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s" - ); - Constants2.COMMITMENT = "confirmed"; - Constants2.NFT_STORAGE_GATEWAY_URL = "https://ipfs.io/ipfs"; - Constants2.IRYS_GATEWAY_URL = "https://gateway.irys.xyz"; - Constants2.BUNDLR_NETWORK_URL = (0, Constants2.switchBundlr)(Config.cluster.type); - Constants2.DAS_API_URL = (0, Constants2.switchDasApi)(Config.cluster.type); - Constants2.NFT_STORAGE_API_KEY = (0, Constants2.switchNftStorage)(Config.cluster.type); - Constants2.EXPLORER_SOLSCAN_URL = "https://solscan.io"; - Constants2.EXPLORER_SOLANAFM_URL = "https://solana.fm"; - Constants2.EXPLORER_XRAY_URL = "https://xray.helius.xyz"; -})(Constants || (Constants = {})); -console.log(Constants.WarnningMessage.ANNOUNCE); - -// ../transaction-builder/src/batch.ts -import { - sendAndConfirmTransaction as sendAndConfirmTransaction2, - Transaction as Transaction2 -} from "@solana/web3.js"; - -// ../node/src/index.ts -import { Connection } from "@solana/web3.js"; -var Node; -((Node2) => { - const setted = { - clusterUrl: "", - commitment: Constants.COMMITMENT, - customClusterUrl: [] - }; - Node2.getConnection = () => { - if (setted.customClusterUrl.length > 0) { - setted.clusterUrl = Constants.switchCluster({ - customClusterUrl: setted.customClusterUrl - }); - } else if (Constants.customClusterUrl.length > 0) { - setted.clusterUrl = Constants.switchCluster({ - customClusterUrl: Constants.customClusterUrl - }); - } else if (!setted.clusterUrl) { - setted.clusterUrl = Constants.switchCluster({ - cluster: Constants.currentCluster - }); - } - if (!setted.commitment) { - setted.commitment = Constants.COMMITMENT; - } - return new Connection(setted.clusterUrl, setted.commitment); - }; - Node2.changeConnection = (param) => { - setted.clusterUrl = ""; - setted.customClusterUrl = []; - setted.commitment = Constants.COMMITMENT; - const { cluster, commitment, customClusterUrl } = param; - if (commitment) { - setted.commitment = commitment; - debugLog("# Node change commitment: ", setted.commitment); - } - if (cluster) { - setted.clusterUrl = Constants.switchCluster({ cluster }); - debugLog("# Node change clusterUrl: ", setted.clusterUrl); - } - if (customClusterUrl) { - debugLog("# customClusterUrl: ", customClusterUrl); - setted.clusterUrl = Constants.switchCluster({ customClusterUrl }); - setted.customClusterUrl = customClusterUrl; - debugLog( - "# Node change cluster, custom cluster url: ", - setted.clusterUrl - ); - } - }; - Node2.confirmedSig = async (signature, commitment = Constants.COMMITMENT) => { - const connection = Node2.getConnection(); - const latestBlockhash = await connection.getLatestBlockhash(); - return await connection.confirmTransaction( - { - blockhash: latestBlockhash.blockhash, - lastValidBlockHeight: latestBlockhash.lastValidBlockHeight, - signature - }, - commitment - ).then(Result.ok).catch(Result.err); - }; -})(Node || (Node = {})); - -// ../transaction-builder/src/common.ts -import { - sendAndConfirmTransaction, - Transaction -} from "@solana/web3.js"; -var MAX_RETRIES = 3; -var TransactionBuilder; -((TransactionBuilder7) => { - class Common2 { - static MAX_TRANSACTION_SIZE = 1232; - instructions; - signers; - feePayer; - data; - constructor(instructions, signers, feePayer, data) { - this.instructions = instructions; - this.signers = signers; - this.feePayer = feePayer; - this.data = data; - } - submit = async () => { - return Try(async () => { - if (!(this instanceof Common2)) { - throw Error("only Instruction object that can use this"); - } - const transaction = new Transaction(); - const blockhashObj = await Node.getConnection().getLatestBlockhash(); - transaction.lastValidBlockHeight = blockhashObj.lastValidBlockHeight; - transaction.recentBlockhash = blockhashObj.blockhash; - let finalSigners = this.signers; - if (this.feePayer) { - transaction.feePayer = this.feePayer.publicKey; - finalSigners = [this.feePayer, ...this.signers]; - } - this.instructions.forEach((inst) => transaction.add(inst)); - const options = { - maxRetries: MAX_RETRIES - }; - return await sendAndConfirmTransaction( - Node.getConnection(), - transaction, - finalSigners, - options - ); - }); - }; - } - TransactionBuilder7.Common = Common2; -})(TransactionBuilder || (TransactionBuilder = {})); - -// ../shared/src/shared.ts -var overwriteObject = (object, targets) => { - const that = object; - targets.forEach((target) => { - delete that[target.existsKey]; - that[target.will.key] = target.will.value; - }); - return that; -}; -var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { - if (Constants.isDebugging === "true" || process.env.DEBUG === "true") { - console.log("[DEBUG]", data1, data2, data3, data4); - } -}; -var sleep = async (sec) => { - return new Promise((r) => setTimeout(r, sec * 1e3)); -}; -var isPromise = (obj) => { - return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; -}; -function Try(input, finallyInput) { - try { - const v = input(); - if (isPromise(v)) { - return v.then( - (x) => Result.ok(x), - (err) => Result.err(err) - ); - } else { - return Result.ok(v); - } - } catch (e) { - if (e instanceof Error) { - return Result.err(e); - } - return Result.err(Error(e)); - } finally { - if (finallyInput) { - debugLog("# finally input:", finallyInput); - finallyInput(); - } - } -} -var convertTimestampToDateTime = (created_at) => { - if (created_at) { - return new Date(created_at * 1e3); - } - return; -}; - -// ../transaction-builder/src/batch.ts -var TransactionBuilder2; -((TransactionBuilder7) => { - class Batch { - submit = async (arr) => { - return Try(async () => { - let i = 0; - for (const a of arr) { - if (!a.instructions && !a.signers) { - throw Error( - `only Instruction object that can use batchSubmit(). - Index: ${i}, Set value: ${JSON.stringify(a)}` - ); - } - i++; - } - const instructions = arr.flatMap((a) => a.instructions); - const signers = arr.flatMap((a) => a.signers); - const feePayers = arr.filter((a) => a.feePayer !== void 0); - let feePayer = signers[0]; - if (feePayers.length > 0 && feePayers[0].feePayer) { - feePayer = feePayers[0].feePayer; - } - const transaction = new Transaction2(); - let finalSigners = signers; - if (feePayer) { - transaction.feePayer = feePayer.publicKey; - finalSigners = [feePayer, ...signers]; - } - instructions.map((inst) => transaction.add(inst)); - const options = { - maxRetries: MAX_RETRIES - }; - return await sendAndConfirmTransaction2( - Node.getConnection(), - transaction, - finalSigners, - options - ); - }); - }; - } - TransactionBuilder7.Batch = Batch; -})(TransactionBuilder2 || (TransactionBuilder2 = {})); - -// ../transaction-builder/src/mint.ts -import { - sendAndConfirmTransaction as sendAndConfirmTransaction3, - Transaction as Transaction3 -} from "@solana/web3.js"; -var TransactionBuilder3; -((TransactionBuilder7) => { - class Mint { - instructions; - signers; - feePayer; - data; - constructor(instructions, signers, feePayer, data) { - this.instructions = instructions; - this.signers = signers; - this.data = data; - this.feePayer = feePayer; - } - submit = async () => { - return Try(async () => { - if (!(this instanceof Mint)) { - throw Error("only MintInstruction object that can use this"); - } - const transaction = new Transaction3(); - const blockhashObj = await Node.getConnection().getLatestBlockhash(); - transaction.lastValidBlockHeight = blockhashObj.lastValidBlockHeight; - transaction.recentBlockhash = blockhashObj.blockhash; - let finalSigners = this.signers; - if (this.feePayer) { - transaction.feePayer = this.feePayer.publicKey; - finalSigners = [this.feePayer, ...this.signers]; - } - this.instructions.forEach((inst) => transaction.add(inst)); - const options = { - maxRetries: MAX_RETRIES - }; - if (Node.getConnection().rpcEndpoint === Constants.EndPointUrl.prd) { - debugLog("# Change metaplex cluster on mainnet-beta"); - Node.changeConnection({ cluster: Constants.Cluster.prdMetaplex }); - } - return await sendAndConfirmTransaction3( - Node.getConnection(), - transaction, - finalSigners, - options - ); - }); - }; - } - TransactionBuilder7.Mint = Mint; -})(TransactionBuilder3 || (TransactionBuilder3 = {})); - -// ../transaction-builder/src/partial-sign.ts -import { - Transaction as Transaction4 -} from "@solana/web3.js"; -var TransactionBuilder4; -((TransactionBuilder7) => { - class PartialSign { - hexInstruction; - data; - canSubmit; - constructor(instructions, mint, canSubmit = false) { - this.hexInstruction = instructions; - this.data = mint; - this.canSubmit = canSubmit; - } - submit = async (feePayer) => { - return Try(async () => { - if (!(this instanceof PartialSign)) { - throw Error("only PartialSignInstruction object that can use this"); - } - const decode = Buffer.from(this.hexInstruction, "hex"); - const transactionFromJson = Transaction4.from(decode); - transactionFromJson.partialSign(feePayer.toKeypair()); - const options = { - maxRetries: MAX_RETRIES - }; - const wireTransaction = transactionFromJson.serialize(); - return await Node.getConnection().sendRawTransaction( - wireTransaction, - options - ); - }); - }; - } - TransactionBuilder7.PartialSign = PartialSign; -})(TransactionBuilder4 || (TransactionBuilder4 = {})); - -// ../transaction-builder/src/calculate-txsize.ts -var TransactionBuilder5; -((TransactionBuilder7) => { - const LOW_VALUE = 127; - const HIGH_VALUE = 16383; - const MAX_TRANSACTION_SIZE = 1232; - const compactHeader = (n) => n <= LOW_VALUE ? 1 : n <= HIGH_VALUE ? 2 : 3; - const compactArraySize = (n, size) => compactHeader(n) + n * size; - TransactionBuilder7.calculateTxSize = (transaction, feePayer) => { - const feePayerPk = [feePayer.toBase58()]; - const signers = new Set(feePayerPk); - const accounts = new Set(feePayerPk); - const ixsSize = transaction.instructions.reduce((acc, ix) => { - ix.keys.forEach(({ pubkey, isSigner }) => { - const pk = pubkey.toBase58(); - if (isSigner) - signers.add(pk); - accounts.add(pk); - }); - accounts.add(ix.programId.toBase58()); - const nIndexes = ix.keys.length; - const opaqueData = ix.data.length; - return acc + 1 + // PID index - compactArraySize(nIndexes, 1) + compactArraySize(opaqueData, 1); - }, 0); - return compactArraySize(signers.size, 64) + // signatures - 3 + // header - compactArraySize(accounts.size, 32) + // accounts - 32 + // blockhash - compactHeader(transaction.instructions.length) + // instructions - ixsSize; - }; - TransactionBuilder7.isOverTransactionSize = (transaction, feePayer) => { - return (0, TransactionBuilder7.calculateTxSize)(transaction, feePayer) > MAX_TRANSACTION_SIZE; - }; -})(TransactionBuilder5 || (TransactionBuilder5 = {})); - -// ../global/src/index.ts -import { Keypair as Keypair3, LAMPORTS_PER_SOL, PublicKey as PublicKey4 } from "@solana/web3.js"; - -// ../account/src/associated.ts -import { - ASSOCIATED_TOKEN_PROGRAM_ID, - createAssociatedTokenAccountInstruction, - getAccount, - getAssociatedTokenAddressSync, - TOKEN_PROGRAM_ID, - TokenAccountNotFoundError, - TokenInvalidAccountOwnerError -} from "@solana/spl-token"; - -// ../account/src/keypair.ts -import { Keypair as Original, PublicKey as PublicKey2 } from "@solana/web3.js"; -import bs from "bs58"; -var Account; -((Account5) => { - class Keypair4 { - secret; - pubkey; - constructor(params) { - if (!params.pubkey) { - const keypair = params.secret.toKeypair(); - this.pubkey = keypair.publicKey.toString(); - } else { - this.pubkey = params.pubkey; - } - this.secret = params.secret; - } - toPublicKey() { - return new PublicKey2(this.pubkey); - } - toKeypair() { - const decoded = bs.decode(this.secret); - return Original.fromSecretKey(decoded); - } - static isPubkey = (value) => /^[0-9a-zA-Z]{32,44}$/.test(value); - static isSecret = (value) => /^[0-9a-zA-Z]{87,88}$/.test(value); - static create = () => { - const keypair = Original.generate(); - return new Keypair4({ - pubkey: keypair.publicKey.toString(), - secret: bs.encode(keypair.secretKey) - }); - }; - static toKeyPair = (keypair) => { - return new Keypair4({ - pubkey: keypair.publicKey.toString(), - secret: bs.encode(keypair.secretKey) - }); - }; - } - Account5.Keypair = Keypair4; -})(Account || (Account = {})); - -// ../account/src/associated.ts -var Account2; -((Account5) => { - let Associated; - ((Associated2) => { - const RETRY_OVER_LIMIT = 10; - const RETRY_SLEEP_TIME = 3; - const get = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const res = await (0, Associated2.makeOrCreateInstruction)( - mint, - owner, - new Account.Keypair({ secret: feePayer }).pubkey, - allowOwnerOffCurve - ); - if (!res.inst) { - return res.tokenAccount; - } - return new TransactionBuilder6.Common( - [res.inst], - [], - feePayer.toKeypair(), - res.tokenAccount - ); - }; - Associated2.retryGetOrCreate = async (mint, owner, feePayer) => { - let counter = 1; - while (counter < RETRY_OVER_LIMIT) { - try { - const inst = await get(mint, owner, feePayer, true); - if (inst && typeof inst === "string") { - debugLog("# associatedTokenAccount: ", inst); - return inst; - } else if (inst instanceof TransactionBuilder6.Common) { - (await inst.submit()).map( - async (ok) => { - await Node.confirmedSig(ok); - return inst.data; - }, - (err) => { - debugLog("# Error submit retryGetOrCreate: ", err); - throw err; - } - ); - } - } catch (e) { - debugLog(`# retry: ${counter} create token account: `, e); - debugLog(`# mint: ${mint}, owner: ${owner}, feePayer: ${feePayer}`); - } - await sleep(RETRY_SLEEP_TIME); - counter++; - } - throw Error(`retry action is over limit ${RETRY_OVER_LIMIT}`); - }; - Associated2.makeOrCreateInstruction = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const associatedTokenAccount = getAssociatedTokenAddressSync( - mint.toPublicKey(), - owner.toPublicKey(), - allowOwnerOffCurve, - TOKEN_PROGRAM_ID, - ASSOCIATED_TOKEN_PROGRAM_ID - ); - debugLog("# associatedTokenAccount: ", associatedTokenAccount.toString()); - try { - await getAccount( - Node.getConnection(), - associatedTokenAccount, - Node.getConnection().commitment, - TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst: void 0 - }; - } catch (error) { - if (!(error instanceof TokenAccountNotFoundError) && !(error instanceof TokenInvalidAccountOwnerError)) { - throw Error("Unexpected error"); - } - const payer = !feePayer ? owner : feePayer; - const inst = createAssociatedTokenAccountInstruction( - payer.toPublicKey(), - associatedTokenAccount, - owner.toPublicKey(), - mint.toPublicKey(), - TOKEN_PROGRAM_ID, - ASSOCIATED_TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst - }; - } - }; - })(Associated = Account5.Associated || (Account5.Associated = {})); -})(Account2 || (Account2 = {})); - -// ../account/src/pda.ts -import { PublicKey as PublicKey3 } from "@solana/web3.js"; -import { PROGRAM_ID } from "@metaplex-foundation/mpl-token-metadata"; -import { MPL_BUBBLEGUM_PROGRAM_ID } from "@metaplex-foundation/mpl-bubblegum"; -import BN from "bn.js"; -var Account3; -((Account5) => { - let Pda; - ((Pda2) => { - Pda2.getMetadata = (address) => { - const [publicKey] = PublicKey3.findProgramAddressSync( - [ - Buffer.from("metadata"), - PROGRAM_ID.toBuffer(), - address.toPublicKey().toBuffer() - ], - PROGRAM_ID - ); - return publicKey; - }; - Pda2.getMasterEdition = (address) => { - const [publicKey] = PublicKey3.findProgramAddressSync( - [ - Buffer.from("metadata"), - PROGRAM_ID.toBuffer(), - address.toPublicKey().toBuffer(), - Buffer.from("edition") - ], - PROGRAM_ID - ); - return publicKey; - }; - Pda2.getTreeAuthority = (address) => { - const [publicKey] = PublicKey3.findProgramAddressSync( - [address.toPublicKey().toBuffer()], - MPL_BUBBLEGUM_PROGRAM_ID.toPublicKey() - ); - return publicKey; - }; - Pda2.getBgumSigner = () => { - const [publicKey] = PublicKey3.findProgramAddressSync( - [Buffer.from("collection_cpi", "utf8")], - MPL_BUBBLEGUM_PROGRAM_ID.toPublicKey() - ); - return publicKey; - }; - Pda2.getAssetId = (address, leafIndex) => { - const node = new BN.BN(leafIndex); - const [assetId] = PublicKey3.findProgramAddressSync( - [ - Buffer.from("asset", "utf8"), - address.toPublicKey().toBuffer(), - Uint8Array.from(node.toArray("le", 8)) - ], - MPL_BUBBLEGUM_PROGRAM_ID.toPublicKey() - ); - return assetId.toString(); - }; - })(Pda = Account5.Pda || (Account5.Pda = {})); -})(Account3 || (Account3 = {})); - -// ../account/src/index.ts -var Account4 = { - ...Account2, - ...Account, - ...Account3 -}; - -// ../global/src/index.ts -import { BigNumber } from "bignumber.js"; -import bs2 from "bs58"; -String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, options = {}) { - const endPointUrl = Node.getConnection().rpcEndpoint; - debugLog("# toExplorerUrl rpcEndpoint:", endPointUrl); - let cluster = ""; - if (endPointUrl === Constants.EndPointUrl.prd) { - cluster = Constants.Cluster.prd; - } else if (endPointUrl === Constants.EndPointUrl.test) { - cluster = Constants.Cluster.test; - } else if (endPointUrl === Constants.EndPointUrl.dev) { - cluster = Constants.Cluster.dev; - } else { - cluster = Constants.Cluster.dev; - } - const addressOrSignature = this.toString(); - let url = ""; - if (options.replacePath) { - if (explorer === "solanafm" /* SolanaFM */) { - url = `${Constants.EXPLORER_SOLANAFM_URL}/${options.replacePath}/${addressOrSignature}?cluster=${cluster}`; - } else if (explorer === "xray" /* Xray */) { - url = `${Constants.EXPLORER_XRAY_URL}/${options.replacePath}/${addressOrSignature}?network=${cluster}`; - } else { - url = `${Constants.EXPLORER_SOLSCAN_URL}/${options.replacePath}/${addressOrSignature}?cluster=${cluster}`; - } - return url; - } - if (Account4.Keypair.isPubkey(addressOrSignature)) { - if (explorer === "solanafm" /* SolanaFM */) { - url = `${Constants.EXPLORER_SOLANAFM_URL}/address/${addressOrSignature}?cluster=${cluster}`; - } else if (explorer === "xray" /* Xray */) { - url = `${Constants.EXPLORER_XRAY_URL}/account/${addressOrSignature}?network=${cluster}`; - } else { - url = `${Constants.EXPLORER_SOLSCAN_URL}/account/${addressOrSignature}?cluster=${cluster}`; - } - } else { - if (explorer === "solanafm" /* SolanaFM */) { - url = `${Constants.EXPLORER_SOLANAFM_URL}/tx/${addressOrSignature}?cluster=${cluster}`; - } else if (explorer === "xray" /* Xray */) { - url = `${Constants.EXPLORER_XRAY_URL}/tx/${addressOrSignature}?network=${cluster}`; - } else { - url = `${Constants.EXPLORER_SOLSCAN_URL}/tx/${addressOrSignature}?cluster=${cluster}`; - } - } - return url; -}; -String.prototype.toPublicKey = function() { - if (!Account4.Keypair.isPubkey(this.toString())) { - throw Error(`No match KeyPair.PubKey: ${this.toString()}`); - } - return new PublicKey4(this.toString()); -}; -String.prototype.toKeypair = function() { - if (!Account4.Keypair.isSecret(this.toString())) { - throw Error(`No match KeyPair.Secret: ${this.toString()}`); - } - const decoded = bs2.decode(this.toString()); - return Keypair3.fromSecretKey(decoded); -}; -Number.prototype.toSol = function() { - return BigNumber(this).div(LAMPORTS_PER_SOL).toNumber(); -}; -Number.prototype.toLamports = function() { - return BigNumber(this).times(LAMPORTS_PER_SOL).toNumber(); -}; - -// ../transaction-builder/src/index.ts -var TransactionBuilder6 = { - ...TransactionBuilder2, - ...TransactionBuilder5, - ...TransactionBuilder3, - ...TransactionBuilder, - ...TransactionBuilder4 -}; - -// ../shared/src/result.ts -var AbstractResult = class { - unwrap(ok, err) { - const r = this._chain( - (value) => Result.ok(ok ? ok(value) : value), - (error) => err ? Result.ok(err(error)) : Result.err(error) - ); - if (r.isErr) { - throw r.error; - } - return r.value; - } - map(ok, err) { - return this._chain( - (value) => Result.ok(ok(value)), - (error) => Result.err(err ? err(error) : error) - ); - } - chain(ok, err) { - return this._chain(ok, err || ((error) => Result.err(error))); - } - match(ok, err) { - this._chain( - (value) => Result.ok(ok(value)), - (error) => Result.err(err(error)) - ); - } - /// single TransactionBuilder //// - /* eslint-disable @typescript-eslint/no-explicit-any */ - async submit(feePayer) { - const res = this.map( - async (ok) => { - debugLog("# result single submit: ", ok); - if (feePayer) { - const obj = ok; - return await obj.submit(feePayer); - } else { - const obj = ok; - return await obj.submit(); - } - }, - (err) => { - return err; - } - ); - if (res.isErr) { - return Result.err(res.error); - } - return res.value; - } -}; -Array.prototype.submit = async function(feePayer) { - if (feePayer) { - let i = 1; - for await (const obj of this) { - if (obj.isErr) { - return obj; - } else if (obj.value.canSubmit) { - debugLog("# Result batch canSubmit"); - const sig = await obj.submit(feePayer); - if (sig.isErr) { - return sig; - } - await Node.confirmedSig(sig.value); - } else { - debugLog("# Result batch other than canSubmit"); - if (this.length == i) { - return obj.submit(feePayer); - } - obj.submit(feePayer); - } - i++; - } - } else { - const instructions = []; - for (const obj of this) { - if (obj.isErr) { - return obj; - } else if (obj.isOk) { - instructions.push(obj.value); - } else { - return Result.err(Error("Only Array Instruction object")); - } - } - debugLog("# Result batch submit: ", instructions); - return new TransactionBuilder6.Batch().submit(instructions); - } -}; -var InternalOk = class extends AbstractResult { - constructor(value) { - super(); - this.value = value; - } - isOk = true; - isErr = false; - /* eslint-disable @typescript-eslint/no-unused-vars */ - _chain(ok, _err) { - return ok(this.value); - } -}; -var InternalErr = class extends AbstractResult { - constructor(error) { - super(); - this.error = error; - } - isOk = false; - isErr = true; - _chain(_ok, err) { - return err(this.error); - } -}; -var Result; -((Result7) => { - function ok(value) { - return new InternalOk(value); - } - Result7.ok = ok; - function err(error) { - return new InternalErr(error || Error()); - } - Result7.err = err; - function all(obj) { - if (Array.isArray(obj)) { - const resArr = []; - for (const item of obj) { - if (item.isErr) { - return item; - } - resArr.push(item.value); - } - return Result7.ok(resArr); - } - const res = {}; - const keys = Object.keys(obj); - for (const key of keys) { - const item = obj[key]; - if (item.isErr) { - return item; - } - res[key] = item.value; - } - return Result7.ok(res); - } - Result7.all = all; -})(Result || (Result = {})); - -// ../validator/src/index.ts -var Validator; -((Validator2) => { - let Message; - ((Message2) => { - Message2.SUCCESS = "success"; - Message2.SMALL_NUMBER = "too small"; - Message2.BIG_NUMBER = "too big"; - Message2.LONG_LENGTH = "too long"; - Message2.EMPTY = "invalid empty value"; - Message2.INVALID_URL = "invalid url"; - Message2.ONLY_NODE_JS = "`string` type is only Node.js"; - })(Message = Validator2.Message || (Validator2.Message = {})); - Validator2.NAME_LENGTH = 32; - Validator2.SYMBOL_LENGTH = 10; - Validator2.URL_LENGTH = 200; - Validator2.ROYALTY_MAX = 100; - Validator2.SELLER_FEE_BASIS_POINTS_MAX = 1e4; - Validator2.ROYALTY_MIN = 0; - Validator2.isRoyalty = (royalty) => { - return Try(() => { - const key = "royalty"; - if (royalty !== 0 && !royalty) { - throw createError(key, Message.EMPTY, royalty); - } - if (royalty < Validator2.ROYALTY_MIN) { - throw createError(key, Message.SMALL_NUMBER, royalty, { - threshold: Validator2.ROYALTY_MIN, - condition: "underMin" - }); - } else if (royalty > Validator2.ROYALTY_MAX) { - throw createError(key, Message.BIG_NUMBER, royalty, { - threshold: Validator2.ROYALTY_MAX, - condition: "overMax" - }); - } - return Message.SUCCESS; - }); - }; - Validator2.isSellerFeeBasisPoints = (royalty) => { - return Try(() => { - const key = "sellerFeeBasisPoints/seller_fee_basis_points"; - if (royalty !== 0 && !royalty) { - throw createError(key, Message.EMPTY, royalty); - } - if (royalty < Validator2.ROYALTY_MIN) { - throw createError(key, Message.SMALL_NUMBER, royalty, { - threshold: Validator2.ROYALTY_MIN, - condition: "underMin" - }); - } else if (royalty > Validator2.ROYALTY_MAX * Converter5.Royalty.THRESHOLD) { - throw createError(key, Message.BIG_NUMBER, royalty, { - threshold: Validator2.SELLER_FEE_BASIS_POINTS_MAX, - condition: "overMax" - }); - } - return Message.SUCCESS; - }); - }; - Validator2.isName = (name) => { - return Try(() => { - const key = "name"; - if (!name) { - throw createError(key, Message.EMPTY, name); - } - if (byteLength(name) > Validator2.NAME_LENGTH) { - throw createError(key, Message.LONG_LENGTH, name, { - threshold: Validator2.NAME_LENGTH, - condition: "overMax" - }); - } - return Message.SUCCESS; - }); - }; - Validator2.isSymbol = (symbol) => { - return Try(() => { - const key = "symbol"; - if (!symbol) { - throw createError(key, Message.EMPTY, symbol); - } - if (byteLength(symbol) > Validator2.SYMBOL_LENGTH) { - throw createError(key, Message.LONG_LENGTH, symbol, { - threshold: Validator2.SYMBOL_LENGTH, - condition: "overMax" - }); - } - return Message.SUCCESS; - }); - }; - Validator2.isImageUrl = (image) => isUriOrImage(image, "image"); - Validator2.checkAll = (metadata) => { - return Try(() => { - const keys = Object.keys(metadata); - const results = []; - keys.map((key) => { - let res; - switch (key) { - case "image": - if (key in metadata && metadata.image) { - res = (0, Validator2.isImageUrl)(metadata.image); - } - break; - case "royalty": - if (key in metadata && metadata.royalty) { - res = (0, Validator2.isRoyalty)(metadata.royalty); - } - break; - case "seller_fee_basis_points": - if (key in metadata && metadata.seller_fee_basis_points) { - res = (0, Validator2.isSellerFeeBasisPoints)(metadata.seller_fee_basis_points); - } - break; - case "sellerFeeBasisPoints": - if (key in metadata) { - res = (0, Validator2.isSellerFeeBasisPoints)(metadata.sellerFeeBasisPoints); - } - break; - case "name": - if (metadata.name) { - res = (0, Validator2.isName)(metadata.name); - } - break; - case "symbol": - if (metadata.symbol) { - res = (0, Validator2.isSymbol)(metadata.symbol); - } - break; - } - if (res && res.isErr) { - results.push(...res.error.details); - } - }); - if (results.length > 0) { - const message = "Caught in the validation errors. see information e.g: err.details"; - throw new ValidatorError(message, results); - } - return Message.SUCCESS; - }); - }; - const byteLength = (value) => { - const text = new TextEncoder(); - return text.encode(value).length; - }; - const createError = (key, message, actual, limit) => { - let error; - if (limit) { - error = new ValidatorError(message, [{ key, message, actual, limit }]); - } else { - error = new ValidatorError(message, [{ key, message, actual }]); - } - return error; - }; - const isUriOrImage = (imageOrUri, key) => { - return Try(() => { - if (!imageOrUri) { - throw createError(key, Message.EMPTY, imageOrUri); - } - if (byteLength(imageOrUri) > Validator2.URL_LENGTH) { - throw createError(key, Message.LONG_LENGTH, imageOrUri, { - threshold: Validator2.URL_LENGTH, - condition: "overMax" - }); - } - if (!/https?:\/\/[-_.!~*\\()a-zA-Z0-9;?:&=+,%#]+/g.test(imageOrUri)) { - throw createError(key, Message.INVALID_URL, imageOrUri); - } - return Message.SUCCESS; - }); - }; -})(Validator || (Validator = {})); -var ValidatorError = class extends Error { - details; - constructor(message, details) { - super(message); - this.details = details; - } -}; - -// src/nft.ts -var Converter6; -((Converter15) => { - let Nft; - ((Nft2) => { - Nft2.intoUser = (output) => { - return { - mint: output.onchain.id.toString(), - collectionMint: Converter.CollectionMint.intoUser( - output.onchain.grouping - ), - authorities: output.onchain.authorities, - royalty: Converter4.Royalty.intoUser(output.onchain.royalty.percent), - name: output.onchain.content.metadata.name, - symbol: output.onchain.content.metadata.symbol, - uri: output.onchain.content.json_uri, - creators: Converter2.Creators.intoUser(output.onchain.creators), - treeAddress: output.onchain.compression.tree, - isCompressed: output.onchain.compression.compressed, - isMutable: output.onchain.mutable, - isBurn: output.onchain.burnt, - editionNonce: output.onchain.supply.edition_nonce, - primarySaleHappened: output.onchain.royalty.primary_sale_happened, - dateTime: convertTimestampToDateTime(output.offchain.created_at), - offchain: output.offchain - }; - }; - })(Nft = Converter15.Nft || (Converter15.Nft = {})); -})(Converter6 || (Converter6 = {})); - -// src/memo.ts -var Converter7; -((Converter15) => { - let Memo; - ((Memo2) => { - Memo2.intoUserSide = (output, meta, outputTransfer, mappingTokenAccount) => { - const history = {}; - if (outputTransfer && outputTransfer.program !== "") { - if (mappingTokenAccount && outputTransfer.program === "spl-token") { - const foundSource = mappingTokenAccount.find( - (m) => m.account === outputTransfer.parsed.info.source - ); - const foundDest = mappingTokenAccount.find( - (m) => m.account === outputTransfer.parsed.info.destination - ); - history.mint = outputTransfer.parsed.info.mint; - foundSource && (history.source = foundSource.owner); - foundDest && (history.destination = foundDest.owner); - } else { - history.source = outputTransfer.parsed.info.source; - history.destination = outputTransfer.parsed.info.destination; - } - } - history.memo = output.parsed; - history.type = output.program; - history.dateTime = convertTimestampToDateTime(meta.blockTime); - history.sig = meta.transaction.signatures[0]; - history.innerInstruction = false; - if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { - history.innerInstruction = true; - } - return history; - }; - })(Memo = Converter15.Memo || (Converter15.Memo = {})); -})(Converter7 || (Converter7 = {})); - -// src/mint.ts -var Converter8; -((Converter15) => { - let Mint; - ((Mint2) => { - Mint2.intoUserSide = (output, meta) => { - const history = {}; - history.mint = output.parsed.info.mint; - history.mintAuthority = output.parsed.info.mintAuthority; - history.tokenAmount = output.parsed.info.tokenAmount; - history.account = output.parsed.info.account; - history.type = output.program; - history.dateTime = convertTimestampToDateTime(meta.blockTime); - history.sig = meta.transaction.signatures[0]; - history.innerInstruction = false; - if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { - history.innerInstruction = true; - } - return history; - }; - })(Mint = Converter15.Mint || (Converter15.Mint = {})); -})(Converter8 || (Converter8 = {})); - -// src/regular-nft-metadata.ts -var Converter9; -((Converter15) => { - let RegularNftMetadata; - ((RegularNftMetadata2) => { - RegularNftMetadata2.intoInfra = (input, uri, sellerFeeBasisPoints) => { - return { - name: input.name, - symbol: input.symbol, - uri, - sellerFeeBasisPoints, - creators: Converter2.Creators.intoInfra(input.creators), - collection: Converter.Collection.intoInfra(input.collection), - uses: input.uses || null - }; - }; - })(RegularNftMetadata = Converter15.RegularNftMetadata || (Converter15.RegularNftMetadata = {})); -})(Converter9 || (Converter9 = {})); - -// src/properties.ts -var Converter10; -((Converter15) => { - let Properties; - ((Properties2) => { - Properties2.intoInfra = async (input, callbackFunc, storageType, feePayer) => { - if (!input || !input.files) { - return {}; - } - const files = await Promise.all( - input.files.map(async (file) => { - if (!file.filePath) { - return {}; - } - const res = await callbackFunc(file.filePath, storageType, feePayer); - if (res.isErr) { - throw Error(res.error.message); - } - return overwriteObject(file, [ - { - existsKey: "filePath", - will: { key: "uri", value: res.value } - } - ]); - }) - ); - return { ...input, files }; - }; - })(Properties = Converter15.Properties || (Converter15.Properties = {})); -})(Converter10 || (Converter10 = {})); - -// src/uses.ts -var Converter11; -((Converter15) => { - let Uses; - ((Uses2) => { - Uses2.intoUserSide = (output) => { - if (!output) { - return void 0; - } - return output; - }; - })(Uses = Converter15.Uses || (Converter15.Uses = {})); -})(Converter11 || (Converter11 = {})); - -// src/token-metadata.ts -var Converter12; -((Converter15) => { - let TokenMetadata; - ((TokenMetadata2) => { - TokenMetadata2.intoInfra = (input, uri, sellerFeeBasisPoints) => { - return { - name: input.name, - symbol: input.symbol, - uri, - sellerFeeBasisPoints, - creators: Converter2.Creators.intoInfra(input.creators), - collection: null, - uses: input.uses || null - }; - }; - TokenMetadata2.intoUser = (output, tokenAmount) => { - return { - mint: output.onchain.mint.toString(), - royalty: output.onchain.data.sellerFeeBasisPoints, - name: (0, TokenMetadata2.deleteNullStrings)(output.onchain.data.name), - symbol: (0, TokenMetadata2.deleteNullStrings)(output.onchain.data.symbol), - tokenAmount, - uri: (0, TokenMetadata2.deleteNullStrings)(output.onchain.data.uri), - creators: Converter2.Creators.intoUser(output.onchain.data.creators), - uses: Converter11.Uses.intoUserSide(output.onchain.uses), - dateTime: convertTimestampToDateTime(output.offchain.created_at), - offchain: output.offchain - }; - }; - TokenMetadata2.deleteNullStrings = (str) => { - return str.replace(/\0/g, ""); - }; - })(TokenMetadata = Converter15.TokenMetadata || (Converter15.TokenMetadata = {})); -})(Converter12 || (Converter12 = {})); - -// src/transfer-checked.ts -var Converter13; -((Converter15) => { - let TransferChecked; - ((TransferChecked2) => { - TransferChecked2.intoUserSide = (output, meta, mappingTokenAccount) => { - const history = {}; - if (mappingTokenAccount) { - const foundSource = mappingTokenAccount.find( - (m) => m.account === output.parsed.info.source - ); - const foundDest = mappingTokenAccount.find( - (m) => m.account === output.parsed.info.destination - ); - foundSource && (history.source = foundSource.owner); - foundDest && (history.destination = foundDest.owner); - } - history.tokenAmount = output.parsed.info.tokenAmount; - history.mint = output.parsed.info.mint; - history.multisigAuthority = output.parsed.info.multisigAuthority; - history.signers = output.parsed.info.signers; - history.type = output.program; - history.dateTime = convertTimestampToDateTime(meta.blockTime); - history.sig = meta.transaction.signatures[0]; - history.innerInstruction = false; - if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { - history.innerInstruction = true; - } - return history; - }; - })(TransferChecked = Converter15.TransferChecked || (Converter15.TransferChecked = {})); -})(Converter13 || (Converter13 = {})); - -// src/transfer.ts -var Converter14; -((Converter15) => { - let Transfer; - ((Transfer2) => { - Transfer2.intoUserSide = (output, meta) => { - const history = {}; - if (!output.parsed.info.destination || !output.parsed.info.lamports) { - return; - } - history.source = output.parsed.info.source; - history.destination = output.parsed.info.destination; - history.sol = output.parsed.info.lamports?.toSol().toString(); - history.type = output.program; - history.dateTime = convertTimestampToDateTime(meta.blockTime); - history.sig = meta.transaction.signatures[0]; - history.innerInstruction = false; - if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { - history.innerInstruction = true; - } - return history; - }; - })(Transfer = Converter15.Transfer || (Converter15.Transfer = {})); -})(Converter14 || (Converter14 = {})); - -// src/index.ts -var Converter5 = { - ...Converter3, - ...Converter, - ...Converter2, - ...Converter6, - ...Converter7, - ...Converter8, - ...Converter9, - ...Converter10, - ...Converter4, - ...Converter12, - ...Converter13, - ...Converter14, - ...Converter11 -}; -export { - Converter5 as Converter -}; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2NvbGxlY3Rpb24udHMiLCAiLi4vc3JjL2NyZWF0b3JzLnRzIiwgIi4uL3NyYy9jb21wcmVzc2VkLW5md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iAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICBhZGRyZXNzOiBkYXRhLmFkZHJlc3MudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBzaGFyZTogZGF0YS5zaGFyZSxcbiAgICAgICAgICB2ZXJpZmllZDogZmFsc2UsXG4gICAgICAgIH07XG4gICAgICB9KTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGludG9Db21wcmVzc2VkTmZ0SW5mcmEgPSAoXG4gICAgICBpbnB1dDogT3B0aW9uPElucHV0Q3JlYXRvcnNbXT4gfCB1bmRlZmluZWQsXG4gICAgKTogSW50ZXJuYWxDcmVhdG9yc1tdID0+IHtcbiAgICAgIGlmICghaW5wdXQpIHtcbiAgICAgICAgcmV0dXJuIFtdO1xuICAgICAgfVxuICAgICAgcmV0dXJuIGlucHV0IS5tYXAoKGRhdGEpID0+IHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICBhZGRyZXNzOiBkYXRhLmFkZHJlc3MudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBzaGFyZTogZGF0YS5zaGFyZSxcbiAgICAgICAgICB2ZXJpZmllZDogZmFsc2UsXG4gICAgICAgIH07XG4gICAgICB9KTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGludG9Vc2VyID0gKFxuICAgICAgb3V0cHV0OiBPcHRpb248SW50ZXJuYWxDcmVhdG9yc1tdPixcbiAgICApOiBDcmVhdG9yc1tdIHwgdW5kZWZpbmVkID0+IHtcbiAgICAgIGlmICghb3V0cHV0KSB7XG4gICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBvdXRwdXQubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvU3RyaW5nKCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZp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gICAgdHJ5IHtcbiAgICAgICAgICBjb25zdCBpbnN0ID0gYXdhaXQgZ2V0KG1pbnQsIG93bmVyLCBmZWVQYXllciwgdHJ1ZSk7XG5cbiAgICAgICAgICBpZiAoaW5zdCAmJiB0eXBlb2YgaW5zdCA9PT0gJ3N0cmluZycpIHtcbiAgICAgICAgICAgIGRlYnVnTG9nKCcjIGFzc29jaWF0ZWRUb2tlbkFjY291bnQ6ICcsIGluc3QpO1xuICAgICAgICAgICAgcmV0dXJuIGluc3Q7XG4gICAgICAgICAgfSBlbHNlIGlmIChpbnN0IGluc3RhbmNlb2YgVHJhbnNhY3Rpb25CdWlsZGVyLkNvbW1vbikge1xuICAgICAgICAgICAgKGF3YWl0IGluc3Quc3VibWl0KCkpLm1hcChcbiAgICAgICAgICAgICAgYXN5bmMgKG9rOiBzdHJpbmcpID0+IHtcbiAgICAgICAgICAgICAgICBhd2FpdCBOb2RlLmNvbmZpcm1lZFNpZyhvayk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGluc3QuZGF0YTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgKGVycjogRXJyb3IpID0+IHtcbiAgICAgICAgICAgICAgICBkZWJ1Z0xvZygnIyBFcnJvciBzdWJtaXQgcmV0cnlHZXRPckNyZWF0ZTogJywgZXJyKTtcbiAgICAgICAgICAgICAgICB0aHJvdyBlcnI7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgIGRlYnVnTG9nKGAjIHJldHJ5OiAke2NvdW50ZXJ9IGNyZWF0ZSB0b2tlbiBhY2NvdW50OiBgLCBlKTtcbiAgICAgICAgICBkZWJ1Z0xvZyhgIyBtaW50OiAke21pbnR9LCBvd25lcjogJHtvd25lcn0sIGZlZVBheWVyOiAke2ZlZVBheWVyfWApO1xuICAgICAgICB9XG4gICAgICAgIGF3YWl0IHNsZWVwKFJFVFJZX1N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U5fUFJPR1JBTV9JRCxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGFzc29jaWF0ZWRUb2tlbkFjY291bnQ6ICcsIGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSk7XG5cbiAgICAgIHRyeSB7XG4gICAgICAgIC8vIERvbnQgdXNlIFJlc3VsdFxuICAgICAgICBhd2FpdCBnZXRBY2NvdW50KFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCkuY29tbWl0bWVudCxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3Q6IHVuZGVmaW5lZCxcbiAgICAgICAgfTtcbiAgICAgIH0gY2F0Y2ggKGVycm9yOiB1bmtub3duKSB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5BY2NvdW50Tm90Rm91bmRFcnJvcikgJiZcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5JbnZhbGlkQWNjb3VudE93bmVyRXJyb3IpXG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9yKCdVbmV4cGVjdGVkIGVycm9yJyk7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBwYXllciA9ICFmZWVQYXllciA/IG93bmVyIDogZmVlUGF5ZXI7XG5cbiAgICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgICBwYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGFzc29ja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0eSwge1xuICAgICAgICAgIHRocmVzaG9sZDogUk9ZQUxUWV9NSU4sXG4gICAgICAgICAgY29uZGl0aW9uOiAndW5kZXJNaW4nLFxuICAgICAgICB9KTtcbiAgICAgIH0gZWxzZSBpZiAocm95YWx0eSA+IFJPWUFMVFlfTUFYKSB7XG4gICAgICAgIHRocm93IGNyZWF0ZUVycm9yKGtleSwgTWVzc2FnZS5CSUdfTlVNQkVSLCByb3lhbHR5LCB7XG4gICAgICAgICAgdGhyZXNob2xkOiBST1lBTFRZX01BWCxcbiAgICAgICAgICBjb25kaXRpb246ICdvdmVyTWF4JyxcbiAgICAgICAgfSk7XG4gICAgICB9XG4gICAgICByZXR1cm4gTWVzc2FnZS5TVUNDRVNTO1xuICAgIH0pO1xuICB9O1xuXG4gIGV4cG9ydCBjb25zdCBpc1NlbGxlckZlZUJhc2lzUG9pbnRzID0gKFxuICAgIHJveWFsdHk6IG51bWJlcixcbiAgKTogUmVzdWx0PHN0cmluZywgVmFsaWRhdG9yRXJyb3I+ID0+IHtcbiAgICByZXR1cm4gVHJ5KCgpID0+IHtcbiAgICAgIGNvbnN0IGtleSA9ICdzZWxsZXJGZWVCYXNpc1BvaW50cy9zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyc7XG4gICAgICBpZiAocm95YWx0eSAhPT0gMCAmJiAhcm95YWx0eSkge1xuICAgICAgICB0aHJvdyBjcmVhdGVFcnJvcihrZXksIE1lc3NhZ2UuRU1QVFksIHJveWFsdHkpO1xuICAgICAgfVxuICAgICAgaWYgKHJveWFsdHkgPCBST1lBTFRZX01JTikge1xuICAgICAgICB0aHJvdyBjcmVhdGVFcnJvcihrZXksIE1lc3NhZ2UuU01BTExfTlVNQkVSLCByb3lhbHR5LCB7XG4gICAgICAgICAgdGhyZXNob2xkOiBST1lBTFRZX01JTixcbiAgICAgICAgICBjb25kaXRpb246ICd1bmRlck1pbicsXG4gICAgICAgIH0pO1xuICAgICAgfSBlbHNlIGlmIChyb3lhbHR5ID4gU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vckVycm9yPjtcbiAgICAgICAgc3dpdGNoIChrZXkpIHtcbiAgICAgICAgICBjYXNlICdpbWFnZSc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLmltYWdlKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzSW1hZ2VVcmwobWV0YWRhdGEuaW1hZ2UpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAncm95YWx0eSc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnJveWFsdHkpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNSb3lhbHR5KG1ldGFkYXRhLnJveWFsdHkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgI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JhZ2VUeXBlLFxuICAgICAgZmVlUGF5ZXI/OiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxQcm9wZXJ0aWVzPiA9PiB7XG4gICAgICBpZiAoIWlucHV0IHx8ICFpbnB1dC5maWxlcykge1xuICAgICAgICByZXR1cm4ge307XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGZpbGVzID0gYXdhaXQgUHJvbWlzZS5hbGwoXG4gICAgICAgIGlucHV0LmZpbGVzLm1hcChhc3luYyAoZmlsZSkgPT4ge1xuICAgICAgICAgIGlmICghZmlsZS5maWxlUGF0aCkge1xuICAgICAgICAgICAgcmV0dXJuIHt9O1xuICAgICAgICAgIH1cbiAgICAgICAgICBjb25zdCByZXMgPSBhd2FpdCBjYWxsYmFja0Z1bmMoZmlsZS5maWxlUGF0aCwgc3RvcmFnZVR5cGUsIGZlZVBheWVyKTtcbiAgICAgICAgICBpZiAocmVzLmlzRXJyKSB7XG4gICAgICAgICAgICB0aHJvdyBFcnJvcihyZXMuZXJyb3IubWVzc2FnZSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBvdmVyd3JpdGVPYmplY3QoZmlsZSwgW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBleGlzdHNLZXk6ICdmaWxlUGF0aCcsXG4gICAgICAgICAgICAgIHdpbGw6IHsga2V5OiAndXJpJywgdmFsdWU6IHJlcy52YWx1ZSB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICBdKTtcbiAgICAgICAgfSksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHsgLi4uaW5wdXQsIGZpbGVzIH0gYXMgUHJvcGVydGllcztcbiAgICB9O1xuICB9XG59XG4iLCAiLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLXVudXNlZC12YXJzICovXG5pbXBvcnQgeyBPcHRpb24sIFVzZXMgfSBmcm9tICd+L3R5cGVzL3JlZ3VsYXItbmZ0JztcblxuZXhwb3J0IG5hbWV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QiLCAiUGRhIiwgIkFjY291bnQiLCAiYnMiLCAiQWNjb3VudCIsICJQdWJsaWNLZXkiLCAiS2V5cGFpciIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlJlc3VsdCIsICJWYWxpZGF0b3IiLCAiTWVzc2FnZSIsICJDb252ZXJ0ZXIiLCAiQ29udmVydGVyIiwgIk5mdCIsICJDb252ZXJ0ZXIiLCAiTWVtbyIsICJDb252ZXJ0ZXIiLCAiTWludCIsICJDb252ZXJ0ZXIiLCAiUmVndWxhck5mdE1ldGFkYXRhIiwgIkNvbnZlcnRlciIsICJQcm9wZXJ0aWVzIiwgIkNvbnZlcnRlciIsICJVc2VzIiwgIkNvbnZlcnRlciIsICJUb2tlbk1ldGFkYXRhIiwgIkNvbnZlcnRlciIsICJUcmFuc2ZlckNoZWNrZWQiLCAiQ29udmVydGVyIiwgIlRyYW5zZmVyIiwgIkNvbnZlcnRlciJdCn0K \ No newline at end of file diff --git a/packages/converter/package.json b/packages/converter/package.json index 981cba963..194e9879d 100644 --- a/packages/converter/package.json +++ b/packages/converter/package.json @@ -14,6 +14,7 @@ "test": "ava --config node_modules/build-configs/ava/base.cjs" }, "dependencies": { + "@solana-suite/utils": "workspace:*", "@metaplex-foundation/mpl-token-metadata": "^2.13.0", "mpl-bubblegum-instruction": "github:atonoy/mpl-bubblegum-instructions", "@solana/web3.js": "^1.78.5", diff --git a/packages/converter/src/collection-details.ts b/packages/converter/src/collection-details.ts index e2a4fb49d..fd3f410d0 100644 --- a/packages/converter/src/collection-details.ts +++ b/packages/converter/src/collection-details.ts @@ -1,20 +1,20 @@ import { CollectionDetails as MetaplexCollectionDetails } from '@metaplex-foundation/mpl-token-metadata'; /* eslint-disable @typescript-eslint/no-unused-vars */ -import { CollectionDetails, Option } from '~/types/regular-nft'; +// import { CollectionDetails, Option } from '~/types/regular-nft'; export namespace Converter { - export namespace CollectionDetails { - export const intoUser = ( - output: Option, - ): CollectionDetails | undefined => { - if (!output) { - return undefined; - } - - return { - __kind: output.__kind, - size: parseInt(output.size.toString(10)), - }; - }; - } + // export namespace CollectionDetails { + // export const intoUser = ( + // output: Option, + // ): CollectionDetails | undefined => { + // if (!output) { + // return undefined; + // } + // + // return { + // __kind: output.__kind, + // size: parseInt(output.size.toString(10)), + // }; + // }; + // } } diff --git a/packages/converter/src/memo.ts b/packages/converter/src/memo.ts index 00dd77ac6..9b1e88276 100644 --- a/packages/converter/src/memo.ts +++ b/packages/converter/src/memo.ts @@ -1,5 +1,5 @@ import { ParsedTransactionWithMeta } from '@solana/web3.js'; -import { convertTimestampToDateTime } from '~/shared'; +import { convertTimestampToDateTime } from '~/suite-utils'; import { PostTokenAccount } from '~/types/transaction-filter'; import { History } from '~/types/history'; /* eslint-disable @typescript-eslint/no-unused-vars */ diff --git a/packages/converter/src/mint.ts b/packages/converter/src/mint.ts index a9807d697..f46d2d51e 100644 --- a/packages/converter/src/mint.ts +++ b/packages/converter/src/mint.ts @@ -1,7 +1,7 @@ import { ParsedTransactionWithMeta } from '@solana/web3.js'; import { MintTo } from '~/types/transaction-filter'; import { History } from '~/types/history'; -import { convertTimestampToDateTime } from '~/shared'; +import { convertTimestampToDateTime } from '~/suite-utils'; export namespace Converter { export namespace Mint { diff --git a/packages/converter/src/nft.ts b/packages/converter/src/nft.ts index 247ea8d0d..743b859d6 100644 --- a/packages/converter/src/nft.ts +++ b/packages/converter/src/nft.ts @@ -1,7 +1,7 @@ import { Converter as Collection } from './collection'; import { Converter as Creators } from './creators'; import { Converter as Royalty } from './royalty'; -import { convertTimestampToDateTime } from '~/shared'; +import { convertTimestampToDateTime } from '~/suite-utils'; import { AssetAndOffchain } from '~/types/storage'; import { Metadata } from '~/types/nft'; import { Pubkey } from '~/types/account'; diff --git a/packages/converter/src/properties.ts b/packages/converter/src/properties.ts index 8df0b1cad..2339b8dab 100644 --- a/packages/converter/src/properties.ts +++ b/packages/converter/src/properties.ts @@ -1,4 +1,4 @@ -import { overwriteObject, Result } from '~/shared'; +import { overwriteObject, Result } from '~/suite-utils'; import { Secret } from '~/types/account'; import {} from '~/types/converter'; /* eslint-disable @typescript-eslint/no-unused-vars */ diff --git a/packages/converter/src/token-metadata.ts b/packages/converter/src/token-metadata.ts index 29e6500a8..31cbbf548 100644 --- a/packages/converter/src/token-metadata.ts +++ b/packages/converter/src/token-metadata.ts @@ -3,7 +3,7 @@ import { Converter as _Uses } from './uses'; /* eslint-disable @typescript-eslint/no-unused-vars */ import { InputTokenMetadata, TokenMetadata } from '~/types/spl-token'; import { MetadataAndOffchain } from '~/types/storage'; -import { convertTimestampToDateTime } from '~/shared'; +import { convertTimestampToDateTime } from '~/suite-utils'; import { DataV2 } from '@metaplex-foundation/mpl-token-metadata'; export namespace Converter { diff --git a/packages/converter/src/transfer-checked.ts b/packages/converter/src/transfer-checked.ts index 3692a2478..1664b28a2 100644 --- a/packages/converter/src/transfer-checked.ts +++ b/packages/converter/src/transfer-checked.ts @@ -3,7 +3,7 @@ import { PostTokenAccount } from '~/types/transaction-filter'; import { History } from '~/types/history'; /* eslint-disable @typescript-eslint/no-unused-vars */ import { TransferChecked } from '~/types/transaction-filter'; -import { convertTimestampToDateTime } from '~/shared'; +import { convertTimestampToDateTime } from '~/suite-utils'; export namespace Converter { export namespace TransferChecked { diff --git a/packages/converter/src/transfer.ts b/packages/converter/src/transfer.ts index 722edef64..39d9d9e9d 100644 --- a/packages/converter/src/transfer.ts +++ b/packages/converter/src/transfer.ts @@ -2,7 +2,7 @@ import { ParsedTransactionWithMeta } from '@solana/web3.js'; /* eslint-disable @typescript-eslint/no-unused-vars */ import { Transfer } from '~/types/transaction-filter'; import { History } from '~/types/history'; -import { convertTimestampToDateTime } from '~/shared'; +import { convertTimestampToDateTime } from '~/suite-utils'; export namespace Converter { export namespace Transfer { diff --git a/packages/shared/dist/exports-8dfab8bf.d.ts b/packages/shared/dist/exports-8dfab8bf.d.ts deleted file mode 100644 index ba9bf6df5..000000000 --- a/packages/shared/dist/exports-8dfab8bf.d.ts +++ /dev/null @@ -1,546 +0,0 @@ -import * as _solana_web3_js from '@solana/web3.js'; -import { TransactionSignature, TransactionInstruction, PublicKey, Keypair, Connection, Commitment } from '@solana/web3.js'; -import BN from 'bn.js'; -import { DataV2 } from '@metaplex-foundation/mpl-token-metadata'; - -declare const pubKeyNominality: unique symbol; -declare const secretNominality: unique symbol; -type Pubkey = (string & { - [pubKeyNominality]: never; -}) | string; -type Secret = (string & { - [secretNominality]: never; -}) | string; -type KeypairAccount = { - pubkey: Pubkey; - secret: Secret; -}; -type OwnerInfo = { - sol: number; - lamports: number; - owner: string; -}; - -declare abstract class AbstractResult { - protected abstract _chain(ok: (value: T) => Result, err: (error: E) => Result): Result; - unwrap(): T; - unwrap(ok: (value: T) => U): U; - unwrap(ok: (value: T) => U, err: (error: E) => V): U | V; - unwrap(ok: (value: T) => U, err: (error: E) => U): U; - map(ok: (value: T) => U): Result; - map(ok: (value: T) => U, err: (error: E) => F): Result; - chain(ok: (value: T) => Result): Result; - chain(ok: (value: T) => Result): Result; - chain(ok: (value: T) => Result, err: (error: E) => Result): Result; - match(ok: (value: T) => U, err: (error: E) => F): void | Promise; - submit(feePayer?: Secret): Promise>; -} -declare global { - interface Array { - submit(feePayer?: Secret): Promise>; - } -} -declare class InternalOk extends AbstractResult { - readonly value: T; - readonly isOk = true; - readonly isErr = false; - constructor(value: T); - protected _chain(ok: (value: T) => Result, _err: (error: E) => Result): Result; -} -declare class InternalErr extends AbstractResult { - readonly error: E; - readonly isOk = false; - readonly isErr = true; - constructor(error: E); - protected _chain(_ok: (value: T) => Result, err: (error: E) => Result): Result; -} -declare namespace Result { - export type Ok = InternalOk; - export type Err = InternalErr; - export function ok(value: T): Result; - export function err(error?: E): Result; - type U = Result; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3]): Result<[ - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2]): Result<[OkType, OkType, OkType], ErrType>; - export function all(obj: [R0, R1]): Result<[OkType, OkType], ErrType>; - export function all(obj: [R0]): Result<[OkType], ErrType>; - export function all(obj: []): Result<[]>; - export function all>(obj: T): Result<{ - [K in keyof T]: T[K] extends Result ? I : never; - }, { - [K in keyof T]: T[K] extends Result ? E : never; - }[keyof T]>; - export {}; -} -type Result = Result.Ok | Result.Err; -type OkType> = R extends Result ? O : never; -type ErrType> = R extends Result ? E : never; - -/** - * convert buffer to Array - * - * @param {Buffer} buffer - * @returns number[] - */ -declare const bufferToArray: (buffer: Buffer) => number[]; -/** - * Overwrite JS Object - * - * @param {unknown} object - * @param {OverwriteObject[]} targets - * @returns Object - */ -declare const overwriteObject: (object: unknown, targets: { - existsKey: string; - will: { - key: string; - value: unknown; - }; -}[]) => unknown; -/** - * Display log for solana-suite-config.js - * - * @param {unknown} data1 - * @param {unknown} data2 - * @param {unknown} data3 - * @param {unknown} data4 - * @returns void - */ -declare const debugLog: (data1: unknown, data2?: unknown, data3?: unknown, data4?: unknown) => void; -/** - * sleep timer - * - * @param {number} sec - * @returns Promise - */ -declare const sleep: (sec: number) => Promise; -/** - * Node.js or Browser js - * - * @returns boolean - */ -declare const isBrowser: () => boolean; -/** - * Node.js or Browser js - * - * @returns boolean - */ -declare const isNode: () => boolean; -/** - * argument is promise or other - * - * @param {unknown} obj - * @returns boolean - */ -declare const isPromise: (obj: unknown) => obj is Promise; -/** - * Try async monad - * - * @returns Promise> - */ -declare function Try(asyncblock: () => Promise, finallyInput?: () => void): Promise>; -declare function Try(block: () => T): Result; -/** - * argument is promise or other - * - * @param {number|undefined} created_at - * @returns Date | undefined - */ -declare const convertTimestampToDateTime: (created_at: number | undefined) => Date | undefined; -/** - * Get unix timestamp - * - * @returns number - */ -declare const unixTimestamp: () => number; - -/** - * 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 - */ -declare namespace Account$3 { - namespace Associated { - /** - * Retry function if create new token accouint - * - * @param {Pubkey} mint - * @param {Pubkey} owner - * @param {Secret} feePayer - * @returns Promise - */ - const retryGetOrCreate: (mint: Pubkey, owner: Pubkey, feePayer: Secret) => Promise; - /** - * [Main logic]Get Associated token Account. - * if not created, create new token accouint - * - * @param {Pubkey} mint - * @param {Pubkey} owner - * @param {Pubkey} feePayer - * @returns Promise - */ - const makeOrCreateInstruction: (mint: Pubkey, owner: Pubkey, feePayer?: Pubkey, allowOwnerOffCurve?: boolean) => Promise<{ - tokenAccount: string; - inst: TransactionInstruction | undefined; - }>; - } -} - -declare namespace Account$2 { - class Keypair { - secret: Secret; - pubkey: Pubkey; - constructor(params: { - pubkey?: Pubkey; - secret: Secret; - }); - toPublicKey(): PublicKey; - toKeypair(): Keypair; - static isPubkey: (value: string) => value is Pubkey; - static isSecret: (value: string) => value is Secret; - static create: () => Keypair; - static toKeyPair: (keypair: Keypair) => Keypair; - } -} - -declare namespace Account$1 { - namespace Pda { - const getMetadata: (address: Pubkey) => PublicKey; - const getMasterEdition: (address: Pubkey) => PublicKey; - const getTreeAuthority: (address: Pubkey) => PublicKey; - const getBgumSigner: () => PublicKey; - const getAssetId: (address: Pubkey, leafIndex: number) => Pubkey; - } -} - -declare const Account: { - Pda: typeof Account$1.Pda; - Keypair: typeof Account$2.Keypair; - Associated: typeof Account$3.Associated; -}; - -declare namespace Node { - const getConnection: () => Connection; - const changeConnection: (param: { - cluster?: string; - commitment?: Commitment; - customClusterUrl?: string[]; - }) => void; - const confirmedSig: (signature: string, commitment?: Commitment) => Promise, Error> | Result.Err<_solana_web3_js.RpcResponseAndContext<_solana_web3_js.SignatureResult>, Error> | Result.Ok | Result.Err>; -} - -type Condition = 'overMax' | 'underMin'; -interface Limit { - threshold: number; - condition: Condition; -} -interface Details { - key: string; - message: string; - actual: string | number; - limit?: Limit; -} - -type bignum = number | BN; -declare enum UseMethod { - Burn = 0, - Multiple = 1, - Single = 2 -} -type Uses = { - useMethod: UseMethod; - remaining: bignum; - total: bignum; -}; -type InputCreators = { - address: Pubkey; - secret: Secret; - share: number; -}; - -type FileType = string | File; - -type StorageType = 'nftStorage' | 'arweave' | string; -type Offchain = { - name?: string; - symbol?: string; - description?: string; - seller_fee_basis_points?: number; - image?: string; - external_url?: string; - attributes?: Attribute[]; - properties?: Properties; - collection?: { - name?: string; - family?: string; - [key: string]: unknown; - }; - collectionDetails?: { - kind: string; - size: number; - }; - created_at?: number; -}; -type Properties = { - creators?: { - address?: string; - share?: number; - [key: string]: unknown; - }[]; - files?: { - type?: string; - filePath?: FileType; - [key: string]: unknown; - }[]; - [key: string]: unknown; -}; -type Attribute = { - trait_type?: string; - value?: string; - [key: string]: unknown; -}; - -type InputCollection = Pubkey; -type Options = { - [key: string]: unknown; -}; -type InputNftMetadata = { - name: string; - symbol: string; - royalty?: number; - storageType?: StorageType; - filePath?: FileType; - uri?: string; - isMutable?: boolean; - description?: string; - external_url?: string; - attributes?: Attribute[]; - properties?: Properties; - maxSupply?: bignum; - creators?: InputCreators[]; - uses?: Uses; - collection?: InputCollection; - options?: Options; -}; - -declare namespace Validator { - export namespace Message { - const SUCCESS = "success"; - const SMALL_NUMBER = "too small"; - const BIG_NUMBER = "too big"; - const LONG_LENGTH = "too long"; - const EMPTY = "invalid empty value"; - const INVALID_URL = "invalid url"; - const ONLY_NODE_JS = "`string` type is only Node.js"; - } - export const NAME_LENGTH = 32; - export const SYMBOL_LENGTH = 10; - export const URL_LENGTH = 200; - export const ROYALTY_MAX = 100; - export const SELLER_FEE_BASIS_POINTS_MAX = 10000; - export const ROYALTY_MIN = 0; - export const isRoyalty: (royalty: number) => Result; - export const isSellerFeeBasisPoints: (royalty: number) => Result; - export const isName: (name: string) => Result; - export const isSymbol: (symbol: string) => Result; - export const isImageUrl: (image: string) => Result; - export const checkAll: (metadata: T) => Result; - type PickNftStorage = Pick; - type PickNftStorageMetaplex = Pick; - type PickMetaplex = Pick; - export {}; -} -declare class ValidatorError extends Error { - details: Details[]; - constructor(message: string, details: Details[]); -} - -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; -}; - -export { Account as A, Explorer as E, KeypairAccount as K, Node as N, OwnerInfo as O, Pubkey as P, Result as R, Secret as S, Try as T, Validator as V, isNode as a, bufferToArray as b, isPromise as c, debugLog as d, convertTimestampToDateTime as e, ValidatorError as f, ExplorerOptions as g, isBrowser as i, overwriteObject as o, sleep as s, unixTimestamp as u }; diff --git a/packages/shared/dist/exports.d.mts b/packages/shared/dist/exports.d.mts deleted file mode 100644 index b37d67968..000000000 --- a/packages/shared/dist/exports.d.mts +++ /dev/null @@ -1,4 +0,0 @@ -export { A as Account, E as Explorer, g as ExplorerOptions, K as KeypairAccount, N as Node, O as OwnerInfo, P as Pubkey, S as Secret, T as Try, V as Validator, f as ValidatorError, b as bufferToArray, e as convertTimestampToDateTime, d as debugLog, i as isBrowser, a as isNode, c as isPromise, o as overwriteObject, s as sleep, u as unixTimestamp } from './exports-8dfab8bf.js'; -import '@solana/web3.js'; -import 'bn.js'; -import '@metaplex-foundation/mpl-token-metadata'; diff --git a/packages/shared/dist/exports.d.ts b/packages/shared/dist/exports.d.ts deleted file mode 100644 index b37d67968..000000000 --- a/packages/shared/dist/exports.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export { A as Account, E as Explorer, g as ExplorerOptions, K as KeypairAccount, N as Node, O as OwnerInfo, P as Pubkey, S as Secret, T as Try, V as Validator, f as ValidatorError, b as bufferToArray, e as convertTimestampToDateTime, d as debugLog, i as isBrowser, a as isNode, c as isPromise, o as overwriteObject, s as sleep, u as unixTimestamp } from './exports-8dfab8bf.js'; -import '@solana/web3.js'; -import 'bn.js'; -import '@metaplex-foundation/mpl-token-metadata'; diff --git a/packages/shared/dist/exports.js b/packages/shared/dist/exports.js deleted file mode 100644 index e305877d1..000000000 --- a/packages/shared/dist/exports.js +++ /dev/null @@ -1,1581 +0,0 @@ -"use strict"; -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/exports.ts -var exports_exports = {}; -__export(exports_exports, { - Account: () => Account4, - Explorer: () => Explorer, - Node: () => Node, - Try: () => Try, - Validator: () => Validator, - ValidatorError: () => ValidatorError, - bufferToArray: () => bufferToArray, - convertTimestampToDateTime: () => convertTimestampToDateTime, - debugLog: () => debugLog, - isBrowser: () => isBrowser, - isNode: () => isNode, - isPromise: () => isPromise, - overwriteObject: () => overwriteObject, - sleep: () => sleep, - unixTimestamp: () => unixTimestamp -}); -module.exports = __toCommonJS(exports_exports); - -// src/constants.ts -var import_web3 = require("@solana/web3.js"); -var import_load = __toESM(require("@solana-suite/config/load")); -var Config = import_load.default; -var Constants; -((Constants2) => { - let WarnningMessage; - ((WarnningMessage2) => { - const THRESHHOLD = 50; - let isDisplay = false; - WarnningMessage2.NFT_STORAGE_API_KEY = ` - [YOU HAVE TO DO] - -------------------------------------- - You need to update nftStorageApiKey define parameter in solana-suite.json. - Can get api key from https://nft.storage/ - -------------------------------------- - `; - WarnningMessage2.DAS_API_URL = ` - [YOU HAVE TO DO] - -------------------------------------- - You need to update dasApiUrl define parameter in solana-suite.json. - can get api url from https://www.helius.dev/ - -------------------------------------- - `; - WarnningMessage2.ANNOUNCE = ` - [DEPRECATED] - -------------------------------------- - Account, Node, toExplorer, Pubkey, Secret have been moved to - @solana-suite/utils - ------------------------------------- - `; - WarnningMessage2.calculateProbability = () => { - const randomValue = Math.random(); - const probability = 1 / THRESHHOLD; - if (!isDisplay && randomValue < probability) { - isDisplay = true; - return true; - } - return false; - }; - })(WarnningMessage = Constants2.WarnningMessage || (Constants2.WarnningMessage = {})); -})(Constants || (Constants = {})); -((Constants2) => { - Constants2.currentCluster = Config.cluster.type; - Constants2.customClusterUrl = Config.cluster.customClusterUrl; - Constants2.isDebugging = Config.debugging; - Constants2.nftStorageApiKey = Config.nftStorageApiKey; - Constants2.dasApiUrl = Config.dasApiUrl; - let Cluster; - ((Cluster2) => { - Cluster2["prd"] = "mainnet-beta"; - Cluster2["prdMetaplex"] = "mainnet-beta-metaplex"; - Cluster2["dev"] = "devnet"; - Cluster2["test"] = "testnet"; - Cluster2["localhost"] = "localhost-devnet"; - })(Cluster = Constants2.Cluster || (Constants2.Cluster = {})); - let EndPointUrl; - ((EndPointUrl2) => { - EndPointUrl2["prd"] = "https://api.mainnet-beta.solana.com"; - EndPointUrl2["prdMetaplex"] = "https://api.metaplex.solana.com"; - EndPointUrl2["dev"] = "https://api.devnet.solana.com"; - EndPointUrl2["test"] = "https://api.testnet.solana.com"; - EndPointUrl2["localhost"] = "http://api.devnet.solana.com"; - })(EndPointUrl = Constants2.EndPointUrl || (Constants2.EndPointUrl = {})); - let BundlrUrl; - ((BundlrUrl2) => { - BundlrUrl2["prd"] = "https://node1.irys.xyz,https://node2.irys.xyz"; - BundlrUrl2["dev"] = "https://devnet.irys.xyz"; - })(BundlrUrl = Constants2.BundlrUrl || (Constants2.BundlrUrl = {})); - let DasApiUrl; - ((DasApiUrl2) => { - DasApiUrl2["dev"] = "https://devnet.helius-rpc.com/?api-key=15319bf4-5b40-4958-ac8d-6313aa55eb92,https://rpc-devnet.helius.xyz?api-key=9f70a843-3274-4ffd-a0a9-323f8b7c0639"; - })(DasApiUrl = Constants2.DasApiUrl || (Constants2.DasApiUrl = {})); - let NftstorageApiKey; - ((NftstorageApiKey2) => { - NftstorageApiKey2["dev"] = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJkaWQ6ZXRocjoweERGMjcyN2VkODZhRGU1RTMyZDZDZEJlODc0YzRFNDlEODY1OWZmOEMiLCJpc3MiOiJuZnQtc3RvcmFnZSIsImlhdCI6MTYyMDI2NDk0MzcwNiwibmFtZSI6ImRlbW8ifQ.d4J70mikxRB8a5vwNu6SO5HDA8JaueuseAj7Q_ytMCE"; - })(NftstorageApiKey = Constants2.NftstorageApiKey || (Constants2.NftstorageApiKey = {})); - Constants2.loadConfig = async () => { - Config = await import("@solana-suite/config/load"); - }; - Constants2.switchCluster = (param) => { - const { cluster: env, customClusterUrl: customClusterUrl2 } = param; - if (customClusterUrl2 && customClusterUrl2.length > 0) { - const index = Date.now() % customClusterUrl2.length; - return customClusterUrl2[index]; - } - switch (env) { - case "mainnet-beta" /* prd */: - return "https://api.mainnet-beta.solana.com" /* prd */; - case "mainnet-beta-metaplex" /* prdMetaplex */: - return "https://api.metaplex.solana.com" /* prdMetaplex */; - case "testnet" /* test */: - return "https://api.testnet.solana.com" /* test */; - case "devnet" /* dev */: - return "https://api.devnet.solana.com" /* dev */; - default: - return "http://api.devnet.solana.com" /* localhost */; - } - }; - Constants2.switchBundlr = (env) => { - switch (env) { - case "mainnet-beta" /* prd */: { - const urls = "https://node1.irys.xyz,https://node2.irys.xyz" /* prd */.split(","); - const index = Date.now() % urls.length; - return urls[index]; - } - default: { - return "https://devnet.irys.xyz" /* dev */; - } - } - }; - Constants2.switchDasApi = (env) => { - switch (env) { - case "mainnet-beta" /* prd */: { - if (Constants2.dasApiUrl.length < 1) { - throw Error(Constants2.WarnningMessage.DAS_API_URL); - } - const urls = "https://node1.irys.xyz,https://node2.irys.xyz" /* prd */.split(","); - const index = Date.now() % urls.length; - return urls[index]; - } - default: { - const urls = "https://devnet.helius-rpc.com/?api-key=15319bf4-5b40-4958-ac8d-6313aa55eb92,https://rpc-devnet.helius.xyz?api-key=9f70a843-3274-4ffd-a0a9-323f8b7c0639" /* dev */.split(","); - const index = Date.now() % urls.length; - return urls[index]; - } - } - }; - Constants2.switchNftStorage = (env) => { - switch (env) { - case "mainnet-beta" /* prd */: - if (!Constants2.nftStorageApiKey) { - throw Error(Constants2.WarnningMessage.NFT_STORAGE_API_KEY); - } - return Constants2.nftStorageApiKey; - default: { - return "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJkaWQ6ZXRocjoweERGMjcyN2VkODZhRGU1RTMyZDZDZEJlODc0YzRFNDlEODY1OWZmOEMiLCJpc3MiOiJuZnQtc3RvcmFnZSIsImlhdCI6MTYyMDI2NDk0MzcwNiwibmFtZSI6ImRlbW8ifQ.d4J70mikxRB8a5vwNu6SO5HDA8JaueuseAj7Q_ytMCE" /* dev */; - } - } - }; - Constants2.WRAPPED_TOKEN_PROGRAM_ID = new import_web3.PublicKey( - "So11111111111111111111111111111111111111112" - ); - Constants2.MEMO_PROGRAM_ID = new import_web3.PublicKey( - "Memo1UhkJRfHyvLMcVucJwxXeuD728EqVDDwQDxFMNo" - ); - Constants2.METAPLEX_PROGRAM_ID = new import_web3.PublicKey( - "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s" - ); - Constants2.COMMITMENT = "confirmed"; - Constants2.NFT_STORAGE_GATEWAY_URL = "https://ipfs.io/ipfs"; - Constants2.IRYS_GATEWAY_URL = "https://gateway.irys.xyz"; - Constants2.BUNDLR_NETWORK_URL = (0, Constants2.switchBundlr)(Config.cluster.type); - Constants2.DAS_API_URL = (0, Constants2.switchDasApi)(Config.cluster.type); - Constants2.NFT_STORAGE_API_KEY = (0, Constants2.switchNftStorage)(Config.cluster.type); - Constants2.EXPLORER_SOLSCAN_URL = "https://solscan.io"; - Constants2.EXPLORER_SOLANAFM_URL = "https://solana.fm"; - Constants2.EXPLORER_XRAY_URL = "https://xray.helius.xyz"; -})(Constants || (Constants = {})); -console.log(Constants.WarnningMessage.ANNOUNCE); - -// ../transaction-builder/src/batch.ts -var import_web37 = require("@solana/web3.js"); - -// ../types/src/global/index.ts -var Explorer = /* @__PURE__ */ ((Explorer2) => { - Explorer2["Solscan"] = "solscan"; - Explorer2["SolanaFM"] = "solanafm"; - Explorer2["Xray"] = "xray"; - return Explorer2; -})(Explorer || {}); - -// ../global/src/index.ts -var import_web34 = require("@solana/web3.js"); - -// ../account/src/associated.ts -var import_spl_token = require("@solana/spl-token"); - -// ../account/src/keypair.ts -var import_web32 = require("@solana/web3.js"); -var import_bs58 = __toESM(require("bs58")); -var Account; -((Account5) => { - class Keypair4 { - secret; - pubkey; - constructor(params) { - if (!params.pubkey) { - const keypair = params.secret.toKeypair(); - this.pubkey = keypair.publicKey.toString(); - } else { - this.pubkey = params.pubkey; - } - this.secret = params.secret; - } - toPublicKey() { - return new import_web32.PublicKey(this.pubkey); - } - toKeypair() { - const decoded = import_bs58.default.decode(this.secret); - return import_web32.Keypair.fromSecretKey(decoded); - } - static isPubkey = (value) => /^[0-9a-zA-Z]{32,44}$/.test(value); - static isSecret = (value) => /^[0-9a-zA-Z]{87,88}$/.test(value); - static create = () => { - const keypair = import_web32.Keypair.generate(); - return new Keypair4({ - pubkey: keypair.publicKey.toString(), - secret: import_bs58.default.encode(keypair.secretKey) - }); - }; - static toKeyPair = (keypair) => { - return new Keypair4({ - pubkey: keypair.publicKey.toString(), - secret: import_bs58.default.encode(keypair.secretKey) - }); - }; - } - Account5.Keypair = Keypair4; -})(Account || (Account = {})); - -// ../account/src/associated.ts -var Account2; -((Account5) => { - let Associated; - ((Associated2) => { - const RETRY_OVER_LIMIT = 10; - const RETRY_SLEEP_TIME = 3; - const get = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const res = await (0, Associated2.makeOrCreateInstruction)( - mint, - owner, - new Account.Keypair({ secret: feePayer }).pubkey, - allowOwnerOffCurve - ); - if (!res.inst) { - return res.tokenAccount; - } - return new TransactionBuilder.Common( - [res.inst], - [], - feePayer.toKeypair(), - res.tokenAccount - ); - }; - Associated2.retryGetOrCreate = async (mint, owner, feePayer) => { - let counter = 1; - while (counter < RETRY_OVER_LIMIT) { - try { - const inst = await get(mint, owner, feePayer, true); - if (inst && typeof inst === "string") { - debugLog("# associatedTokenAccount: ", inst); - return inst; - } else if (inst instanceof TransactionBuilder.Common) { - (await inst.submit()).map( - async (ok) => { - await Node.confirmedSig(ok); - return inst.data; - }, - (err) => { - debugLog("# Error submit retryGetOrCreate: ", err); - throw err; - } - ); - } - } catch (e) { - debugLog(`# retry: ${counter} create token account: `, e); - debugLog(`# mint: ${mint}, owner: ${owner}, feePayer: ${feePayer}`); - } - await sleep(RETRY_SLEEP_TIME); - counter++; - } - throw Error(`retry action is over limit ${RETRY_OVER_LIMIT}`); - }; - Associated2.makeOrCreateInstruction = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const associatedTokenAccount = (0, import_spl_token.getAssociatedTokenAddressSync)( - mint.toPublicKey(), - owner.toPublicKey(), - allowOwnerOffCurve, - import_spl_token.TOKEN_PROGRAM_ID, - import_spl_token.ASSOCIATED_TOKEN_PROGRAM_ID - ); - debugLog("# associatedTokenAccount: ", associatedTokenAccount.toString()); - try { - await (0, import_spl_token.getAccount)( - Node.getConnection(), - associatedTokenAccount, - Node.getConnection().commitment, - import_spl_token.TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst: void 0 - }; - } catch (error) { - if (!(error instanceof import_spl_token.TokenAccountNotFoundError) && !(error instanceof import_spl_token.TokenInvalidAccountOwnerError)) { - throw Error("Unexpected error"); - } - const payer = !feePayer ? owner : feePayer; - const inst = (0, import_spl_token.createAssociatedTokenAccountInstruction)( - payer.toPublicKey(), - associatedTokenAccount, - owner.toPublicKey(), - mint.toPublicKey(), - import_spl_token.TOKEN_PROGRAM_ID, - import_spl_token.ASSOCIATED_TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst - }; - } - }; - })(Associated = Account5.Associated || (Account5.Associated = {})); -})(Account2 || (Account2 = {})); - -// ../account/src/pda.ts -var import_web33 = require("@solana/web3.js"); -var import_mpl_token_metadata = require("@metaplex-foundation/mpl-token-metadata"); -var import_mpl_bubblegum = require("@metaplex-foundation/mpl-bubblegum"); -var import_bn = __toESM(require("bn.js")); -var Account3; -((Account5) => { - let Pda; - ((Pda2) => { - Pda2.getMetadata = (address) => { - const [publicKey] = import_web33.PublicKey.findProgramAddressSync( - [ - Buffer.from("metadata"), - import_mpl_token_metadata.PROGRAM_ID.toBuffer(), - address.toPublicKey().toBuffer() - ], - import_mpl_token_metadata.PROGRAM_ID - ); - return publicKey; - }; - Pda2.getMasterEdition = (address) => { - const [publicKey] = import_web33.PublicKey.findProgramAddressSync( - [ - Buffer.from("metadata"), - import_mpl_token_metadata.PROGRAM_ID.toBuffer(), - address.toPublicKey().toBuffer(), - Buffer.from("edition") - ], - import_mpl_token_metadata.PROGRAM_ID - ); - return publicKey; - }; - Pda2.getTreeAuthority = (address) => { - const [publicKey] = import_web33.PublicKey.findProgramAddressSync( - [address.toPublicKey().toBuffer()], - import_mpl_bubblegum.MPL_BUBBLEGUM_PROGRAM_ID.toPublicKey() - ); - return publicKey; - }; - Pda2.getBgumSigner = () => { - const [publicKey] = import_web33.PublicKey.findProgramAddressSync( - [Buffer.from("collection_cpi", "utf8")], - import_mpl_bubblegum.MPL_BUBBLEGUM_PROGRAM_ID.toPublicKey() - ); - return publicKey; - }; - Pda2.getAssetId = (address, leafIndex) => { - const node = new import_bn.default.BN(leafIndex); - const [assetId] = import_web33.PublicKey.findProgramAddressSync( - [ - Buffer.from("asset", "utf8"), - address.toPublicKey().toBuffer(), - Uint8Array.from(node.toArray("le", 8)) - ], - import_mpl_bubblegum.MPL_BUBBLEGUM_PROGRAM_ID.toPublicKey() - ); - return assetId.toString(); - }; - })(Pda = Account5.Pda || (Account5.Pda = {})); -})(Account3 || (Account3 = {})); - -// ../account/src/index.ts -var Account4 = { - ...Account2, - ...Account, - ...Account3 -}; - -// ../global/src/index.ts -var import_bignumber = require("bignumber.js"); -var import_bs582 = __toESM(require("bs58")); -String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, options = {}) { - const endPointUrl = Node.getConnection().rpcEndpoint; - debugLog("# toExplorerUrl rpcEndpoint:", endPointUrl); - let cluster = ""; - if (endPointUrl === Constants.EndPointUrl.prd) { - cluster = Constants.Cluster.prd; - } else if (endPointUrl === Constants.EndPointUrl.test) { - cluster = Constants.Cluster.test; - } else if (endPointUrl === Constants.EndPointUrl.dev) { - cluster = Constants.Cluster.dev; - } else { - cluster = Constants.Cluster.dev; - } - const addressOrSignature = this.toString(); - let url = ""; - if (options.replacePath) { - if (explorer === "solanafm" /* SolanaFM */) { - url = `${Constants.EXPLORER_SOLANAFM_URL}/${options.replacePath}/${addressOrSignature}?cluster=${cluster}`; - } else if (explorer === "xray" /* Xray */) { - url = `${Constants.EXPLORER_XRAY_URL}/${options.replacePath}/${addressOrSignature}?network=${cluster}`; - } else { - url = `${Constants.EXPLORER_SOLSCAN_URL}/${options.replacePath}/${addressOrSignature}?cluster=${cluster}`; - } - return url; - } - if (Account4.Keypair.isPubkey(addressOrSignature)) { - if (explorer === "solanafm" /* SolanaFM */) { - url = `${Constants.EXPLORER_SOLANAFM_URL}/address/${addressOrSignature}?cluster=${cluster}`; - } else if (explorer === "xray" /* Xray */) { - url = `${Constants.EXPLORER_XRAY_URL}/account/${addressOrSignature}?network=${cluster}`; - } else { - url = `${Constants.EXPLORER_SOLSCAN_URL}/account/${addressOrSignature}?cluster=${cluster}`; - } - } else { - if (explorer === "solanafm" /* SolanaFM */) { - url = `${Constants.EXPLORER_SOLANAFM_URL}/tx/${addressOrSignature}?cluster=${cluster}`; - } else if (explorer === "xray" /* Xray */) { - url = `${Constants.EXPLORER_XRAY_URL}/tx/${addressOrSignature}?network=${cluster}`; - } else { - url = `${Constants.EXPLORER_SOLSCAN_URL}/tx/${addressOrSignature}?cluster=${cluster}`; - } - } - return url; -}; -String.prototype.toPublicKey = function() { - if (!Account4.Keypair.isPubkey(this.toString())) { - throw Error(`No match KeyPair.PubKey: ${this.toString()}`); - } - return new import_web34.PublicKey(this.toString()); -}; -String.prototype.toKeypair = function() { - if (!Account4.Keypair.isSecret(this.toString())) { - throw Error(`No match KeyPair.Secret: ${this.toString()}`); - } - const decoded = import_bs582.default.decode(this.toString()); - return import_web34.Keypair.fromSecretKey(decoded); -}; -Number.prototype.toSol = function() { - return (0, import_bignumber.BigNumber)(this).div(import_web34.LAMPORTS_PER_SOL).toNumber(); -}; -Number.prototype.toLamports = function() { - return (0, import_bignumber.BigNumber)(this).times(import_web34.LAMPORTS_PER_SOL).toNumber(); -}; - -// ../node/src/index.ts -var import_web35 = require("@solana/web3.js"); -var Node; -((Node2) => { - const setted = { - clusterUrl: "", - commitment: Constants.COMMITMENT, - customClusterUrl: [] - }; - Node2.getConnection = () => { - if (setted.customClusterUrl.length > 0) { - setted.clusterUrl = Constants.switchCluster({ - customClusterUrl: setted.customClusterUrl - }); - } else if (Constants.customClusterUrl.length > 0) { - setted.clusterUrl = Constants.switchCluster({ - customClusterUrl: Constants.customClusterUrl - }); - } else if (!setted.clusterUrl) { - setted.clusterUrl = Constants.switchCluster({ - cluster: Constants.currentCluster - }); - } - if (!setted.commitment) { - setted.commitment = Constants.COMMITMENT; - } - return new import_web35.Connection(setted.clusterUrl, setted.commitment); - }; - Node2.changeConnection = (param) => { - setted.clusterUrl = ""; - setted.customClusterUrl = []; - setted.commitment = Constants.COMMITMENT; - const { cluster, commitment, customClusterUrl } = param; - if (commitment) { - setted.commitment = commitment; - debugLog("# Node change commitment: ", setted.commitment); - } - if (cluster) { - setted.clusterUrl = Constants.switchCluster({ cluster }); - debugLog("# Node change clusterUrl: ", setted.clusterUrl); - } - if (customClusterUrl) { - debugLog("# customClusterUrl: ", customClusterUrl); - setted.clusterUrl = Constants.switchCluster({ customClusterUrl }); - setted.customClusterUrl = customClusterUrl; - debugLog( - "# Node change cluster, custom cluster url: ", - setted.clusterUrl - ); - } - }; - Node2.confirmedSig = async (signature, commitment = Constants.COMMITMENT) => { - const connection = Node2.getConnection(); - const latestBlockhash = await connection.getLatestBlockhash(); - return await connection.confirmTransaction( - { - blockhash: latestBlockhash.blockhash, - lastValidBlockHeight: latestBlockhash.lastValidBlockHeight, - signature - }, - commitment - ).then(Result.ok).catch(Result.err); - }; -})(Node || (Node = {})); - -// ../transaction-builder/src/common.ts -var import_web36 = require("@solana/web3.js"); -var MAX_RETRIES = 3; -var TransactionBuilder2; -((TransactionBuilder7) => { - class Common2 { - static MAX_TRANSACTION_SIZE = 1232; - instructions; - signers; - feePayer; - data; - constructor(instructions, signers, feePayer, data) { - this.instructions = instructions; - this.signers = signers; - this.feePayer = feePayer; - this.data = data; - } - submit = async () => { - return Try(async () => { - if (!(this instanceof Common2)) { - throw Error("only Instruction object that can use this"); - } - const transaction = new import_web36.Transaction(); - const blockhashObj = await Node.getConnection().getLatestBlockhash(); - transaction.lastValidBlockHeight = blockhashObj.lastValidBlockHeight; - transaction.recentBlockhash = blockhashObj.blockhash; - let finalSigners = this.signers; - if (this.feePayer) { - transaction.feePayer = this.feePayer.publicKey; - finalSigners = [this.feePayer, ...this.signers]; - } - this.instructions.forEach((inst) => transaction.add(inst)); - const options = { - maxRetries: MAX_RETRIES - }; - return await (0, import_web36.sendAndConfirmTransaction)( - Node.getConnection(), - transaction, - finalSigners, - options - ); - }); - }; - } - TransactionBuilder7.Common = Common2; -})(TransactionBuilder2 || (TransactionBuilder2 = {})); - -// ../transaction-builder/src/batch.ts -var TransactionBuilder3; -((TransactionBuilder7) => { - class Batch { - submit = async (arr) => { - return Try(async () => { - let i = 0; - for (const a of arr) { - if (!a.instructions && !a.signers) { - throw Error( - `only Instruction object that can use batchSubmit(). - Index: ${i}, Set value: ${JSON.stringify(a)}` - ); - } - i++; - } - const instructions = arr.flatMap((a) => a.instructions); - const signers = arr.flatMap((a) => a.signers); - const feePayers = arr.filter((a) => a.feePayer !== void 0); - let feePayer = signers[0]; - if (feePayers.length > 0 && feePayers[0].feePayer) { - feePayer = feePayers[0].feePayer; - } - const transaction = new import_web37.Transaction(); - let finalSigners = signers; - if (feePayer) { - transaction.feePayer = feePayer.publicKey; - finalSigners = [feePayer, ...signers]; - } - instructions.map((inst) => transaction.add(inst)); - const options = { - maxRetries: MAX_RETRIES - }; - return await (0, import_web37.sendAndConfirmTransaction)( - Node.getConnection(), - transaction, - finalSigners, - options - ); - }); - }; - } - TransactionBuilder7.Batch = Batch; -})(TransactionBuilder3 || (TransactionBuilder3 = {})); - -// ../transaction-builder/src/mint.ts -var import_web38 = require("@solana/web3.js"); -var TransactionBuilder4; -((TransactionBuilder7) => { - class Mint { - instructions; - signers; - feePayer; - data; - constructor(instructions, signers, feePayer, data) { - this.instructions = instructions; - this.signers = signers; - this.data = data; - this.feePayer = feePayer; - } - submit = async () => { - return Try(async () => { - if (!(this instanceof Mint)) { - throw Error("only MintInstruction object that can use this"); - } - const transaction = new import_web38.Transaction(); - const blockhashObj = await Node.getConnection().getLatestBlockhash(); - transaction.lastValidBlockHeight = blockhashObj.lastValidBlockHeight; - transaction.recentBlockhash = blockhashObj.blockhash; - let finalSigners = this.signers; - if (this.feePayer) { - transaction.feePayer = this.feePayer.publicKey; - finalSigners = [this.feePayer, ...this.signers]; - } - this.instructions.forEach((inst) => transaction.add(inst)); - const options = { - maxRetries: MAX_RETRIES - }; - if (Node.getConnection().rpcEndpoint === Constants.EndPointUrl.prd) { - debugLog("# Change metaplex cluster on mainnet-beta"); - Node.changeConnection({ cluster: Constants.Cluster.prdMetaplex }); - } - return await (0, import_web38.sendAndConfirmTransaction)( - Node.getConnection(), - transaction, - finalSigners, - options - ); - }); - }; - } - TransactionBuilder7.Mint = Mint; -})(TransactionBuilder4 || (TransactionBuilder4 = {})); - -// ../transaction-builder/src/partial-sign.ts -var import_web39 = require("@solana/web3.js"); -var TransactionBuilder5; -((TransactionBuilder7) => { - class PartialSign { - hexInstruction; - data; - canSubmit; - constructor(instructions, mint, canSubmit = false) { - this.hexInstruction = instructions; - this.data = mint; - this.canSubmit = canSubmit; - } - submit = async (feePayer) => { - return Try(async () => { - if (!(this instanceof PartialSign)) { - throw Error("only PartialSignInstruction object that can use this"); - } - const decode = Buffer.from(this.hexInstruction, "hex"); - const transactionFromJson = import_web39.Transaction.from(decode); - transactionFromJson.partialSign(feePayer.toKeypair()); - const options = { - maxRetries: MAX_RETRIES - }; - const wireTransaction = transactionFromJson.serialize(); - return await Node.getConnection().sendRawTransaction( - wireTransaction, - options - ); - }); - }; - } - TransactionBuilder7.PartialSign = PartialSign; -})(TransactionBuilder5 || (TransactionBuilder5 = {})); - -// ../transaction-builder/src/calculate-txsize.ts -var TransactionBuilder6; -((TransactionBuilder7) => { - const LOW_VALUE = 127; - const HIGH_VALUE = 16383; - const MAX_TRANSACTION_SIZE = 1232; - const compactHeader = (n) => n <= LOW_VALUE ? 1 : n <= HIGH_VALUE ? 2 : 3; - const compactArraySize = (n, size) => compactHeader(n) + n * size; - TransactionBuilder7.calculateTxSize = (transaction, feePayer) => { - const feePayerPk = [feePayer.toBase58()]; - const signers = new Set(feePayerPk); - const accounts = new Set(feePayerPk); - const ixsSize = transaction.instructions.reduce((acc, ix) => { - ix.keys.forEach(({ pubkey, isSigner }) => { - const pk = pubkey.toBase58(); - if (isSigner) - signers.add(pk); - accounts.add(pk); - }); - accounts.add(ix.programId.toBase58()); - const nIndexes = ix.keys.length; - const opaqueData = ix.data.length; - return acc + 1 + // PID index - compactArraySize(nIndexes, 1) + compactArraySize(opaqueData, 1); - }, 0); - return compactArraySize(signers.size, 64) + // signatures - 3 + // header - compactArraySize(accounts.size, 32) + // accounts - 32 + // blockhash - compactHeader(transaction.instructions.length) + // instructions - ixsSize; - }; - TransactionBuilder7.isOverTransactionSize = (transaction, feePayer) => { - return (0, TransactionBuilder7.calculateTxSize)(transaction, feePayer) > MAX_TRANSACTION_SIZE; - }; -})(TransactionBuilder6 || (TransactionBuilder6 = {})); - -// ../transaction-builder/src/index.ts -var TransactionBuilder = { - ...TransactionBuilder3, - ...TransactionBuilder6, - ...TransactionBuilder4, - ...TransactionBuilder2, - ...TransactionBuilder5 -}; - -// src/result.ts -var AbstractResult = class { - unwrap(ok, err) { - const r = this._chain( - (value) => Result.ok(ok ? ok(value) : value), - (error) => err ? Result.ok(err(error)) : Result.err(error) - ); - if (r.isErr) { - throw r.error; - } - return r.value; - } - map(ok, err) { - return this._chain( - (value) => Result.ok(ok(value)), - (error) => Result.err(err ? err(error) : error) - ); - } - chain(ok, err) { - return this._chain(ok, err || ((error) => Result.err(error))); - } - match(ok, err) { - this._chain( - (value) => Result.ok(ok(value)), - (error) => Result.err(err(error)) - ); - } - /// single TransactionBuilder //// - /* eslint-disable @typescript-eslint/no-explicit-any */ - async submit(feePayer) { - const res = this.map( - async (ok) => { - debugLog("# result single submit: ", ok); - if (feePayer) { - const obj = ok; - return await obj.submit(feePayer); - } else { - const obj = ok; - return await obj.submit(); - } - }, - (err) => { - return err; - } - ); - if (res.isErr) { - return Result.err(res.error); - } - return res.value; - } -}; -Array.prototype.submit = async function(feePayer) { - if (feePayer) { - let i = 1; - for await (const obj of this) { - if (obj.isErr) { - return obj; - } else if (obj.value.canSubmit) { - debugLog("# Result batch canSubmit"); - const sig = await obj.submit(feePayer); - if (sig.isErr) { - return sig; - } - await Node.confirmedSig(sig.value); - } else { - debugLog("# Result batch other than canSubmit"); - if (this.length == i) { - return obj.submit(feePayer); - } - obj.submit(feePayer); - } - i++; - } - } else { - const instructions = []; - for (const obj of this) { - if (obj.isErr) { - return obj; - } else if (obj.isOk) { - instructions.push(obj.value); - } else { - return Result.err(Error("Only Array Instruction object")); - } - } - debugLog("# Result batch submit: ", instructions); - return new TransactionBuilder.Batch().submit(instructions); - } -}; -var InternalOk = class extends AbstractResult { - constructor(value) { - super(); - this.value = value; - } - isOk = true; - isErr = false; - /* eslint-disable @typescript-eslint/no-unused-vars */ - _chain(ok, _err) { - return ok(this.value); - } -}; -var InternalErr = class extends AbstractResult { - constructor(error) { - super(); - this.error = error; - } - isOk = false; - isErr = true; - _chain(_ok, err) { - return err(this.error); - } -}; -var Result; -((Result7) => { - function ok(value) { - return new InternalOk(value); - } - Result7.ok = ok; - function err(error) { - return new InternalErr(error || Error()); - } - Result7.err = err; - function all(obj) { - if (Array.isArray(obj)) { - const resArr = []; - for (const item of obj) { - if (item.isErr) { - return item; - } - resArr.push(item.value); - } - return Result7.ok(resArr); - } - const res = {}; - const keys = Object.keys(obj); - for (const key of keys) { - const item = obj[key]; - if (item.isErr) { - return item; - } - res[key] = item.value; - } - return Result7.ok(res); - } - Result7.all = all; -})(Result || (Result = {})); - -// src/shared.ts -var bufferToArray = (buffer) => { - const nums = []; - for (const byte of buffer) { - nums.push(buffer[byte]); - } - return nums; -}; -var overwriteObject = (object, targets) => { - const that = object; - targets.forEach((target) => { - delete that[target.existsKey]; - that[target.will.key] = target.will.value; - }); - return that; -}; -var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { - if (Constants.isDebugging === "true" || process.env.DEBUG === "true") { - console.log("[DEBUG]", data1, data2, data3, data4); - } -}; -var sleep = async (sec) => { - return new Promise((r) => setTimeout(r, sec * 1e3)); -}; -var isBrowser = () => { - return typeof window !== "undefined" && typeof window.document !== "undefined"; -}; -var isNode = () => { - return typeof process !== "undefined" && process.versions != null && process.versions.node != null; -}; -var isPromise = (obj) => { - return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; -}; -function Try(input, finallyInput) { - try { - const v = input(); - if (isPromise(v)) { - return v.then( - (x) => Result.ok(x), - (err) => Result.err(err) - ); - } else { - return Result.ok(v); - } - } catch (e) { - if (e instanceof Error) { - return Result.err(e); - } - return Result.err(Error(e)); - } finally { - if (finallyInput) { - debugLog("# finally input:", finallyInput); - finallyInput(); - } - } -} -var convertTimestampToDateTime = (created_at) => { - if (created_at) { - return new Date(created_at * 1e3); - } - return; -}; -var unixTimestamp = () => { - return Math.floor((/* @__PURE__ */ new Date()).getTime() / 1e3); -}; - -// ../converter/src/collection.ts -var Converter; -((Converter15) => { - let Collection; - ((Collection2) => { - Collection2.intoInfra = (input) => { - if (!input) { - return null; - } - return { - key: input.toPublicKey(), - verified: false - }; - }; - Collection2.intoUser = (output) => { - if (!output) { - return void 0; - } - return { - address: output.key.toString(), - verified: output.verified - }; - }; - })(Collection = Converter15.Collection || (Converter15.Collection = {})); - let CollectionMint; - ((CollectionMint2) => { - CollectionMint2.intoUser = (output) => { - const res = output.find((value) => { - if (value.group_key === "collection") { - return value.group_value; - } - }); - return res ? res.group_value : ""; - }; - })(CollectionMint = Converter15.CollectionMint || (Converter15.CollectionMint = {})); -})(Converter || (Converter = {})); - -// ../converter/src/creators.ts -var Converter2; -((Converter15) => { - let Creators; - ((Creators2) => { - Creators2.intoInfra = (input) => { - if (!input) { - return null; - } - return input.map((data) => { - return { - address: data.address.toPublicKey(), - share: data.share, - verified: false - }; - }); - }; - Creators2.intoCompressedNftInfra = (input) => { - if (!input) { - return []; - } - return input.map((data) => { - return { - address: data.address.toPublicKey(), - share: data.share, - verified: false - }; - }); - }; - Creators2.intoUser = (output) => { - if (!output) { - return void 0; - } - return output.map((data) => { - return { - address: data.address.toString(), - share: data.share, - verified: data.verified - }; - }); - }; - })(Creators = Converter15.Creators || (Converter15.Creators = {})); -})(Converter2 || (Converter2 = {})); - -// ../converter/src/compressed-nft-metadata.ts -var import_mpl_bubblegum_instruction = require("mpl-bubblegum-instruction"); -var Converter3; -((Converter15) => { - let CompressedNftMetadata; - ((CompressedNftMetadata2) => { - CompressedNftMetadata2.intoInfra = (input, uri, sellerFeeBasisPoints) => { - return { - name: input.name, - symbol: input.symbol, - uri, - sellerFeeBasisPoints, - creators: Converter2.Creators.intoCompressedNftInfra(input.creators), - collection: Converter.Collection.intoInfra(input.collection), - uses: input.uses || null, - primarySaleHappened: false, - isMutable: input.isMutable ?? false, - editionNonce: 0, - tokenStandard: import_mpl_bubblegum_instruction.TokenStandard.NonFungible, - tokenProgramVersion: import_mpl_bubblegum_instruction.TokenProgramVersion.Original - }; - }; - })(CompressedNftMetadata = Converter15.CompressedNftMetadata || (Converter15.CompressedNftMetadata = {})); -})(Converter3 || (Converter3 = {})); - -// ../converter/src/royalty.ts -var Converter4; -((Converter15) => { - let Royalty; - ((Royalty2) => { - Royalty2.THRESHOLD = 100; - Royalty2.intoInfra = (percentage) => { - return percentage * Royalty2.THRESHOLD; - }; - Royalty2.intoUser = (percentage) => { - return percentage * Royalty2.THRESHOLD; - }; - })(Royalty = Converter15.Royalty || (Converter15.Royalty = {})); -})(Converter4 || (Converter4 = {})); - -// ../converter/src/nft.ts -var Converter5; -((Converter15) => { - let Nft; - ((Nft2) => { - Nft2.intoUser = (output) => { - return { - mint: output.onchain.id.toString(), - collectionMint: Converter.CollectionMint.intoUser( - output.onchain.grouping - ), - authorities: output.onchain.authorities, - royalty: Converter4.Royalty.intoUser(output.onchain.royalty.percent), - name: output.onchain.content.metadata.name, - symbol: output.onchain.content.metadata.symbol, - uri: output.onchain.content.json_uri, - creators: Converter2.Creators.intoUser(output.onchain.creators), - treeAddress: output.onchain.compression.tree, - isCompressed: output.onchain.compression.compressed, - isMutable: output.onchain.mutable, - isBurn: output.onchain.burnt, - editionNonce: output.onchain.supply.edition_nonce, - primarySaleHappened: output.onchain.royalty.primary_sale_happened, - dateTime: convertTimestampToDateTime(output.offchain.created_at), - offchain: output.offchain - }; - }; - })(Nft = Converter15.Nft || (Converter15.Nft = {})); -})(Converter5 || (Converter5 = {})); - -// ../converter/src/memo.ts -var Converter6; -((Converter15) => { - let Memo; - ((Memo2) => { - Memo2.intoUserSide = (output, meta, outputTransfer, mappingTokenAccount) => { - const history = {}; - if (outputTransfer && outputTransfer.program !== "") { - if (mappingTokenAccount && outputTransfer.program === "spl-token") { - const foundSource = mappingTokenAccount.find( - (m) => m.account === outputTransfer.parsed.info.source - ); - const foundDest = mappingTokenAccount.find( - (m) => m.account === outputTransfer.parsed.info.destination - ); - history.mint = outputTransfer.parsed.info.mint; - foundSource && (history.source = foundSource.owner); - foundDest && (history.destination = foundDest.owner); - } else { - history.source = outputTransfer.parsed.info.source; - history.destination = outputTransfer.parsed.info.destination; - } - } - history.memo = output.parsed; - history.type = output.program; - history.dateTime = convertTimestampToDateTime(meta.blockTime); - history.sig = meta.transaction.signatures[0]; - history.innerInstruction = false; - if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { - history.innerInstruction = true; - } - return history; - }; - })(Memo = Converter15.Memo || (Converter15.Memo = {})); -})(Converter6 || (Converter6 = {})); - -// ../converter/src/mint.ts -var Converter7; -((Converter15) => { - let Mint; - ((Mint2) => { - Mint2.intoUserSide = (output, meta) => { - const history = {}; - history.mint = output.parsed.info.mint; - history.mintAuthority = output.parsed.info.mintAuthority; - history.tokenAmount = output.parsed.info.tokenAmount; - history.account = output.parsed.info.account; - history.type = output.program; - history.dateTime = convertTimestampToDateTime(meta.blockTime); - history.sig = meta.transaction.signatures[0]; - history.innerInstruction = false; - if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { - history.innerInstruction = true; - } - return history; - }; - })(Mint = Converter15.Mint || (Converter15.Mint = {})); -})(Converter7 || (Converter7 = {})); - -// ../converter/src/regular-nft-metadata.ts -var Converter8; -((Converter15) => { - let RegularNftMetadata; - ((RegularNftMetadata2) => { - RegularNftMetadata2.intoInfra = (input, uri, sellerFeeBasisPoints) => { - return { - name: input.name, - symbol: input.symbol, - uri, - sellerFeeBasisPoints, - creators: Converter2.Creators.intoInfra(input.creators), - collection: Converter.Collection.intoInfra(input.collection), - uses: input.uses || null - }; - }; - })(RegularNftMetadata = Converter15.RegularNftMetadata || (Converter15.RegularNftMetadata = {})); -})(Converter8 || (Converter8 = {})); - -// ../converter/src/properties.ts -var Converter9; -((Converter15) => { - let Properties; - ((Properties2) => { - Properties2.intoInfra = async (input, callbackFunc, storageType, feePayer) => { - if (!input || !input.files) { - return {}; - } - const files = await Promise.all( - input.files.map(async (file) => { - if (!file.filePath) { - return {}; - } - const res = await callbackFunc(file.filePath, storageType, feePayer); - if (res.isErr) { - throw Error(res.error.message); - } - return overwriteObject(file, [ - { - existsKey: "filePath", - will: { key: "uri", value: res.value } - } - ]); - }) - ); - return { ...input, files }; - }; - })(Properties = Converter15.Properties || (Converter15.Properties = {})); -})(Converter9 || (Converter9 = {})); - -// ../converter/src/uses.ts -var Converter10; -((Converter15) => { - let Uses; - ((Uses2) => { - Uses2.intoUserSide = (output) => { - if (!output) { - return void 0; - } - return output; - }; - })(Uses = Converter15.Uses || (Converter15.Uses = {})); -})(Converter10 || (Converter10 = {})); - -// ../converter/src/token-metadata.ts -var Converter11; -((Converter15) => { - let TokenMetadata; - ((TokenMetadata2) => { - TokenMetadata2.intoInfra = (input, uri, sellerFeeBasisPoints) => { - return { - name: input.name, - symbol: input.symbol, - uri, - sellerFeeBasisPoints, - creators: Converter2.Creators.intoInfra(input.creators), - collection: null, - uses: input.uses || null - }; - }; - TokenMetadata2.intoUser = (output, tokenAmount) => { - return { - mint: output.onchain.mint.toString(), - royalty: output.onchain.data.sellerFeeBasisPoints, - name: (0, TokenMetadata2.deleteNullStrings)(output.onchain.data.name), - symbol: (0, TokenMetadata2.deleteNullStrings)(output.onchain.data.symbol), - tokenAmount, - uri: (0, TokenMetadata2.deleteNullStrings)(output.onchain.data.uri), - creators: Converter2.Creators.intoUser(output.onchain.data.creators), - uses: Converter10.Uses.intoUserSide(output.onchain.uses), - dateTime: convertTimestampToDateTime(output.offchain.created_at), - offchain: output.offchain - }; - }; - TokenMetadata2.deleteNullStrings = (str) => { - return str.replace(/\0/g, ""); - }; - })(TokenMetadata = Converter15.TokenMetadata || (Converter15.TokenMetadata = {})); -})(Converter11 || (Converter11 = {})); - -// ../converter/src/transfer-checked.ts -var Converter12; -((Converter15) => { - let TransferChecked; - ((TransferChecked2) => { - TransferChecked2.intoUserSide = (output, meta, mappingTokenAccount) => { - const history = {}; - if (mappingTokenAccount) { - const foundSource = mappingTokenAccount.find( - (m) => m.account === output.parsed.info.source - ); - const foundDest = mappingTokenAccount.find( - (m) => m.account === output.parsed.info.destination - ); - foundSource && (history.source = foundSource.owner); - foundDest && (history.destination = foundDest.owner); - } - history.tokenAmount = output.parsed.info.tokenAmount; - history.mint = output.parsed.info.mint; - history.multisigAuthority = output.parsed.info.multisigAuthority; - history.signers = output.parsed.info.signers; - history.type = output.program; - history.dateTime = convertTimestampToDateTime(meta.blockTime); - history.sig = meta.transaction.signatures[0]; - history.innerInstruction = false; - if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { - history.innerInstruction = true; - } - return history; - }; - })(TransferChecked = Converter15.TransferChecked || (Converter15.TransferChecked = {})); -})(Converter12 || (Converter12 = {})); - -// ../converter/src/transfer.ts -var Converter13; -((Converter15) => { - let Transfer; - ((Transfer2) => { - Transfer2.intoUserSide = (output, meta) => { - const history = {}; - if (!output.parsed.info.destination || !output.parsed.info.lamports) { - return; - } - history.source = output.parsed.info.source; - history.destination = output.parsed.info.destination; - history.sol = output.parsed.info.lamports?.toSol().toString(); - history.type = output.program; - history.dateTime = convertTimestampToDateTime(meta.blockTime); - history.sig = meta.transaction.signatures[0]; - history.innerInstruction = false; - if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { - history.innerInstruction = true; - } - return history; - }; - })(Transfer = Converter15.Transfer || (Converter15.Transfer = {})); -})(Converter13 || (Converter13 = {})); - -// ../converter/src/index.ts -var Converter14 = { - ...Converter3, - ...Converter, - ...Converter2, - ...Converter5, - ...Converter6, - ...Converter7, - ...Converter8, - ...Converter9, - ...Converter4, - ...Converter11, - ...Converter12, - ...Converter13, - ...Converter10 -}; - -// ../validator/src/index.ts -var Validator; -((Validator2) => { - let Message; - ((Message2) => { - Message2.SUCCESS = "success"; - Message2.SMALL_NUMBER = "too small"; - Message2.BIG_NUMBER = "too big"; - Message2.LONG_LENGTH = "too long"; - Message2.EMPTY = "invalid empty value"; - Message2.INVALID_URL = "invalid url"; - Message2.ONLY_NODE_JS = "`string` type is only Node.js"; - })(Message = Validator2.Message || (Validator2.Message = {})); - Validator2.NAME_LENGTH = 32; - Validator2.SYMBOL_LENGTH = 10; - Validator2.URL_LENGTH = 200; - Validator2.ROYALTY_MAX = 100; - Validator2.SELLER_FEE_BASIS_POINTS_MAX = 1e4; - Validator2.ROYALTY_MIN = 0; - Validator2.isRoyalty = (royalty) => { - return Try(() => { - const key = "royalty"; - if (royalty !== 0 && !royalty) { - throw createError(key, Message.EMPTY, royalty); - } - if (royalty < Validator2.ROYALTY_MIN) { - throw createError(key, Message.SMALL_NUMBER, royalty, { - threshold: Validator2.ROYALTY_MIN, - condition: "underMin" - }); - } else if (royalty > Validator2.ROYALTY_MAX) { - throw createError(key, Message.BIG_NUMBER, royalty, { - threshold: Validator2.ROYALTY_MAX, - condition: "overMax" - }); - } - return Message.SUCCESS; - }); - }; - Validator2.isSellerFeeBasisPoints = (royalty) => { - return Try(() => { - const key = "sellerFeeBasisPoints/seller_fee_basis_points"; - if (royalty !== 0 && !royalty) { - throw createError(key, Message.EMPTY, royalty); - } - if (royalty < Validator2.ROYALTY_MIN) { - throw createError(key, Message.SMALL_NUMBER, royalty, { - threshold: Validator2.ROYALTY_MIN, - condition: "underMin" - }); - } else if (royalty > Validator2.ROYALTY_MAX * Converter14.Royalty.THRESHOLD) { - throw createError(key, Message.BIG_NUMBER, royalty, { - threshold: Validator2.SELLER_FEE_BASIS_POINTS_MAX, - condition: "overMax" - }); - } - return Message.SUCCESS; - }); - }; - Validator2.isName = (name) => { - return Try(() => { - const key = "name"; - if (!name) { - throw createError(key, Message.EMPTY, name); - } - if (byteLength(name) > Validator2.NAME_LENGTH) { - throw createError(key, Message.LONG_LENGTH, name, { - threshold: Validator2.NAME_LENGTH, - condition: "overMax" - }); - } - return Message.SUCCESS; - }); - }; - Validator2.isSymbol = (symbol) => { - return Try(() => { - const key = "symbol"; - if (!symbol) { - throw createError(key, Message.EMPTY, symbol); - } - if (byteLength(symbol) > Validator2.SYMBOL_LENGTH) { - throw createError(key, Message.LONG_LENGTH, symbol, { - threshold: Validator2.SYMBOL_LENGTH, - condition: "overMax" - }); - } - return Message.SUCCESS; - }); - }; - Validator2.isImageUrl = (image) => isUriOrImage(image, "image"); - Validator2.checkAll = (metadata) => { - return Try(() => { - const keys = Object.keys(metadata); - const results = []; - keys.map((key) => { - let res; - switch (key) { - case "image": - if (key in metadata && metadata.image) { - res = (0, Validator2.isImageUrl)(metadata.image); - } - break; - case "royalty": - if (key in metadata && metadata.royalty) { - res = (0, Validator2.isRoyalty)(metadata.royalty); - } - break; - case "seller_fee_basis_points": - if (key in metadata && metadata.seller_fee_basis_points) { - res = (0, Validator2.isSellerFeeBasisPoints)(metadata.seller_fee_basis_points); - } - break; - case "sellerFeeBasisPoints": - if (key in metadata) { - res = (0, Validator2.isSellerFeeBasisPoints)(metadata.sellerFeeBasisPoints); - } - break; - case "name": - if (metadata.name) { - res = (0, Validator2.isName)(metadata.name); - } - break; - case "symbol": - if (metadata.symbol) { - res = (0, Validator2.isSymbol)(metadata.symbol); - } - break; - } - if (res && res.isErr) { - results.push(...res.error.details); - } - }); - if (results.length > 0) { - const message = "Caught in the validation errors. see information e.g: err.details"; - throw new ValidatorError(message, results); - } - return Message.SUCCESS; - }); - }; - const byteLength = (value) => { - const text = new TextEncoder(); - return text.encode(value).length; - }; - const createError = (key, message, actual, limit) => { - let error; - if (limit) { - error = new ValidatorError(message, [{ key, message, actual, limit }]); - } else { - error = new ValidatorError(message, [{ key, message, actual }]); - } - return error; - }; - const isUriOrImage = (imageOrUri, key) => { - return Try(() => { - if (!imageOrUri) { - throw createError(key, Message.EMPTY, imageOrUri); - } - if (byteLength(imageOrUri) > Validator2.URL_LENGTH) { - throw createError(key, Message.LONG_LENGTH, imageOrUri, { - threshold: Validator2.URL_LENGTH, - condition: "overMax" - }); - } - if (!/https?:\/\/[-_.!~*\\()a-zA-Z0-9;?:&=+,%#]+/g.test(imageOrUri)) { - throw createError(key, Message.INVALID_URL, imageOrUri); - } - return Message.SUCCESS; - }); - }; -})(Validator || (Validator = {})); -var ValidatorError = class extends Error { - details; - constructor(message, details) { - super(message); - this.details = details; - } -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - Account, - Explorer, - Node, - Try, - Validator, - ValidatorError, - bufferToArray, - convertTimestampToDateTime, - debugLog, - isBrowser, - isNode, - isPromise, - overwriteObject, - sleep, - unixTimestamp -}); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2V4cG9ydHMudHMiLCAiLi4vc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9iYXRjaC50cyIsICIuLi8uLi90eXBlcy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BleHBvcnQgY29uc3QgcmV0cnlHZXRPckNyZWF0ZSA9IGFzeW5jIChcbiAgICAgIG1pbnQ6IFB1YmtleSxcbiAgICAgIG93bmVyOiBQdWJrZXksXG4gICAgICBmZWVQYXllcjogU2VjcmV0LFxuICAgICk6IFByb21pc2U8c3RyaW5nPiA9PiB7XG4gICAgICBsZXQgY291bnRlciA9IDE7XG4gICAgICB3aGlsZSAoY291bnRlciA8IFJFVFJZX09WRVJfTElNSVQpIHtcbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICBjb25zdCBpbnN0ID0gYXdhaXQgZ2V0KG1pbnQsIG93bmVyLCBmZWVQYXllciwgdHJ1ZSk7XG5cbiAgICAgICAgICBpZiAoaW5zdCAmJiB0eXBlb2YgaW5zdCA9PT0gJ3N0cmluZycpIHtcbiAgICAgICAgICAgIGRlYnVnTG9nKCcjIGFzc29jaWF0ZWRUb2tlbkFjY291bnQ6ICcsIGluc3QpO1xuICAgICAgICAgICAgcmV0dXJuIGluc3Q7XG4gICAgICAgICAgfSBlbHNlIGlmIChpbnN0IGluc3RhbmNlb2YgVHJhbnNhY3Rpb25CdWlsZGVyLkNvbW1vbikge1xuICAgICAgICAgICAgKGF3YWl0IGluc3Quc3VibWl0KCkpLm1hcChcbiAgICAgICAgICAgICAgYXN5bmMgKG9rOiBzdHJpbmcpID0+IHtcbiAgICAgICAgICAgICAgICBhd2FpdCBOb2RlLmNvbmZpcm1lZFNpZyhvayk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGluc3QuZGF0YTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgKGVycjogRXJyb3IpID0+IHtcbiAgICAgICAgICAgICAgICBkZWJ1Z0xvZygnIyBFcnJvciBzdWJtaXQgcmV0cnlHZXRPckNyZWF0ZTogJywgZXJyKTtcbiAgICAgICAgICAgICAgICB0aHJvdyBlcnI7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICA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+IHtcbiAgICAgIGNvbnN0IGFzc29jaWF0ZWRUb2tlbkFjY291bnQgPSBnZXRBc3NvY2lhdGVkVG9rZW5BZGRyZXNzU3luYyhcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICBhbGxvd093bmVyT2ZmQ3VydmUsXG4gICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGFzc29jaWF0ZWRUb2tlbkFjY291bnQ6ICcsIGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSk7XG5cbiAgICAgIHRyeSB7XG4gICAgICAgIC8vIERvbnQgdXNlIFJlc3VsdFxuICAgICAgICBhd2FpdCBnZXRBY2NvdW50KFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCkuY29tbWl0bWVudCxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3Q6IHVuZGVmaW5lZCxcbiAgICAgICAgfTtcbiAgICAgIH0gY2F0Y2ggKGVycm9yOiB1bmtub3duKSB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5BY2NvdW50Tm90Rm91bmRFcnJvcikgJiZcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5JbnZhbGlkQWNjb3VudE93bmVyRXJyb3IpXG4gICAgICAgICkge1xuICAgICAgICAg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gICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvQ29tcHJlc3NlZE5mdEluZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IEludGVybmFsQ3JlYXRvcnNbXSA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBbXTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBpbnB1dCEubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlciA9IChcbiAgICAgIG91dHB1dDogT3B0aW9uPEludGVybmFsQ3JlYXRvcnNbXT4sXG4gICAgKTogQ3JlYXRvcnNbXSB8IHVuZGVmaW5lZCA9PiB7XG4gICAgICBpZiAoIW91dHB1dCkge1xuICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gb3V0cHV0Lm1hcCgoZGF0YSkgPT4ge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIGFkZHJlc3M6IGRhdGEuYWRkcmVzcy50b1N0cmluZygpLFxuICAgICAgICAgIHNoYXJlOiBkYXRhLnNoYXJlLFxuICAgICAgICAgIHZlcmlmaWVkOiBkYXRhLnZlcmlmaWVkLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IENvb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VzID0gaXNJbWFnZVVybChtZXRhZGF0YS5pbWFnZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdyb3lhbHR5JzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEucm95YWx0eSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1JveWFsdHkobWV0YWRhdGEucm95YWx0eSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ25hbWUnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLm5hbWUpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNOYW1lKG1ldGFkYXRhLm5hbWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc3ltYm9sJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5zeW1ib2wpIHtcbiAgICAgICAg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kNvbnZlcnRlciIsICJUcmFuc2ZlckNoZWNrZWQiLCAiQ29udmVydGVyIiwgIlRyYW5zZmVyIiwgIkNvbnZlcnRlciIsICJWYWxpZGF0b3IiLCAiTWVzc2FnZSIsICJDb252ZXJ0ZXIiXQp9Cg== \ No newline at end of file diff --git a/packages/shared/dist/exports.mjs b/packages/shared/dist/exports.mjs deleted file mode 100644 index 8c95f960d..000000000 --- a/packages/shared/dist/exports.mjs +++ /dev/null @@ -1,1552 +0,0 @@ -// src/constants.ts -import { PublicKey } from "@solana/web3.js"; -import SolanaJsonConfig from "@solana-suite/config/load"; -var Config = SolanaJsonConfig; -var Constants; -((Constants2) => { - let WarnningMessage; - ((WarnningMessage2) => { - const THRESHHOLD = 50; - let isDisplay = false; - WarnningMessage2.NFT_STORAGE_API_KEY = ` - [YOU HAVE TO DO] - -------------------------------------- - You need to update nftStorageApiKey define parameter in solana-suite.json. - Can get api key from https://nft.storage/ - -------------------------------------- - `; - WarnningMessage2.DAS_API_URL = ` - [YOU HAVE TO DO] - -------------------------------------- - You need to update dasApiUrl define parameter in solana-suite.json. - can get api url from https://www.helius.dev/ - -------------------------------------- - `; - WarnningMessage2.ANNOUNCE = ` - [DEPRECATED] - -------------------------------------- - Account, Node, toExplorer, Pubkey, Secret have been moved to - @solana-suite/utils - ------------------------------------- - `; - WarnningMessage2.calculateProbability = () => { - const randomValue = Math.random(); - const probability = 1 / THRESHHOLD; - if (!isDisplay && randomValue < probability) { - isDisplay = true; - return true; - } - return false; - }; - })(WarnningMessage = Constants2.WarnningMessage || (Constants2.WarnningMessage = {})); -})(Constants || (Constants = {})); -((Constants2) => { - Constants2.currentCluster = Config.cluster.type; - Constants2.customClusterUrl = Config.cluster.customClusterUrl; - Constants2.isDebugging = Config.debugging; - Constants2.nftStorageApiKey = Config.nftStorageApiKey; - Constants2.dasApiUrl = Config.dasApiUrl; - let Cluster; - ((Cluster2) => { - Cluster2["prd"] = "mainnet-beta"; - Cluster2["prdMetaplex"] = "mainnet-beta-metaplex"; - Cluster2["dev"] = "devnet"; - Cluster2["test"] = "testnet"; - Cluster2["localhost"] = "localhost-devnet"; - })(Cluster = Constants2.Cluster || (Constants2.Cluster = {})); - let EndPointUrl; - ((EndPointUrl2) => { - EndPointUrl2["prd"] = "https://api.mainnet-beta.solana.com"; - EndPointUrl2["prdMetaplex"] = "https://api.metaplex.solana.com"; - EndPointUrl2["dev"] = "https://api.devnet.solana.com"; - EndPointUrl2["test"] = "https://api.testnet.solana.com"; - EndPointUrl2["localhost"] = "http://api.devnet.solana.com"; - })(EndPointUrl = Constants2.EndPointUrl || (Constants2.EndPointUrl = {})); - let BundlrUrl; - ((BundlrUrl2) => { - BundlrUrl2["prd"] = "https://node1.irys.xyz,https://node2.irys.xyz"; - BundlrUrl2["dev"] = "https://devnet.irys.xyz"; - })(BundlrUrl = Constants2.BundlrUrl || (Constants2.BundlrUrl = {})); - let DasApiUrl; - ((DasApiUrl2) => { - DasApiUrl2["dev"] = "https://devnet.helius-rpc.com/?api-key=15319bf4-5b40-4958-ac8d-6313aa55eb92,https://rpc-devnet.helius.xyz?api-key=9f70a843-3274-4ffd-a0a9-323f8b7c0639"; - })(DasApiUrl = Constants2.DasApiUrl || (Constants2.DasApiUrl = {})); - let NftstorageApiKey; - ((NftstorageApiKey2) => { - NftstorageApiKey2["dev"] = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJkaWQ6ZXRocjoweERGMjcyN2VkODZhRGU1RTMyZDZDZEJlODc0YzRFNDlEODY1OWZmOEMiLCJpc3MiOiJuZnQtc3RvcmFnZSIsImlhdCI6MTYyMDI2NDk0MzcwNiwibmFtZSI6ImRlbW8ifQ.d4J70mikxRB8a5vwNu6SO5HDA8JaueuseAj7Q_ytMCE"; - })(NftstorageApiKey = Constants2.NftstorageApiKey || (Constants2.NftstorageApiKey = {})); - Constants2.loadConfig = async () => { - Config = await import("@solana-suite/config/load"); - }; - Constants2.switchCluster = (param) => { - const { cluster: env, customClusterUrl: customClusterUrl2 } = param; - if (customClusterUrl2 && customClusterUrl2.length > 0) { - const index = Date.now() % customClusterUrl2.length; - return customClusterUrl2[index]; - } - switch (env) { - case "mainnet-beta" /* prd */: - return "https://api.mainnet-beta.solana.com" /* prd */; - case "mainnet-beta-metaplex" /* prdMetaplex */: - return "https://api.metaplex.solana.com" /* prdMetaplex */; - case "testnet" /* test */: - return "https://api.testnet.solana.com" /* test */; - case "devnet" /* dev */: - return "https://api.devnet.solana.com" /* dev */; - default: - return "http://api.devnet.solana.com" /* localhost */; - } - }; - Constants2.switchBundlr = (env) => { - switch (env) { - case "mainnet-beta" /* prd */: { - const urls = "https://node1.irys.xyz,https://node2.irys.xyz" /* prd */.split(","); - const index = Date.now() % urls.length; - return urls[index]; - } - default: { - return "https://devnet.irys.xyz" /* dev */; - } - } - }; - Constants2.switchDasApi = (env) => { - switch (env) { - case "mainnet-beta" /* prd */: { - if (Constants2.dasApiUrl.length < 1) { - throw Error(Constants2.WarnningMessage.DAS_API_URL); - } - const urls = "https://node1.irys.xyz,https://node2.irys.xyz" /* prd */.split(","); - const index = Date.now() % urls.length; - return urls[index]; - } - default: { - const urls = "https://devnet.helius-rpc.com/?api-key=15319bf4-5b40-4958-ac8d-6313aa55eb92,https://rpc-devnet.helius.xyz?api-key=9f70a843-3274-4ffd-a0a9-323f8b7c0639" /* dev */.split(","); - const index = Date.now() % urls.length; - return urls[index]; - } - } - }; - Constants2.switchNftStorage = (env) => { - switch (env) { - case "mainnet-beta" /* prd */: - if (!Constants2.nftStorageApiKey) { - throw Error(Constants2.WarnningMessage.NFT_STORAGE_API_KEY); - } - return Constants2.nftStorageApiKey; - default: { - return "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJkaWQ6ZXRocjoweERGMjcyN2VkODZhRGU1RTMyZDZDZEJlODc0YzRFNDlEODY1OWZmOEMiLCJpc3MiOiJuZnQtc3RvcmFnZSIsImlhdCI6MTYyMDI2NDk0MzcwNiwibmFtZSI6ImRlbW8ifQ.d4J70mikxRB8a5vwNu6SO5HDA8JaueuseAj7Q_ytMCE" /* dev */; - } - } - }; - Constants2.WRAPPED_TOKEN_PROGRAM_ID = new PublicKey( - "So11111111111111111111111111111111111111112" - ); - Constants2.MEMO_PROGRAM_ID = new PublicKey( - "Memo1UhkJRfHyvLMcVucJwxXeuD728EqVDDwQDxFMNo" - ); - Constants2.METAPLEX_PROGRAM_ID = new PublicKey( - "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s" - ); - Constants2.COMMITMENT = "confirmed"; - Constants2.NFT_STORAGE_GATEWAY_URL = "https://ipfs.io/ipfs"; - Constants2.IRYS_GATEWAY_URL = "https://gateway.irys.xyz"; - Constants2.BUNDLR_NETWORK_URL = (0, Constants2.switchBundlr)(Config.cluster.type); - Constants2.DAS_API_URL = (0, Constants2.switchDasApi)(Config.cluster.type); - Constants2.NFT_STORAGE_API_KEY = (0, Constants2.switchNftStorage)(Config.cluster.type); - Constants2.EXPLORER_SOLSCAN_URL = "https://solscan.io"; - Constants2.EXPLORER_SOLANAFM_URL = "https://solana.fm"; - Constants2.EXPLORER_XRAY_URL = "https://xray.helius.xyz"; -})(Constants || (Constants = {})); -console.log(Constants.WarnningMessage.ANNOUNCE); - -// ../transaction-builder/src/batch.ts -import { - sendAndConfirmTransaction as sendAndConfirmTransaction2, - Transaction as Transaction2 -} from "@solana/web3.js"; - -// ../types/src/global/index.ts -var Explorer = /* @__PURE__ */ ((Explorer2) => { - Explorer2["Solscan"] = "solscan"; - Explorer2["SolanaFM"] = "solanafm"; - Explorer2["Xray"] = "xray"; - return Explorer2; -})(Explorer || {}); - -// ../global/src/index.ts -import { Keypair, LAMPORTS_PER_SOL, PublicKey as PublicKey4 } from "@solana/web3.js"; - -// ../account/src/associated.ts -import { - ASSOCIATED_TOKEN_PROGRAM_ID, - createAssociatedTokenAccountInstruction, - getAccount, - getAssociatedTokenAddressSync, - TOKEN_PROGRAM_ID, - TokenAccountNotFoundError, - TokenInvalidAccountOwnerError -} from "@solana/spl-token"; - -// ../account/src/keypair.ts -import { Keypair as Original, PublicKey as PublicKey2 } from "@solana/web3.js"; -import bs from "bs58"; -var Account; -((Account5) => { - class Keypair4 { - secret; - pubkey; - constructor(params) { - if (!params.pubkey) { - const keypair = params.secret.toKeypair(); - this.pubkey = keypair.publicKey.toString(); - } else { - this.pubkey = params.pubkey; - } - this.secret = params.secret; - } - toPublicKey() { - return new PublicKey2(this.pubkey); - } - toKeypair() { - const decoded = bs.decode(this.secret); - return Original.fromSecretKey(decoded); - } - static isPubkey = (value) => /^[0-9a-zA-Z]{32,44}$/.test(value); - static isSecret = (value) => /^[0-9a-zA-Z]{87,88}$/.test(value); - static create = () => { - const keypair = Original.generate(); - return new Keypair4({ - pubkey: keypair.publicKey.toString(), - secret: bs.encode(keypair.secretKey) - }); - }; - static toKeyPair = (keypair) => { - return new Keypair4({ - pubkey: keypair.publicKey.toString(), - secret: bs.encode(keypair.secretKey) - }); - }; - } - Account5.Keypair = Keypair4; -})(Account || (Account = {})); - -// ../account/src/associated.ts -var Account2; -((Account5) => { - let Associated; - ((Associated2) => { - const RETRY_OVER_LIMIT = 10; - const RETRY_SLEEP_TIME = 3; - const get = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const res = await (0, Associated2.makeOrCreateInstruction)( - mint, - owner, - new Account.Keypair({ secret: feePayer }).pubkey, - allowOwnerOffCurve - ); - if (!res.inst) { - return res.tokenAccount; - } - return new TransactionBuilder.Common( - [res.inst], - [], - feePayer.toKeypair(), - res.tokenAccount - ); - }; - Associated2.retryGetOrCreate = async (mint, owner, feePayer) => { - let counter = 1; - while (counter < RETRY_OVER_LIMIT) { - try { - const inst = await get(mint, owner, feePayer, true); - if (inst && typeof inst === "string") { - debugLog("# associatedTokenAccount: ", inst); - return inst; - } else if (inst instanceof TransactionBuilder.Common) { - (await inst.submit()).map( - async (ok) => { - await Node.confirmedSig(ok); - return inst.data; - }, - (err) => { - debugLog("# Error submit retryGetOrCreate: ", err); - throw err; - } - ); - } - } catch (e) { - debugLog(`# retry: ${counter} create token account: `, e); - debugLog(`# mint: ${mint}, owner: ${owner}, feePayer: ${feePayer}`); - } - await sleep(RETRY_SLEEP_TIME); - counter++; - } - throw Error(`retry action is over limit ${RETRY_OVER_LIMIT}`); - }; - Associated2.makeOrCreateInstruction = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const associatedTokenAccount = getAssociatedTokenAddressSync( - mint.toPublicKey(), - owner.toPublicKey(), - allowOwnerOffCurve, - TOKEN_PROGRAM_ID, - ASSOCIATED_TOKEN_PROGRAM_ID - ); - debugLog("# associatedTokenAccount: ", associatedTokenAccount.toString()); - try { - await getAccount( - Node.getConnection(), - associatedTokenAccount, - Node.getConnection().commitment, - TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst: void 0 - }; - } catch (error) { - if (!(error instanceof TokenAccountNotFoundError) && !(error instanceof TokenInvalidAccountOwnerError)) { - throw Error("Unexpected error"); - } - const payer = !feePayer ? owner : feePayer; - const inst = createAssociatedTokenAccountInstruction( - payer.toPublicKey(), - associatedTokenAccount, - owner.toPublicKey(), - mint.toPublicKey(), - TOKEN_PROGRAM_ID, - ASSOCIATED_TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst - }; - } - }; - })(Associated = Account5.Associated || (Account5.Associated = {})); -})(Account2 || (Account2 = {})); - -// ../account/src/pda.ts -import { PublicKey as PublicKey3 } from "@solana/web3.js"; -import { PROGRAM_ID } from "@metaplex-foundation/mpl-token-metadata"; -import { MPL_BUBBLEGUM_PROGRAM_ID } from "@metaplex-foundation/mpl-bubblegum"; -import BN from "bn.js"; -var Account3; -((Account5) => { - let Pda; - ((Pda2) => { - Pda2.getMetadata = (address) => { - const [publicKey] = PublicKey3.findProgramAddressSync( - [ - Buffer.from("metadata"), - PROGRAM_ID.toBuffer(), - address.toPublicKey().toBuffer() - ], - PROGRAM_ID - ); - return publicKey; - }; - Pda2.getMasterEdition = (address) => { - const [publicKey] = PublicKey3.findProgramAddressSync( - [ - Buffer.from("metadata"), - PROGRAM_ID.toBuffer(), - address.toPublicKey().toBuffer(), - Buffer.from("edition") - ], - PROGRAM_ID - ); - return publicKey; - }; - Pda2.getTreeAuthority = (address) => { - const [publicKey] = PublicKey3.findProgramAddressSync( - [address.toPublicKey().toBuffer()], - MPL_BUBBLEGUM_PROGRAM_ID.toPublicKey() - ); - return publicKey; - }; - Pda2.getBgumSigner = () => { - const [publicKey] = PublicKey3.findProgramAddressSync( - [Buffer.from("collection_cpi", "utf8")], - MPL_BUBBLEGUM_PROGRAM_ID.toPublicKey() - ); - return publicKey; - }; - Pda2.getAssetId = (address, leafIndex) => { - const node = new BN.BN(leafIndex); - const [assetId] = PublicKey3.findProgramAddressSync( - [ - Buffer.from("asset", "utf8"), - address.toPublicKey().toBuffer(), - Uint8Array.from(node.toArray("le", 8)) - ], - MPL_BUBBLEGUM_PROGRAM_ID.toPublicKey() - ); - return assetId.toString(); - }; - })(Pda = Account5.Pda || (Account5.Pda = {})); -})(Account3 || (Account3 = {})); - -// ../account/src/index.ts -var Account4 = { - ...Account2, - ...Account, - ...Account3 -}; - -// ../global/src/index.ts -import { BigNumber } from "bignumber.js"; -import bs2 from "bs58"; -String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, options = {}) { - const endPointUrl = Node.getConnection().rpcEndpoint; - debugLog("# toExplorerUrl rpcEndpoint:", endPointUrl); - let cluster = ""; - if (endPointUrl === Constants.EndPointUrl.prd) { - cluster = Constants.Cluster.prd; - } else if (endPointUrl === Constants.EndPointUrl.test) { - cluster = Constants.Cluster.test; - } else if (endPointUrl === Constants.EndPointUrl.dev) { - cluster = Constants.Cluster.dev; - } else { - cluster = Constants.Cluster.dev; - } - const addressOrSignature = this.toString(); - let url = ""; - if (options.replacePath) { - if (explorer === "solanafm" /* SolanaFM */) { - url = `${Constants.EXPLORER_SOLANAFM_URL}/${options.replacePath}/${addressOrSignature}?cluster=${cluster}`; - } else if (explorer === "xray" /* Xray */) { - url = `${Constants.EXPLORER_XRAY_URL}/${options.replacePath}/${addressOrSignature}?network=${cluster}`; - } else { - url = `${Constants.EXPLORER_SOLSCAN_URL}/${options.replacePath}/${addressOrSignature}?cluster=${cluster}`; - } - return url; - } - if (Account4.Keypair.isPubkey(addressOrSignature)) { - if (explorer === "solanafm" /* SolanaFM */) { - url = `${Constants.EXPLORER_SOLANAFM_URL}/address/${addressOrSignature}?cluster=${cluster}`; - } else if (explorer === "xray" /* Xray */) { - url = `${Constants.EXPLORER_XRAY_URL}/account/${addressOrSignature}?network=${cluster}`; - } else { - url = `${Constants.EXPLORER_SOLSCAN_URL}/account/${addressOrSignature}?cluster=${cluster}`; - } - } else { - if (explorer === "solanafm" /* SolanaFM */) { - url = `${Constants.EXPLORER_SOLANAFM_URL}/tx/${addressOrSignature}?cluster=${cluster}`; - } else if (explorer === "xray" /* Xray */) { - url = `${Constants.EXPLORER_XRAY_URL}/tx/${addressOrSignature}?network=${cluster}`; - } else { - url = `${Constants.EXPLORER_SOLSCAN_URL}/tx/${addressOrSignature}?cluster=${cluster}`; - } - } - return url; -}; -String.prototype.toPublicKey = function() { - if (!Account4.Keypair.isPubkey(this.toString())) { - throw Error(`No match KeyPair.PubKey: ${this.toString()}`); - } - return new PublicKey4(this.toString()); -}; -String.prototype.toKeypair = function() { - if (!Account4.Keypair.isSecret(this.toString())) { - throw Error(`No match KeyPair.Secret: ${this.toString()}`); - } - const decoded = bs2.decode(this.toString()); - return Keypair.fromSecretKey(decoded); -}; -Number.prototype.toSol = function() { - return BigNumber(this).div(LAMPORTS_PER_SOL).toNumber(); -}; -Number.prototype.toLamports = function() { - return BigNumber(this).times(LAMPORTS_PER_SOL).toNumber(); -}; - -// ../node/src/index.ts -import { Connection } from "@solana/web3.js"; -var Node; -((Node2) => { - const setted = { - clusterUrl: "", - commitment: Constants.COMMITMENT, - customClusterUrl: [] - }; - Node2.getConnection = () => { - if (setted.customClusterUrl.length > 0) { - setted.clusterUrl = Constants.switchCluster({ - customClusterUrl: setted.customClusterUrl - }); - } else if (Constants.customClusterUrl.length > 0) { - setted.clusterUrl = Constants.switchCluster({ - customClusterUrl: Constants.customClusterUrl - }); - } else if (!setted.clusterUrl) { - setted.clusterUrl = Constants.switchCluster({ - cluster: Constants.currentCluster - }); - } - if (!setted.commitment) { - setted.commitment = Constants.COMMITMENT; - } - return new Connection(setted.clusterUrl, setted.commitment); - }; - Node2.changeConnection = (param) => { - setted.clusterUrl = ""; - setted.customClusterUrl = []; - setted.commitment = Constants.COMMITMENT; - const { cluster, commitment, customClusterUrl } = param; - if (commitment) { - setted.commitment = commitment; - debugLog("# Node change commitment: ", setted.commitment); - } - if (cluster) { - setted.clusterUrl = Constants.switchCluster({ cluster }); - debugLog("# Node change clusterUrl: ", setted.clusterUrl); - } - if (customClusterUrl) { - debugLog("# customClusterUrl: ", customClusterUrl); - setted.clusterUrl = Constants.switchCluster({ customClusterUrl }); - setted.customClusterUrl = customClusterUrl; - debugLog( - "# Node change cluster, custom cluster url: ", - setted.clusterUrl - ); - } - }; - Node2.confirmedSig = async (signature, commitment = Constants.COMMITMENT) => { - const connection = Node2.getConnection(); - const latestBlockhash = await connection.getLatestBlockhash(); - return await connection.confirmTransaction( - { - blockhash: latestBlockhash.blockhash, - lastValidBlockHeight: latestBlockhash.lastValidBlockHeight, - signature - }, - commitment - ).then(Result.ok).catch(Result.err); - }; -})(Node || (Node = {})); - -// ../transaction-builder/src/common.ts -import { - sendAndConfirmTransaction, - Transaction -} from "@solana/web3.js"; -var MAX_RETRIES = 3; -var TransactionBuilder2; -((TransactionBuilder7) => { - class Common2 { - static MAX_TRANSACTION_SIZE = 1232; - instructions; - signers; - feePayer; - data; - constructor(instructions, signers, feePayer, data) { - this.instructions = instructions; - this.signers = signers; - this.feePayer = feePayer; - this.data = data; - } - submit = async () => { - return Try(async () => { - if (!(this instanceof Common2)) { - throw Error("only Instruction object that can use this"); - } - const transaction = new Transaction(); - const blockhashObj = await Node.getConnection().getLatestBlockhash(); - transaction.lastValidBlockHeight = blockhashObj.lastValidBlockHeight; - transaction.recentBlockhash = blockhashObj.blockhash; - let finalSigners = this.signers; - if (this.feePayer) { - transaction.feePayer = this.feePayer.publicKey; - finalSigners = [this.feePayer, ...this.signers]; - } - this.instructions.forEach((inst) => transaction.add(inst)); - const options = { - maxRetries: MAX_RETRIES - }; - return await sendAndConfirmTransaction( - Node.getConnection(), - transaction, - finalSigners, - options - ); - }); - }; - } - TransactionBuilder7.Common = Common2; -})(TransactionBuilder2 || (TransactionBuilder2 = {})); - -// ../transaction-builder/src/batch.ts -var TransactionBuilder3; -((TransactionBuilder7) => { - class Batch { - submit = async (arr) => { - return Try(async () => { - let i = 0; - for (const a of arr) { - if (!a.instructions && !a.signers) { - throw Error( - `only Instruction object that can use batchSubmit(). - Index: ${i}, Set value: ${JSON.stringify(a)}` - ); - } - i++; - } - const instructions = arr.flatMap((a) => a.instructions); - const signers = arr.flatMap((a) => a.signers); - const feePayers = arr.filter((a) => a.feePayer !== void 0); - let feePayer = signers[0]; - if (feePayers.length > 0 && feePayers[0].feePayer) { - feePayer = feePayers[0].feePayer; - } - const transaction = new Transaction2(); - let finalSigners = signers; - if (feePayer) { - transaction.feePayer = feePayer.publicKey; - finalSigners = [feePayer, ...signers]; - } - instructions.map((inst) => transaction.add(inst)); - const options = { - maxRetries: MAX_RETRIES - }; - return await sendAndConfirmTransaction2( - Node.getConnection(), - transaction, - finalSigners, - options - ); - }); - }; - } - TransactionBuilder7.Batch = Batch; -})(TransactionBuilder3 || (TransactionBuilder3 = {})); - -// ../transaction-builder/src/mint.ts -import { - sendAndConfirmTransaction as sendAndConfirmTransaction3, - Transaction as Transaction3 -} from "@solana/web3.js"; -var TransactionBuilder4; -((TransactionBuilder7) => { - class Mint { - instructions; - signers; - feePayer; - data; - constructor(instructions, signers, feePayer, data) { - this.instructions = instructions; - this.signers = signers; - this.data = data; - this.feePayer = feePayer; - } - submit = async () => { - return Try(async () => { - if (!(this instanceof Mint)) { - throw Error("only MintInstruction object that can use this"); - } - const transaction = new Transaction3(); - const blockhashObj = await Node.getConnection().getLatestBlockhash(); - transaction.lastValidBlockHeight = blockhashObj.lastValidBlockHeight; - transaction.recentBlockhash = blockhashObj.blockhash; - let finalSigners = this.signers; - if (this.feePayer) { - transaction.feePayer = this.feePayer.publicKey; - finalSigners = [this.feePayer, ...this.signers]; - } - this.instructions.forEach((inst) => transaction.add(inst)); - const options = { - maxRetries: MAX_RETRIES - }; - if (Node.getConnection().rpcEndpoint === Constants.EndPointUrl.prd) { - debugLog("# Change metaplex cluster on mainnet-beta"); - Node.changeConnection({ cluster: Constants.Cluster.prdMetaplex }); - } - return await sendAndConfirmTransaction3( - Node.getConnection(), - transaction, - finalSigners, - options - ); - }); - }; - } - TransactionBuilder7.Mint = Mint; -})(TransactionBuilder4 || (TransactionBuilder4 = {})); - -// ../transaction-builder/src/partial-sign.ts -import { - Transaction as Transaction4 -} from "@solana/web3.js"; -var TransactionBuilder5; -((TransactionBuilder7) => { - class PartialSign { - hexInstruction; - data; - canSubmit; - constructor(instructions, mint, canSubmit = false) { - this.hexInstruction = instructions; - this.data = mint; - this.canSubmit = canSubmit; - } - submit = async (feePayer) => { - return Try(async () => { - if (!(this instanceof PartialSign)) { - throw Error("only PartialSignInstruction object that can use this"); - } - const decode = Buffer.from(this.hexInstruction, "hex"); - const transactionFromJson = Transaction4.from(decode); - transactionFromJson.partialSign(feePayer.toKeypair()); - const options = { - maxRetries: MAX_RETRIES - }; - const wireTransaction = transactionFromJson.serialize(); - return await Node.getConnection().sendRawTransaction( - wireTransaction, - options - ); - }); - }; - } - TransactionBuilder7.PartialSign = PartialSign; -})(TransactionBuilder5 || (TransactionBuilder5 = {})); - -// ../transaction-builder/src/calculate-txsize.ts -var TransactionBuilder6; -((TransactionBuilder7) => { - const LOW_VALUE = 127; - const HIGH_VALUE = 16383; - const MAX_TRANSACTION_SIZE = 1232; - const compactHeader = (n) => n <= LOW_VALUE ? 1 : n <= HIGH_VALUE ? 2 : 3; - const compactArraySize = (n, size) => compactHeader(n) + n * size; - TransactionBuilder7.calculateTxSize = (transaction, feePayer) => { - const feePayerPk = [feePayer.toBase58()]; - const signers = new Set(feePayerPk); - const accounts = new Set(feePayerPk); - const ixsSize = transaction.instructions.reduce((acc, ix) => { - ix.keys.forEach(({ pubkey, isSigner }) => { - const pk = pubkey.toBase58(); - if (isSigner) - signers.add(pk); - accounts.add(pk); - }); - accounts.add(ix.programId.toBase58()); - const nIndexes = ix.keys.length; - const opaqueData = ix.data.length; - return acc + 1 + // PID index - compactArraySize(nIndexes, 1) + compactArraySize(opaqueData, 1); - }, 0); - return compactArraySize(signers.size, 64) + // signatures - 3 + // header - compactArraySize(accounts.size, 32) + // accounts - 32 + // blockhash - compactHeader(transaction.instructions.length) + // instructions - ixsSize; - }; - TransactionBuilder7.isOverTransactionSize = (transaction, feePayer) => { - return (0, TransactionBuilder7.calculateTxSize)(transaction, feePayer) > MAX_TRANSACTION_SIZE; - }; -})(TransactionBuilder6 || (TransactionBuilder6 = {})); - -// ../transaction-builder/src/index.ts -var TransactionBuilder = { - ...TransactionBuilder3, - ...TransactionBuilder6, - ...TransactionBuilder4, - ...TransactionBuilder2, - ...TransactionBuilder5 -}; - -// src/result.ts -var AbstractResult = class { - unwrap(ok, err) { - const r = this._chain( - (value) => Result.ok(ok ? ok(value) : value), - (error) => err ? Result.ok(err(error)) : Result.err(error) - ); - if (r.isErr) { - throw r.error; - } - return r.value; - } - map(ok, err) { - return this._chain( - (value) => Result.ok(ok(value)), - (error) => Result.err(err ? err(error) : error) - ); - } - chain(ok, err) { - return this._chain(ok, err || ((error) => Result.err(error))); - } - match(ok, err) { - this._chain( - (value) => Result.ok(ok(value)), - (error) => Result.err(err(error)) - ); - } - /// single TransactionBuilder //// - /* eslint-disable @typescript-eslint/no-explicit-any */ - async submit(feePayer) { - const res = this.map( - async (ok) => { - debugLog("# result single submit: ", ok); - if (feePayer) { - const obj = ok; - return await obj.submit(feePayer); - } else { - const obj = ok; - return await obj.submit(); - } - }, - (err) => { - return err; - } - ); - if (res.isErr) { - return Result.err(res.error); - } - return res.value; - } -}; -Array.prototype.submit = async function(feePayer) { - if (feePayer) { - let i = 1; - for await (const obj of this) { - if (obj.isErr) { - return obj; - } else if (obj.value.canSubmit) { - debugLog("# Result batch canSubmit"); - const sig = await obj.submit(feePayer); - if (sig.isErr) { - return sig; - } - await Node.confirmedSig(sig.value); - } else { - debugLog("# Result batch other than canSubmit"); - if (this.length == i) { - return obj.submit(feePayer); - } - obj.submit(feePayer); - } - i++; - } - } else { - const instructions = []; - for (const obj of this) { - if (obj.isErr) { - return obj; - } else if (obj.isOk) { - instructions.push(obj.value); - } else { - return Result.err(Error("Only Array Instruction object")); - } - } - debugLog("# Result batch submit: ", instructions); - return new TransactionBuilder.Batch().submit(instructions); - } -}; -var InternalOk = class extends AbstractResult { - constructor(value) { - super(); - this.value = value; - } - isOk = true; - isErr = false; - /* eslint-disable @typescript-eslint/no-unused-vars */ - _chain(ok, _err) { - return ok(this.value); - } -}; -var InternalErr = class extends AbstractResult { - constructor(error) { - super(); - this.error = error; - } - isOk = false; - isErr = true; - _chain(_ok, err) { - return err(this.error); - } -}; -var Result; -((Result7) => { - function ok(value) { - return new InternalOk(value); - } - Result7.ok = ok; - function err(error) { - return new InternalErr(error || Error()); - } - Result7.err = err; - function all(obj) { - if (Array.isArray(obj)) { - const resArr = []; - for (const item of obj) { - if (item.isErr) { - return item; - } - resArr.push(item.value); - } - return Result7.ok(resArr); - } - const res = {}; - const keys = Object.keys(obj); - for (const key of keys) { - const item = obj[key]; - if (item.isErr) { - return item; - } - res[key] = item.value; - } - return Result7.ok(res); - } - Result7.all = all; -})(Result || (Result = {})); - -// src/shared.ts -var bufferToArray = (buffer) => { - const nums = []; - for (const byte of buffer) { - nums.push(buffer[byte]); - } - return nums; -}; -var overwriteObject = (object, targets) => { - const that = object; - targets.forEach((target) => { - delete that[target.existsKey]; - that[target.will.key] = target.will.value; - }); - return that; -}; -var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { - if (Constants.isDebugging === "true" || process.env.DEBUG === "true") { - console.log("[DEBUG]", data1, data2, data3, data4); - } -}; -var sleep = async (sec) => { - return new Promise((r) => setTimeout(r, sec * 1e3)); -}; -var isBrowser = () => { - return typeof window !== "undefined" && typeof window.document !== "undefined"; -}; -var isNode = () => { - return typeof process !== "undefined" && process.versions != null && process.versions.node != null; -}; -var isPromise = (obj) => { - return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; -}; -function Try(input, finallyInput) { - try { - const v = input(); - if (isPromise(v)) { - return v.then( - (x) => Result.ok(x), - (err) => Result.err(err) - ); - } else { - return Result.ok(v); - } - } catch (e) { - if (e instanceof Error) { - return Result.err(e); - } - return Result.err(Error(e)); - } finally { - if (finallyInput) { - debugLog("# finally input:", finallyInput); - finallyInput(); - } - } -} -var convertTimestampToDateTime = (created_at) => { - if (created_at) { - return new Date(created_at * 1e3); - } - return; -}; -var unixTimestamp = () => { - return Math.floor((/* @__PURE__ */ new Date()).getTime() / 1e3); -}; - -// ../converter/src/collection.ts -var Converter; -((Converter15) => { - let Collection; - ((Collection2) => { - Collection2.intoInfra = (input) => { - if (!input) { - return null; - } - return { - key: input.toPublicKey(), - verified: false - }; - }; - Collection2.intoUser = (output) => { - if (!output) { - return void 0; - } - return { - address: output.key.toString(), - verified: output.verified - }; - }; - })(Collection = Converter15.Collection || (Converter15.Collection = {})); - let CollectionMint; - ((CollectionMint2) => { - CollectionMint2.intoUser = (output) => { - const res = output.find((value) => { - if (value.group_key === "collection") { - return value.group_value; - } - }); - return res ? res.group_value : ""; - }; - })(CollectionMint = Converter15.CollectionMint || (Converter15.CollectionMint = {})); -})(Converter || (Converter = {})); - -// ../converter/src/creators.ts -var Converter2; -((Converter15) => { - let Creators; - ((Creators2) => { - Creators2.intoInfra = (input) => { - if (!input) { - return null; - } - return input.map((data) => { - return { - address: data.address.toPublicKey(), - share: data.share, - verified: false - }; - }); - }; - Creators2.intoCompressedNftInfra = (input) => { - if (!input) { - return []; - } - return input.map((data) => { - return { - address: data.address.toPublicKey(), - share: data.share, - verified: false - }; - }); - }; - Creators2.intoUser = (output) => { - if (!output) { - return void 0; - } - return output.map((data) => { - return { - address: data.address.toString(), - share: data.share, - verified: data.verified - }; - }); - }; - })(Creators = Converter15.Creators || (Converter15.Creators = {})); -})(Converter2 || (Converter2 = {})); - -// ../converter/src/compressed-nft-metadata.ts -import { - TokenProgramVersion, - TokenStandard -} from "mpl-bubblegum-instruction"; -var Converter3; -((Converter15) => { - let CompressedNftMetadata; - ((CompressedNftMetadata2) => { - CompressedNftMetadata2.intoInfra = (input, uri, sellerFeeBasisPoints) => { - return { - name: input.name, - symbol: input.symbol, - uri, - sellerFeeBasisPoints, - creators: Converter2.Creators.intoCompressedNftInfra(input.creators), - collection: Converter.Collection.intoInfra(input.collection), - uses: input.uses || null, - primarySaleHappened: false, - isMutable: input.isMutable ?? false, - editionNonce: 0, - tokenStandard: TokenStandard.NonFungible, - tokenProgramVersion: TokenProgramVersion.Original - }; - }; - })(CompressedNftMetadata = Converter15.CompressedNftMetadata || (Converter15.CompressedNftMetadata = {})); -})(Converter3 || (Converter3 = {})); - -// ../converter/src/royalty.ts -var Converter4; -((Converter15) => { - let Royalty; - ((Royalty2) => { - Royalty2.THRESHOLD = 100; - Royalty2.intoInfra = (percentage) => { - return percentage * Royalty2.THRESHOLD; - }; - Royalty2.intoUser = (percentage) => { - return percentage * Royalty2.THRESHOLD; - }; - })(Royalty = Converter15.Royalty || (Converter15.Royalty = {})); -})(Converter4 || (Converter4 = {})); - -// ../converter/src/nft.ts -var Converter5; -((Converter15) => { - let Nft; - ((Nft2) => { - Nft2.intoUser = (output) => { - return { - mint: output.onchain.id.toString(), - collectionMint: Converter.CollectionMint.intoUser( - output.onchain.grouping - ), - authorities: output.onchain.authorities, - royalty: Converter4.Royalty.intoUser(output.onchain.royalty.percent), - name: output.onchain.content.metadata.name, - symbol: output.onchain.content.metadata.symbol, - uri: output.onchain.content.json_uri, - creators: Converter2.Creators.intoUser(output.onchain.creators), - treeAddress: output.onchain.compression.tree, - isCompressed: output.onchain.compression.compressed, - isMutable: output.onchain.mutable, - isBurn: output.onchain.burnt, - editionNonce: output.onchain.supply.edition_nonce, - primarySaleHappened: output.onchain.royalty.primary_sale_happened, - dateTime: convertTimestampToDateTime(output.offchain.created_at), - offchain: output.offchain - }; - }; - })(Nft = Converter15.Nft || (Converter15.Nft = {})); -})(Converter5 || (Converter5 = {})); - -// ../converter/src/memo.ts -var Converter6; -((Converter15) => { - let Memo; - ((Memo2) => { - Memo2.intoUserSide = (output, meta, outputTransfer, mappingTokenAccount) => { - const history = {}; - if (outputTransfer && outputTransfer.program !== "") { - if (mappingTokenAccount && outputTransfer.program === "spl-token") { - const foundSource = mappingTokenAccount.find( - (m) => m.account === outputTransfer.parsed.info.source - ); - const foundDest = mappingTokenAccount.find( - (m) => m.account === outputTransfer.parsed.info.destination - ); - history.mint = outputTransfer.parsed.info.mint; - foundSource && (history.source = foundSource.owner); - foundDest && (history.destination = foundDest.owner); - } else { - history.source = outputTransfer.parsed.info.source; - history.destination = outputTransfer.parsed.info.destination; - } - } - history.memo = output.parsed; - history.type = output.program; - history.dateTime = convertTimestampToDateTime(meta.blockTime); - history.sig = meta.transaction.signatures[0]; - history.innerInstruction = false; - if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { - history.innerInstruction = true; - } - return history; - }; - })(Memo = Converter15.Memo || (Converter15.Memo = {})); -})(Converter6 || (Converter6 = {})); - -// ../converter/src/mint.ts -var Converter7; -((Converter15) => { - let Mint; - ((Mint2) => { - Mint2.intoUserSide = (output, meta) => { - const history = {}; - history.mint = output.parsed.info.mint; - history.mintAuthority = output.parsed.info.mintAuthority; - history.tokenAmount = output.parsed.info.tokenAmount; - history.account = output.parsed.info.account; - history.type = output.program; - history.dateTime = convertTimestampToDateTime(meta.blockTime); - history.sig = meta.transaction.signatures[0]; - history.innerInstruction = false; - if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { - history.innerInstruction = true; - } - return history; - }; - })(Mint = Converter15.Mint || (Converter15.Mint = {})); -})(Converter7 || (Converter7 = {})); - -// ../converter/src/regular-nft-metadata.ts -var Converter8; -((Converter15) => { - let RegularNftMetadata; - ((RegularNftMetadata2) => { - RegularNftMetadata2.intoInfra = (input, uri, sellerFeeBasisPoints) => { - return { - name: input.name, - symbol: input.symbol, - uri, - sellerFeeBasisPoints, - creators: Converter2.Creators.intoInfra(input.creators), - collection: Converter.Collection.intoInfra(input.collection), - uses: input.uses || null - }; - }; - })(RegularNftMetadata = Converter15.RegularNftMetadata || (Converter15.RegularNftMetadata = {})); -})(Converter8 || (Converter8 = {})); - -// ../converter/src/properties.ts -var Converter9; -((Converter15) => { - let Properties; - ((Properties2) => { - Properties2.intoInfra = async (input, callbackFunc, storageType, feePayer) => { - if (!input || !input.files) { - return {}; - } - const files = await Promise.all( - input.files.map(async (file) => { - if (!file.filePath) { - return {}; - } - const res = await callbackFunc(file.filePath, storageType, feePayer); - if (res.isErr) { - throw Error(res.error.message); - } - return overwriteObject(file, [ - { - existsKey: "filePath", - will: { key: "uri", value: res.value } - } - ]); - }) - ); - return { ...input, files }; - }; - })(Properties = Converter15.Properties || (Converter15.Properties = {})); -})(Converter9 || (Converter9 = {})); - -// ../converter/src/uses.ts -var Converter10; -((Converter15) => { - let Uses; - ((Uses2) => { - Uses2.intoUserSide = (output) => { - if (!output) { - return void 0; - } - return output; - }; - })(Uses = Converter15.Uses || (Converter15.Uses = {})); -})(Converter10 || (Converter10 = {})); - -// ../converter/src/token-metadata.ts -var Converter11; -((Converter15) => { - let TokenMetadata; - ((TokenMetadata2) => { - TokenMetadata2.intoInfra = (input, uri, sellerFeeBasisPoints) => { - return { - name: input.name, - symbol: input.symbol, - uri, - sellerFeeBasisPoints, - creators: Converter2.Creators.intoInfra(input.creators), - collection: null, - uses: input.uses || null - }; - }; - TokenMetadata2.intoUser = (output, tokenAmount) => { - return { - mint: output.onchain.mint.toString(), - royalty: output.onchain.data.sellerFeeBasisPoints, - name: (0, TokenMetadata2.deleteNullStrings)(output.onchain.data.name), - symbol: (0, TokenMetadata2.deleteNullStrings)(output.onchain.data.symbol), - tokenAmount, - uri: (0, TokenMetadata2.deleteNullStrings)(output.onchain.data.uri), - creators: Converter2.Creators.intoUser(output.onchain.data.creators), - uses: Converter10.Uses.intoUserSide(output.onchain.uses), - dateTime: convertTimestampToDateTime(output.offchain.created_at), - offchain: output.offchain - }; - }; - TokenMetadata2.deleteNullStrings = (str) => { - return str.replace(/\0/g, ""); - }; - })(TokenMetadata = Converter15.TokenMetadata || (Converter15.TokenMetadata = {})); -})(Converter11 || (Converter11 = {})); - -// ../converter/src/transfer-checked.ts -var Converter12; -((Converter15) => { - let TransferChecked; - ((TransferChecked2) => { - TransferChecked2.intoUserSide = (output, meta, mappingTokenAccount) => { - const history = {}; - if (mappingTokenAccount) { - const foundSource = mappingTokenAccount.find( - (m) => m.account === output.parsed.info.source - ); - const foundDest = mappingTokenAccount.find( - (m) => m.account === output.parsed.info.destination - ); - foundSource && (history.source = foundSource.owner); - foundDest && (history.destination = foundDest.owner); - } - history.tokenAmount = output.parsed.info.tokenAmount; - history.mint = output.parsed.info.mint; - history.multisigAuthority = output.parsed.info.multisigAuthority; - history.signers = output.parsed.info.signers; - history.type = output.program; - history.dateTime = convertTimestampToDateTime(meta.blockTime); - history.sig = meta.transaction.signatures[0]; - history.innerInstruction = false; - if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { - history.innerInstruction = true; - } - return history; - }; - })(TransferChecked = Converter15.TransferChecked || (Converter15.TransferChecked = {})); -})(Converter12 || (Converter12 = {})); - -// ../converter/src/transfer.ts -var Converter13; -((Converter15) => { - let Transfer; - ((Transfer2) => { - Transfer2.intoUserSide = (output, meta) => { - const history = {}; - if (!output.parsed.info.destination || !output.parsed.info.lamports) { - return; - } - history.source = output.parsed.info.source; - history.destination = output.parsed.info.destination; - history.sol = output.parsed.info.lamports?.toSol().toString(); - history.type = output.program; - history.dateTime = convertTimestampToDateTime(meta.blockTime); - history.sig = meta.transaction.signatures[0]; - history.innerInstruction = false; - if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { - history.innerInstruction = true; - } - return history; - }; - })(Transfer = Converter15.Transfer || (Converter15.Transfer = {})); -})(Converter13 || (Converter13 = {})); - -// ../converter/src/index.ts -var Converter14 = { - ...Converter3, - ...Converter, - ...Converter2, - ...Converter5, - ...Converter6, - ...Converter7, - ...Converter8, - ...Converter9, - ...Converter4, - ...Converter11, - ...Converter12, - ...Converter13, - ...Converter10 -}; - -// ../validator/src/index.ts -var Validator; -((Validator2) => { - let Message; - ((Message2) => { - Message2.SUCCESS = "success"; - Message2.SMALL_NUMBER = "too small"; - Message2.BIG_NUMBER = "too big"; - Message2.LONG_LENGTH = "too long"; - Message2.EMPTY = "invalid empty value"; - Message2.INVALID_URL = "invalid url"; - Message2.ONLY_NODE_JS = "`string` type is only Node.js"; - })(Message = Validator2.Message || (Validator2.Message = {})); - Validator2.NAME_LENGTH = 32; - Validator2.SYMBOL_LENGTH = 10; - Validator2.URL_LENGTH = 200; - Validator2.ROYALTY_MAX = 100; - Validator2.SELLER_FEE_BASIS_POINTS_MAX = 1e4; - Validator2.ROYALTY_MIN = 0; - Validator2.isRoyalty = (royalty) => { - return Try(() => { - const key = "royalty"; - if (royalty !== 0 && !royalty) { - throw createError(key, Message.EMPTY, royalty); - } - if (royalty < Validator2.ROYALTY_MIN) { - throw createError(key, Message.SMALL_NUMBER, royalty, { - threshold: Validator2.ROYALTY_MIN, - condition: "underMin" - }); - } else if (royalty > Validator2.ROYALTY_MAX) { - throw createError(key, Message.BIG_NUMBER, royalty, { - threshold: Validator2.ROYALTY_MAX, - condition: "overMax" - }); - } - return Message.SUCCESS; - }); - }; - Validator2.isSellerFeeBasisPoints = (royalty) => { - return Try(() => { - const key = "sellerFeeBasisPoints/seller_fee_basis_points"; - if (royalty !== 0 && !royalty) { - throw createError(key, Message.EMPTY, royalty); - } - if (royalty < Validator2.ROYALTY_MIN) { - throw createError(key, Message.SMALL_NUMBER, royalty, { - threshold: Validator2.ROYALTY_MIN, - condition: "underMin" - }); - } else if (royalty > Validator2.ROYALTY_MAX * Converter14.Royalty.THRESHOLD) { - throw createError(key, Message.BIG_NUMBER, royalty, { - threshold: Validator2.SELLER_FEE_BASIS_POINTS_MAX, - condition: "overMax" - }); - } - return Message.SUCCESS; - }); - }; - Validator2.isName = (name) => { - return Try(() => { - const key = "name"; - if (!name) { - throw createError(key, Message.EMPTY, name); - } - if (byteLength(name) > Validator2.NAME_LENGTH) { - throw createError(key, Message.LONG_LENGTH, name, { - threshold: Validator2.NAME_LENGTH, - condition: "overMax" - }); - } - return Message.SUCCESS; - }); - }; - Validator2.isSymbol = (symbol) => { - return Try(() => { - const key = "symbol"; - if (!symbol) { - throw createError(key, Message.EMPTY, symbol); - } - if (byteLength(symbol) > Validator2.SYMBOL_LENGTH) { - throw createError(key, Message.LONG_LENGTH, symbol, { - threshold: Validator2.SYMBOL_LENGTH, - condition: "overMax" - }); - } - return Message.SUCCESS; - }); - }; - Validator2.isImageUrl = (image) => isUriOrImage(image, "image"); - Validator2.checkAll = (metadata) => { - return Try(() => { - const keys = Object.keys(metadata); - const results = []; - keys.map((key) => { - let res; - switch (key) { - case "image": - if (key in metadata && metadata.image) { - res = (0, Validator2.isImageUrl)(metadata.image); - } - break; - case "royalty": - if (key in metadata && metadata.royalty) { - res = (0, Validator2.isRoyalty)(metadata.royalty); - } - break; - case "seller_fee_basis_points": - if (key in metadata && metadata.seller_fee_basis_points) { - res = (0, Validator2.isSellerFeeBasisPoints)(metadata.seller_fee_basis_points); - } - break; - case "sellerFeeBasisPoints": - if (key in metadata) { - res = (0, Validator2.isSellerFeeBasisPoints)(metadata.sellerFeeBasisPoints); - } - break; - case "name": - if (metadata.name) { - res = (0, Validator2.isName)(metadata.name); - } - break; - case "symbol": - if (metadata.symbol) { - res = (0, Validator2.isSymbol)(metadata.symbol); - } - break; - } - if (res && res.isErr) { - results.push(...res.error.details); - } - }); - if (results.length > 0) { - const message = "Caught in the validation errors. see information e.g: err.details"; - throw new ValidatorError(message, results); - } - return Message.SUCCESS; - }); - }; - const byteLength = (value) => { - const text = new TextEncoder(); - return text.encode(value).length; - }; - const createError = (key, message, actual, limit) => { - let error; - if (limit) { - error = new ValidatorError(message, [{ key, message, actual, limit }]); - } else { - error = new ValidatorError(message, [{ key, message, actual }]); - } - return error; - }; - const isUriOrImage = (imageOrUri, key) => { - return Try(() => { - if (!imageOrUri) { - throw createError(key, Message.EMPTY, imageOrUri); - } - if (byteLength(imageOrUri) > Validator2.URL_LENGTH) { - throw createError(key, Message.LONG_LENGTH, imageOrUri, { - threshold: Validator2.URL_LENGTH, - condition: "overMax" - }); - } - if (!/https?:\/\/[-_.!~*\\()a-zA-Z0-9;?:&=+,%#]+/g.test(imageOrUri)) { - throw createError(key, Message.INVALID_URL, imageOrUri); - } - return Message.SUCCESS; - }); - }; -})(Validator || (Validator = {})); -var ValidatorError = class extends Error { - details; - constructor(message, details) { - super(message); - this.details = details; - } -}; -export { - Account4 as Account, - Explorer, - Node, - Try, - Validator, - ValidatorError, - bufferToArray, - convertTimestampToDateTime, - debugLog, - isBrowser, - isNode, - isPromise, - overwriteObject, - sleep, - unixTimestamp -}; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9iYXRjaC50cyIsICIuLi8uLi90eXBlcy9zcmMvZ2xvYmFsL2luZGV4LnRzIiwgIi4uLy4uL2dsb2JhbC9zcmMvaW5kZXgudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvYXNzb2NpYXRlZC50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9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xkZXIge1xuICBleHBvcnQgY2xhc3MgQmF0Y2gge1xuICAgIHN1Ym1pdCA9IGFzeW5jIChcbiAgICAgIGFycjogQ29tbW9uLkNvbW1vbltdIHwgTWludC5NaW50W10sXG4gICAgKTogUHJvbWlzZTxSZXN1bHQ8VHJhbnNhY3Rpb25TaWduYXR1cmUsIEVycm9yPj4gPT4ge1xuICAgICAgcmV0dXJuIFRyeShhc3luYyAoKSA9PiB7XG4gICAgICAgIGxldCBpID0gMDtcbiAgICAgICAgZm9yIChjb25zdCBhIG9mIGFycikge1xuICAgICAgICAgIGlmICghYS5pbnN0cnVjdGlvbnMgJiYgIWEuc2lnbmVycykge1xuICAgICAgICAgICAgdGhyb3cgRXJyb3IoXG4gICAgICAgICAgICAgIGBvbmx5IEluc3RydWN0aW9uIG9iamVjdCB0aGF0IGNhbiB1c2UgYmF0Y2hTdWJtaXQoKS5cbiAgICAgICAgICAgIEluZGV4OiAke2l9LCBTZXQgdmFsdWU6ICR7SlNPTi5zdHJpbmdpZnkoYSl9YCxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIGkrKztcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IGluc3RydWN0aW9ucyA9IGFyci5mbGF0TWFwKChhKSA9PiBhLmluc3RydWN0aW9ucyk7XG4gICAgICAgIGNvbnN0IHNpZ25lcnMgPSBhcnIuZmxhdE1hcCgoYSkgPT4gYS5zaWduZXJzKTtcbiAgICAgICAgY29uc3QgZmVlUGF5ZXJzID0gYXJyLmZpbHRlcigoYSkgPT4gYS5mZWVQYXllciAhPT0gdW5kZWZpbmVkKTtcbiAgICAgICAgbGV0IGZlZVBheWVyID0gc2lnbmVyc1swXTtcbiAgICAgICAgaWYgKGZlZVBheWVycy5sZW5ndGggPiAwICYmIGZlZVBheWVyc1swXS5mZWVQYXllcikge1xuICAgICAgICAgIGZlZVBheWVyID0gZmVlUGF5ZXJzWzBdLmZlZVBheWVyO1xuICAgICAgICB9XG5cb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XBhaXIoeyBzZWNyZXQ6IGZlZVBheWVyIH0pLnB1YmtleSxcbiAgICAgICAgYWxsb3dPd25lck9mZkN1cnZlLFxuICAgICAgKTtcblxuICAgICAgaWYgKCFyZXMuaW5zdCkge1xuICAgICAgICByZXR1cm4gcmVzLnRva2VuQWNjb3VudDtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uPFB1YmtleT4oXG4gICAgICAgIFtyZXMuaW5zdF0sXG4gICAgICAgIFtdLFxuICAgICAgICBmZWVQYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgcmVzLnRva2VuQWNjb3VudCEsXG4gICAgICApO1xuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiBSZXRyeSBmdW5jdGlvbiBpZiBjcmVhdGUgbmV3IHRva2VuIGFjY291aW50XG4gICAgICpcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gbWludFxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBvd25lclxuICAgICAqIEBwYXJhbSB7U2VjcmV0fSBmZWVQYXllclxuICAgICAqIEByZXR1cm5zIFByb21pc2U8c3RyaW5nPlxuICAgICAqL1xuICAgIGV4cG9ydCBjb25zdCByZXRyeUdldE9yQ3JlYXRlID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyOiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxzdHJpbmc+ID0+IHtcbiAgICAgIGxldCBjb3VudGVyID0gMTtcbiAgICAgIHdoaWxlIChjb3VudGVyIDwgUkVUUllfT1ZFUl9MSU1JVCkge1xuICAgICAgICB0cnkge1xuICAgICAgICAgIGNvbnN0IGluc3QgPSBhd2FpdCBnZXQobWludCwgb3duZXIsIGZlZVBheWVyLCB0cnVlKTtcblxuICAgICAgICAgIGlmIChpbnN0ICYmIHR5cGVvZiBpbnN0ID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgaW5zdCk7XG4gICAgICAgICAgICByZXR1cm4gaW5zdDtcbiAgICAgICAgICB9IGVsc2UgaWYgKGluc3QgaW5zdGFuY2VvZiBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uKSB7XG4gICAgICAgICAgICAoYXdhaXQgaW5zdC5zdWJtaXQoKSkubWFwKFxuICAgICAgICAgICAgICBhc3luYyAob2s6IHN0cmluZykgPT4ge1xuICAgICAgICAgICAgICAgIGF3YWl0IE5vZGUuY29uZmlybWVkU2lnKG9rKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gaW5zdC5kYXRhO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAoZXJyOiBFcnJvcikgPT4ge1xuICAgICAgICAgICAgICAgIGRlYnVnTG9nKCcjIEVycm9yIHN1Ym1pdCByZXRyeUdldE9yQ3JlYXRlOiAnLCBlcnIpO1xuICAgICAgICAgICAgICAgIHRocm93IGVycjtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgZGVidWdMb2coYCMgcmV0cnk6ICR7Y291bnRlcn0gY3JlYXRlIHRva2VuIGFjY291bnQ6IGAsIGUpO1xuICAgICAgICAgIGRlYnVnTG9nKGAjIG1pbnQ6ICR7bWludH0sIG93bmVyOiAke293bmVyfSwgZmVlUGF5ZXI6ICR7ZmVlUGF5ZXJ9YCk7XG4gICAgICAgIH1cbiAgICAgICAgYXdhaXQgc2xlZXAoUkVUUllfU0xFRVBfVElNRSk7XG4gICAgICAgIGNvdW50ZXIrKztcbiAgICAgIH1cbiAgICAgIHRocm93IEVycm9yKGByZXRyeSBhY3Rpb24gaXMgb3ZlciBsaW1pdCAke1JFVFJZX09WRVJfTElNSVR9YCk7XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIFtNYWluIGxvZ2ljXUdldCBBc3NvY2lhdGVkIHRva2VuIEFjY291bnQuXG4gICAgICogaWYgbm90IGNyZWF0ZWQsIGNyZWF0ZSBuZXcgdG9rZW4gYWNjb3VpbnRcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBtaW50XG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAgICogQHBhcmFtIHtQdWJrZXl9IGZlZVBheWVyXG4gICAgICogQHJldHVybnMgUHJvbWlzZTxzdHJpbmc+XG4gICAgICovXG4gICAgZXhwb3J0IGNvbnN0IG1ha2VPckNyZWF0ZUluc3RydWN0aW9uID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyPzogUHVia2V5LFxuICAgICAgYWxsb3dPd25lck9mZkN1cnZlID0gZmFsc2UsXG4gICAgKTogUHJvbWlzZTx7XG4gICAgICB0b2tlbkFjY291bnQ6IHN0cmluZztcbiAgICAgIGluc3Q6IFRyYW5zYWN0aW9uSW5zdHJ1Y3Rpb24gfCB1bmRlZmluZWQ7XG4gICAgfT4gPT4ge1xuICAgICAgY29uc3QgYXNzb2NpYXRlZFRva2VuQWNjb3VudCA9IGdldEFzc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jKFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSxcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JR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sbGVjdGlvbiB7XG4gICAgZXhwb3J0IGNvbnN0IGludG9JbmZyYSA9IChcbiAgICAgIGlucHV0OiBPcHRpb248SW5wdXRDb2xsZWN0aW9uPiB8IHVuZGVmaW5lZCxcbiAgICApOiBPcHRpb248SW50ZXJuYWxDb2xsZWN0aW9uPiA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBudWxsO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4ge1xuICAgICAgICBrZXk6IGlucHV0LnRvUHVibGljS2V5KCksXG4gICAgICAgIHZlcmlmaWVkOiBmYWxzZSxcbiAgICAgIH07XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlciA9IChcbiAgICAgIG91dHB1dDogT3B0aW9uPEludGVybmFsQ29sbGVjdGlvbj4sXG4gICAgKTogQ29sbGVjdGlvblR5cGUgfCB1bmRlZmluZWQgPT4ge1xuICAgICAgaWYgKCFvdXRwdXQpIHtcbiAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIHtcbiAgICAgICAgYWRkcmVzczogb3V0cHV0LmtleS50b1N0cmluZygpLFxuICAgICAgICB2ZXJpZmllZDogb3V0cHV0LnZlcmlmaWVkLFxuICAgICAgfTtcbiAgICB9O1xuICB9XG5cbiAgZXhwb3J0IG5hbWVzcGFjZSBDb2xsZWN0aW9uTWludCB7XG4gICAgZXhwb3J0IGNvbnN0IGludG9Vc2VyID0gKG91dHB1dDogR3JvdXBpbmdbXSk6IFB1YmtleSA9PiB7XG4gICAgICBjb25zdCByZXMgPSBvdXRwdXQuZmluZCgodmFsdWUpID0+IHtcbiAgICAgICAgaWYgKHZhbHVlLmdyb3VwX2tleSA9PT0gJ2NvbGxlY3Rpb24nKSB7XG4gICAgICAgICAgcmV0dXJuIHZhbHVlLmdyb3VwX3ZhbHVlO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIHJldHVybiByZXM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zaXNfcG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJGZWVCYXNpc1BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0YWRhdGEubmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzeW1ib2wnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLnN5bWJvbCkge1xuICAgICAgICAgICAgICByZXMgPSBpc1N5bWJvbChtZXRhZGF0YS5zeW1ib2wpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHJlcyAmJiByZXMuaXNFcnIpIHtcbiAgICAgICAgICByZXN1bHRzLnB1c2goLi4ucmVzLmVycm9yLmRldGFpbHMpO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIGlmIChyZXN1bHRzLmxlbmd0aCA+IDApIHtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9XG4gICAgICAgICAgJ0NhdWdodCBpbiB0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/packages/shared/dist/index.d.mts b/packages/shared/dist/index.d.mts deleted file mode 100644 index c93bddc0c..000000000 --- a/packages/shared/dist/index.d.mts +++ /dev/null @@ -1,66 +0,0 @@ -import { PublicKey, Commitment } from '@solana/web3.js'; -export { A as Account, E as Explorer, g as ExplorerOptions, K as KeypairAccount, N as Node, O as OwnerInfo, P as Pubkey, R as Result, S as Secret, T as Try, V as Validator, f as ValidatorError, b as bufferToArray, e as convertTimestampToDateTime, d as debugLog, i as isBrowser, a as isNode, c as isPromise, o as overwriteObject, s as sleep, u as unixTimestamp } from './exports-8dfab8bf.js'; -import 'bn.js'; -import '@metaplex-foundation/mpl-token-metadata'; - -declare namespace Constants { - namespace WarnningMessage { - const NFT_STORAGE_API_KEY = "\n [YOU HAVE TO DO]\n --------------------------------------\n You need to update nftStorageApiKey define parameter in solana-suite.json.\n Can get api key from https://nft.storage/\n --------------------------------------\n "; - const DAS_API_URL = "\n [YOU HAVE TO DO]\n --------------------------------------\n You need to update dasApiUrl define parameter in solana-suite.json.\n can get api url from https://www.helius.dev/\n -------------------------------------- \n "; - const ANNOUNCE = "\n [DEPRECATED]\n --------------------------------------\n Account, Node, toExplorer, Pubkey, Secret have been moved to \n @solana-suite/utils \n ------------------------------------- \n "; - const calculateProbability: () => boolean; - } -} -declare namespace Constants { - const currentCluster: string; - const customClusterUrl: never[]; - const isDebugging: string; - const nftStorageApiKey: string; - const dasApiUrl: never[]; - enum Cluster { - prd = "mainnet-beta", - prdMetaplex = "mainnet-beta-metaplex", - dev = "devnet", - test = "testnet", - localhost = "localhost-devnet" - } - enum EndPointUrl { - prd = "https://api.mainnet-beta.solana.com", - prdMetaplex = "https://api.metaplex.solana.com", - dev = "https://api.devnet.solana.com", - test = "https://api.testnet.solana.com", - localhost = "http://api.devnet.solana.com" - } - enum BundlrUrl { - prd = "https://node1.irys.xyz,https://node2.irys.xyz", - dev = "https://devnet.irys.xyz" - } - enum DasApiUrl { - dev = "https://devnet.helius-rpc.com/?api-key=15319bf4-5b40-4958-ac8d-6313aa55eb92,https://rpc-devnet.helius.xyz?api-key=9f70a843-3274-4ffd-a0a9-323f8b7c0639" - } - enum NftstorageApiKey { - dev = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJkaWQ6ZXRocjoweERGMjcyN2VkODZhRGU1RTMyZDZDZEJlODc0YzRFNDlEODY1OWZmOEMiLCJpc3MiOiJuZnQtc3RvcmFnZSIsImlhdCI6MTYyMDI2NDk0MzcwNiwibmFtZSI6ImRlbW8ifQ.d4J70mikxRB8a5vwNu6SO5HDA8JaueuseAj7Q_ytMCE" - } - const loadConfig: () => Promise; - const switchCluster: (param: { - cluster?: string; - customClusterUrl?: string[]; - }) => string; - const switchBundlr: (env: string) => string; - const switchDasApi: (env: string) => string; - const switchNftStorage: (env: string) => string; - const WRAPPED_TOKEN_PROGRAM_ID: PublicKey; - const MEMO_PROGRAM_ID: PublicKey; - const METAPLEX_PROGRAM_ID: PublicKey; - const COMMITMENT: Commitment; - const NFT_STORAGE_GATEWAY_URL = "https://ipfs.io/ipfs"; - const IRYS_GATEWAY_URL = "https://gateway.irys.xyz"; - const BUNDLR_NETWORK_URL: string; - const DAS_API_URL: string; - const NFT_STORAGE_API_KEY: string; - const EXPLORER_SOLSCAN_URL = "https://solscan.io"; - const EXPLORER_SOLANAFM_URL = "https://solana.fm"; - const EXPLORER_XRAY_URL = "https://xray.helius.xyz"; -} - -export { Constants }; diff --git a/packages/shared/dist/index.d.ts b/packages/shared/dist/index.d.ts deleted file mode 100644 index c93bddc0c..000000000 --- a/packages/shared/dist/index.d.ts +++ /dev/null @@ -1,66 +0,0 @@ -import { PublicKey, Commitment } from '@solana/web3.js'; -export { A as Account, E as Explorer, g as ExplorerOptions, K as KeypairAccount, N as Node, O as OwnerInfo, P as Pubkey, R as Result, S as Secret, T as Try, V as Validator, f as ValidatorError, b as bufferToArray, e as convertTimestampToDateTime, d as debugLog, i as isBrowser, a as isNode, c as isPromise, o as overwriteObject, s as sleep, u as unixTimestamp } from './exports-8dfab8bf.js'; -import 'bn.js'; -import '@metaplex-foundation/mpl-token-metadata'; - -declare namespace Constants { - namespace WarnningMessage { - const NFT_STORAGE_API_KEY = "\n [YOU HAVE TO DO]\n --------------------------------------\n You need to update nftStorageApiKey define parameter in solana-suite.json.\n Can get api key from https://nft.storage/\n --------------------------------------\n "; - const DAS_API_URL = "\n [YOU HAVE TO DO]\n --------------------------------------\n You need to update dasApiUrl define parameter in solana-suite.json.\n can get api url from https://www.helius.dev/\n -------------------------------------- \n "; - const ANNOUNCE = "\n [DEPRECATED]\n --------------------------------------\n Account, Node, toExplorer, Pubkey, Secret have been moved to \n @solana-suite/utils \n ------------------------------------- \n "; - const calculateProbability: () => boolean; - } -} -declare namespace Constants { - const currentCluster: string; - const customClusterUrl: never[]; - const isDebugging: string; - const nftStorageApiKey: string; - const dasApiUrl: never[]; - enum Cluster { - prd = "mainnet-beta", - prdMetaplex = "mainnet-beta-metaplex", - dev = "devnet", - test = "testnet", - localhost = "localhost-devnet" - } - enum EndPointUrl { - prd = "https://api.mainnet-beta.solana.com", - prdMetaplex = "https://api.metaplex.solana.com", - dev = "https://api.devnet.solana.com", - test = "https://api.testnet.solana.com", - localhost = "http://api.devnet.solana.com" - } - enum BundlrUrl { - prd = "https://node1.irys.xyz,https://node2.irys.xyz", - dev = "https://devnet.irys.xyz" - } - enum DasApiUrl { - dev = "https://devnet.helius-rpc.com/?api-key=15319bf4-5b40-4958-ac8d-6313aa55eb92,https://rpc-devnet.helius.xyz?api-key=9f70a843-3274-4ffd-a0a9-323f8b7c0639" - } - enum NftstorageApiKey { - dev = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJkaWQ6ZXRocjoweERGMjcyN2VkODZhRGU1RTMyZDZDZEJlODc0YzRFNDlEODY1OWZmOEMiLCJpc3MiOiJuZnQtc3RvcmFnZSIsImlhdCI6MTYyMDI2NDk0MzcwNiwibmFtZSI6ImRlbW8ifQ.d4J70mikxRB8a5vwNu6SO5HDA8JaueuseAj7Q_ytMCE" - } - const loadConfig: () => Promise; - const switchCluster: (param: { - cluster?: string; - customClusterUrl?: string[]; - }) => string; - const switchBundlr: (env: string) => string; - const switchDasApi: (env: string) => string; - const switchNftStorage: (env: string) => string; - const WRAPPED_TOKEN_PROGRAM_ID: PublicKey; - const MEMO_PROGRAM_ID: PublicKey; - const METAPLEX_PROGRAM_ID: PublicKey; - const COMMITMENT: Commitment; - const NFT_STORAGE_GATEWAY_URL = "https://ipfs.io/ipfs"; - const IRYS_GATEWAY_URL = "https://gateway.irys.xyz"; - const BUNDLR_NETWORK_URL: string; - const DAS_API_URL: string; - const NFT_STORAGE_API_KEY: string; - const EXPLORER_SOLSCAN_URL = "https://solscan.io"; - const EXPLORER_SOLANAFM_URL = "https://solana.fm"; - const EXPLORER_XRAY_URL = "https://xray.helius.xyz"; -} - -export { Constants }; diff --git a/packages/shared/dist/index.js b/packages/shared/dist/index.js deleted file mode 100644 index 63e3eb695..000000000 --- a/packages/shared/dist/index.js +++ /dev/null @@ -1,1585 +0,0 @@ -"use strict"; -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var src_exports = {}; -__export(src_exports, { - Account: () => Account4, - Constants: () => Constants, - Explorer: () => Explorer, - Node: () => Node, - Result: () => Result, - Try: () => Try, - Validator: () => Validator, - ValidatorError: () => ValidatorError, - bufferToArray: () => bufferToArray, - convertTimestampToDateTime: () => convertTimestampToDateTime, - debugLog: () => debugLog, - isBrowser: () => isBrowser, - isNode: () => isNode, - isPromise: () => isPromise, - overwriteObject: () => overwriteObject, - sleep: () => sleep, - unixTimestamp: () => unixTimestamp -}); -module.exports = __toCommonJS(src_exports); - -// src/constants.ts -var import_web3 = require("@solana/web3.js"); -var import_load = __toESM(require("@solana-suite/config/load")); -var Config = import_load.default; -var Constants; -((Constants2) => { - let WarnningMessage; - ((WarnningMessage2) => { - const THRESHHOLD = 50; - let isDisplay = false; - WarnningMessage2.NFT_STORAGE_API_KEY = ` - [YOU HAVE TO DO] - -------------------------------------- - You need to update nftStorageApiKey define parameter in solana-suite.json. - Can get api key from https://nft.storage/ - -------------------------------------- - `; - WarnningMessage2.DAS_API_URL = ` - [YOU HAVE TO DO] - -------------------------------------- - You need to update dasApiUrl define parameter in solana-suite.json. - can get api url from https://www.helius.dev/ - -------------------------------------- - `; - WarnningMessage2.ANNOUNCE = ` - [DEPRECATED] - -------------------------------------- - Account, Node, toExplorer, Pubkey, Secret have been moved to - @solana-suite/utils - ------------------------------------- - `; - WarnningMessage2.calculateProbability = () => { - const randomValue = Math.random(); - const probability = 1 / THRESHHOLD; - if (!isDisplay && randomValue < probability) { - isDisplay = true; - return true; - } - return false; - }; - })(WarnningMessage = Constants2.WarnningMessage || (Constants2.WarnningMessage = {})); -})(Constants || (Constants = {})); -((Constants2) => { - Constants2.currentCluster = Config.cluster.type; - Constants2.customClusterUrl = Config.cluster.customClusterUrl; - Constants2.isDebugging = Config.debugging; - Constants2.nftStorageApiKey = Config.nftStorageApiKey; - Constants2.dasApiUrl = Config.dasApiUrl; - let Cluster; - ((Cluster2) => { - Cluster2["prd"] = "mainnet-beta"; - Cluster2["prdMetaplex"] = "mainnet-beta-metaplex"; - Cluster2["dev"] = "devnet"; - Cluster2["test"] = "testnet"; - Cluster2["localhost"] = "localhost-devnet"; - })(Cluster = Constants2.Cluster || (Constants2.Cluster = {})); - let EndPointUrl; - ((EndPointUrl2) => { - EndPointUrl2["prd"] = "https://api.mainnet-beta.solana.com"; - EndPointUrl2["prdMetaplex"] = "https://api.metaplex.solana.com"; - EndPointUrl2["dev"] = "https://api.devnet.solana.com"; - EndPointUrl2["test"] = "https://api.testnet.solana.com"; - EndPointUrl2["localhost"] = "http://api.devnet.solana.com"; - })(EndPointUrl = Constants2.EndPointUrl || (Constants2.EndPointUrl = {})); - let BundlrUrl; - ((BundlrUrl2) => { - BundlrUrl2["prd"] = "https://node1.irys.xyz,https://node2.irys.xyz"; - BundlrUrl2["dev"] = "https://devnet.irys.xyz"; - })(BundlrUrl = Constants2.BundlrUrl || (Constants2.BundlrUrl = {})); - let DasApiUrl; - ((DasApiUrl2) => { - DasApiUrl2["dev"] = "https://devnet.helius-rpc.com/?api-key=15319bf4-5b40-4958-ac8d-6313aa55eb92,https://rpc-devnet.helius.xyz?api-key=9f70a843-3274-4ffd-a0a9-323f8b7c0639"; - })(DasApiUrl = Constants2.DasApiUrl || (Constants2.DasApiUrl = {})); - let NftstorageApiKey; - ((NftstorageApiKey2) => { - NftstorageApiKey2["dev"] = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJkaWQ6ZXRocjoweERGMjcyN2VkODZhRGU1RTMyZDZDZEJlODc0YzRFNDlEODY1OWZmOEMiLCJpc3MiOiJuZnQtc3RvcmFnZSIsImlhdCI6MTYyMDI2NDk0MzcwNiwibmFtZSI6ImRlbW8ifQ.d4J70mikxRB8a5vwNu6SO5HDA8JaueuseAj7Q_ytMCE"; - })(NftstorageApiKey = Constants2.NftstorageApiKey || (Constants2.NftstorageApiKey = {})); - Constants2.loadConfig = async () => { - Config = await import("@solana-suite/config/load"); - }; - Constants2.switchCluster = (param) => { - const { cluster: env, customClusterUrl: customClusterUrl2 } = param; - if (customClusterUrl2 && customClusterUrl2.length > 0) { - const index = Date.now() % customClusterUrl2.length; - return customClusterUrl2[index]; - } - switch (env) { - case "mainnet-beta" /* prd */: - return "https://api.mainnet-beta.solana.com" /* prd */; - case "mainnet-beta-metaplex" /* prdMetaplex */: - return "https://api.metaplex.solana.com" /* prdMetaplex */; - case "testnet" /* test */: - return "https://api.testnet.solana.com" /* test */; - case "devnet" /* dev */: - return "https://api.devnet.solana.com" /* dev */; - default: - return "http://api.devnet.solana.com" /* localhost */; - } - }; - Constants2.switchBundlr = (env) => { - switch (env) { - case "mainnet-beta" /* prd */: { - const urls = "https://node1.irys.xyz,https://node2.irys.xyz" /* prd */.split(","); - const index = Date.now() % urls.length; - return urls[index]; - } - default: { - return "https://devnet.irys.xyz" /* dev */; - } - } - }; - Constants2.switchDasApi = (env) => { - switch (env) { - case "mainnet-beta" /* prd */: { - if (Constants2.dasApiUrl.length < 1) { - throw Error(Constants2.WarnningMessage.DAS_API_URL); - } - const urls = "https://node1.irys.xyz,https://node2.irys.xyz" /* prd */.split(","); - const index = Date.now() % urls.length; - return urls[index]; - } - default: { - const urls = "https://devnet.helius-rpc.com/?api-key=15319bf4-5b40-4958-ac8d-6313aa55eb92,https://rpc-devnet.helius.xyz?api-key=9f70a843-3274-4ffd-a0a9-323f8b7c0639" /* dev */.split(","); - const index = Date.now() % urls.length; - return urls[index]; - } - } - }; - Constants2.switchNftStorage = (env) => { - switch (env) { - case "mainnet-beta" /* prd */: - if (!Constants2.nftStorageApiKey) { - throw Error(Constants2.WarnningMessage.NFT_STORAGE_API_KEY); - } - return Constants2.nftStorageApiKey; - default: { - return "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJkaWQ6ZXRocjoweERGMjcyN2VkODZhRGU1RTMyZDZDZEJlODc0YzRFNDlEODY1OWZmOEMiLCJpc3MiOiJuZnQtc3RvcmFnZSIsImlhdCI6MTYyMDI2NDk0MzcwNiwibmFtZSI6ImRlbW8ifQ.d4J70mikxRB8a5vwNu6SO5HDA8JaueuseAj7Q_ytMCE" /* dev */; - } - } - }; - Constants2.WRAPPED_TOKEN_PROGRAM_ID = new import_web3.PublicKey( - "So11111111111111111111111111111111111111112" - ); - Constants2.MEMO_PROGRAM_ID = new import_web3.PublicKey( - "Memo1UhkJRfHyvLMcVucJwxXeuD728EqVDDwQDxFMNo" - ); - Constants2.METAPLEX_PROGRAM_ID = new import_web3.PublicKey( - "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s" - ); - Constants2.COMMITMENT = "confirmed"; - Constants2.NFT_STORAGE_GATEWAY_URL = "https://ipfs.io/ipfs"; - Constants2.IRYS_GATEWAY_URL = "https://gateway.irys.xyz"; - Constants2.BUNDLR_NETWORK_URL = (0, Constants2.switchBundlr)(Config.cluster.type); - Constants2.DAS_API_URL = (0, Constants2.switchDasApi)(Config.cluster.type); - Constants2.NFT_STORAGE_API_KEY = (0, Constants2.switchNftStorage)(Config.cluster.type); - Constants2.EXPLORER_SOLSCAN_URL = "https://solscan.io"; - Constants2.EXPLORER_SOLANAFM_URL = "https://solana.fm"; - Constants2.EXPLORER_XRAY_URL = "https://xray.helius.xyz"; -})(Constants || (Constants = {})); -console.log(Constants.WarnningMessage.ANNOUNCE); - -// ../transaction-builder/src/batch.ts -var import_web34 = require("@solana/web3.js"); - -// ../node/src/index.ts -var import_web32 = require("@solana/web3.js"); -var Node; -((Node2) => { - const setted = { - clusterUrl: "", - commitment: Constants.COMMITMENT, - customClusterUrl: [] - }; - Node2.getConnection = () => { - if (setted.customClusterUrl.length > 0) { - setted.clusterUrl = Constants.switchCluster({ - customClusterUrl: setted.customClusterUrl - }); - } else if (Constants.customClusterUrl.length > 0) { - setted.clusterUrl = Constants.switchCluster({ - customClusterUrl: Constants.customClusterUrl - }); - } else if (!setted.clusterUrl) { - setted.clusterUrl = Constants.switchCluster({ - cluster: Constants.currentCluster - }); - } - if (!setted.commitment) { - setted.commitment = Constants.COMMITMENT; - } - return new import_web32.Connection(setted.clusterUrl, setted.commitment); - }; - Node2.changeConnection = (param) => { - setted.clusterUrl = ""; - setted.customClusterUrl = []; - setted.commitment = Constants.COMMITMENT; - const { cluster, commitment, customClusterUrl } = param; - if (commitment) { - setted.commitment = commitment; - debugLog("# Node change commitment: ", setted.commitment); - } - if (cluster) { - setted.clusterUrl = Constants.switchCluster({ cluster }); - debugLog("# Node change clusterUrl: ", setted.clusterUrl); - } - if (customClusterUrl) { - debugLog("# customClusterUrl: ", customClusterUrl); - setted.clusterUrl = Constants.switchCluster({ customClusterUrl }); - setted.customClusterUrl = customClusterUrl; - debugLog( - "# Node change cluster, custom cluster url: ", - setted.clusterUrl - ); - } - }; - Node2.confirmedSig = async (signature, commitment = Constants.COMMITMENT) => { - const connection = Node2.getConnection(); - const latestBlockhash = await connection.getLatestBlockhash(); - return await connection.confirmTransaction( - { - blockhash: latestBlockhash.blockhash, - lastValidBlockHeight: latestBlockhash.lastValidBlockHeight, - signature - }, - commitment - ).then(Result.ok).catch(Result.err); - }; -})(Node || (Node = {})); - -// ../transaction-builder/src/common.ts -var import_web33 = require("@solana/web3.js"); -var MAX_RETRIES = 3; -var TransactionBuilder; -((TransactionBuilder7) => { - class Common2 { - static MAX_TRANSACTION_SIZE = 1232; - instructions; - signers; - feePayer; - data; - constructor(instructions, signers, feePayer, data) { - this.instructions = instructions; - this.signers = signers; - this.feePayer = feePayer; - this.data = data; - } - submit = async () => { - return Try(async () => { - if (!(this instanceof Common2)) { - throw Error("only Instruction object that can use this"); - } - const transaction = new import_web33.Transaction(); - const blockhashObj = await Node.getConnection().getLatestBlockhash(); - transaction.lastValidBlockHeight = blockhashObj.lastValidBlockHeight; - transaction.recentBlockhash = blockhashObj.blockhash; - let finalSigners = this.signers; - if (this.feePayer) { - transaction.feePayer = this.feePayer.publicKey; - finalSigners = [this.feePayer, ...this.signers]; - } - this.instructions.forEach((inst) => transaction.add(inst)); - const options = { - maxRetries: MAX_RETRIES - }; - return await (0, import_web33.sendAndConfirmTransaction)( - Node.getConnection(), - transaction, - finalSigners, - options - ); - }); - }; - } - TransactionBuilder7.Common = Common2; -})(TransactionBuilder || (TransactionBuilder = {})); - -// src/shared.ts -var bufferToArray = (buffer) => { - const nums = []; - for (const byte of buffer) { - nums.push(buffer[byte]); - } - return nums; -}; -var overwriteObject = (object, targets) => { - const that = object; - targets.forEach((target) => { - delete that[target.existsKey]; - that[target.will.key] = target.will.value; - }); - return that; -}; -var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { - if (Constants.isDebugging === "true" || process.env.DEBUG === "true") { - console.log("[DEBUG]", data1, data2, data3, data4); - } -}; -var sleep = async (sec) => { - return new Promise((r) => setTimeout(r, sec * 1e3)); -}; -var isBrowser = () => { - return typeof window !== "undefined" && typeof window.document !== "undefined"; -}; -var isNode = () => { - return typeof process !== "undefined" && process.versions != null && process.versions.node != null; -}; -var isPromise = (obj) => { - return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; -}; -function Try(input, finallyInput) { - try { - const v = input(); - if (isPromise(v)) { - return v.then( - (x) => Result.ok(x), - (err) => Result.err(err) - ); - } else { - return Result.ok(v); - } - } catch (e) { - if (e instanceof Error) { - return Result.err(e); - } - return Result.err(Error(e)); - } finally { - if (finallyInput) { - debugLog("# finally input:", finallyInput); - finallyInput(); - } - } -} -var convertTimestampToDateTime = (created_at) => { - if (created_at) { - return new Date(created_at * 1e3); - } - return; -}; -var unixTimestamp = () => { - return Math.floor((/* @__PURE__ */ new Date()).getTime() / 1e3); -}; - -// ../transaction-builder/src/batch.ts -var TransactionBuilder2; -((TransactionBuilder7) => { - class Batch { - submit = async (arr) => { - return Try(async () => { - let i = 0; - for (const a of arr) { - if (!a.instructions && !a.signers) { - throw Error( - `only Instruction object that can use batchSubmit(). - Index: ${i}, Set value: ${JSON.stringify(a)}` - ); - } - i++; - } - const instructions = arr.flatMap((a) => a.instructions); - const signers = arr.flatMap((a) => a.signers); - const feePayers = arr.filter((a) => a.feePayer !== void 0); - let feePayer = signers[0]; - if (feePayers.length > 0 && feePayers[0].feePayer) { - feePayer = feePayers[0].feePayer; - } - const transaction = new import_web34.Transaction(); - let finalSigners = signers; - if (feePayer) { - transaction.feePayer = feePayer.publicKey; - finalSigners = [feePayer, ...signers]; - } - instructions.map((inst) => transaction.add(inst)); - const options = { - maxRetries: MAX_RETRIES - }; - return await (0, import_web34.sendAndConfirmTransaction)( - Node.getConnection(), - transaction, - finalSigners, - options - ); - }); - }; - } - TransactionBuilder7.Batch = Batch; -})(TransactionBuilder2 || (TransactionBuilder2 = {})); - -// ../transaction-builder/src/mint.ts -var import_web35 = require("@solana/web3.js"); -var TransactionBuilder3; -((TransactionBuilder7) => { - class Mint { - instructions; - signers; - feePayer; - data; - constructor(instructions, signers, feePayer, data) { - this.instructions = instructions; - this.signers = signers; - this.data = data; - this.feePayer = feePayer; - } - submit = async () => { - return Try(async () => { - if (!(this instanceof Mint)) { - throw Error("only MintInstruction object that can use this"); - } - const transaction = new import_web35.Transaction(); - const blockhashObj = await Node.getConnection().getLatestBlockhash(); - transaction.lastValidBlockHeight = blockhashObj.lastValidBlockHeight; - transaction.recentBlockhash = blockhashObj.blockhash; - let finalSigners = this.signers; - if (this.feePayer) { - transaction.feePayer = this.feePayer.publicKey; - finalSigners = [this.feePayer, ...this.signers]; - } - this.instructions.forEach((inst) => transaction.add(inst)); - const options = { - maxRetries: MAX_RETRIES - }; - if (Node.getConnection().rpcEndpoint === Constants.EndPointUrl.prd) { - debugLog("# Change metaplex cluster on mainnet-beta"); - Node.changeConnection({ cluster: Constants.Cluster.prdMetaplex }); - } - return await (0, import_web35.sendAndConfirmTransaction)( - Node.getConnection(), - transaction, - finalSigners, - options - ); - }); - }; - } - TransactionBuilder7.Mint = Mint; -})(TransactionBuilder3 || (TransactionBuilder3 = {})); - -// ../transaction-builder/src/partial-sign.ts -var import_web36 = require("@solana/web3.js"); -var TransactionBuilder4; -((TransactionBuilder7) => { - class PartialSign { - hexInstruction; - data; - canSubmit; - constructor(instructions, mint, canSubmit = false) { - this.hexInstruction = instructions; - this.data = mint; - this.canSubmit = canSubmit; - } - submit = async (feePayer) => { - return Try(async () => { - if (!(this instanceof PartialSign)) { - throw Error("only PartialSignInstruction object that can use this"); - } - const decode = Buffer.from(this.hexInstruction, "hex"); - const transactionFromJson = import_web36.Transaction.from(decode); - transactionFromJson.partialSign(feePayer.toKeypair()); - const options = { - maxRetries: MAX_RETRIES - }; - const wireTransaction = transactionFromJson.serialize(); - return await Node.getConnection().sendRawTransaction( - wireTransaction, - options - ); - }); - }; - } - TransactionBuilder7.PartialSign = PartialSign; -})(TransactionBuilder4 || (TransactionBuilder4 = {})); - -// ../transaction-builder/src/calculate-txsize.ts -var TransactionBuilder5; -((TransactionBuilder7) => { - const LOW_VALUE = 127; - const HIGH_VALUE = 16383; - const MAX_TRANSACTION_SIZE = 1232; - const compactHeader = (n) => n <= LOW_VALUE ? 1 : n <= HIGH_VALUE ? 2 : 3; - const compactArraySize = (n, size) => compactHeader(n) + n * size; - TransactionBuilder7.calculateTxSize = (transaction, feePayer) => { - const feePayerPk = [feePayer.toBase58()]; - const signers = new Set(feePayerPk); - const accounts = new Set(feePayerPk); - const ixsSize = transaction.instructions.reduce((acc, ix) => { - ix.keys.forEach(({ pubkey, isSigner }) => { - const pk = pubkey.toBase58(); - if (isSigner) - signers.add(pk); - accounts.add(pk); - }); - accounts.add(ix.programId.toBase58()); - const nIndexes = ix.keys.length; - const opaqueData = ix.data.length; - return acc + 1 + // PID index - compactArraySize(nIndexes, 1) + compactArraySize(opaqueData, 1); - }, 0); - return compactArraySize(signers.size, 64) + // signatures - 3 + // header - compactArraySize(accounts.size, 32) + // accounts - 32 + // blockhash - compactHeader(transaction.instructions.length) + // instructions - ixsSize; - }; - TransactionBuilder7.isOverTransactionSize = (transaction, feePayer) => { - return (0, TransactionBuilder7.calculateTxSize)(transaction, feePayer) > MAX_TRANSACTION_SIZE; - }; -})(TransactionBuilder5 || (TransactionBuilder5 = {})); - -// ../types/src/global/index.ts -var Explorer = /* @__PURE__ */ ((Explorer2) => { - Explorer2["Solscan"] = "solscan"; - Explorer2["SolanaFM"] = "solanafm"; - Explorer2["Xray"] = "xray"; - return Explorer2; -})(Explorer || {}); - -// ../global/src/index.ts -var import_web39 = require("@solana/web3.js"); - -// ../account/src/associated.ts -var import_spl_token = require("@solana/spl-token"); - -// ../account/src/keypair.ts -var import_web37 = require("@solana/web3.js"); -var import_bs58 = __toESM(require("bs58")); -var Account; -((Account5) => { - class Keypair4 { - secret; - pubkey; - constructor(params) { - if (!params.pubkey) { - const keypair = params.secret.toKeypair(); - this.pubkey = keypair.publicKey.toString(); - } else { - this.pubkey = params.pubkey; - } - this.secret = params.secret; - } - toPublicKey() { - return new import_web37.PublicKey(this.pubkey); - } - toKeypair() { - const decoded = import_bs58.default.decode(this.secret); - return import_web37.Keypair.fromSecretKey(decoded); - } - static isPubkey = (value) => /^[0-9a-zA-Z]{32,44}$/.test(value); - static isSecret = (value) => /^[0-9a-zA-Z]{87,88}$/.test(value); - static create = () => { - const keypair = import_web37.Keypair.generate(); - return new Keypair4({ - pubkey: keypair.publicKey.toString(), - secret: import_bs58.default.encode(keypair.secretKey) - }); - }; - static toKeyPair = (keypair) => { - return new Keypair4({ - pubkey: keypair.publicKey.toString(), - secret: import_bs58.default.encode(keypair.secretKey) - }); - }; - } - Account5.Keypair = Keypair4; -})(Account || (Account = {})); - -// ../account/src/associated.ts -var Account2; -((Account5) => { - let Associated; - ((Associated2) => { - const RETRY_OVER_LIMIT = 10; - const RETRY_SLEEP_TIME = 3; - const get = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const res = await (0, Associated2.makeOrCreateInstruction)( - mint, - owner, - new Account.Keypair({ secret: feePayer }).pubkey, - allowOwnerOffCurve - ); - if (!res.inst) { - return res.tokenAccount; - } - return new TransactionBuilder6.Common( - [res.inst], - [], - feePayer.toKeypair(), - res.tokenAccount - ); - }; - Associated2.retryGetOrCreate = async (mint, owner, feePayer) => { - let counter = 1; - while (counter < RETRY_OVER_LIMIT) { - try { - const inst = await get(mint, owner, feePayer, true); - if (inst && typeof inst === "string") { - debugLog("# associatedTokenAccount: ", inst); - return inst; - } else if (inst instanceof TransactionBuilder6.Common) { - (await inst.submit()).map( - async (ok) => { - await Node.confirmedSig(ok); - return inst.data; - }, - (err) => { - debugLog("# Error submit retryGetOrCreate: ", err); - throw err; - } - ); - } - } catch (e) { - debugLog(`# retry: ${counter} create token account: `, e); - debugLog(`# mint: ${mint}, owner: ${owner}, feePayer: ${feePayer}`); - } - await sleep(RETRY_SLEEP_TIME); - counter++; - } - throw Error(`retry action is over limit ${RETRY_OVER_LIMIT}`); - }; - Associated2.makeOrCreateInstruction = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const associatedTokenAccount = (0, import_spl_token.getAssociatedTokenAddressSync)( - mint.toPublicKey(), - owner.toPublicKey(), - allowOwnerOffCurve, - import_spl_token.TOKEN_PROGRAM_ID, - import_spl_token.ASSOCIATED_TOKEN_PROGRAM_ID - ); - debugLog("# associatedTokenAccount: ", associatedTokenAccount.toString()); - try { - await (0, import_spl_token.getAccount)( - Node.getConnection(), - associatedTokenAccount, - Node.getConnection().commitment, - import_spl_token.TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst: void 0 - }; - } catch (error) { - if (!(error instanceof import_spl_token.TokenAccountNotFoundError) && !(error instanceof import_spl_token.TokenInvalidAccountOwnerError)) { - throw Error("Unexpected error"); - } - const payer = !feePayer ? owner : feePayer; - const inst = (0, import_spl_token.createAssociatedTokenAccountInstruction)( - payer.toPublicKey(), - associatedTokenAccount, - owner.toPublicKey(), - mint.toPublicKey(), - import_spl_token.TOKEN_PROGRAM_ID, - import_spl_token.ASSOCIATED_TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst - }; - } - }; - })(Associated = Account5.Associated || (Account5.Associated = {})); -})(Account2 || (Account2 = {})); - -// ../account/src/pda.ts -var import_web38 = require("@solana/web3.js"); -var import_mpl_token_metadata = require("@metaplex-foundation/mpl-token-metadata"); -var import_mpl_bubblegum = require("@metaplex-foundation/mpl-bubblegum"); -var import_bn = __toESM(require("bn.js")); -var Account3; -((Account5) => { - let Pda; - ((Pda2) => { - Pda2.getMetadata = (address) => { - const [publicKey] = import_web38.PublicKey.findProgramAddressSync( - [ - Buffer.from("metadata"), - import_mpl_token_metadata.PROGRAM_ID.toBuffer(), - address.toPublicKey().toBuffer() - ], - import_mpl_token_metadata.PROGRAM_ID - ); - return publicKey; - }; - Pda2.getMasterEdition = (address) => { - const [publicKey] = import_web38.PublicKey.findProgramAddressSync( - [ - Buffer.from("metadata"), - import_mpl_token_metadata.PROGRAM_ID.toBuffer(), - address.toPublicKey().toBuffer(), - Buffer.from("edition") - ], - import_mpl_token_metadata.PROGRAM_ID - ); - return publicKey; - }; - Pda2.getTreeAuthority = (address) => { - const [publicKey] = import_web38.PublicKey.findProgramAddressSync( - [address.toPublicKey().toBuffer()], - import_mpl_bubblegum.MPL_BUBBLEGUM_PROGRAM_ID.toPublicKey() - ); - return publicKey; - }; - Pda2.getBgumSigner = () => { - const [publicKey] = import_web38.PublicKey.findProgramAddressSync( - [Buffer.from("collection_cpi", "utf8")], - import_mpl_bubblegum.MPL_BUBBLEGUM_PROGRAM_ID.toPublicKey() - ); - return publicKey; - }; - Pda2.getAssetId = (address, leafIndex) => { - const node = new import_bn.default.BN(leafIndex); - const [assetId] = import_web38.PublicKey.findProgramAddressSync( - [ - Buffer.from("asset", "utf8"), - address.toPublicKey().toBuffer(), - Uint8Array.from(node.toArray("le", 8)) - ], - import_mpl_bubblegum.MPL_BUBBLEGUM_PROGRAM_ID.toPublicKey() - ); - return assetId.toString(); - }; - })(Pda = Account5.Pda || (Account5.Pda = {})); -})(Account3 || (Account3 = {})); - -// ../account/src/index.ts -var Account4 = { - ...Account2, - ...Account, - ...Account3 -}; - -// ../global/src/index.ts -var import_bignumber = require("bignumber.js"); -var import_bs582 = __toESM(require("bs58")); -String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, options = {}) { - const endPointUrl = Node.getConnection().rpcEndpoint; - debugLog("# toExplorerUrl rpcEndpoint:", endPointUrl); - let cluster = ""; - if (endPointUrl === Constants.EndPointUrl.prd) { - cluster = Constants.Cluster.prd; - } else if (endPointUrl === Constants.EndPointUrl.test) { - cluster = Constants.Cluster.test; - } else if (endPointUrl === Constants.EndPointUrl.dev) { - cluster = Constants.Cluster.dev; - } else { - cluster = Constants.Cluster.dev; - } - const addressOrSignature = this.toString(); - let url = ""; - if (options.replacePath) { - if (explorer === "solanafm" /* SolanaFM */) { - url = `${Constants.EXPLORER_SOLANAFM_URL}/${options.replacePath}/${addressOrSignature}?cluster=${cluster}`; - } else if (explorer === "xray" /* Xray */) { - url = `${Constants.EXPLORER_XRAY_URL}/${options.replacePath}/${addressOrSignature}?network=${cluster}`; - } else { - url = `${Constants.EXPLORER_SOLSCAN_URL}/${options.replacePath}/${addressOrSignature}?cluster=${cluster}`; - } - return url; - } - if (Account4.Keypair.isPubkey(addressOrSignature)) { - if (explorer === "solanafm" /* SolanaFM */) { - url = `${Constants.EXPLORER_SOLANAFM_URL}/address/${addressOrSignature}?cluster=${cluster}`; - } else if (explorer === "xray" /* Xray */) { - url = `${Constants.EXPLORER_XRAY_URL}/account/${addressOrSignature}?network=${cluster}`; - } else { - url = `${Constants.EXPLORER_SOLSCAN_URL}/account/${addressOrSignature}?cluster=${cluster}`; - } - } else { - if (explorer === "solanafm" /* SolanaFM */) { - url = `${Constants.EXPLORER_SOLANAFM_URL}/tx/${addressOrSignature}?cluster=${cluster}`; - } else if (explorer === "xray" /* Xray */) { - url = `${Constants.EXPLORER_XRAY_URL}/tx/${addressOrSignature}?network=${cluster}`; - } else { - url = `${Constants.EXPLORER_SOLSCAN_URL}/tx/${addressOrSignature}?cluster=${cluster}`; - } - } - return url; -}; -String.prototype.toPublicKey = function() { - if (!Account4.Keypair.isPubkey(this.toString())) { - throw Error(`No match KeyPair.PubKey: ${this.toString()}`); - } - return new import_web39.PublicKey(this.toString()); -}; -String.prototype.toKeypair = function() { - if (!Account4.Keypair.isSecret(this.toString())) { - throw Error(`No match KeyPair.Secret: ${this.toString()}`); - } - const decoded = import_bs582.default.decode(this.toString()); - return import_web39.Keypair.fromSecretKey(decoded); -}; -Number.prototype.toSol = function() { - return (0, import_bignumber.BigNumber)(this).div(import_web39.LAMPORTS_PER_SOL).toNumber(); -}; -Number.prototype.toLamports = function() { - return (0, import_bignumber.BigNumber)(this).times(import_web39.LAMPORTS_PER_SOL).toNumber(); -}; - -// ../transaction-builder/src/index.ts -var TransactionBuilder6 = { - ...TransactionBuilder2, - ...TransactionBuilder5, - ...TransactionBuilder3, - ...TransactionBuilder, - ...TransactionBuilder4 -}; - -// src/result.ts -var AbstractResult = class { - unwrap(ok, err) { - const r = this._chain( - (value) => Result.ok(ok ? ok(value) : value), - (error) => err ? Result.ok(err(error)) : Result.err(error) - ); - if (r.isErr) { - throw r.error; - } - return r.value; - } - map(ok, err) { - return this._chain( - (value) => Result.ok(ok(value)), - (error) => Result.err(err ? err(error) : error) - ); - } - chain(ok, err) { - return this._chain(ok, err || ((error) => Result.err(error))); - } - match(ok, err) { - this._chain( - (value) => Result.ok(ok(value)), - (error) => Result.err(err(error)) - ); - } - /// single TransactionBuilder //// - /* eslint-disable @typescript-eslint/no-explicit-any */ - async submit(feePayer) { - const res = this.map( - async (ok) => { - debugLog("# result single submit: ", ok); - if (feePayer) { - const obj = ok; - return await obj.submit(feePayer); - } else { - const obj = ok; - return await obj.submit(); - } - }, - (err) => { - return err; - } - ); - if (res.isErr) { - return Result.err(res.error); - } - return res.value; - } -}; -Array.prototype.submit = async function(feePayer) { - if (feePayer) { - let i = 1; - for await (const obj of this) { - if (obj.isErr) { - return obj; - } else if (obj.value.canSubmit) { - debugLog("# Result batch canSubmit"); - const sig = await obj.submit(feePayer); - if (sig.isErr) { - return sig; - } - await Node.confirmedSig(sig.value); - } else { - debugLog("# Result batch other than canSubmit"); - if (this.length == i) { - return obj.submit(feePayer); - } - obj.submit(feePayer); - } - i++; - } - } else { - const instructions = []; - for (const obj of this) { - if (obj.isErr) { - return obj; - } else if (obj.isOk) { - instructions.push(obj.value); - } else { - return Result.err(Error("Only Array Instruction object")); - } - } - debugLog("# Result batch submit: ", instructions); - return new TransactionBuilder6.Batch().submit(instructions); - } -}; -var InternalOk = class extends AbstractResult { - constructor(value) { - super(); - this.value = value; - } - isOk = true; - isErr = false; - /* eslint-disable @typescript-eslint/no-unused-vars */ - _chain(ok, _err) { - return ok(this.value); - } -}; -var InternalErr = class extends AbstractResult { - constructor(error) { - super(); - this.error = error; - } - isOk = false; - isErr = true; - _chain(_ok, err) { - return err(this.error); - } -}; -var Result; -((Result7) => { - function ok(value) { - return new InternalOk(value); - } - Result7.ok = ok; - function err(error) { - return new InternalErr(error || Error()); - } - Result7.err = err; - function all(obj) { - if (Array.isArray(obj)) { - const resArr = []; - for (const item of obj) { - if (item.isErr) { - return item; - } - resArr.push(item.value); - } - return Result7.ok(resArr); - } - const res = {}; - const keys = Object.keys(obj); - for (const key of keys) { - const item = obj[key]; - if (item.isErr) { - return item; - } - res[key] = item.value; - } - return Result7.ok(res); - } - Result7.all = all; -})(Result || (Result = {})); - -// ../converter/src/collection.ts -var Converter; -((Converter15) => { - let Collection; - ((Collection2) => { - Collection2.intoInfra = (input) => { - if (!input) { - return null; - } - return { - key: input.toPublicKey(), - verified: false - }; - }; - Collection2.intoUser = (output) => { - if (!output) { - return void 0; - } - return { - address: output.key.toString(), - verified: output.verified - }; - }; - })(Collection = Converter15.Collection || (Converter15.Collection = {})); - let CollectionMint; - ((CollectionMint2) => { - CollectionMint2.intoUser = (output) => { - const res = output.find((value) => { - if (value.group_key === "collection") { - return value.group_value; - } - }); - return res ? res.group_value : ""; - }; - })(CollectionMint = Converter15.CollectionMint || (Converter15.CollectionMint = {})); -})(Converter || (Converter = {})); - -// ../converter/src/creators.ts -var Converter2; -((Converter15) => { - let Creators; - ((Creators2) => { - Creators2.intoInfra = (input) => { - if (!input) { - return null; - } - return input.map((data) => { - return { - address: data.address.toPublicKey(), - share: data.share, - verified: false - }; - }); - }; - Creators2.intoCompressedNftInfra = (input) => { - if (!input) { - return []; - } - return input.map((data) => { - return { - address: data.address.toPublicKey(), - share: data.share, - verified: false - }; - }); - }; - Creators2.intoUser = (output) => { - if (!output) { - return void 0; - } - return output.map((data) => { - return { - address: data.address.toString(), - share: data.share, - verified: data.verified - }; - }); - }; - })(Creators = Converter15.Creators || (Converter15.Creators = {})); -})(Converter2 || (Converter2 = {})); - -// ../converter/src/compressed-nft-metadata.ts -var import_mpl_bubblegum_instruction = require("mpl-bubblegum-instruction"); -var Converter3; -((Converter15) => { - let CompressedNftMetadata; - ((CompressedNftMetadata2) => { - CompressedNftMetadata2.intoInfra = (input, uri, sellerFeeBasisPoints) => { - return { - name: input.name, - symbol: input.symbol, - uri, - sellerFeeBasisPoints, - creators: Converter2.Creators.intoCompressedNftInfra(input.creators), - collection: Converter.Collection.intoInfra(input.collection), - uses: input.uses || null, - primarySaleHappened: false, - isMutable: input.isMutable ?? false, - editionNonce: 0, - tokenStandard: import_mpl_bubblegum_instruction.TokenStandard.NonFungible, - tokenProgramVersion: import_mpl_bubblegum_instruction.TokenProgramVersion.Original - }; - }; - })(CompressedNftMetadata = Converter15.CompressedNftMetadata || (Converter15.CompressedNftMetadata = {})); -})(Converter3 || (Converter3 = {})); - -// ../converter/src/royalty.ts -var Converter4; -((Converter15) => { - let Royalty; - ((Royalty2) => { - Royalty2.THRESHOLD = 100; - Royalty2.intoInfra = (percentage) => { - return percentage * Royalty2.THRESHOLD; - }; - Royalty2.intoUser = (percentage) => { - return percentage * Royalty2.THRESHOLD; - }; - })(Royalty = Converter15.Royalty || (Converter15.Royalty = {})); -})(Converter4 || (Converter4 = {})); - -// ../converter/src/nft.ts -var Converter5; -((Converter15) => { - let Nft; - ((Nft2) => { - Nft2.intoUser = (output) => { - return { - mint: output.onchain.id.toString(), - collectionMint: Converter.CollectionMint.intoUser( - output.onchain.grouping - ), - authorities: output.onchain.authorities, - royalty: Converter4.Royalty.intoUser(output.onchain.royalty.percent), - name: output.onchain.content.metadata.name, - symbol: output.onchain.content.metadata.symbol, - uri: output.onchain.content.json_uri, - creators: Converter2.Creators.intoUser(output.onchain.creators), - treeAddress: output.onchain.compression.tree, - isCompressed: output.onchain.compression.compressed, - isMutable: output.onchain.mutable, - isBurn: output.onchain.burnt, - editionNonce: output.onchain.supply.edition_nonce, - primarySaleHappened: output.onchain.royalty.primary_sale_happened, - dateTime: convertTimestampToDateTime(output.offchain.created_at), - offchain: output.offchain - }; - }; - })(Nft = Converter15.Nft || (Converter15.Nft = {})); -})(Converter5 || (Converter5 = {})); - -// ../converter/src/memo.ts -var Converter6; -((Converter15) => { - let Memo; - ((Memo2) => { - Memo2.intoUserSide = (output, meta, outputTransfer, mappingTokenAccount) => { - const history = {}; - if (outputTransfer && outputTransfer.program !== "") { - if (mappingTokenAccount && outputTransfer.program === "spl-token") { - const foundSource = mappingTokenAccount.find( - (m) => m.account === outputTransfer.parsed.info.source - ); - const foundDest = mappingTokenAccount.find( - (m) => m.account === outputTransfer.parsed.info.destination - ); - history.mint = outputTransfer.parsed.info.mint; - foundSource && (history.source = foundSource.owner); - foundDest && (history.destination = foundDest.owner); - } else { - history.source = outputTransfer.parsed.info.source; - history.destination = outputTransfer.parsed.info.destination; - } - } - history.memo = output.parsed; - history.type = output.program; - history.dateTime = convertTimestampToDateTime(meta.blockTime); - history.sig = meta.transaction.signatures[0]; - history.innerInstruction = false; - if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { - history.innerInstruction = true; - } - return history; - }; - })(Memo = Converter15.Memo || (Converter15.Memo = {})); -})(Converter6 || (Converter6 = {})); - -// ../converter/src/mint.ts -var Converter7; -((Converter15) => { - let Mint; - ((Mint2) => { - Mint2.intoUserSide = (output, meta) => { - const history = {}; - history.mint = output.parsed.info.mint; - history.mintAuthority = output.parsed.info.mintAuthority; - history.tokenAmount = output.parsed.info.tokenAmount; - history.account = output.parsed.info.account; - history.type = output.program; - history.dateTime = convertTimestampToDateTime(meta.blockTime); - history.sig = meta.transaction.signatures[0]; - history.innerInstruction = false; - if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { - history.innerInstruction = true; - } - return history; - }; - })(Mint = Converter15.Mint || (Converter15.Mint = {})); -})(Converter7 || (Converter7 = {})); - -// ../converter/src/regular-nft-metadata.ts -var Converter8; -((Converter15) => { - let RegularNftMetadata; - ((RegularNftMetadata2) => { - RegularNftMetadata2.intoInfra = (input, uri, sellerFeeBasisPoints) => { - return { - name: input.name, - symbol: input.symbol, - uri, - sellerFeeBasisPoints, - creators: Converter2.Creators.intoInfra(input.creators), - collection: Converter.Collection.intoInfra(input.collection), - uses: input.uses || null - }; - }; - })(RegularNftMetadata = Converter15.RegularNftMetadata || (Converter15.RegularNftMetadata = {})); -})(Converter8 || (Converter8 = {})); - -// ../converter/src/properties.ts -var Converter9; -((Converter15) => { - let Properties; - ((Properties2) => { - Properties2.intoInfra = async (input, callbackFunc, storageType, feePayer) => { - if (!input || !input.files) { - return {}; - } - const files = await Promise.all( - input.files.map(async (file) => { - if (!file.filePath) { - return {}; - } - const res = await callbackFunc(file.filePath, storageType, feePayer); - if (res.isErr) { - throw Error(res.error.message); - } - return overwriteObject(file, [ - { - existsKey: "filePath", - will: { key: "uri", value: res.value } - } - ]); - }) - ); - return { ...input, files }; - }; - })(Properties = Converter15.Properties || (Converter15.Properties = {})); -})(Converter9 || (Converter9 = {})); - -// ../converter/src/uses.ts -var Converter10; -((Converter15) => { - let Uses; - ((Uses2) => { - Uses2.intoUserSide = (output) => { - if (!output) { - return void 0; - } - return output; - }; - })(Uses = Converter15.Uses || (Converter15.Uses = {})); -})(Converter10 || (Converter10 = {})); - -// ../converter/src/token-metadata.ts -var Converter11; -((Converter15) => { - let TokenMetadata; - ((TokenMetadata2) => { - TokenMetadata2.intoInfra = (input, uri, sellerFeeBasisPoints) => { - return { - name: input.name, - symbol: input.symbol, - uri, - sellerFeeBasisPoints, - creators: Converter2.Creators.intoInfra(input.creators), - collection: null, - uses: input.uses || null - }; - }; - TokenMetadata2.intoUser = (output, tokenAmount) => { - return { - mint: output.onchain.mint.toString(), - royalty: output.onchain.data.sellerFeeBasisPoints, - name: (0, TokenMetadata2.deleteNullStrings)(output.onchain.data.name), - symbol: (0, TokenMetadata2.deleteNullStrings)(output.onchain.data.symbol), - tokenAmount, - uri: (0, TokenMetadata2.deleteNullStrings)(output.onchain.data.uri), - creators: Converter2.Creators.intoUser(output.onchain.data.creators), - uses: Converter10.Uses.intoUserSide(output.onchain.uses), - dateTime: convertTimestampToDateTime(output.offchain.created_at), - offchain: output.offchain - }; - }; - TokenMetadata2.deleteNullStrings = (str) => { - return str.replace(/\0/g, ""); - }; - })(TokenMetadata = Converter15.TokenMetadata || (Converter15.TokenMetadata = {})); -})(Converter11 || (Converter11 = {})); - -// ../converter/src/transfer-checked.ts -var Converter12; -((Converter15) => { - let TransferChecked; - ((TransferChecked2) => { - TransferChecked2.intoUserSide = (output, meta, mappingTokenAccount) => { - const history = {}; - if (mappingTokenAccount) { - const foundSource = mappingTokenAccount.find( - (m) => m.account === output.parsed.info.source - ); - const foundDest = mappingTokenAccount.find( - (m) => m.account === output.parsed.info.destination - ); - foundSource && (history.source = foundSource.owner); - foundDest && (history.destination = foundDest.owner); - } - history.tokenAmount = output.parsed.info.tokenAmount; - history.mint = output.parsed.info.mint; - history.multisigAuthority = output.parsed.info.multisigAuthority; - history.signers = output.parsed.info.signers; - history.type = output.program; - history.dateTime = convertTimestampToDateTime(meta.blockTime); - history.sig = meta.transaction.signatures[0]; - history.innerInstruction = false; - if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { - history.innerInstruction = true; - } - return history; - }; - })(TransferChecked = Converter15.TransferChecked || (Converter15.TransferChecked = {})); -})(Converter12 || (Converter12 = {})); - -// ../converter/src/transfer.ts -var Converter13; -((Converter15) => { - let Transfer; - ((Transfer2) => { - Transfer2.intoUserSide = (output, meta) => { - const history = {}; - if (!output.parsed.info.destination || !output.parsed.info.lamports) { - return; - } - history.source = output.parsed.info.source; - history.destination = output.parsed.info.destination; - history.sol = output.parsed.info.lamports?.toSol().toString(); - history.type = output.program; - history.dateTime = convertTimestampToDateTime(meta.blockTime); - history.sig = meta.transaction.signatures[0]; - history.innerInstruction = false; - if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { - history.innerInstruction = true; - } - return history; - }; - })(Transfer = Converter15.Transfer || (Converter15.Transfer = {})); -})(Converter13 || (Converter13 = {})); - -// ../converter/src/index.ts -var Converter14 = { - ...Converter3, - ...Converter, - ...Converter2, - ...Converter5, - ...Converter6, - ...Converter7, - ...Converter8, - ...Converter9, - ...Converter4, - ...Converter11, - ...Converter12, - ...Converter13, - ...Converter10 -}; - -// ../validator/src/index.ts -var Validator; -((Validator2) => { - let Message; - ((Message2) => { - Message2.SUCCESS = "success"; - Message2.SMALL_NUMBER = "too small"; - Message2.BIG_NUMBER = "too big"; - Message2.LONG_LENGTH = "too long"; - Message2.EMPTY = "invalid empty value"; - Message2.INVALID_URL = "invalid url"; - Message2.ONLY_NODE_JS = "`string` type is only Node.js"; - })(Message = Validator2.Message || (Validator2.Message = {})); - Validator2.NAME_LENGTH = 32; - Validator2.SYMBOL_LENGTH = 10; - Validator2.URL_LENGTH = 200; - Validator2.ROYALTY_MAX = 100; - Validator2.SELLER_FEE_BASIS_POINTS_MAX = 1e4; - Validator2.ROYALTY_MIN = 0; - Validator2.isRoyalty = (royalty) => { - return Try(() => { - const key = "royalty"; - if (royalty !== 0 && !royalty) { - throw createError(key, Message.EMPTY, royalty); - } - if (royalty < Validator2.ROYALTY_MIN) { - throw createError(key, Message.SMALL_NUMBER, royalty, { - threshold: Validator2.ROYALTY_MIN, - condition: "underMin" - }); - } else if (royalty > Validator2.ROYALTY_MAX) { - throw createError(key, Message.BIG_NUMBER, royalty, { - threshold: Validator2.ROYALTY_MAX, - condition: "overMax" - }); - } - return Message.SUCCESS; - }); - }; - Validator2.isSellerFeeBasisPoints = (royalty) => { - return Try(() => { - const key = "sellerFeeBasisPoints/seller_fee_basis_points"; - if (royalty !== 0 && !royalty) { - throw createError(key, Message.EMPTY, royalty); - } - if (royalty < Validator2.ROYALTY_MIN) { - throw createError(key, Message.SMALL_NUMBER, royalty, { - threshold: Validator2.ROYALTY_MIN, - condition: "underMin" - }); - } else if (royalty > Validator2.ROYALTY_MAX * Converter14.Royalty.THRESHOLD) { - throw createError(key, Message.BIG_NUMBER, royalty, { - threshold: Validator2.SELLER_FEE_BASIS_POINTS_MAX, - condition: "overMax" - }); - } - return Message.SUCCESS; - }); - }; - Validator2.isName = (name) => { - return Try(() => { - const key = "name"; - if (!name) { - throw createError(key, Message.EMPTY, name); - } - if (byteLength(name) > Validator2.NAME_LENGTH) { - throw createError(key, Message.LONG_LENGTH, name, { - threshold: Validator2.NAME_LENGTH, - condition: "overMax" - }); - } - return Message.SUCCESS; - }); - }; - Validator2.isSymbol = (symbol) => { - return Try(() => { - const key = "symbol"; - if (!symbol) { - throw createError(key, Message.EMPTY, symbol); - } - if (byteLength(symbol) > Validator2.SYMBOL_LENGTH) { - throw createError(key, Message.LONG_LENGTH, symbol, { - threshold: Validator2.SYMBOL_LENGTH, - condition: "overMax" - }); - } - return Message.SUCCESS; - }); - }; - Validator2.isImageUrl = (image) => isUriOrImage(image, "image"); - Validator2.checkAll = (metadata) => { - return Try(() => { - const keys = Object.keys(metadata); - const results = []; - keys.map((key) => { - let res; - switch (key) { - case "image": - if (key in metadata && metadata.image) { - res = (0, Validator2.isImageUrl)(metadata.image); - } - break; - case "royalty": - if (key in metadata && metadata.royalty) { - res = (0, Validator2.isRoyalty)(metadata.royalty); - } - break; - case "seller_fee_basis_points": - if (key in metadata && metadata.seller_fee_basis_points) { - res = (0, Validator2.isSellerFeeBasisPoints)(metadata.seller_fee_basis_points); - } - break; - case "sellerFeeBasisPoints": - if (key in metadata) { - res = (0, Validator2.isSellerFeeBasisPoints)(metadata.sellerFeeBasisPoints); - } - break; - case "name": - if (metadata.name) { - res = (0, Validator2.isName)(metadata.name); - } - break; - case "symbol": - if (metadata.symbol) { - res = (0, Validator2.isSymbol)(metadata.symbol); - } - break; - } - if (res && res.isErr) { - results.push(...res.error.details); - } - }); - if (results.length > 0) { - const message = "Caught in the validation errors. see information e.g: err.details"; - throw new ValidatorError(message, results); - } - return Message.SUCCESS; - }); - }; - const byteLength = (value) => { - const text = new TextEncoder(); - return text.encode(value).length; - }; - const createError = (key, message, actual, limit) => { - let error; - if (limit) { - error = new ValidatorError(message, [{ key, message, actual, limit }]); - } else { - error = new ValidatorError(message, [{ key, message, actual }]); - } - return error; - }; - const isUriOrImage = (imageOrUri, key) => { - return Try(() => { - if (!imageOrUri) { - throw createError(key, Message.EMPTY, imageOrUri); - } - if (byteLength(imageOrUri) > Validator2.URL_LENGTH) { - throw createError(key, Message.LONG_LENGTH, imageOrUri, { - threshold: Validator2.URL_LENGTH, - condition: "overMax" - }); - } - if (!/https?:\/\/[-_.!~*\\()a-zA-Z0-9;?:&=+,%#]+/g.test(imageOrUri)) { - throw createError(key, Message.INVALID_URL, imageOrUri); - } - return Message.SUCCESS; - }); - }; -})(Validator || (Validator = {})); -var ValidatorError = class extends Error { - details; - constructor(message, details) { - super(message); - this.details = details; - } -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - Account, - Constants, - Explorer, - Node, - Result, - Try, - Validator, - ValidatorError, - bufferToArray, - convertTimestampToDateTime, - debugLog, - isBrowser, - isNode, - isPromise, - overwriteObject, - sleep, - unixTimestamp -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b2NraGFzaCgpO1xuICAgICAgICB0cmFuc2FjdGlvbi5sYXN0VmFsaWRCbG9ja0hlaWdodCA9IGJsb2NraGFzaE9iai5sYXN0VmFsaWRCbG9ja0hlaWdodDtcbiAgICAgICAgdHJhbnNhY3Rpb24ucmVjZW50QmxvY2toYXNoID0gYmxvY2toYXNoT2JqLmJsb2NraGFzaDtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHRoaXMuc2lnbmVycztcblxuICAgICAgICBpZiAodGhpcy5mZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gdGhpcy5mZWVQYXllci5wdWJsaWNLZXk7XG4gICAgICAgICAgZmluYWxTaWduZXJzID0gW3RoaXMuZmVlUGF5ZXIsIC4uLnRoaXMuc2lnbmVyc107XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLmluc3RydWN0aW9ucy5mb3JFYWNoKChpbnN0KSA9PiB0cmFuc2FjdGlvbi5hZGQoaW5zdCkpO1xuXG4gICAgICAgIGNvbnN0IG9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IE1BWF9SRVRSSUVTLFxuICAgICAgICB9O1xuXG4gICAgICAgIHJldHVybiBhd2FpdCBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uKFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICBvcHRpb25zLFxuICAgICAgICApO1xuICAgICAgfSk7XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IEFueU9iamVjdCB9IGZyb20gJ34vdHlwZXMvc2hhcmVkJztcbmltcG9ydCB7IENvbnN0YW50cyB9IGZyb20gJy4vY29uc3RhbnRzJztcbmltcG9ydCB7IFJlc3VsdCB9IGZyb20gJy4vcmVzdWx0JztcblxuLyoqXG4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FxuICAgICAgKTtcblxuICAgICAgaWYgKCFyZXMuaW5zdCkge1xuICAgICAgICByZXR1cm4gcmVzLnRva2VuQWNjb3VudDtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uPFB1YmtleT4oXG4gICAgICAgIFtyZXMuaW5zdF0sXG4gICAgICAgIFtdLFxuICAgICAgICBmZWVQYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgcmVzLnRva2VuQWNjb3VudCEsXG4gICAgICApO1xuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiBSZXRyeSBmdW5jdGlvbiBpZiBjcmVhdGUgbmV3IHRva2VuIGFjY291aW50XG4gICAgICpcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gbWludFxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBvd25lclxuICAgICAqIEBwYXJhbSB7U2VjcmV0fSBmZWVQYXllclxuICAgICAqIEByZXR1cm5zIFByb21pc2U8c3RyaW5nPlxuICAgICAqL1xuICAgIGV4cG9ydCBjb25zdCByZXRyeUdldE9yQ3JlYXRlID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyOiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxzdHJpbmc+ID0+IHtcbiAgICAgIGxldCBjb3VudGVyID0gMTtcbiAgICAgIHdoaWxlIChjb3VudGVyIDwgUkVUUllfT1ZFUl9MSU1JVCkge1xuICAgICAgICB0cnkge1xuICAgICAgICAgIGNvbnN0IGluc3QgPSBhd2FpdCBnZXQobWludCwgb3duZXIsIGZlZVBheWVyLCB0cnVlKTtcblxuICAgICAgICAgIGlmIChpbnN0ICYmIHR5cGVvZiBpbnN0ID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgaW5zdCk7XG4gICAgICAgICAgICByZXR1cm4gaW5zdDtcbiAgICAgICAgICB9IGVsc2UgaWYgKGluc3QgaW5zdGFuY2VvZiBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uKSB7XG4gICAgICAgICAgICAoYXdhaXQgaW5zdC5zdWJtaXQoKSkubWFwKFxuICAgICAgICAgICAgICBhc3luYyAob2s6IHN0cmluZykgPT4ge1xuICAgICAgICAgICAgICAgIGF3YWl0IE5vZGUuY29uZmlybWVkU2lnKG9rKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gaW5zdC5kYXRhO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAoZXJyOiBFcnJvcikgPT4ge1xuICAgICAgICAgICAgICAgIGRlYnVnTG9nKCcjIEVycm9yIHN1Ym1pdCByZXRyeUdldE9yQ3JlYXRlOiAnLCBlcnIpO1xuICAgICAgICAgICAgICAgIHRocm93IGVycjtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgZGVidWdMb2coYCMgcmV0cnk6ICR7Y291bnRlcn0gY3JlYXRlIHRva2VuIGFjY291bnQ6IGAsIGUpO1xuICAgICAgICAgIGRlYnVnTG9nKGAjIG1pbnQ6ICR7bWludH0sIG93bmVyOiAke293bmVyfSwgZmVlUGF5ZXI6ICR7ZmVlUGF5ZXJ9YCk7XG4gICAgICAgIH1cbiAgICAgICAgYXdhaXQgc2xlZXAoUkVUUllfU0xFRVBfVElNRSk7XG4gICAgICAgIGNvdW50ZXIrKztcbiAgICAgIH1cbiAgICAgIHRocm93IEVycm9yKGByZXRyeSBhY3Rpb24gaXMgb3ZlciBsaW1pdCAke1JFVFJZX09WRVJfTElNSVR9YCk7XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIFtNYWluIGxvZ2ljXUdldCBBc3NvY2lhdGVkIHRva2VuIEFjY291bnQuXG4gICAgICogaWYgbm90IGNyZWF0ZWQsIGNyZWF0ZSBuZXcgdG9rZW4gYWNjb3VpbnRcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBtaW50XG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAgICogQHBhcmFtIHtQdWJrZXl9IGZlZVBheWVyXG4gICAgICogQHJldHVybnMgUHJvbWlzZTxzdHJpbmc+XG4gICAgICovXG4gICAgZXhwb3J0IGNvbnN0IG1ha2VPckNyZWF0ZUluc3RydWN0aW9uID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyPzogUHVia2V5LFxuICAgICAgYWxsb3dPd25lck9mZkN1cnZlID0gZmFsc2UsXG4gICAgKTogUHJvbWlzZTx7XG4gICAgICB0b2tlbkFjY291bnQ6IHN0cmluZztcbiAgICAgIGluc3Q6IFRyYW5zYWN0aW9uSW5zdHJ1Y3Rpb24gfCB1bmRlZmluZWQ7XG4gICAgfT4gPT4ge1xuICAgICAgY29uc3QgYXNzb2NpYXRlZFRva2VuQWNjb3VudCA9IGdldEFzc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jKFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSxcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZ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AgaWYgKCFpbnB1dCkge1xuICAgICAgICByZXR1cm4gbnVsbDtcbiAgICAgIH1cbiAgICAgIHJldHVybiBpbnB1dC5tYXAoKGRhdGEpID0+IHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICBhZGRyZXNzOiBkYXRhLmFkZHJlc3MudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBzaGFyZTogZGF0YS5zaGFyZSxcbiAgICAgICAgICB2ZXJpZmllZDogZmFsc2UsXG4gICAgICAgIH07XG4gICAgICB9KTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGludG9Db21wcmVzc2VkTmZ0SW5mcmEgPSAoXG4gICAgICBpbnB1dDogT3B0aW9uPElucHV0Q3JlYXRvcnNbXT4gfCB1bmRlZmluZWQsXG4gICAgKTogSW50ZXJuYWxDcmVhdG9yc1tdID0+IHtcbiAgICAgIGlmICghaW5wdXQpIHtcbiAgICAgICAgcmV0dXJuIFtdO1xuICAgICAgfVxuICAgICAgcmV0dXJuIGlucHV0IS5tYXAoKGRhdGEpID0+IHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICBhZGRyZXNzOiBkYXRhLmFkZHJlc3MudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBzaGFyZTogZGF0YS5zaGFyZSxcbiAgICAgICAgICB2ZXJpZmllZDogZmFsc2UsXG4gICAgICAgIH07XG4gICAgICB9KTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGludG9Vc2VyID0gKFxuICAgICAgb3V0cHV0OiBPcHRpb248SW50ZXJuYWxDcmVhdG9yc1tdPixcbiAgICApOiBDcmVhdG9yc1tdIHwgdW5kZWZpbmVkID0+IHtcbiAgICAgIGlmICghb3V0cHV0KSB7XG4gICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBvdXRwdXQubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgIC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bWlzZTxSZXN1bHQ8c3RyaW5nLCBFcnJvcj4+LFxuICAgICAgc3RvcmFnZVR5cGU6IFN0b3JhZ2VUeXBlLFxuICAgICAgZmVlUGF5ZXI/OiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxQcm9wZXJ0aWVzPiA9PiB7XG4gICAgICBpZiAoIWlucHV0IHx8ICFpbnB1dC5maWxlcykge1xuICAgICAgICByZXR1cm4ge307XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGZpbGVzID0gYXdhaXQgUHJvbWlzZS5hbGwoXG4gICAgICAgIGlucHV0LmZpbGVzLm1hcChhc3luYyAoZmlsZSkgPT4ge1xuICAgICAgICAgIGlmICghZmlsZS5maWxlUGF0aCkge1xuICAgICAgICAgICAgcmV0dXJuIHt9O1xuICAgICAgICAgIH1cbiAgICAgICAgICBjb25zdCByZXMgPSBhd2FpdCBjYWxsYmFja0Z1bmMoZmlsZS5maWxlUGF0aCwgc3RvcmFnZVR5cGUsIGZlZVBheWVyKTtcbiAgICAgICAgICBpZiAocmVzLmlzRXJyKSB7XG4gICAgICAgICAgICB0aHJvdyBFcnJvcihyZXMuZXJyb3IubWVzc2FnZSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBvdmVyd3JpdGVPYmplY3QoZmlsZSwgW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBleGlzdHNLZXk6ICdmaWxlUGF0aCcsXG4gICAgICAgICAgICAgIHdpbGw6IHsga2V5OiAndXJpJywgdmFsdWU6IHJlcy52YWx1ZSB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICBdKTtcbiAgICAgICAgfSksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHsgLi4uaW5wdXQsIGZpbGVzIH0gYXMgUHJvcGVydGllcztcbiAgICB9O1xuICB9XG59XG4iLCAiLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLXVudXNlZC12YXJzICovXG5pbXBvcnQgeyBPcHR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21wcmVzc2VkTmZ0TWV0YWRhdGEiLCAiQ29udmVydGVyIiwgIlJveWFsdHkiLCAiQ29udmVydGVyIiwgIk5mdCIsICJDb252ZXJ0ZXIiLCAiTWVtbyIsICJDb252ZXJ0ZXIiLCAiTWludCIsICJDb252ZXJ0ZXIiLCAiUmVndWxhck5mdE1ldGFkYXRhIiwgIkNvbnZlcnRlciIsICJQcm9wZXJ0aWVzIiwgIkNvbnZlcnRlciIsICJVc2VzIiwgIkNvbnZlcnRlciIsICJUb2tlbk1ldGFkYXRhIiwgIkNvbnZlcnRlciIsICJUcmFuc2ZlckNoZWNrZWQiLCAiQ29udmVydGVyIiwgIlRyYW5zZmVyIiwgIkNvbnZlcnRlciIsICJWYWxpZGF0b3IiLCAiTWVzc2FnZSIsICJDb252ZXJ0ZXIiXQp9Cg== \ No newline at end of file diff --git a/packages/shared/dist/index.mjs b/packages/shared/dist/index.mjs deleted file mode 100644 index 2da821aa4..000000000 --- a/packages/shared/dist/index.mjs +++ /dev/null @@ -1,1554 +0,0 @@ -// src/constants.ts -import { PublicKey } from "@solana/web3.js"; -import SolanaJsonConfig from "@solana-suite/config/load"; -var Config = SolanaJsonConfig; -var Constants; -((Constants2) => { - let WarnningMessage; - ((WarnningMessage2) => { - const THRESHHOLD = 50; - let isDisplay = false; - WarnningMessage2.NFT_STORAGE_API_KEY = ` - [YOU HAVE TO DO] - -------------------------------------- - You need to update nftStorageApiKey define parameter in solana-suite.json. - Can get api key from https://nft.storage/ - -------------------------------------- - `; - WarnningMessage2.DAS_API_URL = ` - [YOU HAVE TO DO] - -------------------------------------- - You need to update dasApiUrl define parameter in solana-suite.json. - can get api url from https://www.helius.dev/ - -------------------------------------- - `; - WarnningMessage2.ANNOUNCE = ` - [DEPRECATED] - -------------------------------------- - Account, Node, toExplorer, Pubkey, Secret have been moved to - @solana-suite/utils - ------------------------------------- - `; - WarnningMessage2.calculateProbability = () => { - const randomValue = Math.random(); - const probability = 1 / THRESHHOLD; - if (!isDisplay && randomValue < probability) { - isDisplay = true; - return true; - } - return false; - }; - })(WarnningMessage = Constants2.WarnningMessage || (Constants2.WarnningMessage = {})); -})(Constants || (Constants = {})); -((Constants2) => { - Constants2.currentCluster = Config.cluster.type; - Constants2.customClusterUrl = Config.cluster.customClusterUrl; - Constants2.isDebugging = Config.debugging; - Constants2.nftStorageApiKey = Config.nftStorageApiKey; - Constants2.dasApiUrl = Config.dasApiUrl; - let Cluster; - ((Cluster2) => { - Cluster2["prd"] = "mainnet-beta"; - Cluster2["prdMetaplex"] = "mainnet-beta-metaplex"; - Cluster2["dev"] = "devnet"; - Cluster2["test"] = "testnet"; - Cluster2["localhost"] = "localhost-devnet"; - })(Cluster = Constants2.Cluster || (Constants2.Cluster = {})); - let EndPointUrl; - ((EndPointUrl2) => { - EndPointUrl2["prd"] = "https://api.mainnet-beta.solana.com"; - EndPointUrl2["prdMetaplex"] = "https://api.metaplex.solana.com"; - EndPointUrl2["dev"] = "https://api.devnet.solana.com"; - EndPointUrl2["test"] = "https://api.testnet.solana.com"; - EndPointUrl2["localhost"] = "http://api.devnet.solana.com"; - })(EndPointUrl = Constants2.EndPointUrl || (Constants2.EndPointUrl = {})); - let BundlrUrl; - ((BundlrUrl2) => { - BundlrUrl2["prd"] = "https://node1.irys.xyz,https://node2.irys.xyz"; - BundlrUrl2["dev"] = "https://devnet.irys.xyz"; - })(BundlrUrl = Constants2.BundlrUrl || (Constants2.BundlrUrl = {})); - let DasApiUrl; - ((DasApiUrl2) => { - DasApiUrl2["dev"] = "https://devnet.helius-rpc.com/?api-key=15319bf4-5b40-4958-ac8d-6313aa55eb92,https://rpc-devnet.helius.xyz?api-key=9f70a843-3274-4ffd-a0a9-323f8b7c0639"; - })(DasApiUrl = Constants2.DasApiUrl || (Constants2.DasApiUrl = {})); - let NftstorageApiKey; - ((NftstorageApiKey2) => { - NftstorageApiKey2["dev"] = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJkaWQ6ZXRocjoweERGMjcyN2VkODZhRGU1RTMyZDZDZEJlODc0YzRFNDlEODY1OWZmOEMiLCJpc3MiOiJuZnQtc3RvcmFnZSIsImlhdCI6MTYyMDI2NDk0MzcwNiwibmFtZSI6ImRlbW8ifQ.d4J70mikxRB8a5vwNu6SO5HDA8JaueuseAj7Q_ytMCE"; - })(NftstorageApiKey = Constants2.NftstorageApiKey || (Constants2.NftstorageApiKey = {})); - Constants2.loadConfig = async () => { - Config = await import("@solana-suite/config/load"); - }; - Constants2.switchCluster = (param) => { - const { cluster: env, customClusterUrl: customClusterUrl2 } = param; - if (customClusterUrl2 && customClusterUrl2.length > 0) { - const index = Date.now() % customClusterUrl2.length; - return customClusterUrl2[index]; - } - switch (env) { - case "mainnet-beta" /* prd */: - return "https://api.mainnet-beta.solana.com" /* prd */; - case "mainnet-beta-metaplex" /* prdMetaplex */: - return "https://api.metaplex.solana.com" /* prdMetaplex */; - case "testnet" /* test */: - return "https://api.testnet.solana.com" /* test */; - case "devnet" /* dev */: - return "https://api.devnet.solana.com" /* dev */; - default: - return "http://api.devnet.solana.com" /* localhost */; - } - }; - Constants2.switchBundlr = (env) => { - switch (env) { - case "mainnet-beta" /* prd */: { - const urls = "https://node1.irys.xyz,https://node2.irys.xyz" /* prd */.split(","); - const index = Date.now() % urls.length; - return urls[index]; - } - default: { - return "https://devnet.irys.xyz" /* dev */; - } - } - }; - Constants2.switchDasApi = (env) => { - switch (env) { - case "mainnet-beta" /* prd */: { - if (Constants2.dasApiUrl.length < 1) { - throw Error(Constants2.WarnningMessage.DAS_API_URL); - } - const urls = "https://node1.irys.xyz,https://node2.irys.xyz" /* prd */.split(","); - const index = Date.now() % urls.length; - return urls[index]; - } - default: { - const urls = "https://devnet.helius-rpc.com/?api-key=15319bf4-5b40-4958-ac8d-6313aa55eb92,https://rpc-devnet.helius.xyz?api-key=9f70a843-3274-4ffd-a0a9-323f8b7c0639" /* dev */.split(","); - const index = Date.now() % urls.length; - return urls[index]; - } - } - }; - Constants2.switchNftStorage = (env) => { - switch (env) { - case "mainnet-beta" /* prd */: - if (!Constants2.nftStorageApiKey) { - throw Error(Constants2.WarnningMessage.NFT_STORAGE_API_KEY); - } - return Constants2.nftStorageApiKey; - default: { - return "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJkaWQ6ZXRocjoweERGMjcyN2VkODZhRGU1RTMyZDZDZEJlODc0YzRFNDlEODY1OWZmOEMiLCJpc3MiOiJuZnQtc3RvcmFnZSIsImlhdCI6MTYyMDI2NDk0MzcwNiwibmFtZSI6ImRlbW8ifQ.d4J70mikxRB8a5vwNu6SO5HDA8JaueuseAj7Q_ytMCE" /* dev */; - } - } - }; - Constants2.WRAPPED_TOKEN_PROGRAM_ID = new PublicKey( - "So11111111111111111111111111111111111111112" - ); - Constants2.MEMO_PROGRAM_ID = new PublicKey( - "Memo1UhkJRfHyvLMcVucJwxXeuD728EqVDDwQDxFMNo" - ); - Constants2.METAPLEX_PROGRAM_ID = new PublicKey( - "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s" - ); - Constants2.COMMITMENT = "confirmed"; - Constants2.NFT_STORAGE_GATEWAY_URL = "https://ipfs.io/ipfs"; - Constants2.IRYS_GATEWAY_URL = "https://gateway.irys.xyz"; - Constants2.BUNDLR_NETWORK_URL = (0, Constants2.switchBundlr)(Config.cluster.type); - Constants2.DAS_API_URL = (0, Constants2.switchDasApi)(Config.cluster.type); - Constants2.NFT_STORAGE_API_KEY = (0, Constants2.switchNftStorage)(Config.cluster.type); - Constants2.EXPLORER_SOLSCAN_URL = "https://solscan.io"; - Constants2.EXPLORER_SOLANAFM_URL = "https://solana.fm"; - Constants2.EXPLORER_XRAY_URL = "https://xray.helius.xyz"; -})(Constants || (Constants = {})); -console.log(Constants.WarnningMessage.ANNOUNCE); - -// ../transaction-builder/src/batch.ts -import { - sendAndConfirmTransaction as sendAndConfirmTransaction2, - Transaction as Transaction2 -} from "@solana/web3.js"; - -// ../node/src/index.ts -import { Connection } from "@solana/web3.js"; -var Node; -((Node2) => { - const setted = { - clusterUrl: "", - commitment: Constants.COMMITMENT, - customClusterUrl: [] - }; - Node2.getConnection = () => { - if (setted.customClusterUrl.length > 0) { - setted.clusterUrl = Constants.switchCluster({ - customClusterUrl: setted.customClusterUrl - }); - } else if (Constants.customClusterUrl.length > 0) { - setted.clusterUrl = Constants.switchCluster({ - customClusterUrl: Constants.customClusterUrl - }); - } else if (!setted.clusterUrl) { - setted.clusterUrl = Constants.switchCluster({ - cluster: Constants.currentCluster - }); - } - if (!setted.commitment) { - setted.commitment = Constants.COMMITMENT; - } - return new Connection(setted.clusterUrl, setted.commitment); - }; - Node2.changeConnection = (param) => { - setted.clusterUrl = ""; - setted.customClusterUrl = []; - setted.commitment = Constants.COMMITMENT; - const { cluster, commitment, customClusterUrl } = param; - if (commitment) { - setted.commitment = commitment; - debugLog("# Node change commitment: ", setted.commitment); - } - if (cluster) { - setted.clusterUrl = Constants.switchCluster({ cluster }); - debugLog("# Node change clusterUrl: ", setted.clusterUrl); - } - if (customClusterUrl) { - debugLog("# customClusterUrl: ", customClusterUrl); - setted.clusterUrl = Constants.switchCluster({ customClusterUrl }); - setted.customClusterUrl = customClusterUrl; - debugLog( - "# Node change cluster, custom cluster url: ", - setted.clusterUrl - ); - } - }; - Node2.confirmedSig = async (signature, commitment = Constants.COMMITMENT) => { - const connection = Node2.getConnection(); - const latestBlockhash = await connection.getLatestBlockhash(); - return await connection.confirmTransaction( - { - blockhash: latestBlockhash.blockhash, - lastValidBlockHeight: latestBlockhash.lastValidBlockHeight, - signature - }, - commitment - ).then(Result.ok).catch(Result.err); - }; -})(Node || (Node = {})); - -// ../transaction-builder/src/common.ts -import { - sendAndConfirmTransaction, - Transaction -} from "@solana/web3.js"; -var MAX_RETRIES = 3; -var TransactionBuilder; -((TransactionBuilder7) => { - class Common2 { - static MAX_TRANSACTION_SIZE = 1232; - instructions; - signers; - feePayer; - data; - constructor(instructions, signers, feePayer, data) { - this.instructions = instructions; - this.signers = signers; - this.feePayer = feePayer; - this.data = data; - } - submit = async () => { - return Try(async () => { - if (!(this instanceof Common2)) { - throw Error("only Instruction object that can use this"); - } - const transaction = new Transaction(); - const blockhashObj = await Node.getConnection().getLatestBlockhash(); - transaction.lastValidBlockHeight = blockhashObj.lastValidBlockHeight; - transaction.recentBlockhash = blockhashObj.blockhash; - let finalSigners = this.signers; - if (this.feePayer) { - transaction.feePayer = this.feePayer.publicKey; - finalSigners = [this.feePayer, ...this.signers]; - } - this.instructions.forEach((inst) => transaction.add(inst)); - const options = { - maxRetries: MAX_RETRIES - }; - return await sendAndConfirmTransaction( - Node.getConnection(), - transaction, - finalSigners, - options - ); - }); - }; - } - TransactionBuilder7.Common = Common2; -})(TransactionBuilder || (TransactionBuilder = {})); - -// src/shared.ts -var bufferToArray = (buffer) => { - const nums = []; - for (const byte of buffer) { - nums.push(buffer[byte]); - } - return nums; -}; -var overwriteObject = (object, targets) => { - const that = object; - targets.forEach((target) => { - delete that[target.existsKey]; - that[target.will.key] = target.will.value; - }); - return that; -}; -var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { - if (Constants.isDebugging === "true" || process.env.DEBUG === "true") { - console.log("[DEBUG]", data1, data2, data3, data4); - } -}; -var sleep = async (sec) => { - return new Promise((r) => setTimeout(r, sec * 1e3)); -}; -var isBrowser = () => { - return typeof window !== "undefined" && typeof window.document !== "undefined"; -}; -var isNode = () => { - return typeof process !== "undefined" && process.versions != null && process.versions.node != null; -}; -var isPromise = (obj) => { - return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; -}; -function Try(input, finallyInput) { - try { - const v = input(); - if (isPromise(v)) { - return v.then( - (x) => Result.ok(x), - (err) => Result.err(err) - ); - } else { - return Result.ok(v); - } - } catch (e) { - if (e instanceof Error) { - return Result.err(e); - } - return Result.err(Error(e)); - } finally { - if (finallyInput) { - debugLog("# finally input:", finallyInput); - finallyInput(); - } - } -} -var convertTimestampToDateTime = (created_at) => { - if (created_at) { - return new Date(created_at * 1e3); - } - return; -}; -var unixTimestamp = () => { - return Math.floor((/* @__PURE__ */ new Date()).getTime() / 1e3); -}; - -// ../transaction-builder/src/batch.ts -var TransactionBuilder2; -((TransactionBuilder7) => { - class Batch { - submit = async (arr) => { - return Try(async () => { - let i = 0; - for (const a of arr) { - if (!a.instructions && !a.signers) { - throw Error( - `only Instruction object that can use batchSubmit(). - Index: ${i}, Set value: ${JSON.stringify(a)}` - ); - } - i++; - } - const instructions = arr.flatMap((a) => a.instructions); - const signers = arr.flatMap((a) => a.signers); - const feePayers = arr.filter((a) => a.feePayer !== void 0); - let feePayer = signers[0]; - if (feePayers.length > 0 && feePayers[0].feePayer) { - feePayer = feePayers[0].feePayer; - } - const transaction = new Transaction2(); - let finalSigners = signers; - if (feePayer) { - transaction.feePayer = feePayer.publicKey; - finalSigners = [feePayer, ...signers]; - } - instructions.map((inst) => transaction.add(inst)); - const options = { - maxRetries: MAX_RETRIES - }; - return await sendAndConfirmTransaction2( - Node.getConnection(), - transaction, - finalSigners, - options - ); - }); - }; - } - TransactionBuilder7.Batch = Batch; -})(TransactionBuilder2 || (TransactionBuilder2 = {})); - -// ../transaction-builder/src/mint.ts -import { - sendAndConfirmTransaction as sendAndConfirmTransaction3, - Transaction as Transaction3 -} from "@solana/web3.js"; -var TransactionBuilder3; -((TransactionBuilder7) => { - class Mint { - instructions; - signers; - feePayer; - data; - constructor(instructions, signers, feePayer, data) { - this.instructions = instructions; - this.signers = signers; - this.data = data; - this.feePayer = feePayer; - } - submit = async () => { - return Try(async () => { - if (!(this instanceof Mint)) { - throw Error("only MintInstruction object that can use this"); - } - const transaction = new Transaction3(); - const blockhashObj = await Node.getConnection().getLatestBlockhash(); - transaction.lastValidBlockHeight = blockhashObj.lastValidBlockHeight; - transaction.recentBlockhash = blockhashObj.blockhash; - let finalSigners = this.signers; - if (this.feePayer) { - transaction.feePayer = this.feePayer.publicKey; - finalSigners = [this.feePayer, ...this.signers]; - } - this.instructions.forEach((inst) => transaction.add(inst)); - const options = { - maxRetries: MAX_RETRIES - }; - if (Node.getConnection().rpcEndpoint === Constants.EndPointUrl.prd) { - debugLog("# Change metaplex cluster on mainnet-beta"); - Node.changeConnection({ cluster: Constants.Cluster.prdMetaplex }); - } - return await sendAndConfirmTransaction3( - Node.getConnection(), - transaction, - finalSigners, - options - ); - }); - }; - } - TransactionBuilder7.Mint = Mint; -})(TransactionBuilder3 || (TransactionBuilder3 = {})); - -// ../transaction-builder/src/partial-sign.ts -import { - Transaction as Transaction4 -} from "@solana/web3.js"; -var TransactionBuilder4; -((TransactionBuilder7) => { - class PartialSign { - hexInstruction; - data; - canSubmit; - constructor(instructions, mint, canSubmit = false) { - this.hexInstruction = instructions; - this.data = mint; - this.canSubmit = canSubmit; - } - submit = async (feePayer) => { - return Try(async () => { - if (!(this instanceof PartialSign)) { - throw Error("only PartialSignInstruction object that can use this"); - } - const decode = Buffer.from(this.hexInstruction, "hex"); - const transactionFromJson = Transaction4.from(decode); - transactionFromJson.partialSign(feePayer.toKeypair()); - const options = { - maxRetries: MAX_RETRIES - }; - const wireTransaction = transactionFromJson.serialize(); - return await Node.getConnection().sendRawTransaction( - wireTransaction, - options - ); - }); - }; - } - TransactionBuilder7.PartialSign = PartialSign; -})(TransactionBuilder4 || (TransactionBuilder4 = {})); - -// ../transaction-builder/src/calculate-txsize.ts -var TransactionBuilder5; -((TransactionBuilder7) => { - const LOW_VALUE = 127; - const HIGH_VALUE = 16383; - const MAX_TRANSACTION_SIZE = 1232; - const compactHeader = (n) => n <= LOW_VALUE ? 1 : n <= HIGH_VALUE ? 2 : 3; - const compactArraySize = (n, size) => compactHeader(n) + n * size; - TransactionBuilder7.calculateTxSize = (transaction, feePayer) => { - const feePayerPk = [feePayer.toBase58()]; - const signers = new Set(feePayerPk); - const accounts = new Set(feePayerPk); - const ixsSize = transaction.instructions.reduce((acc, ix) => { - ix.keys.forEach(({ pubkey, isSigner }) => { - const pk = pubkey.toBase58(); - if (isSigner) - signers.add(pk); - accounts.add(pk); - }); - accounts.add(ix.programId.toBase58()); - const nIndexes = ix.keys.length; - const opaqueData = ix.data.length; - return acc + 1 + // PID index - compactArraySize(nIndexes, 1) + compactArraySize(opaqueData, 1); - }, 0); - return compactArraySize(signers.size, 64) + // signatures - 3 + // header - compactArraySize(accounts.size, 32) + // accounts - 32 + // blockhash - compactHeader(transaction.instructions.length) + // instructions - ixsSize; - }; - TransactionBuilder7.isOverTransactionSize = (transaction, feePayer) => { - return (0, TransactionBuilder7.calculateTxSize)(transaction, feePayer) > MAX_TRANSACTION_SIZE; - }; -})(TransactionBuilder5 || (TransactionBuilder5 = {})); - -// ../types/src/global/index.ts -var Explorer = /* @__PURE__ */ ((Explorer2) => { - Explorer2["Solscan"] = "solscan"; - Explorer2["SolanaFM"] = "solanafm"; - Explorer2["Xray"] = "xray"; - return Explorer2; -})(Explorer || {}); - -// ../global/src/index.ts -import { Keypair as Keypair3, LAMPORTS_PER_SOL, PublicKey as PublicKey4 } from "@solana/web3.js"; - -// ../account/src/associated.ts -import { - ASSOCIATED_TOKEN_PROGRAM_ID, - createAssociatedTokenAccountInstruction, - getAccount, - getAssociatedTokenAddressSync, - TOKEN_PROGRAM_ID, - TokenAccountNotFoundError, - TokenInvalidAccountOwnerError -} from "@solana/spl-token"; - -// ../account/src/keypair.ts -import { Keypair as Original, PublicKey as PublicKey2 } from "@solana/web3.js"; -import bs from "bs58"; -var Account; -((Account5) => { - class Keypair4 { - secret; - pubkey; - constructor(params) { - if (!params.pubkey) { - const keypair = params.secret.toKeypair(); - this.pubkey = keypair.publicKey.toString(); - } else { - this.pubkey = params.pubkey; - } - this.secret = params.secret; - } - toPublicKey() { - return new PublicKey2(this.pubkey); - } - toKeypair() { - const decoded = bs.decode(this.secret); - return Original.fromSecretKey(decoded); - } - static isPubkey = (value) => /^[0-9a-zA-Z]{32,44}$/.test(value); - static isSecret = (value) => /^[0-9a-zA-Z]{87,88}$/.test(value); - static create = () => { - const keypair = Original.generate(); - return new Keypair4({ - pubkey: keypair.publicKey.toString(), - secret: bs.encode(keypair.secretKey) - }); - }; - static toKeyPair = (keypair) => { - return new Keypair4({ - pubkey: keypair.publicKey.toString(), - secret: bs.encode(keypair.secretKey) - }); - }; - } - Account5.Keypair = Keypair4; -})(Account || (Account = {})); - -// ../account/src/associated.ts -var Account2; -((Account5) => { - let Associated; - ((Associated2) => { - const RETRY_OVER_LIMIT = 10; - const RETRY_SLEEP_TIME = 3; - const get = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const res = await (0, Associated2.makeOrCreateInstruction)( - mint, - owner, - new Account.Keypair({ secret: feePayer }).pubkey, - allowOwnerOffCurve - ); - if (!res.inst) { - return res.tokenAccount; - } - return new TransactionBuilder6.Common( - [res.inst], - [], - feePayer.toKeypair(), - res.tokenAccount - ); - }; - Associated2.retryGetOrCreate = async (mint, owner, feePayer) => { - let counter = 1; - while (counter < RETRY_OVER_LIMIT) { - try { - const inst = await get(mint, owner, feePayer, true); - if (inst && typeof inst === "string") { - debugLog("# associatedTokenAccount: ", inst); - return inst; - } else if (inst instanceof TransactionBuilder6.Common) { - (await inst.submit()).map( - async (ok) => { - await Node.confirmedSig(ok); - return inst.data; - }, - (err) => { - debugLog("# Error submit retryGetOrCreate: ", err); - throw err; - } - ); - } - } catch (e) { - debugLog(`# retry: ${counter} create token account: `, e); - debugLog(`# mint: ${mint}, owner: ${owner}, feePayer: ${feePayer}`); - } - await sleep(RETRY_SLEEP_TIME); - counter++; - } - throw Error(`retry action is over limit ${RETRY_OVER_LIMIT}`); - }; - Associated2.makeOrCreateInstruction = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const associatedTokenAccount = getAssociatedTokenAddressSync( - mint.toPublicKey(), - owner.toPublicKey(), - allowOwnerOffCurve, - TOKEN_PROGRAM_ID, - ASSOCIATED_TOKEN_PROGRAM_ID - ); - debugLog("# associatedTokenAccount: ", associatedTokenAccount.toString()); - try { - await getAccount( - Node.getConnection(), - associatedTokenAccount, - Node.getConnection().commitment, - TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst: void 0 - }; - } catch (error) { - if (!(error instanceof TokenAccountNotFoundError) && !(error instanceof TokenInvalidAccountOwnerError)) { - throw Error("Unexpected error"); - } - const payer = !feePayer ? owner : feePayer; - const inst = createAssociatedTokenAccountInstruction( - payer.toPublicKey(), - associatedTokenAccount, - owner.toPublicKey(), - mint.toPublicKey(), - TOKEN_PROGRAM_ID, - ASSOCIATED_TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst - }; - } - }; - })(Associated = Account5.Associated || (Account5.Associated = {})); -})(Account2 || (Account2 = {})); - -// ../account/src/pda.ts -import { PublicKey as PublicKey3 } from "@solana/web3.js"; -import { PROGRAM_ID } from "@metaplex-foundation/mpl-token-metadata"; -import { MPL_BUBBLEGUM_PROGRAM_ID } from "@metaplex-foundation/mpl-bubblegum"; -import BN from "bn.js"; -var Account3; -((Account5) => { - let Pda; - ((Pda2) => { - Pda2.getMetadata = (address) => { - const [publicKey] = PublicKey3.findProgramAddressSync( - [ - Buffer.from("metadata"), - PROGRAM_ID.toBuffer(), - address.toPublicKey().toBuffer() - ], - PROGRAM_ID - ); - return publicKey; - }; - Pda2.getMasterEdition = (address) => { - const [publicKey] = PublicKey3.findProgramAddressSync( - [ - Buffer.from("metadata"), - PROGRAM_ID.toBuffer(), - address.toPublicKey().toBuffer(), - Buffer.from("edition") - ], - PROGRAM_ID - ); - return publicKey; - }; - Pda2.getTreeAuthority = (address) => { - const [publicKey] = PublicKey3.findProgramAddressSync( - [address.toPublicKey().toBuffer()], - MPL_BUBBLEGUM_PROGRAM_ID.toPublicKey() - ); - return publicKey; - }; - Pda2.getBgumSigner = () => { - const [publicKey] = PublicKey3.findProgramAddressSync( - [Buffer.from("collection_cpi", "utf8")], - MPL_BUBBLEGUM_PROGRAM_ID.toPublicKey() - ); - return publicKey; - }; - Pda2.getAssetId = (address, leafIndex) => { - const node = new BN.BN(leafIndex); - const [assetId] = PublicKey3.findProgramAddressSync( - [ - Buffer.from("asset", "utf8"), - address.toPublicKey().toBuffer(), - Uint8Array.from(node.toArray("le", 8)) - ], - MPL_BUBBLEGUM_PROGRAM_ID.toPublicKey() - ); - return assetId.toString(); - }; - })(Pda = Account5.Pda || (Account5.Pda = {})); -})(Account3 || (Account3 = {})); - -// ../account/src/index.ts -var Account4 = { - ...Account2, - ...Account, - ...Account3 -}; - -// ../global/src/index.ts -import { BigNumber } from "bignumber.js"; -import bs2 from "bs58"; -String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, options = {}) { - const endPointUrl = Node.getConnection().rpcEndpoint; - debugLog("# toExplorerUrl rpcEndpoint:", endPointUrl); - let cluster = ""; - if (endPointUrl === Constants.EndPointUrl.prd) { - cluster = Constants.Cluster.prd; - } else if (endPointUrl === Constants.EndPointUrl.test) { - cluster = Constants.Cluster.test; - } else if (endPointUrl === Constants.EndPointUrl.dev) { - cluster = Constants.Cluster.dev; - } else { - cluster = Constants.Cluster.dev; - } - const addressOrSignature = this.toString(); - let url = ""; - if (options.replacePath) { - if (explorer === "solanafm" /* SolanaFM */) { - url = `${Constants.EXPLORER_SOLANAFM_URL}/${options.replacePath}/${addressOrSignature}?cluster=${cluster}`; - } else if (explorer === "xray" /* Xray */) { - url = `${Constants.EXPLORER_XRAY_URL}/${options.replacePath}/${addressOrSignature}?network=${cluster}`; - } else { - url = `${Constants.EXPLORER_SOLSCAN_URL}/${options.replacePath}/${addressOrSignature}?cluster=${cluster}`; - } - return url; - } - if (Account4.Keypair.isPubkey(addressOrSignature)) { - if (explorer === "solanafm" /* SolanaFM */) { - url = `${Constants.EXPLORER_SOLANAFM_URL}/address/${addressOrSignature}?cluster=${cluster}`; - } else if (explorer === "xray" /* Xray */) { - url = `${Constants.EXPLORER_XRAY_URL}/account/${addressOrSignature}?network=${cluster}`; - } else { - url = `${Constants.EXPLORER_SOLSCAN_URL}/account/${addressOrSignature}?cluster=${cluster}`; - } - } else { - if (explorer === "solanafm" /* SolanaFM */) { - url = `${Constants.EXPLORER_SOLANAFM_URL}/tx/${addressOrSignature}?cluster=${cluster}`; - } else if (explorer === "xray" /* Xray */) { - url = `${Constants.EXPLORER_XRAY_URL}/tx/${addressOrSignature}?network=${cluster}`; - } else { - url = `${Constants.EXPLORER_SOLSCAN_URL}/tx/${addressOrSignature}?cluster=${cluster}`; - } - } - return url; -}; -String.prototype.toPublicKey = function() { - if (!Account4.Keypair.isPubkey(this.toString())) { - throw Error(`No match KeyPair.PubKey: ${this.toString()}`); - } - return new PublicKey4(this.toString()); -}; -String.prototype.toKeypair = function() { - if (!Account4.Keypair.isSecret(this.toString())) { - throw Error(`No match KeyPair.Secret: ${this.toString()}`); - } - const decoded = bs2.decode(this.toString()); - return Keypair3.fromSecretKey(decoded); -}; -Number.prototype.toSol = function() { - return BigNumber(this).div(LAMPORTS_PER_SOL).toNumber(); -}; -Number.prototype.toLamports = function() { - return BigNumber(this).times(LAMPORTS_PER_SOL).toNumber(); -}; - -// ../transaction-builder/src/index.ts -var TransactionBuilder6 = { - ...TransactionBuilder2, - ...TransactionBuilder5, - ...TransactionBuilder3, - ...TransactionBuilder, - ...TransactionBuilder4 -}; - -// src/result.ts -var AbstractResult = class { - unwrap(ok, err) { - const r = this._chain( - (value) => Result.ok(ok ? ok(value) : value), - (error) => err ? Result.ok(err(error)) : Result.err(error) - ); - if (r.isErr) { - throw r.error; - } - return r.value; - } - map(ok, err) { - return this._chain( - (value) => Result.ok(ok(value)), - (error) => Result.err(err ? err(error) : error) - ); - } - chain(ok, err) { - return this._chain(ok, err || ((error) => Result.err(error))); - } - match(ok, err) { - this._chain( - (value) => Result.ok(ok(value)), - (error) => Result.err(err(error)) - ); - } - /// single TransactionBuilder //// - /* eslint-disable @typescript-eslint/no-explicit-any */ - async submit(feePayer) { - const res = this.map( - async (ok) => { - debugLog("# result single submit: ", ok); - if (feePayer) { - const obj = ok; - return await obj.submit(feePayer); - } else { - const obj = ok; - return await obj.submit(); - } - }, - (err) => { - return err; - } - ); - if (res.isErr) { - return Result.err(res.error); - } - return res.value; - } -}; -Array.prototype.submit = async function(feePayer) { - if (feePayer) { - let i = 1; - for await (const obj of this) { - if (obj.isErr) { - return obj; - } else if (obj.value.canSubmit) { - debugLog("# Result batch canSubmit"); - const sig = await obj.submit(feePayer); - if (sig.isErr) { - return sig; - } - await Node.confirmedSig(sig.value); - } else { - debugLog("# Result batch other than canSubmit"); - if (this.length == i) { - return obj.submit(feePayer); - } - obj.submit(feePayer); - } - i++; - } - } else { - const instructions = []; - for (const obj of this) { - if (obj.isErr) { - return obj; - } else if (obj.isOk) { - instructions.push(obj.value); - } else { - return Result.err(Error("Only Array Instruction object")); - } - } - debugLog("# Result batch submit: ", instructions); - return new TransactionBuilder6.Batch().submit(instructions); - } -}; -var InternalOk = class extends AbstractResult { - constructor(value) { - super(); - this.value = value; - } - isOk = true; - isErr = false; - /* eslint-disable @typescript-eslint/no-unused-vars */ - _chain(ok, _err) { - return ok(this.value); - } -}; -var InternalErr = class extends AbstractResult { - constructor(error) { - super(); - this.error = error; - } - isOk = false; - isErr = true; - _chain(_ok, err) { - return err(this.error); - } -}; -var Result; -((Result7) => { - function ok(value) { - return new InternalOk(value); - } - Result7.ok = ok; - function err(error) { - return new InternalErr(error || Error()); - } - Result7.err = err; - function all(obj) { - if (Array.isArray(obj)) { - const resArr = []; - for (const item of obj) { - if (item.isErr) { - return item; - } - resArr.push(item.value); - } - return Result7.ok(resArr); - } - const res = {}; - const keys = Object.keys(obj); - for (const key of keys) { - const item = obj[key]; - if (item.isErr) { - return item; - } - res[key] = item.value; - } - return Result7.ok(res); - } - Result7.all = all; -})(Result || (Result = {})); - -// ../converter/src/collection.ts -var Converter; -((Converter15) => { - let Collection; - ((Collection2) => { - Collection2.intoInfra = (input) => { - if (!input) { - return null; - } - return { - key: input.toPublicKey(), - verified: false - }; - }; - Collection2.intoUser = (output) => { - if (!output) { - return void 0; - } - return { - address: output.key.toString(), - verified: output.verified - }; - }; - })(Collection = Converter15.Collection || (Converter15.Collection = {})); - let CollectionMint; - ((CollectionMint2) => { - CollectionMint2.intoUser = (output) => { - const res = output.find((value) => { - if (value.group_key === "collection") { - return value.group_value; - } - }); - return res ? res.group_value : ""; - }; - })(CollectionMint = Converter15.CollectionMint || (Converter15.CollectionMint = {})); -})(Converter || (Converter = {})); - -// ../converter/src/creators.ts -var Converter2; -((Converter15) => { - let Creators; - ((Creators2) => { - Creators2.intoInfra = (input) => { - if (!input) { - return null; - } - return input.map((data) => { - return { - address: data.address.toPublicKey(), - share: data.share, - verified: false - }; - }); - }; - Creators2.intoCompressedNftInfra = (input) => { - if (!input) { - return []; - } - return input.map((data) => { - return { - address: data.address.toPublicKey(), - share: data.share, - verified: false - }; - }); - }; - Creators2.intoUser = (output) => { - if (!output) { - return void 0; - } - return output.map((data) => { - return { - address: data.address.toString(), - share: data.share, - verified: data.verified - }; - }); - }; - })(Creators = Converter15.Creators || (Converter15.Creators = {})); -})(Converter2 || (Converter2 = {})); - -// ../converter/src/compressed-nft-metadata.ts -import { - TokenProgramVersion, - TokenStandard -} from "mpl-bubblegum-instruction"; -var Converter3; -((Converter15) => { - let CompressedNftMetadata; - ((CompressedNftMetadata2) => { - CompressedNftMetadata2.intoInfra = (input, uri, sellerFeeBasisPoints) => { - return { - name: input.name, - symbol: input.symbol, - uri, - sellerFeeBasisPoints, - creators: Converter2.Creators.intoCompressedNftInfra(input.creators), - collection: Converter.Collection.intoInfra(input.collection), - uses: input.uses || null, - primarySaleHappened: false, - isMutable: input.isMutable ?? false, - editionNonce: 0, - tokenStandard: TokenStandard.NonFungible, - tokenProgramVersion: TokenProgramVersion.Original - }; - }; - })(CompressedNftMetadata = Converter15.CompressedNftMetadata || (Converter15.CompressedNftMetadata = {})); -})(Converter3 || (Converter3 = {})); - -// ../converter/src/royalty.ts -var Converter4; -((Converter15) => { - let Royalty; - ((Royalty2) => { - Royalty2.THRESHOLD = 100; - Royalty2.intoInfra = (percentage) => { - return percentage * Royalty2.THRESHOLD; - }; - Royalty2.intoUser = (percentage) => { - return percentage * Royalty2.THRESHOLD; - }; - })(Royalty = Converter15.Royalty || (Converter15.Royalty = {})); -})(Converter4 || (Converter4 = {})); - -// ../converter/src/nft.ts -var Converter5; -((Converter15) => { - let Nft; - ((Nft2) => { - Nft2.intoUser = (output) => { - return { - mint: output.onchain.id.toString(), - collectionMint: Converter.CollectionMint.intoUser( - output.onchain.grouping - ), - authorities: output.onchain.authorities, - royalty: Converter4.Royalty.intoUser(output.onchain.royalty.percent), - name: output.onchain.content.metadata.name, - symbol: output.onchain.content.metadata.symbol, - uri: output.onchain.content.json_uri, - creators: Converter2.Creators.intoUser(output.onchain.creators), - treeAddress: output.onchain.compression.tree, - isCompressed: output.onchain.compression.compressed, - isMutable: output.onchain.mutable, - isBurn: output.onchain.burnt, - editionNonce: output.onchain.supply.edition_nonce, - primarySaleHappened: output.onchain.royalty.primary_sale_happened, - dateTime: convertTimestampToDateTime(output.offchain.created_at), - offchain: output.offchain - }; - }; - })(Nft = Converter15.Nft || (Converter15.Nft = {})); -})(Converter5 || (Converter5 = {})); - -// ../converter/src/memo.ts -var Converter6; -((Converter15) => { - let Memo; - ((Memo2) => { - Memo2.intoUserSide = (output, meta, outputTransfer, mappingTokenAccount) => { - const history = {}; - if (outputTransfer && outputTransfer.program !== "") { - if (mappingTokenAccount && outputTransfer.program === "spl-token") { - const foundSource = mappingTokenAccount.find( - (m) => m.account === outputTransfer.parsed.info.source - ); - const foundDest = mappingTokenAccount.find( - (m) => m.account === outputTransfer.parsed.info.destination - ); - history.mint = outputTransfer.parsed.info.mint; - foundSource && (history.source = foundSource.owner); - foundDest && (history.destination = foundDest.owner); - } else { - history.source = outputTransfer.parsed.info.source; - history.destination = outputTransfer.parsed.info.destination; - } - } - history.memo = output.parsed; - history.type = output.program; - history.dateTime = convertTimestampToDateTime(meta.blockTime); - history.sig = meta.transaction.signatures[0]; - history.innerInstruction = false; - if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { - history.innerInstruction = true; - } - return history; - }; - })(Memo = Converter15.Memo || (Converter15.Memo = {})); -})(Converter6 || (Converter6 = {})); - -// ../converter/src/mint.ts -var Converter7; -((Converter15) => { - let Mint; - ((Mint2) => { - Mint2.intoUserSide = (output, meta) => { - const history = {}; - history.mint = output.parsed.info.mint; - history.mintAuthority = output.parsed.info.mintAuthority; - history.tokenAmount = output.parsed.info.tokenAmount; - history.account = output.parsed.info.account; - history.type = output.program; - history.dateTime = convertTimestampToDateTime(meta.blockTime); - history.sig = meta.transaction.signatures[0]; - history.innerInstruction = false; - if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { - history.innerInstruction = true; - } - return history; - }; - })(Mint = Converter15.Mint || (Converter15.Mint = {})); -})(Converter7 || (Converter7 = {})); - -// ../converter/src/regular-nft-metadata.ts -var Converter8; -((Converter15) => { - let RegularNftMetadata; - ((RegularNftMetadata2) => { - RegularNftMetadata2.intoInfra = (input, uri, sellerFeeBasisPoints) => { - return { - name: input.name, - symbol: input.symbol, - uri, - sellerFeeBasisPoints, - creators: Converter2.Creators.intoInfra(input.creators), - collection: Converter.Collection.intoInfra(input.collection), - uses: input.uses || null - }; - }; - })(RegularNftMetadata = Converter15.RegularNftMetadata || (Converter15.RegularNftMetadata = {})); -})(Converter8 || (Converter8 = {})); - -// ../converter/src/properties.ts -var Converter9; -((Converter15) => { - let Properties; - ((Properties2) => { - Properties2.intoInfra = async (input, callbackFunc, storageType, feePayer) => { - if (!input || !input.files) { - return {}; - } - const files = await Promise.all( - input.files.map(async (file) => { - if (!file.filePath) { - return {}; - } - const res = await callbackFunc(file.filePath, storageType, feePayer); - if (res.isErr) { - throw Error(res.error.message); - } - return overwriteObject(file, [ - { - existsKey: "filePath", - will: { key: "uri", value: res.value } - } - ]); - }) - ); - return { ...input, files }; - }; - })(Properties = Converter15.Properties || (Converter15.Properties = {})); -})(Converter9 || (Converter9 = {})); - -// ../converter/src/uses.ts -var Converter10; -((Converter15) => { - let Uses; - ((Uses2) => { - Uses2.intoUserSide = (output) => { - if (!output) { - return void 0; - } - return output; - }; - })(Uses = Converter15.Uses || (Converter15.Uses = {})); -})(Converter10 || (Converter10 = {})); - -// ../converter/src/token-metadata.ts -var Converter11; -((Converter15) => { - let TokenMetadata; - ((TokenMetadata2) => { - TokenMetadata2.intoInfra = (input, uri, sellerFeeBasisPoints) => { - return { - name: input.name, - symbol: input.symbol, - uri, - sellerFeeBasisPoints, - creators: Converter2.Creators.intoInfra(input.creators), - collection: null, - uses: input.uses || null - }; - }; - TokenMetadata2.intoUser = (output, tokenAmount) => { - return { - mint: output.onchain.mint.toString(), - royalty: output.onchain.data.sellerFeeBasisPoints, - name: (0, TokenMetadata2.deleteNullStrings)(output.onchain.data.name), - symbol: (0, TokenMetadata2.deleteNullStrings)(output.onchain.data.symbol), - tokenAmount, - uri: (0, TokenMetadata2.deleteNullStrings)(output.onchain.data.uri), - creators: Converter2.Creators.intoUser(output.onchain.data.creators), - uses: Converter10.Uses.intoUserSide(output.onchain.uses), - dateTime: convertTimestampToDateTime(output.offchain.created_at), - offchain: output.offchain - }; - }; - TokenMetadata2.deleteNullStrings = (str) => { - return str.replace(/\0/g, ""); - }; - })(TokenMetadata = Converter15.TokenMetadata || (Converter15.TokenMetadata = {})); -})(Converter11 || (Converter11 = {})); - -// ../converter/src/transfer-checked.ts -var Converter12; -((Converter15) => { - let TransferChecked; - ((TransferChecked2) => { - TransferChecked2.intoUserSide = (output, meta, mappingTokenAccount) => { - const history = {}; - if (mappingTokenAccount) { - const foundSource = mappingTokenAccount.find( - (m) => m.account === output.parsed.info.source - ); - const foundDest = mappingTokenAccount.find( - (m) => m.account === output.parsed.info.destination - ); - foundSource && (history.source = foundSource.owner); - foundDest && (history.destination = foundDest.owner); - } - history.tokenAmount = output.parsed.info.tokenAmount; - history.mint = output.parsed.info.mint; - history.multisigAuthority = output.parsed.info.multisigAuthority; - history.signers = output.parsed.info.signers; - history.type = output.program; - history.dateTime = convertTimestampToDateTime(meta.blockTime); - history.sig = meta.transaction.signatures[0]; - history.innerInstruction = false; - if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { - history.innerInstruction = true; - } - return history; - }; - })(TransferChecked = Converter15.TransferChecked || (Converter15.TransferChecked = {})); -})(Converter12 || (Converter12 = {})); - -// ../converter/src/transfer.ts -var Converter13; -((Converter15) => { - let Transfer; - ((Transfer2) => { - Transfer2.intoUserSide = (output, meta) => { - const history = {}; - if (!output.parsed.info.destination || !output.parsed.info.lamports) { - return; - } - history.source = output.parsed.info.source; - history.destination = output.parsed.info.destination; - history.sol = output.parsed.info.lamports?.toSol().toString(); - history.type = output.program; - history.dateTime = convertTimestampToDateTime(meta.blockTime); - history.sig = meta.transaction.signatures[0]; - history.innerInstruction = false; - if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { - history.innerInstruction = true; - } - return history; - }; - })(Transfer = Converter15.Transfer || (Converter15.Transfer = {})); -})(Converter13 || (Converter13 = {})); - -// ../converter/src/index.ts -var Converter14 = { - ...Converter3, - ...Converter, - ...Converter2, - ...Converter5, - ...Converter6, - ...Converter7, - ...Converter8, - ...Converter9, - ...Converter4, - ...Converter11, - ...Converter12, - ...Converter13, - ...Converter10 -}; - -// ../validator/src/index.ts -var Validator; -((Validator2) => { - let Message; - ((Message2) => { - Message2.SUCCESS = "success"; - Message2.SMALL_NUMBER = "too small"; - Message2.BIG_NUMBER = "too big"; - Message2.LONG_LENGTH = "too long"; - Message2.EMPTY = "invalid empty value"; - Message2.INVALID_URL = "invalid url"; - Message2.ONLY_NODE_JS = "`string` type is only Node.js"; - })(Message = Validator2.Message || (Validator2.Message = {})); - Validator2.NAME_LENGTH = 32; - Validator2.SYMBOL_LENGTH = 10; - Validator2.URL_LENGTH = 200; - Validator2.ROYALTY_MAX = 100; - Validator2.SELLER_FEE_BASIS_POINTS_MAX = 1e4; - Validator2.ROYALTY_MIN = 0; - Validator2.isRoyalty = (royalty) => { - return Try(() => { - const key = "royalty"; - if (royalty !== 0 && !royalty) { - throw createError(key, Message.EMPTY, royalty); - } - if (royalty < Validator2.ROYALTY_MIN) { - throw createError(key, Message.SMALL_NUMBER, royalty, { - threshold: Validator2.ROYALTY_MIN, - condition: "underMin" - }); - } else if (royalty > Validator2.ROYALTY_MAX) { - throw createError(key, Message.BIG_NUMBER, royalty, { - threshold: Validator2.ROYALTY_MAX, - condition: "overMax" - }); - } - return Message.SUCCESS; - }); - }; - Validator2.isSellerFeeBasisPoints = (royalty) => { - return Try(() => { - const key = "sellerFeeBasisPoints/seller_fee_basis_points"; - if (royalty !== 0 && !royalty) { - throw createError(key, Message.EMPTY, royalty); - } - if (royalty < Validator2.ROYALTY_MIN) { - throw createError(key, Message.SMALL_NUMBER, royalty, { - threshold: Validator2.ROYALTY_MIN, - condition: "underMin" - }); - } else if (royalty > Validator2.ROYALTY_MAX * Converter14.Royalty.THRESHOLD) { - throw createError(key, Message.BIG_NUMBER, royalty, { - threshold: Validator2.SELLER_FEE_BASIS_POINTS_MAX, - condition: "overMax" - }); - } - return Message.SUCCESS; - }); - }; - Validator2.isName = (name) => { - return Try(() => { - const key = "name"; - if (!name) { - throw createError(key, Message.EMPTY, name); - } - if (byteLength(name) > Validator2.NAME_LENGTH) { - throw createError(key, Message.LONG_LENGTH, name, { - threshold: Validator2.NAME_LENGTH, - condition: "overMax" - }); - } - return Message.SUCCESS; - }); - }; - Validator2.isSymbol = (symbol) => { - return Try(() => { - const key = "symbol"; - if (!symbol) { - throw createError(key, Message.EMPTY, symbol); - } - if (byteLength(symbol) > Validator2.SYMBOL_LENGTH) { - throw createError(key, Message.LONG_LENGTH, symbol, { - threshold: Validator2.SYMBOL_LENGTH, - condition: "overMax" - }); - } - return Message.SUCCESS; - }); - }; - Validator2.isImageUrl = (image) => isUriOrImage(image, "image"); - Validator2.checkAll = (metadata) => { - return Try(() => { - const keys = Object.keys(metadata); - const results = []; - keys.map((key) => { - let res; - switch (key) { - case "image": - if (key in metadata && metadata.image) { - res = (0, Validator2.isImageUrl)(metadata.image); - } - break; - case "royalty": - if (key in metadata && metadata.royalty) { - res = (0, Validator2.isRoyalty)(metadata.royalty); - } - break; - case "seller_fee_basis_points": - if (key in metadata && metadata.seller_fee_basis_points) { - res = (0, Validator2.isSellerFeeBasisPoints)(metadata.seller_fee_basis_points); - } - break; - case "sellerFeeBasisPoints": - if (key in metadata) { - res = (0, Validator2.isSellerFeeBasisPoints)(metadata.sellerFeeBasisPoints); - } - break; - case "name": - if (metadata.name) { - res = (0, Validator2.isName)(metadata.name); - } - break; - case "symbol": - if (metadata.symbol) { - res = (0, Validator2.isSymbol)(metadata.symbol); - } - break; - } - if (res && res.isErr) { - results.push(...res.error.details); - } - }); - if (results.length > 0) { - const message = "Caught in the validation errors. see information e.g: err.details"; - throw new ValidatorError(message, results); - } - return Message.SUCCESS; - }); - }; - const byteLength = (value) => { - const text = new TextEncoder(); - return text.encode(value).length; - }; - const createError = (key, message, actual, limit) => { - let error; - if (limit) { - error = new ValidatorError(message, [{ key, message, actual, limit }]); - } else { - error = new ValidatorError(message, [{ key, message, actual }]); - } - return error; - }; - const isUriOrImage = (imageOrUri, key) => { - return Try(() => { - if (!imageOrUri) { - throw createError(key, Message.EMPTY, imageOrUri); - } - if (byteLength(imageOrUri) > Validator2.URL_LENGTH) { - throw createError(key, Message.LONG_LENGTH, imageOrUri, { - threshold: Validator2.URL_LENGTH, - condition: "overMax" - }); - } - if (!/https?:\/\/[-_.!~*\\()a-zA-Z0-9;?:&=+,%#]+/g.test(imageOrUri)) { - throw createError(key, Message.INVALID_URL, imageOrUri); - } - return Message.SUCCESS; - }); - }; -})(Validator || (Validator = {})); -var ValidatorError = class extends Error { - details; - constructor(message, details) { - super(message); - this.details = details; - } -}; -export { - Account4 as Account, - Constants, - Explorer, - Node, - Result, - Try, - Validator, - ValidatorError, - bufferToArray, - convertTimestampToDateTime, - debugLog, - isBrowser, - isNode, - isPromise, - overwriteObject, - sleep, - unixTimest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bmVycztcblxuICAgICAgICBpZiAodGhpcy5mZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gdGhpcy5mZWVQYXllci5wdWJsaWNLZXk7XG4gICAgICAgICAgZmluYWxTaWduZXJzID0gW3RoaXMuZmVlUGF5ZXIsIC4uLnRoaXMuc2lnbmVyc107XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLmluc3RydWN0aW9ucy5mb3JFYWNoKChpbnN0KSA9PiB0cmFuc2FjdGlvbi5hZGQoaW5zdCkpO1xuXG4gICAgICAgIGNvbnN0IG9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IE1BWF9SRVRSSUVTLFxuICAgICAgICB9O1xuXG4gICAgICAgIHJldHVybiBhd2FpdCBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uKFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICBvcHRpb25zLFxuICAgICAgICApO1xuICAgICAgfSk7XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IEFueU9iamVjdCB9IGZyb20gJ34vdHlwZXMvc2hhcmVkJztcbmltcG9ydCB7IENvbnN0YW50cyB9IGZyb20gJy4vY29uc3RhbnRzJztcbmltcG9ydCB7IFJlc3VsdCB9IGZyb20gJy4vcmVzdWx0JztcblxuLyoqXG4gKiBjb252ZXJ0IGJ1ZmZlciB0byBBcnJheVxuICpcbiAqIEBwYXJhbSB7QnVmZmVyfSBidWZmZXJcbiAqIEByZXR1cm5zIG51bWJlcltdXG4gKi9cbmV4cG9ydCBjb25zdCBidWZmZXJUb0FycmF5ID0gKGJ1ZmZlcjogQnVmZmVyKTogbnVtYmVyW10gPT4ge1xuICBjb25zdCBudW1zID0gW107XG4gIGZvciAoY29uc3QgYnl0ZSBvZi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IoKSxcbiAgICAgICAgcmVzLnRva2VuQWNjb3VudCEsXG4gICAgICApO1xuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiBSZXRyeSBmdW5jdGlvbiBpZiBjcmVhdGUgbmV3IHRva2VuIGFjY291aW50XG4gICAgICpcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gbWludFxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBvd25lclxuICAgICAqIEBwYXJhbSB7U2VjcmV0fSBmZWVQYXllclxuICAgICAqIEByZXR1cm5zIFByb21pc2U8c3RyaW5nPlxuICAgICAqL1xuICAgIGV4cG9ydCBjb25zdCByZXRyeUdldE9yQ3JlYXRlID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyOiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxzdHJpbmc+ID0+IHtcbiAgICAgIGxldCBjb3VudGVyID0gMTtcbiAgICAgIHdoaWxlIChjb3VudGVyIDwgUkVUUllfT1ZFUl9MSU1JVCkge1xuICAgICAgICB0cnkge1xuICAgICAgICAgIGNvbnN0IGluc3QgPSBhd2FpdCBnZXQobWludCwgb3duZXIsIGZlZVBheWVyLCB0cnVlKTtcblxuICAgICAgICAgIGlmIChpbnN0ICYmIHR5cGVvZiBpbnN0ID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgaW5zdCk7XG4gICAgICAgICAgICByZXR1cm4gaW5zdDtcbiAgICAgICAgICB9IGVsc2UgaWYgKGluc3QgaW5zdGFuY2VvZiBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uKSB7XG4gICAgICAgICAgICAoYXdhaXQgaW5zdC5zdWJtaXQoKSkubWFwKFxuICAgICAgICAgICAgICBhc3luYyAob2s6IHN0cmluZykgPT4ge1xuICAgICAgICAgICAgICAgIGF3YWl0IE5vZGUuY29uZmlybWVkU2lnKG9rKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gaW5zdC5kYXRhO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAoZXJyOiBFcnJvcikgPT4ge1xuICAgICAgICAgICAgICAgIGRlYnVnTG9nKCcjIEVycm9yIHN1Ym1pdCByZXRyeUdldE9yQ3JlYXRlOiAnLCBlcnIpO1xuICAgICAgICAgICAgICAgIHRocm93IGVycjtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgZGVidWdMb2coYCMgcmV0cnk6ICR7Y291bnRlcn0gY3JlYXRlIHRva2VuIGFjY291bnQ6IGAsIGUpO1xuICAgICAgICAgIGRlYnVnTG9nKGAjIG1pbnQ6ICR7bWludH0sIG93bmVyOiAke293bmVyfSwgZmVlUGF5ZXI6ICR7ZmVlUGF5ZXJ9YCk7XG4gICAgICAgIH1cbiAgICAgICAgYXdhaXQgc2xlZXAoUkVUUllfU0xFRVBfVElNRSk7XG4gICAgICAgIGNvdW50ZXIrKztcbiAgICAgIH1cbiAgICAgIHRocm93IEVycm9yKGByZXRyeSBhY3Rpb24gaXMgb3ZlciBsaW1pdCAke1JFVFJZX09WRVJfTElNSVR9YCk7XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIFtNYWluIGxvZ2ljXUdldCBBc3NvY2lhdGVkIHRva2VuIEFjY291bnQuXG4gICAgICogaWYgbm90IGNyZWF0ZWQsIGNyZWF0ZSBuZXcgdG9rZW4gYWNjb3VpbnRcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBtaW50XG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAgICogQHBhcmFtIHtQdWJrZXl9IGZlZVBheWVyXG4gICAgICogQHJldHVybnMgUHJvbWlzZTxzdHJpbmc+XG4gICAgICovXG4gICAgZXhwb3J0IGNvbnN0IG1ha2VPckNyZWF0ZUluc3RydWN0aW9uID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyPzogUHVia2V5LFxuICAgICAgYWxsb3dPd25lck9mZkN1cnZlID0gZmFsc2UsXG4gICAgKTogUHJvbWlzZTx7XG4gICAgICB0b2tlbkFjY291bnQ6IHN0cmluZztcbiAgICAgIGluc3Q6IFRyYW5zYWN0aW9uSW5zdHJ1Y3Rpb24gfCB1bmRlZmluZWQ7XG4gICAgfT4gPT4ge1xuICAgICAgY29uc3QgYXNzb2NpYXRlZFRva2VuQWNjb3VudCA9IGdldEFzc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jKFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSxcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3QsXG4gICAgICAgIH07XG4gICAgICB9XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IEtleXBhaXIgYXMgT3JpZ2luYWwsIFB1YmxpY0tleSB9IGZyb20gJ0Bzb2xhbmEvd2ViMy5qcyc7XG5pbXBvcnQgeyBQdWJrZXksIFNlY3JldCB9IGZyb20gJ34vdHlwZXMvY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ikge1xuICAgIGxldCBpID0gMTtcbiAgICBmb3IgYXdhaXQgKGNvbnN0IG9iaiBvZiB0aGlzKSB7XG4gICAgICBpZiAob2JqLmlzRXJyKSB7XG4gICAgICAgIHJldHVybiBvYmo7XG4gICAgICB9IGVsc2UgaWYgKG9iai52YWx1ZS5jYW5TdWJtaXQpIHtcbiAgICAgICAgZGVidWdMb2coJyMgUmVzdWx0IGJhdGNoIGNhblN1Ym1pdCcpO1xuICAgICAgICBjb25zdCBzaWcgPSBhd2FpdCAob2JqIGFzIFBhcnRpYWxTaWduU3RydWN0dXJlKS5zdWJtaXQoZmVlUGF5ZXIpO1xuICAgICAgICBpZiAoc2lnLmlzRXJyKSB7XG4gICAgICAgICAgcmV0dXJuIHNpZztcbiAgICAgICAgfVxuICAgICAgICBhd2FpdCBOb2RlLmNvbmZpcm1lZFNpZyhzaWcudmFsdWUpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgZGVidWdMb2coJyMgUmVzdWx0IGJhdGNoIG90aGVyIHRoYW4gY2FuU3VibWl0Jyk7XG4gICAgICAgIGlmICh0aGlzLmxlbmd0aCA9PSBpKSB7XG4gICAgICAgICAgLy8gbGFzdCBvYmplY3RcbiAgICAgICAgICByZXR1cm4gb2JqLnN1Ym1pdChmZWVQYXllcik7XG4gICAgICAgIH1cbiAgICAgICAgb2JqLnN1Ym1pdChmZWVQYXllcik7XG4gICAgICB9XG4gICAgICBpKys7XG4gICAgfVxuICB9IGVsc2Uge1xuICAgIGNvbnN0IGluc3RydWN0aW9uczogQ29tbW9uU3RydWN0dXJlIHwgTWludFN0cnVjdHVyZVtdID0gW107XG4gICAgZm9yIChjb25zdCBvYmogb2YgdGhpcykge1xuICAgICAgaWYgKG9iai5pc0Vycikge1xuICAgICAgICByZXR1cm4gb2JqO1xuICAgICAgfSBlbHNlIGlmIChvYmouaXNPaykge1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChvYmoudmFsdWUpO1xuICAgICAgfSBlbHNlIHtcb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JpZmllZDogZmFsc2UsXG4gICAgICAgIH07XG4gICAgICB9KTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGludG9Db21wcmVzc2VkTmZ0SW5mcmEgPSAoXG4gICAgICBpbnB1dDogT3B0aW9uPElucHV0Q3JlYXRvcnNbXT4gfCB1bmRlZmluZWQsXG4gICAgKTogSW50ZXJuYWxDcmVhdG9yc1tdID0+IHtcbiAgICAgIGlmICghaW5wdXQpIHtcbiAgICAgICAgcmV0dXJuIFtdO1xuICAgICAgfVxuICAgICAgcmV0dXJuIGlucHV0IS5tYXAoKGRhdGEpID0+IHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICBhZGRyZXNzOiBkYXRhLmFkZHJlc3MudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBzaGFyZTogZGF0YS5zaGFyZSxcbiAgICAgICAgICB2ZXJpZmllZDogZmFsc2UsXG4gICAgICAgIH07XG4gICAgICB9KTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGludG9Vc2VyID0gKFxuICAgICAgb3V0cHV0OiBPcHRpb248SW50ZXJuYWxDcmVhdG9yc1tdPixcbiAgICApOiBDcmVhdG9yc1tdIHwgdW5kZWZpbmVkID0+IHtcbiAgICAgIGlmICghb3V0cHV0KSB7XG4gICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBvdXRwdXQubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvU3RyaW5nKCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGRhdGEudmVyaWZpZWQsXG4gICAgICAgIH07XG4gICAgICB9KTtcbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHsgQ29udmVydGVyIGFzIENvbGxlY3Rpb24gfSBmcm9tICcuL2Nvb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5cbiAgICAgIGNvbnN0IGZpbGVzID0gYXdhaXQgUHJvbWlzZS5hbGwoXG4gICAgICAgIGlucHV0LmZpbGVzLm1hcChhc3luYyAoZmlsZSkgPT4ge1xuICAgICAgICAgIGlmICghZmlsZS5maWxlUGF0aCkge1xuICAgICAgICAgICAgcmV0dXJuIHt9O1xuICAgICAgICAgIH1cbiAgICAgICAgICBjb25zdCByZXMgPSBhd2FpdCBjYWxsYmFja0Z1bmMoZmlsZS5maWxlUGF0aCwgc3RvcmFnZVR5cGUsIGZlZVBheWVyKTtcbiAgICAgICAgICBpZiAocmVzLmlzRXJyKSB7XG4gICAgICAgICAgICB0aHJvdyBFcnJvcihyZXMuZXJyb3IubWVzc2FnZSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBvdmVyd3JpdGVPYmplY3QoZmlsZSwgW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBleGlzdHNLZXk6ICdmaWxlUGF0aCcsXG4gICAgICAgICAgICAgIHdpbGw6IHsga2V5OiAndXJpJywgdmFsdWU6IHJlcy52YWx1ZSB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICBdKTtcbiAgICAgICAgfSksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHsgLi4uaW5wdXQsIGZpbGVzIH0gYXMgUHJvcGVydGllcztcbiAgICB9O1xuICB9XG59XG4iLCAiLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLXVudXNlZC12YXJzICovXG5pbXBvcnQgeyBPcHRpb24sIFVzZXMgfSBmcm9tICd+L3R5cGVzL3JlZ3VsYXItbmZ0JztcblxuZXhwb3J0IG5hbWVzcGFjZSBDb252ZXJ0ZXIge1xuICBleHBvcnQgbmFtZXNwYWNlIFVzZXMge1xuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlclNpZGUgPSAob3V0cHV0OiBPcHRpb248VXNlcz4pOiBVc2VzIHwgdW5kZWZpbmVkID0+IHtcbiAgICAgIGl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biAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3JveWFsdHknOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5yb3lhbHR5KSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzUm95YWx0eShtZXRhZGF0YS5yb3lhbHR5KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlcl9mZWVfYmFzaXNfcG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJGZWVCYXNpc1BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0YWRhdGEubmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzeW1ib2wnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLnN5bWJvbCkge1xuICAgICAgICAgICAgICByZXMgPSBpc1N5bWJvbChtZXRhZGF0YS5zeW1ib2wpO1xuICAgICA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cnRlciIsICJOZnQiLCAiQ29udmVydGVyIiwgIk1lbW8iLCAiQ29udmVydGVyIiwgIk1pbnQiLCAiQ29udmVydGVyIiwgIlJlZ3VsYXJOZnRNZXRhZGF0YSIsICJDb252ZXJ0ZXIiLCAiUHJvcGVydGllcyIsICJDb252ZXJ0ZXIiLCAiVXNlcyIsICJDb252ZXJ0ZXIiLCAiVG9rZW5NZXRhZGF0YSIsICJDb252ZXJ0ZXIiLCAiVHJhbnNmZXJDaGVja2VkIiwgIkNvbnZlcnRlciIsICJUcmFuc2ZlciIsICJDb252ZXJ0ZXIiLCAiVmFsaWRhdG9yIiwgIk1lc3NhZ2UiLCAiQ29udmVydGVyIl0KfQo= \ No newline at end of file diff --git a/packages/suite-airdrop/package.json b/packages/suite-airdrop/package.json index 2c324b587..599694109 100644 --- a/packages/suite-airdrop/package.json +++ b/packages/suite-airdrop/package.json @@ -44,11 +44,7 @@ "publish": "../../scripts/after-publish.mjs" }, "dependencies": { - "@solana/web3.js": "^1.78.5", - "@solana-suite/config": "workspace:^", - "bignumber.js": "^9.1.2", - "bn.js": "^5.2.1", - "bs58": "^4.0.1" + "@solana/web3.js": "^1.78.5" }, "devDependencies": { "build-configs/eslint": "workspace:*", diff --git a/packages/shared/package.json b/packages/suite-utils/package.json similarity index 93% rename from packages/shared/package.json rename to packages/suite-utils/package.json index 0d2be4c42..b95255323 100644 --- a/packages/shared/package.json +++ b/packages/suite-utils/package.json @@ -1,5 +1,5 @@ { - "name": "shared", + "name": "@solana-suite/utils", "version": "0.7.2", "private": true, "main": "dist/index.js", @@ -13,13 +13,10 @@ "prettier:fix": "prettier --config node_modules/build-configs/prettier/base.json ./src/ ./test/ -c --write", "test": "ava --config node_modules/build-configs/ava/base.cjs" }, - "peerDependencies": { + "dependencies": { "@solana-suite/config": "workspace:*", "@solana/web3.js": "^1.78.5" }, - "dependencies": { - "commander": "9.3.0" - }, "devDependencies": { "@types/jsdom": "^21.1.3", "build-configs/ava": "workspace:*", diff --git a/packages/shared/src/constants.ts b/packages/suite-utils/src/constants.ts similarity index 100% rename from packages/shared/src/constants.ts rename to packages/suite-utils/src/constants.ts diff --git a/packages/shared/src/exports.ts b/packages/suite-utils/src/exports.ts similarity index 100% rename from packages/shared/src/exports.ts rename to packages/suite-utils/src/exports.ts diff --git a/packages/shared/src/index.ts b/packages/suite-utils/src/index.ts similarity index 100% rename from packages/shared/src/index.ts rename to packages/suite-utils/src/index.ts diff --git a/packages/shared/src/result.ts b/packages/suite-utils/src/result.ts similarity index 100% rename from packages/shared/src/result.ts rename to packages/suite-utils/src/result.ts diff --git a/packages/shared/src/shared.ts b/packages/suite-utils/src/shared.ts similarity index 100% rename from packages/shared/src/shared.ts rename to packages/suite-utils/src/shared.ts diff --git a/packages/shared/test/constants.test.ts b/packages/suite-utils/test/constants.test.ts similarity index 100% rename from packages/shared/test/constants.test.ts rename to packages/suite-utils/test/constants.test.ts diff --git a/packages/shared/test/result.test.ts b/packages/suite-utils/test/result.test.ts similarity index 100% rename from packages/shared/test/result.test.ts rename to packages/suite-utils/test/result.test.ts diff --git a/packages/shared/tsconfig.json b/packages/suite-utils/tsconfig.json similarity index 100% rename from packages/shared/tsconfig.json rename to packages/suite-utils/tsconfig.json diff --git a/packages/shared/tsup.config.ts b/packages/suite-utils/tsup.config.ts similarity index 100% rename from packages/shared/tsup.config.ts rename to packages/suite-utils/tsup.config.ts From f9057070e1c61713ab0eafeb84b173530effa2ec Mon Sep 17 00:00:00 2001 From: fukaoi Date: Fri, 2 Feb 2024 12:16:33 +0900 Subject: [PATCH 03/15] wip --- packages/account/src/associated.ts | 2 +- packages/das-api/src/api.ts | 2 +- packages/das-api/src/find.ts | 2 +- packages/global/src/index.ts | 2 +- packages/node/src/index.ts | 2 +- packages/storage/src/arweave.ts | 2 +- packages/storage/src/nft-storage.ts | 2 +- packages/storage/src/provenance-layer.ts | 2 +- packages/storage/src/storage.ts | 2 +- packages/suite-airdrop/src/index.ts | 2 +- packages/suite-compressed-nft/src/delegate.ts | 2 +- packages/suite-compressed-nft/src/find.ts | 2 +- packages/suite-compressed-nft/src/gas-less-delegate.ts | 2 +- packages/suite-compressed-nft/src/gas-less-transfer.ts | 2 +- packages/suite-compressed-nft/src/mint-collection.ts | 2 +- packages/suite-compressed-nft/src/mint.ts | 2 +- packages/suite-compressed-nft/src/space.ts | 2 +- packages/suite-compressed-nft/src/transfer.ts | 2 +- packages/suite-memo/src/create.ts | 2 +- packages/suite-memo/src/find.ts | 2 +- packages/suite-multisig/src/create.ts | 2 +- packages/suite-multisig/src/get-info.ts | 2 +- packages/suite-multisig/src/is-address.ts | 2 +- packages/suite-phantom/src/regular-nft/mint.ts | 2 +- packages/suite-phantom/src/spl-token/add.ts | 2 +- packages/suite-phantom/src/spl-token/mint.ts | 2 +- packages/suite-regular-nft/src/burn.ts | 2 +- packages/suite-regular-nft/src/find.ts | 2 +- packages/suite-regular-nft/src/freeze.ts | 2 +- packages/suite-regular-nft/src/gas-less-mint.ts | 2 +- packages/suite-regular-nft/src/gas-less-transfer.ts | 2 +- packages/suite-regular-nft/src/mint-collection.ts | 2 +- packages/suite-regular-nft/src/mint.ts | 2 +- packages/suite-regular-nft/src/thaw.ts | 2 +- packages/suite-regular-nft/src/transfer.ts | 2 +- packages/suite-sol-native/src/find.ts | 2 +- packages/suite-sol-native/src/gas-less-transfer.ts | 2 +- packages/suite-sol-native/src/transfer-with-multisig.ts | 2 +- packages/suite-sol-native/src/transfer.ts | 2 +- packages/suite-spl-token/src/add.ts | 2 +- packages/suite-spl-token/src/burn.ts | 2 +- packages/suite-spl-token/src/find.ts | 2 +- packages/suite-spl-token/src/freeze.ts | 2 +- packages/suite-spl-token/src/gas-less-transfer.ts | 2 +- packages/suite-spl-token/src/mint.ts | 2 +- packages/suite-spl-token/src/thaw.ts | 2 +- packages/suite-spl-token/src/transfer.ts | 2 +- packages/transaction-builder/src/batch.ts | 3 +-- packages/transaction-builder/src/mint.ts | 2 +- packages/transaction-builder/src/partial-sign.ts | 2 +- packages/transaction-filter/src/signatures.ts | 2 +- packages/transaction-filter/src/transaction-filter.ts | 2 +- packages/types/src/{shared => utils}/index.ts | 0 packages/types/tsup.config.ts | 2 +- packages/validator/src/index.ts | 2 +- 55 files changed, 54 insertions(+), 55 deletions(-) rename packages/types/src/{shared => utils}/index.ts (100%) diff --git a/packages/account/src/associated.ts b/packages/account/src/associated.ts index e064e5588..700848ab0 100644 --- a/packages/account/src/associated.ts +++ b/packages/account/src/associated.ts @@ -1,5 +1,5 @@ import { TransactionInstruction } from '@solana/web3.js'; -import { debugLog, sleep } from '~/shared'; +import { debugLog, sleep } from '~/suite-utils'; import { Node } from '~/node'; import { TransactionBuilder } from '~/transaction-builder'; import { CommonStructure } from '~/types/transaction-builder'; diff --git a/packages/das-api/src/api.ts b/packages/das-api/src/api.ts index 45b446b68..5e4a88282 100644 --- a/packages/das-api/src/api.ts +++ b/packages/das-api/src/api.ts @@ -1,4 +1,4 @@ -import { Constants, debugLog, Result, Try } from '~/shared'; +import { Constants, debugLog, Result, Try } from '~/suite-utils'; import { Asset, AssetProof, Assets } from '~/types/das-api'; import { Sortable } from '~/types/find'; diff --git a/packages/das-api/src/find.ts b/packages/das-api/src/find.ts index 85aac0ca1..0435b7071 100644 --- a/packages/das-api/src/find.ts +++ b/packages/das-api/src/find.ts @@ -4,7 +4,7 @@ import { Metadata, NftMetadata } from '~/types/nft'; import { Offchain } from '~/types/storage'; import { FindOptions, Sortable, SortBy, SortDirection } from '~/types/find'; import { DasApi as Api } from './api'; -import { debugLog } from '~/shared'; +import { debugLog } from '~/suite-utils'; export namespace DasApi { //@internal diff --git a/packages/global/src/index.ts b/packages/global/src/index.ts index 1040f2dca..59e864588 100644 --- a/packages/global/src/index.ts +++ b/packages/global/src/index.ts @@ -1,6 +1,6 @@ import { Keypair, LAMPORTS_PER_SOL, PublicKey } from '@solana/web3.js'; import { Node } from '~/node'; -import { Constants, debugLog } from '~/shared'; +import { Constants, debugLog } from '~/suite-utils'; import { Account } from '~/account'; import { BigNumber } from 'bignumber.js'; import { Explorer, ExplorerOptions } from '~/types/global'; diff --git a/packages/node/src/index.ts b/packages/node/src/index.ts index 318f2cae5..602052eb8 100644 --- a/packages/node/src/index.ts +++ b/packages/node/src/index.ts @@ -1,4 +1,4 @@ -import { Constants, debugLog, Result } from '~/shared'; +import { Constants, debugLog, Result } from '~/suite-utils'; import { Commitment, Connection } from '@solana/web3.js'; export namespace Node { diff --git a/packages/storage/src/arweave.ts b/packages/storage/src/arweave.ts index 05548e30f..0a7a058fb 100644 --- a/packages/storage/src/arweave.ts +++ b/packages/storage/src/arweave.ts @@ -1,5 +1,5 @@ import { ProvenanceLayer } from './provenance-layer'; -import { debugLog, Result, Try } from '~/shared'; +import { debugLog, Result, Try } from '~/suite-utils'; import { Secret } from '~/types/account'; import { FileType, Offchain } from '~/types/storage'; diff --git a/packages/storage/src/nft-storage.ts b/packages/storage/src/nft-storage.ts index 56c6e63b4..dd3584f7b 100644 --- a/packages/storage/src/nft-storage.ts +++ b/packages/storage/src/nft-storage.ts @@ -1,5 +1,5 @@ import { Blob, NFTStorage } from 'nft.storage'; -import { Constants, debugLog, Result, Try } from '~/shared'; +import { Constants, debugLog, Result, Try } from '~/suite-utils'; import { ProvenanceLayer } from './provenance-layer'; import { FileType, Offchain } from '~/types/storage'; diff --git a/packages/storage/src/provenance-layer.ts b/packages/storage/src/provenance-layer.ts index 009b12886..1ccac7d07 100644 --- a/packages/storage/src/provenance-layer.ts +++ b/packages/storage/src/provenance-layer.ts @@ -1,4 +1,4 @@ -import { Constants, debugLog, isBrowser, isNode } from '~/shared'; +import { Constants, debugLog, isBrowser, isNode } from '~/suite-utils'; import { FileType, Identity, Tags, UploadableFileType } from '~/types/storage'; import { PhantomProvider } from '~/types/phantom'; import Irys, { WebIrys } from '@irys/sdk'; diff --git a/packages/storage/src/storage.ts b/packages/storage/src/storage.ts index b69f434ea..4c25a9222 100644 --- a/packages/storage/src/storage.ts +++ b/packages/storage/src/storage.ts @@ -1,4 +1,4 @@ -import { Result } from '~/shared'; +import { Result } from '~/suite-utils'; import { Secret } from '~/types/account'; import { FileType, Offchain, StorageType } from '~/types/storage'; import { InputNftMetadata } from '~/types/regular-nft'; diff --git a/packages/suite-airdrop/src/index.ts b/packages/suite-airdrop/src/index.ts index fabd13b32..54b228a77 100644 --- a/packages/suite-airdrop/src/index.ts +++ b/packages/suite-airdrop/src/index.ts @@ -1,4 +1,4 @@ -import { debugLog, Result, Try } from '~/shared'; +import { debugLog, Result, Try } from '~/suite-utils'; import { Node } from '~/node'; import { Pubkey } from '~/types/account'; import { AirdropOptions } from '~/types/airdrop'; diff --git a/packages/suite-compressed-nft/src/delegate.ts b/packages/suite-compressed-nft/src/delegate.ts index 6076d3521..b55149559 100644 --- a/packages/suite-compressed-nft/src/delegate.ts +++ b/packages/suite-compressed-nft/src/delegate.ts @@ -12,7 +12,7 @@ import { SPL_ACCOUNT_COMPRESSION_PROGRAM_ID, SPL_NOOP_PROGRAM_ID, } from '@solana/spl-account-compression'; -import { Result, Try } from '~/shared'; +import { Result, Try } from '~/suite-utils'; import { TransactionBuilder } from '~/transaction-builder'; import { DelegateOptions } from '~/types/compressed-nft'; import { Pubkey, Secret } from '~/types/account'; diff --git a/packages/suite-compressed-nft/src/find.ts b/packages/suite-compressed-nft/src/find.ts index 6e020a231..20971e56e 100644 --- a/packages/suite-compressed-nft/src/find.ts +++ b/packages/suite-compressed-nft/src/find.ts @@ -1,6 +1,6 @@ import { Pubkey } from '~/types/account'; import { DasApi } from '~/das-api'; -import { Result, Try } from '~/shared'; +import { Result, Try } from '~/suite-utils'; import { Metadata, NftMetadata } from '~/types/nft'; import { FindOptions } from '~/types/find'; diff --git a/packages/suite-compressed-nft/src/gas-less-delegate.ts b/packages/suite-compressed-nft/src/gas-less-delegate.ts index 995f7f1ab..30b05b32c 100644 --- a/packages/suite-compressed-nft/src/gas-less-delegate.ts +++ b/packages/suite-compressed-nft/src/gas-less-delegate.ts @@ -3,7 +3,7 @@ import { CompressedNft as Delegate } from './delegate'; import { Node } from '~/node'; import { Transaction } from '@solana/web3.js'; import { TransactionBuilder } from '~/transaction-builder'; -import { Result, Try } from '~/shared'; +import { Result, Try } from '~/suite-utils'; import { PartialSignStructure } from '~/types/transaction-builder'; export namespace CompressedNft { diff --git a/packages/suite-compressed-nft/src/gas-less-transfer.ts b/packages/suite-compressed-nft/src/gas-less-transfer.ts index d3fda1726..d201d97d0 100644 --- a/packages/suite-compressed-nft/src/gas-less-transfer.ts +++ b/packages/suite-compressed-nft/src/gas-less-transfer.ts @@ -1,4 +1,4 @@ -import { Account, Result, Try } from '~/shared'; +import { Account, Result, Try } from '~/suite-utils'; import { Node } from '~/node'; import { Pubkey, Secret } from '~/types/account'; import { TransactionBuilder } from '~/transaction-builder'; diff --git a/packages/suite-compressed-nft/src/mint-collection.ts b/packages/suite-compressed-nft/src/mint-collection.ts index 12ec14fc8..47cca6000 100644 --- a/packages/suite-compressed-nft/src/mint-collection.ts +++ b/packages/suite-compressed-nft/src/mint-collection.ts @@ -1,4 +1,4 @@ -import { Result } from '~/shared'; +import { Result } from '~/suite-utils'; import { Secret } from '~/types/account'; import { RegularNft } from '~/suite-regular-nft'; import { InputNftMetadata } from '~/types/regular-nft'; diff --git a/packages/suite-compressed-nft/src/mint.ts b/packages/suite-compressed-nft/src/mint.ts index 524d27b89..69f8a4a7c 100644 --- a/packages/suite-compressed-nft/src/mint.ts +++ b/packages/suite-compressed-nft/src/mint.ts @@ -5,7 +5,7 @@ import { Converter } from '~/converter'; import { Storage } from '~/storage'; import { Node } from '~/node'; import { TransactionBuilder } from '~/transaction-builder'; -import { debugLog, Result, Try, unixTimestamp, Validator } from '~/shared'; +import { debugLog, Result, Try, unixTimestamp, Validator } from '~/suite-utils'; import { DasApi } from '~/das-api'; import { CompressedNft as Space } from './space'; import { diff --git a/packages/suite-compressed-nft/src/space.ts b/packages/suite-compressed-nft/src/space.ts index 1d5b711d7..c82924da2 100644 --- a/packages/suite-compressed-nft/src/space.ts +++ b/packages/suite-compressed-nft/src/space.ts @@ -10,7 +10,7 @@ import { PublicKey, SystemProgram } from '@solana/web3.js'; import { createCreateTreeInstruction } from 'mpl-bubblegum-instruction'; import { Account } from '~/account'; import { Pubkey } from '~/types/account'; -import { Constants, debugLog, Result, Try } from '~/shared'; +import { Constants, debugLog, Result, Try } from '~/suite-utils'; import { Node } from '~/node'; import { TransactionBuilder } from '~/transaction-builder'; import { MintStructure } from '~/types/transaction-builder'; diff --git a/packages/suite-compressed-nft/src/transfer.ts b/packages/suite-compressed-nft/src/transfer.ts index 946008e40..634fd75ee 100644 --- a/packages/suite-compressed-nft/src/transfer.ts +++ b/packages/suite-compressed-nft/src/transfer.ts @@ -1,6 +1,6 @@ import { Pubkey } from '~/types/account'; import { DasApi } from '~/das-api'; -import { debugLog, Result, Try } from '~/shared'; +import { debugLog, Result, Try } from '~/suite-utils'; import { Node } from '~/node'; import { createTransferInstruction } from 'mpl-bubblegum-instruction'; import { diff --git a/packages/suite-memo/src/create.ts b/packages/suite-memo/src/create.ts index b7f1a91fa..a820246a7 100644 --- a/packages/suite-memo/src/create.ts +++ b/packages/suite-memo/src/create.ts @@ -1,6 +1,6 @@ import { TransactionInstruction } from '@solana/web3.js'; import { TransactionBuilder } from '~/transaction-builder'; -import { Constants, Result, Try } from '~/shared'; +import { Constants, Result, Try } from '~/suite-utils'; import { Secret } from '~/types/account'; import { MemoOptions } from '~/types/memo'; import bs from 'bs58'; diff --git a/packages/suite-memo/src/find.ts b/packages/suite-memo/src/find.ts index b8ddba1ac..c9f6bf547 100644 --- a/packages/suite-memo/src/find.ts +++ b/packages/suite-memo/src/find.ts @@ -1,6 +1,6 @@ import { Pubkey } from '~/types/account'; import { FindOptions, History } from '~/types/history'; -import { OnErr, OnOk } from '~/types/shared'; +import { OnErr, OnOk } from '~/types/suite-utils'; import { FilterType, ModuleName } from '~/types/transaction-filter'; import { Signatures, TransactionFilter } from '~/transaction-filter'; diff --git a/packages/suite-multisig/src/create.ts b/packages/suite-multisig/src/create.ts index 544f07787..e73d1603b 100644 --- a/packages/suite-multisig/src/create.ts +++ b/packages/suite-multisig/src/create.ts @@ -7,7 +7,7 @@ import { } from '@solana/web3.js'; import { blob, struct, u8 } from '@solana/buffer-layout'; import { TOKEN_PROGRAM_ID } from '@solana/spl-token'; -import { Result, Try } from '~/shared'; +import { Result, Try } from '~/suite-utils'; import { Node } from '~/node'; import { Pubkey, Secret } from '~/types/account'; import { TransactionBuilder } from '~/transaction-builder'; diff --git a/packages/suite-multisig/src/get-info.ts b/packages/suite-multisig/src/get-info.ts index 355d5ec7c..0a8b468a0 100644 --- a/packages/suite-multisig/src/get-info.ts +++ b/packages/suite-multisig/src/get-info.ts @@ -1,4 +1,4 @@ -import { Result, Try } from '~/shared'; +import { Result, Try } from '~/suite-utils'; import { Pubkey } from '~/types/account'; import { Node } from '~/node'; import { LayoutObject } from '@solana/buffer-layout'; diff --git a/packages/suite-multisig/src/is-address.ts b/packages/suite-multisig/src/is-address.ts index d88ba0c15..d2906357b 100644 --- a/packages/suite-multisig/src/is-address.ts +++ b/packages/suite-multisig/src/is-address.ts @@ -1,4 +1,4 @@ -import { Result, Try } from '~/shared'; +import { Result, Try } from '~/suite-utils'; import { Pubkey } from '~/types/account'; import { Multisig as _Get } from './get-info'; diff --git a/packages/suite-phantom/src/regular-nft/mint.ts b/packages/suite-phantom/src/regular-nft/mint.ts index 645e06b45..576b39fad 100644 --- a/packages/suite-phantom/src/regular-nft/mint.ts +++ b/packages/suite-phantom/src/regular-nft/mint.ts @@ -2,7 +2,7 @@ import { Transaction, TransactionInstruction } from '@solana/web3.js'; import { RegularNft } from '~/suite-regular-nft'; import { Storage } from '~/storage'; import { Node } from '~/node'; -import { debugLog, Result, Try } from '~/shared'; +import { debugLog, Result, Try } from '~/suite-utils'; import { Account } from '~/account'; import { Validator, ValidatorError } from '~/validator'; import { Converter } from '~/converter'; diff --git a/packages/suite-phantom/src/spl-token/add.ts b/packages/suite-phantom/src/spl-token/add.ts index 09d813e51..cdffeeef4 100644 --- a/packages/suite-phantom/src/spl-token/add.ts +++ b/packages/suite-phantom/src/spl-token/add.ts @@ -5,7 +5,7 @@ import { import { Transaction, TransactionInstruction } from '@solana/web3.js'; -import { Result, Try } from '~/shared'; +import { Result, Try } from '~/suite-utils'; import { Node } from '~/node'; import { Pubkey } from '~/types/account'; import { Account } from '~/account'; diff --git a/packages/suite-phantom/src/spl-token/mint.ts b/packages/suite-phantom/src/spl-token/mint.ts index fddbfdbfe..dcc0d5713 100644 --- a/packages/suite-phantom/src/spl-token/mint.ts +++ b/packages/suite-phantom/src/spl-token/mint.ts @@ -1,6 +1,6 @@ import { Keypair, Transaction, TransactionInstruction } from '@solana/web3.js'; -import { debugLog, Result, Try } from '~/shared'; +import { debugLog, Result, Try } from '~/suite-utils'; import { Node } from '~/node'; import { Pubkey } from '~/types/account'; import { Storage } from '~/storage'; diff --git a/packages/suite-regular-nft/src/burn.ts b/packages/suite-regular-nft/src/burn.ts index 02a6c9c11..092d3d32a 100644 --- a/packages/suite-regular-nft/src/burn.ts +++ b/packages/suite-regular-nft/src/burn.ts @@ -1,4 +1,4 @@ -import { Result } from '~/shared'; +import { Result } from '~/suite-utils'; import { Pubkey, Secret } from '~/types/account'; import { SplToken } from '~/suite-spl-token'; import { CommonStructure } from '~/types/transaction-builder'; diff --git a/packages/suite-regular-nft/src/find.ts b/packages/suite-regular-nft/src/find.ts index 23c97a15d..44a79fad3 100644 --- a/packages/suite-regular-nft/src/find.ts +++ b/packages/suite-regular-nft/src/find.ts @@ -1,4 +1,4 @@ -import { Result, Try } from '~/shared'; +import { Result, Try } from '~/suite-utils'; import { DasApi } from '~/das-api'; import { Pubkey } from '~/types/account'; import { Metadata, NftMetadata } from '~/types/nft'; diff --git a/packages/suite-regular-nft/src/freeze.ts b/packages/suite-regular-nft/src/freeze.ts index 22201b5a2..975011eec 100644 --- a/packages/suite-regular-nft/src/freeze.ts +++ b/packages/suite-regular-nft/src/freeze.ts @@ -1,4 +1,4 @@ -import { Result, Try } from '~/shared'; +import { Result, Try } from '~/suite-utils'; import { Pubkey, Secret } from '~/types/account'; import { TransactionBuilder } from '~/transaction-builder'; diff --git a/packages/suite-regular-nft/src/gas-less-mint.ts b/packages/suite-regular-nft/src/gas-less-mint.ts index 83d5a1424..6b052857f 100644 --- a/packages/suite-regular-nft/src/gas-less-mint.ts +++ b/packages/suite-regular-nft/src/gas-less-mint.ts @@ -1,4 +1,4 @@ -import { debugLog, Result, Try, unixTimestamp } from '~/shared'; +import { debugLog, Result, Try, unixTimestamp } from '~/suite-utils'; import { Pubkey, Secret } from '~/types/account'; import { GasLessMintOptions, InputNftMetadata } from '~/types/regular-nft'; import { Node } from '~/node'; diff --git a/packages/suite-regular-nft/src/gas-less-transfer.ts b/packages/suite-regular-nft/src/gas-less-transfer.ts index 636c031ea..bcc45d9c0 100644 --- a/packages/suite-regular-nft/src/gas-less-transfer.ts +++ b/packages/suite-regular-nft/src/gas-less-transfer.ts @@ -1,4 +1,4 @@ -import { Result } from '~/shared'; +import { Result } from '~/suite-utils'; import { Pubkey, Secret } from '~/types/account'; import { PartialSignStructure } from '~/types/transaction-builder'; import { SplToken } from '~/suite-spl-token'; diff --git a/packages/suite-regular-nft/src/mint-collection.ts b/packages/suite-regular-nft/src/mint-collection.ts index f8ca42db6..aef76e9ac 100644 --- a/packages/suite-regular-nft/src/mint-collection.ts +++ b/packages/suite-regular-nft/src/mint-collection.ts @@ -1,5 +1,5 @@ import { createSetCollectionSizeInstruction } from '@metaplex-foundation/mpl-token-metadata'; -import { debugLog, Result, Try, unixTimestamp } from '~/shared'; +import { debugLog, Result, Try, unixTimestamp } from '~/suite-utils'; import { Converter } from '~/converter'; import { Account } from '~/account'; import { Storage } from '~/storage'; diff --git a/packages/suite-regular-nft/src/mint.ts b/packages/suite-regular-nft/src/mint.ts index 5f59a6059..5e17871f6 100644 --- a/packages/suite-regular-nft/src/mint.ts +++ b/packages/suite-regular-nft/src/mint.ts @@ -14,7 +14,7 @@ import { MINT_SIZE, TOKEN_PROGRAM_ID, } from '@solana/spl-token'; -import { debugLog, Result, Try, unixTimestamp } from '~/shared'; +import { debugLog, Result, Try, unixTimestamp } from '~/suite-utils'; import { Secret } from '~/types/account'; import { TransactionBuilder } from '~/transaction-builder'; import { MintStructure } from '~/types/transaction-builder'; diff --git a/packages/suite-regular-nft/src/thaw.ts b/packages/suite-regular-nft/src/thaw.ts index 8d8dcbbca..bc73f63a6 100644 --- a/packages/suite-regular-nft/src/thaw.ts +++ b/packages/suite-regular-nft/src/thaw.ts @@ -1,4 +1,4 @@ -import { Result, Try } from '~/shared'; +import { Result, Try } from '~/suite-utils'; import { Pubkey, Secret } from '~/types/account'; import { TransactionBuilder } from '~/transaction-builder'; import { Account } from '~/account'; diff --git a/packages/suite-regular-nft/src/transfer.ts b/packages/suite-regular-nft/src/transfer.ts index 42b9e11ea..8a7df7652 100644 --- a/packages/suite-regular-nft/src/transfer.ts +++ b/packages/suite-regular-nft/src/transfer.ts @@ -1,5 +1,5 @@ import { SplToken } from '~/suite-spl-token'; -import { Result } from '~/shared'; +import { Result } from '~/suite-utils'; import { Pubkey, Secret } from '~/types/account'; import { TransferOptions } from '~/types/regular-nft'; import { CommonStructure } from '~/types/transaction-builder'; diff --git a/packages/suite-sol-native/src/find.ts b/packages/suite-sol-native/src/find.ts index a9795875f..b3cc2f2c8 100644 --- a/packages/suite-sol-native/src/find.ts +++ b/packages/suite-sol-native/src/find.ts @@ -1,5 +1,5 @@ import { ParsedAccountData } from '@solana/web3.js'; -import { Result, Try } from '~/shared'; +import { Result, Try } from '~/suite-utils'; import { Node } from '~/node'; import { OwnerInfo, Pubkey } from '~/types/account'; import { TransactionFilter } from '~/transaction-filter'; diff --git a/packages/suite-sol-native/src/gas-less-transfer.ts b/packages/suite-sol-native/src/gas-less-transfer.ts index 17bc21739..938fa510a 100644 --- a/packages/suite-sol-native/src/gas-less-transfer.ts +++ b/packages/suite-sol-native/src/gas-less-transfer.ts @@ -1,5 +1,5 @@ import { SystemProgram, Transaction } from '@solana/web3.js'; -import { Result, Try } from '~/shared'; +import { Result, Try } from '~/suite-utils'; import { Node } from '~/node'; import { TransactionBuilder } from '~/transaction-builder'; import { Pubkey, Secret } from '~/types/account'; diff --git a/packages/suite-sol-native/src/transfer-with-multisig.ts b/packages/suite-sol-native/src/transfer-with-multisig.ts index e3136b49c..8703ba45d 100644 --- a/packages/suite-sol-native/src/transfer-with-multisig.ts +++ b/packages/suite-sol-native/src/transfer-with-multisig.ts @@ -5,7 +5,7 @@ import { createWrappedNativeAccount, } from '@solana/spl-token'; -import { debugLog, Result, Try } from '~/shared'; +import { debugLog, Result, Try } from '~/suite-utils'; import { TransactionBuilder } from '~/transaction-builder'; import { Node } from '~/node'; import { Pubkey, Secret } from '~/types/account'; diff --git a/packages/suite-sol-native/src/transfer.ts b/packages/suite-sol-native/src/transfer.ts index d47168744..2141ff546 100644 --- a/packages/suite-sol-native/src/transfer.ts +++ b/packages/suite-sol-native/src/transfer.ts @@ -1,6 +1,6 @@ import { SystemProgram } from '@solana/web3.js'; import { Pubkey, Secret } from '~/types/account'; -import { Result, Try } from '~/shared'; +import { Result, Try } from '~/suite-utils'; import { TransactionBuilder } from '~/transaction-builder'; import { TransferOptions } from '~/types/sol-native'; import { CommonStructure } from '~/types/transaction-builder'; diff --git a/packages/suite-spl-token/src/add.ts b/packages/suite-spl-token/src/add.ts index 40c00487a..4f3b304a2 100644 --- a/packages/suite-spl-token/src/add.ts +++ b/packages/suite-spl-token/src/add.ts @@ -1,5 +1,5 @@ import { createMintToCheckedInstruction } from '@solana/spl-token'; -import { Result, Try } from '~/shared'; +import { Result, Try } from '~/suite-utils'; import { Pubkey, Secret } from '~/types/account'; import { TransactionBuilder } from '~/transaction-builder'; import { Account } from '~/account'; diff --git a/packages/suite-spl-token/src/burn.ts b/packages/suite-spl-token/src/burn.ts index 730b97a28..968eec827 100644 --- a/packages/suite-spl-token/src/burn.ts +++ b/packages/suite-spl-token/src/burn.ts @@ -4,7 +4,7 @@ import { } from '@solana/spl-token'; import { Pubkey, Secret } from '~/types/account'; import { TransactionBuilder } from '~/transaction-builder'; -import { Result, Try } from '~/shared'; +import { Result, Try } from '~/suite-utils'; import { SplToken as Calculate } from './calculate-amount'; import { BurnOptions } from '~/types/spl-token'; import { CommonStructure } from '~/types/transaction-builder'; diff --git a/packages/suite-spl-token/src/find.ts b/packages/suite-spl-token/src/find.ts index cc9cde302..6252d9c02 100644 --- a/packages/suite-spl-token/src/find.ts +++ b/packages/suite-spl-token/src/find.ts @@ -1,6 +1,6 @@ import { Node } from '~/node'; import { Pubkey } from '~/types/account'; -import { debugLog, Result, sleep, Try } from '~/shared'; +import { debugLog, Result, sleep, Try } from '~/suite-utils'; import { TokenMetadata } from '~/types/spl-token'; import { Offchain } from '~/types/storage'; import { Converter } from '~/converter'; diff --git a/packages/suite-spl-token/src/freeze.ts b/packages/suite-spl-token/src/freeze.ts index bca422e82..b7a9976e9 100644 --- a/packages/suite-spl-token/src/freeze.ts +++ b/packages/suite-spl-token/src/freeze.ts @@ -1,6 +1,6 @@ import { Account } from '~/account'; import { TransactionBuilder } from '~/transaction-builder'; -import { Result, Try } from '~/shared'; +import { Result, Try } from '~/suite-utils'; import { Pubkey, Secret } from '~/types/account'; import { diff --git a/packages/suite-spl-token/src/gas-less-transfer.ts b/packages/suite-spl-token/src/gas-less-transfer.ts index 004fa5314..17c5b31cc 100644 --- a/packages/suite-spl-token/src/gas-less-transfer.ts +++ b/packages/suite-spl-token/src/gas-less-transfer.ts @@ -1,7 +1,7 @@ import { createTransferCheckedInstruction } from '@solana/spl-token'; import { Transaction } from '@solana/web3.js'; import { Node } from '~/node'; -import { Result, Try } from '~/shared'; +import { Result, Try } from '~/suite-utils'; import { TransactionBuilder } from '~/transaction-builder'; import { Pubkey, Secret } from '~/types/account'; import { SplToken as Calculator } from './calculate-amount'; diff --git a/packages/suite-spl-token/src/mint.ts b/packages/suite-spl-token/src/mint.ts index e0a1f6801..fdea14b4f 100644 --- a/packages/suite-spl-token/src/mint.ts +++ b/packages/suite-spl-token/src/mint.ts @@ -20,7 +20,7 @@ import { DataV2, } from '@metaplex-foundation/mpl-token-metadata'; -import { debugLog, Result, Try, unixTimestamp } from '~/shared'; +import { debugLog, Result, Try, unixTimestamp } from '~/suite-utils'; import { Node } from '~/node'; import { Account } from '~/account'; diff --git a/packages/suite-spl-token/src/thaw.ts b/packages/suite-spl-token/src/thaw.ts index f70a354c0..87e903552 100644 --- a/packages/suite-spl-token/src/thaw.ts +++ b/packages/suite-spl-token/src/thaw.ts @@ -1,4 +1,4 @@ -import { Result, Try } from '~/shared'; +import { Result, Try } from '~/suite-utils'; import { TransactionBuilder } from '~/transaction-builder'; import { Pubkey, Secret } from '~/types/account'; import { Account } from '~/account'; diff --git a/packages/suite-spl-token/src/transfer.ts b/packages/suite-spl-token/src/transfer.ts index f25d18cdd..047ab865f 100644 --- a/packages/suite-spl-token/src/transfer.ts +++ b/packages/suite-spl-token/src/transfer.ts @@ -1,5 +1,5 @@ import { createTransferCheckedInstruction } from '@solana/spl-token'; -import { Result, Try } from '~/shared'; +import { Result, Try } from '~/suite-utils'; import { SplToken as Calculator } from './calculate-amount'; import { Account } from '~/account'; import { TransactionBuilder } from '~/transaction-builder'; diff --git a/packages/transaction-builder/src/batch.ts b/packages/transaction-builder/src/batch.ts index 34f1bca63..dccac5bdf 100644 --- a/packages/transaction-builder/src/batch.ts +++ b/packages/transaction-builder/src/batch.ts @@ -8,8 +8,7 @@ import { import { Node } from '~/node'; import { MAX_RETRIES, TransactionBuilder as Common } from './common'; import { TransactionBuilder as Mint } from './mint'; -import { Try } from '../../shared/src/shared'; -import { Result } from '../../shared/src/result'; +import { Try, Result } from '~/suite-utils'; export namespace TransactionBuilder { export class Batch { diff --git a/packages/transaction-builder/src/mint.ts b/packages/transaction-builder/src/mint.ts index 7c98b291c..b071e68cb 100644 --- a/packages/transaction-builder/src/mint.ts +++ b/packages/transaction-builder/src/mint.ts @@ -7,7 +7,7 @@ import { TransactionSignature, } from '@solana/web3.js'; -import { Constants, debugLog, Result, Try } from '~/shared'; +import { Constants, debugLog, Result, Try } from '~/suite-utils'; import { Node } from '~/node'; import { MAX_RETRIES } from './common'; import { MintStructure } from '~/types/transaction-builder'; diff --git a/packages/transaction-builder/src/partial-sign.ts b/packages/transaction-builder/src/partial-sign.ts index 9dd348176..0b7726a98 100644 --- a/packages/transaction-builder/src/partial-sign.ts +++ b/packages/transaction-builder/src/partial-sign.ts @@ -4,7 +4,7 @@ import { TransactionSignature, } from '@solana/web3.js'; -import { Result, Try } from '~/shared'; +import { Result, Try } from '~/suite-utils'; import { Node } from '~/node'; import { Pubkey, Secret } from '~/types/account'; import { MAX_RETRIES } from './common'; diff --git a/packages/transaction-filter/src/signatures.ts b/packages/transaction-filter/src/signatures.ts index 22b3f86d8..82884ae99 100644 --- a/packages/transaction-filter/src/signatures.ts +++ b/packages/transaction-filter/src/signatures.ts @@ -1,6 +1,6 @@ import { ParsedTransactionWithMeta } from '@solana/web3.js'; import { Node } from '~/node'; -import { debugLog, Result, sleep } from '~/shared'; +import { debugLog, Result, sleep } from '~/suite-utils'; import { Pubkey } from '~/types/account'; import { History } from '~/types/history'; diff --git a/packages/transaction-filter/src/transaction-filter.ts b/packages/transaction-filter/src/transaction-filter.ts index 85c7cd712..26f545ae1 100644 --- a/packages/transaction-filter/src/transaction-filter.ts +++ b/packages/transaction-filter/src/transaction-filter.ts @@ -7,7 +7,7 @@ import { PostTokenAccount, } from '~/types/transaction-filter'; import { History } from '~/types/history'; -import { debugLog } from '~/shared'; +import { debugLog } from '~/suite-utils'; export namespace TransactionFilter { const createPostTokenAccountList = ( diff --git a/packages/types/src/shared/index.ts b/packages/types/src/utils/index.ts similarity index 100% rename from packages/types/src/shared/index.ts rename to packages/types/src/utils/index.ts diff --git a/packages/types/tsup.config.ts b/packages/types/tsup.config.ts index 4ab6e31a0..29cf0f210 100644 --- a/packages/types/tsup.config.ts +++ b/packages/types/tsup.config.ts @@ -13,7 +13,7 @@ const entry = { memo: 'src/memo/index.ts', phantom: 'src/phantom/index.ts', 'regular-nft': 'src/regular-nft/index.ts', - shared: 'src/shared/index.ts', + utils: 'src/utils/index.ts', storage: 'src/storage/index.ts', 'sol-native': 'src/sol-native/index.ts', 'spl-token': 'src/spl-token/index.ts', diff --git a/packages/validator/src/index.ts b/packages/validator/src/index.ts index 04b42e775..bf3a3de84 100644 --- a/packages/validator/src/index.ts +++ b/packages/validator/src/index.ts @@ -1,4 +1,4 @@ -import { Result, Try } from '~/shared'; +import { Result, Try } from '~/suite-utils'; import { Converter } from '~/converter'; import { Details, Limit } from '~/types/validator'; import { InputNftMetadata } from '~/types/regular-nft'; From 057f5de9984c41b41f5f77dd9328ac5dba2acf08 Mon Sep 17 00:00:00 2001 From: fukaoi Date: Fri, 2 Feb 2024 21:31:54 +0900 Subject: [PATCH 04/15] Fix --- packages/account/dist/index.d.mts | 82 - packages/account/dist/index.d.ts | 82 - packages/account/dist/index.js | 118 +- packages/account/dist/index.mjs | 118 +- packages/account/tsconfig.json | 13 +- packages/converter/dist/index.d.mts | 615 +++++++ packages/converter/dist/index.d.ts | 615 +++++++ packages/converter/dist/index.js | 1529 ++++++++++++++++ packages/converter/dist/index.mjs | 1514 ++++++++++++++++ packages/das-api/dist/index.js | 118 +- packages/das-api/dist/index.mjs | 118 +- packages/global/dist/index.js | 142 +- packages/global/dist/index.mjs | 142 +- packages/global/test/index.test.ts | 2 +- packages/node/dist/index.js | 142 +- packages/node/dist/index.mjs | 142 +- packages/node/test/index.test.ts | 2 +- packages/storage/dist/index.js | 130 +- packages/storage/dist/index.mjs | 130 +- packages/suite-airdrop/dist/index.js | 118 +- packages/suite-airdrop/dist/index.mjs | 118 +- packages/suite-compressed-nft/dist/index.js | 160 +- packages/suite-compressed-nft/dist/index.mjs | 160 +- packages/suite-compressed-nft/tsconfig.json | 1 - packages/suite-memo/dist/index.d.mts | 21 - packages/suite-memo/dist/index.d.ts | 21 - packages/suite-memo/dist/index.js | 20 +- packages/suite-memo/dist/index.mjs | 20 +- packages/suite-memo/tsconfig.json | 13 +- packages/suite-multisig/dist/index.js | 118 +- packages/suite-multisig/dist/index.mjs | 118 +- packages/suite-multisig/tsconfig.json | 19 +- packages/suite-phantom/dist/index.mjs | 136 +- packages/suite-phantom/tsconfig.json | 14 +- packages/suite-regular-nft/dist/index.js | 136 +- packages/suite-regular-nft/dist/index.mjs | 136 +- packages/suite-sol-native/dist/index.js | 118 +- packages/suite-sol-native/dist/index.mjs | 118 +- packages/suite-sol-native/tsconfig.json | 1 - packages/suite-spl-token/dist/index.js | 136 +- packages/suite-spl-token/dist/index.mjs | 136 +- packages/suite-spl-token/tsconfig.json | 13 +- .../suite-utils/dist/exports-8dfab8bf.d.ts | 546 ++++++ packages/suite-utils/dist/exports.d.mts | 4 + packages/suite-utils/dist/exports.d.ts | 4 + packages/suite-utils/dist/exports.js | 1581 ++++++++++++++++ packages/suite-utils/dist/exports.mjs | 1552 ++++++++++++++++ packages/suite-utils/dist/index.d.mts | 66 + packages/suite-utils/dist/index.d.ts | 66 + packages/suite-utils/dist/index.js | 1585 +++++++++++++++++ packages/suite-utils/dist/index.mjs | 1554 ++++++++++++++++ packages/suite-utils/src/shared.ts | 2 +- packages/test-tools/dist/index.js | 118 +- packages/test-tools/dist/index.mjs | 118 +- packages/test-tools/setup.ts | 2 +- packages/test-tools/tsconfig.json | 1 - packages/transaction-builder/dist/index.js | 20 +- packages/transaction-builder/dist/index.mjs | 20 +- packages/transaction-builder/src/common.ts | 2 +- packages/transaction-builder/tsconfig.json | 14 +- packages/transaction-filter/dist/index.js | 148 +- packages/transaction-filter/dist/index.mjs | 148 +- packages/types/dist/shared.js | 19 - packages/types/dist/transaction-builder.js | 2 +- .../types/dist/{shared.d.mts => utils.d.mts} | 0 .../types/dist/{shared.d.ts => utils.d.ts} | 0 packages/types/dist/utils.js | 19 + packages/types/dist/{shared.mjs => utils.mjs} | 0 .../types/src/transaction-builder/index.ts | 2 +- packages/validator/dist/index.js | 118 +- packages/validator/dist/index.mjs | 118 +- pnpm-lock.yaml | 112 +- 72 files changed, 13288 insertions(+), 2258 deletions(-) delete mode 100644 packages/account/dist/index.d.mts delete mode 100644 packages/account/dist/index.d.ts create mode 100644 packages/converter/dist/index.d.mts create mode 100644 packages/converter/dist/index.d.ts create mode 100644 packages/converter/dist/index.js create mode 100644 packages/converter/dist/index.mjs create mode 100644 packages/suite-utils/dist/exports-8dfab8bf.d.ts create mode 100644 packages/suite-utils/dist/exports.d.mts create mode 100644 packages/suite-utils/dist/exports.d.ts create mode 100644 packages/suite-utils/dist/exports.js create mode 100644 packages/suite-utils/dist/exports.mjs create mode 100644 packages/suite-utils/dist/index.d.mts create mode 100644 packages/suite-utils/dist/index.d.ts create mode 100644 packages/suite-utils/dist/index.js create mode 100644 packages/suite-utils/dist/index.mjs delete mode 100644 packages/types/dist/shared.js rename packages/types/dist/{shared.d.mts => utils.d.mts} (100%) rename packages/types/dist/{shared.d.ts => utils.d.ts} (100%) create mode 100644 packages/types/dist/utils.js rename packages/types/dist/{shared.mjs => utils.mjs} (100%) diff --git a/packages/account/dist/index.d.mts b/packages/account/dist/index.d.mts deleted file mode 100644 index cf7f8126b..000000000 --- a/packages/account/dist/index.d.mts +++ /dev/null @@ -1,82 +0,0 @@ -import { TransactionInstruction, PublicKey, Keypair } from '@solana/web3.js'; - -declare const pubKeyNominality: unique symbol; -declare const secretNominality: unique symbol; -type Pubkey = (string & { - [pubKeyNominality]: never; -}) | string; -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 - */ -declare namespace Account$3 { - namespace Associated { - /** - * Retry function if create new token accouint - * - * @param {Pubkey} mint - * @param {Pubkey} owner - * @param {Secret} feePayer - * @returns Promise - */ - const retryGetOrCreate: (mint: Pubkey, owner: Pubkey, feePayer: Secret) => Promise; - /** - * [Main logic]Get Associated token Account. - * if not created, create new token accouint - * - * @param {Pubkey} mint - * @param {Pubkey} owner - * @param {Pubkey} feePayer - * @returns Promise - */ - const makeOrCreateInstruction: (mint: Pubkey, owner: Pubkey, feePayer?: Pubkey, allowOwnerOffCurve?: boolean) => Promise<{ - tokenAccount: string; - inst: TransactionInstruction | undefined; - }>; - } -} - -declare namespace Account$2 { - class Keypair { - secret: Secret; - pubkey: Pubkey; - constructor(params: { - pubkey?: Pubkey; - secret: Secret; - }); - toPublicKey(): PublicKey; - toKeypair(): Keypair; - static isPubkey: (value: string) => value is Pubkey; - static isSecret: (value: string) => value is Secret; - static create: () => Keypair; - static toKeyPair: (keypair: Keypair) => Keypair; - } -} - -declare namespace Account$1 { - namespace Pda { - const getMetadata: (address: Pubkey) => PublicKey; - const getMasterEdition: (address: Pubkey) => PublicKey; - const getTreeAuthority: (address: Pubkey) => PublicKey; - const getBgumSigner: () => PublicKey; - const getAssetId: (address: Pubkey, leafIndex: number) => Pubkey; - } -} - -declare const Account: { - Pda: typeof Account$1.Pda; - Keypair: typeof Account$2.Keypair; - Associated: typeof Account$3.Associated; -}; - -export { Account }; diff --git a/packages/account/dist/index.d.ts b/packages/account/dist/index.d.ts deleted file mode 100644 index cf7f8126b..000000000 --- a/packages/account/dist/index.d.ts +++ /dev/null @@ -1,82 +0,0 @@ -import { TransactionInstruction, PublicKey, Keypair } from '@solana/web3.js'; - -declare const pubKeyNominality: unique symbol; -declare const secretNominality: unique symbol; -type Pubkey = (string & { - [pubKeyNominality]: never; -}) | string; -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 - */ -declare namespace Account$3 { - namespace Associated { - /** - * Retry function if create new token accouint - * - * @param {Pubkey} mint - * @param {Pubkey} owner - * @param {Secret} feePayer - * @returns Promise - */ - const retryGetOrCreate: (mint: Pubkey, owner: Pubkey, feePayer: Secret) => Promise; - /** - * [Main logic]Get Associated token Account. - * if not created, create new token accouint - * - * @param {Pubkey} mint - * @param {Pubkey} owner - * @param {Pubkey} feePayer - * @returns Promise - */ - const makeOrCreateInstruction: (mint: Pubkey, owner: Pubkey, feePayer?: Pubkey, allowOwnerOffCurve?: boolean) => Promise<{ - tokenAccount: string; - inst: TransactionInstruction | undefined; - }>; - } -} - -declare namespace Account$2 { - class Keypair { - secret: Secret; - pubkey: Pubkey; - constructor(params: { - pubkey?: Pubkey; - secret: Secret; - }); - toPublicKey(): PublicKey; - toKeypair(): Keypair; - static isPubkey: (value: string) => value is Pubkey; - static isSecret: (value: string) => value is Secret; - static create: () => Keypair; - static toKeyPair: (keypair: Keypair) => Keypair; - } -} - -declare namespace Account$1 { - namespace Pda { - const getMetadata: (address: Pubkey) => PublicKey; - const getMasterEdition: (address: Pubkey) => PublicKey; - const getTreeAuthority: (address: Pubkey) => PublicKey; - const getBgumSigner: () => PublicKey; - const getAssetId: (address: Pubkey, leafIndex: number) => Pubkey; - } -} - -declare const Account: { - Pda: typeof Account$1.Pda; - Keypair: typeof Account$2.Keypair; - Associated: typeof Account$3.Associated; -}; - -export { Account }; diff --git a/packages/account/dist/index.js b/packages/account/dist/index.js index 3da2eaad9..a26667213 100644 --- a/packages/account/dist/index.js +++ b/packages/account/dist/index.js @@ -34,7 +34,7 @@ __export(src_exports, { }); module.exports = __toCommonJS(src_exports); -// ../shared/src/constants.ts +// ../suite-utils/src/constants.ts var import_web3 = require("@solana/web3.js"); var import_load = __toESM(require("@solana-suite/config/load")); var Config = import_load.default; @@ -310,56 +310,6 @@ var TransactionBuilder; TransactionBuilder7.Common = Common2; })(TransactionBuilder || (TransactionBuilder = {})); -// ../shared/src/shared.ts -var overwriteObject = (object, targets) => { - const that = object; - targets.forEach((target) => { - delete that[target.existsKey]; - that[target.will.key] = target.will.value; - }); - return that; -}; -var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { - if (Constants.isDebugging === "true" || process.env.DEBUG === "true") { - console.log("[DEBUG]", data1, data2, data3, data4); - } -}; -var sleep = async (sec) => { - return new Promise((r) => setTimeout(r, sec * 1e3)); -}; -var isPromise = (obj) => { - return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; -}; -function Try(input, finallyInput) { - try { - const v = input(); - if (isPromise(v)) { - return v.then( - (x) => Result.ok(x), - (err) => Result.err(err) - ); - } else { - return Result.ok(v); - } - } catch (e) { - if (e instanceof Error) { - return Result.err(e); - } - return Result.err(Error(e)); - } finally { - if (finallyInput) { - debugLog("# finally input:", finallyInput); - finallyInput(); - } - } -} -var convertTimestampToDateTime = (created_at) => { - if (created_at) { - return new Date(created_at * 1e3); - } - return; -}; - // ../transaction-builder/src/batch.ts var TransactionBuilder2; ((TransactionBuilder7) => { @@ -603,7 +553,57 @@ var TransactionBuilder6 = { ...TransactionBuilder4 }; -// ../shared/src/result.ts +// ../suite-utils/src/shared.ts +var overwriteObject = (object, targets) => { + const that = object; + targets.forEach((target) => { + delete that[target.existsKey]; + that[target.will.key] = target.will.value; + }); + return that; +}; +var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { + if (Constants.isDebugging === "true" || process.env.DEBUG === "true") { + console.log("[DEBUG]", data1, data2, data3, data4); + } +}; +var sleep = async (sec) => { + return new Promise((r) => setTimeout(r, sec * 1e3)); +}; +var isPromise = (obj) => { + return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; +}; +function Try(input, finallyInput) { + try { + const v = input(); + if (isPromise(v)) { + return v.then( + (x) => Result.ok(x), + (err) => Result.err(err) + ); + } else { + return Result.ok(v); + } + } catch (e) { + if (e instanceof Error) { + return Result.err(e); + } + return Result.err(Error(e)); + } finally { + if (finallyInput) { + debugLog("# finally input:", finallyInput); + finallyInput(); + } + } +} +var convertTimestampToDateTime = (created_at) => { + if (created_at) { + return new Date(created_at * 1e3); + } + return; +}; + +// ../suite-utils/src/result.ts var AbstractResult = class { unwrap(ok, err) { const r = this._chain( @@ -715,15 +715,15 @@ var InternalErr = class extends AbstractResult { } }; var Result; -((Result7) => { +((Result8) => { function ok(value) { return new InternalOk(value); } - Result7.ok = ok; + Result8.ok = ok; function err(error) { return new InternalErr(error || Error()); } - Result7.err = err; + Result8.err = err; function all(obj) { if (Array.isArray(obj)) { const resArr = []; @@ -733,7 +733,7 @@ var Result; } resArr.push(item.value); } - return Result7.ok(resArr); + return Result8.ok(resArr); } const res = {}; const keys = Object.keys(obj); @@ -744,9 +744,9 @@ var Result; } res[key] = item.value; } - return Result7.ok(res); + return Result8.ok(res); } - Result7.all = all; + Result8.all = all; })(Result || (Result = {})); // ../converter/src/collection.ts @@ -1524,4 +1524,4 @@ var Account = { 0 && (module.exports = { Account }); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uLy4uL3NoYXJlZC9zcmMvY29uc3RhbnRzLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2JhdGNoLnRzIiwgIi4uLy4uL25vZGUvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2NvbW1vbi50cyIsICIuLi8uLi9zaGFyZWQvc3JjL3NoYXJlZC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9taW50LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL3BhcnRpYWwtc2lnbi50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jYWxjdWxhdGUtdHhzaXplLnRzIiwgIi4uLy4uL2dsb2JhbC9zcmMvaW5kZXgudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvaW5kZXgudHMiLCAiLi4vLi4vc2hhcmVkL3NyYy9yZXN1bHQudHMiLCAi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mFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ25hbWUnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLm5hbWUpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNOYW1lKG1ldGFkYXRhLm5hbWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc3ltYm9sJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5zeW1ib2wpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTeW1ib2wobWV0YWRhdGEuc3ltYm9sKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgICAgIGlmIChyZXMgJiYgcmVzLmlzRXJyKSB7XG4gICAgICAgICAgcmVzdWx0cy5wdXNoKC4uLnJlcy5lcnJvci5kZXRhaWxzKTtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgICBpZiAocmVzdWx0cy5sZW5ndGggPiAwKSB7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPVxuICAgICAgICAgICdDYXVnaHQgaW4gdGhlIHZhbGlkYXRpb24gZXJyb3JzLiBzZWUgaW5mb3JtYXRpb24gZS5nOiBlcnI8VmFsaWRhdG9yRXJyb3I+LmRldGFpbHMnO1xuICAgICAgICB0aHJvdyBuZXcgVmFsaWRhdG9y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tyZXMuaW5zdF0sXG4gICAgICAgIFtdLFxuICAgICAgICBmZWVQYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgcmVzLnRva2VuQWNjb3VudCEsXG4gICAgICApO1xuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiBSZXRyeSBmdW5jdGlvbiBpZiBjcmVhdGUgbmV3IHRva2VuIGFjY291aW50XG4gICAgICpcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gbWludFxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBvd25lclxuICAgICAqIEBwYXJhbSB7U2VjcmV0fSBmZWVQYXllclxuICAgICAqIEByZXR1cm5zIFByb21pc2U8c3RyaW5nPlxuICAgICAqL1xuICAgIGV4cG9ydCBjb25zdCByZXRyeUdldE9yQ3JlYXRlID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyOiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxzdHJpbmc+ID0+IHtcbiAgICAgIGxldCBjb3VudGVyID0gMTtcbiAgICAgIHdoaWxlIChjb3VudGVyIDwgUkVUUllfT1ZFUl9MSU1JVCkge1xuICAgICAgICB0cnkge1xuICAgICAgICAgIGNvbnN0IGluc3QgPSBhd2FpdCBnZXQobWludCwgb3duZXIsIGZlZVBheWVyLCB0cnVlKTtcblxuICAgICAgICAgIGlmIChpbnN0ICYmIHR5cGVvZiBpbnN0ID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgaW5zdCk7XG4gICAgICAgICAgICByZXR1cm4gaW5zdDtcbiAgICAgICAgICB9IGVsc2UgaWYgKGluc3QgaW5zdGFuY2VvZiBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uKSB7XG4gICAgICAgICAgICAoYXdhaXQgaW5zdC5zdWJtaXQoKSkubWFwKFxuICAgICAgICAgICAgICBhc3luYyAob2s6IHN0cmluZykgPT4ge1xuICAgICAgICAgICAgICAgIGF3YWl0IE5vZGUuY29uZmlybWVkU2lnKG9rKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gaW5zdC5kYXRhO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAoZXJyOiBFcnJvcikgPT4ge1xuICAgICAgICAgICAgICAgIGRlYnVnTG9nKCcjIEVycm9yIHN1Ym1pdCByZXRyeUdldE9yQ3JlYXRlOiAnLCBlcnIpO1xuICAgICAgICAgICAgICAgIHRocm93IGVycjtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgZGVidWdMb2coYCMgcmV0cnk6ICR7Y291bnRlcn0gY3JlYXRlIHRva2VuIGFjY291bnQ6IGAsIGUpO1xuICAgICAgICAgIGRlYnVnTG9nKGAjIG1pbnQ6ICR7bWludH0sIG93bmVyOiAke293bmVyfSwgZmVlUGF5ZXI6ICR7ZmVlUGF5ZXJ9YCk7XG4gICAgICAgIH1cbiAgICAgICAgYXdhaXQgc2xlZXAoUkVUUllfU0xFRVBfVElNRSk7XG4gICAgICAgIGNvdW50ZXIrKztcbiAgICAgIH1cbiAgICAgIHRocm93IEVycm9yKGByZXRyeSBhY3Rpb24gaXMgb3ZlciBsaW1pdCAke1JFVFJZX09WRVJfTElNSVR9YCk7XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIFtNYWluIGxvZ2ljXUdldCBBc3NvY2lhdGVkIHRva2VuIEFjY291bnQuXG4gICAgICogaWYgbm90IGNyZWF0ZWQsIGNyZWF0ZSBuZXcgdG9rZW4gYWNjb3VpbnRcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBtaW50XG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAgICogQHBhcmFtIHtQdWJrZXl9IGZlZVBheWVyXG4gICAgICogQHJldHVybnMgUHJvbWlzZTxzdHJpbmc+XG4gICAgICovXG4gICAgZXhwb3J0IGNvbnN0IG1ha2VPckNyZWF0ZUluc3RydWN0aW9uID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyPzogUHVia2V5LFxuICAgICAgYWxsb3dPd25lck9mZkN1cnZlID0gZmFsc2UsXG4gICAgKTogUHJvbWlzZTx7XG4gICAgICB0b2tlbkFjY291bnQ6IHN0cmluZztcbiAgICAgIGluc3Q6IFRyYW5zYWN0aW9uSW5zdHJ1Y3Rpb24gfCB1bmRlZmluZWQ7XG4gICAgfT4gPT4ge1xuICAgICAgY29uc3QgYXNzb2NpYXRlZFRva2VuQWNjb3VudCA9IGdldEFzc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jKFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSxcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3QsXG4gICAgICAgIH07XG4gICAgICB9XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IEtleXBhaXIgYXMgT3JpZ2luYWwsIFB1YmxpY0tleSB9IGZyb20gJ0Bzb2xhbmEvd2ViMy5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ICAgICByZXR1cm4ge1xuICAgICAgICAgIGFkZHJlc3M6IGRhdGEuYWRkcmVzcy50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIHNoYXJlOiBkYXRhLnNoYXJlLFxuICAgICAgICAgIHZlcmlmaWVkOiBmYWxzZSxcbiAgICAgICAgfTtcbiAgICAgIH0pO1xuICAgIH07XG5cbiAgICBleHBvcnQgY29uc3QgaW50b0NvbXByZXNzZWROZnRJbmZyYSA9IChcbiAgICAgIGlucHV0OiBPcHRpb248SW5wdXRDcmVhdG9yc1tdPiB8IHVuZGVmaW5lZCxcbiAgICApOiBJbnRlcm5hbENyZWF0b3JzW10gPT4ge1xuICAgICAgaWYgKCFpbnB1dCkge1xuICAgICAgICByZXR1cm4gW107XG4gICAgICB9XG4gICAgICByZXR1cm4gaW5wdXQhLm1hcCgoZGF0YSkgPT4ge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIGFkZHJlc3M6IGRhdGEuYWRkcmVzcy50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIHNoYXJlOiBkYXRhLnNoYXJlLFxuICAgICAgICAgIHZlcmlmaWVkOiBmYWxzZSxcbiAgICAgICAgfTtcbiAgICAgIH0pO1xuICAgIH07XG5cbiAgICBleHBvcnQgY29uc3QgaW50b1VzZXIgPSAoXG4gICAgICBvdXRwdXQ6IE9wdGlvbjxJbnRlcm5hbENyZWF0b3JzW10+LFxuICAgICk6IENyZWF0b3JzW10gfCB1bmRlZmluZWQgPT4ge1xuICAgICAgaWYgKCFvdXRwdXQpIHtcbiAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG91dHB1dC5tYXAoKGRhdGEpID0+IHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICBhZGRyZXNzOiBkYXRhLmFkZHJlc3MudG9TdHJpbmcoKSxcbiAgICAgICAgICBzaGFyZTogZGF0YS5zaGFyZSxcbiAgICAgICAgICB2ZXJpZmllZDog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WYWxpZGF0b3JFcnJvcj47XG4gICAgICAgIHN3aXRjaCAoa2V5KSB7XG4gICAgICAgICAgY2FzZSAnaW1hZ2UnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5pbWFnZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc0ltYWdlVXJsKG1ldGFkYXRhLmltYWdlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3JveWFsdHknOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5yb3lhbHR5KSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzUm95YWx0eShtZXRhZGF0YS5yb3lhbHR5KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlcl9mZWVfYmFzaXNfcG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJGZWVCYXNpc1BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1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i9cbiAgICBleHBvcnQgY29uc3QgcmV0cnlHZXRPckNyZWF0ZSA9IGFzeW5jIChcbiAgICAgIG1pbnQ6IFB1YmtleSxcbiAgICAgIG93bmVyOiBQdWJrZXksXG4gICAgICBmZWVQYXllcjogU2VjcmV0LFxuICAgICk6IFByb21pc2U8c3RyaW5nPiA9PiB7XG4gICAgICBsZXQgY291bnRlciA9IDE7XG4gICAgICB3aGlsZSAoY291bnRlciA8IFJFVFJZX09WRVJfTElNSVQpIHtcbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICBjb25zdCBpbnN0ID0gYXdhaXQgZ2V0KG1pbnQsIG93bmVyLCBmZWVQYXllciwgdHJ1ZSk7XG5cbiAgICAgICAgICBpZiAoaW5zdCAmJiB0eXBlb2YgaW5zdCA9PT0gJ3N0cmluZycpIHtcbiAgICAgICAgICAgIGRlYnVnTG9nKCcjIGFzc29jaWF0ZWRUb2tlbkFjY291bnQ6ICcsIGluc3QpO1xuICAgICAgICAgICAgcmV0dXJuIGluc3Q7XG4gICAgICAgICAgfSBlbHNlIGlmIChpbnN0IGluc3RhbmNlb2YgVHJhbnNhY3Rpb25CdWlsZGVyLkNvbW1vbikge1xuICAgICAgICAgICAgKGF3YWl0IGluc3Quc3VibWl0KCkpLm1hcChcbiAgICAgICAgICAgICAgYXN5bmMgKG9rOiBzdHJpbmcpID0+IHtcbiAgICAgICAgICAgICAgICBhd2FpdCBOb2RlLmNvbmZpcm1lZFNpZyhvayk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGluc3QuZGF0YTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgKGVycjogRXJyb3IpID0+IHtcbiAgICAgICAgICAgICAgICBkZWJ1Z0xvZygnIyBFcnJvciBzdWJtaXQgcmV0cnlHZXRPckNyZWF0ZTogJywgZXJyKTtcbiAgICAgICAgICAgICAgICB0aHJvdyBlcnI7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cb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gIH0+ID0+IHtcbiAgICAgIGNvbnN0IGFzc29jaWF0ZWRUb2tlbkFjY291bnQgPSBnZXRBc3NvY2lhdGVkVG9rZW5BZGRyZXNzU3luYyhcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICBhbGxvd093bmVyT2ZmQ3VydmUsXG4gICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGFzc29jaWF0ZWRUb2tlbkFjY291bnQ6ICcsIGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSk7XG5cbiAgICAgIHRyeSB7XG4gICAgICAgIC8vIERvbnQgdXNlIFJlc3VsdFxuICAgICAgICBhd2FpdCBnZXRBY2NvdW50KFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCkuY29tbWl0bWVudCxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3Q6IHVuZGVmaW5lZCxcbiAgICAgICAgfTtcbiAgICAgIH0gY2F0Y2ggKGVycm9yOiB1bmtub3duKSB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5BY2NvdW50Tm90Rm91bmRFcnJvcikgJiZcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5JbnZhbGlkQWNjb3VudE93bmVyRXJyb3IpXG4gICAgICAgICkge1xuIC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zZWROZnRNZXRhZGF0YSIsICJDb252ZXJ0ZXIiLCAiUm95YWx0eSIsICJDb252ZXJ0ZXIiLCAiTmZ0IiwgIkNvbnZlcnRlciIsICJNZW1vIiwgIkNvbnZlcnRlciIsICJNaW50IiwgIkNvbnZlcnRlciIsICJSZWd1bGFyTmZ0TWV0YWRhdGEiLCAiQ29udmVydGVyIiwgIlByb3BlcnRpZXMiLCAiQ29udmVydGVyIiwgIlVzZXMiLCAiQ29udmVydGVyIiwgIlRva2VuTWV0YWRhdGEiLCAiQ29udmVydGVyIiwgIlRyYW5zZmVyQ2hlY2tlZCIsICJDb252ZXJ0ZXIiLCAiVHJhbnNmZXIiLCAiQ29udmVydGVyIiwgIlZhbGlkYXRvciIsICJNZXNzYWdlIiwgIkNvbnZlcnRlciIsICJpbXBvcnRfd2ViMyIsICJpbXBvcnRfYnM1OCIsICJBY2NvdW50IiwgIktleXBhaXIiLCAiYnMiLCAiT3JpZ2luYWwiLCAiQWNjb3VudCIsICJBc3NvY2lhdGVkIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJpbXBvcnRfd2ViMyIsICJBY2NvdW50IiwgIlBkYSIsICJCTiIsICJBY2NvdW50Il0KfQo= \ No newline at end of file diff --git a/packages/account/dist/index.mjs b/packages/account/dist/index.mjs index d612ad6aa..3fae4a295 100644 --- a/packages/account/dist/index.mjs +++ b/packages/account/dist/index.mjs @@ -1,4 +1,4 @@ -// ../shared/src/constants.ts +// ../suite-utils/src/constants.ts import { PublicKey } from "@solana/web3.js"; import SolanaJsonConfig from "@solana-suite/config/load"; var Config = SolanaJsonConfig; @@ -280,56 +280,6 @@ var TransactionBuilder; TransactionBuilder7.Common = Common2; })(TransactionBuilder || (TransactionBuilder = {})); -// ../shared/src/shared.ts -var overwriteObject = (object, targets) => { - const that = object; - targets.forEach((target) => { - delete that[target.existsKey]; - that[target.will.key] = target.will.value; - }); - return that; -}; -var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { - if (Constants.isDebugging === "true" || process.env.DEBUG === "true") { - console.log("[DEBUG]", data1, data2, data3, data4); - } -}; -var sleep = async (sec) => { - return new Promise((r) => setTimeout(r, sec * 1e3)); -}; -var isPromise = (obj) => { - return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; -}; -function Try(input, finallyInput) { - try { - const v = input(); - if (isPromise(v)) { - return v.then( - (x) => Result.ok(x), - (err) => Result.err(err) - ); - } else { - return Result.ok(v); - } - } catch (e) { - if (e instanceof Error) { - return Result.err(e); - } - return Result.err(Error(e)); - } finally { - if (finallyInput) { - debugLog("# finally input:", finallyInput); - finallyInput(); - } - } -} -var convertTimestampToDateTime = (created_at) => { - if (created_at) { - return new Date(created_at * 1e3); - } - return; -}; - // ../transaction-builder/src/batch.ts var TransactionBuilder2; ((TransactionBuilder7) => { @@ -578,7 +528,57 @@ var TransactionBuilder6 = { ...TransactionBuilder4 }; -// ../shared/src/result.ts +// ../suite-utils/src/shared.ts +var overwriteObject = (object, targets) => { + const that = object; + targets.forEach((target) => { + delete that[target.existsKey]; + that[target.will.key] = target.will.value; + }); + return that; +}; +var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { + if (Constants.isDebugging === "true" || process.env.DEBUG === "true") { + console.log("[DEBUG]", data1, data2, data3, data4); + } +}; +var sleep = async (sec) => { + return new Promise((r) => setTimeout(r, sec * 1e3)); +}; +var isPromise = (obj) => { + return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; +}; +function Try(input, finallyInput) { + try { + const v = input(); + if (isPromise(v)) { + return v.then( + (x) => Result.ok(x), + (err) => Result.err(err) + ); + } else { + return Result.ok(v); + } + } catch (e) { + if (e instanceof Error) { + return Result.err(e); + } + return Result.err(Error(e)); + } finally { + if (finallyInput) { + debugLog("# finally input:", finallyInput); + finallyInput(); + } + } +} +var convertTimestampToDateTime = (created_at) => { + if (created_at) { + return new Date(created_at * 1e3); + } + return; +}; + +// ../suite-utils/src/result.ts var AbstractResult = class { unwrap(ok, err) { const r = this._chain( @@ -690,15 +690,15 @@ var InternalErr = class extends AbstractResult { } }; var Result; -((Result7) => { +((Result8) => { function ok(value) { return new InternalOk(value); } - Result7.ok = ok; + Result8.ok = ok; function err(error) { return new InternalErr(error || Error()); } - Result7.err = err; + Result8.err = err; function all(obj) { if (Array.isArray(obj)) { const resArr = []; @@ -708,7 +708,7 @@ var Result; } resArr.push(item.value); } - return Result7.ok(resArr); + return Result8.ok(resArr); } const res = {}; const keys = Object.keys(obj); @@ -719,9 +719,9 @@ var Result; } res[key] = item.value; } - return Result7.ok(res); + return Result8.ok(res); } - Result7.all = all; + Result8.all = all; })(Result || (Result = {})); // ../converter/src/collection.ts @@ -1509,4 +1509,4 @@ var Account = { export { Account }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vc2hhcmVkL3NyYy9jb25zdGFudHMudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvYmF0Y2gudHMiLCAiLi4vLi4vbm9kZS9zcmMvaW5kZXgudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY29tbW9uLnRzIiwgIi4uLy4uL3NoYXJlZC9zcmMvc2hhcmVkLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL21pbnQudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvcGFydGlhbC1zaWduLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2NhbGN1bGF0ZS10eHNpemUudHMiLCAiLi4vLi4vZ2xvYmFsL3NyYy9pbmRleC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9pbmRleC50cyIsICIuLi8uLi9zaGFyZWQvc3JjL3Jlc3VsdC50cyIsICIuLi8uLi9jb252ZXJ0ZXIvc3JjL2NvbGxlY3Rpb24udHMiLCAiLi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WF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IE9wdGlvbjxJbnRlcm5hbENyZWF0b3JzW10+ID0+IHtcbiAgICAgIGlmICghaW5wdXQpIHtcbiAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICB9XG4gICAgICByZXR1cm4gaW5wdXQubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvQ29tcHJlc3NlZE5mdEluZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IEludGVybmFsQ3JlYXRvcnNbXSA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBbXTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBpbnB1dCEubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlciA9IChcbiAgICAgIG91dHB1dDogT3B0aW9uPEludGVybmFsQ3JlYXRvcnNbXT4sXG4gICAgKTogQ3JlYXRvcnNbXSB8IHVuZGVmaW5lZCA9PiB7XG4gICAgICBpZiAoIW91dHB1dCkge1xuICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgfVxuXG4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VsdHM6IERldGFpbHNbXSA9IFtdO1xuICAgICAga2V5cy5tYXAoKGtleSkgPT4ge1xuICAgICAgICBsZXQgcmVzITogUmVzdWx0PHN0cmluZywgVmFsaWRhdG9yRXJyb3I+O1xuICAgICAgICBzd2l0Y2ggKGtleSkge1xuICAgICAgICAgIGNhc2UgJ2ltYWdlJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuaW1hZ2UpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNJbWFnZVVybChtZXRhZGF0YS5pbWFnZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdyb3lhbHR5JzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEucm95YWx0eSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1JveWFsdHkobWV0YWRhdGEucm95YWx0eSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICA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zb2NpYXRlZCB7XG4gICAgY29uc3QgUkVUUllfT1ZFUl9MSU1JVCA9IDEwO1xuICAgIGNvbnN0IFJFVFJZX1NMRUVQX1RJTUUgPSAzO1xuICAgIC8vQGludGVybmFsXG4gICAgY29uc3QgZ2V0ID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyOiBTZWNyZXQsXG4gICAgICBhbGxvd093bmVyT2ZmQ3VydmUgPSBmYWxzZSxcbiAgICApOiBQcm9taXNlPHN0cmluZyB8IENvbW1vblN0cnVjdHVyZTxQdWJrZXk+PiA9PiB7XG4gICAgICBjb25zdCByZXMgPSBhd2FpdCBtYWtlT3JDcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIG5ldyBLZXlwYWlyLktleXBhaXIoeyBzZWNyZXQ6IGZlZVBheWVyIH0pLnB1YmtleSxcbiAgICAgICAgYWxsb3dPd25lck9mZkN1cnZlLFxuICAgICAgKTtcblxuICAgICAgaWYgKCFyZXMuaW5zdCkge1xuICAgICAgICByZXR1cm4gcmVzLnRva2VuQWNjb3VudDtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uPFB1YmtleT4oXG4gICAgICAgIFtyZXMuaW5zdF0sXG4gICAgICAgIFtdLFxuICAgICAgICBmZWVQYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgcmVzLnRva2VuQWNjb3VudCEsXG4gICAgICApO1xuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiBSZXRyeSBmdW5jdGlvbiBpZiBjcmVhdGUgbmV3IHRva2VuIGFjY291aW50XG4gICAgICpcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gbWludFxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBvd25lclxuICAgICAqIEBwYXJhbSB7U2VjcmV0fSBmZWVQYXllclxuICAgICAqIEByZXR1cm5zIFByb21pc2U8c3RyaW5nPlxuICAgICAqL1xuICAgIGV4cG9ydCBjb25zdCByZXRyeUdldE9yQ3JlYXRlID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyOiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxzdHJpbmc+ID0+IHtcbiAgICAgIGxldCBjb3VudGVyID0gMTtcbiAgICAgIHdoaWxlIChjb3VudGVyIDwgUkVUUllfT1ZFUl9MSU1JVCkge1xuICAgICAgICB0cnkge1xuICAgICAgICAgIGNvbnN0IGluc3QgPSBhd2FpdCBnZXQobWludCwgb3duZXIsIGZlZVBheWVyLCB0cnVlKTtcblxuICAgICAgICAgIGlmIChpbnN0ICYmIHR5cGVvZiBpbnN0ID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgaW5zdCk7XG4gICAgICAgICAgICByZXR1cm4gaW5zdDtcbiAgICAgICAgICB9IGVsc2UgaWYgKGluc3QgaW5zdGFuY2VvZiBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uKSB7XG4gICAgICAgICAgICAoYXdhaXQgaW5zdC5zdWJtaXQoKSkubWFwKFxuICAgICAgICAgICAgICBhc3luYyAob2s6IHN0cmluZykgPT4ge1xuICAgICAgICAgICAgICAgIGF3YWl0IE5vZGUuY29uZmlybWVkU2lnKG9rKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gaW5zdC5kYXRhO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAoZXJyOiBFcnJvcikgPT4ge1xuICAgICAgICAgICAgICAgIGRlYnVnTG9nKCcjIEVycm9yIHN1Ym1pdCByZXRyeUdldE9yQ3JlYXRlOiAnLCBlcnIpO1xuICAgICAgICAgICAgICAgIHRocm93IGVycjtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgZGVidWdMb2coYCMgcmV0cnk6ICR7Y291bnRlcn0gY3JlYXRlIHRva2VuIGFjY291bnQ6IGAsIGUpO1xuICAgICAgICAgIGRlYnVnTG9nKGAjIG1pbnQ6ICR7bWludH0sIG93bmVyOiAke293bmVyfSwgZmVlUGF5ZXI6ICR7ZmVlUGF5ZXJ9YCk7XG4gICAgICAgIH1cbiAgICAgICAgYXdhaXQgc2xlZXAoUkVUUllfU0xFRVBfVElNRSk7XG4gICAgICAgIGNvdW50ZXIrKztcbiAgICAgIH1cbiAgICAgIHRocm93IEVycm9yKGByZXRyeSBhY3Rpb24gaXMgb3ZlciBsaW1pdCAke1JFVFJZX09WRVJfTElNSVR9YCk7XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIFtNYWluIGxvZ2ljXUdldCBBc3NvY2lhdGVkIHRva2VuIEFjY291bnQuXG4gICAgICogaWYgbm90IGNyZWF0ZWQsIGNyZWF0ZSBuZXcgdG9rZW4gYWNjb3VpbnRcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBtaW50XG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAgICogQHBhcmFtIHtQdWJrZXl9IGZlZVBheWVyXG4gICAgICogQHJldHVybnMgUHJvbWlzZTxzdHJpbmc+XG4gICAgICovXG4gICAgZXhwb3J0IGNvbnN0IG1ha2VPckNyZWF0ZUluc3RydWN0aW9uID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyPzogUHVia2V5LFxuICAgICAgYWxsb3dPd25lck9mZkN1cnZlID0gZmFsc2UsXG4gICAgKTogUHJvbWlzZTx7XG4gICAgICB0b2tlbkFjY291bnQ6IHN0cmluZztcbiAgICAgIGluc3Q6IFRyYW5zYWN0aW9uSW5zdHJ1Y3Rpb24gfCB1bmRlZmluZWQ7XG4gICAgfT4gPT4ge1xuICAgICAgY29uc3QgYXNzb2NpYXRlZFRva2VuQWNjb3VudCA9IGdldEFzc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jKFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSxcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3QsXG4gICAgICAgIH07XG4gICAgICB9XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IEtleXBhaXIgYXMgT3JpZ2luYWwsIFB1YmxpY0tleSB9IGZyb20gJ0Bzb2xhbmEvd2ViMy5qcyc7XG5pbXBvcnQgeyBQdWJrZXksIFNlY3JldCB9IGZyb20gJ34vdHlwZXMvYWNjb3VudCc7XG5pbXBvcnQgYnMgZnJvbSAnYnM1OCc7XG5cbmV4cG9ydCBuYW1lc3BhY2UgQWNjb3VudCB7XG4gIGV4cG9ydCBjbGFzcyBLZXlwYWlyIHtcbiAgICBzZWNyZXQ6IFNlY3JldDtcbiAgICBwdWJrZXk6IFB1YmtleTtcblxuICAgIGNvbnN0cnVjdG9yKHBhcmFtczogeyBwdWJrZXk/OiBQdWJrZXk7IHNlY3JldDogU2VjcmV0IH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ZCIsICJDb252ZXJ0ZXIiLCAiVHJhbnNmZXIiLCAiQ29udmVydGVyIiwgIlZhbGlkYXRvciIsICJNZXNzYWdlIiwgIkNvbnZlcnRlciIsICJQdWJsaWNLZXkiLCAiYnMiLCAiQWNjb3VudCIsICJLZXlwYWlyIiwgIkFjY291bnQiLCAiQXNzb2NpYXRlZCIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiUHVibGljS2V5IiwgIkFjY291bnQiLCAiUGRhIiwgIkFjY291bnQiXQp9Cg== \ No newline at end of file +//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9iYXRjaC50cyIsICIuLi8uLi9ub2RlL3NyYy9pbmRleC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jb21tb24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvbWludC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9wYXJ0aWFsLXNpZ24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY2FsY3VsYXRlLXR4c2l6ZS50cyIsICIuLi8uLi9nbG9iYWwvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3N1aXRlLXV0aWxzL3NyYy9zaGFyZWQudHMiLCAiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL3Jlc3VsdC50cyIsICIuLi8uLi9jb252ZXJ0ZXIvc3JjL2NvbGxlY3Rpb24udHMiLCAiLi4vLi4vY29udmVydGVyL3NyYy9jcmVhdG9ycy50cyIsICIuLi8uLi9jb252ZXJ0ZXIvc3JjL2NvbXByZXNzZWQtbmZ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AcmV0dXJucyBQcm9taXNlPHN0cmluZz5cbiAgICAgKi9cbiAgICBleHBvcnQgY29uc3QgcmV0cnlHZXRPckNyZWF0ZSA9IGFzeW5jIChcbiAgICAgIG1pbnQ6IFB1YmtleSxcbiAgICAgIG93bmVyOiBQdWJrZXksXG4gICAgICBmZWVQYXllcjogU2VjcmV0LFxuICAgICk6IFByb21pc2U8c3RyaW5nPiA9PiB7XG4gICAgICBsZXQgY291bnRlciA9IDE7XG4gICAgICB3aGlsZSAoY291bnRlciA8IFJFVFJZX09WRVJfTElNSVQpIHtcbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICBjb25zdCBpbnN0ID0gYXdhaXQgZ2V0KG1pbnQsIG93bmVyLCBmZWVQYXllciwgdHJ1ZSk7XG5cbiAgICAgICAgICBpZiAoaW5zdCAmJiB0eXBlb2YgaW5zdCA9PT0gJ3N0cmluZycpIHtcbiAgICAgICAgICAgIGRlYnVnTG9nKCcjIGFzc29jaWF0ZWRUb2tlbkFjY291bnQ6ICcsIGluc3QpO1xuICAgICAgICAgICAgcmV0dXJuIGluc3Q7XG4gICAgICAgICAgfSBlbHNlIGlmIChpbnN0IGluc3RhbmNlb2YgVHJhbnNhY3Rpb25CdWlsZGVyLkNvbW1vbikge1xuICAgICAgICAgICAgKGF3YWl0IGluc3Quc3VibWl0KCkpLm1hcChcbiAgICAgICAgICAgICAgYXN5bmMgKG9rOiBzdHJpbmcpID0+IHtcbiAgICAgICAgICAgICAgICBhd2FpdCBOb2RlLmNvbmZpcm1lZFNpZyhvayk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGluc3QuZGF0YTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgKGVycjogRXJyb3IpID0+IHtcbiAgICAgICAgICAgICAgICBkZWJ1Z0xvZygnIyBFcnJvciBzdWJtaXQgcmV0cnlHZXRPckNyZWF0ZTogJywgZXJyKTtcbiAgICAgICAgICAgICAgICB0aHJvdyBlcnI7XG4gICAgICAgICAgICA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lvbkluc3RydWN0aW9uIHwgdW5kZWZpbmVkO1xuICAgIH0+ID0+IHtcbiAgICAgIGNvbnN0IGFzc29jaWF0ZWRUb2tlbkFjY291bnQgPSBnZXRBc3NvY2lhdGVkVG9rZW5BZGRyZXNzU3luYyhcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICBhbGxvd093bmVyT2ZmQ3VydmUsXG4gICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGFzc29jaWF0ZWRUb2tlbkFjY291bnQ6ICcsIGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSk7XG5cbiAgICAgIHRyeSB7XG4gICAgICAgIC8vIERvbnQgdXNlIFJlc3VsdFxuICAgICAgICBhd2FpdCBnZXRBY2NvdW50KFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCkuY29tbWl0bWVudCxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3Q6IHVuZGVmaW5lZCxcbiAgICAgICAgfTtcbiAgICAgIH0gY2F0Y2ggKGVycm9yOiB1bmtub3duKSB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5BY2NvdW50Tm90Rm91bmRFcnJvcikgJiZcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5JbnZhbGlkQWNjb3VudE93bmVyRXJyb3IpXG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9yKCdVbmV4cGVjdGVkIGVycm9yJyk7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBwYXllciA9ICFmZWVQYXllciA/IG93bmVyIDogZmVlUGF5ZXI7XG5cbiAgICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgICBwYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgICBBU1NPQ0lBVEVEX1RPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG5cbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICB0b2tlbkFjY291bnQ6IGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSxcbiAgICAgICAgICBpbnN0LFxuICAgICAgICB9O1xuICAgICAgfVxuICAgIH07XG4gIH1cbn1cbiIsICJpbXBvcnQgeyBLZXlwYWlyIGFzIE9yaWdpbmFsLCBQdWJsaWNLZXkgfSBmcm9tICdAc29sYW5hL3dlYjMuanMnO1xuaW1wb3J0IHsgUHVia2V5LCBTZWNyZXQgfSBmcm9tICd+L3R5cGVzL2FjY291bnQnO1xuaW1wb3J0IGJzIGZyb20gJ2JzNTgnO1xuXG5leHBvcnQgbmFtZXNwYWNlIEFjY291bnQge1xuICBleHBvcnQgY2xhc3MgS2V5cGFpciB7XG4gICAgc2VjcmV0OiBTZWNyZXQ7XG4gICAgcHVia2V5OiBQdWJrZXk7XG5cbiAgICBjb25zdHJ1Y3RvcihwYXJhbXM6IHsgcHVia2V5PzogUHVia2V5OyBzZWNy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iwgIkNvbnZlcnRlciIsICJWYWxpZGF0b3IiLCAiTWVzc2FnZSIsICJDb252ZXJ0ZXIiLCAiUHVibGljS2V5IiwgImJzIiwgIkFjY291bnQiLCAiS2V5cGFpciIsICJBY2NvdW50IiwgIkFzc29jaWF0ZWQiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlB1YmxpY0tleSIsICJBY2NvdW50IiwgIlBkYSIsICJBY2NvdW50Il0KfQo= \ No newline at end of file diff --git a/packages/account/tsconfig.json b/packages/account/tsconfig.json index 5f8e3d3e8..98dd2ee62 100644 --- a/packages/account/tsconfig.json +++ b/packages/account/tsconfig.json @@ -8,11 +8,16 @@ ], "~/*": [ "../*/src/index.ts" - ], - "~/shared/exports": ["../shared/src/exports.ts"] + ] } }, "display": "account", - "include": ["src/**/*.ts", "test/**/*.ts"], - "exclude": ["node_modules", "dist"] + "include": [ + "src/**/*.ts", + "test/**/*.ts" + ], + "exclude": [ + "node_modules", + "dist" + ] } diff --git a/packages/converter/dist/index.d.mts b/packages/converter/dist/index.d.mts new file mode 100644 index 000000000..b9bcdf6f8 --- /dev/null +++ b/packages/converter/dist/index.d.mts @@ -0,0 +1,615 @@ +import { PublicKey, ParsedTransactionWithMeta, TransactionSignature, Keypair } from '@solana/web3.js'; +import { Metadata as Metadata$2, DataV2 } from '@metaplex-foundation/mpl-token-metadata'; +import BN from 'bn.js'; +import { MetadataArgs } from 'mpl-bubblegum-instruction'; + +declare const pubKeyNominality: unique symbol; +declare const secretNominality: unique symbol; +type Pubkey$1 = (string & { + [pubKeyNominality]: never; +}) | string; +type Secret = (string & { + [secretNominality]: never; +}) | string; + +type bignum = number | BN; +type Option = T | null; +declare enum UseMethod { + Burn = 0, + Multiple = 1, + Single = 2 +} +type Uses = { + useMethod: UseMethod; + remaining: bignum; + total: bignum; +}; +type InputCreators = { + address: Pubkey$1; + secret: Secret; + share: number; +}; + +type FileType = string | File; + +type InternalCollection = { + key: PublicKey; + verified: boolean; +}; +type InternalCreators = { + address: PublicKey; + verified: boolean; + share: number; +}; + +type Metadata$1 = { + name: string; + symbol: string; + token_standard: string; +}; +type Grouping = { + group_key: string; + group_value: string; +}; +type Asset = { + interface: string; + id: Pubkey$1; + content: { + json_uri: string; + files: string[]; + metadata: Metadata$1; + links: string[]; + }; + authorities: { + address: Pubkey$1; + scopes: string[]; + }[]; + compression: { + eligible: boolean; + compressed: boolean; + data_hash: Pubkey$1; + creator_hash: Pubkey$1; + asset_hash: Pubkey$1; + tree: Pubkey$1; + seq: number; + leaf_id: number; + }; + grouping: Grouping[]; + royalty: { + royalty_model: 'creators' | 'fanout' | 'single'; + target: null; + percent: number; + basis_points: number; + primary_sale_happened: boolean; + locked: boolean; + }; + creators: InternalCreators[]; + ownership: { + frozen: boolean; + delegated: boolean; + delegate: Pubkey$1; + ownership_model: 'single' | 'token'; + owner: Pubkey$1; + }; + supply: { + print_max_supply: number; + print_current_supply: number; + edition_nonce: number; + }; + mutable: boolean; + burnt: boolean; +}; + +type StorageType = 'nftStorage' | 'arweave' | string; +type MetadataAndOffchain = { + onchain: Metadata$2; + offchain: Offchain; +}; +type AssetAndOffchain = { + onchain: Asset; + offchain: Offchain; +}; +type Offchain = { + name?: string; + symbol?: string; + description?: string; + seller_fee_basis_points?: number; + image?: string; + external_url?: string; + attributes?: Attribute[]; + properties?: Properties; + collection?: { + name?: string; + family?: string; + [key: string]: unknown; + }; + collectionDetails?: { + kind: string; + size: number; + }; + created_at?: number; +}; +type Properties = { + creators?: { + address?: string; + share?: number; + [key: string]: unknown; + }[]; + files?: { + type?: string; + filePath?: FileType; + [key: string]: unknown; + }[]; + [key: string]: unknown; +}; +type Attribute = { + trait_type?: string; + value?: string; + [key: string]: unknown; +}; + +type InputCollection = Pubkey$1; +type Options = { + [key: string]: unknown; +}; +type InputNftMetadata = { + name: string; + symbol: string; + royalty?: number; + storageType?: StorageType; + filePath?: FileType; + uri?: string; + isMutable?: boolean; + description?: string; + external_url?: string; + attributes?: Attribute[]; + properties?: Properties; + maxSupply?: bignum; + creators?: InputCreators[]; + uses?: Uses; + collection?: InputCollection; + options?: Options; +}; + +type Collection = { + address: Pubkey$1; + verified: boolean; +}; + +declare namespace Converter$d { + namespace CompressedNftMetadata { + const intoInfra: (input: InputNftMetadata, uri: string, sellerFeeBasisPoints: number) => MetadataArgs; + } +} + +declare namespace Converter$c { + namespace Collection { + const intoInfra: (input: Option | undefined) => Option; + const intoUser: (output: Option) => Collection | undefined; + } + namespace CollectionMint { + const intoUser: (output: Grouping[]) => Pubkey; + } +} + +declare namespace Converter$b { + namespace Creators { + const intoInfra: (input: Option | undefined) => Option; + const intoCompressedNftInfra: (input: Option | undefined) => InternalCreators[]; + const intoUser: (output: Option) => Creators[] | undefined; + } +} + +type Authority = { + address: Pubkey$1; + scopes: string[]; +}; +type Creators = { + address: Pubkey$1; + share: number; + verified: boolean; +}[]; +type Metadata = { + mint: Pubkey$1; + collectionMint: Pubkey$1; + authorities: Authority[]; + royalty: number; + name: string; + symbol: string; + uri: string; + creators: Creators; + treeAddress: Pubkey$1; + isCompressed: boolean; + isMutable: boolean; + isBurn: boolean; + editionNonce: number; + primarySaleHappened: boolean; + dateTime: Date; + offchain: Offchain; +}; + +declare namespace Converter$a { + namespace Nft { + const intoUser: (output: AssetAndOffchain) => Metadata; + } +} + +type PostTokenAccount = { + account: string; + owner: string; +}; +type MintTo = { + parsed: { + info: { + account: Pubkey$1; + mint: Pubkey$1; + mintAuthority: Pubkey$1; + tokenAmount: string; + }; + type: string; + }; + program: string; + programId?: PublicKey; +}; +type TransferChecked = { + parsed: { + info: { + destination: Pubkey$1; + mint: Pubkey$1; + multisigAuthority: Pubkey$1; + signers: Pubkey$1[]; + source: Pubkey$1; + tokenAmount: string; + }; + type: string; + }; + program: string; + programId?: PublicKey; +}; + +type History = { + sol?: string; + account?: string; + destination?: Pubkey$1; + source?: Pubkey$1; + authority?: Pubkey$1; + multisigAuthority?: Pubkey$1; + signers?: Pubkey$1[]; + mint?: Pubkey$1; + mintAuthority?: Pubkey$1; + tokenAmount?: string; + memo?: string; + dateTime?: Date; + type?: string; + sig?: string; + innerInstruction?: boolean; +}; + +declare namespace Converter$9 { + namespace Memo { + const intoUserSide: (output: Memo, meta: ParsedTransactionWithMeta, outputTransfer?: TransferChecked, mappingTokenAccount?: PostTokenAccount[]) => History | undefined; + } +} + +declare namespace Converter$8 { + namespace Mint { + const intoUserSide: (output: MintTo, meta: ParsedTransactionWithMeta) => History | undefined; + } +} + +declare namespace Converter$7 { + namespace RegularNftMetadata { + const intoInfra: (input: InputNftMetadata, uri: string, sellerFeeBasisPoints: number) => DataV2; + } +} + +declare abstract class AbstractResult { + protected abstract _chain(ok: (value: T) => Result, err: (error: E) => Result): Result; + unwrap(): T; + unwrap(ok: (value: T) => U): U; + unwrap(ok: (value: T) => U, err: (error: E) => V): U | V; + unwrap(ok: (value: T) => U, err: (error: E) => U): U; + map(ok: (value: T) => U): Result; + map(ok: (value: T) => U, err: (error: E) => F): Result; + chain(ok: (value: T) => Result): Result; + chain(ok: (value: T) => Result): Result; + chain(ok: (value: T) => Result, err: (error: E) => Result): Result; + match(ok: (value: T) => U, err: (error: E) => F): void | Promise; + submit(feePayer?: Secret): Promise>; +} +declare global { + interface Array { + submit(feePayer?: Secret): Promise>; + } +} +declare class InternalOk extends AbstractResult { + readonly value: T; + readonly isOk = true; + readonly isErr = false; + constructor(value: T); + protected _chain(ok: (value: T) => Result, _err: (error: E) => Result): Result; +} +declare class InternalErr extends AbstractResult { + readonly error: E; + readonly isOk = false; + readonly isErr = true; + constructor(error: E); + protected _chain(_ok: (value: T) => Result, err: (error: E) => Result): Result; +} +declare namespace Result { + export type Ok = InternalOk; + export type Err = InternalErr; + export function ok(value: T): Result; + export function err(error?: E): Result; + type U = Result; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3]): Result<[ + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2]): Result<[OkType, OkType, OkType], ErrType>; + export function all(obj: [R0, R1]): Result<[OkType, OkType], ErrType>; + export function all(obj: [R0]): Result<[OkType], ErrType>; + export function all(obj: []): Result<[]>; + export function all>(obj: T): Result<{ + [K in keyof T]: T[K] extends Result ? I : never; + }, { + [K in keyof T]: T[K] extends Result ? E : never; + }[keyof T]>; + export {}; +} +type Result = Result.Ok | Result.Err; +type OkType> = R extends Result ? O : never; +type ErrType> = R extends Result ? E : never; + +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 namespace Converter$6 { + namespace Properties { + const intoInfra: (input: Properties | undefined, callbackFunc: (filePath: FileType, storageType: StorageType, feePayer?: Secret) => Promise>, storageType: StorageType, feePayer?: Secret) => Promise; + } +} + +declare namespace Converter$5 { + namespace Royalty { + const THRESHOLD = 100; + const intoInfra: (percentage: number) => number; + const intoUser: (percentage: number) => number; + } +} + +type InputTokenMetadata = { + name: string; + symbol: string; + filePath?: FileType; + uri?: string; + storageType?: StorageType; + description?: string; + royalty?: number; + uses?: Uses; + creators?: InputCreators[]; + attributes?: Attribute[]; + options?: Options; +}; + +declare namespace Converter$4 { + namespace TokenMetadata { + const intoInfra: (input: InputTokenMetadata, uri: string, sellerFeeBasisPoints: number) => DataV2; + const intoUser: (output: MetadataAndOffchain, tokenAmount: string) => TokenMetadata; + const deleteNullStrings: (str: string) => string; + } +} + +declare namespace Converter$3 { + namespace TransferChecked { + const intoUserSide: (output: TransferChecked, meta: ParsedTransactionWithMeta, mappingTokenAccount?: PostTokenAccount[]) => History | undefined; + } +} + +declare namespace Converter$2 { + namespace Transfer { + const intoUserSide: (output: Transfer, meta: ParsedTransactionWithMeta) => History | undefined; + } +} + +declare namespace Converter$1 { + namespace Uses { + const intoUserSide: (output: Option) => Uses | undefined; + } +} + +declare const Converter: { + Uses: typeof Converter$1.Uses; + Transfer: typeof Converter$2.Transfer; + TransferChecked: typeof Converter$3.TransferChecked; + TokenMetadata: typeof Converter$4.TokenMetadata; + Royalty: typeof Converter$5.Royalty; + Properties: typeof Converter$6.Properties; + RegularNftMetadata: typeof Converter$7.RegularNftMetadata; + Mint: typeof Converter$8.Mint; + Memo: typeof Converter$9.Memo; + Nft: typeof Converter$a.Nft; + Creators: typeof Converter$b.Creators; + Collection: typeof Converter$c.Collection; + CollectionMint: typeof Converter$c.CollectionMint; + CompressedNftMetadata: typeof Converter$d.CompressedNftMetadata; +}; + +export { Converter }; diff --git a/packages/converter/dist/index.d.ts b/packages/converter/dist/index.d.ts new file mode 100644 index 000000000..b9bcdf6f8 --- /dev/null +++ b/packages/converter/dist/index.d.ts @@ -0,0 +1,615 @@ +import { PublicKey, ParsedTransactionWithMeta, TransactionSignature, Keypair } from '@solana/web3.js'; +import { Metadata as Metadata$2, DataV2 } from '@metaplex-foundation/mpl-token-metadata'; +import BN from 'bn.js'; +import { MetadataArgs } from 'mpl-bubblegum-instruction'; + +declare const pubKeyNominality: unique symbol; +declare const secretNominality: unique symbol; +type Pubkey$1 = (string & { + [pubKeyNominality]: never; +}) | string; +type Secret = (string & { + [secretNominality]: never; +}) | string; + +type bignum = number | BN; +type Option = T | null; +declare enum UseMethod { + Burn = 0, + Multiple = 1, + Single = 2 +} +type Uses = { + useMethod: UseMethod; + remaining: bignum; + total: bignum; +}; +type InputCreators = { + address: Pubkey$1; + secret: Secret; + share: number; +}; + +type FileType = string | File; + +type InternalCollection = { + key: PublicKey; + verified: boolean; +}; +type InternalCreators = { + address: PublicKey; + verified: boolean; + share: number; +}; + +type Metadata$1 = { + name: string; + symbol: string; + token_standard: string; +}; +type Grouping = { + group_key: string; + group_value: string; +}; +type Asset = { + interface: string; + id: Pubkey$1; + content: { + json_uri: string; + files: string[]; + metadata: Metadata$1; + links: string[]; + }; + authorities: { + address: Pubkey$1; + scopes: string[]; + }[]; + compression: { + eligible: boolean; + compressed: boolean; + data_hash: Pubkey$1; + creator_hash: Pubkey$1; + asset_hash: Pubkey$1; + tree: Pubkey$1; + seq: number; + leaf_id: number; + }; + grouping: Grouping[]; + royalty: { + royalty_model: 'creators' | 'fanout' | 'single'; + target: null; + percent: number; + basis_points: number; + primary_sale_happened: boolean; + locked: boolean; + }; + creators: InternalCreators[]; + ownership: { + frozen: boolean; + delegated: boolean; + delegate: Pubkey$1; + ownership_model: 'single' | 'token'; + owner: Pubkey$1; + }; + supply: { + print_max_supply: number; + print_current_supply: number; + edition_nonce: number; + }; + mutable: boolean; + burnt: boolean; +}; + +type StorageType = 'nftStorage' | 'arweave' | string; +type MetadataAndOffchain = { + onchain: Metadata$2; + offchain: Offchain; +}; +type AssetAndOffchain = { + onchain: Asset; + offchain: Offchain; +}; +type Offchain = { + name?: string; + symbol?: string; + description?: string; + seller_fee_basis_points?: number; + image?: string; + external_url?: string; + attributes?: Attribute[]; + properties?: Properties; + collection?: { + name?: string; + family?: string; + [key: string]: unknown; + }; + collectionDetails?: { + kind: string; + size: number; + }; + created_at?: number; +}; +type Properties = { + creators?: { + address?: string; + share?: number; + [key: string]: unknown; + }[]; + files?: { + type?: string; + filePath?: FileType; + [key: string]: unknown; + }[]; + [key: string]: unknown; +}; +type Attribute = { + trait_type?: string; + value?: string; + [key: string]: unknown; +}; + +type InputCollection = Pubkey$1; +type Options = { + [key: string]: unknown; +}; +type InputNftMetadata = { + name: string; + symbol: string; + royalty?: number; + storageType?: StorageType; + filePath?: FileType; + uri?: string; + isMutable?: boolean; + description?: string; + external_url?: string; + attributes?: Attribute[]; + properties?: Properties; + maxSupply?: bignum; + creators?: InputCreators[]; + uses?: Uses; + collection?: InputCollection; + options?: Options; +}; + +type Collection = { + address: Pubkey$1; + verified: boolean; +}; + +declare namespace Converter$d { + namespace CompressedNftMetadata { + const intoInfra: (input: InputNftMetadata, uri: string, sellerFeeBasisPoints: number) => MetadataArgs; + } +} + +declare namespace Converter$c { + namespace Collection { + const intoInfra: (input: Option | undefined) => Option; + const intoUser: (output: Option) => Collection | undefined; + } + namespace CollectionMint { + const intoUser: (output: Grouping[]) => Pubkey; + } +} + +declare namespace Converter$b { + namespace Creators { + const intoInfra: (input: Option | undefined) => Option; + const intoCompressedNftInfra: (input: Option | undefined) => InternalCreators[]; + const intoUser: (output: Option) => Creators[] | undefined; + } +} + +type Authority = { + address: Pubkey$1; + scopes: string[]; +}; +type Creators = { + address: Pubkey$1; + share: number; + verified: boolean; +}[]; +type Metadata = { + mint: Pubkey$1; + collectionMint: Pubkey$1; + authorities: Authority[]; + royalty: number; + name: string; + symbol: string; + uri: string; + creators: Creators; + treeAddress: Pubkey$1; + isCompressed: boolean; + isMutable: boolean; + isBurn: boolean; + editionNonce: number; + primarySaleHappened: boolean; + dateTime: Date; + offchain: Offchain; +}; + +declare namespace Converter$a { + namespace Nft { + const intoUser: (output: AssetAndOffchain) => Metadata; + } +} + +type PostTokenAccount = { + account: string; + owner: string; +}; +type MintTo = { + parsed: { + info: { + account: Pubkey$1; + mint: Pubkey$1; + mintAuthority: Pubkey$1; + tokenAmount: string; + }; + type: string; + }; + program: string; + programId?: PublicKey; +}; +type TransferChecked = { + parsed: { + info: { + destination: Pubkey$1; + mint: Pubkey$1; + multisigAuthority: Pubkey$1; + signers: Pubkey$1[]; + source: Pubkey$1; + tokenAmount: string; + }; + type: string; + }; + program: string; + programId?: PublicKey; +}; + +type History = { + sol?: string; + account?: string; + destination?: Pubkey$1; + source?: Pubkey$1; + authority?: Pubkey$1; + multisigAuthority?: Pubkey$1; + signers?: Pubkey$1[]; + mint?: Pubkey$1; + mintAuthority?: Pubkey$1; + tokenAmount?: string; + memo?: string; + dateTime?: Date; + type?: string; + sig?: string; + innerInstruction?: boolean; +}; + +declare namespace Converter$9 { + namespace Memo { + const intoUserSide: (output: Memo, meta: ParsedTransactionWithMeta, outputTransfer?: TransferChecked, mappingTokenAccount?: PostTokenAccount[]) => History | undefined; + } +} + +declare namespace Converter$8 { + namespace Mint { + const intoUserSide: (output: MintTo, meta: ParsedTransactionWithMeta) => History | undefined; + } +} + +declare namespace Converter$7 { + namespace RegularNftMetadata { + const intoInfra: (input: InputNftMetadata, uri: string, sellerFeeBasisPoints: number) => DataV2; + } +} + +declare abstract class AbstractResult { + protected abstract _chain(ok: (value: T) => Result, err: (error: E) => Result): Result; + unwrap(): T; + unwrap(ok: (value: T) => U): U; + unwrap(ok: (value: T) => U, err: (error: E) => V): U | V; + unwrap(ok: (value: T) => U, err: (error: E) => U): U; + map(ok: (value: T) => U): Result; + map(ok: (value: T) => U, err: (error: E) => F): Result; + chain(ok: (value: T) => Result): Result; + chain(ok: (value: T) => Result): Result; + chain(ok: (value: T) => Result, err: (error: E) => Result): Result; + match(ok: (value: T) => U, err: (error: E) => F): void | Promise; + submit(feePayer?: Secret): Promise>; +} +declare global { + interface Array { + submit(feePayer?: Secret): Promise>; + } +} +declare class InternalOk extends AbstractResult { + readonly value: T; + readonly isOk = true; + readonly isErr = false; + constructor(value: T); + protected _chain(ok: (value: T) => Result, _err: (error: E) => Result): Result; +} +declare class InternalErr extends AbstractResult { + readonly error: E; + readonly isOk = false; + readonly isErr = true; + constructor(error: E); + protected _chain(_ok: (value: T) => Result, err: (error: E) => Result): Result; +} +declare namespace Result { + export type Ok = InternalOk; + export type Err = InternalErr; + export function ok(value: T): Result; + export function err(error?: E): Result; + type U = Result; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3]): Result<[ + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2]): Result<[OkType, OkType, OkType], ErrType>; + export function all(obj: [R0, R1]): Result<[OkType, OkType], ErrType>; + export function all(obj: [R0]): Result<[OkType], ErrType>; + export function all(obj: []): Result<[]>; + export function all>(obj: T): Result<{ + [K in keyof T]: T[K] extends Result ? I : never; + }, { + [K in keyof T]: T[K] extends Result ? E : never; + }[keyof T]>; + export {}; +} +type Result = Result.Ok | Result.Err; +type OkType> = R extends Result ? O : never; +type ErrType> = R extends Result ? E : never; + +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 namespace Converter$6 { + namespace Properties { + const intoInfra: (input: Properties | undefined, callbackFunc: (filePath: FileType, storageType: StorageType, feePayer?: Secret) => Promise>, storageType: StorageType, feePayer?: Secret) => Promise; + } +} + +declare namespace Converter$5 { + namespace Royalty { + const THRESHOLD = 100; + const intoInfra: (percentage: number) => number; + const intoUser: (percentage: number) => number; + } +} + +type InputTokenMetadata = { + name: string; + symbol: string; + filePath?: FileType; + uri?: string; + storageType?: StorageType; + description?: string; + royalty?: number; + uses?: Uses; + creators?: InputCreators[]; + attributes?: Attribute[]; + options?: Options; +}; + +declare namespace Converter$4 { + namespace TokenMetadata { + const intoInfra: (input: InputTokenMetadata, uri: string, sellerFeeBasisPoints: number) => DataV2; + const intoUser: (output: MetadataAndOffchain, tokenAmount: string) => TokenMetadata; + const deleteNullStrings: (str: string) => string; + } +} + +declare namespace Converter$3 { + namespace TransferChecked { + const intoUserSide: (output: TransferChecked, meta: ParsedTransactionWithMeta, mappingTokenAccount?: PostTokenAccount[]) => History | undefined; + } +} + +declare namespace Converter$2 { + namespace Transfer { + const intoUserSide: (output: Transfer, meta: ParsedTransactionWithMeta) => History | undefined; + } +} + +declare namespace Converter$1 { + namespace Uses { + const intoUserSide: (output: Option) => Uses | undefined; + } +} + +declare const Converter: { + Uses: typeof Converter$1.Uses; + Transfer: typeof Converter$2.Transfer; + TransferChecked: typeof Converter$3.TransferChecked; + TokenMetadata: typeof Converter$4.TokenMetadata; + Royalty: typeof Converter$5.Royalty; + Properties: typeof Converter$6.Properties; + RegularNftMetadata: typeof Converter$7.RegularNftMetadata; + Mint: typeof Converter$8.Mint; + Memo: typeof Converter$9.Memo; + Nft: typeof Converter$a.Nft; + Creators: typeof Converter$b.Creators; + Collection: typeof Converter$c.Collection; + CollectionMint: typeof Converter$c.CollectionMint; + CompressedNftMetadata: typeof Converter$d.CompressedNftMetadata; +}; + +export { Converter }; diff --git a/packages/converter/dist/index.js b/packages/converter/dist/index.js new file mode 100644 index 000000000..e5e74e693 --- /dev/null +++ b/packages/converter/dist/index.js @@ -0,0 +1,1529 @@ +"use strict"; +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + Converter: () => Converter5 +}); +module.exports = __toCommonJS(src_exports); + +// src/collection.ts +var Converter; +((Converter15) => { + let Collection; + ((Collection2) => { + Collection2.intoInfra = (input) => { + if (!input) { + return null; + } + return { + key: input.toPublicKey(), + verified: false + }; + }; + Collection2.intoUser = (output) => { + if (!output) { + return void 0; + } + return { + address: output.key.toString(), + verified: output.verified + }; + }; + })(Collection = Converter15.Collection || (Converter15.Collection = {})); + let CollectionMint; + ((CollectionMint2) => { + CollectionMint2.intoUser = (output) => { + const res = output.find((value) => { + if (value.group_key === "collection") { + return value.group_value; + } + }); + return res ? res.group_value : ""; + }; + })(CollectionMint = Converter15.CollectionMint || (Converter15.CollectionMint = {})); +})(Converter || (Converter = {})); + +// src/creators.ts +var Converter2; +((Converter15) => { + let Creators; + ((Creators2) => { + Creators2.intoInfra = (input) => { + if (!input) { + return null; + } + return input.map((data) => { + return { + address: data.address.toPublicKey(), + share: data.share, + verified: false + }; + }); + }; + Creators2.intoCompressedNftInfra = (input) => { + if (!input) { + return []; + } + return input.map((data) => { + return { + address: data.address.toPublicKey(), + share: data.share, + verified: false + }; + }); + }; + Creators2.intoUser = (output) => { + if (!output) { + return void 0; + } + return output.map((data) => { + return { + address: data.address.toString(), + share: data.share, + verified: data.verified + }; + }); + }; + })(Creators = Converter15.Creators || (Converter15.Creators = {})); +})(Converter2 || (Converter2 = {})); + +// src/compressed-nft-metadata.ts +var import_mpl_bubblegum_instruction = require("mpl-bubblegum-instruction"); +var Converter3; +((Converter15) => { + let CompressedNftMetadata; + ((CompressedNftMetadata2) => { + CompressedNftMetadata2.intoInfra = (input, uri, sellerFeeBasisPoints) => { + return { + name: input.name, + symbol: input.symbol, + uri, + sellerFeeBasisPoints, + creators: Converter2.Creators.intoCompressedNftInfra(input.creators), + collection: Converter.Collection.intoInfra(input.collection), + uses: input.uses || null, + primarySaleHappened: false, + isMutable: input.isMutable ?? false, + editionNonce: 0, + tokenStandard: import_mpl_bubblegum_instruction.TokenStandard.NonFungible, + tokenProgramVersion: import_mpl_bubblegum_instruction.TokenProgramVersion.Original + }; + }; + })(CompressedNftMetadata = Converter15.CompressedNftMetadata || (Converter15.CompressedNftMetadata = {})); +})(Converter3 || (Converter3 = {})); + +// src/royalty.ts +var Converter4; +((Converter15) => { + let Royalty; + ((Royalty2) => { + Royalty2.THRESHOLD = 100; + Royalty2.intoInfra = (percentage) => { + return percentage * Royalty2.THRESHOLD; + }; + Royalty2.intoUser = (percentage) => { + return percentage * Royalty2.THRESHOLD; + }; + })(Royalty = Converter15.Royalty || (Converter15.Royalty = {})); +})(Converter4 || (Converter4 = {})); + +// ../suite-utils/src/constants.ts +var import_web3 = require("@solana/web3.js"); +var import_load = __toESM(require("@solana-suite/config/load")); +var Config = import_load.default; +var Constants; +((Constants2) => { + let WarnningMessage; + ((WarnningMessage2) => { + const THRESHHOLD = 50; + let isDisplay = false; + WarnningMessage2.NFT_STORAGE_API_KEY = ` + [YOU HAVE TO DO] + -------------------------------------- + You need to update nftStorageApiKey define parameter in solana-suite.json. + Can get api key from https://nft.storage/ + -------------------------------------- + `; + WarnningMessage2.DAS_API_URL = ` + [YOU HAVE TO DO] + -------------------------------------- + You need to update dasApiUrl define parameter in solana-suite.json. + can get api url from https://www.helius.dev/ + -------------------------------------- + `; + WarnningMessage2.ANNOUNCE = ` + [DEPRECATED] + -------------------------------------- + Account, Node, toExplorer, Pubkey, Secret have been moved to + @solana-suite/utils + ------------------------------------- + `; + WarnningMessage2.calculateProbability = () => { + const randomValue = Math.random(); + const probability = 1 / THRESHHOLD; + if (!isDisplay && randomValue < probability) { + isDisplay = true; + return true; + } + return false; + }; + })(WarnningMessage = Constants2.WarnningMessage || (Constants2.WarnningMessage = {})); +})(Constants || (Constants = {})); +((Constants2) => { + Constants2.currentCluster = Config.cluster.type; + Constants2.customClusterUrl = Config.cluster.customClusterUrl; + Constants2.isDebugging = Config.debugging; + Constants2.nftStorageApiKey = Config.nftStorageApiKey; + Constants2.dasApiUrl = Config.dasApiUrl; + let Cluster; + ((Cluster2) => { + Cluster2["prd"] = "mainnet-beta"; + Cluster2["prdMetaplex"] = "mainnet-beta-metaplex"; + Cluster2["dev"] = "devnet"; + Cluster2["test"] = "testnet"; + Cluster2["localhost"] = "localhost-devnet"; + })(Cluster = Constants2.Cluster || (Constants2.Cluster = {})); + let EndPointUrl; + ((EndPointUrl2) => { + EndPointUrl2["prd"] = "https://api.mainnet-beta.solana.com"; + EndPointUrl2["prdMetaplex"] = "https://api.metaplex.solana.com"; + EndPointUrl2["dev"] = "https://api.devnet.solana.com"; + EndPointUrl2["test"] = "https://api.testnet.solana.com"; + EndPointUrl2["localhost"] = "http://api.devnet.solana.com"; + })(EndPointUrl = Constants2.EndPointUrl || (Constants2.EndPointUrl = {})); + let BundlrUrl; + ((BundlrUrl2) => { + BundlrUrl2["prd"] = "https://node1.irys.xyz,https://node2.irys.xyz"; + BundlrUrl2["dev"] = "https://devnet.irys.xyz"; + })(BundlrUrl = Constants2.BundlrUrl || (Constants2.BundlrUrl = {})); + let DasApiUrl; + ((DasApiUrl2) => { + DasApiUrl2["dev"] = "https://devnet.helius-rpc.com/?api-key=15319bf4-5b40-4958-ac8d-6313aa55eb92,https://rpc-devnet.helius.xyz?api-key=9f70a843-3274-4ffd-a0a9-323f8b7c0639"; + })(DasApiUrl = Constants2.DasApiUrl || (Constants2.DasApiUrl = {})); + let NftstorageApiKey; + ((NftstorageApiKey2) => { + NftstorageApiKey2["dev"] = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJkaWQ6ZXRocjoweERGMjcyN2VkODZhRGU1RTMyZDZDZEJlODc0YzRFNDlEODY1OWZmOEMiLCJpc3MiOiJuZnQtc3RvcmFnZSIsImlhdCI6MTYyMDI2NDk0MzcwNiwibmFtZSI6ImRlbW8ifQ.d4J70mikxRB8a5vwNu6SO5HDA8JaueuseAj7Q_ytMCE"; + })(NftstorageApiKey = Constants2.NftstorageApiKey || (Constants2.NftstorageApiKey = {})); + Constants2.loadConfig = async () => { + Config = await import("@solana-suite/config/load"); + }; + Constants2.switchCluster = (param) => { + const { cluster: env, customClusterUrl: customClusterUrl2 } = param; + if (customClusterUrl2 && customClusterUrl2.length > 0) { + const index = Date.now() % customClusterUrl2.length; + return customClusterUrl2[index]; + } + switch (env) { + case "mainnet-beta" /* prd */: + return "https://api.mainnet-beta.solana.com" /* prd */; + case "mainnet-beta-metaplex" /* prdMetaplex */: + return "https://api.metaplex.solana.com" /* prdMetaplex */; + case "testnet" /* test */: + return "https://api.testnet.solana.com" /* test */; + case "devnet" /* dev */: + return "https://api.devnet.solana.com" /* dev */; + default: + return "http://api.devnet.solana.com" /* localhost */; + } + }; + Constants2.switchBundlr = (env) => { + switch (env) { + case "mainnet-beta" /* prd */: { + const urls = "https://node1.irys.xyz,https://node2.irys.xyz" /* prd */.split(","); + const index = Date.now() % urls.length; + return urls[index]; + } + default: { + return "https://devnet.irys.xyz" /* dev */; + } + } + }; + Constants2.switchDasApi = (env) => { + switch (env) { + case "mainnet-beta" /* prd */: { + if (Constants2.dasApiUrl.length < 1) { + throw Error(Constants2.WarnningMessage.DAS_API_URL); + } + const urls = "https://node1.irys.xyz,https://node2.irys.xyz" /* prd */.split(","); + const index = Date.now() % urls.length; + return urls[index]; + } + default: { + const urls = "https://devnet.helius-rpc.com/?api-key=15319bf4-5b40-4958-ac8d-6313aa55eb92,https://rpc-devnet.helius.xyz?api-key=9f70a843-3274-4ffd-a0a9-323f8b7c0639" /* dev */.split(","); + const index = Date.now() % urls.length; + return urls[index]; + } + } + }; + Constants2.switchNftStorage = (env) => { + switch (env) { + case "mainnet-beta" /* prd */: + if (!Constants2.nftStorageApiKey) { + throw Error(Constants2.WarnningMessage.NFT_STORAGE_API_KEY); + } + return Constants2.nftStorageApiKey; + default: { + return "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJkaWQ6ZXRocjoweERGMjcyN2VkODZhRGU1RTMyZDZDZEJlODc0YzRFNDlEODY1OWZmOEMiLCJpc3MiOiJuZnQtc3RvcmFnZSIsImlhdCI6MTYyMDI2NDk0MzcwNiwibmFtZSI6ImRlbW8ifQ.d4J70mikxRB8a5vwNu6SO5HDA8JaueuseAj7Q_ytMCE" /* dev */; + } + } + }; + Constants2.WRAPPED_TOKEN_PROGRAM_ID = new import_web3.PublicKey( + "So11111111111111111111111111111111111111112" + ); + Constants2.MEMO_PROGRAM_ID = new import_web3.PublicKey( + "Memo1UhkJRfHyvLMcVucJwxXeuD728EqVDDwQDxFMNo" + ); + Constants2.METAPLEX_PROGRAM_ID = new import_web3.PublicKey( + "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s" + ); + Constants2.COMMITMENT = "confirmed"; + Constants2.NFT_STORAGE_GATEWAY_URL = "https://ipfs.io/ipfs"; + Constants2.IRYS_GATEWAY_URL = "https://gateway.irys.xyz"; + Constants2.BUNDLR_NETWORK_URL = (0, Constants2.switchBundlr)(Config.cluster.type); + Constants2.DAS_API_URL = (0, Constants2.switchDasApi)(Config.cluster.type); + Constants2.NFT_STORAGE_API_KEY = (0, Constants2.switchNftStorage)(Config.cluster.type); + Constants2.EXPLORER_SOLSCAN_URL = "https://solscan.io"; + Constants2.EXPLORER_SOLANAFM_URL = "https://solana.fm"; + Constants2.EXPLORER_XRAY_URL = "https://xray.helius.xyz"; +})(Constants || (Constants = {})); +console.log(Constants.WarnningMessage.ANNOUNCE); + +// ../transaction-builder/src/batch.ts +var import_web34 = require("@solana/web3.js"); + +// ../node/src/index.ts +var import_web32 = require("@solana/web3.js"); +var Node; +((Node2) => { + const setted = { + clusterUrl: "", + commitment: Constants.COMMITMENT, + customClusterUrl: [] + }; + Node2.getConnection = () => { + if (setted.customClusterUrl.length > 0) { + setted.clusterUrl = Constants.switchCluster({ + customClusterUrl: setted.customClusterUrl + }); + } else if (Constants.customClusterUrl.length > 0) { + setted.clusterUrl = Constants.switchCluster({ + customClusterUrl: Constants.customClusterUrl + }); + } else if (!setted.clusterUrl) { + setted.clusterUrl = Constants.switchCluster({ + cluster: Constants.currentCluster + }); + } + if (!setted.commitment) { + setted.commitment = Constants.COMMITMENT; + } + return new import_web32.Connection(setted.clusterUrl, setted.commitment); + }; + Node2.changeConnection = (param) => { + setted.clusterUrl = ""; + setted.customClusterUrl = []; + setted.commitment = Constants.COMMITMENT; + const { cluster, commitment, customClusterUrl } = param; + if (commitment) { + setted.commitment = commitment; + debugLog("# Node change commitment: ", setted.commitment); + } + if (cluster) { + setted.clusterUrl = Constants.switchCluster({ cluster }); + debugLog("# Node change clusterUrl: ", setted.clusterUrl); + } + if (customClusterUrl) { + debugLog("# customClusterUrl: ", customClusterUrl); + setted.clusterUrl = Constants.switchCluster({ customClusterUrl }); + setted.customClusterUrl = customClusterUrl; + debugLog( + "# Node change cluster, custom cluster url: ", + setted.clusterUrl + ); + } + }; + Node2.confirmedSig = async (signature, commitment = Constants.COMMITMENT) => { + const connection = Node2.getConnection(); + const latestBlockhash = await connection.getLatestBlockhash(); + return await connection.confirmTransaction( + { + blockhash: latestBlockhash.blockhash, + lastValidBlockHeight: latestBlockhash.lastValidBlockHeight, + signature + }, + commitment + ).then(Result.ok).catch(Result.err); + }; +})(Node || (Node = {})); + +// ../transaction-builder/src/common.ts +var import_web33 = require("@solana/web3.js"); +var MAX_RETRIES = 3; +var TransactionBuilder; +((TransactionBuilder7) => { + class Common2 { + static MAX_TRANSACTION_SIZE = 1232; + instructions; + signers; + feePayer; + data; + constructor(instructions, signers, feePayer, data) { + this.instructions = instructions; + this.signers = signers; + this.feePayer = feePayer; + this.data = data; + } + submit = async () => { + return Try(async () => { + if (!(this instanceof Common2)) { + throw Error("only Instruction object that can use this"); + } + const transaction = new import_web33.Transaction(); + const blockhashObj = await Node.getConnection().getLatestBlockhash(); + transaction.lastValidBlockHeight = blockhashObj.lastValidBlockHeight; + transaction.recentBlockhash = blockhashObj.blockhash; + let finalSigners = this.signers; + if (this.feePayer) { + transaction.feePayer = this.feePayer.publicKey; + finalSigners = [this.feePayer, ...this.signers]; + } + this.instructions.forEach((inst) => transaction.add(inst)); + const options = { + maxRetries: MAX_RETRIES + }; + return await (0, import_web33.sendAndConfirmTransaction)( + Node.getConnection(), + transaction, + finalSigners, + options + ); + }); + }; + } + TransactionBuilder7.Common = Common2; +})(TransactionBuilder || (TransactionBuilder = {})); + +// ../transaction-builder/src/batch.ts +var TransactionBuilder2; +((TransactionBuilder7) => { + class Batch { + submit = async (arr) => { + return Try(async () => { + let i = 0; + for (const a of arr) { + if (!a.instructions && !a.signers) { + throw Error( + `only Instruction object that can use batchSubmit(). + Index: ${i}, Set value: ${JSON.stringify(a)}` + ); + } + i++; + } + const instructions = arr.flatMap((a) => a.instructions); + const signers = arr.flatMap((a) => a.signers); + const feePayers = arr.filter((a) => a.feePayer !== void 0); + let feePayer = signers[0]; + if (feePayers.length > 0 && feePayers[0].feePayer) { + feePayer = feePayers[0].feePayer; + } + const transaction = new import_web34.Transaction(); + let finalSigners = signers; + if (feePayer) { + transaction.feePayer = feePayer.publicKey; + finalSigners = [feePayer, ...signers]; + } + instructions.map((inst) => transaction.add(inst)); + const options = { + maxRetries: MAX_RETRIES + }; + return await (0, import_web34.sendAndConfirmTransaction)( + Node.getConnection(), + transaction, + finalSigners, + options + ); + }); + }; + } + TransactionBuilder7.Batch = Batch; +})(TransactionBuilder2 || (TransactionBuilder2 = {})); + +// ../transaction-builder/src/mint.ts +var import_web35 = require("@solana/web3.js"); +var TransactionBuilder3; +((TransactionBuilder7) => { + class Mint { + instructions; + signers; + feePayer; + data; + constructor(instructions, signers, feePayer, data) { + this.instructions = instructions; + this.signers = signers; + this.data = data; + this.feePayer = feePayer; + } + submit = async () => { + return Try(async () => { + if (!(this instanceof Mint)) { + throw Error("only MintInstruction object that can use this"); + } + const transaction = new import_web35.Transaction(); + const blockhashObj = await Node.getConnection().getLatestBlockhash(); + transaction.lastValidBlockHeight = blockhashObj.lastValidBlockHeight; + transaction.recentBlockhash = blockhashObj.blockhash; + let finalSigners = this.signers; + if (this.feePayer) { + transaction.feePayer = this.feePayer.publicKey; + finalSigners = [this.feePayer, ...this.signers]; + } + this.instructions.forEach((inst) => transaction.add(inst)); + const options = { + maxRetries: MAX_RETRIES + }; + if (Node.getConnection().rpcEndpoint === Constants.EndPointUrl.prd) { + debugLog("# Change metaplex cluster on mainnet-beta"); + Node.changeConnection({ cluster: Constants.Cluster.prdMetaplex }); + } + return await (0, import_web35.sendAndConfirmTransaction)( + Node.getConnection(), + transaction, + finalSigners, + options + ); + }); + }; + } + TransactionBuilder7.Mint = Mint; +})(TransactionBuilder3 || (TransactionBuilder3 = {})); + +// ../transaction-builder/src/partial-sign.ts +var import_web36 = require("@solana/web3.js"); +var TransactionBuilder4; +((TransactionBuilder7) => { + class PartialSign { + hexInstruction; + data; + canSubmit; + constructor(instructions, mint, canSubmit = false) { + this.hexInstruction = instructions; + this.data = mint; + this.canSubmit = canSubmit; + } + submit = async (feePayer) => { + return Try(async () => { + if (!(this instanceof PartialSign)) { + throw Error("only PartialSignInstruction object that can use this"); + } + const decode = Buffer.from(this.hexInstruction, "hex"); + const transactionFromJson = import_web36.Transaction.from(decode); + transactionFromJson.partialSign(feePayer.toKeypair()); + const options = { + maxRetries: MAX_RETRIES + }; + const wireTransaction = transactionFromJson.serialize(); + return await Node.getConnection().sendRawTransaction( + wireTransaction, + options + ); + }); + }; + } + TransactionBuilder7.PartialSign = PartialSign; +})(TransactionBuilder4 || (TransactionBuilder4 = {})); + +// ../transaction-builder/src/calculate-txsize.ts +var TransactionBuilder5; +((TransactionBuilder7) => { + const LOW_VALUE = 127; + const HIGH_VALUE = 16383; + const MAX_TRANSACTION_SIZE = 1232; + const compactHeader = (n) => n <= LOW_VALUE ? 1 : n <= HIGH_VALUE ? 2 : 3; + const compactArraySize = (n, size) => compactHeader(n) + n * size; + TransactionBuilder7.calculateTxSize = (transaction, feePayer) => { + const feePayerPk = [feePayer.toBase58()]; + const signers = new Set(feePayerPk); + const accounts = new Set(feePayerPk); + const ixsSize = transaction.instructions.reduce((acc, ix) => { + ix.keys.forEach(({ pubkey, isSigner }) => { + const pk = pubkey.toBase58(); + if (isSigner) + signers.add(pk); + accounts.add(pk); + }); + accounts.add(ix.programId.toBase58()); + const nIndexes = ix.keys.length; + const opaqueData = ix.data.length; + return acc + 1 + // PID index + compactArraySize(nIndexes, 1) + compactArraySize(opaqueData, 1); + }, 0); + return compactArraySize(signers.size, 64) + // signatures + 3 + // header + compactArraySize(accounts.size, 32) + // accounts + 32 + // blockhash + compactHeader(transaction.instructions.length) + // instructions + ixsSize; + }; + TransactionBuilder7.isOverTransactionSize = (transaction, feePayer) => { + return (0, TransactionBuilder7.calculateTxSize)(transaction, feePayer) > MAX_TRANSACTION_SIZE; + }; +})(TransactionBuilder5 || (TransactionBuilder5 = {})); + +// ../global/src/index.ts +var import_web39 = require("@solana/web3.js"); + +// ../account/src/associated.ts +var import_spl_token = require("@solana/spl-token"); + +// ../account/src/keypair.ts +var import_web37 = require("@solana/web3.js"); +var import_bs58 = __toESM(require("bs58")); +var Account; +((Account5) => { + class Keypair4 { + secret; + pubkey; + constructor(params) { + if (!params.pubkey) { + const keypair = params.secret.toKeypair(); + this.pubkey = keypair.publicKey.toString(); + } else { + this.pubkey = params.pubkey; + } + this.secret = params.secret; + } + toPublicKey() { + return new import_web37.PublicKey(this.pubkey); + } + toKeypair() { + const decoded = import_bs58.default.decode(this.secret); + return import_web37.Keypair.fromSecretKey(decoded); + } + static isPubkey = (value) => /^[0-9a-zA-Z]{32,44}$/.test(value); + static isSecret = (value) => /^[0-9a-zA-Z]{87,88}$/.test(value); + static create = () => { + const keypair = import_web37.Keypair.generate(); + return new Keypair4({ + pubkey: keypair.publicKey.toString(), + secret: import_bs58.default.encode(keypair.secretKey) + }); + }; + static toKeyPair = (keypair) => { + return new Keypair4({ + pubkey: keypair.publicKey.toString(), + secret: import_bs58.default.encode(keypair.secretKey) + }); + }; + } + Account5.Keypair = Keypair4; +})(Account || (Account = {})); + +// ../account/src/associated.ts +var Account2; +((Account5) => { + let Associated; + ((Associated2) => { + const RETRY_OVER_LIMIT = 10; + const RETRY_SLEEP_TIME = 3; + const get = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { + const res = await (0, Associated2.makeOrCreateInstruction)( + mint, + owner, + new Account.Keypair({ secret: feePayer }).pubkey, + allowOwnerOffCurve + ); + if (!res.inst) { + return res.tokenAccount; + } + return new TransactionBuilder6.Common( + [res.inst], + [], + feePayer.toKeypair(), + res.tokenAccount + ); + }; + Associated2.retryGetOrCreate = async (mint, owner, feePayer) => { + let counter = 1; + while (counter < RETRY_OVER_LIMIT) { + try { + const inst = await get(mint, owner, feePayer, true); + if (inst && typeof inst === "string") { + debugLog("# associatedTokenAccount: ", inst); + return inst; + } else if (inst instanceof TransactionBuilder6.Common) { + (await inst.submit()).map( + async (ok) => { + await Node.confirmedSig(ok); + return inst.data; + }, + (err) => { + debugLog("# Error submit retryGetOrCreate: ", err); + throw err; + } + ); + } + } catch (e) { + debugLog(`# retry: ${counter} create token account: `, e); + debugLog(`# mint: ${mint}, owner: ${owner}, feePayer: ${feePayer}`); + } + await sleep(RETRY_SLEEP_TIME); + counter++; + } + throw Error(`retry action is over limit ${RETRY_OVER_LIMIT}`); + }; + Associated2.makeOrCreateInstruction = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { + const associatedTokenAccount = (0, import_spl_token.getAssociatedTokenAddressSync)( + mint.toPublicKey(), + owner.toPublicKey(), + allowOwnerOffCurve, + import_spl_token.TOKEN_PROGRAM_ID, + import_spl_token.ASSOCIATED_TOKEN_PROGRAM_ID + ); + debugLog("# associatedTokenAccount: ", associatedTokenAccount.toString()); + try { + await (0, import_spl_token.getAccount)( + Node.getConnection(), + associatedTokenAccount, + Node.getConnection().commitment, + import_spl_token.TOKEN_PROGRAM_ID + ); + return { + tokenAccount: associatedTokenAccount.toString(), + inst: void 0 + }; + } catch (error) { + if (!(error instanceof import_spl_token.TokenAccountNotFoundError) && !(error instanceof import_spl_token.TokenInvalidAccountOwnerError)) { + throw Error("Unexpected error"); + } + const payer = !feePayer ? owner : feePayer; + const inst = (0, import_spl_token.createAssociatedTokenAccountInstruction)( + payer.toPublicKey(), + associatedTokenAccount, + owner.toPublicKey(), + mint.toPublicKey(), + import_spl_token.TOKEN_PROGRAM_ID, + import_spl_token.ASSOCIATED_TOKEN_PROGRAM_ID + ); + return { + tokenAccount: associatedTokenAccount.toString(), + inst + }; + } + }; + })(Associated = Account5.Associated || (Account5.Associated = {})); +})(Account2 || (Account2 = {})); + +// ../account/src/pda.ts +var import_web38 = require("@solana/web3.js"); +var import_mpl_token_metadata = require("@metaplex-foundation/mpl-token-metadata"); +var import_mpl_bubblegum = require("@metaplex-foundation/mpl-bubblegum"); +var import_bn = __toESM(require("bn.js")); +var Account3; +((Account5) => { + let Pda; + ((Pda2) => { + Pda2.getMetadata = (address) => { + const [publicKey] = import_web38.PublicKey.findProgramAddressSync( + [ + Buffer.from("metadata"), + import_mpl_token_metadata.PROGRAM_ID.toBuffer(), + address.toPublicKey().toBuffer() + ], + import_mpl_token_metadata.PROGRAM_ID + ); + return publicKey; + }; + Pda2.getMasterEdition = (address) => { + const [publicKey] = import_web38.PublicKey.findProgramAddressSync( + [ + Buffer.from("metadata"), + import_mpl_token_metadata.PROGRAM_ID.toBuffer(), + address.toPublicKey().toBuffer(), + Buffer.from("edition") + ], + import_mpl_token_metadata.PROGRAM_ID + ); + return publicKey; + }; + Pda2.getTreeAuthority = (address) => { + const [publicKey] = import_web38.PublicKey.findProgramAddressSync( + [address.toPublicKey().toBuffer()], + import_mpl_bubblegum.MPL_BUBBLEGUM_PROGRAM_ID.toPublicKey() + ); + return publicKey; + }; + Pda2.getBgumSigner = () => { + const [publicKey] = import_web38.PublicKey.findProgramAddressSync( + [Buffer.from("collection_cpi", "utf8")], + import_mpl_bubblegum.MPL_BUBBLEGUM_PROGRAM_ID.toPublicKey() + ); + return publicKey; + }; + Pda2.getAssetId = (address, leafIndex) => { + const node = new import_bn.default.BN(leafIndex); + const [assetId] = import_web38.PublicKey.findProgramAddressSync( + [ + Buffer.from("asset", "utf8"), + address.toPublicKey().toBuffer(), + Uint8Array.from(node.toArray("le", 8)) + ], + import_mpl_bubblegum.MPL_BUBBLEGUM_PROGRAM_ID.toPublicKey() + ); + return assetId.toString(); + }; + })(Pda = Account5.Pda || (Account5.Pda = {})); +})(Account3 || (Account3 = {})); + +// ../account/src/index.ts +var Account4 = { + ...Account2, + ...Account, + ...Account3 +}; + +// ../global/src/index.ts +var import_bignumber = require("bignumber.js"); +var import_bs582 = __toESM(require("bs58")); +String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, options = {}) { + const endPointUrl = Node.getConnection().rpcEndpoint; + debugLog("# toExplorerUrl rpcEndpoint:", endPointUrl); + let cluster = ""; + if (endPointUrl === Constants.EndPointUrl.prd) { + cluster = Constants.Cluster.prd; + } else if (endPointUrl === Constants.EndPointUrl.test) { + cluster = Constants.Cluster.test; + } else if (endPointUrl === Constants.EndPointUrl.dev) { + cluster = Constants.Cluster.dev; + } else { + cluster = Constants.Cluster.dev; + } + const addressOrSignature = this.toString(); + let url = ""; + if (options.replacePath) { + if (explorer === "solanafm" /* SolanaFM */) { + url = `${Constants.EXPLORER_SOLANAFM_URL}/${options.replacePath}/${addressOrSignature}?cluster=${cluster}`; + } else if (explorer === "xray" /* Xray */) { + url = `${Constants.EXPLORER_XRAY_URL}/${options.replacePath}/${addressOrSignature}?network=${cluster}`; + } else { + url = `${Constants.EXPLORER_SOLSCAN_URL}/${options.replacePath}/${addressOrSignature}?cluster=${cluster}`; + } + return url; + } + if (Account4.Keypair.isPubkey(addressOrSignature)) { + if (explorer === "solanafm" /* SolanaFM */) { + url = `${Constants.EXPLORER_SOLANAFM_URL}/address/${addressOrSignature}?cluster=${cluster}`; + } else if (explorer === "xray" /* Xray */) { + url = `${Constants.EXPLORER_XRAY_URL}/account/${addressOrSignature}?network=${cluster}`; + } else { + url = `${Constants.EXPLORER_SOLSCAN_URL}/account/${addressOrSignature}?cluster=${cluster}`; + } + } else { + if (explorer === "solanafm" /* SolanaFM */) { + url = `${Constants.EXPLORER_SOLANAFM_URL}/tx/${addressOrSignature}?cluster=${cluster}`; + } else if (explorer === "xray" /* Xray */) { + url = `${Constants.EXPLORER_XRAY_URL}/tx/${addressOrSignature}?network=${cluster}`; + } else { + url = `${Constants.EXPLORER_SOLSCAN_URL}/tx/${addressOrSignature}?cluster=${cluster}`; + } + } + return url; +}; +String.prototype.toPublicKey = function() { + if (!Account4.Keypair.isPubkey(this.toString())) { + throw Error(`No match KeyPair.PubKey: ${this.toString()}`); + } + return new import_web39.PublicKey(this.toString()); +}; +String.prototype.toKeypair = function() { + if (!Account4.Keypair.isSecret(this.toString())) { + throw Error(`No match KeyPair.Secret: ${this.toString()}`); + } + const decoded = import_bs582.default.decode(this.toString()); + return import_web39.Keypair.fromSecretKey(decoded); +}; +Number.prototype.toSol = function() { + return (0, import_bignumber.BigNumber)(this).div(import_web39.LAMPORTS_PER_SOL).toNumber(); +}; +Number.prototype.toLamports = function() { + return (0, import_bignumber.BigNumber)(this).times(import_web39.LAMPORTS_PER_SOL).toNumber(); +}; + +// ../transaction-builder/src/index.ts +var TransactionBuilder6 = { + ...TransactionBuilder2, + ...TransactionBuilder5, + ...TransactionBuilder3, + ...TransactionBuilder, + ...TransactionBuilder4 +}; + +// ../suite-utils/src/shared.ts +var overwriteObject = (object, targets) => { + const that = object; + targets.forEach((target) => { + delete that[target.existsKey]; + that[target.will.key] = target.will.value; + }); + return that; +}; +var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { + if (Constants.isDebugging === "true" || process.env.DEBUG === "true") { + console.log("[DEBUG]", data1, data2, data3, data4); + } +}; +var sleep = async (sec) => { + return new Promise((r) => setTimeout(r, sec * 1e3)); +}; +var isPromise = (obj) => { + return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; +}; +function Try(input, finallyInput) { + try { + const v = input(); + if (isPromise(v)) { + return v.then( + (x) => Result.ok(x), + (err) => Result.err(err) + ); + } else { + return Result.ok(v); + } + } catch (e) { + if (e instanceof Error) { + return Result.err(e); + } + return Result.err(Error(e)); + } finally { + if (finallyInput) { + debugLog("# finally input:", finallyInput); + finallyInput(); + } + } +} +var convertTimestampToDateTime = (created_at) => { + if (created_at) { + return new Date(created_at * 1e3); + } + return; +}; + +// ../suite-utils/src/result.ts +var AbstractResult = class { + unwrap(ok, err) { + const r = this._chain( + (value) => Result.ok(ok ? ok(value) : value), + (error) => err ? Result.ok(err(error)) : Result.err(error) + ); + if (r.isErr) { + throw r.error; + } + return r.value; + } + map(ok, err) { + return this._chain( + (value) => Result.ok(ok(value)), + (error) => Result.err(err ? err(error) : error) + ); + } + chain(ok, err) { + return this._chain(ok, err || ((error) => Result.err(error))); + } + match(ok, err) { + this._chain( + (value) => Result.ok(ok(value)), + (error) => Result.err(err(error)) + ); + } + /// single TransactionBuilder //// + /* eslint-disable @typescript-eslint/no-explicit-any */ + async submit(feePayer) { + const res = this.map( + async (ok) => { + debugLog("# result single submit: ", ok); + if (feePayer) { + const obj = ok; + return await obj.submit(feePayer); + } else { + const obj = ok; + return await obj.submit(); + } + }, + (err) => { + return err; + } + ); + if (res.isErr) { + return Result.err(res.error); + } + return res.value; + } +}; +Array.prototype.submit = async function(feePayer) { + if (feePayer) { + let i = 1; + for await (const obj of this) { + if (obj.isErr) { + return obj; + } else if (obj.value.canSubmit) { + debugLog("# Result batch canSubmit"); + const sig = await obj.submit(feePayer); + if (sig.isErr) { + return sig; + } + await Node.confirmedSig(sig.value); + } else { + debugLog("# Result batch other than canSubmit"); + if (this.length == i) { + return obj.submit(feePayer); + } + obj.submit(feePayer); + } + i++; + } + } else { + const instructions = []; + for (const obj of this) { + if (obj.isErr) { + return obj; + } else if (obj.isOk) { + instructions.push(obj.value); + } else { + return Result.err(Error("Only Array Instruction object")); + } + } + debugLog("# Result batch submit: ", instructions); + return new TransactionBuilder6.Batch().submit(instructions); + } +}; +var InternalOk = class extends AbstractResult { + constructor(value) { + super(); + this.value = value; + } + isOk = true; + isErr = false; + /* eslint-disable @typescript-eslint/no-unused-vars */ + _chain(ok, _err) { + return ok(this.value); + } +}; +var InternalErr = class extends AbstractResult { + constructor(error) { + super(); + this.error = error; + } + isOk = false; + isErr = true; + _chain(_ok, err) { + return err(this.error); + } +}; +var Result; +((Result8) => { + function ok(value) { + return new InternalOk(value); + } + Result8.ok = ok; + function err(error) { + return new InternalErr(error || Error()); + } + Result8.err = err; + function all(obj) { + if (Array.isArray(obj)) { + const resArr = []; + for (const item of obj) { + if (item.isErr) { + return item; + } + resArr.push(item.value); + } + return Result8.ok(resArr); + } + const res = {}; + const keys = Object.keys(obj); + for (const key of keys) { + const item = obj[key]; + if (item.isErr) { + return item; + } + res[key] = item.value; + } + return Result8.ok(res); + } + Result8.all = all; +})(Result || (Result = {})); + +// ../validator/src/index.ts +var Validator; +((Validator2) => { + let Message; + ((Message2) => { + Message2.SUCCESS = "success"; + Message2.SMALL_NUMBER = "too small"; + Message2.BIG_NUMBER = "too big"; + Message2.LONG_LENGTH = "too long"; + Message2.EMPTY = "invalid empty value"; + Message2.INVALID_URL = "invalid url"; + Message2.ONLY_NODE_JS = "`string` type is only Node.js"; + })(Message = Validator2.Message || (Validator2.Message = {})); + Validator2.NAME_LENGTH = 32; + Validator2.SYMBOL_LENGTH = 10; + Validator2.URL_LENGTH = 200; + Validator2.ROYALTY_MAX = 100; + Validator2.SELLER_FEE_BASIS_POINTS_MAX = 1e4; + Validator2.ROYALTY_MIN = 0; + Validator2.isRoyalty = (royalty) => { + return Try(() => { + const key = "royalty"; + if (royalty !== 0 && !royalty) { + throw createError(key, Message.EMPTY, royalty); + } + if (royalty < Validator2.ROYALTY_MIN) { + throw createError(key, Message.SMALL_NUMBER, royalty, { + threshold: Validator2.ROYALTY_MIN, + condition: "underMin" + }); + } else if (royalty > Validator2.ROYALTY_MAX) { + throw createError(key, Message.BIG_NUMBER, royalty, { + threshold: Validator2.ROYALTY_MAX, + condition: "overMax" + }); + } + return Message.SUCCESS; + }); + }; + Validator2.isSellerFeeBasisPoints = (royalty) => { + return Try(() => { + const key = "sellerFeeBasisPoints/seller_fee_basis_points"; + if (royalty !== 0 && !royalty) { + throw createError(key, Message.EMPTY, royalty); + } + if (royalty < Validator2.ROYALTY_MIN) { + throw createError(key, Message.SMALL_NUMBER, royalty, { + threshold: Validator2.ROYALTY_MIN, + condition: "underMin" + }); + } else if (royalty > Validator2.ROYALTY_MAX * Converter5.Royalty.THRESHOLD) { + throw createError(key, Message.BIG_NUMBER, royalty, { + threshold: Validator2.SELLER_FEE_BASIS_POINTS_MAX, + condition: "overMax" + }); + } + return Message.SUCCESS; + }); + }; + Validator2.isName = (name) => { + return Try(() => { + const key = "name"; + if (!name) { + throw createError(key, Message.EMPTY, name); + } + if (byteLength(name) > Validator2.NAME_LENGTH) { + throw createError(key, Message.LONG_LENGTH, name, { + threshold: Validator2.NAME_LENGTH, + condition: "overMax" + }); + } + return Message.SUCCESS; + }); + }; + Validator2.isSymbol = (symbol) => { + return Try(() => { + const key = "symbol"; + if (!symbol) { + throw createError(key, Message.EMPTY, symbol); + } + if (byteLength(symbol) > Validator2.SYMBOL_LENGTH) { + throw createError(key, Message.LONG_LENGTH, symbol, { + threshold: Validator2.SYMBOL_LENGTH, + condition: "overMax" + }); + } + return Message.SUCCESS; + }); + }; + Validator2.isImageUrl = (image) => isUriOrImage(image, "image"); + Validator2.checkAll = (metadata) => { + return Try(() => { + const keys = Object.keys(metadata); + const results = []; + keys.map((key) => { + let res; + switch (key) { + case "image": + if (key in metadata && metadata.image) { + res = (0, Validator2.isImageUrl)(metadata.image); + } + break; + case "royalty": + if (key in metadata && metadata.royalty) { + res = (0, Validator2.isRoyalty)(metadata.royalty); + } + break; + case "seller_fee_basis_points": + if (key in metadata && metadata.seller_fee_basis_points) { + res = (0, Validator2.isSellerFeeBasisPoints)(metadata.seller_fee_basis_points); + } + break; + case "sellerFeeBasisPoints": + if (key in metadata) { + res = (0, Validator2.isSellerFeeBasisPoints)(metadata.sellerFeeBasisPoints); + } + break; + case "name": + if (metadata.name) { + res = (0, Validator2.isName)(metadata.name); + } + break; + case "symbol": + if (metadata.symbol) { + res = (0, Validator2.isSymbol)(metadata.symbol); + } + break; + } + if (res && res.isErr) { + results.push(...res.error.details); + } + }); + if (results.length > 0) { + const message = "Caught in the validation errors. see information e.g: err.details"; + throw new ValidatorError(message, results); + } + return Message.SUCCESS; + }); + }; + const byteLength = (value) => { + const text = new TextEncoder(); + return text.encode(value).length; + }; + const createError = (key, message, actual, limit) => { + let error; + if (limit) { + error = new ValidatorError(message, [{ key, message, actual, limit }]); + } else { + error = new ValidatorError(message, [{ key, message, actual }]); + } + return error; + }; + const isUriOrImage = (imageOrUri, key) => { + return Try(() => { + if (!imageOrUri) { + throw createError(key, Message.EMPTY, imageOrUri); + } + if (byteLength(imageOrUri) > Validator2.URL_LENGTH) { + throw createError(key, Message.LONG_LENGTH, imageOrUri, { + threshold: Validator2.URL_LENGTH, + condition: "overMax" + }); + } + if (!/https?:\/\/[-_.!~*\\()a-zA-Z0-9;?:&=+,%#]+/g.test(imageOrUri)) { + throw createError(key, Message.INVALID_URL, imageOrUri); + } + return Message.SUCCESS; + }); + }; +})(Validator || (Validator = {})); +var ValidatorError = class extends Error { + details; + constructor(message, details) { + super(message); + this.details = details; + } +}; + +// src/nft.ts +var Converter6; +((Converter15) => { + let Nft; + ((Nft2) => { + Nft2.intoUser = (output) => { + return { + mint: output.onchain.id.toString(), + collectionMint: Converter.CollectionMint.intoUser( + output.onchain.grouping + ), + authorities: output.onchain.authorities, + royalty: Converter4.Royalty.intoUser(output.onchain.royalty.percent), + name: output.onchain.content.metadata.name, + symbol: output.onchain.content.metadata.symbol, + uri: output.onchain.content.json_uri, + creators: Converter2.Creators.intoUser(output.onchain.creators), + treeAddress: output.onchain.compression.tree, + isCompressed: output.onchain.compression.compressed, + isMutable: output.onchain.mutable, + isBurn: output.onchain.burnt, + editionNonce: output.onchain.supply.edition_nonce, + primarySaleHappened: output.onchain.royalty.primary_sale_happened, + dateTime: convertTimestampToDateTime(output.offchain.created_at), + offchain: output.offchain + }; + }; + })(Nft = Converter15.Nft || (Converter15.Nft = {})); +})(Converter6 || (Converter6 = {})); + +// src/memo.ts +var Converter7; +((Converter15) => { + let Memo; + ((Memo2) => { + Memo2.intoUserSide = (output, meta, outputTransfer, mappingTokenAccount) => { + const history = {}; + if (outputTransfer && outputTransfer.program !== "") { + if (mappingTokenAccount && outputTransfer.program === "spl-token") { + const foundSource = mappingTokenAccount.find( + (m) => m.account === outputTransfer.parsed.info.source + ); + const foundDest = mappingTokenAccount.find( + (m) => m.account === outputTransfer.parsed.info.destination + ); + history.mint = outputTransfer.parsed.info.mint; + foundSource && (history.source = foundSource.owner); + foundDest && (history.destination = foundDest.owner); + } else { + history.source = outputTransfer.parsed.info.source; + history.destination = outputTransfer.parsed.info.destination; + } + } + history.memo = output.parsed; + history.type = output.program; + history.dateTime = convertTimestampToDateTime(meta.blockTime); + history.sig = meta.transaction.signatures[0]; + history.innerInstruction = false; + if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { + history.innerInstruction = true; + } + return history; + }; + })(Memo = Converter15.Memo || (Converter15.Memo = {})); +})(Converter7 || (Converter7 = {})); + +// src/mint.ts +var Converter8; +((Converter15) => { + let Mint; + ((Mint2) => { + Mint2.intoUserSide = (output, meta) => { + const history = {}; + history.mint = output.parsed.info.mint; + history.mintAuthority = output.parsed.info.mintAuthority; + history.tokenAmount = output.parsed.info.tokenAmount; + history.account = output.parsed.info.account; + history.type = output.program; + history.dateTime = convertTimestampToDateTime(meta.blockTime); + history.sig = meta.transaction.signatures[0]; + history.innerInstruction = false; + if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { + history.innerInstruction = true; + } + return history; + }; + })(Mint = Converter15.Mint || (Converter15.Mint = {})); +})(Converter8 || (Converter8 = {})); + +// src/regular-nft-metadata.ts +var Converter9; +((Converter15) => { + let RegularNftMetadata; + ((RegularNftMetadata2) => { + RegularNftMetadata2.intoInfra = (input, uri, sellerFeeBasisPoints) => { + return { + name: input.name, + symbol: input.symbol, + uri, + sellerFeeBasisPoints, + creators: Converter2.Creators.intoInfra(input.creators), + collection: Converter.Collection.intoInfra(input.collection), + uses: input.uses || null + }; + }; + })(RegularNftMetadata = Converter15.RegularNftMetadata || (Converter15.RegularNftMetadata = {})); +})(Converter9 || (Converter9 = {})); + +// src/properties.ts +var Converter10; +((Converter15) => { + let Properties; + ((Properties2) => { + Properties2.intoInfra = async (input, callbackFunc, storageType, feePayer) => { + if (!input || !input.files) { + return {}; + } + const files = await Promise.all( + input.files.map(async (file) => { + if (!file.filePath) { + return {}; + } + const res = await callbackFunc(file.filePath, storageType, feePayer); + if (res.isErr) { + throw Error(res.error.message); + } + return overwriteObject(file, [ + { + existsKey: "filePath", + will: { key: "uri", value: res.value } + } + ]); + }) + ); + return { ...input, files }; + }; + })(Properties = Converter15.Properties || (Converter15.Properties = {})); +})(Converter10 || (Converter10 = {})); + +// src/uses.ts +var Converter11; +((Converter15) => { + let Uses; + ((Uses2) => { + Uses2.intoUserSide = (output) => { + if (!output) { + return void 0; + } + return output; + }; + })(Uses = Converter15.Uses || (Converter15.Uses = {})); +})(Converter11 || (Converter11 = {})); + +// src/token-metadata.ts +var Converter12; +((Converter15) => { + let TokenMetadata; + ((TokenMetadata2) => { + TokenMetadata2.intoInfra = (input, uri, sellerFeeBasisPoints) => { + return { + name: input.name, + symbol: input.symbol, + uri, + sellerFeeBasisPoints, + creators: Converter2.Creators.intoInfra(input.creators), + collection: null, + uses: input.uses || null + }; + }; + TokenMetadata2.intoUser = (output, tokenAmount) => { + return { + mint: output.onchain.mint.toString(), + royalty: output.onchain.data.sellerFeeBasisPoints, + name: (0, TokenMetadata2.deleteNullStrings)(output.onchain.data.name), + symbol: (0, TokenMetadata2.deleteNullStrings)(output.onchain.data.symbol), + tokenAmount, + uri: (0, TokenMetadata2.deleteNullStrings)(output.onchain.data.uri), + creators: Converter2.Creators.intoUser(output.onchain.data.creators), + uses: Converter11.Uses.intoUserSide(output.onchain.uses), + dateTime: convertTimestampToDateTime(output.offchain.created_at), + offchain: output.offchain + }; + }; + TokenMetadata2.deleteNullStrings = (str) => { + return str.replace(/\0/g, ""); + }; + })(TokenMetadata = Converter15.TokenMetadata || (Converter15.TokenMetadata = {})); +})(Converter12 || (Converter12 = {})); + +// src/transfer-checked.ts +var Converter13; +((Converter15) => { + let TransferChecked; + ((TransferChecked2) => { + TransferChecked2.intoUserSide = (output, meta, mappingTokenAccount) => { + const history = {}; + if (mappingTokenAccount) { + const foundSource = mappingTokenAccount.find( + (m) => m.account === output.parsed.info.source + ); + const foundDest = mappingTokenAccount.find( + (m) => m.account === output.parsed.info.destination + ); + foundSource && (history.source = foundSource.owner); + foundDest && (history.destination = foundDest.owner); + } + history.tokenAmount = output.parsed.info.tokenAmount; + history.mint = output.parsed.info.mint; + history.multisigAuthority = output.parsed.info.multisigAuthority; + history.signers = output.parsed.info.signers; + history.type = output.program; + history.dateTime = convertTimestampToDateTime(meta.blockTime); + history.sig = meta.transaction.signatures[0]; + history.innerInstruction = false; + if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { + history.innerInstruction = true; + } + return history; + }; + })(TransferChecked = Converter15.TransferChecked || (Converter15.TransferChecked = {})); +})(Converter13 || (Converter13 = {})); + +// src/transfer.ts +var Converter14; +((Converter15) => { + let Transfer; + ((Transfer2) => { + Transfer2.intoUserSide = (output, meta) => { + const history = {}; + if (!output.parsed.info.destination || !output.parsed.info.lamports) { + return; + } + history.source = output.parsed.info.source; + history.destination = output.parsed.info.destination; + history.sol = output.parsed.info.lamports?.toSol().toString(); + history.type = output.program; + history.dateTime = convertTimestampToDateTime(meta.blockTime); + history.sig = meta.transaction.signatures[0]; + history.innerInstruction = false; + if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { + history.innerInstruction = true; + } + return history; + }; + })(Transfer = Converter15.Transfer || (Converter15.Transfer = {})); +})(Converter14 || (Converter14 = {})); + +// src/index.ts +var Converter5 = { + ...Converter3, + ...Converter, + ...Converter2, + ...Converter6, + ...Converter7, + ...Converter8, + ...Converter9, + ...Converter10, + ...Converter4, + ...Converter12, + ...Converter13, + ...Converter14, + ...Converter11 +}; +// Annotate the CommonJS export names for ESM import in node: +0 && (module.exports = { + Converter +}); +//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uL3NyYy9jb2xsZWN0aW9uLnRzIiwgIi4uL3NyYy9jcmVhdG9ycy50cyIsICIuLi9zcmMvY29tcHJlc3NlZC1uZnQtbWV0YWRhdGEudHMiLCAiLi4vc3JjL3JveWFsdHkudHMiLCAiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9iYXRjaC50cyIsICIuLi8uLi9ub2RlL3NyYy9pbmRleC50cyIsICIuLi8uLi90cmFuc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VybiBudWxsO1xuICAgICAgfVxuICAgICAgcmV0dXJuIGlucHV0Lm1hcCgoZGF0YSkgPT4ge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIGFkZHJlc3M6IGRhdGEuYWRkcmVzcy50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIHNoYXJlOiBkYXRhLnNoYXJlLFxuICAgICAgICAgIHZlcmlmaWVkOiBmYWxzZSxcbiAgICAgICAgfTtcbiAgICAgIH0pO1xuICAgIH07XG5cbiAgICBleHBvcnQgY29uc3QgaW50b0NvbXByZXNzZWROZnRJbmZyYSA9IChcbiAgICAgIGlucHV0OiBPcHRpb248SW5wdXRDcmVhdG9yc1tdPiB8IHVuZGVmaW5lZCxcbiAgICApOiBJbnRlcm5hbENyZWF0b3JzW10gPT4ge1xuICAgICAgaWYgKCFpbnB1dCkge1xuICAgICAgICByZXR1cm4gW107XG4gICAgICB9XG4gICAgICByZXR1cm4gaW5wdXQhLm1hcCgoZGF0YSkgPT4ge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIGFkZHJlc3M6IGRhdGEuYWRkcmVzcy50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIHNoYXJlOiBkYXRhLnNoYXJlLFxuICAgICAgICAgIHZlcmlmaWVkOiBmYWxzZSxcbiAgICAgICAgfTtcbiAgICAgIH0pO1xuICAgIH07XG5cbiAgICBleHBvcnQgY29uc3QgaW50b1VzZXIgPSAoXG4gICAgICBvdXRwdXQ6IE9wdGlvbjxJbnRlcm5hbENyZWF0b3JzW10+LFxuICAgICk6IENyZWF0b3JzW10gfCB1bmRlZmluZWQgPT4ge1xuICAgICAgaWYgKCFvdXRwdXQpIHtcbiAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG91dHB1dC5tYXAoKGRhdGEpID0+IHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICBhZGRyZXNzOiBkYXRhLmFkZHJlc3MudG9Td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haXQgTm9kZS5jb25maXJtZWRTaWcob2spO1xuICAgICAgICAgICAgICAgIHJldHVybiBpbnN0LmRhdGE7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIChlcnI6IEVycm9yKSA9PiB7XG4gICAgICAgICAgICAgICAgZGVidWdMb2coJyMgRXJyb3Igc3VibWl0IHJldHJ5R2V0T3JDcmVhdGU6ICcsIGVycik7XG4gICAgICAgICAgICAgICAgdGhyb3cgZXJyO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICBkZWJ1Z0xvZyhgIyByZXRyeTogJHtjb3VudGVyfSBjcmVhdGUgdG9rZW4gYWNjb3VudDogYCwgZSk7XG4gICAgICAgICAgZGVidWdMb2coYCMgbWludDogJHttaW50fSwgb3duZXI6ICR7b3duZXJ9LCBmZWVQYXllcjogJHtmZWVQYXllcn1gKTtcbiAgICAgICAgfVxuICAgICAgICBhd2FpdCBzbGVlcChSRVRSWV9TTEVFUF9USU1FKTtcbiAgICAgICAgY291bnRlcisrO1xuICAgICAgfVxuICAgICAgdGhyb3cgRXJyb3IoYHJldHJ5IGFjdGlvbiBpcyBvdmVyIGxpbWl0ICR7UkVUUllfT1ZFUl9MSU1JVH1gKTtcbiAgICB9O1xuXG4gICAgLyoqXG4gICAgICogW01haW4gbG9naWNdR2V0IEFzc29jaWF0ZWQgdG9rZW4gQWNjb3VudC5cbiAgICAgKiBpZiBub3QgY3JlYXRlZCwgY3JlYXRlIG5ldyB0b2tlbiBhY2NvdWludFxuICAgICAqXG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG1pbnRcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gb3duZXJcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gZmVlUGF5ZXJcbiAgICAgKiBAcmV0dXJucyBQcm9taXNlPHN0cmluZz5cbiAgICAgKi9cbiAgICBleHBvcnQgY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6IGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSxcbiAgICAgICAgICBpbnN0OiB1bmRlZmluZWQsXG4gICAgICAgIH07XG4gICAgICB9IGNhdGNoIChlcnJvcjogdW5rbm93bikge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuQWNjb3VudE5vdEZvdW5kRXJyb3IpICYmXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuSW52YWxpZEFjY291bnRPd25lckVycm9yKVxuICAgICAgICApIHtcbiAgICAgICAgICB0aHJvdyBFcnJvcignVW5leHBlY3RlZCBlcnJvcicpO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgcGF5ZXIgPSAhZmVlUGF5ZXIgPyBvd25lciA6IGZlZVBheWVyO1xuXG4gICAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVBc3NvY2lhdGVkVG9rZW5BY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgcGF5ZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdCxcbiAgICAgICAgfTtcbiAgICAgIH1cbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHsgS2V5cGFpciBhcyBPcmlnaW5hbCwgUHVibGljS2V5IH0gZnJvbSAnQHNvbGFuYS93ZWIzLmpzJztcbmltcG9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XkuZmluZFByb2dyYW1BZGRyZXNzU3luYyhcbiAgICAgICAgW2FkZHJlc3MudG9QdWJsaWNLZXkoKS50b0J1ZmZlcigpXSxcbiAgICAgICAgTVBMX0JVQkJMRUdVTV9QUk9HUkFNX0lELnRvUHVibGljS2V5KCksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGdldEJndW1TaWduZXIgPSAoKTogUHVibGljS2V5ID0+IHtcbiAgICAgIGNvbnN0IFtwdWJsaWNLZXldID0gUHVibGljS2V5LmZpbmRQcm9ncmFtQWRkcmVzc1N5bmMoXG4gICAgICAgIFtCdWZmZXIuZnJvbSgnY29sbGVjdGlvbl9jcGknLCAndXRmOCcpXSxcbiAgICAgICAgTVBMX0JVQkJMRUdVTV9QUk9HUkFNX0lELnRvUHVibGljS2V5KCksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGdldEFzc2V0SWQgPSAoYWRkcmVzczogUHVia2V5LCBsZWFmSW5kZXg6IG51bWJlcik6IFB1YmtleSA9PiB7XG4gICAgICBjb25zdCBub2RlID0gbmV3IEJOLkJOKGxlYWZJbmRleCk7XG4gICAgICBjb25zdCBbYXNzZXRJZF0gPSBQdWJsaWNLZXkuZmluZFByb2dyYW1BZGRyZXNzU3luYyhcbiAgICAgICAgW1xuICAgICAgICAgIEJ1ZmZlci5mcm9tKCdhc3NldCcsICd1dGY4JyksXG4gICAgICAgICAgYWRkcmVzcy50b1B1YmxpY0tleSgpLnRvQnVmZmVyKCksXG4gICAgICAgICAgVWludDhBcnJheS5mcm9tKG5vZGUudG9BcnJheSgnbGUnLCA4KSksXG4gICAgICAgIF0sXG4gICAgICAgIE1QTF9CVUJCTEVHVU1fUFJPR1JBTV9JRC50b1B1YmxpY0tleSgpLFxuICAgICAgKTtcbiAgICAgIHJldHVybiBhc3NldElkLn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iAgICAgICkgPT4gUHJvbWlzZTxSZXN1bHQ8c3RyaW5nLCBFcnJvcj4+LFxuICAgICAgc3RvcmFnZVR5cGU6IFN0b3JhZ2VUeXBlLFxuICAgICAgZmVlUGF5ZXI/OiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxQcm9wZXJ0aWVzPiA9PiB7XG4gICAgICBpZiAoIWlucHV0IHx8ICFpbnB1dC5maWxlcykge1xuICAgICAgICByZXR1cm4ge307XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGZpbGVzID0gYXdhaXQgUHJvbWlzZS5hbGwoXG4gICAgICAgIGlucHV0LmZpbGVzLm1hcChhc3luYyAoZmlsZSkgPT4ge1xuICAgICAgICAgIGlmICghZmlsZS5maWxlUGF0aCkge1xuICAgICAgICAgICAgcmV0dXJuIHt9O1xuICAgICAgICAgIH1cbiAgICAgICAgICBjb25zdCByZXMgPSBhd2FpdCBjYWxsYmFja0Z1bmMoZmlsZS5maWxlUGF0aCwgc3RvcmFnZVR5cGUsIGZlZVBheWVyKTtcbiAgICAgICAgICBpZiAocmVzLmlzRXJyKSB7XG4gICAgICAgICAgICB0aHJvdyBFcnJvcihyZXMuZXJyb3IubWVzc2FnZSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBvdmVyd3JpdGVPYmplY3QoZmlsZSwgW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBleGlzdHNLZXk6ICdmaWxlUGF0aCcsXG4gICAgICAgICAgICAgIHdpbGw6IHsga2V5OiAndXJpJywgdmFsdWU6IHJlcy52YWx1ZSB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICBdKTtcbiAgICAgICAgfSksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHsgLi4uaW5wdXQsIGZpbGVzIH0gYXMgUHJvcGVydGllcztcbiAgICB9O1xuICB9XG59XG4iLCAiLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLXVudXNlZC12YXJzICovXG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Q29udmVydGVyIiwgIlRva2VuTWV0YWRhdGEiLCAiQ29udmVydGVyIiwgIlRyYW5zZmVyQ2hlY2tlZCIsICJDb252ZXJ0ZXIiLCAiVHJhbnNmZXIiLCAiQ29udmVydGVyIl0KfQo= \ No newline at end of file diff --git a/packages/converter/dist/index.mjs b/packages/converter/dist/index.mjs new file mode 100644 index 000000000..905b4985a --- /dev/null +++ b/packages/converter/dist/index.mjs @@ -0,0 +1,1514 @@ +// src/collection.ts +var Converter; +((Converter15) => { + let Collection; + ((Collection2) => { + Collection2.intoInfra = (input) => { + if (!input) { + return null; + } + return { + key: input.toPublicKey(), + verified: false + }; + }; + Collection2.intoUser = (output) => { + if (!output) { + return void 0; + } + return { + address: output.key.toString(), + verified: output.verified + }; + }; + })(Collection = Converter15.Collection || (Converter15.Collection = {})); + let CollectionMint; + ((CollectionMint2) => { + CollectionMint2.intoUser = (output) => { + const res = output.find((value) => { + if (value.group_key === "collection") { + return value.group_value; + } + }); + return res ? res.group_value : ""; + }; + })(CollectionMint = Converter15.CollectionMint || (Converter15.CollectionMint = {})); +})(Converter || (Converter = {})); + +// src/creators.ts +var Converter2; +((Converter15) => { + let Creators; + ((Creators2) => { + Creators2.intoInfra = (input) => { + if (!input) { + return null; + } + return input.map((data) => { + return { + address: data.address.toPublicKey(), + share: data.share, + verified: false + }; + }); + }; + Creators2.intoCompressedNftInfra = (input) => { + if (!input) { + return []; + } + return input.map((data) => { + return { + address: data.address.toPublicKey(), + share: data.share, + verified: false + }; + }); + }; + Creators2.intoUser = (output) => { + if (!output) { + return void 0; + } + return output.map((data) => { + return { + address: data.address.toString(), + share: data.share, + verified: data.verified + }; + }); + }; + })(Creators = Converter15.Creators || (Converter15.Creators = {})); +})(Converter2 || (Converter2 = {})); + +// src/compressed-nft-metadata.ts +import { + TokenProgramVersion, + TokenStandard +} from "mpl-bubblegum-instruction"; +var Converter3; +((Converter15) => { + let CompressedNftMetadata; + ((CompressedNftMetadata2) => { + CompressedNftMetadata2.intoInfra = (input, uri, sellerFeeBasisPoints) => { + return { + name: input.name, + symbol: input.symbol, + uri, + sellerFeeBasisPoints, + creators: Converter2.Creators.intoCompressedNftInfra(input.creators), + collection: Converter.Collection.intoInfra(input.collection), + uses: input.uses || null, + primarySaleHappened: false, + isMutable: input.isMutable ?? false, + editionNonce: 0, + tokenStandard: TokenStandard.NonFungible, + tokenProgramVersion: TokenProgramVersion.Original + }; + }; + })(CompressedNftMetadata = Converter15.CompressedNftMetadata || (Converter15.CompressedNftMetadata = {})); +})(Converter3 || (Converter3 = {})); + +// src/royalty.ts +var Converter4; +((Converter15) => { + let Royalty; + ((Royalty2) => { + Royalty2.THRESHOLD = 100; + Royalty2.intoInfra = (percentage) => { + return percentage * Royalty2.THRESHOLD; + }; + Royalty2.intoUser = (percentage) => { + return percentage * Royalty2.THRESHOLD; + }; + })(Royalty = Converter15.Royalty || (Converter15.Royalty = {})); +})(Converter4 || (Converter4 = {})); + +// ../suite-utils/src/constants.ts +import { PublicKey } from "@solana/web3.js"; +import SolanaJsonConfig from "@solana-suite/config/load"; +var Config = SolanaJsonConfig; +var Constants; +((Constants2) => { + let WarnningMessage; + ((WarnningMessage2) => { + const THRESHHOLD = 50; + let isDisplay = false; + WarnningMessage2.NFT_STORAGE_API_KEY = ` + [YOU HAVE TO DO] + -------------------------------------- + You need to update nftStorageApiKey define parameter in solana-suite.json. + Can get api key from https://nft.storage/ + -------------------------------------- + `; + WarnningMessage2.DAS_API_URL = ` + [YOU HAVE TO DO] + -------------------------------------- + You need to update dasApiUrl define parameter in solana-suite.json. + can get api url from https://www.helius.dev/ + -------------------------------------- + `; + WarnningMessage2.ANNOUNCE = ` + [DEPRECATED] + -------------------------------------- + Account, Node, toExplorer, Pubkey, Secret have been moved to + @solana-suite/utils + ------------------------------------- + `; + WarnningMessage2.calculateProbability = () => { + const randomValue = Math.random(); + const probability = 1 / THRESHHOLD; + if (!isDisplay && randomValue < probability) { + isDisplay = true; + return true; + } + return false; + }; + })(WarnningMessage = Constants2.WarnningMessage || (Constants2.WarnningMessage = {})); +})(Constants || (Constants = {})); +((Constants2) => { + Constants2.currentCluster = Config.cluster.type; + Constants2.customClusterUrl = Config.cluster.customClusterUrl; + Constants2.isDebugging = Config.debugging; + Constants2.nftStorageApiKey = Config.nftStorageApiKey; + Constants2.dasApiUrl = Config.dasApiUrl; + let Cluster; + ((Cluster2) => { + Cluster2["prd"] = "mainnet-beta"; + Cluster2["prdMetaplex"] = "mainnet-beta-metaplex"; + Cluster2["dev"] = "devnet"; + Cluster2["test"] = "testnet"; + Cluster2["localhost"] = "localhost-devnet"; + })(Cluster = Constants2.Cluster || (Constants2.Cluster = {})); + let EndPointUrl; + ((EndPointUrl2) => { + EndPointUrl2["prd"] = "https://api.mainnet-beta.solana.com"; + EndPointUrl2["prdMetaplex"] = "https://api.metaplex.solana.com"; + EndPointUrl2["dev"] = "https://api.devnet.solana.com"; + EndPointUrl2["test"] = "https://api.testnet.solana.com"; + EndPointUrl2["localhost"] = "http://api.devnet.solana.com"; + })(EndPointUrl = Constants2.EndPointUrl || (Constants2.EndPointUrl = {})); + let BundlrUrl; + ((BundlrUrl2) => { + BundlrUrl2["prd"] = "https://node1.irys.xyz,https://node2.irys.xyz"; + BundlrUrl2["dev"] = "https://devnet.irys.xyz"; + })(BundlrUrl = Constants2.BundlrUrl || (Constants2.BundlrUrl = {})); + let DasApiUrl; + ((DasApiUrl2) => { + DasApiUrl2["dev"] = "https://devnet.helius-rpc.com/?api-key=15319bf4-5b40-4958-ac8d-6313aa55eb92,https://rpc-devnet.helius.xyz?api-key=9f70a843-3274-4ffd-a0a9-323f8b7c0639"; + })(DasApiUrl = Constants2.DasApiUrl || (Constants2.DasApiUrl = {})); + let NftstorageApiKey; + ((NftstorageApiKey2) => { + NftstorageApiKey2["dev"] = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJkaWQ6ZXRocjoweERGMjcyN2VkODZhRGU1RTMyZDZDZEJlODc0YzRFNDlEODY1OWZmOEMiLCJpc3MiOiJuZnQtc3RvcmFnZSIsImlhdCI6MTYyMDI2NDk0MzcwNiwibmFtZSI6ImRlbW8ifQ.d4J70mikxRB8a5vwNu6SO5HDA8JaueuseAj7Q_ytMCE"; + })(NftstorageApiKey = Constants2.NftstorageApiKey || (Constants2.NftstorageApiKey = {})); + Constants2.loadConfig = async () => { + Config = await import("@solana-suite/config/load"); + }; + Constants2.switchCluster = (param) => { + const { cluster: env, customClusterUrl: customClusterUrl2 } = param; + if (customClusterUrl2 && customClusterUrl2.length > 0) { + const index = Date.now() % customClusterUrl2.length; + return customClusterUrl2[index]; + } + switch (env) { + case "mainnet-beta" /* prd */: + return "https://api.mainnet-beta.solana.com" /* prd */; + case "mainnet-beta-metaplex" /* prdMetaplex */: + return "https://api.metaplex.solana.com" /* prdMetaplex */; + case "testnet" /* test */: + return "https://api.testnet.solana.com" /* test */; + case "devnet" /* dev */: + return "https://api.devnet.solana.com" /* dev */; + default: + return "http://api.devnet.solana.com" /* localhost */; + } + }; + Constants2.switchBundlr = (env) => { + switch (env) { + case "mainnet-beta" /* prd */: { + const urls = "https://node1.irys.xyz,https://node2.irys.xyz" /* prd */.split(","); + const index = Date.now() % urls.length; + return urls[index]; + } + default: { + return "https://devnet.irys.xyz" /* dev */; + } + } + }; + Constants2.switchDasApi = (env) => { + switch (env) { + case "mainnet-beta" /* prd */: { + if (Constants2.dasApiUrl.length < 1) { + throw Error(Constants2.WarnningMessage.DAS_API_URL); + } + const urls = "https://node1.irys.xyz,https://node2.irys.xyz" /* prd */.split(","); + const index = Date.now() % urls.length; + return urls[index]; + } + default: { + const urls = "https://devnet.helius-rpc.com/?api-key=15319bf4-5b40-4958-ac8d-6313aa55eb92,https://rpc-devnet.helius.xyz?api-key=9f70a843-3274-4ffd-a0a9-323f8b7c0639" /* dev */.split(","); + const index = Date.now() % urls.length; + return urls[index]; + } + } + }; + Constants2.switchNftStorage = (env) => { + switch (env) { + case "mainnet-beta" /* prd */: + if (!Constants2.nftStorageApiKey) { + throw Error(Constants2.WarnningMessage.NFT_STORAGE_API_KEY); + } + return Constants2.nftStorageApiKey; + default: { + return "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJkaWQ6ZXRocjoweERGMjcyN2VkODZhRGU1RTMyZDZDZEJlODc0YzRFNDlEODY1OWZmOEMiLCJpc3MiOiJuZnQtc3RvcmFnZSIsImlhdCI6MTYyMDI2NDk0MzcwNiwibmFtZSI6ImRlbW8ifQ.d4J70mikxRB8a5vwNu6SO5HDA8JaueuseAj7Q_ytMCE" /* dev */; + } + } + }; + Constants2.WRAPPED_TOKEN_PROGRAM_ID = new PublicKey( + "So11111111111111111111111111111111111111112" + ); + Constants2.MEMO_PROGRAM_ID = new PublicKey( + "Memo1UhkJRfHyvLMcVucJwxXeuD728EqVDDwQDxFMNo" + ); + Constants2.METAPLEX_PROGRAM_ID = new PublicKey( + "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s" + ); + Constants2.COMMITMENT = "confirmed"; + Constants2.NFT_STORAGE_GATEWAY_URL = "https://ipfs.io/ipfs"; + Constants2.IRYS_GATEWAY_URL = "https://gateway.irys.xyz"; + Constants2.BUNDLR_NETWORK_URL = (0, Constants2.switchBundlr)(Config.cluster.type); + Constants2.DAS_API_URL = (0, Constants2.switchDasApi)(Config.cluster.type); + Constants2.NFT_STORAGE_API_KEY = (0, Constants2.switchNftStorage)(Config.cluster.type); + Constants2.EXPLORER_SOLSCAN_URL = "https://solscan.io"; + Constants2.EXPLORER_SOLANAFM_URL = "https://solana.fm"; + Constants2.EXPLORER_XRAY_URL = "https://xray.helius.xyz"; +})(Constants || (Constants = {})); +console.log(Constants.WarnningMessage.ANNOUNCE); + +// ../transaction-builder/src/batch.ts +import { + sendAndConfirmTransaction as sendAndConfirmTransaction2, + Transaction as Transaction2 +} from "@solana/web3.js"; + +// ../node/src/index.ts +import { Connection } from "@solana/web3.js"; +var Node; +((Node2) => { + const setted = { + clusterUrl: "", + commitment: Constants.COMMITMENT, + customClusterUrl: [] + }; + Node2.getConnection = () => { + if (setted.customClusterUrl.length > 0) { + setted.clusterUrl = Constants.switchCluster({ + customClusterUrl: setted.customClusterUrl + }); + } else if (Constants.customClusterUrl.length > 0) { + setted.clusterUrl = Constants.switchCluster({ + customClusterUrl: Constants.customClusterUrl + }); + } else if (!setted.clusterUrl) { + setted.clusterUrl = Constants.switchCluster({ + cluster: Constants.currentCluster + }); + } + if (!setted.commitment) { + setted.commitment = Constants.COMMITMENT; + } + return new Connection(setted.clusterUrl, setted.commitment); + }; + Node2.changeConnection = (param) => { + setted.clusterUrl = ""; + setted.customClusterUrl = []; + setted.commitment = Constants.COMMITMENT; + const { cluster, commitment, customClusterUrl } = param; + if (commitment) { + setted.commitment = commitment; + debugLog("# Node change commitment: ", setted.commitment); + } + if (cluster) { + setted.clusterUrl = Constants.switchCluster({ cluster }); + debugLog("# Node change clusterUrl: ", setted.clusterUrl); + } + if (customClusterUrl) { + debugLog("# customClusterUrl: ", customClusterUrl); + setted.clusterUrl = Constants.switchCluster({ customClusterUrl }); + setted.customClusterUrl = customClusterUrl; + debugLog( + "# Node change cluster, custom cluster url: ", + setted.clusterUrl + ); + } + }; + Node2.confirmedSig = async (signature, commitment = Constants.COMMITMENT) => { + const connection = Node2.getConnection(); + const latestBlockhash = await connection.getLatestBlockhash(); + return await connection.confirmTransaction( + { + blockhash: latestBlockhash.blockhash, + lastValidBlockHeight: latestBlockhash.lastValidBlockHeight, + signature + }, + commitment + ).then(Result.ok).catch(Result.err); + }; +})(Node || (Node = {})); + +// ../transaction-builder/src/common.ts +import { + sendAndConfirmTransaction, + Transaction +} from "@solana/web3.js"; +var MAX_RETRIES = 3; +var TransactionBuilder; +((TransactionBuilder7) => { + class Common2 { + static MAX_TRANSACTION_SIZE = 1232; + instructions; + signers; + feePayer; + data; + constructor(instructions, signers, feePayer, data) { + this.instructions = instructions; + this.signers = signers; + this.feePayer = feePayer; + this.data = data; + } + submit = async () => { + return Try(async () => { + if (!(this instanceof Common2)) { + throw Error("only Instruction object that can use this"); + } + const transaction = new Transaction(); + const blockhashObj = await Node.getConnection().getLatestBlockhash(); + transaction.lastValidBlockHeight = blockhashObj.lastValidBlockHeight; + transaction.recentBlockhash = blockhashObj.blockhash; + let finalSigners = this.signers; + if (this.feePayer) { + transaction.feePayer = this.feePayer.publicKey; + finalSigners = [this.feePayer, ...this.signers]; + } + this.instructions.forEach((inst) => transaction.add(inst)); + const options = { + maxRetries: MAX_RETRIES + }; + return await sendAndConfirmTransaction( + Node.getConnection(), + transaction, + finalSigners, + options + ); + }); + }; + } + TransactionBuilder7.Common = Common2; +})(TransactionBuilder || (TransactionBuilder = {})); + +// ../transaction-builder/src/batch.ts +var TransactionBuilder2; +((TransactionBuilder7) => { + class Batch { + submit = async (arr) => { + return Try(async () => { + let i = 0; + for (const a of arr) { + if (!a.instructions && !a.signers) { + throw Error( + `only Instruction object that can use batchSubmit(). + Index: ${i}, Set value: ${JSON.stringify(a)}` + ); + } + i++; + } + const instructions = arr.flatMap((a) => a.instructions); + const signers = arr.flatMap((a) => a.signers); + const feePayers = arr.filter((a) => a.feePayer !== void 0); + let feePayer = signers[0]; + if (feePayers.length > 0 && feePayers[0].feePayer) { + feePayer = feePayers[0].feePayer; + } + const transaction = new Transaction2(); + let finalSigners = signers; + if (feePayer) { + transaction.feePayer = feePayer.publicKey; + finalSigners = [feePayer, ...signers]; + } + instructions.map((inst) => transaction.add(inst)); + const options = { + maxRetries: MAX_RETRIES + }; + return await sendAndConfirmTransaction2( + Node.getConnection(), + transaction, + finalSigners, + options + ); + }); + }; + } + TransactionBuilder7.Batch = Batch; +})(TransactionBuilder2 || (TransactionBuilder2 = {})); + +// ../transaction-builder/src/mint.ts +import { + sendAndConfirmTransaction as sendAndConfirmTransaction3, + Transaction as Transaction3 +} from "@solana/web3.js"; +var TransactionBuilder3; +((TransactionBuilder7) => { + class Mint { + instructions; + signers; + feePayer; + data; + constructor(instructions, signers, feePayer, data) { + this.instructions = instructions; + this.signers = signers; + this.data = data; + this.feePayer = feePayer; + } + submit = async () => { + return Try(async () => { + if (!(this instanceof Mint)) { + throw Error("only MintInstruction object that can use this"); + } + const transaction = new Transaction3(); + const blockhashObj = await Node.getConnection().getLatestBlockhash(); + transaction.lastValidBlockHeight = blockhashObj.lastValidBlockHeight; + transaction.recentBlockhash = blockhashObj.blockhash; + let finalSigners = this.signers; + if (this.feePayer) { + transaction.feePayer = this.feePayer.publicKey; + finalSigners = [this.feePayer, ...this.signers]; + } + this.instructions.forEach((inst) => transaction.add(inst)); + const options = { + maxRetries: MAX_RETRIES + }; + if (Node.getConnection().rpcEndpoint === Constants.EndPointUrl.prd) { + debugLog("# Change metaplex cluster on mainnet-beta"); + Node.changeConnection({ cluster: Constants.Cluster.prdMetaplex }); + } + return await sendAndConfirmTransaction3( + Node.getConnection(), + transaction, + finalSigners, + options + ); + }); + }; + } + TransactionBuilder7.Mint = Mint; +})(TransactionBuilder3 || (TransactionBuilder3 = {})); + +// ../transaction-builder/src/partial-sign.ts +import { + Transaction as Transaction4 +} from "@solana/web3.js"; +var TransactionBuilder4; +((TransactionBuilder7) => { + class PartialSign { + hexInstruction; + data; + canSubmit; + constructor(instructions, mint, canSubmit = false) { + this.hexInstruction = instructions; + this.data = mint; + this.canSubmit = canSubmit; + } + submit = async (feePayer) => { + return Try(async () => { + if (!(this instanceof PartialSign)) { + throw Error("only PartialSignInstruction object that can use this"); + } + const decode = Buffer.from(this.hexInstruction, "hex"); + const transactionFromJson = Transaction4.from(decode); + transactionFromJson.partialSign(feePayer.toKeypair()); + const options = { + maxRetries: MAX_RETRIES + }; + const wireTransaction = transactionFromJson.serialize(); + return await Node.getConnection().sendRawTransaction( + wireTransaction, + options + ); + }); + }; + } + TransactionBuilder7.PartialSign = PartialSign; +})(TransactionBuilder4 || (TransactionBuilder4 = {})); + +// ../transaction-builder/src/calculate-txsize.ts +var TransactionBuilder5; +((TransactionBuilder7) => { + const LOW_VALUE = 127; + const HIGH_VALUE = 16383; + const MAX_TRANSACTION_SIZE = 1232; + const compactHeader = (n) => n <= LOW_VALUE ? 1 : n <= HIGH_VALUE ? 2 : 3; + const compactArraySize = (n, size) => compactHeader(n) + n * size; + TransactionBuilder7.calculateTxSize = (transaction, feePayer) => { + const feePayerPk = [feePayer.toBase58()]; + const signers = new Set(feePayerPk); + const accounts = new Set(feePayerPk); + const ixsSize = transaction.instructions.reduce((acc, ix) => { + ix.keys.forEach(({ pubkey, isSigner }) => { + const pk = pubkey.toBase58(); + if (isSigner) + signers.add(pk); + accounts.add(pk); + }); + accounts.add(ix.programId.toBase58()); + const nIndexes = ix.keys.length; + const opaqueData = ix.data.length; + return acc + 1 + // PID index + compactArraySize(nIndexes, 1) + compactArraySize(opaqueData, 1); + }, 0); + return compactArraySize(signers.size, 64) + // signatures + 3 + // header + compactArraySize(accounts.size, 32) + // accounts + 32 + // blockhash + compactHeader(transaction.instructions.length) + // instructions + ixsSize; + }; + TransactionBuilder7.isOverTransactionSize = (transaction, feePayer) => { + return (0, TransactionBuilder7.calculateTxSize)(transaction, feePayer) > MAX_TRANSACTION_SIZE; + }; +})(TransactionBuilder5 || (TransactionBuilder5 = {})); + +// ../global/src/index.ts +import { Keypair as Keypair3, LAMPORTS_PER_SOL, PublicKey as PublicKey4 } from "@solana/web3.js"; + +// ../account/src/associated.ts +import { + ASSOCIATED_TOKEN_PROGRAM_ID, + createAssociatedTokenAccountInstruction, + getAccount, + getAssociatedTokenAddressSync, + TOKEN_PROGRAM_ID, + TokenAccountNotFoundError, + TokenInvalidAccountOwnerError +} from "@solana/spl-token"; + +// ../account/src/keypair.ts +import { Keypair as Original, PublicKey as PublicKey2 } from "@solana/web3.js"; +import bs from "bs58"; +var Account; +((Account5) => { + class Keypair4 { + secret; + pubkey; + constructor(params) { + if (!params.pubkey) { + const keypair = params.secret.toKeypair(); + this.pubkey = keypair.publicKey.toString(); + } else { + this.pubkey = params.pubkey; + } + this.secret = params.secret; + } + toPublicKey() { + return new PublicKey2(this.pubkey); + } + toKeypair() { + const decoded = bs.decode(this.secret); + return Original.fromSecretKey(decoded); + } + static isPubkey = (value) => /^[0-9a-zA-Z]{32,44}$/.test(value); + static isSecret = (value) => /^[0-9a-zA-Z]{87,88}$/.test(value); + static create = () => { + const keypair = Original.generate(); + return new Keypair4({ + pubkey: keypair.publicKey.toString(), + secret: bs.encode(keypair.secretKey) + }); + }; + static toKeyPair = (keypair) => { + return new Keypair4({ + pubkey: keypair.publicKey.toString(), + secret: bs.encode(keypair.secretKey) + }); + }; + } + Account5.Keypair = Keypair4; +})(Account || (Account = {})); + +// ../account/src/associated.ts +var Account2; +((Account5) => { + let Associated; + ((Associated2) => { + const RETRY_OVER_LIMIT = 10; + const RETRY_SLEEP_TIME = 3; + const get = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { + const res = await (0, Associated2.makeOrCreateInstruction)( + mint, + owner, + new Account.Keypair({ secret: feePayer }).pubkey, + allowOwnerOffCurve + ); + if (!res.inst) { + return res.tokenAccount; + } + return new TransactionBuilder6.Common( + [res.inst], + [], + feePayer.toKeypair(), + res.tokenAccount + ); + }; + Associated2.retryGetOrCreate = async (mint, owner, feePayer) => { + let counter = 1; + while (counter < RETRY_OVER_LIMIT) { + try { + const inst = await get(mint, owner, feePayer, true); + if (inst && typeof inst === "string") { + debugLog("# associatedTokenAccount: ", inst); + return inst; + } else if (inst instanceof TransactionBuilder6.Common) { + (await inst.submit()).map( + async (ok) => { + await Node.confirmedSig(ok); + return inst.data; + }, + (err) => { + debugLog("# Error submit retryGetOrCreate: ", err); + throw err; + } + ); + } + } catch (e) { + debugLog(`# retry: ${counter} create token account: `, e); + debugLog(`# mint: ${mint}, owner: ${owner}, feePayer: ${feePayer}`); + } + await sleep(RETRY_SLEEP_TIME); + counter++; + } + throw Error(`retry action is over limit ${RETRY_OVER_LIMIT}`); + }; + Associated2.makeOrCreateInstruction = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { + const associatedTokenAccount = getAssociatedTokenAddressSync( + mint.toPublicKey(), + owner.toPublicKey(), + allowOwnerOffCurve, + TOKEN_PROGRAM_ID, + ASSOCIATED_TOKEN_PROGRAM_ID + ); + debugLog("# associatedTokenAccount: ", associatedTokenAccount.toString()); + try { + await getAccount( + Node.getConnection(), + associatedTokenAccount, + Node.getConnection().commitment, + TOKEN_PROGRAM_ID + ); + return { + tokenAccount: associatedTokenAccount.toString(), + inst: void 0 + }; + } catch (error) { + if (!(error instanceof TokenAccountNotFoundError) && !(error instanceof TokenInvalidAccountOwnerError)) { + throw Error("Unexpected error"); + } + const payer = !feePayer ? owner : feePayer; + const inst = createAssociatedTokenAccountInstruction( + payer.toPublicKey(), + associatedTokenAccount, + owner.toPublicKey(), + mint.toPublicKey(), + TOKEN_PROGRAM_ID, + ASSOCIATED_TOKEN_PROGRAM_ID + ); + return { + tokenAccount: associatedTokenAccount.toString(), + inst + }; + } + }; + })(Associated = Account5.Associated || (Account5.Associated = {})); +})(Account2 || (Account2 = {})); + +// ../account/src/pda.ts +import { PublicKey as PublicKey3 } from "@solana/web3.js"; +import { PROGRAM_ID } from "@metaplex-foundation/mpl-token-metadata"; +import { MPL_BUBBLEGUM_PROGRAM_ID } from "@metaplex-foundation/mpl-bubblegum"; +import BN from "bn.js"; +var Account3; +((Account5) => { + let Pda; + ((Pda2) => { + Pda2.getMetadata = (address) => { + const [publicKey] = PublicKey3.findProgramAddressSync( + [ + Buffer.from("metadata"), + PROGRAM_ID.toBuffer(), + address.toPublicKey().toBuffer() + ], + PROGRAM_ID + ); + return publicKey; + }; + Pda2.getMasterEdition = (address) => { + const [publicKey] = PublicKey3.findProgramAddressSync( + [ + Buffer.from("metadata"), + PROGRAM_ID.toBuffer(), + address.toPublicKey().toBuffer(), + Buffer.from("edition") + ], + PROGRAM_ID + ); + return publicKey; + }; + Pda2.getTreeAuthority = (address) => { + const [publicKey] = PublicKey3.findProgramAddressSync( + [address.toPublicKey().toBuffer()], + MPL_BUBBLEGUM_PROGRAM_ID.toPublicKey() + ); + return publicKey; + }; + Pda2.getBgumSigner = () => { + const [publicKey] = PublicKey3.findProgramAddressSync( + [Buffer.from("collection_cpi", "utf8")], + MPL_BUBBLEGUM_PROGRAM_ID.toPublicKey() + ); + return publicKey; + }; + Pda2.getAssetId = (address, leafIndex) => { + const node = new BN.BN(leafIndex); + const [assetId] = PublicKey3.findProgramAddressSync( + [ + Buffer.from("asset", "utf8"), + address.toPublicKey().toBuffer(), + Uint8Array.from(node.toArray("le", 8)) + ], + MPL_BUBBLEGUM_PROGRAM_ID.toPublicKey() + ); + return assetId.toString(); + }; + })(Pda = Account5.Pda || (Account5.Pda = {})); +})(Account3 || (Account3 = {})); + +// ../account/src/index.ts +var Account4 = { + ...Account2, + ...Account, + ...Account3 +}; + +// ../global/src/index.ts +import { BigNumber } from "bignumber.js"; +import bs2 from "bs58"; +String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, options = {}) { + const endPointUrl = Node.getConnection().rpcEndpoint; + debugLog("# toExplorerUrl rpcEndpoint:", endPointUrl); + let cluster = ""; + if (endPointUrl === Constants.EndPointUrl.prd) { + cluster = Constants.Cluster.prd; + } else if (endPointUrl === Constants.EndPointUrl.test) { + cluster = Constants.Cluster.test; + } else if (endPointUrl === Constants.EndPointUrl.dev) { + cluster = Constants.Cluster.dev; + } else { + cluster = Constants.Cluster.dev; + } + const addressOrSignature = this.toString(); + let url = ""; + if (options.replacePath) { + if (explorer === "solanafm" /* SolanaFM */) { + url = `${Constants.EXPLORER_SOLANAFM_URL}/${options.replacePath}/${addressOrSignature}?cluster=${cluster}`; + } else if (explorer === "xray" /* Xray */) { + url = `${Constants.EXPLORER_XRAY_URL}/${options.replacePath}/${addressOrSignature}?network=${cluster}`; + } else { + url = `${Constants.EXPLORER_SOLSCAN_URL}/${options.replacePath}/${addressOrSignature}?cluster=${cluster}`; + } + return url; + } + if (Account4.Keypair.isPubkey(addressOrSignature)) { + if (explorer === "solanafm" /* SolanaFM */) { + url = `${Constants.EXPLORER_SOLANAFM_URL}/address/${addressOrSignature}?cluster=${cluster}`; + } else if (explorer === "xray" /* Xray */) { + url = `${Constants.EXPLORER_XRAY_URL}/account/${addressOrSignature}?network=${cluster}`; + } else { + url = `${Constants.EXPLORER_SOLSCAN_URL}/account/${addressOrSignature}?cluster=${cluster}`; + } + } else { + if (explorer === "solanafm" /* SolanaFM */) { + url = `${Constants.EXPLORER_SOLANAFM_URL}/tx/${addressOrSignature}?cluster=${cluster}`; + } else if (explorer === "xray" /* Xray */) { + url = `${Constants.EXPLORER_XRAY_URL}/tx/${addressOrSignature}?network=${cluster}`; + } else { + url = `${Constants.EXPLORER_SOLSCAN_URL}/tx/${addressOrSignature}?cluster=${cluster}`; + } + } + return url; +}; +String.prototype.toPublicKey = function() { + if (!Account4.Keypair.isPubkey(this.toString())) { + throw Error(`No match KeyPair.PubKey: ${this.toString()}`); + } + return new PublicKey4(this.toString()); +}; +String.prototype.toKeypair = function() { + if (!Account4.Keypair.isSecret(this.toString())) { + throw Error(`No match KeyPair.Secret: ${this.toString()}`); + } + const decoded = bs2.decode(this.toString()); + return Keypair3.fromSecretKey(decoded); +}; +Number.prototype.toSol = function() { + return BigNumber(this).div(LAMPORTS_PER_SOL).toNumber(); +}; +Number.prototype.toLamports = function() { + return BigNumber(this).times(LAMPORTS_PER_SOL).toNumber(); +}; + +// ../transaction-builder/src/index.ts +var TransactionBuilder6 = { + ...TransactionBuilder2, + ...TransactionBuilder5, + ...TransactionBuilder3, + ...TransactionBuilder, + ...TransactionBuilder4 +}; + +// ../suite-utils/src/shared.ts +var overwriteObject = (object, targets) => { + const that = object; + targets.forEach((target) => { + delete that[target.existsKey]; + that[target.will.key] = target.will.value; + }); + return that; +}; +var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { + if (Constants.isDebugging === "true" || process.env.DEBUG === "true") { + console.log("[DEBUG]", data1, data2, data3, data4); + } +}; +var sleep = async (sec) => { + return new Promise((r) => setTimeout(r, sec * 1e3)); +}; +var isPromise = (obj) => { + return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; +}; +function Try(input, finallyInput) { + try { + const v = input(); + if (isPromise(v)) { + return v.then( + (x) => Result.ok(x), + (err) => Result.err(err) + ); + } else { + return Result.ok(v); + } + } catch (e) { + if (e instanceof Error) { + return Result.err(e); + } + return Result.err(Error(e)); + } finally { + if (finallyInput) { + debugLog("# finally input:", finallyInput); + finallyInput(); + } + } +} +var convertTimestampToDateTime = (created_at) => { + if (created_at) { + return new Date(created_at * 1e3); + } + return; +}; + +// ../suite-utils/src/result.ts +var AbstractResult = class { + unwrap(ok, err) { + const r = this._chain( + (value) => Result.ok(ok ? ok(value) : value), + (error) => err ? Result.ok(err(error)) : Result.err(error) + ); + if (r.isErr) { + throw r.error; + } + return r.value; + } + map(ok, err) { + return this._chain( + (value) => Result.ok(ok(value)), + (error) => Result.err(err ? err(error) : error) + ); + } + chain(ok, err) { + return this._chain(ok, err || ((error) => Result.err(error))); + } + match(ok, err) { + this._chain( + (value) => Result.ok(ok(value)), + (error) => Result.err(err(error)) + ); + } + /// single TransactionBuilder //// + /* eslint-disable @typescript-eslint/no-explicit-any */ + async submit(feePayer) { + const res = this.map( + async (ok) => { + debugLog("# result single submit: ", ok); + if (feePayer) { + const obj = ok; + return await obj.submit(feePayer); + } else { + const obj = ok; + return await obj.submit(); + } + }, + (err) => { + return err; + } + ); + if (res.isErr) { + return Result.err(res.error); + } + return res.value; + } +}; +Array.prototype.submit = async function(feePayer) { + if (feePayer) { + let i = 1; + for await (const obj of this) { + if (obj.isErr) { + return obj; + } else if (obj.value.canSubmit) { + debugLog("# Result batch canSubmit"); + const sig = await obj.submit(feePayer); + if (sig.isErr) { + return sig; + } + await Node.confirmedSig(sig.value); + } else { + debugLog("# Result batch other than canSubmit"); + if (this.length == i) { + return obj.submit(feePayer); + } + obj.submit(feePayer); + } + i++; + } + } else { + const instructions = []; + for (const obj of this) { + if (obj.isErr) { + return obj; + } else if (obj.isOk) { + instructions.push(obj.value); + } else { + return Result.err(Error("Only Array Instruction object")); + } + } + debugLog("# Result batch submit: ", instructions); + return new TransactionBuilder6.Batch().submit(instructions); + } +}; +var InternalOk = class extends AbstractResult { + constructor(value) { + super(); + this.value = value; + } + isOk = true; + isErr = false; + /* eslint-disable @typescript-eslint/no-unused-vars */ + _chain(ok, _err) { + return ok(this.value); + } +}; +var InternalErr = class extends AbstractResult { + constructor(error) { + super(); + this.error = error; + } + isOk = false; + isErr = true; + _chain(_ok, err) { + return err(this.error); + } +}; +var Result; +((Result8) => { + function ok(value) { + return new InternalOk(value); + } + Result8.ok = ok; + function err(error) { + return new InternalErr(error || Error()); + } + Result8.err = err; + function all(obj) { + if (Array.isArray(obj)) { + const resArr = []; + for (const item of obj) { + if (item.isErr) { + return item; + } + resArr.push(item.value); + } + return Result8.ok(resArr); + } + const res = {}; + const keys = Object.keys(obj); + for (const key of keys) { + const item = obj[key]; + if (item.isErr) { + return item; + } + res[key] = item.value; + } + return Result8.ok(res); + } + Result8.all = all; +})(Result || (Result = {})); + +// ../validator/src/index.ts +var Validator; +((Validator2) => { + let Message; + ((Message2) => { + Message2.SUCCESS = "success"; + Message2.SMALL_NUMBER = "too small"; + Message2.BIG_NUMBER = "too big"; + Message2.LONG_LENGTH = "too long"; + Message2.EMPTY = "invalid empty value"; + Message2.INVALID_URL = "invalid url"; + Message2.ONLY_NODE_JS = "`string` type is only Node.js"; + })(Message = Validator2.Message || (Validator2.Message = {})); + Validator2.NAME_LENGTH = 32; + Validator2.SYMBOL_LENGTH = 10; + Validator2.URL_LENGTH = 200; + Validator2.ROYALTY_MAX = 100; + Validator2.SELLER_FEE_BASIS_POINTS_MAX = 1e4; + Validator2.ROYALTY_MIN = 0; + Validator2.isRoyalty = (royalty) => { + return Try(() => { + const key = "royalty"; + if (royalty !== 0 && !royalty) { + throw createError(key, Message.EMPTY, royalty); + } + if (royalty < Validator2.ROYALTY_MIN) { + throw createError(key, Message.SMALL_NUMBER, royalty, { + threshold: Validator2.ROYALTY_MIN, + condition: "underMin" + }); + } else if (royalty > Validator2.ROYALTY_MAX) { + throw createError(key, Message.BIG_NUMBER, royalty, { + threshold: Validator2.ROYALTY_MAX, + condition: "overMax" + }); + } + return Message.SUCCESS; + }); + }; + Validator2.isSellerFeeBasisPoints = (royalty) => { + return Try(() => { + const key = "sellerFeeBasisPoints/seller_fee_basis_points"; + if (royalty !== 0 && !royalty) { + throw createError(key, Message.EMPTY, royalty); + } + if (royalty < Validator2.ROYALTY_MIN) { + throw createError(key, Message.SMALL_NUMBER, royalty, { + threshold: Validator2.ROYALTY_MIN, + condition: "underMin" + }); + } else if (royalty > Validator2.ROYALTY_MAX * Converter5.Royalty.THRESHOLD) { + throw createError(key, Message.BIG_NUMBER, royalty, { + threshold: Validator2.SELLER_FEE_BASIS_POINTS_MAX, + condition: "overMax" + }); + } + return Message.SUCCESS; + }); + }; + Validator2.isName = (name) => { + return Try(() => { + const key = "name"; + if (!name) { + throw createError(key, Message.EMPTY, name); + } + if (byteLength(name) > Validator2.NAME_LENGTH) { + throw createError(key, Message.LONG_LENGTH, name, { + threshold: Validator2.NAME_LENGTH, + condition: "overMax" + }); + } + return Message.SUCCESS; + }); + }; + Validator2.isSymbol = (symbol) => { + return Try(() => { + const key = "symbol"; + if (!symbol) { + throw createError(key, Message.EMPTY, symbol); + } + if (byteLength(symbol) > Validator2.SYMBOL_LENGTH) { + throw createError(key, Message.LONG_LENGTH, symbol, { + threshold: Validator2.SYMBOL_LENGTH, + condition: "overMax" + }); + } + return Message.SUCCESS; + }); + }; + Validator2.isImageUrl = (image) => isUriOrImage(image, "image"); + Validator2.checkAll = (metadata) => { + return Try(() => { + const keys = Object.keys(metadata); + const results = []; + keys.map((key) => { + let res; + switch (key) { + case "image": + if (key in metadata && metadata.image) { + res = (0, Validator2.isImageUrl)(metadata.image); + } + break; + case "royalty": + if (key in metadata && metadata.royalty) { + res = (0, Validator2.isRoyalty)(metadata.royalty); + } + break; + case "seller_fee_basis_points": + if (key in metadata && metadata.seller_fee_basis_points) { + res = (0, Validator2.isSellerFeeBasisPoints)(metadata.seller_fee_basis_points); + } + break; + case "sellerFeeBasisPoints": + if (key in metadata) { + res = (0, Validator2.isSellerFeeBasisPoints)(metadata.sellerFeeBasisPoints); + } + break; + case "name": + if (metadata.name) { + res = (0, Validator2.isName)(metadata.name); + } + break; + case "symbol": + if (metadata.symbol) { + res = (0, Validator2.isSymbol)(metadata.symbol); + } + break; + } + if (res && res.isErr) { + results.push(...res.error.details); + } + }); + if (results.length > 0) { + const message = "Caught in the validation errors. see information e.g: err.details"; + throw new ValidatorError(message, results); + } + return Message.SUCCESS; + }); + }; + const byteLength = (value) => { + const text = new TextEncoder(); + return text.encode(value).length; + }; + const createError = (key, message, actual, limit) => { + let error; + if (limit) { + error = new ValidatorError(message, [{ key, message, actual, limit }]); + } else { + error = new ValidatorError(message, [{ key, message, actual }]); + } + return error; + }; + const isUriOrImage = (imageOrUri, key) => { + return Try(() => { + if (!imageOrUri) { + throw createError(key, Message.EMPTY, imageOrUri); + } + if (byteLength(imageOrUri) > Validator2.URL_LENGTH) { + throw createError(key, Message.LONG_LENGTH, imageOrUri, { + threshold: Validator2.URL_LENGTH, + condition: "overMax" + }); + } + if (!/https?:\/\/[-_.!~*\\()a-zA-Z0-9;?:&=+,%#]+/g.test(imageOrUri)) { + throw createError(key, Message.INVALID_URL, imageOrUri); + } + return Message.SUCCESS; + }); + }; +})(Validator || (Validator = {})); +var ValidatorError = class extends Error { + details; + constructor(message, details) { + super(message); + this.details = details; + } +}; + +// src/nft.ts +var Converter6; +((Converter15) => { + let Nft; + ((Nft2) => { + Nft2.intoUser = (output) => { + return { + mint: output.onchain.id.toString(), + collectionMint: Converter.CollectionMint.intoUser( + output.onchain.grouping + ), + authorities: output.onchain.authorities, + royalty: Converter4.Royalty.intoUser(output.onchain.royalty.percent), + name: output.onchain.content.metadata.name, + symbol: output.onchain.content.metadata.symbol, + uri: output.onchain.content.json_uri, + creators: Converter2.Creators.intoUser(output.onchain.creators), + treeAddress: output.onchain.compression.tree, + isCompressed: output.onchain.compression.compressed, + isMutable: output.onchain.mutable, + isBurn: output.onchain.burnt, + editionNonce: output.onchain.supply.edition_nonce, + primarySaleHappened: output.onchain.royalty.primary_sale_happened, + dateTime: convertTimestampToDateTime(output.offchain.created_at), + offchain: output.offchain + }; + }; + })(Nft = Converter15.Nft || (Converter15.Nft = {})); +})(Converter6 || (Converter6 = {})); + +// src/memo.ts +var Converter7; +((Converter15) => { + let Memo; + ((Memo2) => { + Memo2.intoUserSide = (output, meta, outputTransfer, mappingTokenAccount) => { + const history = {}; + if (outputTransfer && outputTransfer.program !== "") { + if (mappingTokenAccount && outputTransfer.program === "spl-token") { + const foundSource = mappingTokenAccount.find( + (m) => m.account === outputTransfer.parsed.info.source + ); + const foundDest = mappingTokenAccount.find( + (m) => m.account === outputTransfer.parsed.info.destination + ); + history.mint = outputTransfer.parsed.info.mint; + foundSource && (history.source = foundSource.owner); + foundDest && (history.destination = foundDest.owner); + } else { + history.source = outputTransfer.parsed.info.source; + history.destination = outputTransfer.parsed.info.destination; + } + } + history.memo = output.parsed; + history.type = output.program; + history.dateTime = convertTimestampToDateTime(meta.blockTime); + history.sig = meta.transaction.signatures[0]; + history.innerInstruction = false; + if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { + history.innerInstruction = true; + } + return history; + }; + })(Memo = Converter15.Memo || (Converter15.Memo = {})); +})(Converter7 || (Converter7 = {})); + +// src/mint.ts +var Converter8; +((Converter15) => { + let Mint; + ((Mint2) => { + Mint2.intoUserSide = (output, meta) => { + const history = {}; + history.mint = output.parsed.info.mint; + history.mintAuthority = output.parsed.info.mintAuthority; + history.tokenAmount = output.parsed.info.tokenAmount; + history.account = output.parsed.info.account; + history.type = output.program; + history.dateTime = convertTimestampToDateTime(meta.blockTime); + history.sig = meta.transaction.signatures[0]; + history.innerInstruction = false; + if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { + history.innerInstruction = true; + } + return history; + }; + })(Mint = Converter15.Mint || (Converter15.Mint = {})); +})(Converter8 || (Converter8 = {})); + +// src/regular-nft-metadata.ts +var Converter9; +((Converter15) => { + let RegularNftMetadata; + ((RegularNftMetadata2) => { + RegularNftMetadata2.intoInfra = (input, uri, sellerFeeBasisPoints) => { + return { + name: input.name, + symbol: input.symbol, + uri, + sellerFeeBasisPoints, + creators: Converter2.Creators.intoInfra(input.creators), + collection: Converter.Collection.intoInfra(input.collection), + uses: input.uses || null + }; + }; + })(RegularNftMetadata = Converter15.RegularNftMetadata || (Converter15.RegularNftMetadata = {})); +})(Converter9 || (Converter9 = {})); + +// src/properties.ts +var Converter10; +((Converter15) => { + let Properties; + ((Properties2) => { + Properties2.intoInfra = async (input, callbackFunc, storageType, feePayer) => { + if (!input || !input.files) { + return {}; + } + const files = await Promise.all( + input.files.map(async (file) => { + if (!file.filePath) { + return {}; + } + const res = await callbackFunc(file.filePath, storageType, feePayer); + if (res.isErr) { + throw Error(res.error.message); + } + return overwriteObject(file, [ + { + existsKey: "filePath", + will: { key: "uri", value: res.value } + } + ]); + }) + ); + return { ...input, files }; + }; + })(Properties = Converter15.Properties || (Converter15.Properties = {})); +})(Converter10 || (Converter10 = {})); + +// src/uses.ts +var Converter11; +((Converter15) => { + let Uses; + ((Uses2) => { + Uses2.intoUserSide = (output) => { + if (!output) { + return void 0; + } + return output; + }; + })(Uses = Converter15.Uses || (Converter15.Uses = {})); +})(Converter11 || (Converter11 = {})); + +// src/token-metadata.ts +var Converter12; +((Converter15) => { + let TokenMetadata; + ((TokenMetadata2) => { + TokenMetadata2.intoInfra = (input, uri, sellerFeeBasisPoints) => { + return { + name: input.name, + symbol: input.symbol, + uri, + sellerFeeBasisPoints, + creators: Converter2.Creators.intoInfra(input.creators), + collection: null, + uses: input.uses || null + }; + }; + TokenMetadata2.intoUser = (output, tokenAmount) => { + return { + mint: output.onchain.mint.toString(), + royalty: output.onchain.data.sellerFeeBasisPoints, + name: (0, TokenMetadata2.deleteNullStrings)(output.onchain.data.name), + symbol: (0, TokenMetadata2.deleteNullStrings)(output.onchain.data.symbol), + tokenAmount, + uri: (0, TokenMetadata2.deleteNullStrings)(output.onchain.data.uri), + creators: Converter2.Creators.intoUser(output.onchain.data.creators), + uses: Converter11.Uses.intoUserSide(output.onchain.uses), + dateTime: convertTimestampToDateTime(output.offchain.created_at), + offchain: output.offchain + }; + }; + TokenMetadata2.deleteNullStrings = (str) => { + return str.replace(/\0/g, ""); + }; + })(TokenMetadata = Converter15.TokenMetadata || (Converter15.TokenMetadata = {})); +})(Converter12 || (Converter12 = {})); + +// src/transfer-checked.ts +var Converter13; +((Converter15) => { + let TransferChecked; + ((TransferChecked2) => { + TransferChecked2.intoUserSide = (output, meta, mappingTokenAccount) => { + const history = {}; + if (mappingTokenAccount) { + const foundSource = mappingTokenAccount.find( + (m) => m.account === output.parsed.info.source + ); + const foundDest = mappingTokenAccount.find( + (m) => m.account === output.parsed.info.destination + ); + foundSource && (history.source = foundSource.owner); + foundDest && (history.destination = foundDest.owner); + } + history.tokenAmount = output.parsed.info.tokenAmount; + history.mint = output.parsed.info.mint; + history.multisigAuthority = output.parsed.info.multisigAuthority; + history.signers = output.parsed.info.signers; + history.type = output.program; + history.dateTime = convertTimestampToDateTime(meta.blockTime); + history.sig = meta.transaction.signatures[0]; + history.innerInstruction = false; + if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { + history.innerInstruction = true; + } + return history; + }; + })(TransferChecked = Converter15.TransferChecked || (Converter15.TransferChecked = {})); +})(Converter13 || (Converter13 = {})); + +// src/transfer.ts +var Converter14; +((Converter15) => { + let Transfer; + ((Transfer2) => { + Transfer2.intoUserSide = (output, meta) => { + const history = {}; + if (!output.parsed.info.destination || !output.parsed.info.lamports) { + return; + } + history.source = output.parsed.info.source; + history.destination = output.parsed.info.destination; + history.sol = output.parsed.info.lamports?.toSol().toString(); + history.type = output.program; + history.dateTime = convertTimestampToDateTime(meta.blockTime); + history.sig = meta.transaction.signatures[0]; + history.innerInstruction = false; + if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { + history.innerInstruction = true; + } + return history; + }; + })(Transfer = Converter15.Transfer || (Converter15.Transfer = {})); +})(Converter14 || (Converter14 = {})); + +// src/index.ts +var Converter5 = { + ...Converter3, + ...Converter, + ...Converter2, + ...Converter6, + ...Converter7, + ...Converter8, + ...Converter9, + ...Converter10, + ...Converter4, + ...Converter12, + ...Converter13, + ...Converter14, + ...Converter11 +}; +export { + Converter5 as Converter +}; +//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2NvbGxlY3Rpb24udHMiLCAiLi4vc3JjL2NyZWF0b3JzLnRzIiwgIi4uL3NyYy9jb21wcmVzc2VkLW5mdC1tZXRhZGF0YS50cyIsICIuLi9zcmMvcm95YWx0eS50cyIsICIuLi8uLi9zdWl0ZS11dGlscy9zcmMvY29uc3RhbnRzLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2JhdGNoLnRzIiwgIi4uLy4uL25vZGUvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2NvbW1vbi50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9taW50LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL3BhcnRpYWwtc2lnbi50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jYWxjdWxhdGUtdHhzaXplLnRzIiwgIi4uLy4uL2dsb2JhbC9zcmMvaW5kZXgudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvYXNzb2NpYXRlZC50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9rZXlwYWlyLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL3BkYS50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9pbmRleC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HV0KSB7XG4gICAgICAgIHJldHVybiBudWxsO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4ge1xuICAgICAgICBrZXk6IGlucHV0LnRvUHVibGljS2V5KCksXG4gICAgICAgIHZlcmlmaWVkOiBmYWxzZSxcbiAgICAgIH07XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlciA9IChcbiAgICAgIG91dHB1dDogT3B0aW9uPEludGVybmFsQ29sbGVjdGlvbj4sXG4gICAgKTogQ29sbGVjdGlvblR5cGUgfCB1bmRlZmluZWQgPT4ge1xuICAgICAgaWYgKCFvdXRwdXQpIHtcbiAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIHtcbiAgICAgICAgYWRkcmVzczogb3V0cHV0LmtleS50b1N0cmluZygpLFxuICAgICAgICB2ZXJpZmllZDogb3V0cHV0LnZlcmlmaWVkLFxuICAgICAgfTtcbiAgICB9O1xuICB9XG5cbiAgZXhwb3J0IG5hbWVzcGFjZSBDb2xsZWN0aW9uTWludCB7XG4gICAgZXhwb3J0IGNvbnN0IGludG9Vc2VyID0gKG91dHB1dDogR3JvdXBpbmdbXSk6IFB1YmtleSA9PiB7XG4gICAgICBjb25zdCByZXMgPSBvdXRwdXQuZmluZCgodmFsdWUpID0+IHtcbiAgICAgICAgaWYgKHZhbHVlLmdyb3VwX2tleSA9PT0gJ2NvbGxlY3Rpb24nKSB7XG4gICAgICAgICAgcmV0dXJuIHZhbHVlLmdyb3VwX3ZhbHVlO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIHJldHVybiByZXMgPyByZXMuZ3JvdXBfdmFsdWUgOiAnJztcbiAgICB9O1xuICB9XG59XG4iLCAiLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLXVudXNlZC12YXJzICovXG5pbXBvcnQgeyBDcmVhdG9ycywgSW5wdXRDcmVhdG9ycywgT3B0aW9uIH0gZnJvb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mxpY0tleSxcbiAgKTogbnVtYmVyID0+IHtcbiAgICBjb25zdCBmZWVQYXllclBrID0gW2ZlZVBheWVyLnRvQmFzZTU4KCldO1xuXG4gICAgY29uc3Qgc2lnbmVycyA9IG5ldyBTZXQ8c3RyaW5nPihmZWVQYXllclBrKTtcbiAgICBjb25zdCBhY2NvdW50cyA9IG5ldyBTZXQ8c3RyaW5nPihmZWVQYXllclBrKTtcblxuICAgIGNvbnN0IGl4c1NpemUgPSB0cmFuc2FjdGlvbi5pbnN0cnVjdGlvbnMucmVkdWNlKChhY2MsIGl4KSA9PiB7XG4gICAgICBpeC5rZXlzLmZvckVhY2goKHsgcHVia2V5LCBpc1NpZ25lciB9KSA9PiB7XG4gICAgICAgIGNvbnN0IHBrID0gcHVia2V5LnRvQmFzZTU4KCk7XG4gICAgICAgIGlmIChpc1NpZ25lcikgc2lnbmVycy5hZGQocGspO1xuICAgICAgICBhY2NvdW50cy5hZGQocGspO1xuICAgICAgfSk7XG5cbiAgICAgIGFjY291bnRzLmFkZChpeC5wcm9ncmFtSWQudG9CYXNlNTgoKSk7XG5cbiAgICAgIGNvbnN0IG5JbmRleGVzID0gaXgua2V5cy5sZW5ndGg7XG4gICAgICBjb25zdCBvcGFxdWVEYXRhID0gaXguZGF0YS5sZW5ndGg7XG5cbiAgICAgIHJldHVybiAoXG4gICAgICAgIGFjYyArXG4gICAgICAgIDEgKyAvLyBQSUQgaW5kZXhcbiAgICAgICAgY29tcGFjdEFycmF5U2l6ZShuSW5kZXhlcywgMSkgK1xuICAgICAgICBjb21wYWN0QXJyYXlTaXplKG9wYXF1ZURhdGEsIDEpXG4gICAgICApO1xuICAgIH0sIDApO1xuXG4gICAgcmV0dXJuIChcbiAgICAgIGNvbXBhY3RBcnJheVNpemUoc2lnbmVycy5zaXplLCA2NCkgKyAvLyBzaWduYXR1cmVzXG4gICAgICAzICsgLy8gaGVhZGVyXG4gICAgICBjb21wYWN0QXJyYXlTaXplKGFjY291bnRzLnNpemUsIDMy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XlwYWlyLktleXBhaXIoeyBzZWNyZXQ6IGZlZVBheWVyIH0pLnB1YmtleSxcbiAgICAgICAgYWxsb3dPd25lck9mZkN1cnZlLFxuICAgICAgKTtcblxuICAgICAgaWYgKCFyZXMuaW5zdCkge1xuICAgICAgICByZXR1cm4gcmVzLnRva2VuQWNjb3VudDtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uPFB1YmtleT4oXG4gICAgICAgIFtyZXMuaW5zdF0sXG4gICAgICAgIFtdLFxuICAgICAgICBmZWVQYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgcmVzLnRva2VuQWNjb3VudCEsXG4gICAgICApO1xuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiBSZXRyeSBmdW5jdGlvbiBpZiBjcmVhdGUgbmV3IHRva2VuIGFjY291aW50XG4gICAgICpcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gbWludFxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBvd25lclxuICAgICAqIEBwYXJhbSB7U2VjcmV0fSBmZWVQYXllclxuICAgICAqIEByZXR1cm5zIFByb21pc2U8c3RyaW5nPlxuICAgICAqL1xuICAgIGV4cG9ydCBjb25zdCByZXRyeUdldE9yQ3JlYXRlID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyOiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxzdHJpbmc+ID0+IHtcbiAgICAgIGxldCBjb3VudGVyID0gMTtcbiAgICAgIHdoaWxlIChjb3VudGVyIDwgUkVUUllfT1ZFUl9MSU1JVCkge1xuICAgICAgICB0cnkge1xuICAgICAgICAgIGNvbnN0IGluc3QgPSBhd2FpdCBnZXQobWludCwgb3duZXIsIGZlZVBheWVyLCB0cnVlKTtcblxuICAgICAgICAgIGlmIChpbnN0ICYmIHR5cGVvZiBpbnN0ID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgaW5zdCk7XG4gICAgICAgICAgICByZXR1cm4gaW5zdDtcbiAgICAgICAgICB9IGVsc2UgaWYgKGluc3QgaW5zdGFuY2VvZiBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uKSB7XG4gICAgICAgICAgICAoYXdhaXQgaW5zdC5zdWJtaXQoKSkubWFwKFxuICAgICAgICAgICAgICBhc3luYyAob2s6IHN0cmluZykgPT4ge1xuICAgICAgICAgICAgICAgIGF3YWl0IE5vZGUuY29uZmlybWVkU2lnKG9rKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gaW5zdC5kYXRhO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAoZXJyOiBFcnJvcikgPT4ge1xuICAgICAgICAgICAgICAgIGRlYnVnTG9nKCcjIEVycm9yIHN1Ym1pdCByZXRyeUdldE9yQ3JlYXRlOiAnLCBlcnIpO1xuICAgICAgICAgICAgICAgIHRocm93IGVycjtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgZGVidWdMb2coYCMgcmV0cnk6ICR7Y291bnRlcn0gY3JlYXRlIHRva2VuIGFjY291bnQ6IGAsIGUpO1xuICAgICAgICAgIGRlYnVnTG9nKGAjIG1pbnQ6ICR7bWludH0sIG93bmVyOiAke293bmVyfSwgZmVlUGF5ZXI6ICR7ZmVlUGF5ZXJ9YCk7XG4gICAgICAgIH1cbiAgICAgICAgYXdhaXQgc2xlZXAoUkVUUllfU0xFRVBfVElNRSk7XG4gICAgICAgIGNvdW50ZXIrKztcbiAgICAgIH1cbiAgICAgIHRocm93IEVycm9yKGByZXRyeSBhY3Rpb24gaXMgb3ZlciBsaW1pdCAke1JFVFJZX09WRVJfTElNSVR9YCk7XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIFtNYWluIGxvZ2ljXUdldCBBc3NvY2lhdGVkIHRva2VuIEFjY291bnQuXG4gICAgICogaWYgbm90IGNyZWF0ZWQsIGNyZWF0ZSBuZXcgdG9rZW4gYWNjb3VpbnRcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBtaW50XG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAgICogQHBhcmFtIHtQdWJrZXl9IGZlZVBheWVyXG4gICAgICogQHJldHVybnMgUHJvbWlzZTxzdHJpbmc+XG4gICAgICovXG4gICAgZXhwb3J0IGNvbnN0IG1ha2VPckNyZWF0ZUluc3RydWN0aW9uID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyPzogUHVia2V5LFxuICAgICAgYWxsb3dPd25lck9mZkN1cnZlID0gZmFsc2UsXG4gICAgKTogUHJvbWlzZTx7XG4gICAgICB0b2tlbkFjY291bnQ6IHN0cmluZztcbiAgICAgIGluc3Q6IFRyYW5zYWN0aW9uSW5zdHJ1Y3Rpb24gfCB1bmRlZmluZWQ7XG4gICAgfT4gPT4ge1xuICAgICAgY29uc3QgYXNzb2NpYXRlZFRva2VuQWNjb3VudCA9IGdldEFzc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jKFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSxcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJ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xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ25hbWUnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLm5hbWUpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNOYW1lKG1ldGFkYXRhLm5hbWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc3ltYm9sJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5zeW1ib2wpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTeW1ib2wobWV0YWRhdGEuc3ltYm9sKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgICAgIGlmIChyZXMgJiYgcmVzLmlzRXJyKSB7XG4gICAgICAgICAgcmVzdWx0cy5wdXNoKC4uLnJlcy5lcnJvci5kZXRhaWxzKTtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgICBpZiAocmVzdWx0cy5sZW5ndGggPiAwKSB7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPVxuICAgICAgICAgICdDYXVnaHQgaW4gdGhlIHZhbGlkYXRpb24gZXJyb3JzLiBzZWUgaW5mb3JtYXRpb24gZS5nOiBlcnI8VmFsaWRhdG9yRXJyb3I+LmRldGFpbHMnO1xuICAgICAgICB0aHJvdyBuZXcgVmFsaWRhdG9yRXJyb3IobWVzc2FnZSwgcmVzdWx0cyk7XG4gICAgICB9XG4gICAgICByZXR1cm4g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/packages/das-api/dist/index.js b/packages/das-api/dist/index.js index faaff2f33..f48ddb11d 100644 --- a/packages/das-api/dist/index.js +++ b/packages/das-api/dist/index.js @@ -34,7 +34,7 @@ __export(src_exports, { }); module.exports = __toCommonJS(src_exports); -// ../shared/src/constants.ts +// ../suite-utils/src/constants.ts var import_web3 = require("@solana/web3.js"); var import_load = __toESM(require("@solana-suite/config/load")); var Config = import_load.default; @@ -310,56 +310,6 @@ var TransactionBuilder; TransactionBuilder7.Common = Common2; })(TransactionBuilder || (TransactionBuilder = {})); -// ../shared/src/shared.ts -var overwriteObject = (object, targets) => { - const that = object; - targets.forEach((target) => { - delete that[target.existsKey]; - that[target.will.key] = target.will.value; - }); - return that; -}; -var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { - if (Constants.isDebugging === "true" || process.env.DEBUG === "true") { - console.log("[DEBUG]", data1, data2, data3, data4); - } -}; -var sleep = async (sec) => { - return new Promise((r) => setTimeout(r, sec * 1e3)); -}; -var isPromise = (obj) => { - return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; -}; -function Try(input, finallyInput) { - try { - const v = input(); - if (isPromise(v)) { - return v.then( - (x) => Result.ok(x), - (err) => Result.err(err) - ); - } else { - return Result.ok(v); - } - } catch (e) { - if (e instanceof Error) { - return Result.err(e); - } - return Result.err(Error(e)); - } finally { - if (finallyInput) { - debugLog("# finally input:", finallyInput); - finallyInput(); - } - } -} -var convertTimestampToDateTime = (created_at) => { - if (created_at) { - return new Date(created_at * 1e3); - } - return; -}; - // ../transaction-builder/src/batch.ts var TransactionBuilder2; ((TransactionBuilder7) => { @@ -814,7 +764,57 @@ var TransactionBuilder6 = { ...TransactionBuilder4 }; -// ../shared/src/result.ts +// ../suite-utils/src/shared.ts +var overwriteObject = (object, targets) => { + const that = object; + targets.forEach((target) => { + delete that[target.existsKey]; + that[target.will.key] = target.will.value; + }); + return that; +}; +var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { + if (Constants.isDebugging === "true" || process.env.DEBUG === "true") { + console.log("[DEBUG]", data1, data2, data3, data4); + } +}; +var sleep = async (sec) => { + return new Promise((r) => setTimeout(r, sec * 1e3)); +}; +var isPromise = (obj) => { + return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; +}; +function Try(input, finallyInput) { + try { + const v = input(); + if (isPromise(v)) { + return v.then( + (x) => Result.ok(x), + (err) => Result.err(err) + ); + } else { + return Result.ok(v); + } + } catch (e) { + if (e instanceof Error) { + return Result.err(e); + } + return Result.err(Error(e)); + } finally { + if (finallyInput) { + debugLog("# finally input:", finallyInput); + finallyInput(); + } + } +} +var convertTimestampToDateTime = (created_at) => { + if (created_at) { + return new Date(created_at * 1e3); + } + return; +}; + +// ../suite-utils/src/result.ts var AbstractResult = class { unwrap(ok, err) { const r = this._chain( @@ -926,15 +926,15 @@ var InternalErr = class extends AbstractResult { } }; var Result; -((Result8) => { +((Result9) => { function ok(value) { return new InternalOk(value); } - Result8.ok = ok; + Result9.ok = ok; function err(error) { return new InternalErr(error || Error()); } - Result8.err = err; + Result9.err = err; function all(obj) { if (Array.isArray(obj)) { const resArr = []; @@ -944,7 +944,7 @@ var Result; } resArr.push(item.value); } - return Result8.ok(resArr); + return Result9.ok(resArr); } const res = {}; const keys = Object.keys(obj); @@ -955,9 +955,9 @@ var Result; } res[key] = item.value; } - return Result8.ok(res); + return Result9.ok(res); } - Result8.all = all; + Result9.all = all; })(Result || (Result = {})); // ../converter/src/collection.ts @@ -1706,4 +1706,4 @@ var DasApi3 = { 0 && (module.exports = { DasApi }); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uLy4uL3NoYXJlZC9zcmMvY29uc3RhbnRzLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2JhdGNoLnRzIiwgIi4uLy4uL25vZGUvc3JjL2luZGV4LnRzIiwgIi4uLy4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ZpbmFsU2lnbmVycyA9IHRoaXMuc2lnbmVycztcblxuICAgICAgICBpZiAodGhpcy5mZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gdGhpcy5mZWVQYXllci5wdWJsaWNLZXk7XG4gICAgICAgICAgZmluYWxTaWduZXJzID0gW3RoaXMuZmVlUGF5ZXIsIC4uLnRoaXMuc2lnbmVyc107XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLmluc3RydWN0aW9ucy5mb3JFYWNoKChpbnN0KSA9PiB0cmFuc2FjdGlvbi5hZGQoaW5zdCkpO1xuXG4gICAgICAgIGNvbnN0IG9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IE1BWF9SRVRSSUVTLFxuICAgICAgICB9O1xuXG4gICAgICAgIHJldHVybiBhd2FpdCBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uKFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICBvcHRpb25zLFxuICAgICAgICApO1xuICAgICAgfSk7XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IEFueU9iamVjdCB9IGZyb20gJ34vdHlwZXMvc2hhcmVkJztcbmltcG9ydCB7IENvbnN0YW50cyB9IGZyb20gJy4vY29uc3RhbnRzJztcbmltcG9ydCB7IFJlc3VsdCB9IGZyb20gJy4vcmVzdWx0JztcblxuLyoqXG4gKiBjb252ZXJ0IGJ1ZmZlciB0byBBcnJheVxuICpcbiAqIEBwYXJhbSB7QnVmZmVyfSBidWZmZXJcbiAqIEByZXR1cm5zIG51bWJlcltdXG4gKi9cbmV4cG9ydCBjb25zdCBidWZmZXJUb0FycmF5ID0gKGJ1ZmZlcjogQnVmZmVyKTogbnVtYmVyW10gPT4ge1xuICBjb25zdCBudW1zID0gW107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ICAgICAgICByZXR1cm4gcmVzLnRva2VuQWNjb3VudDtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uPFB1YmtleT4oXG4gICAgICAgIFtyZXMuaW5zdF0sXG4gICAgICAgIFtdLFxuICAgICAgICBmZWVQYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgcmVzLnRva2VuQWNjb3VudCEsXG4gICAgICApO1xuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiBSZXRyeSBmdW5jdGlvbiBpZiBjcmVhdGUgbmV3IHRva2VuIGFjY291aW50XG4gICAgICpcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gbWludFxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBvd25lclxuICAgICAqIEBwYXJhbSB7U2VjcmV0fSBmZWVQYXllclxuICAgICAqIEByZXR1cm5zIFByb21pc2U8c3RyaW5nPlxuICAgICAqL1xuICAgIGV4cG9ydCBjb25zdCByZXRyeUdldE9yQ3JlYXRlID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyOiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxzdHJpbmc+ID0+IHtcbiAgICAgIGxldCBjb3VudGVyID0gMTtcbiAgICAgIHdoaWxlIChjb3VudGVyIDwgUkVUUllfT1ZFUl9MSU1JVCkge1xuICAgICAgICB0cnkge1xuICAgICAgICAgIGNvbnN0IGluc3QgPSBhd2FpdCBnZXQobWludCwgb3duZXIsIGZlZVBheWVyLCB0cnVlKTtcblxuICAgICAgICAgIGlmIChpbnN0ICYmIHR5cGVvZiBpbnN0ID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgaW5zdCk7XG4gICAgICAgICAgICByZXR1cm4gaW5zdDtcbiAgICAgICAgICB9IGVsc2UgaWYgKGluc3QgaW5zdGFuY2VvZiBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uKSB7XG4gICAgICAgICAgICAoYXdhaXQgaW5zdC5zdWJtaXQoKSkubWFwKFxuICAgICAgICAgICAgICBhc3luYyAob2s6IHN0cmluZykgPT4ge1xuICAgICAgICAgICAgICAgIGF3YWl0IE5vZGUuY29uZmlybWVkU2lnKG9rKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gaW5zdC5kYXRhO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAoZXJyOiBFcnJvcikgPT4ge1xuICAgICAgICAgICAgICAgIGRlYnVnTG9nKCcjIEVycm9yIHN1Ym1pdCByZXRyeUdldE9yQ3JlYXRlOiAnLCBlcnIpO1xuICAgICAgICAgICAgICAgIHRocm93IGVycjtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgZGVidWdMb2coYCMgcmV0cnk6ICR7Y291bnRlcn0gY3JlYXRlIHRva2VuIGFjY291bnQ6IGAsIGUpO1xuICAgICAgICAgIGRlYnVnTG9nKGAjIG1pbnQ6ICR7bWludH0sIG93bmVyOiAke293bmVyfSwgZmVlUGF5ZXI6ICR7ZmVlUGF5ZXJ9YCk7XG4gICAgICAgIH1cbiAgICAgICAgYXdhaXQgc2xlZXAoUkVUUllfU0xFRVBfVElNRSk7XG4gICAgICAgIGNvdW50ZXIrKztcbiAgICAgIH1cbiAgICAgIHRocm93IEVycm9yKGByZXRyeSBhY3Rpb24gaXMgb3ZlciBsaW1pdCAke1JFVFJZX09WRVJfTElNSVR9YCk7XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIFtNYWluIGxvZ2ljXUdldCBBc3NvY2lhdGVkIHRva2VuIEFjY291bnQuXG4gICAgICogaWYgbm90IGNyZWF0ZWQsIGNyZWF0ZSBuZXcgdG9rZW4gYWNjb3VpbnRcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBtaW50XG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAgICogQHBhcmFtIHtQdWJrZXl9IGZlZVBheWVyXG4gICAgICogQHJldHVybnMgUHJvbWlzZTxzdHJpbmc+XG4gICAgICovXG4gICAgZXhwb3J0IGNvbnN0IG1ha2VPckNyZWF0ZUluc3RydWN0aW9uID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyPzogUHVia2V5LFxuICAgICAgYWxsb3dPd25lck9mZkN1cnZlID0gZmFsc2UsXG4gICAgKTogUHJvbWlzZTx7XG4gICAgICB0b2tlbkFjY291bnQ6IHN0cmluZztcbiAgICAgIGluc3Q6IFRyYW5zYWN0aW9uSW5zdHJ1Y3Rpb24gfCB1bmRlZmluZWQ7XG4gICAgfT4gPT4ge1xuICAgICAgY29uc3QgYXNzb2NpYXRlZFRva2VuQWNjb3VudCA9IGdldEFzc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jKFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSxcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3Q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Agc3RvcmFnZVR5cGU6IFN0b3JhZ2VUeXBlLFxuICAgICAgZmVlUGF5ZXI/OiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxQcm9wZXJ0aWVzPiA9PiB7XG4gICAgICBpZiAoIWlucHV0IHx8ICFpbnB1dC5maWxlcykge1xuICAgICAgICByZXR1cm4ge307XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGZpbGVzID0gYXdhaXQgUHJvbWlzZS5hbGwoXG4gICAgICAgIGlucHV0LmZpbGVzLm1hcChhc3luYyAoZmlsZSkgPT4ge1xuICAgICAgICAgIGlmICghZmlsZS5maWxlUGF0aCkge1xuICAgICAgICAgICAgcmV0dXJuIHt9O1xuICAgICAgICAgIH1cbiAgICAgICAgICBjb25zdCByZXMgPSBhd2FpdCBjYWxsYmFja0Z1bmMoZmlsZS5maWxlUGF0aCwgc3RvcmFnZVR5cGUsIGZlZVBheWVyKTtcbiAgICAgICAgICBpZiAocmVzLmlzRXJyKSB7XG4gICAgICAgICAgICB0aHJvdyBFcnJvcihyZXMuZXJyb3IubWVzc2FnZSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBvdmVyd3JpdGVPYmplY3QoZmlsZSwgW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBleGlzdHNLZXk6ICdmaWxlUGF0aCcsXG4gICAgICAgICAgICAgIHdpbGw6IHsga2V5OiAndXJpJywgdmFsdWU6IHJlcy52YWx1ZSB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICBdKTtcbiAgICAgICAgfSksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHsgLi4uaW5wdXQsIGZpbGVzIH0gYXMgUHJvcGVydGllcztcbiAgICB9O1xuICB9XG59XG4iLCAiLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLXVudXNlZC12YXJzICovXG5pbXBvcnQgeyBPcHRpb24sIFVzZXMgfSBmcm9tICd+L3R5cGVzL3JlZ3VsYXItbm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XRjaCAoa2V5KSB7XG4gICAgICAgICAgY2FzZSAnaW1hZ2UnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5pbWFnZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc0ltYWdlVXJsKG1ldGFkYXRhLmltYWdlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3JveWFsdHknOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5yb3lhbHR5KSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzUm95YWx0eShtZXRhZGF0YS5yb3lhbHR5KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlcl9mZWVfYmFzaXNfcG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJGZWVCYXNpc1BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0Y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cblxuICAgIGNvbnN0IG1ldGFkYXRhcyA9IGF3YWl0IFByb21pc2UuYWxsKFxuICAgICAgaXRlbXNcbiAgICAgICAgLmZpbHRlcigoaXRlbSkgPT4gaXRlbS5jb21wcmVzc2lvbi5jb21wcmVzc2VkID09PSBpc0NvbXByZXNzZWQpXG4gICAgICAgIC5tYXAoYXN5bmMgKGl0ZW0pID0+IHtcbiAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgY29uc3Qgb2ZmY2hhaW46IE9mZmNoYWluID0gYXdhaXQgZmV0Y2hPZmZjaGFpbihcbiAgICAgICAgICAgICAgaXRlbS5jb250ZW50Lmpzb25fdXJpLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIGNvbnN0IG1lcmdlZCA9IHtcbiAgICAgICAgICAgICAgb25jaGFpbjogaXRlbSxcbiAgICAgICAgICAgICAgb2ZmY2hhaW46IG9mZmNoYWluLFxuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIHJldHVybiBDb252ZXJ0ZXIuTmZ0LmludG9Vc2VyKG1lcmdlZCk7XG4gICAgICAgICAgfSBjYXRjaCAoZXJyKSB7XG4gICAgICAgICAgICBkZWJ1Z0xvZygnIyBGYWlsZWQgZmV0Y2ggb2ZmY2hhaW4gdXJsOiAnLCBpdGVtLmNvbnRlbnQuanNvbl91cmkpO1xuICAgICAgICAgICAgcmV0dXJuIENvbnZlcnRlci5OZnQuaW50b1VzZXIoe1xuICAgICAgICAgICAgICBvbmNoYWluOiBpdGVtLFxuICAgICAgICAgICAgICBvZmZjaGFpbjoge30sXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICB9XG4gICAgICAgIH0pLFxuICAgICk7XG4gICAgcmV0dXJuIHtcbiAgICAgIHBhZ2U6IGFzc2V0cy52YWx1ZS5wYWdlLFxuICAgICAgdG90YWw6IGFzc2V0cy52YWx1ZS50b3RhbCxcbiAgICAgIGxpbWl0OiBhc3NldHMudmFsdWUubGltaXQsXG4gICAgICBtZXRhZGF0YX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ldHVybiBpbnN0LmRhdGE7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIChlcnI6IEVycm9yKSA9PiB7XG4gICAgICAgICAgICAgICAgZGVidWdMb2coJyMgRXJyb3Igc3VibWl0IHJldHJ5R2V0T3JDcmVhdGU6ICcsIGVycik7XG4gICAgICAgICAgICAgICAgdGhyb3cgZXJyO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICBkZWJ1Z0xvZyhgIyByZXRyeTogJHtjb3VudGVyfSBjcmVhdGUgdG9rZW4gYWNjb3VudDogYCwgZSk7XG4gICAgICAgICAgZGVidWdMb2coYCMgbWludDogJHttaW50fSwgb3duZXI6ICR7b3duZXJ9LCBmZWVQYXllcjogJHtmZWVQYXllcn1gKTtcbiAgICAgICAgfVxuICAgICAgICBhd2FpdCBzbGVlcChSRVRSWV9TTEVFUF9USU1FKTtcbiAgICAgICAgY291bnRlcisrO1xuICAgICAgfVxuICAgICAgdGhyb3cgRXJyb3IoYHJldHJ5IGFjdGlvbiBpcyBvdmVyIGxpbWl0ICR7UkVUUllfT1ZFUl9MSU1JVH1gKTtcbiAgICB9O1xuXG4gICAgLyoqXG4gICAgICogW01haW4gbG9naWNdR2V0IEFzc29jaWF0ZWQgdG9rZW4gQWNjb3VudC5cbiAgICAgKiBpZiBub3QgY3JlYXRlZCwgY3JlYXRlIG5ldyB0b2tlbiBhY2NvdWludFxuICAgICAqXG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG1pbnRcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gb3duZXJcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gZmVlUGF5ZXJcbiAgICAgKiBAcmV0dXJucyBQcm9taXNlPHN0cmluZz5cbiAgICAgKi9cbiAgICBleHBvcnQgY29uc3QgbWFrZU9yQ3JlYXRlSW5zdHJ1Y3Rpb24gPSBhc3luYyA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AgICAgICBpbnN0OiB1bmRlZmluZWQsXG4gICAgICAgIH07XG4gICAgICB9IGNhdGNoIChlcnJvcjogdW5rbm93bikge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuQWNjb3VudE5vdEZvdW5kRXJyb3IpICYmXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuSW52YWxpZEFjY291bnRPd25lckVycm9yKVxuICAgICAgICApIHtcbiAgICAgICAgICB0aHJvdyBFcnJvcignVW5leHBlY3RlZCBlcnJvcicpO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgcGF5ZXIgPSAhZmVlUGF5ZXIgPyBvd25lciA6IGZlZVBheWVyO1xuXG4gICAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVBc3NvY2lhdGVkVG9rZW5BY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgcGF5ZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdCxcbiAgICAgICAgfTtcbiAgICAgIH1cbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHsgS2V5cGFpciBhcyBPcmlnaW5hbCwgUHVibGljS2V5IH0gZnJvbSAnQHNvbGFuYS93ZWIzLmpzJztcbmltcG9ydCB7IFB1YmtleSwgU2VjcmV0IH0gZnJvbSAnfi90eXBlcy9hY2Nvd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3MudG9QdWJsaWNLZXkoKS50b0J1ZmZlcigpXSxcbiAgICAgICAgTVBMX0JVQkJMRUdVTV9QUk9HUkFNX0lELnRvUHVibGljS2V5KCksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGdldEJndW1TaWduZXIgPSAoKTogUHVibGljS2V5ID0+IHtcbiAgICAgIGNvbnN0IFtwdWJsaWNLZXldID0gUHVibGljS2V5LmZpbmRQcm9ncmFtQWRkcmVzc1N5bmMoXG4gICAgICAgIFtCdWZmZXIuZnJvbSgnY29sbGVjdGlvbl9jcGknLCAndXRmOCcpXSxcbiAgICAgICAgTVBMX0JVQkJMRUdVTV9QUk9HUkFNX0lELnRvUHVibGljS2V5KCksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGdldEFzc2V0SWQgPSAoYWRkcmVzczogUHVia2V5LCBsZWFmSW5kZXg6IG51bWJlcik6IFB1YmtleSA9PiB7XG4gICAgICBjb25zdCBub2RlID0gbmV3IEJOLkJOKGxlYWZJbmRleCk7XG4gICAgICBjb25zdCBbYXNzZXRJZF0gPSBQdWJsaWNLZXkuZmluZFByb2dyYW1BZGRyZXNzU3luYyhcbiAgICAgICAgW1xuICAgICAgICAgIEJ1ZmZlci5mcm9tKCdhc3NldCcsICd1dGY4JyksXG4gICAgICAgICAgYWRkcmVzcy50b1B1YmxpY0tleSgpLnRvQnVmZmVyKCksXG4gICAgICAgICAgVWludDhBcnJheS5mcm9tKG5vZGUudG9BcnJheSgnbGUnLCA4KSksXG4gICAgICAgIF0sXG4gICAgICAgIE1QTF9CVUJCTEVHVU1fUFJPR1JBTV9JRC50b1B1YmxpY0tleSgpLFxuICAgICAgKTtcbiAgICAgIHJldHVybiBhc3NldElkLnRvU3RyaW5nKCk7XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7I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WVzIHtcbiAgICBleHBvcnQgY29uc3QgaW50b0luZnJhID0gYXN5bmMgKFxuICAgICAgaW5wdXQ6IFByb3BlcnRpZXMgfCB1bmRlZmluZWQsXG4gICAgICBjYWxsYmFja0Z1bmM6IChcbiAgICAgICAgZmlsZVBhdGg6IEZpbGVUeXBlLFxuICAgICAgICBzdG9yYWdlVHlwZTogU3RvcmFnZVR5cGUsXG4gICAgICAgIGZlZVBheWVyPzogU2VjcmV0LFxuICAgICAgKSA9PiBQcm9taXNlPFJlc3VsdDxzdHJpbmcsIEVycm9yPj4sXG4gICAgICBzdG9yYWdlVHlwZTogU3RvcmFnZVR5cGUsXG4gICAgICBmZWVQYXllcj86IFNlY3JldCxcbiAgICApOiBQcm9taXNlPFByb3BlcnRpZXM+ID0+IHtcbiAgICAgIGlmICghaW5wdXQgfHwgIWlucHV0LmZpbGVzKSB7XG4gICAgICAgIHJldHVybiB7fTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgZmlsZXMgPSBhd2FpdCBQcm9taXNlLmFsbChcbiAgICAgICAgaW5wdXQuZmlsZXMubWFwKGFzeW5jIChmaWxlKSA9PiB7XG4gICAgICAgICAgaWYgKCFmaWxlLmZpbGVQYXRoKSB7XG4gICAgICAgICAgICByZXR1cm4ge307XG4gICAgICAgICAgfVxuICAgICAgICAgIGNvbnN0IHJlcyA9IGF3YWl0IGNhbGxiYWNrRnVuYyhmaWxlLmZpbGVQYXRoLCBzdG9yYWdlVHlwZSwgZmVlUGF5ZXIpO1xuICAgICAgICAgIGlmIChyZXMuaXNFcnIpIHtcbiAgICAgICAgICAgIHRocm93IEVycm9yKHJlcy5lcnJvci5tZXNzYWdlKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgcmV0dXJuIG92ZXJ3cml0ZU9iamVjdChmaWxlLCBbXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGV4aXN0c0tleTogJ2ZpbGVQYXRoJyxcbiAgICAgICAgICAgICAgd2lsbDogeyBrZXk6ICd1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gICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ25hbWUnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLm5hbWUpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNOYW1lKG1ldGFkYXRhLm5hbWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc3ltYm9sJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5zeW1ib2wpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTeW1ib2wobWV0YWRhdGEuc3ltYm9sKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgICAgIGlmIChyZXMgJiYgcmVzLmlzRXJyKSB7XG4gICAgICAgICAgcmVzdWx0cy5wdXNoKC4uLnJlcy5lcnJvci5kZXRhaWxzKTtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgICBpZiAocmVzdWx0cy5sZW5ndGggPiAwKSB7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPVxuICAgICAgICAgICdDYXVnaHQgaW4gdGhlIHZhbGlkYXRpb24gZXJyb3JzLiBzZWUgaW5mb3JtYXRpb24gZS5nOiBlcnI8VmFsaWRhdG9yRXJyb3I+LmRldGFpbHMnO1xuICAgICAgICB0aHJvdyBuZXcgVmFsaWRhdG9yRXJyb3IobWVzc2FnZSwgcmVzdWx0cyk7XG4gICAgICB9XG4gICAgICByZXR1cm4gTWVzc2F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fSA9IHtcbiAgICAgIC4uLmRlZmF1bHRPcHRpb25zLFxuICAgICAgLi4ub3B0aW9ucyxcbiAgICB9O1xuXG4gICAgY29uc3QgYXNzZXRzID0gYXdhaXQgQXBpLmdldEFzc2V0c0J5T3duZXIoXG4gICAgICBvd25lcixcbiAgICAgIGxpbWl0LFxuICAgICAgcGFnZSxcbiAgICAgIHNvcnRCeSxcbiAgICAgIGJlZm9yZSxcbiAgICAgIGFmdGVyLFxuICAgICk7XG4gICAgaWYgKGFzc2V0cy5pc0Vycikge1xuICAgICAgdGhyb3cgYXNzZXRzLmVycm9yO1xuICAgIH1cblxuICAgIGNvbnN0IGl0ZW1zID0gYXNzZXRzLnZhbHVlLml0ZW1zO1xuXG4gICAgY29uc3QgbWV0YWRhdGFzID0gYXdhaXQgUHJvbWlzZS5hbGwoXG4gICAgICBpdGVtc1xuICAgICAgICAuZmlsdGVyKChpdGVtKSA9PiBpdGVtLmNvbXByZXNzaW9uLmNvbXByZXNzZWQgPT09IGlzQ29tcHJlc3NlZClcbiAgICAgICAgLm1hcChhc3luYyAoaXRlbSkgPT4ge1xuICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICBjb25zdCBvZmZjaGFpbjogT2ZmY2hhaW4gPSBhd2FpdCBmZXRjaE9mZmNoYWluKFxuICAgICAgICAgICAgICBpdGVtLmNvbnRlbnQuanNvbl91cmksXG4gICAgICAgICAgICApO1xuICAgICAgICAgICAgY29uc3QgbWVyZ2VkID0ge1xuICAgICAgICAgICAgICBvbmNoYWluOiBpdGVtLFxuICAgICAgICAgICAgICBvZmZjaGFpbjogb2ZmY2hhaW4sXG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgcmV0dXJuIENvbnZlcnRlci5OZnQuaW50b1VzZXIobWVyZ2VkKTtcbiAgICAgICAgICB9IGNhdGNoIChlcnIpIHtcbiAgICAgICAgICAgIGRlYnVnTG9nKCcjIEZhaWxlZCBmZXRjaCBvZmZjaGFpbiB1cmw6ICcsIGl0ZW0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21wcmVzc2VkTmZ0TWV0YWRhdGEiLCAiQ29udmVydGVyIiwgIlJveWFsdHkiLCAiQ29udmVydGVyIiwgIk5mdCIsICJDb252ZXJ0ZXIiLCAiTWVtbyIsICJDb252ZXJ0ZXIiLCAiTWludCIsICJDb252ZXJ0ZXIiLCAiUmVndWxhck5mdE1ldGFkYXRhIiwgIkNvbnZlcnRlciIsICJQcm9wZXJ0aWVzIiwgIkNvbnZlcnRlciIsICJVc2VzIiwgIkNvbnZlcnRlciIsICJUb2tlbk1ldGFkYXRhIiwgIkNvbnZlcnRlciIsICJUcmFuc2ZlckNoZWNrZWQiLCAiQ29udmVydGVyIiwgIlRyYW5zZmVyIiwgIkNvbnZlcnRlciIsICJWYWxpZGF0b3IiLCAiTWVzc2FnZSIsICJDb252ZXJ0ZXIiLCAiRGFzQXBpIiwgIkRhc0FwaSIsICJDb252ZXJ0ZXIiLCAiRGFzQXBpIl0KfQo= \ No newline at end of file diff --git a/packages/das-api/dist/index.mjs b/packages/das-api/dist/index.mjs index 8a0a218c8..e0188768c 100644 --- a/packages/das-api/dist/index.mjs +++ b/packages/das-api/dist/index.mjs @@ -1,4 +1,4 @@ -// ../shared/src/constants.ts +// ../suite-utils/src/constants.ts import { PublicKey } from "@solana/web3.js"; import SolanaJsonConfig from "@solana-suite/config/load"; var Config = SolanaJsonConfig; @@ -280,56 +280,6 @@ var TransactionBuilder; TransactionBuilder7.Common = Common2; })(TransactionBuilder || (TransactionBuilder = {})); -// ../shared/src/shared.ts -var overwriteObject = (object, targets) => { - const that = object; - targets.forEach((target) => { - delete that[target.existsKey]; - that[target.will.key] = target.will.value; - }); - return that; -}; -var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { - if (Constants.isDebugging === "true" || process.env.DEBUG === "true") { - console.log("[DEBUG]", data1, data2, data3, data4); - } -}; -var sleep = async (sec) => { - return new Promise((r) => setTimeout(r, sec * 1e3)); -}; -var isPromise = (obj) => { - return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; -}; -function Try(input, finallyInput) { - try { - const v = input(); - if (isPromise(v)) { - return v.then( - (x) => Result.ok(x), - (err) => Result.err(err) - ); - } else { - return Result.ok(v); - } - } catch (e) { - if (e instanceof Error) { - return Result.err(e); - } - return Result.err(Error(e)); - } finally { - if (finallyInput) { - debugLog("# finally input:", finallyInput); - finallyInput(); - } - } -} -var convertTimestampToDateTime = (created_at) => { - if (created_at) { - return new Date(created_at * 1e3); - } - return; -}; - // ../transaction-builder/src/batch.ts var TransactionBuilder2; ((TransactionBuilder7) => { @@ -797,7 +747,57 @@ var TransactionBuilder6 = { ...TransactionBuilder4 }; -// ../shared/src/result.ts +// ../suite-utils/src/shared.ts +var overwriteObject = (object, targets) => { + const that = object; + targets.forEach((target) => { + delete that[target.existsKey]; + that[target.will.key] = target.will.value; + }); + return that; +}; +var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { + if (Constants.isDebugging === "true" || process.env.DEBUG === "true") { + console.log("[DEBUG]", data1, data2, data3, data4); + } +}; +var sleep = async (sec) => { + return new Promise((r) => setTimeout(r, sec * 1e3)); +}; +var isPromise = (obj) => { + return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; +}; +function Try(input, finallyInput) { + try { + const v = input(); + if (isPromise(v)) { + return v.then( + (x) => Result.ok(x), + (err) => Result.err(err) + ); + } else { + return Result.ok(v); + } + } catch (e) { + if (e instanceof Error) { + return Result.err(e); + } + return Result.err(Error(e)); + } finally { + if (finallyInput) { + debugLog("# finally input:", finallyInput); + finallyInput(); + } + } +} +var convertTimestampToDateTime = (created_at) => { + if (created_at) { + return new Date(created_at * 1e3); + } + return; +}; + +// ../suite-utils/src/result.ts var AbstractResult = class { unwrap(ok, err) { const r = this._chain( @@ -909,15 +909,15 @@ var InternalErr = class extends AbstractResult { } }; var Result; -((Result8) => { +((Result9) => { function ok(value) { return new InternalOk(value); } - Result8.ok = ok; + Result9.ok = ok; function err(error) { return new InternalErr(error || Error()); } - Result8.err = err; + Result9.err = err; function all(obj) { if (Array.isArray(obj)) { const resArr = []; @@ -927,7 +927,7 @@ var Result; } resArr.push(item.value); } - return Result8.ok(resArr); + return Result9.ok(resArr); } const res = {}; const keys = Object.keys(obj); @@ -938,9 +938,9 @@ var Result; } res[key] = item.value; } - return Result8.ok(res); + return Result9.ok(res); } - Result8.all = all; + Result9.all = all; })(Result || (Result = {})); // ../converter/src/collection.ts @@ -1691,4 +1691,4 @@ var DasApi3 = { export { DasApi3 as DasApi }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vc2hhcmVkL3NyYy9jb25zdGFudHMudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvYmF0Y2gudHMiLCAiLi4vLi4vbm9kZS9zcmMvaW5kZXgudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY29tbW9uLnRzIiwgIi4uLy4uL3NoYXJlZC9zcmMvc2hhcmVkLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL21pbnQudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvcGFydGlhbC1zaWduLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2NhbGN1bGF0ZS10eHNpemUudHMiLCAiLi4vLi4vZ2xvYmFsL3NyYy9pbmRleC50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9hc3NvY2lhdGVkLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2tleXBhaXIudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvcGRhLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3NoYXJlZC9zcmMvcmVzdWx0LnRzIiwgIi4uLy4uL2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EVycm9yKENvbnN0YW50cy5XYXJubmluZ01lc3NhZ2UuREFTX0FQSV9VUkwpO1xuICAgICAgICB9XG4gICAgICAgIGNvbnN0IHVybHMgPSBDb25zdGFudHMuQnVuZGxyVXJsLnByZC5zcGxpdCgnLCcpO1xuICAgICAgICBjb25zdCBpbmRleCA9IERhdGUubm93KCkgJSB1cmxzLmxlbmd0aDtcbiAgICAgICAgcmV0dXJuIHVybHNbaW5kZXhdO1xuICAgICAgfVxuICAgICAgZGVmYXVsdDoge1xuICAgICAgICBjb25zdCB1cmxzID0gQ29uc3RhbnRzLkRhc0FwaVVybC5kZXYuc3BsaXQoJywnKTtcbiAgICAgICAgY29uc3QgaW5kZXggPSBEYXRlLm5vdygpICUgdXJscy5sZW5ndGg7XG4gICAgICAgIHJldHVybiB1cmxzW2luZGV4XTtcbiAgICAgIH1cbiAgICB9XG4gIH07XG5cbiAgZXhwb3J0IGNvbnN0IHN3aXRjaE5mdFN0b3JhZ2UgPSAoZW52OiBzdHJpbmcpOiBzdHJpbmcgPT4ge1xuICAgIHN3aXRjaCAoZW52KSB7XG4gICAgICBjYXNlIENvbnN0YW50cy5DbHVzdGVyLnByZDpcbiAgICAgICAgaWYgKCFuZnRTdG9yYWdlQXBpS2V5KSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoV2Fybm5pbmdNZXNzYWdlLk5GVF9TVE9SQUdFX0FQSV9LRVkpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBuZnRTdG9yYWdlQXBpS2V5O1xuICAgICAgZGVmYXVsdDoge1xuICAgICAgICByZXR1cm4gQ29uc3RhbnRzLk5mdHN0b3JhZ2VBcGlLZXkuZGV2O1xuICAgICAgfVxuICAgIH1cbiAgfTtcblxuICBleHBvcnQgY29uc3QgV1JBUFBFRF9UT0tFTl9QUk9HUkFNX0lEID0gbmV3IFB1YmxpY0tleShcbiAgICAnU28xMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMicsXG4gICk7XG4gI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JFVFJZX09WRVJfTElNSVQpIHtcbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICBjb25zdCBpbnN0ID0gYXdhaXQgZ2V0KG1pbnQsIG93bmVyLCBmZWVQYXllciwgdHJ1ZSk7XG5cbiAgICAgICAgICBpZiAoaW5zdCAmJiB0eXBlb2YgaW5zdCA9PT0gJ3N0cmluZycpIHtcbiAgICAgICAgICAgIGRlYnVnTG9nKCcjIGFzc29jaWF0ZWRUb2tlbkFjY291bnQ6ICcsIGluc3QpO1xuICAgICAgICAgICAgcmV0dXJuIGluc3Q7XG4gICAgICAgICAgfSBlbHNlIGlmIChpbnN0IGluc3RhbmNlb2YgVHJhbnNhY3Rpb25CdWlsZGVyLkNvbW1vbikge1xuICAgICAgICAgICAgKGF3YWl0IGluc3Quc3VibWl0KCkpLm1hcChcbiAgICAgICAgICAgICAgYXN5bmMgKG9rOiBzdHJpbmcpID0+IHtcbiAgICAgICAgICAgICAgICBhd2FpdCBOb2RlLmNvbmZpcm1lZFNpZyhvayk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGluc3QuZGF0YTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgKGVycjogRXJyb3IpID0+IHtcbiAgICAgICAgICAgICAgICBkZWJ1Z0xvZygnIyBFcnJvciBzdWJtaXQgcmV0cnlHZXRPckNyZWF0ZTogJywgZXJyKTtcbiAgICAgICAgICAgICAgICB0aHJvdyBlcnI7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgIGRlYnVnTG9nKGAjIHJldHJ5OiAke2NvdW50ZXJ9IGNyZWF0ZSB0b2tlbiBhY2NvdW50OiBgLCBlKTtcbiAgICAgICAgICBkZWJ1Z0xvZyhgIyBtaW50OiAke21pbnR9LCBvd25lcjogJHtvd25lcn0sIGZlZVBheWVyOiAke2ZlZVBheWVyfWApO1xuICAgICAgICB9XG4gICAg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QsXG4gICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGFzc29jaWF0ZWRUb2tlbkFjY291bnQ6ICcsIGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSk7XG5cbiAgICAgIHRyeSB7XG4gICAgICAgIC8vIERvbnQgdXNlIFJlc3VsdFxuICAgICAgICBhd2FpdCBnZXRBY2NvdW50KFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCkuY29tbWl0bWVudCxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3Q6IHVuZGVmaW5lZCxcbiAgICAgICAgfTtcbiAgICAgIH0gY2F0Y2ggKGVycm9yOiB1bmtub3duKSB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5BY2NvdW50Tm90Rm91bmRFcnJvcikgJiZcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5JbnZhbGlkQWNjb3VudE93bmVyRXJyb3IpXG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9yKCdVbmV4cGVjdGVkIGVycm9yJyk7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBwYXllciA9ICFmZWVQYXllciA/IG93bmVyIDogZmVlUGF5ZXI7XG5cbiAgICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgICBwYXllci50b1B1Ym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yb20gJ34vdHlwZXMvY29udmVydGVyJztcblxuZXhwb3J0IG5hbWVzcGFjZSBDb252ZXJ0ZXIge1xuICBleHBvcnQgbmFtZXNwYWNlIENyZWF0b3JzIHtcbiAgICBleHBvcnQgY29uc3QgaW50b0luZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IE9wdGlvbjxJbnRlcm5hbENyZWF0b3JzW10+ID0+IHtcbiAgICAgIGlmICghaW5wdXQpIHtcbiAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICB9XG4gICAgICByZXR1cm4gaW5wdXQubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvQ29tcHJlc3NlZE5mdEluZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IEludGVybmFsQ3JlYXRvcnNbXSA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBbXTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBpbnB1dCEubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRv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xuICAgIG1ldGFkYXRhOiBULFxuICApOiBSZXN1bHQ8c3RyaW5nLCBWYWxpZGF0b3JFcnJvcj4gPT4ge1xuICAgIHJldHVybiBUcnkoKCkgPT4ge1xuICAgICAgY29uc3Qga2V5cyA9IE9iamVjdC5rZXlzKG1ldGFkYXRhKTtcbiAgICAgIGNvbnN0IHJlc3VsdHM6IERldGFpbHNbXSA9IFtdO1xuICAgICAga2V5cy5tYXAoKGtleSkgPT4ge1xuICAgICAgICBsZXQgcmVzITogUmVzdWx0PHN0cmluZywgVmFsaWRhdG9yRXJyb3I+O1xuICAgICAgICBzd2l0Y2ggKGtleSkge1xuICAgICAgICAgIGNhc2UgJ2ltYWdlJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuaW1hZ2UpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNJbWFnZVVybChtZXRhZGF0YS5pbWFnZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdyb3lhbHR5JzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEucm95YWx0eSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1JveWFsdHkobWV0YWRhdGEucm95YWx0eSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGV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HRpb25zLFxuICAgIH07XG5cbiAgICBjb25zdCBhc3NldHMgPSBhd2FpdCBBcGkuZ2V0QXNzZXRzQnlPd25lcihcbiAgICAgIG93bmVyLFxuICAgICAgbGltaXQsXG4gICAgICBwYWdlLFxuICAgICAgc29ydEJ5LFxuICAgICAgYmVmb3JlLFxuICAgICAgYWZ0ZXIsXG4gICAgKTtcbiAgICBpZiAoYXNzZXRzLmlzRXJyKSB7XG4gICAgICB0aHJvdyBhc3NldHMuZXJyb3I7XG4gICAgfVxuXG4gICAgY29uc3QgaXRlbXMgPSBhc3NldHMudmFsdWUuaXRlbXM7XG5cbiAgICBjb25zdCBtZXRhZGF0YXMgPSBhd2FpdCBQcm9taXNlLmFsbChcbiAgICAgIGl0ZW1zXG4gICAgICAgIC5maWx0ZXIoKGl0ZW0pID0+IGl0ZW0uY29tcHJlc3Npb24uY29tcHJlc3NlZCA9PT0gaXNDb21wcmVzc2VkKVxuICAgICAgICAubWFwKGFzeW5jIChpdGVtKSA9PiB7XG4gICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgIGNvbnN0IG9mZmNoYWluOiBPZmZjaGFpbiA9IGF3YWl0IGZldGNoT2ZmY2hhaW4oXG4gICAgICAgICAgICAgIGl0ZW0uY29udGVudC5qc29uX3VyaSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgICBjb25zdCBtZXJnZWQgPSB7XG4gICAgICAgICAgICAgIG9uY2hhaW46IGl0ZW0sXG4gICAgICAgICAgICAgIG9mZmNoYWluOiBvZmZjaGFpbixcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICByZXR1cm4gQ29udmVydGVyLk5mdC5pbnRvVXNlcihtZXJnZWQpO1xuICAgICAgICAgIH0gY2F0Y2ggKGVycikge1xuICAgICAgICAgICAgZGVidWdMb2coJyMgRmFpbGVkIGZldGNoIG9mZmNoYWluIHVybDogJywgaXRlbS5jb250ZW50Lmpzb25fdXJpKTtcbiAgICAgICAgICAgIHJldHVybiBDb252ZXJ0Z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JQdWJsaWNLZXkiLCAiUHVibGljS2V5IiwgIkFjY291bnQiLCAiS2V5cGFpciIsICJBY2NvdW50IiwgIkFzc29jaWF0ZWQiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlB1YmxpY0tleSIsICJBY2NvdW50IiwgIlBkYSIsICJBY2NvdW50IiwgImJzIiwgIkFjY291bnQiLCAiUHVibGljS2V5IiwgIktleXBhaXIiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJSZXN1bHQiLCAiQ29udmVydGVyIiwgIkNvbGxlY3Rpb24iLCAiQ29sbGVjdGlvbk1pbnQiLCAiQ29udmVydGVyIiwgIkNyZWF0b3JzIiwgIkNvbnZlcnRlciIsICJDb21wcmVzc2VkTmZ0TWV0YWRhdGEiLCAiQ29udmVydGVyIiwgIlJveWFsdHkiLCAiQ29udmVydGVyIiwgIk5mdCIsICJDb252ZXJ0ZXIiLCAiTWVtbyIsICJDb252ZXJ0ZXIiLCAiTWludCIsICJDb252ZXJ0ZXIiLCAiUmVndWxhck5mdE1ldGFkYXRhIiwgIkNvbnZlcnRlciIsICJQcm9wZXJ0aWVzIiwgIkNvbnZlcnRlciIsICJVc2VzIiwgIkNvbnZlcnRlciIsICJUb2tlbk1ldGFkYXRhIiwgIkNvbnZlcnRlciIsICJUcmFuc2ZlckNoZWNrZWQiLCAiQ29udmVydGVyIiwgIlRyYW5zZmVyIiwgIkNvbnZlcnRlciIsICJWYWxpZGF0b3IiLCAiTWVzc2FnZSIsICJDb252ZXJ0ZXIiLCAiRGFzQXBpIiwgIkRhc0FwaSIsICJDb252ZXJ0ZXIiLCAiRGFzQXBpIl0KfQo= \ No newline at end of file +//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3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iAgfTtcblxuICBleHBvcnQgY29uc3Qgc3dpdGNoQnVuZGxyID0gKGVudjogc3RyaW5nKTogc3RyaW5nID0+IHtcbiAgICBzd2l0Y2ggKGVudikge1xuICAgICAgY2FzZSBDb25zdGFudHMuQ2x1c3Rlci5wcmQ6IHtcbiAgICAgICAgY29uc3QgdXJscyA9IENvbnN0YW50cy5CdW5kbHJVcmwucHJkLnNwbGl0KCcsJyk7XG4gICAgICAgIGNvbnN0IGluZGV4ID0gRGF0ZS5ub3coKSAlIHVybHMubGVuZ3RoO1xuICAgICAgICByZXR1cm4gdXJsc1tpbmRleF07XG4gICAgICB9XG4gICAgICBkZWZhdWx0OiB7XG4gICAgICAgIHJldHVybiBDb25zdGFudHMuQnVuZGxyVXJsLmRldjtcbiAgICAgIH1cbiAgICB9XG4gIH07XG5cbiAgZXhwb3J0IGNvbnN0IHN3aXRjaERhc0FwaSA9IChlbnY6IHN0cmluZyk6IHN0cmluZyA9PiB7XG4gICAgc3dpdGNoIChlbnYpIHtcbiAgICAgIGNhc2UgQ29uc3RhbnRzLkNsdXN0ZXIucHJkOiB7XG4gICAgICAgIGlmIChkYXNBcGlVcmwubGVuZ3RoIDwgMSkge1xuICAgICAgICAgIHRocm93IEVycm9yKENvbnN0YW50cy5XYXJubmluZ01lc3NhZ2UuREFTX0FQSV9VUkwpO1xuICAgICAgICB9XG4gICAgICAgIGNvbnN0IHVybHMgPSBDb25zdGFudHMuQnVuZGxyVXJsLnByZC5zcGxpdCgnLCcpO1xuICAgICAgICBjb25zdCBpbmRleCA9IERhdGUubm93KCkgJSB1cmxzLmxlbmd0aDtcbiAgICAgICAgcmV0dXJuIHVybHNbaW5kZXhdO1xuICAgICAgfVxuICAgICAgZGVmYXVsdDoge1xuICAgICAgICBjb25zdCB1cmxzID0gQ29uc3RhbnRzLkRhc0FwaVVybC5kZXYuc3BsaXQoJywnKTtcbiAgICAgICAgY29uc3QgaW5kZXggPSBEYXRlLm5vdygpICUgdXJscy5sZW5ndGg7X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ICBhbGxvd093bmVyT2ZmQ3VydmUgPSBmYWxzZSxcbiAgICApOiBQcm9taXNlPHN0cmluZyB8IENvbW1vblN0cnVjdHVyZTxQdWJrZXk+PiA9PiB7XG4gICAgICBjb25zdCByZXMgPSBhd2FpdCBtYWtlT3JDcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIG5ldyBLZXlwYWlyLktleXBhaXIoeyBzZWNyZXQ6IGZlZVBheWVyIH0pLnB1YmtleSxcbiAgICAgICAgYWxsb3dPd25lck9mZkN1cnZlLFxuICAgICAgKTtcblxuICAgICAgaWYgKCFyZXMuaW5zdCkge1xuICAgICAgICByZXR1cm4gcmVzLnRva2VuQWNjb3VudDtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uPFB1YmtleT4oXG4gICAgICAgIFtyZXMuaW5zdF0sXG4gICAgICAgIFtdLFxuICAgICAgICBmZWVQYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgcmVzLnRva2VuQWNjb3VudCEsXG4gICAgICApO1xuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiBSZXRyeSBmdW5jdGlvbiBpZiBjcmVhdGUgbmV3IHRva2VuIGFjY291aW50XG4gICAgICpcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gbWludFxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBvd25lclxuICAgICAqIEBwYXJhbSB7U2VjcmV0fSBmZWVQYXllclxuICAgICAqIEByZXR1cm5zIFByb21pc2U8c3RyaW5nPlxuICAgICAqL1xuICAgIGV4cG9ydCBjb25zdCByZXRyeUdldE9yQ3JlYXRlID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyOiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxzdHJpbmc+ID0+IHtcbiAgICAgIGxldCBjb3VudGVyID0gMTtcbiAgICAgIHdoaWxlIChjb3VudGVyIDwgUkVUUllfT1ZFUl9MSU1JVCkge1xuICAgICAgICB0cnkge1xuICAgICAgICAgIGNvbnN0IGluc3QgPSBhd2FpdCBnZXQobWludCwgb3duZXIsIGZlZVBheWVyLCB0cnVlKTtcblxuICAgICAgICAgIGlmIChpbnN0ICYmIHR5cGVvZiBpbnN0ID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgaW5zdCk7XG4gICAgICAgICAgICByZXR1cm4gaW5zdDtcbiAgICAgICAgICB9IGVsc2UgaWYgKGluc3QgaW5zdGFuY2VvZiBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uKSB7XG4gICAgICAgICAgICAoYXdhaXQgaW5zdC5zdWJtaXQoKSkubWFwKFxuICAgICAgICAgICAgICBhc3luYyAob2s6IHN0cmluZykgPT4ge1xuICAgICAgICAgICAgICAgIGF3YWl0IE5vZGUuY29uZmlybWVkU2lnKG9rKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gaW5zdC5kYXRhO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAoZXJyOiBFcnJvcikgPT4ge1xuICAgICAgICAgICAgICAgIGRlYnVnTG9nKCcjIEVycm9yIHN1Ym1pdCByZXRyeUdldE9yQ3JlYXRlOiAnLCBlcnIpO1xuICAgICAgICAgICAgICAgIHRocm93IGVycjtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgZGVidWdMb2coYCMgcmV0cnk6ICR7Y291bnRlcn0gY3JlYXRlIHRva2VuIGFjY291bnQ6IGAsIGUpO1xuICAgICAgICAgIGRlYnVnTG9nKGAjIG1pbnQ6ICR7bWludH0sIG93bmVyOiAke293bmVyfSwgZmVlUGF5ZXI6ICR7ZmVl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cbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3QsXG4gICAgICAgIH07XG4gICAgICB9XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IEtleXBhaXIgYXMgT3JpZ2luYWwsIFB1YmxpY0tleSB9IGZyb20gJ0Bzb2xhbmEvd2ViMy5qcyc7XG5pbXBvcnQgeyBQdWJrZXksIFNlY3JldCB9IGZyb20gJ34vdHlwZXMvYWNjb3VudCc7XG5pbXBvcnQgYnMgZnJvbSAnYnM1OCc7XG5cbmV4cG9ydCBuYW1lc3BhY2UgQWNjb3VudCB7XG4gIGV4cG9ydCBjbGFzcyBLZXlwYWlyIHtcbiAgICBzZWNyZXQ6IFNlY3JldDtcbiAgICBwdWJrZXk6IFB1YmtleTtcblxuICAgIGNvbnN0cnVjdG9yKHBhcmFtczogeyBwdWJrZXk/OiBQdWJrZXk7IHNlY3JldDogU2VjcmV0IH0pIHtcbiAgICAgIGlmICghcGFyYW1zLnB1YmtleSkge1xuICAgICAgICBjb25zdCBrZXlwYWlyID0gcGFyYW1zLnNlY3JldC50b0tleXBhaXIoKTtcbiAgICAgICAgdGhpcy5wdWJrZXkgPSBrZXlwYWlyLnB1YmxpY0tleS50b1N0cmluZygpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgdGhpcy5wdWJrZXkgPSBwYXJhbXMucHVia2V5O1xuICAg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cmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvQ29tcHJlc3NlZE5mdEluZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IEludGVybmFsQ3JlYXRvcnNbXSA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBbXTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBpbnB1dCEubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlciA9IChcbiAgICAgIG91dHB1dDogT3B0aW9uPEludGVybmFsQ3JlYXRvcnNbXT4sXG4gICAgKTogQ3JlYXRvcnNbXSB8IHVuZGVmaW5lZCA9PiB7XG4gICAgICBpZiAoIW91dHB1dCkge1xuICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gb3V0cHV0Lm1hcCgoZGF0YSkgPT4ge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIGFkZHJlc3M6IGRhdGEuYWRkcmVzcy50b1N0cmluZygpLFxuICAgICAgICAgIHNoYXJlOiBkYXRhLnNoYXJlLFxuICAgICAgICAgIHZlcmlmaWVkOiBkYXRhLnZlcmlmaWVkLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IENvbnZlcnRlciBhcyBDb2xsZWN0aW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B1dC5maWxlcykge1xuICAgICAgICByZXR1cm4ge307XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGZpbGVzID0gYXdhaXQgUHJvbWlzZS5hbGwoXG4gICAgICAgIGlucHV0LmZpbGVzLm1hcChhc3luYyAoZmlsZSkgPT4ge1xuICAgICAgICAgIGlmICghZmlsZS5maWxlUGF0aCkge1xuICAgICAgICAgICAgcmV0dXJuIHt9O1xuICAgICAgICAgIH1cbiAgICAgICAgICBjb25zdCByZXMgPSBhd2FpdCBjYWxsYmFja0Z1bmMoZmlsZS5maWxlUGF0aCwgc3RvcmFnZVR5cGUsIGZlZVBheWVyKTtcbiAgICAgICAgICBpZiAocmVzLmlzRXJyKSB7XG4gICAgICAgICAgICB0aHJvdyBFcnJvcihyZXMuZXJyb3IubWVzc2FnZSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBvdmVyd3JpdGVPYmplY3QoZmlsZSwgW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBleGlzdHNLZXk6ICdmaWxlUGF0aCcsXG4gICAgICAgICAgICAgIHdpbGw6IHsga2V5OiAndXJpJywgdmFsdWU6IHJlcy52YWx1ZSB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICBdKTtcbiAgICAgICAgfSksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHsgLi4uaW5wdXQsIGZpbGVzIH0gYXMgUHJvcGVydGllcztcbiAgICB9O1xuICB9XG59XG4iLCAiLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLXVudXNlZC12YXJzICovXG5pbXBvcnQgeyBPcHRpb24sIFVzZXMgfSBmcm9tICd+L3R5cGVzL3JlZ3VsYXItbmZ0JztcblxuZXhwb3J0IG5hbWVzcGFjZSBDb252ZXJ0ZXIge1xuICBleHBvcnQgbmFtZXNwYWNlIFVzZXMge1xuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlclNpZGUgPSAob3V0cHV0OiBPcHRpb248VXNl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luIG1ldGFkYXRhICYmIG1ldGFkYXRhLmltYWdlKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzSW1hZ2VVcmwobWV0YWRhdGEuaW1hZ2UpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAncm95YWx0eSc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnJveWFsdHkpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNSb3lhbHR5KG1ldGFkYXRhLnJveWFsdHkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc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FxuICAgICAgaXRlbXNcbiAgICAgICAgLmZpbHRlcigoaXRlbSkgPT4gaXRlbS5jb21wcmVzc2lvbi5jb21wcmVzc2VkID09PSBpc0NvbXByZXNzZWQpXG4gICAgICAgIC5tYXAoYXN5bmMgKGl0ZW0pID0+IHtcbiAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgY29uc3Qgb2ZmY2hhaW46IE9mZmNoYWluID0gYXdhaXQgZmV0Y2hPZmZjaGFpbihcbiAgICAgICAgICAgICAgaXRlbS5jb250ZW50Lmpzb25fdXJpLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIGNvbnN0IG1lcmdlZCA9IHtcbiAgICAgICAgICAgICAgb25jaGFpbjogaXRlbSxcbiAgICAgICAgICAgICAgb2ZmY2hhaW46IG9mZmNoYWluLFxuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIHJldHVybiBDb252ZXJ0ZXIuTmZ0LmludG9Vc2VyKG1lcmdlZCk7XG4gICAgICAgICAgfSBjYXRjaCAoZXJyKSB7XG4gICAgICAgICAgICBkZWJ1Z0xvZygnIyBGYWlsZWQgZmV0Y2ggb2ZmY2hhaW4gdXJsOiAnLCBpdGVtLmNvbnRlbnQuanNvbl91cmkpO1xuICAgICAgICAgICAgcmV0dXJuIENvbnZlcnRlci5OZnQuaW50b1VzZXIoe1xuICAgICAgICAgICAgICBvbmNoYWluOiBpdGVtLFxuICAgICAgICAgICAgICBvZmZjaGFpbjoge30sXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICB9XG4gICAgICAgIH0pLFxuICAgICk7XG4gICAgcmV0dXJuIHtcbiAgICAgIHBhZ2U6IGFzc2V0cy52YWx1ZS5wYWdlLFxuICAgICAgdG90YWw6IGFzc2V0cy52YWx1ZS50b3RhbCxcbiAgICAgIGxpbWl0OiBhc3NldHMudmFsdWUubGltaXQsXG4gICAgICBtZXRhZGF0YXMsXG4gICAgfTtcbiAgfTtcblxuICAvKipcbiAgICogRmluZCBuZnQgYnkgY29s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dGlvbiIsICJDb2xsZWN0aW9uTWludCIsICJDb252ZXJ0ZXIiLCAiQ3JlYXRvcnMiLCAiQ29udmVydGVyIiwgIkNvbXByZXNzZWROZnRNZXRhZGF0YSIsICJDb252ZXJ0ZXIiLCAiUm95YWx0eSIsICJDb252ZXJ0ZXIiLCAiTmZ0IiwgIkNvbnZlcnRlciIsICJNZW1vIiwgIkNvbnZlcnRlciIsICJNaW50IiwgIkNvbnZlcnRlciIsICJSZWd1bGFyTmZ0TWV0YWRhdGEiLCAiQ29udmVydGVyIiwgIlByb3BlcnRpZXMiLCAiQ29udmVydGVyIiwgIlVzZXMiLCAiQ29udmVydGVyIiwgIlRva2VuTWV0YWRhdGEiLCAiQ29udmVydGVyIiwgIlRyYW5zZmVyQ2hlY2tlZCIsICJDb252ZXJ0ZXIiLCAiVHJhbnNmZXIiLCAiQ29udmVydGVyIiwgIlZhbGlkYXRvciIsICJNZXNzYWdlIiwgIkNvbnZlcnRlciIsICJEYXNBcGkiLCAiRGFzQXBpIiwgIkNvbnZlcnRlciIsICJEYXNBcGkiXQp9Cg== \ No newline at end of file diff --git a/packages/global/dist/index.js b/packages/global/dist/index.js index a09ce4734..89d705cda 100644 --- a/packages/global/dist/index.js +++ b/packages/global/dist/index.js @@ -25,7 +25,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge // src/index.ts var import_web39 = require("@solana/web3.js"); -// ../shared/src/constants.ts +// ../suite-utils/src/constants.ts var import_web3 = require("@solana/web3.js"); var import_load = __toESM(require("@solana-suite/config/load")); var Config = import_load.default; @@ -236,56 +236,6 @@ var TransactionBuilder; TransactionBuilder7.Common = Common2; })(TransactionBuilder || (TransactionBuilder = {})); -// ../shared/src/shared.ts -var overwriteObject = (object, targets) => { - const that = object; - targets.forEach((target) => { - delete that[target.existsKey]; - that[target.will.key] = target.will.value; - }); - return that; -}; -var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { - if (Constants.isDebugging === "true" || process.env.DEBUG === "true") { - console.log("[DEBUG]", data1, data2, data3, data4); - } -}; -var sleep = async (sec) => { - return new Promise((r) => setTimeout(r, sec * 1e3)); -}; -var isPromise = (obj) => { - return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; -}; -function Try(input, finallyInput) { - try { - const v = input(); - if (isPromise(v)) { - return v.then( - (x) => Result2.ok(x), - (err) => Result2.err(err) - ); - } else { - return Result2.ok(v); - } - } catch (e) { - if (e instanceof Error) { - return Result2.err(e); - } - return Result2.err(Error(e)); - } finally { - if (finallyInput) { - debugLog("# finally input:", finallyInput); - finallyInput(); - } - } -} -var convertTimestampToDateTime = (created_at) => { - if (created_at) { - return new Date(created_at * 1e3); - } - return; -}; - // ../transaction-builder/src/batch.ts var TransactionBuilder2; ((TransactionBuilder7) => { @@ -461,12 +411,62 @@ var TransactionBuilder6 = { ...TransactionBuilder4 }; -// ../shared/src/result.ts +// ../suite-utils/src/shared.ts +var overwriteObject = (object, targets) => { + const that = object; + targets.forEach((target) => { + delete that[target.existsKey]; + that[target.will.key] = target.will.value; + }); + return that; +}; +var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { + if (Constants.isDebugging === "true" || process.env.DEBUG === "true") { + console.log("[DEBUG]", data1, data2, data3, data4); + } +}; +var sleep = async (sec) => { + return new Promise((r) => setTimeout(r, sec * 1e3)); +}; +var isPromise = (obj) => { + return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; +}; +function Try(input, finallyInput) { + try { + const v = input(); + if (isPromise(v)) { + return v.then( + (x) => Result5.ok(x), + (err) => Result5.err(err) + ); + } else { + return Result5.ok(v); + } + } catch (e) { + if (e instanceof Error) { + return Result5.err(e); + } + return Result5.err(Error(e)); + } finally { + if (finallyInput) { + debugLog("# finally input:", finallyInput); + finallyInput(); + } + } +} +var convertTimestampToDateTime = (created_at) => { + if (created_at) { + return new Date(created_at * 1e3); + } + return; +}; + +// ../suite-utils/src/result.ts var AbstractResult = class { unwrap(ok, err) { const r = this._chain( - (value) => Result2.ok(ok ? ok(value) : value), - (error) => err ? Result2.ok(err(error)) : Result2.err(error) + (value) => Result5.ok(ok ? ok(value) : value), + (error) => err ? Result5.ok(err(error)) : Result5.err(error) ); if (r.isErr) { throw r.error; @@ -475,17 +475,17 @@ var AbstractResult = class { } map(ok, err) { return this._chain( - (value) => Result2.ok(ok(value)), - (error) => Result2.err(err ? err(error) : error) + (value) => Result5.ok(ok(value)), + (error) => Result5.err(err ? err(error) : error) ); } chain(ok, err) { - return this._chain(ok, err || ((error) => Result2.err(error))); + return this._chain(ok, err || ((error) => Result5.err(error))); } match(ok, err) { this._chain( - (value) => Result2.ok(ok(value)), - (error) => Result2.err(err(error)) + (value) => Result5.ok(ok(value)), + (error) => Result5.err(err(error)) ); } /// single TransactionBuilder //// @@ -507,7 +507,7 @@ var AbstractResult = class { } ); if (res.isErr) { - return Result2.err(res.error); + return Result5.err(res.error); } return res.value; } @@ -542,7 +542,7 @@ Array.prototype.submit = async function(feePayer) { } else if (obj.isOk) { instructions.push(obj.value); } else { - return Result2.err(Error("Only Array Instruction object")); + return Result5.err(Error("Only Array Instruction object")); } } debugLog("# Result batch submit: ", instructions); @@ -572,16 +572,16 @@ var InternalErr = class extends AbstractResult { return err(this.error); } }; -var Result2; -((Result7) => { +var Result5; +((Result8) => { function ok(value) { return new InternalOk(value); } - Result7.ok = ok; + Result8.ok = ok; function err(error) { return new InternalErr(error || Error()); } - Result7.err = err; + Result8.err = err; function all(obj) { if (Array.isArray(obj)) { const resArr = []; @@ -591,7 +591,7 @@ var Result2; } resArr.push(item.value); } - return Result7.ok(resArr); + return Result8.ok(resArr); } const res = {}; const keys = Object.keys(obj); @@ -602,10 +602,10 @@ var Result2; } res[key] = item.value; } - return Result7.ok(res); + return Result8.ok(res); } - Result7.all = all; -})(Result2 || (Result2 = {})); + Result8.all = all; +})(Result5 || (Result5 = {})); // ../account/src/associated.ts var import_spl_token = require("@solana/spl-token"); @@ -1440,7 +1440,7 @@ var Node; signature }, commitment - ).then(Result2.ok).catch(Result2.err); + ).then(Result5.ok).catch(Result5.err); }; })(Node || (Node = {})); @@ -1510,4 +1510,4 @@ Number.prototype.toSol = function() { Number.prototype.toLamports = function() { return (0, import_bignumber.BigNumber)(this).times(import_web39.LAMPORTS_PER_SOL).toNumber(); }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uLy4uL3NoYXJlZC9zcmMvY29uc3RhbnRzLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2JhdGNoLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2NvbW1vbi50cyIsICIuLi8uLi9zaGFyZWQvc3JjL3NoYXJlZC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9taW50LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL3BhcnRpYWwtc2lnbi50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jYWxjdWxhdGUtdHhzaXplLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3NoYXJlZC9zcmMvcmVzdWx0LnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2Fzc29jaWF0ZWQudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMva2V5cGFpci50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9wZGEudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvaW5kZXgudHMiLCAiLi4vLi4vY29udmVydGVyL3NyYy9jb2xsZWN0aW9uLnRzIiwgIi4uLy4uL2NvbnZlcnRlci9zcmMvY3JlYXRvcnMudHMiLCAiLi4vLi4vY29udmVydGVyL3NyYy9jb21wcmVzc2VkLW5mdC1tZXRhZGF0YS50cyIsICIuLi8uLi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udjogc3RyaW5nKTogc3RyaW5nID0+IHtcbiAgICBzd2l0Y2ggKGVudikge1xuICAgICAgY2FzZSBDb25zdGFudHMuQ2x1c3Rlci5wcmQ6IHtcbiAgICAgICAgY29uc3QgdXJscyA9IENvbnN0YW50cy5CdW5kbHJVcmwucHJkLnNwbGl0KCcsJyk7XG4gICAgICAgIGNvbnN0IGluZGV4ID0gRGF0ZS5ub3coKSAlIHVybHMubGVuZ3RoO1xuICAgICAgICByZXR1cm4gdXJsc1tpbmRleF07XG4gICAgICB9XG4gICAgICBkZWZhdWx0OiB7XG4gICAgICAgIHJldHVybiBDb25zdGFudHMuQnVuZGxyVXJsLmRldjtcbiAgICAgIH1cbiAgICB9XG4gIH07XG5cbiAgZXhwb3J0IGNvbnN0IHN3aXRjaERhc0FwaSA9IChlbnY6IHN0cmluZyk6IHN0cmluZyA9PiB7XG4gICAgc3dpdGNoIChlbnYpIHtcbiAgICAgIGNhc2UgQ29uc3RhbnRzLkNsdXN0ZXIucHJkOiB7XG4gICAgICAgIGlmIChkYXNBcGlVcmwubGVuZ3RoIDwgMSkge1xuICAgICAgICAgIHRocm93IEVycm9yKENvbnN0YW50cy5XYXJubmluZ01lc3NhZ2UuREFTX0FQSV9VUkwpO1xuICAgICAgICB9XG4gICAgICAgIGNvbnN0IHVybHMgPSBDb25zdGFudHMuQnVuZGxyVXJsLnByZC5zcGxpdCgnLCcpO1xuICAgICAgICBjb25zdCBpbmRleCA9IERhdGUubm93KCkgJSB1cmxzLmxlbmd0aDtcbiAgICAgICAgcmV0dXJuIHVybHNbaW5kZXhdO1xuICAgICAgfVxuICAgICAgZGVmYXVsdDoge1xuICAgICAgICBjb25zdCB1cmxzID0gQ29uc3RhbnRzLkRhc0FwaVVybC5kZXYuc3BsaXQoJywnKTtcbiAgICAgICAgY29uc3QgaW5kZXggPSBEYXRlLm5vdygpICUgdXJscy5sZW5ndGg7XG4gICAgICAgIHJldHVybiB1cmxzW2luZGV4XTtcbiAgICAgIH1cbiAgIC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cnQgY29uc3QgcmV0cnlHZXRPckNyZWF0ZSA9IGFzeW5jIChcbiAgICAgIG1pbnQ6IFB1YmtleSxcbiAgICAgIG93bmVyOiBQdWJrZXksXG4gICAgICBmZWVQYXllcjogU2VjcmV0LFxuICAgICk6IFByb21pc2U8c3RyaW5nPiA9PiB7XG4gICAgICBsZXQgY291bnRlciA9IDE7XG4gICAgICB3aGlsZSAoY291bnRlciA8IFJFVFJZX09WRVJfTElNSVQpIHtcbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICBjb25zdCBpbnN0ID0gYXdhaXQgZ2V0KG1pbnQsIG93bmVyLCBmZWVQYXllciwgdHJ1ZSk7XG5cbiAgICAgICAgICBpZiAoaW5zdCAmJiB0eXBlb2YgaW5zdCA9PT0gJ3N0cmluZycpIHtcbiAgICAgICAgICAgIGRlYnVnTG9nKCcjIGFzc29jaWF0ZWRUb2tlbkFjY291bnQ6ICcsIGluc3QpO1xuICAgICAgICAgICAgcmV0dXJuIGluc3Q7XG4gICAgICAgICAgfSBlbHNlIGlmIChpbnN0IGluc3RhbmNlb2YgVHJhbnNhY3Rpb25CdWlsZGVyLkNvbW1vbikge1xuICAgICAgICAgICAgKGF3YWl0IGluc3Quc3VibWl0KCkpLm1hcChcbiAgICAgICAgICAgICAgYXN5bmMgKG9rOiBzdHJpbmcpID0+IHtcbiAgICAgICAgICAgICAgICBhd2FpdCBOb2RlLmNvbmZpcm1lZFNpZyhvayk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGluc3QuZGF0YTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgKGVycjogRXJyb3IpID0+IHtcbiAgICAgICAgICAgICAgICBkZWJ1Z0xvZygnIyBFcnJvciBzdWJtaXQgcmV0cnlHZXRPckNyZWF0ZTogJywgZXJyKTtcbiAgICAgICAgICAgICAgICB0aHJvdyBlcnI7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgfSBj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biAgICAgIGNvbnN0IGFzc29jaWF0ZWRUb2tlbkFjY291bnQgPSBnZXRBc3NvY2lhdGVkVG9rZW5BZGRyZXNzU3luYyhcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICBhbGxvd093bmVyT2ZmQ3VydmUsXG4gICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGFzc29jaWF0ZWRUb2tlbkFjY291bnQ6ICcsIGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSk7XG5cbiAgICAgIHRyeSB7XG4gICAgICAgIC8vIERvbnQgdXNlIFJlc3VsdFxuICAgICAgICBhd2FpdCBnZXRBY2NvdW50KFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCkuY29tbWl0bWVudCxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3Q6IHVuZGVmaW5lZCxcbiAgICAgICAgfTtcbiAgICAgIH0gY2F0Y2ggKGVycm9yOiB1bmtub3duKSB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5BY2NvdW50Tm90Rm91bmRFcnJvcikgJiZcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5JbnZhbGlkQWNjb3VudE93bmVyRXJyb3IpXG4gICAgICAgICkge1xuICAgICAgICAgIHRocm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Qcm9wZXJ0aWVzPiA9PiB7XG4gICAgICBpZiAoIWlucHV0IHx8ICFpbnB1dC5maWxlcykge1xuICAgICAgICByZXR1cm4ge307XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGZpbGVzID0gYXdhaXQgUHJvbWlzZS5hbGwoXG4gICAgICAgIGlucHV0LmZpbGVzLm1hcChhc3luYyAoZmlsZSkgPT4ge1xuICAgICAgICAgIGlmICghZmlsZS5maWxlUGF0aCkge1xuICAgICAgICAgICAgcmV0dXJuIHt9O1xuICAgICAgICAgIH1cbiAgICAgICAgICBjb25zdCByZXMgPSBhd2FpdCBjYWxsYmFja0Z1bmMoZmlsZS5maWxlUGF0aCwgc3RvcmFnZVR5cGUsIGZlZVBheWVyKTtcbiAgICAgICAgICBpZiAocmVzLmlzRXJyKSB7XG4gICAgICAgICAgICB0aHJvdyBFcnJvcihyZXMuZXJyb3IubWVzc2FnZSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBvdmVyd3JpdGVPYmplY3QoZmlsZSwgW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBleGlzdHNLZXk6ICdmaWxlUGF0aCcsXG4gICAgICAgICAgICAgIHdpbGw6IHsga2V5OiAndXJpJywgdmFsdWU6IHJlcy52YWx1ZSB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICBdKTtcbiAgICAgICAgfSksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHsgLi4uaW5wdXQsIGZpbGVzIH0gYXMgUHJvcGVydGllcztcbiAgICB9O1xuICB9XG59XG4iLCAiLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLXVudXNlZC12YXJzICovXG5pbXBvcnQgeyBPcHRpb24sIFVzZXMgfSBmcm9tICd+L3R5cGVzL3JlZ3VsYXItbmZ0JztcblxuZXhwb3J0IG5hbWVzcGFjZSBDb252ZXJ0ZXIge1xuICBleHBvcnQgbmFtZXNwYWNlIFVzZXMge1xuICAgIGV4cG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WV0YSxcbiAgICAgIG1hcHBpbmdUb2tlbkFjY291bnQ/OiBQb3N0VG9rZW5BY2NvdW50W10sXG4gICAgKTogSGlzdG9yeSB8IHVuZGVmaW5lZCA9PiB7XG4gICAgICBjb25zdCBoaXN0b3J5OiBIaXN0b3J5ID0ge307XG5cbiAgICAgIGlmIChtYXBwaW5nVG9rZW5BY2NvdW50KSB7XG4gICAgICAgIGNvbnN0IGZvdW5kU291cmNlID0gbWFwcGluZ1Rva2VuQWNjb3VudC5maW5kKFxuICAgICAgICAgIChtKSA9PiBtLmFjY291bnQgPT09IG91dHB1dC5wYXJzZWQuaW5mby5zb3VyY2UsXG4gICAgICAgICk7XG4gICAgICAgIGNvbnN0IGZvdW5kRGVzdCA9IG1hcHBpbmdUb2tlbkFjY291bnQuZmluZChcbiAgICAgICAgICAobSkgPT4gbS5hY2NvdW50ID09PSBvdXRwdXQucGFyc2VkLmluZm8uZGVzdGluYXRpb24sXG4gICAgICAgICk7XG4gICAgICAgIGZvdW5kU291cmNlICYmIChoaXN0b3J5LnNvdXJjZSA9IGZvdW5kU291cmNlLm93bmVyKTtcbiAgICAgICAgZm91bmREZXN0ICYmIChoaXN0b3J5LmRlc3RpbmF0aW9uID0gZm91bmREZXN0Lm93bmVyKTtcbiAgICAgIH1cblxuICAgICAgaGlzdG9yeS50b2tlbkFtb3VudCA9IG91dHB1dC5wYXJzZWQuaW5mby50b2tlbkFtb3VudDtcbiAgICAgIGhpc3RvcnkubWludCA9IG91dHB1dC5wYXJzZWQuaW5mby5taW50O1xuICAgICAgaGlzdG9yeS5tdWx0aXNpZ0F1dGhvcml0eSA9IG91dHB1dC5wYXJzZWQuaW5mby5tdWx0aXNpZ0F1dGhvcml0eTtcbiAgICAgIGhpc3Rvcnkuc2lnbmVycyA9IG91dHB1dC5wYXJzZWQuaW5mby5zaWduZXJzO1xuICAgICAgaGlzdG9yeS50eXBlID0gb3V0cHV0LnByb2dyYW07XG4gICAgICBoaXN0b3J5LmRhdGVUaW1l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tZXRhZGF0YS5pbWFnZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc0ltYWdlVXJsKG1ldGFkYXRhLmltYWdlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3JveWFsdHknOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5yb3lhbHR5KSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzUm95YWx0eShtZXRhZGF0YS5yb3lhbHR5KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlcl9mZWVfYmFzaXNfcG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJGZWVCYXNpc1BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0YWRhdGEubmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzeW1ib2wnOlxuICAgICAgIC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AgICAgICBpZiAoIWEuaW5zdHJ1Y3Rpb25zICYmICFhLnNpZ25lcnMpIHtcbiAgICAgICAgICAgIHRocm93IEVycm9yKFxuICAgICAgICAgICAgICBgb25seSBJbnN0cnVjdGlvbiBvYmplY3QgdGhhdCBjYW4gdXNlIGJhdGNoU3VibWl0KCkuXG4gICAgICAgICAgICBJbmRleDogJHtpfSwgU2V0IHZhbHVlOiAke0pTT04uc3RyaW5naWZ5KGEpfWAsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICBpKys7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBpbnN0cnVjdGlvbnMgPSBhcnIuZmxhdE1hcCgoYSkgPT4gYS5pbnN0cnVjdGlvbnMpO1xuICAgICAgICBjb25zdCBzaWduZXJzID0gYXJyLmZsYXRNYXAoKGEpID0+IGEuc2lnbmVycyk7XG4gICAgICAgIGNvbnN0IGZlZVBheWVycyA9IGFyci5maWx0ZXIoKGEpID0+IGEuZmVlUGF5ZXIgIT09IHVuZGVmaW5lZCk7XG4gICAgICAgIGxldCBmZWVQYXllciA9IHNpZ25lcnNbMF07XG4gICAgICAgIGlmIChmZWVQYXllcnMubGVuZ3RoID4gMCAmJiBmZWVQYXllcnNbMF0uZmVlUGF5ZXIpIHtcbiAgICAgICAgICBmZWVQYXllciA9IGZlZVBheWVyc1swXS5mZWVQYXllcjtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHRyYW5zYWN0aW9uID0gbmV3IFRyYW5zYWN0aW9uKCk7XG4gICAgICAgIGxldCBmaW5hbFNpZ25lcnMgPSBzaWduZXJzO1xuICAgICAgICBpZiAoZmVlUGF5ZXIpIHtcbiAgICAgICAgICB0cmFuc2FjdGlvbi5mZWVQYXllciA9IGZlZVBheWVyLnB1YmxpY0tleTtcbiAgICAgICAgICBmaW5hbFNpZ25lcnMgPSBbZmVlUGF5ZXIsIC4uLnNpZ25lcnNdO1xuICAgICAgICB9XG4gICAgICAgIGluc3RydW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Q3VydmUsXG4gICAgICApO1xuXG4gICAgICBpZiAoIXJlcy5pbnN0KSB7XG4gICAgICAgIHJldHVybiByZXMudG9rZW5BY2NvdW50O1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb248UHVia2V5PihcbiAgICAgICAgW3Jlcy5pbnN0XSxcbiAgICAgICAgW10sXG4gICAgICAgIGZlZVBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICByZXMudG9rZW5BY2NvdW50ISxcbiAgICAgICk7XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIFJldHJ5IGZ1bmN0aW9uIGlmIGNyZWF0ZSBuZXcgdG9rZW4gYWNjb3VpbnRcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBtaW50XG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAgICogQHBhcmFtIHtTZWNyZXR9IGZlZVBheWVyXG4gICAgICogQHJldHVybnMgUHJvbWlzZTxzdHJpbmc+XG4gICAgICovXG4gICAgZXhwb3J0IGNvbnN0IHJldHJ5R2V0T3JDcmVhdGUgPSBhc3luYyAoXG4gICAgICBtaW50OiBQdWJrZXksXG4gICAgICBvd25lcjogUHVia2V5LFxuICAgICAgZmVlUGF5ZXI6IFNlY3JldCxcbiAgICApOiBQcm9taXNlPHN0cmluZz4gPT4ge1xuICAgICAgbGV0IGNvdW50ZXIgPSAxO1xuICAgICAgd2hpbGUgKGNvdW50ZXIgPCBSRVRSWV9PVkVSX0xJTUlUKSB7XG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgY29uc3QgaW5zdCA9IGF3YWl0IGdldChtaW50LCBvd25lciwgZmVlUGF5ZXIsIHRydWUpO1xuXG4gICAgICAgICAgaWYgKGluc3QgJiYgdHlwZW9mIGluc3QgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICBkZWJ1Z0xvZygnIyBhc3NvY2lhdGVkVG9rZW5BY2NvdW50OiAnLCBpbnN0KTtcbiAgICAgICAgICAgIHJldHVybiBpbnN0O1xuICAgICAgICAgIH0gZWxzZSBpZiAoaW5zdCBpbnN0YW5jZW9mIFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb24pIHtcbiAgICAgICAgICAgIChhd2FpdCBpbnN0LnN1Ym1pdCgpKS5tYXAoXG4gICAgICAgICAgICAgIGFzeW5jIChvazogc3RyaW5nKSA9PiB7XG4gICAgICAgICAgICAgICAgYXdhaXQgTm9kZS5jb25maXJtZWRTaWcob2spO1xuICAgICAgICAgICAgICAgIHJldHVybiBpbnN0LmRhdGE7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIChlcnI6IEVycm9yKSA9PiB7XG4gICAgICAgICAgICAgICAgZGVidWdMb2coJyMgRXJyb3Igc3VibWl0IHJldHJ5R2V0T3JDcmVhdGU6ICcsIGVycik7XG4gICAgICAgICAgICAgICAgdGhyb3cgZXJyO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICBkZWJ1Z0xvZyhgIyByZXRyeTogJHtjb3VudGVyfSBjcmVhdGUgdG9rZW4gYWNjb3VudDogYCwgZSk7XG4gICAgICAgICAgZGVidWdMb2coYCMgbWludDogJHttaW50fSwgb3duZXI6ICR7b3duZXJ9LCBmZWVQYXllcjogJHtmZWVQYXllcn1gKTtcbiAgICAgICAgfVxuICAgICAgICBhd2FpdCBzbGVlcChSRVRSWV9TTEVFUF9USU1FKTtcbiAgICAgICAgY291bnRlcisrO1xuICAgICAgfVxuICAgICAgdGhyb3cgRXJyb3IoYHJldHJ5IGFjdGlvbiBpcyBvdmVyIGxpbWl0ICR7UkVUUllfT1ZFUl9MSU1JVH1gKTtcbiAgICB9O1xuXG4gICAgLyoqXG4gICAgICogW01haW4gbG9naWNdR2V0IEFzc29jaWF0ZWQgdG9rZW4gQWNjb3VudC5cbiAgICAgKi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Njb3VudChcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLmNvbW1pdG1lbnQsXG4gICAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICB0b2tlbkFjY291bnQ6IGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSxcbiAgICAgICAgICBpbnN0OiB1bmRlZmluZWQsXG4gICAgICAgIH07XG4gICAgICB9IGNhdGNoIChlcnJvcjogdW5rbm93bikge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuQWNjb3VudE5vdEZvdW5kRXJyb3IpICYmXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuSW52YWxpZEFjY291bnRPd25lckVycm9yKVxuICAgICAgICApIHtcbiAgICAgICAgICB0aHJvdyBFcnJvcignVW5leHBlY3RlZCBlcnJvcicpO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgcGF5ZXIgPSAhZmVlUGF5ZXIgPyBvd25lciA6IGZlZVBheWVyO1xuXG4gICAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVBc3NvY2lhdGVkVG9rZW5BY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgcGF5ZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuXG4gICAgICAgIH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ZXRhZGF0YSAmJiBtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEuc3ltYm9sKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU3ltYm9sKG1ldGFkYXRhLnN5bWJvbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAocmVzICYmIHJlcy5pc0Vycikge1xuICAgICAgICAgIHJlc3VsdHMucHVzaCguLi5yZXMuZXJyb3IuZGV0YWlscyk7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgICAgaWYgKHJlc3VsdHMubGVuZ3RoID4gMCkge1xuICAgICAgICBjb25zdCBtZXNzYWdlID1cbiAgICAgICAgICAnQ2F1Z2h0IGluIHRoZSB2YWxpZGF0aW9uIGVycm9ycy4gc2VlIG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iLCAiVXNlcyIsICJDb252ZXJ0ZXIiLCAiVG9rZW5NZXRhZGF0YSIsICJDb252ZXJ0ZXIiLCAiVHJhbnNmZXJDaGVja2VkIiwgIkNvbnZlcnRlciIsICJUcmFuc2ZlciIsICJDb252ZXJ0ZXIiLCAiVmFsaWRhdG9yIiwgIk1lc3NhZ2UiLCAiQ29udmVydGVyIiwgImltcG9ydF93ZWIzIiwgIk5vZGUiLCAiUmVzdWx0IiwgImltcG9ydF9iczU4IiwgIkFjY291bnQiLCAiYnMiXQp9Cg== \ No newline at end of file diff --git a/packages/global/dist/index.mjs b/packages/global/dist/index.mjs index 0af8aadfa..11d0d1e03 100644 --- a/packages/global/dist/index.mjs +++ b/packages/global/dist/index.mjs @@ -1,7 +1,7 @@ // src/index.ts import { Keypair as Keypair3, LAMPORTS_PER_SOL, PublicKey as PublicKey4 } from "@solana/web3.js"; -// ../shared/src/constants.ts +// ../suite-utils/src/constants.ts import { PublicKey } from "@solana/web3.js"; import SolanaJsonConfig from "@solana-suite/config/load"; var Config = SolanaJsonConfig; @@ -218,56 +218,6 @@ var TransactionBuilder; TransactionBuilder7.Common = Common2; })(TransactionBuilder || (TransactionBuilder = {})); -// ../shared/src/shared.ts -var overwriteObject = (object, targets) => { - const that = object; - targets.forEach((target) => { - delete that[target.existsKey]; - that[target.will.key] = target.will.value; - }); - return that; -}; -var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { - if (Constants.isDebugging === "true" || process.env.DEBUG === "true") { - console.log("[DEBUG]", data1, data2, data3, data4); - } -}; -var sleep = async (sec) => { - return new Promise((r) => setTimeout(r, sec * 1e3)); -}; -var isPromise = (obj) => { - return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; -}; -function Try(input, finallyInput) { - try { - const v = input(); - if (isPromise(v)) { - return v.then( - (x) => Result2.ok(x), - (err) => Result2.err(err) - ); - } else { - return Result2.ok(v); - } - } catch (e) { - if (e instanceof Error) { - return Result2.err(e); - } - return Result2.err(Error(e)); - } finally { - if (finallyInput) { - debugLog("# finally input:", finallyInput); - finallyInput(); - } - } -} -var convertTimestampToDateTime = (created_at) => { - if (created_at) { - return new Date(created_at * 1e3); - } - return; -}; - // ../transaction-builder/src/batch.ts var TransactionBuilder2; ((TransactionBuilder7) => { @@ -448,12 +398,62 @@ var TransactionBuilder6 = { ...TransactionBuilder4 }; -// ../shared/src/result.ts +// ../suite-utils/src/shared.ts +var overwriteObject = (object, targets) => { + const that = object; + targets.forEach((target) => { + delete that[target.existsKey]; + that[target.will.key] = target.will.value; + }); + return that; +}; +var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { + if (Constants.isDebugging === "true" || process.env.DEBUG === "true") { + console.log("[DEBUG]", data1, data2, data3, data4); + } +}; +var sleep = async (sec) => { + return new Promise((r) => setTimeout(r, sec * 1e3)); +}; +var isPromise = (obj) => { + return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; +}; +function Try(input, finallyInput) { + try { + const v = input(); + if (isPromise(v)) { + return v.then( + (x) => Result5.ok(x), + (err) => Result5.err(err) + ); + } else { + return Result5.ok(v); + } + } catch (e) { + if (e instanceof Error) { + return Result5.err(e); + } + return Result5.err(Error(e)); + } finally { + if (finallyInput) { + debugLog("# finally input:", finallyInput); + finallyInput(); + } + } +} +var convertTimestampToDateTime = (created_at) => { + if (created_at) { + return new Date(created_at * 1e3); + } + return; +}; + +// ../suite-utils/src/result.ts var AbstractResult = class { unwrap(ok, err) { const r = this._chain( - (value) => Result2.ok(ok ? ok(value) : value), - (error) => err ? Result2.ok(err(error)) : Result2.err(error) + (value) => Result5.ok(ok ? ok(value) : value), + (error) => err ? Result5.ok(err(error)) : Result5.err(error) ); if (r.isErr) { throw r.error; @@ -462,17 +462,17 @@ var AbstractResult = class { } map(ok, err) { return this._chain( - (value) => Result2.ok(ok(value)), - (error) => Result2.err(err ? err(error) : error) + (value) => Result5.ok(ok(value)), + (error) => Result5.err(err ? err(error) : error) ); } chain(ok, err) { - return this._chain(ok, err || ((error) => Result2.err(error))); + return this._chain(ok, err || ((error) => Result5.err(error))); } match(ok, err) { this._chain( - (value) => Result2.ok(ok(value)), - (error) => Result2.err(err(error)) + (value) => Result5.ok(ok(value)), + (error) => Result5.err(err(error)) ); } /// single TransactionBuilder //// @@ -494,7 +494,7 @@ var AbstractResult = class { } ); if (res.isErr) { - return Result2.err(res.error); + return Result5.err(res.error); } return res.value; } @@ -529,7 +529,7 @@ Array.prototype.submit = async function(feePayer) { } else if (obj.isOk) { instructions.push(obj.value); } else { - return Result2.err(Error("Only Array Instruction object")); + return Result5.err(Error("Only Array Instruction object")); } } debugLog("# Result batch submit: ", instructions); @@ -559,16 +559,16 @@ var InternalErr = class extends AbstractResult { return err(this.error); } }; -var Result2; -((Result7) => { +var Result5; +((Result8) => { function ok(value) { return new InternalOk(value); } - Result7.ok = ok; + Result8.ok = ok; function err(error) { return new InternalErr(error || Error()); } - Result7.err = err; + Result8.err = err; function all(obj) { if (Array.isArray(obj)) { const resArr = []; @@ -578,7 +578,7 @@ var Result2; } resArr.push(item.value); } - return Result7.ok(resArr); + return Result8.ok(resArr); } const res = {}; const keys = Object.keys(obj); @@ -589,10 +589,10 @@ var Result2; } res[key] = item.value; } - return Result7.ok(res); + return Result8.ok(res); } - Result7.all = all; -})(Result2 || (Result2 = {})); + Result8.all = all; +})(Result5 || (Result5 = {})); // ../account/src/associated.ts import { @@ -1438,7 +1438,7 @@ var Node; signature }, commitment - ).then(Result2.ok).catch(Result2.err); + ).then(Result5.ok).catch(Result5.err); }; })(Node || (Node = {})); @@ -1508,4 +1508,4 @@ Number.prototype.toSol = function() { Number.prototype.toLamports = function() { return BigNumber(this).times(LAMPORTS_PER_SOL).toNumber(); }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uLy4uL3NoYXJlZC9zcmMvY29uc3RhbnRzLnRzIiwgIi4uLy4uL3RyYW5zYW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gZ2V0KG1pbnQsIG93bmVyLCBmZWVQYXllciwgdHJ1ZSk7XG5cbiAgICAgICAgICBpZiAoaW5zdCAmJiB0eXBlb2YgaW5zdCA9PT0gJ3N0cmluZycpIHtcbiAgICAgICAgICAgIGRlYnVnTG9nKCcjIGFzc29jaWF0ZWRUb2tlbkFjY291bnQ6ICcsIGluc3QpO1xuICAgICAgICAgICAgcmV0dXJuIGluc3Q7XG4gICAgICAgICAgfSBlbHNlIGlmIChpbnN0IGluc3RhbmNlb2YgVHJhbnNhY3Rpb25CdWlsZGVyLkNvbW1vbikge1xuICAgICAgICAgICAgKGF3YWl0IGluc3Quc3VibWl0KCkpLm1hcChcbiAgICAgICAgICAgICAgYXN5bmMgKG9rOiBzdHJpbmcpID0+IHtcbiAgICAgICAgICAgICAgICBhd2FpdCBOb2RlLmNvbmZpcm1lZFNpZyhvayk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGluc3QuZGF0YTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgKGVycjogRXJyb3IpID0+IHtcbiAgICAgICAgICAgICAgICBkZWJ1Z0xvZygnIyBFcnJvciBzdWJtaXQgcmV0cnlHZXRPckNyZWF0ZTogJywgZXJyKTtcbiAgICAgICAgICAgICAgICB0aHJvdyBlcnI7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgIGRlYnVnTG9nKGAjIHJldHJ5OiAke2NvdW50ZXJ9IGNyZWF0ZSB0b2tlbiBhY2NvdW50OiBgLCBlKTtcbiAgICAgICAgICBkZWJ1Z0xvZyhgIyBtaW50OiAke21pbnR9LCBvd25lcjogJHtvd25lcn0sIGZlZVBheWVyOiAke2ZlZVBheWVyfWApO1xuICAgICAgICB9XG4gICAgICAgIGF3YWl0IHNsZWVwKFJFVFJZX1NMRUVQX1RJTUUpO1xuICAgICAgICBjb3VudGVyKys7XG4gICAgICB9XG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TG9nKCcjIGFzc29jaWF0ZWRUb2tlbkFjY291bnQ6ICcsIGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSk7XG5cbiAgICAgIHRyeSB7XG4gICAgICAgIC8vIERvbnQgdXNlIFJlc3VsdFxuICAgICAgICBhd2FpdCBnZXRBY2NvdW50KFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCkuY29tbWl0bWVudCxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3Q6IHVuZGVmaW5lZCxcbiAgICAgICAgfTtcbiAgICAgIH0gY2F0Y2ggKGVycm9yOiB1bmtub3duKSB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5BY2NvdW50Tm90Rm91bmRFcnJvcikgJiZcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5JbnZhbGlkQWNjb3VudE93bmVyRXJyb3IpXG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9yKCdVbmV4cGVjdGVkIGVycm9yJyk7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBwYXllciA9ICFmZWVQYXllciA/IG93bmVyIDogZmVlUGF5ZXI7XG5cbiAgICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgICBwYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgb3duZXIudG9QdWJ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gIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlcl9mZWVfYmFzaXNfcG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJGZWVCYXNpc1BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0YWRhdGEubmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzeW1ib2wnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLnN5bWJvbCkge1xuICAgICAgICAgICAgICByZXMgPSBpc1N5bWJvbChtZXRhZGF0YS5zeW1ib2wpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHJlcyAmJiByZXMuaXNFcnIpIHtcbiAgICAgICAgICByZXN1bHRzLnB1c2goLi4ucmVzLmVycm9yLmRldGFpbHMpO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIGlmIChyZXN1bHRzLmxlbmd0aC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KFxuICAgICAgICBtaW50LFxuICAgICAgICBvd25lcixcbiAgICAgICAgbmV3IEtleXBhaXIuS2V5cGFpcih7IHNlY3JldDogZmVlUGF5ZXIgfSkucHVia2V5LFxuICAgICAgICBhbGxvd093bmVyT2ZmQ3VydmUsXG4gICAgICApO1xuXG4gICAgICBpZiAoIXJlcy5pbnN0KSB7XG4gICAgICAgIHJldHVybiByZXMudG9rZW5BY2NvdW50O1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb248UHVia2V5PihcbiAgICAgICAgW3Jlcy5pbnN0XSxcbiAgICAgICAgW10sXG4gICAgICAgIGZlZVBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICByZXMudG9rZW5BY2NvdW50ISxcbiAgICAgICk7XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIFJldHJ5IGZ1bmN0aW9uIGlmIGNyZWF0ZSBuZXcgdG9rZW4gYWNjb3VpbnRcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBtaW50XG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAgICogQHBhcmFtIHtTZWNyZXR9IGZlZVBheWVyXG4gICAgICogQHJldHVybnMgUHJvbWlzZTxzdHJpbmc+XG4gICAgICovXG4gICAgZXhwb3J0IGNvbnN0IHJldHJ5R2V0T3JDcmVhdGUgPSBhc3luYyAoXG4gICAgICBtaW50OiBQdWJrZXksXG4gICAgICBvd25lcjogUHVia2V5LFxuICAgICAgZmVlUGF5ZXI6IFNlY3JldCxcbiAgICApOiBQcm9taXNlPHN0cmluZz4gPT4ge1xuICAgICAgbGV0IGNvdW50ZXIgPSAxO1xuICAgICAgd2hpbGUgKGNvdW50ZXIgPCBSRVRSWV9PVkVSX0xJTUlUKSB7XG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgY29uc3QgaW5zdCA9IGF3YWl0IGdldChtaW50LCBvd25lciwgZmVlUGF5ZXIsIHRydWUpO1xuXG4gICAgICAgICAgaWYgKGluc3QgJiYgdHlwZW9mIGluc3QgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICBkZWJ1Z0xvZygnIyBhc3NvY2lhdGVkVG9rZW5BY2NvdW50OiAnLCBpbnN0KTtcbiAgICAgICAgICAgIHJldHVybiBpbnN0O1xuICAgICAgICAgIH0gZWxzZSBpZiAoaW5zdCBpbnN0YW5jZW9mIFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb24pIHtcbiAgICAgICAgICAgIChhd2FpdCBpbnN0LnN1Ym1pdCgpKS5tYXAoXG4gICAgICAgICAgICAgIGFzeW5jIChvazogc3RyaW5nKSA9PiB7XG4gICAgICAgICAgICAgICAgYXdhaXQgTm9kZS5jb25maXJtZWRTaWcob2spO1xuICAgICAgICAgICAgICAgIHJldHVybiBpbnN0LmRhdGE7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIChlcnI6IEVycm9yKSA9PiB7XG4gICAgICAgICAgICAgICAgZGVidWdMb2coJyMgRXJyb3Igc3VibWl0IHJldHJ5R2V0T3JDcmVhdGU6ICcsIGVycik7XG4gICAgICAgICAgICAgICAgdGhyb3cgZXJyO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICBkZWJ1Z0xvZyhgIyByZXRyeTogJHtjb3VudGVyfSBjcmVhdGUgdG9rZW4gYWNjb3VudDogYCwgZSk7XG4gICAgICAgICAgZGVidWdMb2coYCMgbWludDogJHttaW50fSwgb3duZXI6ICR7b3duZXJ9LCBmZWVQYXllcjogJHtmZWVQYXllcn1gKTtcbiAgICAgICAgfVxuICAgICAgICBhd2FpdCBzbGVlcChSRVRSWV9TTEVFUF9USU1FKTtcbiAgICAgICAgY291bnRlcisrO1xuICAgICAgfVxuICAgICAgdGhyb3cgRXJyb3IoYHJldHJ5IGFjdGlvbiBpcyBvdmVy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vdW50OiAnLCBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCkpO1xuXG4gICAgICB0cnkge1xuICAgICAgICAvLyBEb250IHVzZSBSZXN1bHRcbiAgICAgICAgYXdhaXQgZ2V0QWNjb3VudChcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLmNvbW1pdG1lbnQsXG4gICAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICB0b2tlbkFjY291bnQ6IGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSxcbiAgICAgICAgICBpbnN0OiB1bmRlZmluZWQsXG4gICAgICAgIH07XG4gICAgICB9IGNhdGNoIChlcnJvcjogdW5rbm93bikge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuQWNjb3VudE5vdEZvdW5kRXJyb3IpICYmXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuSW52YWxpZEFjY291bnRPd25lckVycm9yKVxuICAgICAgICApIHtcbiAgICAgICAgICB0aHJvdyBFcnJvcignVW5leHBlY3RlZCBlcnJvcicpO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgcGF5ZXIgPSAhZmVlUGF5ZXIgPyBvd25lciA6IGZlZVBheWVyO1xuXG4gICAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVBc3NvY2lhdGVkVG9rZW5BY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgcGF5ZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdCxcbiAgICAgICAgfTtcbiAgICAgIH1cbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHsgS2V5cGFpciBhcyBPcmlnaW5hbCwgUHVibGljS2V5IH0gZnJvbSAnQHNvbGFuYS93ZWIzLmpzJztcbmltcG9ydCB7IFB1YmtleSwgU2VjcmV0IH0gZnJvbSAnfi90eXBlcy9hY2NvdW50JztcbmltcG9ydCBicyBmcm9tICdiczU4JztcblxuZXhwb3J0IG5hbWVzcGFjZSBBY2NvdW50IHtcbiAgZXhwb3J0IGNsYXNzIEtleXBhaXIge1xuICAgIHNlY3JldDogU2VjcmV0O1xuICAgIHB1YmtleTogUHVia2V5O1xuXG4gICAgY29uc3RydWN0b3IocGFyYW1zOiB7IHB1YmtleT86IFB1YmtleTsgc2VjcmV0OiBTZWNyZXQgfSkge1xuICAgICAgaWYgKCFwYXJhbXMucHVia2V5KSB7XG4gICAgICAgIGNvbnN0IGtleXBhaXIgPSBwYXJhbXMuc2VjcmV0LnRvS2V5cGFpcigpO1xuICAgICAgICB0aGlzLnB1YmtleSA9IGtleXBhaXIucHVibGljS2V5LnRvU3RyaW5nKCk7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICB0aGlzLnB1YmtleSA9IHBhcmFtcy5wdWJrZXk7XG4gICAgICB9XG4gICAgICB0aGlzLnNlY3JldCA9IHBhcmFtcy5zZWNyZXQ7XG4gICAgfVxuXG4gICAgdG9QdWJsaWNLZXkoKTogUHVibGljS2V5IHtcbiAgICAgIHJldHVybiBuZXcgUHVibGljS2V5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JveWFsdHkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEuc3ltYm9sKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU3ltYm9sKG1ldGFkYXRhLnN5bWJvbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAocmVzICYmIHJlcy5pc0Vycikge1xuICAgICAgICAgIHJlc3VsdHMucHVzaCguLi5yZXMuZXJyb3IuZGV0YWlscyk7XG4gICAgICAgIH1cbiAgICAgIH0pO1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dCIsICJSZXN1bHQiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlB1YmxpY0tleSIsICJBY2NvdW50IiwgIktleXBhaXIiLCAiQWNjb3VudCIsICJBc3NvY2lhdGVkIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJQdWJsaWNLZXkiLCAiQWNjb3VudCIsICJQZGEiLCAiQWNjb3VudCIsICJDb252ZXJ0ZXIiLCAiQ29sbGVjdGlvbiIsICJDb2xsZWN0aW9uTWludCIsICJDb252ZXJ0ZXIiLCAiQ3JlYXRvcnMiLCAiQ29udmVydGVyIiwgIkNvbXByZXNzZWROZnRNZXRhZGF0YSIsICJDb252ZXJ0ZXIiLCAiUm95YWx0eSIsICJDb252ZXJ0ZXIiLCAiTmZ0IiwgIkNvbnZlcnRlciIsICJNZW1vIiwgIkNvbnZlcnRlciIsICJNaW50IiwgIkNvbnZlcnRlciIsICJSZWd1bGFyTmZ0TWV0YWRhdGEiLCAiQ29udmVydGVyIiwgIlByb3BlcnRpZXMiLCAiQ29udmVydGVyIiwgIlVzZXMiLCAiQ29udmVydGVyIiwgIlRva2VuTWV0YWRhdGEiLCAiQ29udmVydGVyIiwgIlRyYW5zZmVyQ2hlY2tlZCIsICJDb252ZXJ0ZXIiLCAiVHJhbnNmZXIiLCAiQ29udmVydGVyIiwgIlZhbGlkYXRvciIsICJNZXNzYWdlIiwgIkNvbnZlcnRlciIsICJOb2RlIiwgIlJlc3VsdCIsICJicyIsICJBY2NvdW50IiwgIlB1YmxpY0tleSIsICJLZXlwYWlyIl0KfQo= \ No newline at end of file diff --git a/packages/global/test/index.test.ts b/packages/global/test/index.test.ts index 301e8f684..c94e3df67 100644 --- a/packages/global/test/index.test.ts +++ b/packages/global/test/index.test.ts @@ -1,6 +1,6 @@ import test from 'ava'; import '../src'; -import { Constants } from '~/shared'; +import { Constants } from '~/suite-utils'; import { Node } from '~/node'; import { Explorer } from '~/types/global'; diff --git a/packages/node/dist/index.js b/packages/node/dist/index.js index cf90bf924..7a82cd568 100644 --- a/packages/node/dist/index.js +++ b/packages/node/dist/index.js @@ -34,7 +34,7 @@ __export(src_exports, { }); module.exports = __toCommonJS(src_exports); -// ../shared/src/constants.ts +// ../suite-utils/src/constants.ts var import_web3 = require("@solana/web3.js"); var import_load = __toESM(require("@solana-suite/config/load")); var Config = import_load.default; @@ -245,56 +245,6 @@ var TransactionBuilder; TransactionBuilder7.Common = Common2; })(TransactionBuilder || (TransactionBuilder = {})); -// ../shared/src/shared.ts -var overwriteObject = (object, targets) => { - const that = object; - targets.forEach((target) => { - delete that[target.existsKey]; - that[target.will.key] = target.will.value; - }); - return that; -}; -var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { - if (Constants.isDebugging === "true" || process.env.DEBUG === "true") { - console.log("[DEBUG]", data1, data2, data3, data4); - } -}; -var sleep = async (sec) => { - return new Promise((r) => setTimeout(r, sec * 1e3)); -}; -var isPromise = (obj) => { - return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; -}; -function Try(input, finallyInput) { - try { - const v = input(); - if (isPromise(v)) { - return v.then( - (x) => Result2.ok(x), - (err) => Result2.err(err) - ); - } else { - return Result2.ok(v); - } - } catch (e) { - if (e instanceof Error) { - return Result2.err(e); - } - return Result2.err(Error(e)); - } finally { - if (finallyInput) { - debugLog("# finally input:", finallyInput); - finallyInput(); - } - } -} -var convertTimestampToDateTime = (created_at) => { - if (created_at) { - return new Date(created_at * 1e3); - } - return; -}; - // ../transaction-builder/src/batch.ts var TransactionBuilder2; ((TransactionBuilder7) => { @@ -749,12 +699,62 @@ var TransactionBuilder6 = { ...TransactionBuilder4 }; -// ../shared/src/result.ts +// ../suite-utils/src/shared.ts +var overwriteObject = (object, targets) => { + const that = object; + targets.forEach((target) => { + delete that[target.existsKey]; + that[target.will.key] = target.will.value; + }); + return that; +}; +var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { + if (Constants.isDebugging === "true" || process.env.DEBUG === "true") { + console.log("[DEBUG]", data1, data2, data3, data4); + } +}; +var sleep = async (sec) => { + return new Promise((r) => setTimeout(r, sec * 1e3)); +}; +var isPromise = (obj) => { + return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; +}; +function Try(input, finallyInput) { + try { + const v = input(); + if (isPromise(v)) { + return v.then( + (x) => Result5.ok(x), + (err) => Result5.err(err) + ); + } else { + return Result5.ok(v); + } + } catch (e) { + if (e instanceof Error) { + return Result5.err(e); + } + return Result5.err(Error(e)); + } finally { + if (finallyInput) { + debugLog("# finally input:", finallyInput); + finallyInput(); + } + } +} +var convertTimestampToDateTime = (created_at) => { + if (created_at) { + return new Date(created_at * 1e3); + } + return; +}; + +// ../suite-utils/src/result.ts var AbstractResult = class { unwrap(ok, err) { const r = this._chain( - (value) => Result2.ok(ok ? ok(value) : value), - (error) => err ? Result2.ok(err(error)) : Result2.err(error) + (value) => Result5.ok(ok ? ok(value) : value), + (error) => err ? Result5.ok(err(error)) : Result5.err(error) ); if (r.isErr) { throw r.error; @@ -763,17 +763,17 @@ var AbstractResult = class { } map(ok, err) { return this._chain( - (value) => Result2.ok(ok(value)), - (error) => Result2.err(err ? err(error) : error) + (value) => Result5.ok(ok(value)), + (error) => Result5.err(err ? err(error) : error) ); } chain(ok, err) { - return this._chain(ok, err || ((error) => Result2.err(error))); + return this._chain(ok, err || ((error) => Result5.err(error))); } match(ok, err) { this._chain( - (value) => Result2.ok(ok(value)), - (error) => Result2.err(err(error)) + (value) => Result5.ok(ok(value)), + (error) => Result5.err(err(error)) ); } /// single TransactionBuilder //// @@ -795,7 +795,7 @@ var AbstractResult = class { } ); if (res.isErr) { - return Result2.err(res.error); + return Result5.err(res.error); } return res.value; } @@ -830,7 +830,7 @@ Array.prototype.submit = async function(feePayer) { } else if (obj.isOk) { instructions.push(obj.value); } else { - return Result2.err(Error("Only Array Instruction object")); + return Result5.err(Error("Only Array Instruction object")); } } debugLog("# Result batch submit: ", instructions); @@ -860,16 +860,16 @@ var InternalErr = class extends AbstractResult { return err(this.error); } }; -var Result2; -((Result7) => { +var Result5; +((Result8) => { function ok(value) { return new InternalOk(value); } - Result7.ok = ok; + Result8.ok = ok; function err(error) { return new InternalErr(error || Error()); } - Result7.err = err; + Result8.err = err; function all(obj) { if (Array.isArray(obj)) { const resArr = []; @@ -879,7 +879,7 @@ var Result2; } resArr.push(item.value); } - return Result7.ok(resArr); + return Result8.ok(resArr); } const res = {}; const keys = Object.keys(obj); @@ -890,10 +890,10 @@ var Result2; } res[key] = item.value; } - return Result7.ok(res); + return Result8.ok(res); } - Result7.all = all; -})(Result2 || (Result2 = {})); + Result8.all = all; +})(Result5 || (Result5 = {})); // ../converter/src/collection.ts var Converter; @@ -1519,11 +1519,11 @@ var Node; signature }, commitment - ).then(Result2.ok).catch(Result2.err); + ).then(Result5.ok).catch(Result5.err); }; })(Node || (Node = {})); // Annotate the CommonJS export names for ESM import in node: 0 && (module.exports = { Node }); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uLy4uL3NoYXJlZC9zcmMvY29uc3RhbnRzLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2JhdGNoLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2NvbW1vbi50cyIsICIuLi8uLi9zaGFyZWQvc3JjL3NoYXJlZC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9taW50LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL3BhcnRpYWwtc2lnbi50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jYWxjdWxhdGUtdHhzaXplLnRzIiwgIi4uLy4uL2dsb2JhbC9zcmMvaW5kZXgudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvYXNzb2NpYXRlZC50cyIsICIuLi8uLi9hY2Nv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DM7XG4gICAgLy9AaW50ZXJuYWxcbiAgICBjb25zdCBnZXQgPSBhc3luYyAoXG4gICAgICBtaW50OiBQdWJrZXksXG4gICAgICBvd25lcjogUHVia2V5LFxuICAgICAgZmVlUGF5ZXI6IFNlY3JldCxcbiAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSA9IGZhbHNlLFxuICAgICk6IFByb21pc2U8c3RyaW5nIHwgQ29tbW9uU3RydWN0dXJlPFB1YmtleT4+ID0+IHtcbiAgICAgIGNvbnN0IHJlcyA9IGF3YWl0IG1ha2VPckNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICBtaW50LFxuICAgICAgICBvd25lcixcbiAgICAgICAgbmV3IEtleXBhaXIuS2V5cGFpcih7IHNlY3JldDogZmVlUGF5ZXIgfSkucHVia2V5LFxuICAgICAgICBhbGxvd093bmVyT2ZmQ3VydmUsXG4gICAgICApO1xuXG4gICAgICBpZiAoIXJlcy5pbnN0KSB7XG4gICAgICAgIHJldHVybiByZXMudG9rZW5BY2NvdW50O1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb248UHVia2V5PihcbiAgICAgICAgW3Jlcy5pbnN0XSxcbiAgICAgICAgW10sXG4gICAgICAgIGZlZVBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICByZXMudG9rZW5BY2NvdW50ISxcbiAgICAgICk7XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIFJldHJ5IGZ1bmN0aW9uIGlmIGNyZWF0ZSBuZXcgdG9rZW4gYWNjb3VpbnRcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBtaW50XG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAgICogQHBhcmFtIHtTZWNyZXR9IGZlZVBheWVyXG4gICAgICogQHJldHVybnMgUHJvbWlzZTxzdHJpbmc+XG4gICAgICovXG4gICAgZXhwb3J0IGNvbnN0IHJldHJ5R2V0T3JDcmVhdGUgPSBhc3luYyAoXG4gICAgICBtaW50OiBQdWJrZXksXG4gICAgICBvd25lcjogUHVia2V5LFxuICAgICAgZmVlUGF5ZXI6IFNlY3JldCxcbiAgICApOiBQcm9taXNlPHN0cmluZz4gPT4ge1xuICAgICAgbGV0IGNvdW50ZXIgPSAxO1xuICAgICAgd2hpbGUgKGNvdW50ZXIgPCBSRVRSWV9PVkVSX0xJTUlUKSB7XG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgY29uc3QgaW5zdCA9IGF3YWl0IGdldChtaW50LCBvd25lciwgZmVlUGF5ZXIsIHRydWUpO1xuXG4gICAgICAgICAgaWYgKGluc3QgJiYgdHlwZW9mIGluc3QgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICBkZWJ1Z0xvZygnIyBhc3NvY2lhdGVkVG9rZW5BY2NvdW50OiAnLCBpbnN0KTtcbiAgICAgICAgICAgIHJldHVybiBpbnN0O1xuICAgICAgICAgIH0gZWxzZSBpZiAoaW5zdCBpbnN0YW5jZW9mIFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb24pIHtcbiAgICAgICAgICAgIChhd2FpdCBpbnN0LnN1Ym1pdCgpKS5tYXAoXG4gICAgICAgICAgICAgIGFzeW5jIChvazogc3RyaW5nKSA9PiB7XG4gICAgICAgICAgICAgICAgYXdhaXQgTm9kZS5jb25maXJtZWRTaWcob2spO1xuICAgICAgICAgICAgICAgIHJldHVybiBpbnN0LmRhdGE7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIChlcnI6IEVycm9yKSA9PiB7XG4gICAgICAgICAgICAgICAgZGVidWdMb2coJyMgRXJyb3Igc3VibWl0IHJldHJ5R2V0T3JDcmVhdGU6ICcsIGVycik7XG4gICAgICAgICAgICAgICAgdGhyb3cgZXJyO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICBkZ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VkVG9rZW5BY2NvdW50ID0gZ2V0QXNzb2NpYXRlZFRva2VuQWRkcmVzc1N5bmMoXG4gICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgYWxsb3dPd25lck9mZkN1cnZlLFxuICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICBBU1NPQ0lBVEVEX1RPS0VOX1BST0dSQU1fSUQsXG4gICAgICApO1xuXG4gICAgICBkZWJ1Z0xvZygnIyBhc3NvY2lhdGVkVG9rZW5BY2NvdW50OiAnLCBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCkpO1xuXG4gICAgICB0cnkge1xuICAgICAgICAvLyBEb250IHVzZSBSZXN1bHRcbiAgICAgICAgYXdhaXQgZ2V0QWNjb3VudChcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLmNvbW1pdG1lbnQsXG4gICAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICB0b2tlbkFjY291bnQ6IGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSxcbiAgICAgICAgICBpbnN0OiB1bmRlZmluZWQsXG4gICAgICAgIH07XG4gICAgICB9IGNhdGNoIChlcnJvcjogdW5rbm93bikge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuQWNjb3VudE5vdEZvdW5kRXJyb3IpICYmXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuSW52YWxpZEFjY291bnRPd25lckVycm9yKVxuICAgICAgICApIHtcbiAgICAgICAgICB0aHJvdyBFcnJvcignVW5leHBlY3R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XNpc19wb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEuc3ltYm9sKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU3ltYm9sKG1ldGFkYXRhLnN5bWJvbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAocmVzICYmIHJlcy5pc0Vycikge1xuICAgICAgICAgIHJlc3VsdHMucHVzaCguLi5yZXMuZXJyb3IuZGV0YWlscyk7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgICAgaWYgKHJlc3VsdHMubGVuZ3RoID4gMCkge1xuICAgICAgICBjb25zdCBtZXNzYWdlID1cbiAgICAgICAgICAnQ2F1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NvbmZpcm1lZFNpZyhvayk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGluc3QuZGF0YTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgKGVycjogRXJyb3IpID0+IHtcbiAgICAgICAgICAgICAgICBkZWJ1Z0xvZygnIyBFcnJvciBzdWJtaXQgcmV0cnlHZXRPckNyZWF0ZTogJywgZXJyKTtcbiAgICAgICAgICAgICAgICB0aHJvdyBlcnI7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgIGRlYnVnTG9nKGAjIHJldHJ5OiAke2NvdW50ZXJ9IGNyZWF0ZSB0b2tlbiBhY2NvdW50OiBgLCBlKTtcbiAgICAgICAgICBkZWJ1Z0xvZyhgIyBtaW50OiAke21pbnR9LCBvd25lcjogJHtvd25lcn0sIGZlZVBheWVyOiAke2ZlZVBheWVyfWApO1xuICAgICAgICB9XG4gICAgICAgIGF3YWl0IHNsZWVwKFJFVFJZX1NMRUVQX1RJTUUpO1xuICAgICAgICBjb3VudGVyKys7XG4gICAgICB9XG4gICAgICB0aHJvdyBFcnJvcihgcmV0cnkgYWN0aW9uIGlzIG92ZXIgbGltaXQgJHtSRVRSWV9PVkVSX0xJTUlUfWApO1xuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiBbTWFpbiBsb2dpY11HZXQgQXNzb2NpYXRlZCB0b2tlbiBBY2NvdW50LlxuICAgICAqIGlmIG5vdCBjcmVhdGVkLCBjcmVhdGUgbmV3IHRva2VuIGFjY291aW50XG4gICAgICpcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gbWludFxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBvd25lclxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBmZWVQYXllclxuICAgICAqIEByZXR1cm5zIFByb21pc2U8c3RyaW5nPlxuICAgICAqL1xuICAgIGV4cG9ydCBjb25zdCBtYWt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jb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3Q6IHVuZGVmaW5lZCxcbiAgICAgICAgfTtcbiAgICAgIH0gY2F0Y2ggKGVycm9yOiB1bmtub3duKSB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5BY2NvdW50Tm90Rm91bmRFcnJvcikgJiZcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5JbnZhbGlkQWNjb3VudE93bmVyRXJyb3IpXG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9yKCdVbmV4cGVjdGVkIGVycm9yJyk7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBwYXllciA9ICFmZWVQYXllciA/IG93bmVyIDogZmVlUGF5ZXI7XG5cbiAgICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgICBwYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgICBBU1NPQ0lBVEVEX1RPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG5cbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICB0b2tlbkFjY291bnQ6IGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSxcbiAgICAgICAgICBpbnN0LFxuICAgICAgICB9O1xuICAgICAgfVxuICAgIH07XG4gIH1cbn1cbiIsICJpbXBvcnQgeyBLZXlwYWlyIGFzIE9yaWdpbmFsLCBQdWJsaWNLZXkgfSBmcm9tICdAc29sYW5hL3dlYjMuanMnO1xuaW1wb3J0IHsgUHVia2V5LCBTZWNyZ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G4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJGZWVCYXNpc1BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0YWRhdGEubmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzeW1ib2wnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLnN5bWJvbCkge1xuICAgICAgICAgICAgICByZXMgPSBpc1N5bWJvbChtZXRhZGF0YS5zeW1ib2wpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHJlcyAmJiByZXMuaXNFcnIpIHtcbiAgICAgICAgICByZXN1bHRzLnB1c2goLi4ucmVzLmVycm9yLmRldGFpbHMpO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIGlmIChyZXN1bHRzLmxlbmd0aCA+IDApIHtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9XG4gICAgICAgICAgJ0NhdWdodCBpbiB0aGUgdmFsaWRhdGlvbiBlcnJvcnMuIHNlZSBpbmZvcm1hdGlvbiBlLmc6IGVycjxWYWxpZGF0b3JFcnJvcj4uZGV0YWlscyc7XG4gICAgICAgIHRocm93IG5ldyBWYWxpZGF0b3JFcnJvcihtZXNzYWdlLCByZXN1bHRzKTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBNZXNzYWdlLlNVQ0NFU1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 No newline at end of file diff --git a/packages/node/dist/index.mjs b/packages/node/dist/index.mjs index 0e0d3d8c3..46999ffb1 100644 --- a/packages/node/dist/index.mjs +++ b/packages/node/dist/index.mjs @@ -1,4 +1,4 @@ -// ../shared/src/constants.ts +// ../suite-utils/src/constants.ts import { PublicKey } from "@solana/web3.js"; import SolanaJsonConfig from "@solana-suite/config/load"; var Config = SolanaJsonConfig; @@ -215,56 +215,6 @@ var TransactionBuilder; TransactionBuilder7.Common = Common2; })(TransactionBuilder || (TransactionBuilder = {})); -// ../shared/src/shared.ts -var overwriteObject = (object, targets) => { - const that = object; - targets.forEach((target) => { - delete that[target.existsKey]; - that[target.will.key] = target.will.value; - }); - return that; -}; -var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { - if (Constants.isDebugging === "true" || process.env.DEBUG === "true") { - console.log("[DEBUG]", data1, data2, data3, data4); - } -}; -var sleep = async (sec) => { - return new Promise((r) => setTimeout(r, sec * 1e3)); -}; -var isPromise = (obj) => { - return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; -}; -function Try(input, finallyInput) { - try { - const v = input(); - if (isPromise(v)) { - return v.then( - (x) => Result2.ok(x), - (err) => Result2.err(err) - ); - } else { - return Result2.ok(v); - } - } catch (e) { - if (e instanceof Error) { - return Result2.err(e); - } - return Result2.err(Error(e)); - } finally { - if (finallyInput) { - debugLog("# finally input:", finallyInput); - finallyInput(); - } - } -} -var convertTimestampToDateTime = (created_at) => { - if (created_at) { - return new Date(created_at * 1e3); - } - return; -}; - // ../transaction-builder/src/batch.ts var TransactionBuilder2; ((TransactionBuilder7) => { @@ -732,12 +682,62 @@ var TransactionBuilder6 = { ...TransactionBuilder4 }; -// ../shared/src/result.ts +// ../suite-utils/src/shared.ts +var overwriteObject = (object, targets) => { + const that = object; + targets.forEach((target) => { + delete that[target.existsKey]; + that[target.will.key] = target.will.value; + }); + return that; +}; +var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { + if (Constants.isDebugging === "true" || process.env.DEBUG === "true") { + console.log("[DEBUG]", data1, data2, data3, data4); + } +}; +var sleep = async (sec) => { + return new Promise((r) => setTimeout(r, sec * 1e3)); +}; +var isPromise = (obj) => { + return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; +}; +function Try(input, finallyInput) { + try { + const v = input(); + if (isPromise(v)) { + return v.then( + (x) => Result5.ok(x), + (err) => Result5.err(err) + ); + } else { + return Result5.ok(v); + } + } catch (e) { + if (e instanceof Error) { + return Result5.err(e); + } + return Result5.err(Error(e)); + } finally { + if (finallyInput) { + debugLog("# finally input:", finallyInput); + finallyInput(); + } + } +} +var convertTimestampToDateTime = (created_at) => { + if (created_at) { + return new Date(created_at * 1e3); + } + return; +}; + +// ../suite-utils/src/result.ts var AbstractResult = class { unwrap(ok, err) { const r = this._chain( - (value) => Result2.ok(ok ? ok(value) : value), - (error) => err ? Result2.ok(err(error)) : Result2.err(error) + (value) => Result5.ok(ok ? ok(value) : value), + (error) => err ? Result5.ok(err(error)) : Result5.err(error) ); if (r.isErr) { throw r.error; @@ -746,17 +746,17 @@ var AbstractResult = class { } map(ok, err) { return this._chain( - (value) => Result2.ok(ok(value)), - (error) => Result2.err(err ? err(error) : error) + (value) => Result5.ok(ok(value)), + (error) => Result5.err(err ? err(error) : error) ); } chain(ok, err) { - return this._chain(ok, err || ((error) => Result2.err(error))); + return this._chain(ok, err || ((error) => Result5.err(error))); } match(ok, err) { this._chain( - (value) => Result2.ok(ok(value)), - (error) => Result2.err(err(error)) + (value) => Result5.ok(ok(value)), + (error) => Result5.err(err(error)) ); } /// single TransactionBuilder //// @@ -778,7 +778,7 @@ var AbstractResult = class { } ); if (res.isErr) { - return Result2.err(res.error); + return Result5.err(res.error); } return res.value; } @@ -813,7 +813,7 @@ Array.prototype.submit = async function(feePayer) { } else if (obj.isOk) { instructions.push(obj.value); } else { - return Result2.err(Error("Only Array Instruction object")); + return Result5.err(Error("Only Array Instruction object")); } } debugLog("# Result batch submit: ", instructions); @@ -843,16 +843,16 @@ var InternalErr = class extends AbstractResult { return err(this.error); } }; -var Result2; -((Result7) => { +var Result5; +((Result8) => { function ok(value) { return new InternalOk(value); } - Result7.ok = ok; + Result8.ok = ok; function err(error) { return new InternalErr(error || Error()); } - Result7.err = err; + Result8.err = err; function all(obj) { if (Array.isArray(obj)) { const resArr = []; @@ -862,7 +862,7 @@ var Result2; } resArr.push(item.value); } - return Result7.ok(resArr); + return Result8.ok(resArr); } const res = {}; const keys = Object.keys(obj); @@ -873,10 +873,10 @@ var Result2; } res[key] = item.value; } - return Result7.ok(res); + return Result8.ok(res); } - Result7.all = all; -})(Result2 || (Result2 = {})); + Result8.all = all; +})(Result5 || (Result5 = {})); // ../converter/src/collection.ts var Converter; @@ -1505,10 +1505,10 @@ var Node; signature }, commitment - ).then(Result2.ok).catch(Result2.err); + ).then(Result5.ok).catch(Result5.err); }; })(Node || (Node = {})); export { Node }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vc2hhcmVkL3NyYy9jb25zdGFudHMudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvYmF0Y2gudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY29tbW9uLnRzIiwgIi4uLy4uL3NoYXJlZC9zcmMvc2hhcmVkLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL21pbnQudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvcGFydGlhbC1zaWduLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2NhbGN1bGF0ZS10eHNpemUudHMiLCAiLi4vLi4vZ2xvYmFsL3NyYy9pbmRleC50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9hc3NvY2lhdGVkLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2tleXBhaXIudHMi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W5nIHwgQ29tbW9uU3RydWN0dXJlPFB1YmtleT4+ID0+IHtcbiAgICAgIGNvbnN0IHJlcyA9IGF3YWl0IG1ha2VPckNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICBtaW50LFxuICAgICAgICBvd25lcixcbiAgICAgICAgbmV3IEtleXBhaXIuS2V5cGFpcih7IHNlY3JldDogZmVlUGF5ZXIgfSkucHVia2V5LFxuICAgICAgICBhbGxvd093bmVyT2ZmQ3VydmUsXG4gICAgICApO1xuXG4gICAgICBpZiAoIXJlcy5pbnN0KSB7XG4gICAgICAgIHJldHVybiByZXMudG9rZW5BY2NvdW50O1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb248UHVia2V5PihcbiAgICAgICAgW3Jlcy5pbnN0XSxcbiAgICAgICAgW10sXG4gICAgICAgIGZlZVBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICByZXMudG9rZW5BY2NvdW50ISxcbiAgICAgICk7XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIFJldHJ5IGZ1bmN0aW9uIGlmIGNyZWF0ZSBuZXcgdG9rZW4gYWNjb3VpbnRcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBtaW50XG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAgICogQHBhcmFtIHtTZWNyZXR9IGZlZVBheWVyXG4gICAgICogQHJldHVybnMgUHJvbWlzZTxzdHJpbmc+XG4gICAgICovXG4gICAgZXhwb3J0IGNvbnN0IHJldHJ5R2V0T3JDcmVhdGUgPSBhc3luYyAoXG4gICAgICBtaW50OiBQdWJrZXksXG4gICAgICBvd25lcjogUHVia2V5LFxuICAgICAgZmVlUGF5ZXI6IFNlY3JldCxcbiAgICApOiBQcm9taXNlPHN0cmluZz4gPT4ge1xuICAgICAgbGV0IGNvdW50ZXIgPSAxO1xuICAgICAgd2hpbGUgKGNvdW50ZXIgPCBSRVRSWV9PVkVSX0xJTUlUKSB7XG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgY29uc3QgaW5zdCA9IGF3YWl0IGdldChtaW50LCBvd25lciwgZmVlUGF5ZXIsIHRydWUpO1xuXG4gICAgICAgICAgaWYgKGluc3QgJiYgdHlwZW9mIGluc3QgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICBkZWJ1Z0xvZygnIyBhc3NvY2lhdGVkVG9rZW5BY2NvdW50OiAnLCBpbnN0KTtcbiAgICAgICAgICAgIHJldHVybiBpbnN0O1xuICAgICAgICAgIH0gZWxzZSBpZiAoaW5zdCBpbnN0YW5jZW9mIFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb24pIHtcbiAgICAgICAgICAgIChhd2FpdCBpbnN0LnN1Ym1pdCgpKS5tYXAoXG4gICAgICAgICAgICAgIGFzeW5jIChvazogc3RyaW5nKSA9PiB7XG4gICAgICAgICAgICAgICAgYXdhaXQgTm9kZS5jb25maXJtZWRTaWcob2spO1xuICAgICAgICAgICAgICAgIHJldHVybiBpbnN0LmRhdGE7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIChlcnI6IEVycm9yKSA9PiB7XG4gICAgICAgICAgICAgICAgZGVidWdMb2coJyMgRXJyb3Igc3VibWl0IHJldHJ5R2V0T3JDcmVhdGU6ICcsIGVycik7XG4gICAgICAgICAgICAgICAgdGhyb3cgZXJyO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICBkZWJ1Z0xvZyhgIyByZXRyeTogJHtjb3VudGVyfSBjcmVhdGUgdG9rZW4gYWNjb3VudDogYCwgZSk7XG4gICAgICAgICAgZGVidWdMb2coYCMgbWludDogJHttaW50fSwgb3duZXI6ICR7b3duZXJ9LCBmZWVQYXllcjogJHtmZWVQYXllcn1gKTtcbiAgICAgICAgfVxuICAgICAgICBhd2FpdCBzbGVlcChS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gICAgICBBU1NPQ0lBVEVEX1RPS0VOX1BST0dSQU1fSUQsXG4gICAgICApO1xuXG4gICAgICBkZWJ1Z0xvZygnIyBhc3NvY2lhdGVkVG9rZW5BY2NvdW50OiAnLCBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCkpO1xuXG4gICAgICB0cnkge1xuICAgICAgICAvLyBEb250IHVzZSBSZXN1bHRcbiAgICAgICAgYXdhaXQgZ2V0QWNjb3VudChcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLmNvbW1pdG1lbnQsXG4gICAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICB0b2tlbkFjY291bnQ6IGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSxcbiAgICAgICAgICBpbnN0OiB1bmRlZmluZWQsXG4gICAgICAgIH07XG4gICAgICB9IGNhdGNoIChlcnJvcjogdW5rbm93bikge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuQWNjb3VudE5vdEZvdW5kRXJyb3IpICYmXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuSW52YWxpZEFjY291bnRPd25lckVycm9yKVxuICAgICAgICApIHtcbiAgICAgICAgICB0aHJvdyBFcnJvcignVW5leHBlY3RlZCBlcnJvcicpO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgcGF5ZXIgPSAhZmVlUGF5ZXIgPyBvd25lciA6IGZlZVBheWVyO1xuXG4gICAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVBc3NvY2lhdGVkVG9rZW5BY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgcGF5ZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdCxcbiAgICAgICAgfTtcbiAgICAgIH1cbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHsgS2V5cGFpciBhcyBPcmlnaW5hbCwgUHVibGljS2V5IH0gZnJvbSAnQHNvbGFuYS93ZWIzLmpzJztcbmltcG9ydCB7IFB1YmtleSwgU2VjcmV0IH0gZnJvbSAnfi90eXBlcy9hY2NvdW50JztcbmltcG9ydCBicyBmcm9tICdiczU4JztcblxuZXhwb3J0IG5hbWVzcGFjZSBBY2NvdW50IHtcbiAgZXhwb3J0IGNsYXNzIEtleXBhaXIge1xuICAgIHNlY3JldDogU2VjcmV0O1xuICAgIHB1YmtleTogUHVia2V5O1xuXG4gICAgY29uc3RydWN0b3IocGFyYW1zOiB7IHB1YmtleT86IFB1YmtleTsgc2VjcmV0OiBTZWNyZXQgfSkge1xuICAgICAgaWYgKCFwYXJhbXMucHVia2V5KSB7XG4gICAgICAgIGNvbnN0IGtleXBhaXIgPSBwYXJhbXMuc2VjcmV0LnRvS2V5cGFpcigpO1xuICAgICAgICB0aGlzLnB1YmtleSA9IGtleXBhaXIucHVibGljS2V5LnRvU3RyaW5nKCk7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICB0aGlzLnB1YmtleSA9IHBhcmFtcy5wdWJrZXk7XG4gICAgICB9XG4gICAgICB0aGlzLnNlY3Jld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iAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEuc3ltYm9sKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU3ltYm9sKG1ldGFkYXRhLnN5bWJvbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAocmVzICYmIHJlcy5pc0Vycikge1xuICAgICAgICAgIHJlc3VsdHMucHVzaCguLi5yZXMuZXJyb3IuZGV0YWlscyk7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgICAgaWYgKHJlc3VsdHMubGVuZ3RoID4gMCkge1xuICAgICAgICBjb25zdCBtZXNzYWdlID1cbiAgICAgICAgICAnQ2F1Z2h0IGluIHRoZSB2YWxpZGF0aW9uIGVycm9ycy4gc2VlIGluZm9ybWF0aW9uIGUuZzogZXJyPFZhbGlkYXRvckVycm9yPi5kZXRhaWxzJztcbiAgICAgICAgdGhyb3cgbmV3IFZhbGlkYXRvckVycm9yKG1lc3NhZ2UsIHJlc3VsdHMpO1xuICAgICAgfVxuICAgICAgcmV0dXJuIE1lc3NhZ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AgICAgcmV0dXJuIFRyeShhc3luYyAoKSA9PiB7XG4gICAgICAgIGxldCBpID0gMDtcbiAgICAgICAgZm9yIChjb25zdCBhIG9mIGFycikge1xuICAgICAgICAgIGlmICghYS5pbnN0cnVjdGlvbnMgJiYgIWEuc2lnbmVycykge1xuICAgICAgICAgICAgdGhyb3cgRXJyb3IoXG4gICAgICAgICAgICAgIGBvbmx5IEluc3RydWN0aW9uIG9iamVjdCB0aGF0IGNhbiB1c2UgYmF0Y2hTdWJtaXQoKS5cbiAgICAgICAgICAgIEluZGV4OiAke2l9LCBTZXQgdmFsdWU6ICR7SlNPTi5zdHJpbmdpZnkoYSl9YCxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIGkrKztcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IGluc3RydWN0aW9ucyA9IGFyci5mbGF0TWFwKChhKSA9PiBhLmluc3RydWN0aW9ucyk7XG4gICAgICAgIGNvbnN0IHNpZ25lcnMgPSBhcnIuZmxhdE1hcCgoYSkgPT4gYS5zaWduZXJzKTtcbiAgICAgICAgY29uc3QgZmVlUGF5ZXJzID0gYXJyLmZpbHRlcigoYSkgPT4gYS5mZWVQYXllciAhPT0gdW5kZWZpbmVkKTtcbiAgICAgICAgbGV0IGZlZVBheWVyID0gc2lnbmVyc1swXTtcbiAgICAgICAgaWYgKGZlZVBheWVycy5sZW5ndGggPiAwICYmIGZlZVBheWVyc1swXS5mZWVQYXllcikge1xuICAgICAgICAgIGZlZVBheWVyID0gZmVlUGF5ZXJzWzBdLmZlZVBheWVyO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgdHJhbnNhY3Rpb24gPSBuZXcgVHJhbnNhY3Rpb24oKTtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHNpZ25lcnM7XG4gICAgICAgIGlmIChmZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gZmVlUGF5ZXIucHVibGlj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Tm9kZS5jb25maXJtZWRTaWcob2spO1xuICAgICAgICAgICAgICAgIHJldHVybiBpbnN0LmRhdGE7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIChlcnI6IEVycm9yKSA9PiB7XG4gICAgICAgICAgICAgICAgZGVidWdMb2coJyMgRXJyb3Igc3VibWl0IHJldHJ5R2V0T3JDcmVhdGU6ICcsIGVycik7XG4gICAgICAgICAgICAgICAgdGhyb3cgZXJyO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICBkZWJ1Z0xvZyhgIyByZXRyeTogJHtjb3VudGVyfSBjcmVhdGUgdG9rZW4gYWNjb3VudDogYCwgZSk7XG4gICAgICAgICAgZGVidWdMb2coYCMgbWludDogJHttaW50fSwgb3duZXI6ICR7b3duZXJ9LCBmZWVQYXllcjogJHtmZWVQYXllcn1gKTtcbiAgICAgICAgfVxuICAgICAgICBhd2FpdCBzbGVlcChSRVRSWV9TTEVFUF9USU1FKTtcbiAgICAgICAgY291bnRlcisrO1xuICAgICAgfVxuICAgICAgdGhyb3cgRXJyb3IoYHJldHJ5IGFjdGlvbiBpcyBvdmVyIGxpbWl0ICR7UkVUUllfT1ZFUl9MSU1JVH1gKTtcbiAgICB9O1xuXG4gICAgLyoqXG4gICAgICogW01haW4gbG9naWNdR2V0IEFzc29jaWF0ZWQgdG9rZW4gQWNjb3VudC5cbiAgICAgKiBpZiBub3QgY3JlYXRlZCwgY3JlYXRlIG5ldyB0b2tlbiBhY2NvdWludFxuICAgICAqXG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG1pbnRcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gb3duZXJcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gZmVlUGF5ZXJcbiAgICAgKiBAcmV0dXJucyBQcm9taXNlPHN0cmluZz5cbiAgICAgKi9cbiAgICBleHBvcnQgY29uc3Q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c29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSxcbiAgICAgICAgICBpbnN0OiB1bmRlZmluZWQsXG4gICAgICAgIH07XG4gICAgICB9IGNhdGNoIChlcnJvcjogdW5rbm93bikge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuQWNjb3VudE5vdEZvdW5kRXJyb3IpICYmXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuSW52YWxpZEFjY291bnRPd25lckVycm9yKVxuICAgICAgICApIHtcbiAgICAgICAgICB0aHJvdyBFcnJvcignVW5leHBlY3RlZCBlcnJvcicpO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgcGF5ZXIgPSAhZmVlUGF5ZXIgPyBvd25lciA6IGZlZVBheWVyO1xuXG4gICAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVBc3NvY2lhdGVkVG9rZW5BY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgcGF5ZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdCxcbiAgICAgICAgfTtcbiAgICAgIH1cbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHsgS2V5cGFpciBhcyBPcmlnaW5hbCwgUHVibGljS2V5IH0gZnJvbSAnQHNvbGFuYS93ZWIzLmpzJztcbmltcG9ydCB7I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luZFByb2dyYW1BZGRyZXNzU3luYyhcbiAgICAgICAgW2FkZHJlc3MudG9QdWJsaWNLZXkoKS50b0J1ZmZlcigpXSxcbiAgICAgICAgTVBMX0JVQkJMRUdVTV9QUk9HUkFNX0lELnRvUHVibGljS2V5KCksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGdldEJndW1TaWduZXIgPSAoKTogUHVibGljS2V5ID0+IHtcbiAgICAgIGNvbnN0IFtwdWJsaWNLZXldID0gUHVibGljS2V5LmZpbmRQcm9ncmFtQWRkcmVzc1N5bmMoXG4gICAgICAgIFtCdWZmZXIuZnJvbSgnY29sbGVjdGlvbl9jcGknLCAndXRmOCcpXSxcbiAgICAgICAgTVBMX0JVQkJMRUdVTV9QUk9HUkFNX0lELnRvUHVibGljS2V5KCksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGdldEFzc2V0SWQgPSAoYWRkcmVzczogUHVia2V5LCBsZWFmSW5kZXg6IG51bWJlcik6IFB1YmtleSA9PiB7XG4gICAgICBjb25zdCBub2RlID0gbmV3IEJOLkJOKGxlYWZJbmRleCk7XG4gICAgICBjb25zdCBbYXNzZXRJZF0gPSBQdWJsaWNLZXkuZmluZFByb2dyYW1BZGRyZXNzU3luYyhcbiAgICAgICAgW1xuICAgICAgICAgIEJ1ZmZlci5mcm9tKCdhc3NldCcsICd1dGY4JyksXG4gICAgICAgICAgYWRkcmVzcy50b1B1YmxpY0tleSgpLnRvQnVmZmVyKCksXG4gICAgICAgICAgVWludDhBcnJheS5mcm9tKG5vZGUudG9BcnJheSgnbGUnLCA4KSksXG4gICAgICAgIF0sXG4gICAgICAgIE1QTF9CVUJCTEVHVU1fUFJPR1JBTV9JRC50b1B1YmxpY0tleSgpLFxuICAgICAgKTtcbiAgICAgIHJldHVybiBhc3NldElkLnRvU3R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ZXJ0ZXIiLCAiQ29sbGVjdGlvbiIsICJDb2xsZWN0aW9uTWludCIsICJDb252ZXJ0ZXIiLCAiQ3JlYXRvcnMiLCAiQ29udmVydGVyIiwgIkNvbXByZXNzZWROZnRNZXRhZGF0YSIsICJDb252ZXJ0ZXIiLCAiUm95YWx0eSIsICJDb252ZXJ0ZXIiLCAiTmZ0IiwgIkNvbnZlcnRlciIsICJNZW1vIiwgIkNvbnZlcnRlciIsICJNaW50IiwgIkNvbnZlcnRlciIsICJSZWd1bGFyTmZ0TWV0YWRhdGEiLCAiQ29udmVydGVyIiwgIlByb3BlcnRpZXMiLCAiQ29udmVydGVyIiwgIlVzZXMiLCAiQ29udmVydGVyIiwgIlRva2VuTWV0YWRhdGEiLCAiQ29udmVydGVyIiwgIlRyYW5zZmVyQ2hlY2tlZCIsICJDb252ZXJ0ZXIiLCAiVHJhbnNmZXIiLCAiQ29udmVydGVyIiwgIlZhbGlkYXRvciIsICJNZXNzYWdlIiwgIkNvbnZlcnRlciIsICJOb2RlIiwgIlJlc3VsdCJdCn0K \ No newline at end of file diff --git a/packages/node/test/index.test.ts b/packages/node/test/index.test.ts index 88375034b..78d0821f2 100644 --- a/packages/node/test/index.test.ts +++ b/packages/node/test/index.test.ts @@ -1,6 +1,6 @@ import test from 'ava'; import { Node } from '../src/'; -import { Constants } from '~/shared'; +import { Constants } from '~/suite-utils'; test('Connect devnet', (t) => { Node.changeConnection({ cluster: Constants.Cluster.dev }); diff --git a/packages/storage/dist/index.js b/packages/storage/dist/index.js index b712744ac..fc1fd979c 100644 --- a/packages/storage/dist/index.js +++ b/packages/storage/dist/index.js @@ -37,7 +37,7 @@ __export(src_exports, { }); module.exports = __toCommonJS(src_exports); -// ../shared/src/constants.ts +// ../suite-utils/src/constants.ts var import_web3 = require("@solana/web3.js"); var import_load = __toESM(require("@solana-suite/config/load")); var Config = import_load.default; @@ -313,62 +313,6 @@ var TransactionBuilder; TransactionBuilder7.Common = Common2; })(TransactionBuilder || (TransactionBuilder = {})); -// ../shared/src/shared.ts -var overwriteObject = (object, targets) => { - const that = object; - targets.forEach((target) => { - delete that[target.existsKey]; - that[target.will.key] = target.will.value; - }); - return that; -}; -var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { - if (Constants.isDebugging === "true" || process.env.DEBUG === "true") { - console.log("[DEBUG]", data1, data2, data3, data4); - } -}; -var sleep = async (sec) => { - return new Promise((r) => setTimeout(r, sec * 1e3)); -}; -var isBrowser = () => { - return typeof window !== "undefined" && typeof window.document !== "undefined"; -}; -var isNode = () => { - return typeof process !== "undefined" && process.versions != null && process.versions.node != null; -}; -var isPromise = (obj) => { - return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; -}; -function Try(input, finallyInput) { - try { - const v = input(); - if (isPromise(v)) { - return v.then( - (x) => Result.ok(x), - (err) => Result.err(err) - ); - } else { - return Result.ok(v); - } - } catch (e) { - if (e instanceof Error) { - return Result.err(e); - } - return Result.err(Error(e)); - } finally { - if (finallyInput) { - debugLog("# finally input:", finallyInput); - finallyInput(); - } - } -} -var convertTimestampToDateTime = (created_at) => { - if (created_at) { - return new Date(created_at * 1e3); - } - return; -}; - // ../transaction-builder/src/batch.ts var TransactionBuilder2; ((TransactionBuilder7) => { @@ -823,7 +767,63 @@ var TransactionBuilder6 = { ...TransactionBuilder4 }; -// ../shared/src/result.ts +// ../suite-utils/src/shared.ts +var overwriteObject = (object, targets) => { + const that = object; + targets.forEach((target) => { + delete that[target.existsKey]; + that[target.will.key] = target.will.value; + }); + return that; +}; +var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { + if (Constants.isDebugging === "true" || process.env.DEBUG === "true") { + console.log("[DEBUG]", data1, data2, data3, data4); + } +}; +var sleep = async (sec) => { + return new Promise((r) => setTimeout(r, sec * 1e3)); +}; +var isBrowser = () => { + return typeof window !== "undefined" && typeof window.document !== "undefined"; +}; +var isNode = () => { + return typeof process !== "undefined" && process.versions != null && process.versions.node != null; +}; +var isPromise = (obj) => { + return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; +}; +function Try(input, finallyInput) { + try { + const v = input(); + if (isPromise(v)) { + return v.then( + (x) => Result.ok(x), + (err) => Result.err(err) + ); + } else { + return Result.ok(v); + } + } catch (e) { + if (e instanceof Error) { + return Result.err(e); + } + return Result.err(Error(e)); + } finally { + if (finallyInput) { + debugLog("# finally input:", finallyInput); + finallyInput(); + } + } +} +var convertTimestampToDateTime = (created_at) => { + if (created_at) { + return new Date(created_at * 1e3); + } + return; +}; + +// ../suite-utils/src/result.ts var AbstractResult = class { unwrap(ok, err) { const r = this._chain( @@ -935,15 +935,15 @@ var InternalErr = class extends AbstractResult { } }; var Result; -((Result9) => { +((Result10) => { function ok(value) { return new InternalOk(value); } - Result9.ok = ok; + Result10.ok = ok; function err(error) { return new InternalErr(error || Error()); } - Result9.err = err; + Result10.err = err; function all(obj) { if (Array.isArray(obj)) { const resArr = []; @@ -953,7 +953,7 @@ var Result; } resArr.push(item.value); } - return Result9.ok(resArr); + return Result10.ok(resArr); } const res = {}; const keys = Object.keys(obj); @@ -964,9 +964,9 @@ var Result; } res[key] = item.value; } - return Result9.ok(res); + return Result10.ok(res); } - Result9.all = all; + Result10.all = all; })(Result || (Result = {})); // ../converter/src/collection.ts @@ -1758,4 +1758,4 @@ var Storage; ProvenanceLayer, Storage }); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uLy4uL3NoYXJlZC9zcmMvY29uc3RhbnRzLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2JhdGNoLnRzIiwgIi4uLy4uL25vZGUvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2NvbW1vbi50cyIsICIuLi8uLi9zaGFyZWQvc3JjL3NoYXJlZC50cyIsICIuLi8uLi90cmFuc2FjdGl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vcmVzdWx0JztcblxuZXhwb3J0IG5hbWVzcGFjZSBUcmFuc2FjdGlvbkJ1aWxkZXIge1xuICBleHBvcnQgY2xhc3MgQmF0Y2gge1xuICAgIHN1Ym1pdCA9IGFzeW5jIChcbiAgICAgIGFycjogQ29tbW9uLkNvbW1vbltdIHwgTWludC5NaW50W10sXG4gICAgKTogUHJvbWlzZTxSZXN1bHQ8VHJhbnNhY3Rpb25TaWduYXR1cmUsIEVycm9yPj4gPT4ge1xuICAgICAgcmV0dXJuIFRyeShhc3luYyAoKSA9PiB7XG4gICAgICAgIGxldCBpID0gMDtcbiAgICAgICAgZm9yIChjb25zdCBhIG9mIGFycikge1xuICAgICAgICAgIGlmICghYS5pbnN0cnVjdGlvbnMgJiYgIWEuc2lnbmVycykge1xuICAgICAgICAgICAgdGhyb3cgRXJyb3IoXG4gICAgICAgICAgICAgIGBvbmx5IEluc3RydWN0aW9uIG9iamVjdCB0aGF0IGNhbiB1c2UgYmF0Y2hTdWJtaXQoKS5cbiAgICAgICAgICAgIEluZGV4OiAke2l9LCBTZXQgdmFsdWU6ICR7SlNPTi5zdHJpbmdpZnkoYSl9YCxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIGkrKztcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IGluc3RydWN0aW9ucyA9IGFyci5mbGF0TWFwKChhKSA9PiBhLmluc3RydWN0aW9ucyk7XG4gICAgICAgIGNvbnN0IHNpZ25lcnMgPSBhcnIuZmxhdE1hcCgoYSkgPT4gYS5zaWduZXJzKTtcbiAgICAgICAgY29uc3QgZmVlUGF5ZXJzID0gYXJyLmZpbHRlcigoYSkgPT4gYS5mZWVQYXllciAhPT0gdW5kZWZpbmVkKTtcbiAgICAgICAgbGV0IGZlZVBheWVyID0gc2lnbmVyc1swXTtcbiAgICAgICAgaWYgKGZlZVBheWVycy5sZW5ndGggPiAwICYmIGZlZVBheWVyc1swXS5mZWVQYXllcikge1xuICAgICAgICAgIG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ZXRyeSBmdW5jdGlvbiBpZiBjcmVhdGUgbmV3IHRva2VuIGFjY291aW50XG4gICAgICpcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gbWludFxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBvd25lclxuICAgICAqIEBwYXJhbSB7U2VjcmV0fSBmZWVQYXllclxuICAgICAqIEByZXR1cm5zIFByb21pc2U8c3RyaW5nPlxuICAgICAqL1xuICAgIGV4cG9ydCBjb25zdCByZXRyeUdldE9yQ3JlYXRlID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyOiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxzdHJpbmc+ID0+IHtcbiAgICAgIGxldCBjb3VudGVyID0gMTtcbiAgICAgIHdoaWxlIChjb3VudGVyIDwgUkVUUllfT1ZFUl9MSU1JVCkge1xuICAgICAgICB0cnkge1xuICAgICAgICAgIGNvbnN0IGluc3QgPSBhd2FpdCBnZXQobWludCwgb3duZXIsIGZlZVBheWVyLCB0cnVlKTtcblxuICAgICAgICAgIGlmIChpbnN0ICYmIHR5cGVvZiBpbnN0ID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgaW5zdCk7XG4gICAgICAgICAgICByZXR1cm4gaW5zdDtcbiAgICAgICAgICB9IGVsc2UgaWYgKGluc3QgaW5zdGFuY2VvZiBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uKSB7XG4gICAgICAgICAgICAoYXdhaXQgaW5zdC5zdWJtaXQoKSkubWFwKFxuICAgICAgICAgICAgICBhc3luYyAob2s6IHN0cmluZykgPT4ge1xuICAgICAgICAgICAgICAgIGF3YWl0IE5vZGUuY29uZmlybWVkU2lnKG9rKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gaW5zdC5kYXRhO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAoZXJyOiBFcnJvcikgPT4ge1xuICAgICAgICAgICAgICAgIGRlYnVnTG9nKCcjIEVycm9yIHN1Ym1pdCByZXRyeUdldE9yQ3JlYXRlOiAnLCBlcnIpO1xuICAgICAgICAgICAgICAgIHRocm93IGVycjtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgZGVidWdMb2coYCMgcmV0cnk6ICR7Y291bnRlcn0gY3JlYXRlIHRva2VuIGFjY291bnQ6IGAsIGUpO1xuICAgICAgICAgIGRlYnVnTG9nKGAjIG1pbnQ6ICR7bWludH0sIG93bmVyOiAke293bmVyfSwgZmVlUGF5ZXI6ICR7ZmVlUGF5ZXJ9YCk7XG4gICAgICAgIH1cbiAgICAgICAgYXdhaXQgc2xlZXAoUkVUUllfU0xFRVBfVElNRSk7XG4gICAgICAgIGNvdW50ZXIrKztcbiAgICAgIH1cbiAgICAgIHRocm93IEVycm9yKGByZXRyeSBhY3Rpb24gaXMgb3ZlciBsaW1pdCAke1JFVFJZX09WRVJfTElNSVR9YCk7XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIFtNYWluIGxvZ2ljXUdldCBBc3NvY2lhdGVkIHRva2VuIEFjY291bnQuXG4gICAgICogaWYgbm90IGNyZWF0ZWQsIGNyZWF0ZSBuZXcgdG9rZW4gYWNjb3VpbnRcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBtaW50XG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAgICogQHBhcmFtIHtQdWJrZXl9IGZlZVBheWVyXG4gICAgICogQHJldHVybnMgUHJvbWlzZTxzdHJpbmc+XG4gICAgICovXG4gICAgZXhwb3J0IGNvbnN0IG1ha2VPckNyZWF0ZUluc3RydWN0aW9uID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyPzogUHVia2V5LFxuICAgICAgYWxsb3dPd25lck9mZkN1cnZlID0gZmFsc2UsXG4gICAgKTogUHJvbWlzZTx7XG4gICAgICB0b2tlbkFjY291bnQ6IHN0cmluZztcbiAgICAgIGluc3Q6IFRyYW5zYWN0aW9uSW5zdHJ1Y3Rpb24gfCB1bmRlZmluZWQ7XG4gICAgfT4gPT4ge1xuICAgICAgY29uc3QgYXNzb2NpYXRlZFRva2VuQWNjb3VudCA9IGdldEFzc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jKFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSxcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3QsXG4gICAgICAgIH07XG4gICAgICB9XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IEtleXBhaXIgYXMgT3JpZ2luYWwsIFB1YmxpY0tleSB9IGZyb20gJ0Bzb2xhbmEvd2ViMy5qcyc7XG5pbXBvcnQgeyBQdWJrZXksIFNlY3JldCB9IGZyb20gJ34vdHlwZXMvYWNjb3VudCc7XG5pbXBvcnQgYnMgZnJvbSAnYnM1OCc7XG5cbmV4cG9ydCBuYW1lc3BhY2UgQWNjb3VudCB7X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leSk6IFB1YmxpY0tleSA9PiB7XG4gICAgICBjb25zdCBbcHVibGljS2V5XSA9IFB1YmxpY0tleS5maW5kUHJvZ3JhbUFkZHJlc3NTeW5jKFxuICAgICAgICBbXG4gICAgICAgICAgQnVmZmVyLmZyb20oJ21ldGFkYXRhJyksXG4gICAgICAgICAgUFJPR1JBTV9JRC50b0J1ZmZlcigpLFxuICAgICAgICAgIGFkZHJlc3MudG9QdWJsaWNLZXkoKS50b0J1ZmZlcigpLFxuICAgICAgICBdLFxuICAgICAgICBQUk9HUkFNX0lELFxuICAgICAgKTtcbiAgICAgIHJldHVybiBwdWJsaWNLZXk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBnZXRNYXN0ZXJFZGl0aW9uID0gKGFkZHJlc3M6IFB1YmtleSk6IFB1YmxpY0tleSA9PiB7XG4gICAgICBjb25zdCBbcHVibGljS2V5XSA9IFB1YmxpY0tleS5maW5kUHJvZ3JhbUFkZHJlc3NTeW5jKFxuICAgICAgICBbXG4gICAgICAgICAgQnVmZmVyLmZyb20oJ21ldGFkYXRhJyksXG4gICAgICAgICAgUFJPR1JBTV9JRC50b0J1ZmZlcigpLFxuICAgICAgICAgIGFkZHJlc3MudG9QdWJsaWNLZXkoKS50b0J1ZmZlcigpLFxuICAgICAgICAgIEJ1ZmZlci5mcm9tKCdlZGl0aW9uJyksXG4gICAgICAgIF0sXG4gICAgICAgIFBST0dSQU1fSUQsXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGdldFRyZWVBdXRob3JpdHkgPSAoYWRkcmVzczogUHVia2V5KTogUHVibGljS2V5ID0+IHtcbiAgICAgIGNvbnN0IFtwdWJsaWNLZXldID0gUHVibGljS2V5LmZpbmRQcm9ncmFtQWRkcmVzc1N5bmMoXG4gICAgICAgIFthZGRyZXNzLnRvUHVibGljS2V5KCkudG9CdWZmZXIoKV0sXG4gICAgICAgIE1QTF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ob2JqLmlzRXJyKSB7XG4gICAgICAgIHJldHVybiBvYmo7XG4gICAgICB9IGVsc2UgaWYgKG9iai52YWx1ZS5jYW5TdWJtaXQpIHtcbiAgICAgICAgZGVidWdMb2coJyMgUmVzdWx0IGJhdGNoIGNhblN1Ym1pdCcpO1xuICAgICAgICBjb25zdCBzaWcgPSBhd2FpdCAob2JqIGFzIFBhcnRpYWxTaWduU3RydWN0dXJlKS5zdWJtaXQoZmVlUGF5ZXIpO1xuICAgICAgICBpZiAoc2lnLmlzRXJyKSB7XG4gICAgICAgICAgcmV0dXJuIHNpZztcbiAgICAgICAgfVxuICAgICAgICBhd2FpdCBOb2RlLmNvbmZpcm1lZFNpZyhzaWcudmFsdWUpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgZGVidWdMb2coJyMgUmVzdWx0IGJhdGNoIG90aGVyIHRoYW4gY2FuU3VibWl0Jyk7XG4gICAgICAgIGlmICh0aGlzLmxlbmd0aCA9PSBpKSB7XG4gICAgICAgICAgLy8gbGFzdCBvYmplY3RcbiAgICAgICAgICByZXR1cm4gb2JqLnN1Ym1pdChmZWVQYXllcik7XG4gICAgICAgIH1cbiAgICAgICAgb2JqLnN1Ym1pdChmZWVQYXllcik7XG4gICAgICB9XG4gICAgICBpKys7XG4gICAgfVxuICB9IGVsc2Uge1xuICAgIGNvbnN0IGluc3RydWN0aW9uczogQ29tbW9uU3RydWN0dXJlIHwgTWludFN0cnVjdHVyZVtdID0gW107XG4gICAgZm9yIChjb25zdCBvYmogb2YgdGhpcykge1xuICAgICAgaWYgKG9iai5pc0Vycikge1xuICAgICAgICByZXR1cm4gb2JqO1xuICAgICAgfSBlbHNlIGlmIChvYmouaXNPaykge1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChvYmoudmFsdWUpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgcmV0dXJuIFJlc3VsdC5lcnIoRXJyb3IoJ09ubHkgQXJyYXkgSW5zdHJ1Y3Rpb24gb2JqZWN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Chhc3luYyAoZmlsZSkgPT4ge1xuICAgICAgICAgIGlmICghZmlsZS5maWxlUGF0aCkge1xuICAgICAgICAgICAgcmV0dXJuIHt9O1xuICAgICAgICAgIH1cbiAgICAgICAgICBjb25zdCByZXMgPSBhd2FpdCBjYWxsYmFja0Z1bmMoZmlsZS5maWxlUGF0aCwgc3RvcmFnZVR5cGUsIGZlZVBheWVyKTtcbiAgICAgICAgICBpZiAocmVzLmlzRXJyKSB7XG4gICAgICAgICAgICB0aHJvdyBFcnJvcihyZXMuZXJyb3IubWVzc2FnZSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBvdmVyd3JpdGVPYmplY3QoZmlsZSwgW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBleGlzdHNLZXk6ICdmaWxlUGF0aCcsXG4gICAgICAgICAgICAgIHdpbGw6IHsga2V5OiAndXJpJywgdmFsdWU6IHJlcy52YWx1ZSB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICBdKTtcbiAgICAgICAgfSksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHsgLi4uaW5wdXQsIGZpbGVzIH0gYXMgUHJvcGVydGllcztcbiAgICB9O1xuICB9XG59XG4iLCAiLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLXVudXNlZC12YXJzICovXG5pbXBvcnQgeyBPcHRpb24sIFVzZXMgfSBmcm9tICd+L3R5cGVzL3JlZ3VsYXItbmZ0JztcblxuZXhwb3J0IG5hbWVzcGFjZSBDb252ZXJ0ZXIge1xuICBleHBvcnQgbmFtZXNwYWNlIFVzZXMge1xuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlclNpZGUgPSAob3V0cHV0OiBPcHRpb248VXNlcz4pOiBVc2VzIHwgdW5kZWZpbmVkID0+IHtcbiAgICAgIGlmICghb3V0cHV0KSB7XG4gICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgICB9XG4gICAgICByZXR1cm4gb3V0cHV0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9rZW5BY2NvdW50KSB7XG4gICAgICAgIGNvbnN0IGZvdW5kU291cmNlID0gbWFwcGluZ1Rva2VuQWNjb3VudC5maW5kKFxuICAgICAgICAgIChtKSA9PiBtLmFjY291bnQgPT09IG91dHB1dC5wYXJzZWQuaW5mby5zb3VyY2UsXG4gICAgICAgICk7XG4gICAgICAgIGNvbnN0IGZvdW5kRGVzdCA9IG1hcHBpbmdUb2tlbkFjY291bnQuZmluZChcbiAgICAgICAgICAobSkgPT4gbS5hY2NvdW50ID09PSBvdXRwdXQucGFyc2VkLmluZm8uZGVzdGluYXRpb24sXG4gICAgICAgICk7XG4gICAgICAgIGZvdW5kU291cmNlICYmIChoaXN0b3J5LnNvdXJjZSA9IGZvdW5kU291cmNlLm93bmVyKTtcbiAgICAgICAgZm91bmREZXN0ICYmIChoaXN0b3J5LmRlc3RpbmF0aW9uID0gZm91bmREZXN0Lm93bmVyKTtcbiAgICAgIH1cblxuICAgICAgaGlzdG9yeS50b2tlbkFtb3VudCA9IG91dHB1dC5wYXJzZWQuaW5mby50b2tlbkFtb3VudDtcbiAgICAgIGhpc3RvcnkubWludCA9IG91dHB1dC5wYXJzZWQuaW5mby5taW50O1xuICAgICAgaGlzdG9yeS5tdWx0aXNpZ0F1dGhvcml0eSA9IG91dHB1dC5wYXJzZWQuaW5mby5tdWx0aXNpZ0F1dGhvcml0eTtcbiAgICAgIGhpc3Rvcnkuc2lnbmVycyA9IG91dHB1dC5wYXJzZWQuaW5mby5zaWduZXJzO1xuICAgICAgaGlzdG9yeS50eXBlID0gb3V0cHV0LnByb2dyYW07XG4gICAgICBoaXN0b3J5LmRhdGVUaW1lID0gY29udmVydFRpbWVzdGFtcFRvRGF0ZVRpbWUobWV0YS5ibG9ja1RpbWUgYXMgbnVtYmVyKTtcbiAgICAgIGhpc3Rvcnkuc2lnID0gbWV0YS50cmFuc2FjdGlvbi5zaWduYXR1cmVzWzBdO1xuICAgICAgaGlzdG9yeS5pbm5lckluc3RydWN0aW9uID0gZ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BtZXRhZGF0YSAmJiBtZXRhZGF0YS5yb3lhbHR5KSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzUm95YWx0eShtZXRhZGF0YS5yb3lhbHR5KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlcl9mZWVfYmFzaXNfcG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJGZWVCYXNpc1BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0YWRhdGEubmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzeW1ib2wnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLnN5bWJvbCkge1xuICAgICAgICAgICAgICByZXMgPSBpc1N5bWJvbChtZXRhZGF0YS5zeW1ib2wpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHJlcyAmJiByZXMuaXNFcnIp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cbiAgZXhwb3J0IGNsYXNzIEJhdGNoIHtcbiAgICBzdWJtaXQgPSBhc3luYyAoXG4gICAgICBhcnI6IENvbW1vbi5Db21tb25bXSB8IE1pbnQuTWludFtdLFxuICAgICk6IFByb21pc2U8UmVzdWx0PFRyYW5zYWN0aW9uU2lnbmF0dXJlLCBFcnJvcj4+ID0+IHtcbiAgICAgIHJldHVybiBUcnkoYXN5bmMgKCkgPT4ge1xuICAgICAgICBsZXQgaSA9IDA7XG4gICAgICAgIGZvciAoY29uc3QgYSBvZiBhcnIpIHtcbiAgICAgICAgICBpZiAoIWEuaW5zdHJ1Y3Rpb25zICYmICFhLnNpZ25lcnMpIHtcbiAgICAgICAgICAgIHRocm93IEVycm9yKFxuICAgICAgICAgICAgICBgb25seSBJbnN0cnVjdGlvbiBvYmplY3QgdGhhdCBjYW4gdXNlIGJhdGNoU3VibWl0KCkuXG4gICAgICAgICAgICBJbmRleDogJHtpfSwgU2V0IHZhbHVlOiAke0pTT04uc3RyaW5naWZ5KGEpfWAsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICBpKys7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBpbnN0cnVjdGlvbnMgPSBhcnIuZmxhdE1hcCgoYSkgPT4gYS5pbnN0cnVjdGlvbnMpO1xuICAgICAgICBjb25zdCBzaWduZXJzID0gYXJyLmZsYXRNYXAoKGEpID0+IGEuc2lnbmVycyk7XG4gICAgICAgIGNvbnN0IGZlZVBheWVycyA9IGFyci5maWx0ZXIoKGEpID0+IGEuZmVlUGF5ZXIgIT09IHVuZGVmaW5lZCk7XG4gICAgICAgIGxldCBmZWVQYXllciA9IHNpZ25lcnNbMF07XG4gICAgICAgIGlmIChmZWVQYXllcnMubGVuZ3RoID4gMCAmJiBmZWVQYXllcnNbMF0uZmVlUGF5ZXIpIHtcbiAgICAgICAgICBmZWVQYXllciA9IGZlZVBheWVyc1swXS5mZWVQYXllcjtcbiAgICAgICAgfVxuXG4gICA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cbiAgICAgICAgdHJhbnNhY3Rpb24ucmVjZW50QmxvY2toYXNoID0gYmxvY2toYXNoT2JqLmJsb2NraGFzaDtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHRoaXMuc2lnbmVycztcblxuICAgICAgICBpZiAodGhpcy5mZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gdGhpcy5mZWVQYXllci5wdWJsaWNLZXk7XG4gICAgICAgICAgZmluYWxTaWduZXJzID0gW3RoaXMuZmVlUGF5ZXIsIC4uLnRoaXMuc2lnbmVyc107XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLmluc3RydWN0aW9ucy5mb3JFYWNoKChpbnN0KSA9PiB0cmFuc2FjdGlvbi5hZGQoaW5zdCkpO1xuXG4gICAgICAgIGNvbnN0IG9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IE1BWF9SRVRSSUVTLFxuICAgICAgICB9O1xuXG4gICAgICAgIGlmIChOb2RlLmdldENvbm5lY3Rpb24oKS5ycGNFbmRwb2ludCA9PT0gQ29uc3RhbnRzLkVuZFBvaW50VXJsLnByZCkge1xuICAgICAgICAgIGRlYnVnTG9nKCcjIENoYW5nZSBtZXRhcGxleCBjbHVzdGVyIG9uIG1haW5uZXQtYmV0YScpO1xuICAgICAgICAgIE5vZGUuY2hhbmdlQ29ubmVjdGlvbih7IGNsdXN0ZXI6IENvbnN0YW50cy5DbHVzdGVyLnByZE1ldGFwbGV4IH0pO1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgIG9wdGlvbnMsXG4gICAgICAgICk7XG4gICAgICB9KTtcbiAgIC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ZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICBtaW50LFxuICAgICAgICBvd25lcixcbiAgICAgICAgbmV3IEtleXBhaXIuS2V5cGFpcih7IHNlY3JldDogZmVlUGF5ZXIgfSkucHVia2V5LFxuICAgICAgICBhbGxvd093bmVyT2ZmQ3VydmUsXG4gICAgICApO1xuXG4gICAgICBpZiAoIXJlcy5pbnN0KSB7XG4gICAgICAgIHJldHVybiByZXMudG9rZW5BY2NvdW50O1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb248UHVia2V5PihcbiAgICAgICAgW3Jlcy5pbnN0XSxcbiAgICAgICAgW10sXG4gICAgICAgIGZlZVBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICByZXMudG9rZW5BY2NvdW50ISxcbiAgICAgICk7XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIFJldHJ5IGZ1bmN0aW9uIGlmIGNyZWF0ZSBuZXcgdG9rZW4gYWNjb3VpbnRcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBtaW50XG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAgICogQHBhcmFtIHtTZWNyZXR9IGZlZVBheWVyXG4gICAgICogQHJldHVybnMgUHJvbWlzZTxzdHJpbmc+XG4gICAgICovXG4gICAgZXhwb3J0IGNvbnN0IHJldHJ5R2V0T3JDcmVhdGUgPSBhc3luYyAoXG4gICAgICBtaW50OiBQdWJrZXksXG4gICAgICBvd25lcjogUHVia2V5LFxuICAgICAgZmVlUGF5ZXI6IFNlY3JldCxcbiAgICApOiBQcm9taXNlPHN0cmluZz4gPT4ge1xuICAgICAgbGV0IGNvdW50ZXIgPSAxO1xuICAgICAgd2hpbGUgKGNvdW50ZXIgPCBSRVRSWV9PVkVSX0xJTUlUKSB7XG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgY29uc3QgaW5zdCA9IGF3YWl0IGdldChtaW50LCBvd25lciwgZmVlUGF5ZXIsIHRydWUpO1xuXG4gICAgICAgICAgaWYgKGluc3QgJiYgdHlwZW9mIGluc3QgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICBkZWJ1Z0xvZygnIyBhc3NvY2lhdGVkVG9rZW5BY2NvdW50OiAnLCBpbnN0KTtcbiAgICAgICAgICAgIHJldHVybiBpbnN0O1xuICAgICAgICAgIH0gZWxzZSBpZiAoaW5zdCBpbnN0YW5jZW9mIFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb24pIHtcbiAgICAgICAgICAgIChhd2FpdCBpbnN0LnN1Ym1pdCgpKS5tYXAoXG4gICAgICAgICAgICAgIGFzeW5jIChvazogc3RyaW5nKSA9PiB7XG4gICAgICAgICAgICAgICAgYXdhaXQgTm9kZS5jb25maXJtZWRTaWcob2spO1xuICAgICAgICAgICAgICAgIHJldHVybiBpbnN0LmRhdGE7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIChlcnI6IEVycm9yKSA9PiB7XG4gICAgICAgICAgICAgICAgZGVidWdMb2coJyMgRXJyb3Igc3VibWl0IHJldHJ5R2V0T3JDcmVhdGU6ICcsIGVycik7XG4gICAgICAgICAgICAgICAgdGhyb3cgZXJyO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICBkZWJ1Z0xvZyhgIyByZXRyeTogJHtjb3VudGVyfSBjcmVhdGUgdG9rZW4gYWNjb3VudDogYCwgZSk7XG4gICAgICAgICAgZGVidWdMb2coYCMgbWludDogJHttaW50fSwgb3duZXI6ICR7b3duZXJ9LCBmZWVQYXllcjogJHtmZWVQYXllcn1gKTtcbiAgICAgICAgfVxuICAgICAgICBhd2FpdCBzbGVlcChSRVRSWV9TTEVFUF9USU1FKTtcbiAgICAgICAgY291bnRlcisrO1xuICAgICAgfVxuICAgICAgdGhyb3cgRXJyb3IoYHJldHJ5I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Y2lhdGVkVG9rZW5BY2NvdW50OiAnLCBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCkpO1xuXG4gICAgICB0cnkge1xuICAgICAgICAvLyBEb250IHVzZSBSZXN1bHRcbiAgICAgICAgYXdhaXQgZ2V0QWNjb3VudChcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLmNvbW1pdG1lbnQsXG4gICAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICB0b2tlbkFjY291bnQ6IGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSxcbiAgICAgICAgICBpbnN0OiB1bmRlZmluZWQsXG4gICAgICAgIH07XG4gICAgICB9IGNhdGNoIChlcnJvcjogdW5rbm93bikge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuQWNjb3VudE5vdEZvdW5kRXJyb3IpICYmXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuSW52YWxpZEFjY291bnRPd25lckVycm9yKVxuICAgICAgICApIHtcbiAgICAgICAgICB0aHJvdyBFcnJvcignVW5leHBlY3RlZCBlcnJvcicpO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgcGF5ZXIgPSAhZmVlUGF5ZXIgPyBvd25lciA6IGZlZVBheWVyO1xuXG4gICAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVBc3NvY2lhdGVkVG9rZW5BY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgcGF5ZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdCxcbiAgICAgICAgfTtcbiAgICAgIH1cbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHsgS2V5cGFpciBhcyBPcmlnaW5hbCwgUHVibGljS2V5IH0gZnJvbSAnQHNvbGFuYS93ZWIzLmpzJztcbmltcG9ydCB7IFB1YmtleSwgU2VjcmV0IH0gZnJvbSAnfi90eXBlcy9hY2NvdW50JztcbmltcG9ydCBicyBmcm9tICdiczU4JztcblxuZXhwb3J0IG5hbWVzcGFjZSBBY2NvdW50IHtcbiAgZXhwb3J0IGNsYXNzIEtleXBhaXIge1xuICAgIHNlY3JldDogU2VjcmV0O1xuICAgIHB1YmtleTogUHVia2V5O1xuXG4gICAgY29uc3RydWN0b3IocGFyYW1zOiB7IHB1YmtleT86IFB1YmtleTsgc2VjcmV0OiBTZWNyZXQgfSkge1xuICAgICAgaWYgKCFwYXJhbXMucHVia2V5KSB7XG4gICAgICAgIGNvbnN0IGtleXBhaXIgPSBwYXJhbXMuc2VjcmV0LnRvS2V5cGFpcigpO1xuICAgICAgICB0aGlzLnB1YmtleSA9IGtleXBhaXIucHVibGljS2V5LnRvU3RyaW5nKCk7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICB0aGlzLnB1YmtleSA9IHBhcmFtcy5wdWJrZXk7XG4gICAgICB9XG4gICAgICB0aGlzLnNlY3JldCA9IHBhcmFtcy5zZWNyZXQ7XG4gICAgfVxuXG4gICAgdG9QdWJsaWNLZXkoKTogUHVibGljS2V5IHtcbiAgICAgIHJldH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Ymo7XG4gICAgICB9IGVsc2UgaWYgKG9iai52YWx1ZS5jYW5TdWJtaXQpIHtcbiAgICAgICAgZGVidWdMb2coJyMgUmVzdWx0IGJhdGNoIGNhblN1Ym1pdCcpO1xuICAgICAgICBjb25zdCBzaWcgPSBhd2FpdCAob2JqIGFzIFBhcnRpYWxTaWduU3RydWN0dXJlKS5zdWJtaXQoZmVlUGF5ZXIpO1xuICAgICAgICBpZiAoc2lnLmlzRXJyKSB7XG4gICAgICAgICAgcmV0dXJuIHNpZztcbiAgICAgICAgfVxuICAgICAgICBhd2FpdCBOb2RlLmNvbmZpcm1lZFNpZyhzaWcudmFsdWUpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgZGVidWdMb2coJyMgUmVzdWx0IGJhdGNoIG90aGVyIHRoYW4gY2FuU3VibWl0Jyk7XG4gICAgICAgIGlmICh0aGlzLmxlbmd0aCA9PSBpKSB7XG4gICAgICAgICAgLy8gbGFzdCBvYmplY3RcbiAgICAgICAgICByZXR1cm4gb2JqLnN1Ym1pdChmZWVQYXllcik7XG4gICAgICAgIH1cbiAgICAgICAgb2JqLnN1Ym1pdChmZWVQYXllcik7XG4gICAgICB9XG4gICAgICBpKys7XG4gICAgfVxuICB9IGVsc2Uge1xuICAgIGNvbnN0IGluc3RydWN0aW9uczogQ29tbW9uU3RydWN0dXJlIHwgTWludFN0cnVjdHVyZVtdID0gW107XG4gICAgZm9yIChjb25zdCBvYmogb2YgdGhpcykge1xuICAgICAgaWYgKG9iai5pc0Vycikge1xuICAgICAgICByZXR1cm4gb2JqO1xuICAgICAgfSBlbHNlIGlmIChvYmouaXNPaykge1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChvYmoudmFsdWUpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgcmV0dXJuIFJlc3VsdC5lcnIoRXJyb3IoJ09ubHkgQXJyYXkgSW5zdHJ1Y3Rpb24gb2JqZWN0JykpO1xuICAgICAgfVxuICAgIH1cbiAgICBkZWJ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VhaztcbiAgICAgICAgICBjYXNlICdyb3lhbHR5JzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEucm95YWx0eSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1JveWFsdHkobWV0YWRhdGEucm95YWx0eSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ25hbWUnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLm5hbWUpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNOYW1lKG1ldGFkYXRhLm5hbWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc3ltYm9sJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5zeW1ib2wpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTeW1ib2wobWV0YWRhdGEuc3ltYm9sKTtcbiAgICAgICAgICAgIH1cbiAgICAg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RlciIsICJOZnQiLCAiQ29udmVydGVyIiwgIk1lbW8iLCAiQ29udmVydGVyIiwgIk1pbnQiLCAiQ29udmVydGVyIiwgIlJlZ3VsYXJOZnRNZXRhZGF0YSIsICJDb252ZXJ0ZXIiLCAiUHJvcGVydGllcyIsICJDb252ZXJ0ZXIiLCAiVXNlcyIsICJDb252ZXJ0ZXIiLCAiVG9rZW5NZXRhZGF0YSIsICJDb252ZXJ0ZXIiLCAiVHJhbnNmZXJDaGVja2VkIiwgIkNvbnZlcnRlciIsICJUcmFuc2ZlciIsICJDb252ZXJ0ZXIiLCAiVmFsaWRhdG9yIiwgIk1lc3NhZ2UiLCAiQ29udmVydGVyIiwgIlByb3ZlbmFuY2VMYXllciIsICJ1cGxvYWRGaWxlIiwgIklyeXMiLCAiQXJ3ZWF2ZSIsICJpbXBvcnRfbmZ0IiwgIk5mdFN0b3JhZ2UiLCAiU3RvcmFnZSJdCn0K \ No newline at end of file diff --git a/packages/storage/dist/index.mjs b/packages/storage/dist/index.mjs index 0c74fd069..c6b3c0481 100644 --- a/packages/storage/dist/index.mjs +++ b/packages/storage/dist/index.mjs @@ -1,4 +1,4 @@ -// ../shared/src/constants.ts +// ../suite-utils/src/constants.ts import { PublicKey } from "@solana/web3.js"; import SolanaJsonConfig from "@solana-suite/config/load"; var Config = SolanaJsonConfig; @@ -280,62 +280,6 @@ var TransactionBuilder; TransactionBuilder7.Common = Common2; })(TransactionBuilder || (TransactionBuilder = {})); -// ../shared/src/shared.ts -var overwriteObject = (object, targets) => { - const that = object; - targets.forEach((target) => { - delete that[target.existsKey]; - that[target.will.key] = target.will.value; - }); - return that; -}; -var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { - if (Constants.isDebugging === "true" || process.env.DEBUG === "true") { - console.log("[DEBUG]", data1, data2, data3, data4); - } -}; -var sleep = async (sec) => { - return new Promise((r) => setTimeout(r, sec * 1e3)); -}; -var isBrowser = () => { - return typeof window !== "undefined" && typeof window.document !== "undefined"; -}; -var isNode = () => { - return typeof process !== "undefined" && process.versions != null && process.versions.node != null; -}; -var isPromise = (obj) => { - return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; -}; -function Try(input, finallyInput) { - try { - const v = input(); - if (isPromise(v)) { - return v.then( - (x) => Result.ok(x), - (err) => Result.err(err) - ); - } else { - return Result.ok(v); - } - } catch (e) { - if (e instanceof Error) { - return Result.err(e); - } - return Result.err(Error(e)); - } finally { - if (finallyInput) { - debugLog("# finally input:", finallyInput); - finallyInput(); - } - } -} -var convertTimestampToDateTime = (created_at) => { - if (created_at) { - return new Date(created_at * 1e3); - } - return; -}; - // ../transaction-builder/src/batch.ts var TransactionBuilder2; ((TransactionBuilder7) => { @@ -803,7 +747,63 @@ var TransactionBuilder6 = { ...TransactionBuilder4 }; -// ../shared/src/result.ts +// ../suite-utils/src/shared.ts +var overwriteObject = (object, targets) => { + const that = object; + targets.forEach((target) => { + delete that[target.existsKey]; + that[target.will.key] = target.will.value; + }); + return that; +}; +var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { + if (Constants.isDebugging === "true" || process.env.DEBUG === "true") { + console.log("[DEBUG]", data1, data2, data3, data4); + } +}; +var sleep = async (sec) => { + return new Promise((r) => setTimeout(r, sec * 1e3)); +}; +var isBrowser = () => { + return typeof window !== "undefined" && typeof window.document !== "undefined"; +}; +var isNode = () => { + return typeof process !== "undefined" && process.versions != null && process.versions.node != null; +}; +var isPromise = (obj) => { + return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; +}; +function Try(input, finallyInput) { + try { + const v = input(); + if (isPromise(v)) { + return v.then( + (x) => Result.ok(x), + (err) => Result.err(err) + ); + } else { + return Result.ok(v); + } + } catch (e) { + if (e instanceof Error) { + return Result.err(e); + } + return Result.err(Error(e)); + } finally { + if (finallyInput) { + debugLog("# finally input:", finallyInput); + finallyInput(); + } + } +} +var convertTimestampToDateTime = (created_at) => { + if (created_at) { + return new Date(created_at * 1e3); + } + return; +}; + +// ../suite-utils/src/result.ts var AbstractResult = class { unwrap(ok, err) { const r = this._chain( @@ -915,15 +915,15 @@ var InternalErr = class extends AbstractResult { } }; var Result; -((Result9) => { +((Result10) => { function ok(value) { return new InternalOk(value); } - Result9.ok = ok; + Result10.ok = ok; function err(error) { return new InternalErr(error || Error()); } - Result9.err = err; + Result10.err = err; function all(obj) { if (Array.isArray(obj)) { const resArr = []; @@ -933,7 +933,7 @@ var Result; } resArr.push(item.value); } - return Result9.ok(resArr); + return Result10.ok(resArr); } const res = {}; const keys = Object.keys(obj); @@ -944,9 +944,9 @@ var Result; } res[key] = item.value; } - return Result9.ok(res); + return Result10.ok(res); } - Result9.all = all; + Result10.all = all; })(Result || (Result = {})); // ../converter/src/collection.ts @@ -1740,4 +1740,4 @@ export { ProvenanceLayer, Storage }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vc2hhcmVkL3NyYy9jb25zdGFudHMudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvYmF0Y2gudHMiLCAiLi4vLi4vbm9kZS9zcmMvaW5kZXgudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY29tbW9uLnRzIiwgIi4uLy4uL3NoYXJlZC9zcmMvc2hhcmVkLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL21pbnQudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvcGFydGlhbC1zaWduLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2NhbGN1bGF0ZS10eHNpemUudHMiLCAiLi4vLi4vZ2xvYmFsL3NyYy9pbmRleC50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9hc3NvY2lhdGVkLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2tleXBhaXIudHMiLCAiLi4vLi4vYWNjb3VudC9zcm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lhdGVkIHtcbiAgICBjb25zdCBSRVRSWV9PVkVSX0xJTUlUID0gMTA7XG4gICAgY29uc3QgUkVUUllfU0xFRVBfVElNRSA9IDM7XG4gICAgLy9AaW50ZXJuYWxcbiAgICBjb25zdCBnZXQgPSBhc3luYyAoXG4gICAgICBtaW50OiBQdWJrZXksXG4gICAgICBvd25lcjogUHVia2V5LFxuICAgICAgZmVlUGF5ZXI6IFNlY3JldCxcbiAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSA9IGZhbHNlLFxuICAgICk6IFByb21pc2U8c3RyaW5nIHwgQ29tbW9uU3RydWN0dXJlPFB1YmtleT4+ID0+IHtcbiAgICAgIGNvbnN0IHJlcyA9IGF3YWl0IG1ha2VPckNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICBtaW50LFxuICAgICAgICBvd25lcixcbiAgICAgICAgbmV3IEtleXBhaXIuS2V5cGFpcih7IHNlY3JldDogZmVlUGF5ZXIgfSkucHVia2V5LFxuICAgICAgICBhbGxvd093bmVyT2ZmQ3VydmUsXG4gICAgICApO1xuXG4gICAgICBpZiAoIXJlcy5pbnN0KSB7XG4gICAgICAgIHJldHVybiByZXMudG9rZW5BY2NvdW50O1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb248UHVia2V5PihcbiAgICAgICAgW3Jlcy5pbnN0XSxcbiAgICAgICAgW10sXG4gICAgICAgIGZlZVBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICByZXMudG9rZW5BY2NvdW50ISxcbiAgICAgICk7XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIFJldHJ5IGZ1bmN0aW9uIGlmIGNyZWF0ZSBuZXcgdG9rZW4gYWNjb3VpbnRcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBtaW50XG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAgICogQHBhcmFtIHtTZWNyZXR9IGZlZVBheWVyXG4gICAgICogQHJldHVybnMgUHJvbWlzZTxzdHJpbmc+XG4gICAgICovXG4gICAgZXhwb3J0IGNvbnN0IHJldHJ5R2V0T3JDcmVhdGUgPSBhc3luYyAoXG4gICAgICBtaW50OiBQdWJrZXksXG4gICAgICBvd25lcjogUHVia2V5LFxuICAgICAgZmVlUGF5ZXI6IFNlY3JldCxcbiAgICApOiBQcm9taXNlPHN0cmluZz4gPT4ge1xuICAgICAgbGV0IGNvdW50ZXIgPSAxO1xuICAgICAgd2hpbGUgKGNvdW50ZXIgPCBSRVRSWV9PVkVSX0xJTUlUKSB7XG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgY29uc3QgaW5zdCA9IGF3YWl0IGdldChtaW50LCBvd25lciwgZmVlUGF5ZXIsIHRydWUpO1xuXG4gICAgICAgICAgaWYgKGluc3QgJiYgdHlwZW9mIGluc3QgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICBkZWJ1Z0xvZygnIyBhc3NvY2lhdGVkVG9rZW5BY2NvdW50OiAnLCBpbnN0KTtcbiAgICAgICAgICAgIHJldHVybiBpbnN0O1xuICAgICAgICAgIH0gZWxzZSBpZiAoaW5zdCBpbnN0YW5jZW9mIFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb24pIHtcbiAgICAgICAgICAgIChhd2FpdCBpbnN0LnN1Ym1pdCgpKS5tYXAoXG4gICAgICAgICAgICAgIGFzeW5jIChvazogc3RyaW5nKSA9PiB7XG4gICAgICAgICAgICAgICAgYXdhaXQgTm9kZS5jb25maXJtZWRTaWcob2spO1xuICAgICAgICAgICAgICAgIHJldHVybiBpbnN0LmRhdGE7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIChlcnI6IEVycm9yKSA9PiB7XG4gICAgICAgICAgICAgICAgZGVidWdMb2coJyMgRXJyb3Igc3VibWl0IHJldHJ5R2V0T3JDcmVhdGU6ICcsIGVycik7XG4gICAgICAgICAgICAgICAgdGhyb3cgZXJyO1xuICAgICA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9mIFRva2VuSW52YWxpZEFjY291bnRPd25lckVycm9yKVxuICAgICAgICApIHtcbiAgICAgICAgICB0aHJvdyBFcnJvcignVW5leHBlY3RlZCBlcnJvcicpO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgcGF5ZXIgPSAhZmVlUGF5ZXIgPyBvd25lciA6IGZlZVBheWVyO1xuXG4gICAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVBc3NvY2lhdGVkVG9rZW5BY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgcGF5ZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdCxcbiAgICAgICAgfTtcbiAgICAgIH1cbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHsgS2V5cGFpciBhcyBPcmlnaW5hbCwgUHVibGljS2V5IH0gZnJvbSAnQHNvbGFuYS93ZWIzLmpzJztcbmltcG9ydCB7IFB1YmtleSwgU2VjcmV0IH0gZnJvbSAnfi90eXBlcy9hY2NvdW50JztcbmltcG9ydCBicyBmcm9tICdiczU4JztcblxuZXhwb3J0IG5hbWVzcGFjZSBBY2NvdW50IHtcbiAgZXhwb3J0IGNsYXNzIEtleXBhaXIge1xuICAgIHNlY3JldDogU2VjcmV0O1xuICAgIHB1YmtleTogUHVia2V5O1xuXG4gICAgY29uc3RydWN0b3IocGFyYW1zOiB7IHB1YmtleT86IFB1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dGEnKSxcbiAgICAgICAgICBQUk9HUkFNX0lELnRvQnVmZmVyKCksXG4gICAgICAgICAgYWRkcmVzcy50b1B1YmxpY0tleSgpLnRvQnVmZmVyKCksXG4gICAgICAgIF0sXG4gICAgICAgIFBST0dSQU1fSUQsXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGdldE1hc3RlckVkaXRpb24gPSAoYWRkcmVzczogUHVia2V5KTogUHVibGljS2V5ID0+IHtcbiAgICAgIGNvbnN0IFtwdWJsaWNLZXldID0gUHVibGljS2V5LmZpbmRQcm9ncmFtQWRkcmVzc1N5bmMoXG4gICAgICAgIFtcbiAgICAgICAgICBCdWZmZXIuZnJvbSgnbWV0YWRhdGEnKSxcbiAgICAgICAgICBQUk9HUkFNX0lELnRvQnVmZmVyKCksXG4gICAgICAgICAgYWRkcmVzcy50b1B1YmxpY0tleSgpLnRvQnVmZmVyKCksXG4gICAgICAgICAgQnVmZmVyLmZyb20oJ2VkaXRpb24nKSxcbiAgICAgICAgXSxcbiAgICAgICAgUFJPR1JBTV9JRCxcbiAgICAgICk7XG4gICAgICByZXR1cm4gcHVibGljS2V5O1xuICAgIH07XG5cbiAgICBleHBvcnQgY29uc3QgZ2V0VHJlZUF1dGhvcml0eSA9IChhZGRyZXNzOiBQdWJrZXkpOiBQdWJsaWNLZXkgPT4ge1xuICAgICAgY29uc3QgW3B1YmxpY0tleV0gPSBQdWJsaWNLZXkuZmluZFByb2dyYW1BZGRyZXNzU3luYyhcbiAgICAgICAgW2FkZHJlc3MudG9QdWJsaWNLZXkoKS50b0J1ZmZlcigpXSxcbiAgICAgICAgTVBMX0JVQkJMRUdVTV9QUk9HUkFNX0lELnRvUHVibGljS2V5KCksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGdldEJndW1TaWduZXIgPSAoKTogUHVib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JveWFsdHkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEuc3ltYm9sKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU3ltYm9sKG1ldGFkYXRhLnN5bWJvbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAocmVzICYmIHJlcy5pc0Vycikge1xuICAgICAgICAgIHJlc3VsdHMucHVzaCguLi5yZXMuZXJyb3IuZGV0YWlscyk7XG4gICAgICAgIH1cbiAgICAgIH0pO1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WlsZGVyIiwgIlJlc3VsdCIsICJDb252ZXJ0ZXIiLCAiQ29sbGVjdGlvbiIsICJDb2xsZWN0aW9uTWludCIsICJDb252ZXJ0ZXIiLCAiQ3JlYXRvcnMiLCAiQ29udmVydGVyIiwgIkNvbXByZXNzZWROZnRNZXRhZGF0YSIsICJDb252ZXJ0ZXIiLCAiUm95YWx0eSIsICJDb252ZXJ0ZXIiLCAiTmZ0IiwgIkNvbnZlcnRlciIsICJNZW1vIiwgIkNvbnZlcnRlciIsICJNaW50IiwgIkNvbnZlcnRlciIsICJSZWd1bGFyTmZ0TWV0YWRhdGEiLCAiQ29udmVydGVyIiwgIlByb3BlcnRpZXMiLCAiQ29udmVydGVyIiwgIlVzZXMiLCAiQ29udmVydGVyIiwgIlRva2VuTWV0YWRhdGEiLCAiQ29udmVydGVyIiwgIlRyYW5zZmVyQ2hlY2tlZCIsICJDb252ZXJ0ZXIiLCAiVHJhbnNmZXIiLCAiQ29udmVydGVyIiwgIlZhbGlkYXRvciIsICJNZXNzYWdlIiwgIkNvbnZlcnRlciIsICJQcm92ZW5hbmNlTGF5ZXIiLCAidXBsb2FkRmlsZSIsICJBcndlYXZlIiwgIk5mdFN0b3JhZ2UiLCAiU3RvcmFnZSJdCn0K \ No newline at end of file +//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9iYXRjaC50cyIsICIuLi8uLi9ub2RlL3NyYy9pbmRleC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jb21tb24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvbWludC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9wYXJ0aWFsLXNpZ24udHMiLCAiLi4vLi4vdHJhbnN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BleHBvcnQgY2xhc3MgQmF0Y2gge1xuICAgIHN1Ym1pdCA9IGFzeW5jIChcbiAgICAgIGFycjogQ29tbW9uLkNvbW1vbltdIHwgTWludC5NaW50W10sXG4gICAgKTogUHJvbWlzZTxSZXN1bHQ8VHJhbnNhY3Rpb25TaWduYXR1cmUsIEVycm9yPj4gPT4ge1xuICAgICAgcmV0dXJuIFRyeShhc3luYyAoKSA9PiB7XG4gICAgICAgIGxldCBpID0gMDtcbiAgICAgICAgZm9yIChjb25zdCBhIG9mIGFycikge1xuICAgICAgICAgIGlmICghYS5pbnN0cnVjdGlvbnMgJiYgIWEuc2lnbmVycykge1xuICAgICAgICAgICAgdGhyb3cgRXJyb3IoXG4gICAgICAgICAgICAgIGBvbmx5IEluc3RydWN0aW9uIG9iamVjdCB0aGF0IGNhbiB1c2UgYmF0Y2hTdWJtaXQoKS5cbiAgICAgICAgICAgIEluZGV4OiAke2l9LCBTZXQgdmFsdWU6ICR7SlNPTi5zdHJpbmdpZnkoYSl9YCxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIGkrKztcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IGluc3RydWN0aW9ucyA9IGFyci5mbGF0TWFwKChhKSA9PiBhLmluc3RydWN0aW9ucyk7XG4gICAgICAgIGNvbnN0IHNpZ25lcnMgPSBhcnIuZmxhdE1hcCgoYSkgPT4gYS5zaWduZXJzKTtcbiAgICAgICAgY29uc3QgZmVlUGF5ZXJzID0gYXJyLmZpbHRlcigoYSkgPT4gYS5mZWVQYXllciAhPT0gdW5kZWZpbmVkKTtcbiAgICAgICAgbGV0IGZlZVBheWVyID0gc2lnbmVyc1swXTtcbiAgICAgICAgaWYgKGZlZVBheWVycy5sZW5ndGggPiAwICYmIGZlZVBheWVyc1swXS5mZWVQYXllcikge1xuICAgICAgICAgIGZlZVBheWVyID0gZmVlUGF5ZXJzWzBdLmZlZVBheWVyO1xuICAgICAgICB9XG5cbiAgICAgICAgY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lsZSAoY291bnRlciA8IFJFVFJZX09WRVJfTElNSVQpIHtcbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICBjb25zdCBpbnN0ID0gYXdhaXQgZ2V0KG1pbnQsIG93bmVyLCBmZWVQYXllciwgdHJ1ZSk7XG5cbiAgICAgICAgICBpZiAoaW5zdCAmJiB0eXBlb2YgaW5zdCA9PT0gJ3N0cmluZycpIHtcbiAgICAgICAgICAgIGRlYnVnTG9nKCcjIGFzc29jaWF0ZWRUb2tlbkFjY291bnQ6ICcsIGluc3QpO1xuICAgICAgICAgICAgcmV0dXJuIGluc3Q7XG4gICAgICAgICAgfSBlbHNlIGlmIChpbnN0IGluc3RhbmNlb2YgVHJhbnNhY3Rpb25CdWlsZGVyLkNvbW1vbikge1xuICAgICAgICAgICAgKGF3YWl0IGluc3Quc3VibWl0KCkpLm1hcChcbiAgICAgICAgICAgICAgYXN5bmMgKG9rOiBzdHJpbmcpID0+IHtcbiAgICAgICAgICAgICAgICBhd2FpdCBOb2RlLmNvbmZpcm1lZFNpZyhvayk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGluc3QuZGF0YTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgKGVycjogRXJyb3IpID0+IHtcbiAgICAgICAgICAgICAgICBkZWJ1Z0xvZygnIyBFcnJvciBzdWJtaXQgcmV0cnlHZXRPckNyZWF0ZTogJywgZXJyKTtcbiAgICAgICAgICAgICAgICB0aHJvdyBlcnI7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgIGRlYnVnTG9nKGAjIHJldHJ5OiAke2NvdW50ZXJ9IGNyZWF0ZSB0b2tlbiBhY2NvdW50OiBgLCBlKTtcbiAgICAgICAgICBkZWJ1Z0xvZyhgIyBtaW50OiAke21pbnR9LCBvd25lcjogJHtvd25lcn0sIGZlZVBheWVyOiAke2ZlZVBheWVyfWApO1x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S0VOX1BST0dSQU1fSUQsXG4gICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGFzc29jaWF0ZWRUb2tlbkFjY291bnQ6ICcsIGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSk7XG5cbiAgICAgIHRyeSB7XG4gICAgICAgIC8vIERvbnQgdXNlIFJlc3VsdFxuICAgICAgICBhd2FpdCBnZXRBY2NvdW50KFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCkuY29tbWl0bWVudCxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3Q6IHVuZGVmaW5lZCxcbiAgICAgICAgfTtcbiAgICAgIH0gY2F0Y2ggKGVycm9yOiB1bmtub3duKSB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5BY2NvdW50Tm90Rm91bmRFcnJvcikgJiZcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5JbnZhbGlkQWNjb3VudE93bmVyRXJyb3IpXG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9yKCdVbmV4cGVjdGVkIGVycm9yJyk7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBwYXllciA9ICFmZWVQYXllciA/IG93bmVyIDogZmVlUGF5ZXI7XG5cbiAgICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihcbiAgICAg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ltYWdlVXJsKG1ldGFkYXRhLmltYWdlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3JveWFsdHknOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5yb3lhbHR5KSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzUm95YWx0eShtZXRhZGF0YS5yb3lhbHR5KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlcl9mZWVfYmFzaXNfcG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJGZWVCYXNpc1BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0YWRhdGEubmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzeW1ib2wnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLnN5bWJvbCkge1xuICAgICAgICAgICAgIC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JQdWJsaWNLZXkiLCAiQWNjb3VudCIsICJLZXlwYWlyIiwgIkFjY291bnQiLCAiQXNzb2NpYXRlZCIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiUHVibGljS2V5IiwgIkFjY291bnQiLCAiUGRhIiwgIkFjY291bnQiLCAiYnMiLCAiQWNjb3VudCIsICJQdWJsaWNLZXkiLCAiS2V5cGFpciIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlJlc3VsdCIsICJDb252ZXJ0ZXIiLCAiQ29sbGVjdGlvbiIsICJDb2xsZWN0aW9uTWludCIsICJDb252ZXJ0ZXIiLCAiQ3JlYXRvcnMiLCAiQ29udmVydGVyIiwgIkNvbXByZXNzZWROZnRNZXRhZGF0YSIsICJDb252ZXJ0ZXIiLCAiUm95YWx0eSIsICJDb252ZXJ0ZXIiLCAiTmZ0IiwgIkNvbnZlcnRlciIsICJNZW1vIiwgIkNvbnZlcnRlciIsICJNaW50IiwgIkNvbnZlcnRlciIsICJSZWd1bGFyTmZ0TWV0YWRhdGEiLCAiQ29udmVydGVyIiwgIlByb3BlcnRpZXMiLCAiQ29udmVydGVyIiwgIlVzZXMiLCAiQ29udmVydGVyIiwgIlRva2VuTWV0YWRhdGEiLCAiQ29udmVydGVyIiwgIlRyYW5zZmVyQ2hlY2tlZCIsICJDb252ZXJ0ZXIiLCAiVHJhbnNmZXIiLCAiQ29udmVydGVyIiwgIlZhbGlkYXRvciIsICJNZXNzYWdlIiwgIkNvbnZlcnRlciIsICJQcm92ZW5hbmNlTGF5ZXIiLCAidXBsb2FkRmlsZSIsICJBcndlYXZlIiwgIk5mdFN0b3JhZ2UiLCAiU3RvcmFnZSJdCn0K \ No newline at end of file diff --git a/packages/suite-airdrop/dist/index.js b/packages/suite-airdrop/dist/index.js index 5e878cc71..7cb7783a0 100644 --- a/packages/suite-airdrop/dist/index.js +++ b/packages/suite-airdrop/dist/index.js @@ -34,7 +34,7 @@ __export(src_exports, { }); module.exports = __toCommonJS(src_exports); -// ../shared/src/constants.ts +// ../suite-utils/src/constants.ts var import_web3 = require("@solana/web3.js"); var import_load = __toESM(require("@solana-suite/config/load")); var Config = import_load.default; @@ -310,56 +310,6 @@ var TransactionBuilder; TransactionBuilder7.Common = Common2; })(TransactionBuilder || (TransactionBuilder = {})); -// ../shared/src/shared.ts -var overwriteObject = (object, targets) => { - const that = object; - targets.forEach((target) => { - delete that[target.existsKey]; - that[target.will.key] = target.will.value; - }); - return that; -}; -var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { - if (Constants.isDebugging === "true" || process.env.DEBUG === "true") { - console.log("[DEBUG]", data1, data2, data3, data4); - } -}; -var sleep = async (sec) => { - return new Promise((r) => setTimeout(r, sec * 1e3)); -}; -var isPromise = (obj) => { - return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; -}; -function Try(input, finallyInput) { - try { - const v = input(); - if (isPromise(v)) { - return v.then( - (x) => Result.ok(x), - (err) => Result.err(err) - ); - } else { - return Result.ok(v); - } - } catch (e) { - if (e instanceof Error) { - return Result.err(e); - } - return Result.err(Error(e)); - } finally { - if (finallyInput) { - debugLog("# finally input:", finallyInput); - finallyInput(); - } - } -} -var convertTimestampToDateTime = (created_at) => { - if (created_at) { - return new Date(created_at * 1e3); - } - return; -}; - // ../transaction-builder/src/batch.ts var TransactionBuilder2; ((TransactionBuilder7) => { @@ -814,7 +764,57 @@ var TransactionBuilder6 = { ...TransactionBuilder4 }; -// ../shared/src/result.ts +// ../suite-utils/src/shared.ts +var overwriteObject = (object, targets) => { + const that = object; + targets.forEach((target) => { + delete that[target.existsKey]; + that[target.will.key] = target.will.value; + }); + return that; +}; +var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { + if (Constants.isDebugging === "true" || process.env.DEBUG === "true") { + console.log("[DEBUG]", data1, data2, data3, data4); + } +}; +var sleep = async (sec) => { + return new Promise((r) => setTimeout(r, sec * 1e3)); +}; +var isPromise = (obj) => { + return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; +}; +function Try(input, finallyInput) { + try { + const v = input(); + if (isPromise(v)) { + return v.then( + (x) => Result.ok(x), + (err) => Result.err(err) + ); + } else { + return Result.ok(v); + } + } catch (e) { + if (e instanceof Error) { + return Result.err(e); + } + return Result.err(Error(e)); + } finally { + if (finallyInput) { + debugLog("# finally input:", finallyInput); + finallyInput(); + } + } +} +var convertTimestampToDateTime = (created_at) => { + if (created_at) { + return new Date(created_at * 1e3); + } + return; +}; + +// ../suite-utils/src/result.ts var AbstractResult = class { unwrap(ok, err) { const r = this._chain( @@ -926,15 +926,15 @@ var InternalErr = class extends AbstractResult { } }; var Result; -((Result8) => { +((Result9) => { function ok(value) { return new InternalOk(value); } - Result8.ok = ok; + Result9.ok = ok; function err(error) { return new InternalErr(error || Error()); } - Result8.err = err; + Result9.err = err; function all(obj) { if (Array.isArray(obj)) { const resArr = []; @@ -944,7 +944,7 @@ var Result; } resArr.push(item.value); } - return Result8.ok(resArr); + return Result9.ok(resArr); } const res = {}; const keys = Object.keys(obj); @@ -955,9 +955,9 @@ var Result; } res[key] = item.value; } - return Result8.ok(res); + return Result9.ok(res); } - Result8.all = all; + Result9.all = all; })(Result || (Result = {})); // ../converter/src/collection.ts @@ -1550,4 +1550,4 @@ var Airdrop; 0 && (module.exports = { Airdrop }); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uLy4uL3NoYXJlZC9zcmMvY29uc3RhbnRzLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2JhdGNoLnRzIiwgIi4uLy4uL25vZGUvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2NvbW1vbi50cyIsICIuLi8uLi9zaGFyZWQvc3JjL3NoYXJlZC50cyIsICIuLi8uLi90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WdodDtcbiAgICAgICAgdHJhbnNhY3Rpb24ucmVjZW50QmxvY2toYXNoID0gYmxvY2toYXNoT2JqLmJsb2NraGFzaDtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHRoaXMuc2lnbmVycztcblxuICAgICAgICBpZiAodGhpcy5mZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gdGhpcy5mZWVQYXllci5wdWJsaWNLZXk7XG4gICAgICAgICAgZmluYWxTaWduZXJzID0gW3RoaXMuZmVlUGF5ZXIsIC4uLnRoaXMuc2lnbmVyc107XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLmluc3RydWN0aW9ucy5mb3JFYWNoKChpbnN0KSA9PiB0cmFuc2FjdGlvbi5hZGQoaW5zdCkpO1xuXG4gICAgICAgIGNvbnN0IG9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IE1BWF9SRVRSSUVTLFxuICAgICAgICB9O1xuXG4gICAgICAgIGlmIChOb2RlLmdldENvbm5lY3Rpb24oKS5ycGNFbmRwb2ludCA9PT0gQ29uc3RhbnRzLkVuZFBvaW50VXJsLnByZCkge1xuICAgICAgICAgIGRlYnVnTG9nKCcjIENoYW5nZSBtZXRhcGxleCBjbHVzdGVyIG9uIG1haW5uZXQtYmV0YScpO1xuICAgICAgICAgIE5vZGUuY2hhbmdlQ29ubmVjdGlvbih7IGNsdXN0ZXI6IENvbnN0YW50cy5DbHVzdGVyLnByZE1ldGFwbGV4IH0pO1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgIG9wdGlvbnMsXG4gICAgICAgICk7XG4gICAgICB9KTtc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1ha2VPckNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICBtaW50LFxuICAgICAgICBvd25lcixcbiAgICAgICAgbmV3IEtleXBhaXIuS2V5cGFpcih7IHNlY3JldDogZmVlUGF5ZXIgfSkucHVia2V5LFxuICAgICAgICBhbGxvd093bmVyT2ZmQ3VydmUsXG4gICAgICApO1xuXG4gICAgICBpZiAoIXJlcy5pbnN0KSB7XG4gICAgICAgIHJldHVybiByZXMudG9rZW5BY2NvdW50O1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb248UHVia2V5PihcbiAgICAgICAgW3Jlcy5pbnN0XSxcbiAgICAgICAgW10sXG4gICAgICAgIGZlZVBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICByZXMudG9rZW5BY2NvdW50ISxcbiAgICAgICk7XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIFJldHJ5IGZ1bmN0aW9uIGlmIGNyZWF0ZSBuZXcgdG9rZW4gYWNjb3VpbnRcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBtaW50XG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAgICogQHBhcmFtIHtTZWNyZXR9IGZlZVBheWVyXG4gICAgICogQHJldHVybnMgUHJvbWlzZTxzdHJpbmc+XG4gICAgICovXG4gICAgZXhwb3J0IGNvbnN0IHJldHJ5R2V0T3JDcmVhdGUgPSBhc3luYyAoXG4gICAgICBtaW50OiBQdWJrZXksXG4gICAgICBvd25lcjogUHVia2V5LFxuICAgICAgZmVlUGF5ZXI6IFNlY3JldCxcbiAgICApOiBQcm9taXNlPHN0cmluZz4gPT4ge1xuICAgICAgbGV0IGNvdW50ZXIgPSAxO1xuICAgICAgd2hpbGUgKGNvdW50ZXIgPCBSRVRSWV9PVkVSX0xJTUlUKSB7XG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgY29uc3QgaW5zdCA9IGF3YWl0IGdldChtaW50LCBvd25lciwgZmVlUGF5ZXIsIHRydWUpO1xuXG4gICAgICAgICAgaWYgKGluc3QgJiYgdHlwZW9mIGluc3QgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICBkZWJ1Z0xvZygnIyBhc3NvY2lhdGVkVG9rZW5BY2NvdW50OiAnLCBpbnN0KTtcbiAgICAgICAgICAgIHJldHVybiBpbnN0O1xuICAgICAgICAgIH0gZWxzZSBpZiAoaW5zdCBpbnN0YW5jZW9mIFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb24pIHtcbiAgICAgICAgICAgIChhd2FpdCBpbnN0LnN1Ym1pdCgpKS5tYXAoXG4gICAgICAgICAgICAgIGFzeW5jIChvazogc3RyaW5nKSA9PiB7XG4gICAgICAgICAgICAgICAgYXdhaXQgTm9kZS5jb25maXJtZWRTaWcob2spO1xuICAgICAgICAgICAgICAgIHJldHVybiBpbnN0LmRhdGE7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIChlcnI6IEVycm9yKSA9PiB7XG4gICAgICAgICAgICAgICAgZGVidWdMb2coJyMgRXJyb3Igc3VibWl0IHJldHJ5R2V0T3JDcmVhdGU6ICcsIGVycik7XG4gICAgICAgICAgICAgICAgdGhyb3cgZXJyO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICBkZWJ1Z0xvZyhgIyByZXRyeTogJHtjb3VudGVyfSBjcmVhdGUgdG9rZW4gYWNjb3VudDogYCwgZSk7XG4gICAgICAgICAgZGVidWdMb2coYCMgbWludDogJHttaW50fSwgb3duZXI6ICR7b3duZXJ9LCBmZWVQYXllcjogJHtmZWVQYXllcn1gKTtcbiAgICAgICAgfVxuICAgICAgICBhd2FpdCBzbGVlcChSRVRSWV9TTEVFUF9USU1FKTtcbiAgICAgICAgY291bnRlcisrO1xuICAgICAgfVxuICAgICAgdGhyb3cgRXJyb3Io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nIyBhc3NvY2lhdGVkVG9rZW5BY2NvdW50OiAnLCBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCkpO1xuXG4gICAgICB0cnkge1xuICAgICAgICAvLyBEb250IHVzZSBSZXN1bHRcbiAgICAgICAgYXdhaXQgZ2V0QWNjb3VudChcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLmNvbW1pdG1lbnQsXG4gICAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICB0b2tlbkFjY291bnQ6IGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSxcbiAgICAgICAgICBpbnN0OiB1bmRlZmluZWQsXG4gICAgICAgIH07XG4gICAgICB9IGNhdGNoIChlcnJvcjogdW5rbm93bikge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuQWNjb3VudE5vdEZvdW5kRXJyb3IpICYmXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuSW52YWxpZEFjY291bnRPd25lckVycm9yKVxuICAgICAgICApIHtcbiAgICAgICAgICB0aHJvdyBFcnJvcignVW5leHBlY3RlZCBlcnJvcicpO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgcGF5ZXIgPSAhZmVlUGF5ZXIgPyBvd25lciA6IGZlZVBheWVyO1xuXG4gICAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVBc3NvY2lhdGVkVG9rZW5BY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgcGF5ZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdCxcbiAgICAgICAgfTtcbiAgICAgIH1cbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHsgS2V5cGFpciBhcyBPcmlnaW5hbCwgUHVibGljS2V5IH0gZnJvbSAnQHNvbGFuYS93ZWIzLmpzJztcbmltcG9ydCB7IFB1YmtleSwgU2VjcmV0IH0gZnJvbSAnfi90eXBlcy9hY2NvdW50JztcbmltcG9ydCBicyBmcm9tICdiczU4JztcblxuZXhwb3J0IG5hbWVzcGFjZSBBY2NvdW50IHtcbiAgZXhwb3J0IGNsYXNzIEtleXBhaXIge1xuICAgIHNlY3JldDogU2VjcmV0O1xuICAgIHB1YmtleTogUHVia2V5O1xuXG4gICAgY29uc3RydWN0b3IocGFyYW1zOiB7IHB1YmtleT86IFB1YmtleTsgc2VjcmV0OiBTZWNyZXQgfSkge1xuICAgICAgaWYgKCFwYXJhbXMucHVia2V5KSB7XG4gICAgICAgIGNvbnN0IGtleXBhaXIgPSBwYXJhbXMuc2VjcmV0LnRvS2V5cGFpcigpO1xuICAgICAgICB0aGlzLnB1YmtleSA9IGtleXBhaXIucHVibGljS2V5LnRvU3RyaW5nKCk7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICB0aGlzLnB1YmtleSA9IHBhcmFtcy5wdWJrZXk7XG4gICAgICB9XG4gICAgICB0aGlzLnNlY3JldCA9IHBhcmFtcy5zZWNyZXQ7XG4gICAgfVxuXG4gICAgdG9QdWJsaWNLZXkoKTogUHVibGljS2V5IHtcbiA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biAgICAgIGlucHV0OiBPcHRpb248SW5wdXRDcmVhdG9yc1tdPiB8IHVuZGVmaW5lZCxcbiAgICApOiBPcHRpb248SW50ZXJuYWxDcmVhdG9yc1tdPiA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBudWxsO1xuICAgICAgfVxuICAgICAgcmV0dXJuIGlucHV0Lm1hcCgoZGF0YSkgPT4ge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIGFkZHJlc3M6IGRhdGEuYWRkcmVzcy50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIHNoYXJlOiBkYXRhLnNoYXJlLFxuICAgICAgICAgIHZlcmlmaWVkOiBmYWxzZSxcbiAgICAgICAgfTtcbiAgICAgIH0pO1xuICAgIH07XG5cbiAgICBleHBvcnQgY29uc3QgaW50b0NvbXByZXNzZWROZnRJbmZyYSA9IChcbiAgICAgIGlucHV0OiBPcHRpb248SW5wdXRDcmVhdG9yc1tdPiB8IHVuZGVmaW5lZCxcbiAgICApOiBJbnRlcm5hbENyZWF0b3JzW10gPT4ge1xuICAgICAgaWYgKCFpbnB1dCkge1xuICAgICAgICByZXR1cm4gW107XG4gICAgICB9XG4gICAgICByZXR1cm4gaW5wdXQhLm1hcCgoZGF0YSkgPT4ge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIGFkZHJlc3M6IGRhdGEuYWRkcmVzcy50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIHNoYXJlOiBkYXRhLnNoYXJlLFxuICAgICAgICAgIHZlcmlmaWVkOiBmYWxzZSxcbiAgICAgICAgfTtcbiAgICAgIH0pO1xuICAgIH07XG5cbiAgICBleHBvcnQgY29uc3QgaW50b1VzZXIgPSAoXG4gICAgICBvdXRwdXQ6IE9wdGlvbjxJbnRlcm5hbENyZWF0b3JzW10+LFxuICAgICk6IENyZWF0b3JzW10gfCB1bmRlZmluZWQgPT4ge1xuICAgICAgaWYgKCFvdXRwdXQpIHtcbiAgICAg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ICAgICBjYWxsYmFja0Z1bmM6IChcbiAgICAgICAgZmlsZVBhdGg6IEZpbGVUeXBlLFxuICAgICAgICBzdG9yYWdlVHlwZTogU3RvcmFnZVR5cGUsXG4gICAgICAgIGZlZVBheWVyPzogU2VjcmV0LFxuICAgICAgKSA9PiBQcm9taXNlPFJlc3VsdDxzdHJpbmcsIEVycm9yPj4sXG4gICAgICBzdG9yYWdlVHlwZTogU3RvcmFnZVR5cGUsXG4gICAgICBmZWVQYXllcj86IFNlY3JldCxcbiAgICApOiBQcm9taXNlPFByb3BlcnRpZXM+ID0+IHtcbiAgICAgIGlmICghaW5wdXQgfHwgIWlucHV0LmZpbGVzKSB7XG4gICAgICAgIHJldHVybiB7fTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgZmlsZXMgPSBhd2FpdCBQcm9taXNlLmFsbChcbiAgICAgICAgaW5wdXQuZmlsZXMubWFwKGFzeW5jIChmaWxlKSA9PiB7XG4gICAgICAgICAgaWYgKCFmaWxlLmZpbGVQYXRoKSB7XG4gICAgICAgICAgICByZXR1cm4ge307XG4gICAgICAgICAgfVxuICAgICAgICAgIGNvbnN0IHJlcyA9IGF3YWl0IGNhbGxiYWNrRnVuYyhmaWxlLmZpbGVQYXRoLCBzdG9yYWdlVHlwZSwgZmVlUGF5ZXIpO1xuICAgICAgICAgIGlmIChyZXMuaXNFcnIpIHtcbiAgICAgICAgICAgIHRocm93IEVycm9yKHJlcy5lcnJvci5tZXNzYWdlKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgcmV0dXJuIG92ZXJ3cml0ZU9iamVjdChmaWxlLCBbXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGV4aXN0c0tleTogJ2ZpbGVQYXRoJyxcbiAgICAgICAgICAgICAgd2lsbDogeyBrZXk6ICd1cmknLCB2YWx1ZTogcmVzLnZhbHVlIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgIF0pO1xuICAgICAgICB9KSxcbiAgICAgICk7XG4gICAgICByZX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UG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEuc3ltYm9sKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU3ltYm9sKG1ldGFkYXRhLnN5bWJvbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAocmVzICYmIHJlcy5pc0Vycikge1xuICAgICAgICAgIHJlc3VsdHMucHVzaCguLi5yZXMuZXJyb3IuZGV0YWlscyk7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgICAgaWYgKHJlc3VsdHMubGVuZ3RoID4gMCkge1xuICAgICAgICBjb25zdCBtZXNzYWdlID1cbiAgICAgICAgICAnQ2F1Z2h0IGluIHRoZSB2YWxpZGF0aW9uIGVycm9ycy4gc2VlIGluZm9ybWF0aW9uIGUuZzogZXJyPFZhbGlkYXRvckVycm9yPi5kZXRhaWxzJztcbiAgICAgICAgdGhyb3cgbmV3IFZhbGlkYXRvckVycm9yKG1lc3NhZ2UsIHJlc3VsdHMpO1xuICAgICAgfVxuICAgICAgcmV0dXJuIE1lc3NhZ2UuU1VDQ0VTUztcbiAgICB9KTtcbiAgfTtcblxuICB0eXBlIFBpY2tOZnRTdG9yYWdlID0gUGljazxcbiAgIC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ICAgICByZXR1cm4gQ29uc3RhbnRzLkVuZFBvaW50VXJsLmRldjtcbiAgICAgIGRlZmF1bHQ6XG4gICAgICAgIHJldHVybiBDb25zdGFudHMuRW5kUG9pbnRVcmwubG9jYWxob3N0O1xuICAgIH1cbiAgfTtcblxuICBleHBvcnQgY29uc3Qgc3dpdGNoQnVuZGxyID0gKGVudjogc3RyaW5nKTogc3RyaW5nID0+IHtcbiAgICBzd2l0Y2ggKGVudikge1xuICAgICAgY2FzZSBDb25zdGFudHMuQ2x1c3Rlci5wcmQ6IHtcbiAgICAgICAgY29uc3QgdXJscyA9IENvbnN0YW50cy5CdW5kbHJVcmwucHJkLnNwbGl0KCcsJyk7XG4gICAgICAgIGNvbnN0IGluZGV4ID0gRGF0ZS5ub3coKSAlIHVybHMubGVuZ3RoO1xuICAgICAgICByZXR1cm4gdXJsc1tpbmRleF07XG4gICAgICB9XG4gICAgICBkZWZhdWx0OiB7XG4gICAgICAgIHJldHVybiBDb25zdGFudHMuQnVuZGxyVXJsLmRldjtcbiAgICAgIH1cbiAgICB9XG4gIH07XG5cbiAgZXhwb3J0IGNvbnN0IHN3aXRjaERhc0FwaSA9IChlbnY6IHN0cmluZyk6IHN0cmluZyA9PiB7XG4gICAgc3dpdGNoIChlbnYpIHtcbiAgICAgIGNhc2UgQ29uc3RhbnRzLkNsdXN0ZXIucHJkOiB7XG4gICAgICAgIGlmIChkYXNBcGlVcmwubGVuZ3RoIDwgMSkge1xuICAgICAgICAgIHRocm93IEVycm9yKENvbnN0YW50cy5XYXJubmluZ01lc3NhZ2UuREFTX0FQSV9VUkwpO1xuICAgICAgICB9XG4gICAgICAgIGNvbnN0IHVybHMgPSBDb25zdGFudHMuQnVuZGxyVXJsLnByZC5zcGxpdCgnLCcpO1xuICAgICAgICBjb25zdCBpbmRleCA9IERhdGUubm93KCkgJSB1cmxzLmxlbmd0aDtcbiAgICAgICAgcmV0dXJuIHVybHNbaW5kZXhdO1xuICAgICAgfVxuICAgICAgZGVmYXV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uICAgIC8vQGludGVybmFsXG4gICAgY29uc3QgZ2V0ID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyOiBTZWNyZXQsXG4gICAgICBhbGxvd093bmVyT2ZmQ3VydmUgPSBmYWxzZSxcbiAgICApOiBQcm9taXNlPHN0cmluZyB8IENvbW1vblN0cnVjdHVyZTxQdWJrZXk+PiA9PiB7XG4gICAgICBjb25zdCByZXMgPSBhd2FpdCBtYWtlT3JDcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIG5ldyBLZXlwYWlyLktleXBhaXIoeyBzZWNyZXQ6IGZlZVBheWVyIH0pLnB1YmtleSxcbiAgICAgICAgYWxsb3dPd25lck9mZkN1cnZlLFxuICAgICAgKTtcblxuICAgICAgaWYgKCFyZXMuaW5zdCkge1xuICAgICAgICByZXR1cm4gcmVzLnRva2VuQWNjb3VudDtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uPFB1YmtleT4oXG4gICAgICAgIFtyZXMuaW5zdF0sXG4gICAgICAgIFtdLFxuICAgICAgICBmZWVQYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgcmVzLnRva2VuQWNjb3VudCEsXG4gICAgICApO1xuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiBSZXRyeSBmdW5jdGlvbiBpZiBjcmVhdGUgbmV3IHRva2VuIGFjY291aW50XG4gICAgICpcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gbWludFxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBvd25lclxuICAgICAqIEBwYXJhbSB7U2VjcmV0fSBmZWVQYXllclxuICAgICAqIEByZXR1cm5zIFByb21pc2U8c3RyaW5nPlxuICAgICAqL1xuICAgIGV4cG9ydCBjb25zdCByZXRyeUdldE9yQ3JlYXRlID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyOiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxzdHJpbmc+ID0+IHtcbiAgICAgIGxldCBjb3VudGVyID0gMTtcbiAgICAgIHdoaWxlIChjb3VudGVyIDwgUkVUUllfT1ZFUl9MSU1JVCkge1xuICAgICAgICB0cnkge1xuICAgICAgICAgIGNvbnN0IGluc3QgPSBhd2FpdCBnZXQobWludCwgb3duZXIsIGZlZVBheWVyLCB0cnVlKTtcblxuICAgICAgICAgIGlmIChpbnN0ICYmIHR5cGVvZiBpbnN0ID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgaW5zdCk7XG4gICAgICAgICAgICByZXR1cm4gaW5zdDtcbiAgICAgICAgICB9IGVsc2UgaWYgKGluc3QgaW5zdGFuY2VvZiBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uKSB7XG4gICAgICAgICAgICAoYXdhaXQgaW5zdC5zdWJtaXQoKSkubWFwKFxuICAgICAgICAgICAgICBhc3luYyAob2s6IHN0cmluZykgPT4ge1xuICAgICAgICAgICAgICAgIGF3YWl0IE5vZGUuY29uZmlybWVkU2lnKG9rKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gaW5zdC5kYXRhO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAoZXJyOiBFcnJvcikgPT4ge1xuICAgICAgICAgICAgICAgIGRlYnVnTG9nKCcjIEVycm9yIHN1Ym1pdCByZXRyeUdldE9yQ3JlYXRlOiAnLCBlcnIpO1xuICAgICAgICAgICAgICAgIHRocm93IGVycjtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgZGVidWdMb2coYCMgcmV0cnk6ICR7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29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jKFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSxcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3QsXG4gICAgICAgIH07XG4gICAgICB9XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IEtleXBhaXIgYXMgT3JpZ2luYWwsIFB1YmxpY0tleSB9IGZyb20gJ0Bzb2xhbmEvd2ViMy5qcyc7XG5pbXBvcnQgeyBQdWJrZXksIFNlY3JldCB9IGZyb20gJ34vdHlwZXMvYWNjb3VudCc7XG5pbXBvcnQgYnMgZnJvbSAnYnM1OCc7XG5cbmV4cG9ydCBuYW1lc3BhY2UgQWNjb3VudCB7XG4gIGV4cG9ydCBjbGFzcyBLZXlwYWlyIHtcbiAgICBzZWNyZXQ6IFNlY3JldDtcbiAgICBwdWJrZXk6IFB1YmtleTtcblxuICAgIGNvbnN0cnVjdG9yKHBhcmFtczogeyBwdWJrZXk/OiBQdWJrZXk7IHNlY3JldDogU2VjcmV0IH0pIHtcbiAgICAgIGlmICghcGFyYW1zLnB1YmtleSkge1xuICAgICAgICBjb25zdCBrZXlwYWlyID0gcGFyYW1zLnNlY3JldC50b0tleXBhaXIoKTtc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aW5wdXQubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvQ29tcHJlc3NlZE5mdEluZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IEludGVybmFsQ3JlYXRvcnNbXSA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBbXTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBpbnB1dCEubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlciA9IChcbiAgICAgIG91dHB1dDogT3B0aW9uPEludGVybmFsQ3JlYXRvcnNbXT4sXG4gICAgKTogQ3JlYXRvcnNbXSB8IHVuZGVmaW5lZCA9PiB7XG4gICAgICBpZiAoIW91dHB1dCkge1xuICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gb3V0cHV0Lm1hcCgoZGF0YSkgPT4ge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIGFkZHJlc3M6IGRhdGEuYWRkcmVzcy50b1N0cmluZygpLFxuICAgICAgICAgIHNoYXJlOiBkYXRhLnNoYXJlL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nZVR5cGU6IFN0b3JhZ2VUeXBlLFxuICAgICAgZmVlUGF5ZXI/OiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxQcm9wZXJ0aWVzPiA9PiB7XG4gICAgICBpZiAoIWlucHV0IHx8ICFpbnB1dC5maWxlcykge1xuICAgICAgICByZXR1cm4ge307XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGZpbGVzID0gYXdhaXQgUHJvbWlzZS5hbGwoXG4gICAgICAgIGlucHV0LmZpbGVzLm1hcChhc3luYyAoZmlsZSkgPT4ge1xuICAgICAgICAgIGlmICghZmlsZS5maWxlUGF0aCkge1xuICAgICAgICAgICAgcmV0dXJuIHt9O1xuICAgICAgICAgIH1cbiAgICAgICAgICBjb25zdCByZXMgPSBhd2FpdCBjYWxsYmFja0Z1bmMoZmlsZS5maWxlUGF0aCwgc3RvcmFnZVR5cGUsIGZlZVBheWVyKTtcbiAgICAgICAgICBpZiAocmVzLmlzRXJyKSB7XG4gICAgICAgICAgICB0aHJvdyBFcnJvcihyZXMuZXJyb3IubWVzc2FnZSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBvdmVyd3JpdGVPYmplY3QoZmlsZSwgW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBleGlzdHNLZXk6ICdmaWxlUGF0aCcsXG4gICAgICAgICAgICAgIHdpbGw6IHsga2V5OiAndXJpJywgdmFsdWU6IHJlcy52YWx1ZSB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICBdKTtcbiAgICAgICAgfSksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHsgLi4uaW5wdXQsIGZpbGVzIH0gYXMgUHJvcGVydGllcztcbiAgICB9O1xuICB9XG59XG4iLCAiLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLXVudXNlZC12YXJzICovXG5pbXBvcnQgeyBPcHRpb24sIFVzZXMgfSBmcm9tICd+L3R5cGVzL3JlZ3VsYXItbmZ0Jztcblxu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a2V5LCBNZXNzYWdlLlNNQUxMX05VTUJFUiwgcm95YWx0eSwge1xuICAgICAgICAgIHRocmVzaG9sZDogUk9ZQUxUWV9NSU4sXG4gICAgICAgICAgY29uZGl0aW9uOiAndW5kZXJNaW4nLFxuICAgICAgICB9KTtcbiAgICAgIH0gZWxzZSBpZiAocm95YWx0eSA+IFJPWUFMVFlfTUFYKSB7XG4gICAgICAgIHRocm93IGNyZWF0ZUVycm9yKGtleSwgTWVzc2FnZS5CSUdfTlVNQkVSLCByb3lhbHR5LCB7XG4gICAgICAgICAgdGhyZXNob2xkOiBST1lBTFRZX01BWCxcbiAgICAgICAgICBjb25kaXRpb246ICdvdmVyTWF4JyxcbiAgICAgICAgfSk7XG4gICAgICB9XG4gICAgICByZXR1cm4gTWVzc2FnZS5TVUNDRVNTO1xuICAgIH0pO1xuICB9O1xuXG4gIGV4cG9ydCBjb25zdCBpc1NlbGxlckZlZUJhc2lzUG9pbnRzID0gKFxuICAgIHJveWFsdHk6IG51bWJlcixcbiAgKTogUmVzdWx0PHN0cmluZywgVmFsaWRhdG9yRXJyb3I+ID0+IHtcbiAgICByZXR1cm4gVHJ5KCgpID0+IHtcbiAgICAgIGNvbnN0IGtleSA9ICdzZWxsZXJGZWVCYXNpc1BvaW50cy9zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyc7XG4gICAgICBpZiAocm95YWx0eSAhPT0gMCAmJiAhcm95YWx0eSkge1xuICAgICAgICB0aHJvdyBjcmVhdGVFcnJvcihrZXksIE1lc3NhZ2UuRU1QVFksIHJveWFsdHkpO1xuICAgICAgfVxuICAgICAgaWYgKHJveWFsdHkgPCBST1lBTFRZX01JTikge1xuICAgICAgICB0aHJvdyBjcmVhdGVFcnJvcihrZXksIE1lc3NhZ2UuU01BTExfTlVNQkVSLCByb3lhbHR5LCB7XG4gICAgICAgICAgdGhyZXNob2xkOiBST1lBTFRZX01JTixcbiAgICAgICAgICBjb25kaXRpb246ICd1bmRlck1pbicsXG4gICAgICAgI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V0IHJlcyE6IFJlc3VsdDxzdHJpbmcsIFZhbGlkYXRvckVycm9yPjtcbiAgICAgICAgc3dpdGNoIChrZXkpIHtcbiAgICAgICAgICBjYXNlICdpbWFnZSc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLmltYWdlKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzSW1hZ2VVcmwobWV0YWRhdGEuaW1hZ2UpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAncm95YWx0eSc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnJveWFsdHkpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNSb3lhbHR5KG1ldGFkYXRhLnJveWFsdHkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGl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nQiLCAiQ29udmVydGVyIiwgIlJlZ3VsYXJOZnRNZXRhZGF0YSIsICJDb252ZXJ0ZXIiLCAiUHJvcGVydGllcyIsICJDb252ZXJ0ZXIiLCAiVXNlcyIsICJDb252ZXJ0ZXIiLCAiVG9rZW5NZXRhZGF0YSIsICJDb252ZXJ0ZXIiLCAiVHJhbnNmZXJDaGVja2VkIiwgIkNvbnZlcnRlciIsICJUcmFuc2ZlciIsICJDb252ZXJ0ZXIiLCAiVmFsaWRhdG9yIiwgIk1lc3NhZ2UiLCAiQ29udmVydGVyIiwgIkFpcmRyb3AiXQp9Cg== \ No newline at end of file diff --git a/packages/suite-airdrop/dist/index.mjs b/packages/suite-airdrop/dist/index.mjs index 206eac188..1c657a31e 100644 --- a/packages/suite-airdrop/dist/index.mjs +++ b/packages/suite-airdrop/dist/index.mjs @@ -1,4 +1,4 @@ -// ../shared/src/constants.ts +// ../suite-utils/src/constants.ts import { PublicKey } from "@solana/web3.js"; import SolanaJsonConfig from "@solana-suite/config/load"; var Config = SolanaJsonConfig; @@ -280,56 +280,6 @@ var TransactionBuilder; TransactionBuilder7.Common = Common2; })(TransactionBuilder || (TransactionBuilder = {})); -// ../shared/src/shared.ts -var overwriteObject = (object, targets) => { - const that = object; - targets.forEach((target) => { - delete that[target.existsKey]; - that[target.will.key] = target.will.value; - }); - return that; -}; -var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { - if (Constants.isDebugging === "true" || process.env.DEBUG === "true") { - console.log("[DEBUG]", data1, data2, data3, data4); - } -}; -var sleep = async (sec) => { - return new Promise((r) => setTimeout(r, sec * 1e3)); -}; -var isPromise = (obj) => { - return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; -}; -function Try(input, finallyInput) { - try { - const v = input(); - if (isPromise(v)) { - return v.then( - (x) => Result.ok(x), - (err) => Result.err(err) - ); - } else { - return Result.ok(v); - } - } catch (e) { - if (e instanceof Error) { - return Result.err(e); - } - return Result.err(Error(e)); - } finally { - if (finallyInput) { - debugLog("# finally input:", finallyInput); - finallyInput(); - } - } -} -var convertTimestampToDateTime = (created_at) => { - if (created_at) { - return new Date(created_at * 1e3); - } - return; -}; - // ../transaction-builder/src/batch.ts var TransactionBuilder2; ((TransactionBuilder7) => { @@ -797,7 +747,57 @@ var TransactionBuilder6 = { ...TransactionBuilder4 }; -// ../shared/src/result.ts +// ../suite-utils/src/shared.ts +var overwriteObject = (object, targets) => { + const that = object; + targets.forEach((target) => { + delete that[target.existsKey]; + that[target.will.key] = target.will.value; + }); + return that; +}; +var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { + if (Constants.isDebugging === "true" || process.env.DEBUG === "true") { + console.log("[DEBUG]", data1, data2, data3, data4); + } +}; +var sleep = async (sec) => { + return new Promise((r) => setTimeout(r, sec * 1e3)); +}; +var isPromise = (obj) => { + return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; +}; +function Try(input, finallyInput) { + try { + const v = input(); + if (isPromise(v)) { + return v.then( + (x) => Result.ok(x), + (err) => Result.err(err) + ); + } else { + return Result.ok(v); + } + } catch (e) { + if (e instanceof Error) { + return Result.err(e); + } + return Result.err(Error(e)); + } finally { + if (finallyInput) { + debugLog("# finally input:", finallyInput); + finallyInput(); + } + } +} +var convertTimestampToDateTime = (created_at) => { + if (created_at) { + return new Date(created_at * 1e3); + } + return; +}; + +// ../suite-utils/src/result.ts var AbstractResult = class { unwrap(ok, err) { const r = this._chain( @@ -909,15 +909,15 @@ var InternalErr = class extends AbstractResult { } }; var Result; -((Result8) => { +((Result9) => { function ok(value) { return new InternalOk(value); } - Result8.ok = ok; + Result9.ok = ok; function err(error) { return new InternalErr(error || Error()); } - Result8.err = err; + Result9.err = err; function all(obj) { if (Array.isArray(obj)) { const resArr = []; @@ -927,7 +927,7 @@ var Result; } resArr.push(item.value); } - return Result8.ok(resArr); + return Result9.ok(resArr); } const res = {}; const keys = Object.keys(obj); @@ -938,9 +938,9 @@ var Result; } res[key] = item.value; } - return Result8.ok(res); + return Result9.ok(res); } - Result8.all = all; + Result9.all = all; })(Result || (Result = {})); // ../converter/src/collection.ts @@ -1535,4 +1535,4 @@ var Airdrop; export { Airdrop }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vc2hhcmVkL3NyYy9jb25zdGFudHMudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvYmF0Y2gudHMiLCAiLi4vLi4vbm9kZS9zcmMvaW5kZXgudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY29tbW9uLnRzIiwgIi4uLy4uL3NoYXJlZC9zcmMvc2hhcmVkLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL21pbnQudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvcGFydGlhbC1zaWduLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2NhbGN1bGF0ZS10eHNpemUudHMiLCAiLi4vLi4vZ2xvYmFsL3NyYy9pbmRleC50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9hc3NvY2lhdGVkLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2tleXBhaXIudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvcGRhLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3NoYXJlZC9zcmMvcmVzdWx0LnRzIiwgIi4uLy4uL2NvbnZlcnRlci9zcmMvY29sbGVjdGlvbi50cyIsICIuLi8uLi9jb252ZXJ0ZXIvc3JjL2NyZWF0b3JzLnRzIiwgIi4uLy4uL2NvbnZlcnRlci9zcmMvY29tcHJlc3NlZC1uZnQtbWV0YWRhdGEudHMiLCAiLi4vLi4vY29udmV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oID0gYmxvY2toYXNoT2JqLmJsb2NraGFzaDtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHRoaXMuc2lnbmVycztcblxuICAgICAgICBpZiAodGhpcy5mZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gdGhpcy5mZWVQYXllci5wdWJsaWNLZXk7XG4gICAgICAgICAgZmluYWxTaWduZXJzID0gW3RoaXMuZmVlUGF5ZXIsIC4uLnRoaXMuc2lnbmVyc107XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLmluc3RydWN0aW9ucy5mb3JFYWNoKChpbnN0KSA9PiB0cmFuc2FjdGlvbi5hZGQoaW5zdCkpO1xuXG4gICAgICAgIGNvbnN0IG9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IE1BWF9SRVRSSUVTLFxuICAgICAgICB9O1xuXG4gICAgICAgIGlmIChOb2RlLmdldENvbm5lY3Rpb24oKS5ycGNFbmRwb2ludCA9PT0gQ29uc3RhbnRzLkVuZFBvaW50VXJsLnByZCkge1xuICAgICAgICAgIGRlYnVnTG9nKCcjIENoYW5nZSBtZXRhcGxleCBjbHVzdGVyIG9uIG1haW5uZXQtYmV0YScpO1xuICAgICAgICAgIE5vZGUuY2hhbmdlQ29ubmVjdGlvbih7IGNsdXN0ZXI6IENvbnN0YW50cy5DbHVzdGVyLnByZE1ldGFwbGV4IH0pO1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgIG9wdGlvbnMsXG4gICAgICAgICk7XG4gICAgICB9KTtcbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHtcbiAgQ29uZmlyb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AgICAgICBvd25lcixcbiAgICAgICAgbmV3IEtleXBhaXIuS2V5cGFpcih7IHNlY3JldDogZmVlUGF5ZXIgfSkucHVia2V5LFxuICAgICAgICBhbGxvd093bmVyT2ZmQ3VydmUsXG4gICAgICApO1xuXG4gICAgICBpZiAoIXJlcy5pbnN0KSB7XG4gICAgICAgIHJldHVybiByZXMudG9rZW5BY2NvdW50O1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb248UHVia2V5PihcbiAgICAgICAgW3Jlcy5pbnN0XSxcbiAgICAgICAgW10sXG4gICAgICAgIGZlZVBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICByZXMudG9rZW5BY2NvdW50ISxcbiAgICAgICk7XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIFJldHJ5IGZ1bmN0aW9uIGlmIGNyZWF0ZSBuZXcgdG9rZW4gYWNjb3VpbnRcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBtaW50XG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAgICogQHBhcmFtIHtTZWNyZXR9IGZlZVBheWVyXG4gICAgICogQHJldHVybnMgUHJvbWlzZTxzdHJpbmc+XG4gICAgICovXG4gICAgZXhwb3J0IGNvbnN0IHJldHJ5R2V0T3JDcmVhdGUgPSBhc3luYyAoXG4gICAgICBtaW50OiBQdWJrZXksXG4gICAgICBvd25lcjogUHVia2V5LFxuICAgICAgZmVlUGF5ZXI6IFNlY3JldCxcbiAgICApOiBQcm9taXNlPHN0cmluZz4gPT4ge1xuICAgICAgbGV0IGNvdW50ZXIgPSAxO1xuICAgICAgd2hpbGUgKGNvdW50ZXIgPCBSRVRSWV9PVkVSX0xJTUlUKSB7XG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgY29uc3QgaW5zdCA9IGF3YWl0IGdldChtaW50LCBvd25lciwgZmVlUGF5ZXIsIHRydWUpO1xuXG4gICAgICAgICAgaWYgKGluc3QgJiYgdHlwZW9mIGluc3QgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICBkZWJ1Z0xvZygnIyBhc3NvY2lhdGVkVG9rZW5BY2NvdW50OiAnLCBpbnN0KTtcbiAgICAgICAgICAgIHJldHVybiBpbnN0O1xuICAgICAgICAgIH0gZWxzZSBpZiAoaW5zdCBpbnN0YW5jZW9mIFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb24pIHtcbiAgICAgICAgICAgIChhd2FpdCBpbnN0LnN1Ym1pdCgpKS5tYXAoXG4gICAgICAgICAgICAgIGFzeW5jIChvazogc3RyaW5nKSA9PiB7XG4gICAgICAgICAgICAgICAgYXdhaXQgTm9kZS5jb25maXJtZWRTaWcob2spO1xuICAgICAgICAgICAgICAgIHJldHVybiBpbnN0LmRhdGE7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIChlcnI6IEVycm9yKSA9PiB7XG4gICAgICAgICAgICAgICAgZGVidWdMb2coJyMgRXJyb3Igc3VibWl0IHJldHJ5R2V0T3JDcmVhdGU6ICcsIGVycik7XG4gICAgICAgICAgICAgICAgdGhyb3cgZXJyO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICBkZWJ1Z0xvZyhgIyByZXRyeTogJHtjb3VudGVyfSBjcmVhdGUgdG9rZW4gYWNjb3VudDogYCwgZSk7XG4gICAgICAgICAgZGVidWdMb2coYCMgbWludDogJHttaW50fSwgb3duZXI6ICR7b3duZXJ9LCBmZWVQYXllcjogJHtmZWVQYXllcn1gKTtcbiAgICAgICAgfVxuICAgICAgICBhd2FpdCBzbGVlcChSRVRSWV9TTEVFUF9USU1FKTtcbiAgICAgICAgY291bnRlcisrO1xuICAgICAgfVxuICAgICAgdGhyb3cgRXJyb3IoYHJldHJ5IGFjdGlvbiBpcyBvdmVyIGxpbWl0ICR7UkVUUllfT1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GVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCkpO1xuXG4gICAgICB0cnkge1xuICAgICAgICAvLyBEb250IHVzZSBSZXN1bHRcbiAgICAgICAgYXdhaXQgZ2V0QWNjb3VudChcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLmNvbW1pdG1lbnQsXG4gICAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICB0b2tlbkFjY291bnQ6IGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSxcbiAgICAgICAgICBpbnN0OiB1bmRlZmluZWQsXG4gICAgICAgIH07XG4gICAgICB9IGNhdGNoIChlcnJvcjogdW5rbm93bikge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuQWNjb3VudE5vdEZvdW5kRXJyb3IpICYmXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuSW52YWxpZEFjY291bnRPd25lckVycm9yKVxuICAgICAgICApIHtcbiAgICAgICAgICB0aHJvdyBFcnJvcignVW5leHBlY3RlZCBlcnJvcicpO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgcGF5ZXIgPSAhZmVlUGF5ZXIgPyBvd25lciA6IGZlZVBheWVyO1xuXG4gICAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVBc3NvY2lhdGVkVG9rZW5BY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgcGF5ZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbWludC50b1B1YmxpY0tleSgpL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HVuZGVmaW5lZCxcbiAgICApOiBPcHRpb248SW50ZXJuYWxDcmVhdG9yc1tdPiA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBudWxsO1xuICAgICAgfVxuICAgICAgcmV0dXJuIGlucHV0Lm1hcCgoZGF0YSkgPT4ge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIGFkZHJlc3M6IGRhdGEuYWRkcmVzcy50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIHNoYXJlOiBkYXRhLnNoYXJlLFxuICAgICAgICAgIHZlcmlmaWVkOiBmYWxzZSxcbiAgICAgICAgfTtcbiAgICAgIH0pO1xuICAgIH07XG5cbiAgICBleHBvcnQgY29uc3QgaW50b0NvbXByZXNzZWROZnRJbmZyYSA9IChcbiAgICAgIGlucHV0OiBPcHRpb248SW5wdXRDcmVhdG9yc1tdPiB8IHVuZGVmaW5lZCxcbiAgICApOiBJbnRlcm5hbENyZWF0b3JzW10gPT4ge1xuICAgICAgaWYgKCFpbnB1dCkge1xuICAgICAgICByZXR1cm4gW107XG4gICAgICB9XG4gICAgICByZXR1cm4gaW5wdXQhLm1hcCgoZGF0YSkgPT4ge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIGFkZHJlc3M6IGRhdGEuYWRkcmVzcy50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIHNoYXJlOiBkYXRhLnNoYXJlLFxuICAgICAgICAgIHZlcmlmaWVkOiBmYWxzZSxcbiAgICAgICAgfTtcbiAgICAgIH0pO1xuICAgIH07XG5cbiAgICBleHBvcnQgY29uc3QgaW50b1VzZXIgPSAoXG4gICAgICBvdXRwdXQ6IE9wdGlvbjxJbnRlcm5hbENyZWF0b3JzW10+LFxuICAgICk6IENyZWF0b3JzW10gfCB1bmRlZmluZWQgPT4ge1xuICAgICAgaWYgKCFvdXRwdXQpIHtcbiAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICAgIH1cblxuICAgICAgcm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ZpbGVUeXBlLFxuICAgICAgICBzdG9yYWdlVHlwZTogU3RvcmFnZVR5cGUsXG4gICAgICAgIGZlZVBheWVyPzogU2VjcmV0LFxuICAgICAgKSA9PiBQcm9taXNlPFJlc3VsdDxzdHJpbmcsIEVycm9yPj4sXG4gICAgICBzdG9yYWdlVHlwZTogU3RvcmFnZVR5cGUsXG4gICAgICBmZWVQYXllcj86IFNlY3JldCxcbiAgICApOiBQcm9taXNlPFByb3BlcnRpZXM+ID0+IHtcbiAgICAgIGlmICghaW5wdXQgfHwgIWlucHV0LmZpbGVzKSB7XG4gICAgICAgIHJldHVybiB7fTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgZmlsZXMgPSBhd2FpdCBQcm9taXNlLmFsbChcbiAgICAgICAgaW5wdXQuZmlsZXMubWFwKGFzeW5jIChmaWxlKSA9PiB7XG4gICAgICAgICAgaWYgKCFmaWxlLmZpbGVQYXRoKSB7XG4gICAgICAgICAgICByZXR1cm4ge307XG4gICAgICAgICAgfVxuICAgICAgICAgIGNvbnN0IHJlcyA9IGF3YWl0IGNhbGxiYWNrRnVuYyhmaWxlLmZpbGVQYXRoLCBzdG9yYWdlVHlwZSwgZmVlUGF5ZXIpO1xuICAgICAgICAgIGlmIChyZXMuaXNFcnIpIHtcbiAgICAgICAgICAgIHRocm93IEVycm9yKHJlcy5lcnJvci5tZXNzYWdlKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgcmV0dXJuIG92ZXJ3cml0ZU9iamVjdChmaWxlLCBbXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGV4aXN0c0tleTogJ2ZpbGVQYXRoJyxcbiAgICAgICAgICAgICAgd2lsbDogeyBrZXk6ICd1cmknLCB2YWx1ZTogcmVzLnZhbHVlIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgIF0pO1xuICAgICAgICB9KSxcbiAgICAgICk7XG4gICAgICByZXR1cm4geyAuLi5pbnB1dCwgZmlsZXMgfSBhcyBQcm9wZXJ0aWV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GEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEuc3ltYm9sKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU3ltYm9sKG1ldGFkYXRhLnN5bWJvbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAocmVzICYmIHJlcy5pc0Vycikge1xuICAgICAgICAgIHJlc3VsdHMucHVzaCguLi5yZXMuZXJyb3IuZGV0YWlscyk7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgICAgaWYgKHJlc3VsdHMubGVuZ3RoID4gMCkge1xuICAgICAgICBjb25zdCBtZXNzYWdlID1cbiAgICAgICAgICAnQ2F1Z2h0IGluIHRoZSB2YWxpZGF0aW9uIGVycm9ycy4gc2VlIGluZm9ybWF0aW9uIGUuZzogZXJyPFZhbGlkYXRvckVycm9yPi5kZXRhaWxzJztcbiAgICAgICAgdGhyb3cgbmV3IFZhbGlkYXRvckVycm9yKG1lc3NhZ2UsIHJlc3VsdHMpO1xuICAgICAgfVxuICAgICAgcmV0dXJuIE1lc3NhZ2UuU1VDQ0VTUztcbiAgICB9KTtcbiAgfTtcblxuICB0eXBlIFBpY2tOZnRTdG9yYWdlID0gUGljazxcbiAgICBPZmZjaGFpbixcbiAgICAnbmFtZScgfCAnc3ltYm9sJyB8ICdpbW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YWRhdGEiLCAiQ29udmVydGVyIiwgIlByb3BlcnRpZXMiLCAiQ29udmVydGVyIiwgIlVzZXMiLCAiQ29udmVydGVyIiwgIlRva2VuTWV0YWRhdGEiLCAiQ29udmVydGVyIiwgIlRyYW5zZmVyQ2hlY2tlZCIsICJDb252ZXJ0ZXIiLCAiVHJhbnNmZXIiLCAiQ29udmVydGVyIiwgIlZhbGlkYXRvciIsICJNZXNzYWdlIiwgIkNvbnZlcnRlciIsICJBaXJkcm9wIl0KfQo= \ No newline at end of file +//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9iYXRjaC50cyIsICIuLi8uLi9ub2RlL3NyYy9pbmRleC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jb21tb24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvbWludC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9wYXJ0aWFsLXNpZ24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY2FsY3VsYXRlLXR4c2l6ZS50cyIsICIuLi8uLi9nbG9iYWwvc3JjL2luZGV4LnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2Fzc29jaWF0ZWQudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMva2V5cGFpci50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9wZGEudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvaW5kZXgudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvaW5kZXgudHMiLCAiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL3NoYXJlZC50cyIsICIuLi8uLi9zdWl0ZS11dGlscy9zcmMvcmVzdWx0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+IHtcbiAgICAgICAgICAgICAgICBhd2FpdCBOb2RlLmNvbmZpcm1lZFNpZyhvayk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGluc3QuZGF0YTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgKGVycjogRXJyb3IpID0+IHtcbiAgICAgICAgICAgICAgICBkZWJ1Z0xvZygnIyBFcnJvciBzdWJtaXQgcmV0cnlHZXRPckNyZWF0ZTogJywgZXJyKTtcbiAgICAgICAgICAgICAgICB0aHJvdyBlcnI7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgIGRlYnVnTG9nKGAjIHJldHJ5OiAke2NvdW50ZXJ9IGNyZWF0ZSB0b2tlbiBhY2NvdW50OiBgLCBlKTtcbiAgICAgICAgICBkZWJ1Z0xvZyhgIyBtaW50OiAke21pbnR9LCBvd25lcjogJHtvd25lcn0sIGZlZVBheWVyOiAke2ZlZVBheWVyfWApO1xuICAgICAgICB9XG4gICAgICAgIGF3YWl0IHNsZWVwKFJFVFJZX1NMRUVQX1RJTUUpO1xuICAgICAgICBjb3VudGVyKys7XG4gICAgICB9XG4gICAgICB0aHJvdyBFcnJvcihgcmV0cnkgYWN0aW9uIGlzIG92ZXIgbGltaXQgJHtSRVRSWV9PVkVSX0xJTUlUfWApO1xuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiBbTWFpbiBsb2dpY11HZXQgQXNzb2NpYXRlZCB0b2tlbiBBY2NvdW50LlxuICAgICAqIGlmIG5vdCBjcmVhdGVkLCBjcmVhdGUgbmV3IHRva2VuIGFjY291aW50XG4gICAgICpcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gbWludFxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBvd25lclxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBmZWVQYXllclxuICAgICAqIEByZXR1cm5zIFByb21pc2U8c3RyaW5nP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HRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3Q6IHVuZGVmaW5lZCxcbiAgICAgICAgfTtcbiAgICAgIH0gY2F0Y2ggKGVycm9yOiB1bmtub3duKSB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5BY2NvdW50Tm90Rm91bmRFcnJvcikgJiZcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5JbnZhbGlkQWNjb3VudE93bmVyRXJyb3IpXG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9yKCdVbmV4cGVjdGVkIGVycm9yJyk7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBwYXllciA9ICFmZWVQYXllciA/IG93bmVyIDogZmVlUGF5ZXI7XG5cbiAgICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgICBwYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgICBBU1NPQ0lBVEVEX1RPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG5cbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICB0b2tlbkFjY291bnQ6IGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSxcbiAgICAgICAgICBpbnN0LFxuICAgICAgICB9O1xuICAgICAgfVxuICAgIH07XG4gIH1cbn1cbiIsICJpbXBvcnQgeyBLZXlwYWlyIGFzIE9yaWdpbmFsLCBQdWJsaWNLZXkgfSBmcm9tICdAc29sYW5hL3dlY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0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJGZWVCYXNpc1BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0YWRhdGEubmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzeW1ib2wnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLnN5bWJvbCkge1xuICAgICAgICAgICAgICByZXMgPSBpc1N5bWJvbChtZXRhZGF0YS5zeW1ib2wpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHJlcyAmJiByZXMuaXNFcnIpIHtcbiAgICAgICAgICByZXN1bHRzLnB1c2goLi4ucmVzLmVycm9yLmRldGFpbHMpO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIGlmIChyZXN1bHRzLmxlbmd0aCA+IDApIHtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9XG4gICAgICAgICAgJ0NhdWdodCBpbiB0aGUgdmFsaWRhdGlvbiBlcnJvcnMuIHNlZSBpbmZvcm1hdGlvbiBlLmc6IGVycjxWYWxpZGF0b3JFcnJvcj4uZGV0YWlscyc7XG4gICAgICAgIHRocm93IG5ldyBWYWxpZGF0b3JFcnJvcihtZXNzYWdlLCByZXN1bHRzKTtcbiAgICAgIH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ByZXNzZWROZnRNZXRhZGF0YSIsICJDb252ZXJ0ZXIiLCAiUm95YWx0eSIsICJDb252ZXJ0ZXIiLCAiTmZ0IiwgIkNvbnZlcnRlciIsICJNZW1vIiwgIkNvbnZlcnRlciIsICJNaW50IiwgIkNvbnZlcnRlciIsICJSZWd1bGFyTmZ0TWV0YWRhdGEiLCAiQ29udmVydGVyIiwgIlByb3BlcnRpZXMiLCAiQ29udmVydGVyIiwgIlVzZXMiLCAiQ29udmVydGVyIiwgIlRva2VuTWV0YWRhdGEiLCAiQ29udmVydGVyIiwgIlRyYW5zZmVyQ2hlY2tlZCIsICJDb252ZXJ0ZXIiLCAiVHJhbnNmZXIiLCAiQ29udmVydGVyIiwgIlZhbGlkYXRvciIsICJNZXNzYWdlIiwgIkNvbnZlcnRlciIsICJBaXJkcm9wIl0KfQo= \ No newline at end of file diff --git a/packages/suite-compressed-nft/dist/index.js b/packages/suite-compressed-nft/dist/index.js index 60850b3b6..30a7a70d0 100644 --- a/packages/suite-compressed-nft/dist/index.js +++ b/packages/suite-compressed-nft/dist/index.js @@ -34,7 +34,7 @@ __export(src_exports, { }); module.exports = __toCommonJS(src_exports); -// ../shared/src/constants.ts +// ../suite-utils/src/constants.ts var import_web3 = require("@solana/web3.js"); var import_load = __toESM(require("@solana-suite/config/load")); var Config = import_load.default; @@ -245,65 +245,6 @@ var TransactionBuilder; TransactionBuilder7.Common = Common2; })(TransactionBuilder || (TransactionBuilder = {})); -// ../shared/src/shared.ts -var overwriteObject = (object, targets) => { - const that = object; - targets.forEach((target) => { - delete that[target.existsKey]; - that[target.will.key] = target.will.value; - }); - return that; -}; -var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { - if (Constants.isDebugging === "true" || process.env.DEBUG === "true") { - console.log("[DEBUG]", data1, data2, data3, data4); - } -}; -var sleep = async (sec) => { - return new Promise((r) => setTimeout(r, sec * 1e3)); -}; -var isBrowser = () => { - return typeof window !== "undefined" && typeof window.document !== "undefined"; -}; -var isNode = () => { - return typeof process !== "undefined" && process.versions != null && process.versions.node != null; -}; -var isPromise = (obj) => { - return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; -}; -function Try(input, finallyInput) { - try { - const v = input(); - if (isPromise(v)) { - return v.then( - (x) => Result2.ok(x), - (err) => Result2.err(err) - ); - } else { - return Result2.ok(v); - } - } catch (e) { - if (e instanceof Error) { - return Result2.err(e); - } - return Result2.err(Error(e)); - } finally { - if (finallyInput) { - debugLog("# finally input:", finallyInput); - finallyInput(); - } - } -} -var convertTimestampToDateTime = (created_at) => { - if (created_at) { - return new Date(created_at * 1e3); - } - return; -}; -var unixTimestamp = () => { - return Math.floor((/* @__PURE__ */ new Date()).getTime() / 1e3); -}; - // ../transaction-builder/src/batch.ts var TransactionBuilder2; ((TransactionBuilder7) => { @@ -758,12 +699,71 @@ var TransactionBuilder6 = { ...TransactionBuilder4 }; -// ../shared/src/result.ts +// ../suite-utils/src/shared.ts +var overwriteObject = (object, targets) => { + const that = object; + targets.forEach((target) => { + delete that[target.existsKey]; + that[target.will.key] = target.will.value; + }); + return that; +}; +var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { + if (Constants.isDebugging === "true" || process.env.DEBUG === "true") { + console.log("[DEBUG]", data1, data2, data3, data4); + } +}; +var sleep = async (sec) => { + return new Promise((r) => setTimeout(r, sec * 1e3)); +}; +var isBrowser = () => { + return typeof window !== "undefined" && typeof window.document !== "undefined"; +}; +var isNode = () => { + return typeof process !== "undefined" && process.versions != null && process.versions.node != null; +}; +var isPromise = (obj) => { + return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; +}; +function Try(input, finallyInput) { + try { + const v = input(); + if (isPromise(v)) { + return v.then( + (x) => Result5.ok(x), + (err) => Result5.err(err) + ); + } else { + return Result5.ok(v); + } + } catch (e) { + if (e instanceof Error) { + return Result5.err(e); + } + return Result5.err(Error(e)); + } finally { + if (finallyInput) { + debugLog("# finally input:", finallyInput); + finallyInput(); + } + } +} +var convertTimestampToDateTime = (created_at) => { + if (created_at) { + return new Date(created_at * 1e3); + } + return; +}; +var unixTimestamp = () => { + return Math.floor((/* @__PURE__ */ new Date()).getTime() / 1e3); +}; + +// ../suite-utils/src/result.ts var AbstractResult = class { unwrap(ok, err) { const r = this._chain( - (value) => Result2.ok(ok ? ok(value) : value), - (error) => err ? Result2.ok(err(error)) : Result2.err(error) + (value) => Result5.ok(ok ? ok(value) : value), + (error) => err ? Result5.ok(err(error)) : Result5.err(error) ); if (r.isErr) { throw r.error; @@ -772,17 +772,17 @@ var AbstractResult = class { } map(ok, err) { return this._chain( - (value) => Result2.ok(ok(value)), - (error) => Result2.err(err ? err(error) : error) + (value) => Result5.ok(ok(value)), + (error) => Result5.err(err ? err(error) : error) ); } chain(ok, err) { - return this._chain(ok, err || ((error) => Result2.err(error))); + return this._chain(ok, err || ((error) => Result5.err(error))); } match(ok, err) { this._chain( - (value) => Result2.ok(ok(value)), - (error) => Result2.err(err(error)) + (value) => Result5.ok(ok(value)), + (error) => Result5.err(err(error)) ); } /// single TransactionBuilder //// @@ -804,7 +804,7 @@ var AbstractResult = class { } ); if (res.isErr) { - return Result2.err(res.error); + return Result5.err(res.error); } return res.value; } @@ -839,7 +839,7 @@ Array.prototype.submit = async function(feePayer) { } else if (obj.isOk) { instructions.push(obj.value); } else { - return Result2.err(Error("Only Array Instruction object")); + return Result5.err(Error("Only Array Instruction object")); } } debugLog("# Result batch submit: ", instructions); @@ -869,16 +869,16 @@ var InternalErr = class extends AbstractResult { return err(this.error); } }; -var Result2; -((Result31) => { +var Result5; +((Result32) => { function ok(value) { return new InternalOk(value); } - Result31.ok = ok; + Result32.ok = ok; function err(error) { return new InternalErr(error || Error()); } - Result31.err = err; + Result32.err = err; function all(obj) { if (Array.isArray(obj)) { const resArr = []; @@ -888,7 +888,7 @@ var Result2; } resArr.push(item.value); } - return Result31.ok(resArr); + return Result32.ok(resArr); } const res = {}; const keys = Object.keys(obj); @@ -899,10 +899,10 @@ var Result2; } res[key] = item.value; } - return Result31.ok(res); + return Result32.ok(res); } - Result31.all = all; -})(Result2 || (Result2 = {})); + Result32.all = all; +})(Result5 || (Result5 = {})); // ../converter/src/collection.ts var Converter; @@ -1528,7 +1528,7 @@ var Node; signature }, commitment - ).then(Result2.ok).catch(Result2.err); + ).then(Result5.ok).catch(Result5.err); }; })(Node || (Node = {})); @@ -3479,4 +3479,4 @@ var CompressedNft9 = { 0 && (module.exports = { CompressedNft }); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uLy4uL3NoYXJlZC9zcmMvY29uc3RhbnRzLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2JhdGNoLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2NvbW1vbi50cyIsICIuLi8uLi9zaGFyZWQvc3JjL3NoYXJlZC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9taW50LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL3BhcnRpYWwtc2lnbi50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jYWxjdWxhdGUtdHhzaXplLnRzIiwgIi4uLy4uL2dsb2JhbC9zcmMvaW5kZXgudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvYXNzb2NpYXRlZC50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9rZXlwYWlyLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL3BkYS50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9pbmRleC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9pbmRleC50cyIsICIuLi8uLi9zaGFyZWQvc3JjL3Jlc3VsdC50cyIsICIuLi8uLi9jb252ZXJ0ZXIvc3JjL2NvbGxlY3Rpb24udHMiLCA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VlUGF5ZXJcbiAgICAgKiBAcmV0dXJucyBQcm9taXNlPHN0cmluZz5cbiAgICAgKi9cbiAgICBleHBvcnQgY29uc3QgcmV0cnlHZXRPckNyZWF0ZSA9IGFzeW5jIChcbiAgICAgIG1pbnQ6IFB1YmtleSxcbiAgICAgIG93bmVyOiBQdWJrZXksXG4gICAgICBmZWVQYXllcjogU2VjcmV0LFxuICAgICk6IFByb21pc2U8c3RyaW5nPiA9PiB7XG4gICAgICBsZXQgY291bnRlciA9IDE7XG4gICAgICB3aGlsZSAoY291bnRlciA8IFJFVFJZX09WRVJfTElNSVQpIHtcbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICBjb25zdCBpbnN0ID0gYXdhaXQgZ2V0KG1pbnQsIG93bmVyLCBmZWVQYXllciwgdHJ1ZSk7XG5cbiAgICAgICAgICBpZiAoaW5zdCAmJiB0eXBlb2YgaW5zdCA9PT0gJ3N0cmluZycpIHtcbiAgICAgICAgICAgIGRlYnVnTG9nKCcjIGFzc29jaWF0ZWRUb2tlbkFjY291bnQ6ICcsIGluc3QpO1xuICAgICAgICAgICAgcmV0dXJuIGluc3Q7XG4gICAgICAgICAgfSBlbHNlIGlmIChpbnN0IGluc3RhbmNlb2YgVHJhbnNhY3Rpb25CdWlsZGVyLkNvbW1vbikge1xuICAgICAgICAgICAgKGF3YWl0IGluc3Quc3VibWl0KCkpLm1hcChcbiAgICAgICAgICAgICAgYXN5bmMgKG9rOiBzdHJpbmcpID0+IHtcbiAgICAgICAgICAgICAgICBhd2FpdCBOb2RlLmNvbmZpcm1lZFNpZyhvayk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGluc3QuZGF0YTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgKGVycjogRXJyb3IpID0+IHtcbiAgICAgICAgICAgICAgICBkZWJ1Z0xvZygnIyBFcnJvciBzdWJtaXQgcmV0cnlHZXRPckNyZWF0ZTogJywgZXJyKTtcbiAgICAgICAgICAgICAgICB0aHJvdy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ICBpbnN0OiBUcmFuc2FjdGlvbkluc3RydWN0aW9uIHwgdW5kZWZpbmVkO1xuICAgIH0+ID0+IHtcbiAgICAgIGNvbnN0IGFzc29jaWF0ZWRUb2tlbkFjY291bnQgPSBnZXRBc3NvY2lhdGVkVG9rZW5BZGRyZXNzU3luYyhcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICBhbGxvd093bmVyT2ZmQ3VydmUsXG4gICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGFzc29jaWF0ZWRUb2tlbkFjY291bnQ6ICcsIGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSk7XG5cbiAgICAgIHRyeSB7XG4gICAgICAgIC8vIERvbnQgdXNlIFJlc3VsdFxuICAgICAgICBhd2FpdCBnZXRBY2NvdW50KFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCkuY29tbWl0bWVudCxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3Q6IHVuZGVmaW5lZCxcbiAgICAgICAgfTtcbiAgICAgIH0gY2F0Y2ggKGVycm9yOiB1bmtub3duKSB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5BY2NvdW50Tm90Rm91bmRFcnJvcikgJiZcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNl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ICdzZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ25hbWUnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLm5hbWUpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNOYW1lKG1ldGFkYXRhLm5hbWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc3ltYm9sJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5zeW1ib2wpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTeW1ib2wobWV0YWRhdGEuc3ltYm9sKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgICAgIGlmIChyZXMgJiYgcmVzLmlzRXJyKSB7XG4gICAgICAgICAgcmVzdWx0cy5wdXNoKC4uLnJlcy5lcnJvci5kZXRhaWxzKTtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgICBpZiAocmVzdWx0cy5sZW5ndGggPiAwKSB7XG4gICAgICAgIGNvbnN0IG1lc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WluOiBPZmZjaGFpbiA9IGF3YWl0IGZldGNoT2ZmY2hhaW4oXG4gICAgICAgICAgICAgIGl0ZW0uY29udGVudC5qc29uX3VyaSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgICBjb25zdCBtZXJnZWQgPSB7XG4gICAgICAgICAgICAgIG9uY2hhaW46IGl0ZW0sXG4gICAgICAgICAgICAgIG9mZmNoYWluOiBvZmZjaGFpbixcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICByZXR1cm4gQ29udmVydGVyLk5mdC5pbnRvVXNlcihtZXJnZWQpO1xuICAgICAgICAgIH0gY2F0Y2ggKGVycikge1xuICAgICAgICAgICAgZGVidWdMb2coJyMgRmFpbGVkIGZldGNoIG9mZmNoYWluIHVybDogJywgaXRlbS5jb250ZW50Lmpzb25fdXJpKTtcbiAgICAgICAgICAgIHJldHVybiBDb252ZXJ0ZXIuTmZ0LmludG9Vc2VyKHtcbiAgICAgICAgICAgICAgb25jaGFpbjogaXRlbSxcbiAgICAgICAgICAgICAgb2ZmY2hhaW46IHt9LFxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfVxuICAgICAgICB9KSxcbiAgICApO1xuICAgIHJldHVybiB7XG4gICAgICBwYWdlOiBhc3NldHMudmFsdWUucGFnZSxcbiAgICAgIHRvdGFsOiBhc3NldHMudmFsdWUudG90YWwsXG4gICAgICBsaW1pdDogYXNzZXRzLnZhbHVlLmxpbWl0LFxuICAgICAgbWV0YWRhdGFzLFxuICAgIH07XG4gIH07XG5cbiAgLyoqXG4gICAqIEZpbmQgbmZ0IGJ5IGNvbGxlY3Rpb24gbWludFxuICAgKlxuICAgKiBAcGFyYW0ge1B1YmtleX0gY29sbGVjdGlvbk1pbnRcbiAgICogQHBhcmFtIHtib29sZWFufSBpc0NvbXByZXNzZWQsXG4gICAqIEBwYXJhbSB7UGFydGlhbDxGaW5kT3B0aW9ucz59IG9wdGlvbnNcbiAgICogQHJldHVybiBQcm9taXNlPFJlc3VsdDxDb21wc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ZWU6IHRyZWVPd25lci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgICAgICB0cmVlQXV0aG9yaXR5LFxuICAgICAgICAgICAgdHJlZUNyZWF0b3I6IG93bmVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgICAgIHBheWVyOiBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgICAgICBsb2dXcmFwcGVyOiBTUExfTk9PUF9QUk9HUkFNX0lELFxuICAgICAgICAgICAgY29tcHJlc3Npb25Qcm9ncmFtOiBTUExfQUNDT1VOVF9DT01QUkVTU0lPTl9QUk9HUkFNX0lELFxuICAgICAgICAgIH0sXG4gICAgICAgICAge1xuICAgICAgICAgICAgbWF4QnVmZmVyU2l6ZSxcbiAgICAgICAgICAgIG1heERlcHRoLFxuICAgICAgICAgICAgcHVibGljOiBmYWxzZSxcbiAgICAgICAgICB9LFxuICAgICAgICAgIE1QTF9CVUJCTEVHVU1fUFJPR1JBTV9JRC50b1B1YmxpY0tleSgpLFxuICAgICAgICApLFxuICAgICAgKTtcblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuTWludChcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLFxuICAgICAgICBbdHJlZU93bmVyLnRvS2V5cGFpcigpLCBvd25lci50b0tleXBhaXIoKV0sXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICB0cmVlT3duZXIucHVia2V5LFxuICAgICAgKTtcbiAgICB9KTtcbiAgfTtcblxuICAvKipcbiAgICogY3JlYXRlIGEgbmV3IG5mdCBzcGFjZVxuICAgKiBUaGlzIGZ1bmN0aW9uIG5lZWRzIG9ubHkgMSBjYWxsXG4gICAqXG4gICAqIEBwYXJhbSB7U2VjcmV0fSBvd25lclxuICAgKiBAcGFyYW0ge1NwYWNlTnVtYmVyfSBzcGFjZVNpemVcbiAgICogQHBhcmFtIHtQYXJ0aWFsPFNwYWNlT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dW50LktleXBhaXIoeyBzZWNyZXQ6IHBheWVyISB9KS5wdWJrZXk7XG5cbiAgICAgIGNvbnN0IHRyZWVBdXRob3JpdHkgPSBBY2NvdW50LlBkYS5nZXRUcmVlQXV0aG9yaXR5KFxuICAgICAgICB0cmVlT3duZXIudG9QdWJsaWNLZXkoKS50b1N0cmluZygpLFxuICAgICAgKTtcbiAgICAgIGNvbnN0IGNvbGxlY3Rpb25NZXRhZGF0YSA9IEFjY291bnQuUGRhLmdldE1ldGFkYXRhKFxuICAgICAgICBjb2xsZWN0aW9uTWludC50b1N0cmluZygpLFxuICAgICAgKTtcbiAgICAgIGNvbnN0IGNvbGxlY3Rpb25NYXN0ZXJFZGl0aW9uQWNjb3VudCA9IEFjY291bnQuUGRhLmdldE1hc3RlckVkaXRpb24oXG4gICAgICAgIGNvbGxlY3Rpb25NaW50LnRvU3RyaW5nKCksXG4gICAgICApO1xuICAgICAgY29uc3QgYnViYmxlZ3VtU2lnbmVyID0gQWNjb3VudC5QZGEuZ2V0Qmd1bVNpZ25lcigpO1xuXG4gICAgICAvLyBwb3JwZXJ0aWVzLCBVcGxvYWQgY29udGVudFxuICAgICAgbGV0IHByb3BlcnRpZXM7XG4gICAgICBpZiAoaW5wdXQucHJvcGVydGllcykge1xuICAgICAgICBwcm9wZXJ0aWVzID0gYXdhaXQgQ29udmVydGVyLlByb3BlcnRpZXMuaW50b0luZnJhKFxuICAgICAgICAgIGlucHV0LnByb3BlcnRpZXMsXG4gICAgICAgICAgU3RvcmFnZS51cGxvYWRGaWxlLFxuICAgICAgICAgIHN0b3JhZ2VUeXBlLFxuICAgICAgICAgIHBheWVyLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICBpbnB1dCA9IHtcbiAgICAgICAgLi4uaW5wdXQsXG4gICAgICAgIHByb3BlcnRpZXMsXG4gICAgICAgIHN0b3JhZ2VUeXBlLFxuICAgICAgfTtcblxuICAgICAgY29uc3Qgcm95YWx0eSA9IGlucHV0LnJveWFsdHk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WVPd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgdHJlZUF1dGhvcml0eSxcbiAgICAgICAgICAgIHRyZWVEZWxlZ2F0ZTogb3duZXJQdWJsaWNLZXksXG4gICAgICAgICAgICBwYXllcjogcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICAgICAgbGVhZk93bmVyOiBsZWFmT3duZXIsIC8vIHJlY2VpdmVyXG4gICAgICAgICAgICBsZWFmRGVsZWdhdGU6IGxlYWZEZWxlZ2F0ZS50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgY29sbGVjdGlvbkF1dGhvcml0eTogb3duZXJQdWJsaWNLZXksXG4gICAgICAgICAgICBjb2xsZWN0aW9uTWludDogY29sbGVjdGlvbk1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIGNvbGxlY3Rpb25NZXRhZGF0YSxcbiAgICAgICAgICAgIGVkaXRpb25BY2NvdW50OiBjb2xsZWN0aW9uTWFzdGVyRWRpdGlvbkFjY291bnQsXG4gICAgICAgICAgICBidWJibGVndW1TaWduZXIsXG4gICAgICAgICAgICBsb2dXcmFwcGVyOiBTUExfTk9PUF9QUk9HUkFNX0lELFxuICAgICAgICAgICAgY29sbGVjdGlvbkF1dGhvcml0eVJlY29yZFBkYTogQlVCQkxFR1VNX1BST0dSQU1fSUQsXG4gICAgICAgICAgICBjb21wcmVzc2lvblByb2dyYW06IFNQTF9BQ0NPVU5UX0NPTVBSRVNTSU9OX1BST0dSQU1fSUQsXG4gICAgICAgICAgICB0b2tlbk1ldGFkYXRhUHJvZ3JhbTogVE9LRU5fTUVUQURBVEFfUFJPR1JBTV9JRCxcbiAgICAgICAgICB9LFxuICAgICAgICAgIHtcbiAgICAgICAgICAgIG1ldGFkYXRhQXJncyxcbiAgICAgICAgICB9LFxuICAgICAgICApLFxuICAgICAgKTtcblxuICAgICAgaWYgKGlucHV0LmNyZWF0b3JzKSB7XG4gICAgICAgIGNvbnN0IGFzc2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ck9yTXVsdGlzaWdbMF07XG4gICAgICBjb25zdCBrZXlwYWlycyA9IG93bmVyT3JNdWx0aXNpZy5tYXAoKHMpID0+IHMudG9LZXlwYWlyKCkpO1xuXG4gICAgICBjb25zdCB0b2tlbkFzc29jaWF0ZWQgPSBhd2FpdCBBY2NvdW50LkFzc29jaWF0ZWQucmV0cnlHZXRPckNyZWF0ZShcbiAgICAgICAgdG9rZW4sXG4gICAgICAgIG93bmVyLFxuICAgICAgICBwYXllcixcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVNaW50VG9DaGVja2VkSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHRva2VuLnRvUHVibGljS2V5KCksXG4gICAgICAgIHRva2VuQXNzb2NpYXRlZC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICBDYWxjdWxhdGUuY2FsY3VsYXRlQW1vdW50KHRvdGFsQW1vdW50LCBtaW50RGVjaW1hbCksXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICBrZXlwYWlycyxcbiAgICAgICk7XG5cbiAgICAgIHJldHVybiBuZXcgVHJhbnNhY3Rpb25CdWlsZGVyLkNvbW1vbjxQdWJrZXk+KFxuICAgICAgICBbaW5zdF0sXG4gICAgICAgIGtleXBhaXJzLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgdG9rZW4sXG4gICAgICApO1xuICAgIH0pO1xuICB9O1xufVxuIiwgIi8vQGludGVybmFsXG5leHBvcnQgbmFtZXNwYWNlIFNwbFRva2VuIHtcbiAgZXhwb3J0IGNvbnN0IGNhbGN1bGF0ZUFtb3VudCA9IChcbiAgICBhbW91bnQ6IG51bWJlcixcbiAgICBtaW50RGVjaW1hbDogbnVtYmVyLFxuICApOiBudW1iZXIgPT4ge1xuICAgIHJldHVybiBhbW91bnQgKiAxMCAqKiBtaW50RGVjaW1hbDtcbiAgfTtcbn1cbiIsICJp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Y2NvdW50LlBkYS5nZXRNZXRhZGF0YShtaW50KSxcbiAgICAgICAgKVxuICAgICAgICAgIC50aGVuKGFzeW5jIChtZXRhZGF0YSkgPT4ge1xuICAgICAgICAgICAgLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLWV4cGxpY2l0LWFueSAqL1xuICAgICAgICAgICAgcmV0dXJuIGZldGNoUmV0cnkobWV0YWRhdGEuZGF0YS51cmkpLnRoZW4oKGpzb246IGFueSkgPT4ge1xuICAgICAgICAgICAgICByZXR1cm4gY29udmVydGVyKG1ldGFkYXRhLCBqc29uLCB0b2tlbkFtb3VudCk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICB9KVxuICAgICAgICAgIC5jYXRjaCgoZXJyKSA9PiBkZWJ1Z0xvZygnIyBbRmV0Y2ggZXJyb3JdJywgZXJyKSk7XG4gICAgICB9KTtcblxuICAgICAgY29uc3QgZmlsdGVycyA9IChhd2FpdCBQcm9taXNlLmFsbChkYXRhcykpLmZpbHRlcihcbiAgICAgICAgKGRhdGEpID0+IGRhdGEgIT09IHVuZGVmaW5lZCxcbiAgICAgICk7XG4gICAgICByZXR1cm4gZmlsdGVycyBhcyBUb2tlbk1ldGFkYXRhW107XG4gICAgfSk7XG4gIH07XG5cbiAgLyoqXG4gICAqIEZldGNoIG1pbnRlZCBtZXRhZGF0YSBieSBtaW50IGFkZHJlc3NcbiAgICpcbiAgICogQHBhcmFtIHtQdWJrZXl9IG1pbnRcbiAgICogQHJldHVybiBQcm9taXNlPFJlc3VsdDxVc2VyU2lkZU91dHB1dC5Ub2tlbk1ldGFkYXRhLCBFcnJvcj4+XG4gICAqL1xuICBleHBvcnQgY29uc3QgZmluZEJ5TWludCA9IGFzeW5jIChcbiAgICBtaW50OiBQdWJrZXksXG4gICk6IFByb21pc2U8UmVzdWx0PFRva2VuTWV0YWRhdGEsIEVycm9yPj4gPT4ge1xuICAgIHJldHVybiBUcnkoYXN5bmMgKCkgPT4ge1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ludERlY2ltYWw6IG51bWJlcixcbiAgICBmZWVQYXllcjogUHVia2V5LFxuICApOiBQcm9taXNlPFJlc3VsdDxQYXJ0aWFsU2lnblN0cnVjdHVyZSwgRXJyb3I+PiA9PiB7XG4gICAgcmV0dXJuIFRyeShhc3luYyAoKSA9PiB7XG4gICAgICBjb25zdCBvd25lclB1YmxpY0tleSA9IG93bmVyLnRvS2V5cGFpcigpLnB1YmxpY0tleTtcbiAgICAgIGNvbnN0IHNvdXJjZVRva2VuID0gYXdhaXQgQWNjb3VudC5Bc3NvY2lhdGVkLm1ha2VPckNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICBtaW50LFxuICAgICAgICBvd25lclB1YmxpY0tleS50b1N0cmluZygpLFxuICAgICAgICBmZWVQYXllcixcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IGRlc3RUb2tlbiA9IGF3YWl0IEFjY291bnQuQXNzb2NpYXRlZC5tYWtlT3JDcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgZGVzdCxcbiAgICAgICAgZmVlUGF5ZXIsXG4gICAgICApO1xuXG4gICAgICBsZXQgaW5zdDI7XG4gICAgICBjb25zdCBibG9ja2hhc2hPYmogPSBhd2FpdCBOb2RlLmdldENvbm5lY3Rpb24oKS5nZXRMYXRlc3RCbG9ja2hhc2goKTtcblxuICAgICAgY29uc3QgdHggPSBuZXcgVHJhbnNhY3Rpb24oe1xuICAgICAgICBsYXN0VmFsaWRCbG9ja0hlaWdodDogYmxvY2toYXNoT2JqLmxhc3RWYWxpZEJsb2NrSGVpZ2h0LFxuICAgICAgICBibG9ja2hhc2g6IGJsb2NraGFzaE9iai5ibG9ja2hhc2gsXG4gICAgICAgIGZlZVBheWVyOiBmZWVQYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgfSk7XG5cbiAgICAgIC8vIHJldHVybiBhc3NvY2lhdGVkIHRva2VuIGFjY291bnRcbiAgICAgIGlmICghZGVzdFRva2VuLmluc3QpIHtcbiAgICAgICAgaW5zdDIgPSBjcmVhdGVUcmFuc2ZlckNoZWNrZWRJbnN0cnVjdGlvbihcbiAgICAgICAgICBzb3VyY2VUb2tlbi50b2tlbkFjY291bnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgZGVzdFRva2VuLnRva2VuQWNjb3VudC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICAgIENhbGN1bGF0b3IuY2FsY3VsYXRlQW1vdW50KGFtb3VudCwgbWludERlY2ltYWwpLFxuICAgICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICAgIFtvd25lci50b0tleXBhaXIoKV0sXG4gICAgICAgICk7XG4gICAgICAgIHR4LmFkZChpbnN0Mik7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICAvLyByZXR1cm4gaW5zdHJ1Y3Rpb24gYW5kIHVuZGVjaWRlZCBhc3NvY2lhdGVkIHRva2VuIGFjY291bnRcbiAgICAgICAgaW5zdDIgPSBjcmVhdGVUcmFuc2ZlckNoZWNrZWRJbnN0cnVjdGlvbihcbiAgICAgICAgICBzb3VyY2VUb2tlbi50b2tlbkFjY291bnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgZGVzdFRva2VuLnRva2VuQWNjb3VudC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICAgIENhbGN1bGF0b3IuY2FsY3VsYXRlQW1vdW50KGFtb3VudCwgbWludERlY2ltYWwpLFxuICAgICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICAgIFtvd25lci50b0tleXBhaXIoKV0sXG4gICAgICAgICk7XG4gICAgICAgIHR4LmFkZChkZXN0VG9rZW4uaW5zdCkuYWRkKGluc3QyKTtcbiAgICAgIH1cblxuICAgICAgdHgucmVjZW50QmxvY2to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1Y3Rpb24oXG4gICAgICAgIHtcbiAgICAgICAgICBtZXRhZGF0YTogbWV0YWRhdGFQZGEsXG4gICAgICAgICAgbWludCxcbiAgICAgICAgICBtaW50QXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBwYXllcjogZmVlUGF5ZXIsXG4gICAgICAgICAgdXBkYXRlQXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgIGNyZWF0ZU1ldGFkYXRhQWNjb3VudEFyZ3NWMzoge1xuICAgICAgICAgICAgZGF0YTogdG9rZW5NZXRhZGF0YSxcbiAgICAgICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICAgICAgIGNvbGxlY3Rpb25EZXRhaWxzOiBudWxsLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICApLFxuICAgICk7XG4gICAgcmV0dXJuIGluc3RydWN0aW9ucztcbiAgfTtcblxuICAvKipcbiAgICogU1BMLVRPS0VOIG1pbnRcbiAgICpcbiAgICogQHBhcmFtIHtTZWNyZXR9IG93bmVyICAgICAgLy8gdG9rZW4gb3duZXIgU2VjcmV0XG4gICAqIEBwYXJhbSB7bnVtYmVyfSB0b3RhbEFtb3VudCAvLyB0b3RhbCBudW1iZXJcbiAgICogQHBhcmFtIHtudW1iZXJ9IG1pbnREZWNpbWFsIC8vIHRva2VuIGRlY2ltYWxcbiAgICogQHBhcmFtIHtJbnB1dFRva2VuTWV0YWRhdGF9IGlucHV0ICAgICAgIC8vIHRva2VuIG1ldGFkYXRhXG4gICAqIEBwYXJhbSB7UGFydGlhbDxNaW50T3B0aW9ucz59IG9wdGlvbnMgICAvLyBvcHRpb25zXG4gICAqIEByZXR1cm4gUHJvbWlzZTxSZXN1bHQ8TWludEluc3RydWN0aW9uLCBFcnJvcj4+XG4gICAqL1xuICBleHBvcnQgY29uc3QgbWludCA9IGFzeW5jIChcbiAgICBvd25lcjogU2VjcmV0LFxuICAgIHRvdGFsQW1vdW50OiBudW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XRhZGF0YS5pbnRvSW5mcmEoXG4gICAgICAgIGlucHV0LFxuICAgICAgICB1cmksXG4gICAgICAgIHNlbGxlckZlZUJhc2lzUG9pbnRzLFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgZGF0YXYyOiAnLCBkYXRhdjIpO1xuICAgICAgZGVidWdMb2coJyMgdXBsb2FkIGNvbnRlbnQgdXJsOiAnLCB1cmkpO1xuXG4gICAgICBjb25zdCBtaW50ID0gQWNjb3VudC5LZXlwYWlyLmNyZWF0ZSgpO1xuICAgICAgY29uc3QgaW5zdHMgPSBhd2FpdCBjcmVhdGVNaW50KFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICB0b3RhbEFtb3VudCxcbiAgICAgICAgbWludERlY2ltYWwsXG4gICAgICAgIGRhdGF2MixcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICBpc011dGFibGUsXG4gICAgICApO1xuXG4gICAgICAvLyBmcmVlemVBdXRob3JpdHlcbiAgICAgIGlmIChmcmVlemVBdXRob3JpdHkpIHtcbiAgICAgICAgaW5zdHMucHVzaChcbiAgICAgICAgICBjcmVhdGVGcmVlemVBdXRob3JpdHkoXG4gICAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgICAgIGZyZWV6ZUF1dGhvcml0eS50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBuZXcgVHJhbnNhY3Rpb25CdWlsZGVyLk1pbnQoXG4gICAgICAgIGluc3RzLFxuICAgICAgICBbb3duZXIudG9LZXlwYWlyKCksIG1pbnQudG9LZXlwYWlyKCldLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgbWludC5wdWJrZXksXG4gICAgICApO1xuICAgI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ICAgICBtaW50LFxuICAgICAgICAgIG1pbnRBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICAgIHBheWVyOiBmZWVQYXllcixcbiAgICAgICAgICB1cGRhdGVBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICB9LFxuICAgICAgICB7XG4gICAgICAgICAgY3JlYXRlTWV0YWRhdGFBY2NvdW50QXJnc1YzOiB7XG4gICAgICAgICAgICBkYXRhOiBuZnRNZXRhZGF0YSxcbiAgICAgICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICAgICAgIGNvbGxlY3Rpb25EZXRhaWxzOiBudWxsLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUNyZWF0ZU1hc3RlckVkaXRpb25WM0luc3RydWN0aW9uKFxuICAgICAgICB7XG4gICAgICAgICAgZWRpdGlvbjogbWFzdGVyRWRpdGlvblB1YmtleSxcbiAgICAgICAgICBtaW50LFxuICAgICAgICAgIHVwZGF0ZUF1dGhvcml0eTogb3duZXIsXG4gICAgICAgICAgbWludEF1dGhvcml0eTogb3duZXIsXG4gICAgICAgICAgcGF5ZXI6IGZlZVBheWVyLFxuICAgICAgICAgIG1ldGFkYXRhOiB0b2tlbk1ldGFkYXRhUHVia2V5LFxuICAgICAgICB9LFxuICAgICAgICB7XG4gICAgICAgICAgY3JlYXRlTWFzdGVyRWRpdGlvbkFyZ3M6IHtcbiAgICAgICAgICAgIG1heFN1cHBseTogMCxcbiAgICAgICAgICB9LFxuICAgICAgICB9LFxuICAgICAgKSxcbiAgICApO1xuICAgIHJldHVybiBpbnN0cnVjdGlvbnM7XG4gIH07XG5cbiAgLyoqXG4gICAqIFVwbG9hZCBjb250ZW50IGFuZCBORlQgbWludFxuICAgKlxuICAgKiBAcGFyYW0ge1NlY3JldH0gb3duZXIgICAgICAgICAvLyBvd25lcidzIFNlY3JldFxuICAgKiBAcGFyYW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nRvSW5mcmEoXG4gICAgICAgIGlucHV0LFxuICAgICAgICB1cmksXG4gICAgICAgIHNlbGxlckZlZUJhc2lzUG9pbnRzLFxuICAgICAgKTtcblxuICAgICAgY29uc3QgaXNNdXRhYmxlID0gaW5wdXQuaXNNdXRhYmxlID09PSB1bmRlZmluZWQgPyB0cnVlIDogaW5wdXQuaXNNdXRhYmxlO1xuXG4gICAgICBkZWJ1Z0xvZygnIyBpbnB1dDogJywgaW5wdXQpO1xuICAgICAgZGVidWdMb2coJyMgZGF0YXYyOiAnLCBkYXRhdjIpO1xuXG4gICAgICBjb25zdCBtaW50ID0gQWNjb3VudC5LZXlwYWlyLmNyZWF0ZSgpO1xuXG4gICAgICBjb25zdCBpbnN0cnVjdGlvbnMgPSBhd2FpdCBjcmVhdGVNaW50KFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICBkYXRhdjIsXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgKTtcblxuICAgICAgLy8gZnJlZXplQXV0aG9yaXR5XG4gICAgICBpZiAoZnJlZXplQXV0aG9yaXR5KSB7XG4gICAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICAgIGNyZWF0ZURlbGVhZ2F0ZShcbiAgICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICAgICAgZnJlZXplQXV0aG9yaXR5LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgLy8gY29sbGVjdGlvbiAtLS1cbiAgICAgIGlmIChpbnB1dC5jb2xsZWN0aW9uKSB7XG4gICAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICAgIGNyZWF0ZVZlcmlmeVNpemVkQ29sbGVjdGlvbihcbiAgICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIGlucHV0LmNvbGxlY3Rpb24udG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBrZXlwYWlycyA9IFtvd25lci50b0tleXBhaXIoKSwgbWludC50b0tleXBhaXIoKV07XG5cbiAgICAgIC8vIGNyZWF0b3IgLS0tXG4gICAgICBpZiAoaW5wdXQuY3JlYXRvcnMpIHtcbiAgICAgICAgaW5wdXQuY3JlYXRvcnMuZm9yRWFjaCgoY3JlYXRvcikgPT4ge1xuICAgICAgICAgIGlmIChBY2NvdW50LktleXBhaXIuaXNTZWNyZXQoY3JlYXRvci5zZWNyZXQpKSB7XG4gICAgICAgICAgICBjb25zdCBjcmVhdG9yUHVia2V5ID0gY3JlYXRvci5hZGRyZXNzLnRvUHVibGljS2V5KCk7XG4gICAgICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlVmVyaWZ5Q3JlYXRvcihtaW50LnRvUHVibGljS2V5KCksIGNyZWF0b3JQdWJrZXkpO1xuICAgICAgICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goaW5zdCk7XG4gICAgICAgICAgICBrZXlwYWlycy5wdXNoKGNyZWF0b3Iuc2VjcmV0LnRvS2V5cGFpcigpKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5NaW50KFxuICAgICAgICBpbnN0cnVjdGlvbnMsXG4gICAgICAgIGtleXBhaXJzLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgbWludC5wdWJrZXksXG4gICAgICApO1xuICAgIH0pO1xuICB9O1xufVxuIiwgImltcG9ydCB7IGRlYnVnTG9nLCBSZXN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1xuICAgICAgZGVidWdMb2coJyMgc2VsbGVyRmVlQmFzaXNQb2ludHM6ICcsIHNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgIGRlYnVnTG9nKCcjIGRhdGF2MjogJywgZGF0YXYyKTtcblxuICAgICAgY29uc3QgbWludCA9IEFjY291bnQuS2V5cGFpci5jcmVhdGUoKTtcbiAgICAgIGNvbnN0IGluc3RzID0gYXdhaXQgTWludC5jcmVhdGVNaW50KFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyUHVibGlja2V5LFxuICAgICAgICBkYXRhdjIsXG4gICAgICAgIGZlZVBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICk7XG5cbiAgICAgIC8vIGZyZWV6ZUF1dGhvcml0eVxuICAgICAgaWYgKG9wdGlvbnMuZnJlZXplQXV0aG9yaXR5KSB7XG4gICAgICAgIGluc3RzLnB1c2goXG4gICAgICAgICAgTWludC5jcmVhdGVEZWxlYWdhdGUoXG4gICAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBvd25lclB1YmxpY2tleSxcbiAgICAgICAgICAgIG9wdGlvbnMuZnJlZXplQXV0aG9yaXR5LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgYmxvY2toYXNoT2JqID0gYXdhaXQgTm9kZS5nZXRDb25uZWN0aW9uKCkuZ2V0TGF0ZXN0QmxvY2toYXNoKCk7XG4gICAgICBjb25zdCB0eCA9IG5ldyBUcmFuc2FjdGlvbih7XG4gICAgICAgIGxhc3RWYWxpZEJsb2NrSGVpZ2h0OiBibG9ja2hhc2hPYmoubGFzdFZhbGlkQmxvY2tIZWlnaHQsXG4gICAgICAgIGJsb2NraGFzaDogYmxvY2toYXNoT2JqLmJsb2NraGFzaCxcbiAgICAgICAgZmVlUGF5ZXI6IGZlZVB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5pc0Vycikge1xuICAgICAgICAgIHRocm93IHVwbG9hZGVkO1xuICAgICAgICB9XG4gICAgICAgIHVyaSA9IHVwbG9hZGVkLnZhbHVlO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgdGhyb3cgRXJyb3IoYE11c3Qgc2V0IGZpbGVQYXRoJyBvciAndXJpJ2ApO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBkYXRhdjIgPSBDb252ZXJ0ZXIuUmVndWxhck5mdE1ldGFkYXRhLmludG9JbmZyYShpbnB1dCwgdXJpLCAwKTtcblxuICAgICAgY29uc3QgaXNNdXRhYmxlID0gaW5wdXQuaXNNdXRhYmxlID09PSB1bmRlZmluZWQgPyB0cnVlIDogaW5wdXQuaXNNdXRhYmxlO1xuXG4gICAgICBkZWJ1Z0xvZygnIyBpbnB1dDogJywgaW5wdXQpO1xuICAgICAgZGVidWdMb2coJyMgZGF0YXYyOiAnLCBkYXRhdjIpO1xuXG4gICAgICBjb25zdCBjb2xsZWN0aW9uTWludCA9IEFjY291bnQuS2V5cGFpci5jcmVhdGUoKTtcbiAgICAgIGNvbnN0IGNvbGxlY3Rpb25NZXRhZGF0YUFjY291bnQgPSBBY2NvdW50LlBkYS5nZXRNZXRhZGF0YShcbiAgICAgICAgY29sbGVjdGlvbk1pbnQucHVia2V5LFxuICAgICAgKTtcblxuICAgICAgY29uc3QgaW5zdHJ1Y3Rpb25zID0gYXdhaXQgTWludC5jcmVhdGVNaW50KFxuICAgICAgICBjb2xsZWN0aW9uTWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgZGF0YXYyLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICk7XG5cbiAgICAgIC8vIGZyZWV6ZUF1dGhvcml0eVxuICAgICAgaWYgKGZyZWV6ZUF1dGhvcml0eSkge1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgICBNaW50LmNyZWF0ZURlbGVhZ2F0ZShcbiAgICAgICAgICAgIGNvbGxlY3Rpb25NaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgICAgIGZyZWV6ZUF1dGhvcml0eS50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGNvbGxlY3Rpb25zID0ge1xuICAgICAgICBjb2xsZWN0aW9uTWV0YWRhdGE6IGNvbGxlY3Rpb25NZXRhZGF0YUFjY291bnQsXG4gICAgICAgIGNvbGxlY3Rpb25BdXRob3JpdHk6IG93bmVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgY29sbGVjdGlvbk1pbnQ6IGNvbGxlY3Rpb25NaW50LnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgIH07XG5cbiAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICBjcmVhdGVTZXRDb2xsZWN0aW9uU2l6ZUluc3RydWN0aW9uKGNvbGxlY3Rpb25zLCB7XG4gICAgICAgICAgc2V0Q29sbGVjdGlvblNpemVBcmdzOiB7XG4gICAgICAgICAgICBzaXplOiBjb2xsZWN0aW9uU2l6ZSB8fCBERUZBVUxUX0NPTExFQ1RJT05fU0laRSxcbiAgICAgICAgICB9LFxuICAgICAgICB9KSxcbiAgICAgICk7XG5cbiAgICAgIHJldHVybiBuZXcgVHJhbnNhY3Rpb25CdWlsZGVyLk1pbnQoXG4gICAgICAgIGluc3RydWN0aW9ucyxcbiAgICAgICAgW293bmVyLnRvS2V5cGFpcigpLCBjb2xsZWN0aW9uTWludC50b0tleXBhaXIoKV0sXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICBjb2xsZWN0aW9uTWludC5wdWJrZXksXG4gICAgICApO1xuICAgIH0pO1xuICB9O1xufVxuIiwgImltcG9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l0Y2ggKGVudikge1xuICAgICAgY2FzZSBDb25zdGFudHMuQ2x1c3Rlci5wcmQ6IHtcbiAgICAgICAgY29uc3QgdXJscyA9IENvbnN0YW50cy5CdW5kbHJVcmwucHJkLnNwbGl0KCcsJyk7XG4gICAgICAgIGNvbnN0IGluZGV4ID0gRGF0ZS5ub3coKSAlIHVybHMubGVuZ3RoO1xuICAgICAgICByZXR1cm4gdXJsc1tpbmRleF07XG4gICAgICB9XG4gICAgICBkZWZhdWx0OiB7XG4gICAgICAgIHJldHVybiBDb25zdGFudHMuQnVuZGxyVXJsLmRldjtcbiAgICAgIH1cbiAgICB9XG4gIH07XG5cbiAgZXhwb3J0IGNvbnN0IHN3aXRjaERhc0FwaSA9IChlbnY6IHN0cmluZyk6IHN0cmluZyA9PiB7XG4gICAgc3dpdGNoIChlbnYpIHtcbiAgICAgIGNhc2UgQ29uc3RhbnRzLkNsdXN0ZXIucHJkOiB7XG4gICAgICAgIGlmIChkYXNBcGlVcmwubGVuZ3RoIDwgMSkge1xuICAgICAgICAgIHRocm93IEVycm9yKENvbnN0YW50cy5XYXJubmluZ01lc3NhZ2UuREFTX0FQSV9VUkwpO1xuICAgICAgICB9XG4gICAgICAgIGNvbnN0IHVybHMgPSBDb25zdGFudHMuQnVuZGxyVXJsLnByZC5zcGxpdCgnLCcpO1xuICAgICAgICBjb25zdCBpbmRleCA9IERhdGUubm93KCkgJSB1cmxzLmxlbmd0aDtcbiAgICAgICAgcmV0dXJuIHVybHNbaW5kZXhdO1xuICAgICAgfVxuICAgICAgZGVmYXVsdDoge1xuICAgICAgICBjb25zdCB1cmxzID0gQ29uc3RhbnRzLkRhc0FwaVVybC5kZXYuc3BsaXQoJywnKTtcbiAgICAgICAgY29uc3QgaW5kZXggPSBEYXRlLm5vdygpICUgdXJscy5sZW5ndGg7XG4gICAgICAgIHJldHVybiB1cmxzW2luZGV4XTtcbiAgICAgIH1cbiAgICB9XG4gIH07XG5cbiAgZXhwb3J0IGNvbnN0IHN3a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2V0KG1pbnQsIG93bmVyLCBmZWVQYXllciwgdHJ1ZSk7XG5cbiAgICAgICAgICBpZiAoaW5zdCAmJiB0eXBlb2YgaW5zdCA9PT0gJ3N0cmluZycpIHtcbiAgICAgICAgICAgIGRlYnVnTG9nKCcjIGFzc29jaWF0ZWRUb2tlbkFjY291bnQ6ICcsIGluc3QpO1xuICAgICAgICAgICAgcmV0dXJuIGluc3Q7XG4gICAgICAgICAgfSBlbHNlIGlmIChpbnN0IGluc3RhbmNlb2YgVHJhbnNhY3Rpb25CdWlsZGVyLkNvbW1vbikge1xuICAgICAgICAgICAgKGF3YWl0IGluc3Quc3VibWl0KCkpLm1hcChcbiAgICAgICAgICAgICAgYXN5bmMgKG9rOiBzdHJpbmcpID0+IHtcbiAgICAgICAgICAgICAgICBhd2FpdCBOb2RlLmNvbmZpcm1lZFNpZyhvayk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGluc3QuZGF0YTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgKGVycjogRXJyb3IpID0+IHtcbiAgICAgICAgICAgICAgICBkZWJ1Z0xvZygnIyBFcnJvciBzdWJtaXQgcmV0cnlHZXRPckNyZWF0ZTogJywgZXJyKTtcbiAgICAgICAgICAgICAgICB0aHJvdyBlcnI7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgIGRlYnVnTG9nKGAjIHJldHJ5OiAke2NvdW50ZXJ9IGNyZWF0ZSB0b2tlbiBhY2NvdW50OiBgLCBlKTtcbiAgICAgICAgICBkZWJ1Z0xvZyhgIyBtaW50OiAke21pbnR9LCBvd25lcjogJHtvd25lcn0sIGZlZVBheWVyOiAke2ZlZVBheWVyfWApO1xuICAgICAgICB9XG4gICAgICAgIGF3YWl0IHNsZWVwKFJFVFJZX1NMRUVQX1RJTUUpO1xuICAgICAgICBjb3VudGVyKys7XG4gICAgICB9XG4g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9nKCcjIGFzc29jaWF0ZWRUb2tlbkFjY291bnQ6ICcsIGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSk7XG5cbiAgICAgIHRyeSB7XG4gICAgICAgIC8vIERvbnQgdXNlIFJlc3VsdFxuICAgICAgICBhd2FpdCBnZXRBY2NvdW50KFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCkuY29tbWl0bWVudCxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3Q6IHVuZGVmaW5lZCxcbiAgICAgICAgfTtcbiAgICAgIH0gY2F0Y2ggKGVycm9yOiB1bmtub3duKSB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5BY2NvdW50Tm90Rm91bmRFcnJvcikgJiZcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5JbnZhbGlkQWNjb3VudE93bmVyRXJyb3IpXG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9yKCdVbmV4cGVjdGVkIGVycm9yJyk7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBwYXllciA9ICFmZWVQYXllciA/IG93bmVyIDogZmVlUGF5ZXI7XG5cbiAgICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgICBwYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgb3duZXIudG9QdWJsa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FsdHknOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5yb3lhbHR5KSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzUm95YWx0eShtZXRhZGF0YS5yb3lhbHR5KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlcl9mZWVfYmFzaXNfcG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJGZWVCYXNpc1BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0YWRhdGEubmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzeW1ib2wnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLnN5bWJvbCkge1xuICAgICAgICAgICAgICByZXMgPSBpc1N5bWJvbChtZXRhZGF0YS5zeW1ib2wpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiA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Wx1ZS5pdGVtcztcblxuICAgIGNvbnN0IG1ldGFkYXRhcyA9IGF3YWl0IFByb21pc2UuYWxsKFxuICAgICAgaXRlbXNcbiAgICAgICAgLmZpbHRlcigoaXRlbSkgPT4gaXRlbS5jb21wcmVzc2lvbi5jb21wcmVzc2VkID09PSBpc0NvbXByZXNzZWQpXG4gICAgICAgIC5tYXAoYXN5bmMgKGl0ZW0pID0+IHtcbiAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgY29uc3Qgb2ZmY2hhaW46IE9mZmNoYWluID0gYXdhaXQgZmV0Y2hPZmZjaGFpbihcbiAgICAgICAgICAgICAgaXRlbS5jb250ZW50Lmpzb25fdXJpLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIGNvbnN0IG1lcmdlZCA9IHtcbiAgICAgICAgICAgICAgb25jaGFpbjogaXRlbSxcbiAgICAgICAgICAgICAgb2ZmY2hhaW46IG9mZmNoYWluLFxuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIHJldHVybiBDb252ZXJ0ZXIuTmZ0LmludG9Vc2VyKG1lcmdlZCk7XG4gICAgICAgICAgfSBjYXRjaCAoZXJyKSB7XG4gICAgICAgICAgICBkZWJ1Z0xvZygnIyBGYWlsZWQgZmV0Y2ggb2ZmY2hhaW4gdXJsOiAnLCBpdGVtLmNvbnRlbnQuanNvbl91cmkpO1xuICAgICAgICAgICAgcmV0dXJuIENvbnZlcnRlci5OZnQuaW50b1VzZXIoe1xuICAgICAgICAgICAgICBvbmNoYWluOiBpdGVtLFxuICAgICAgICAgICAgICBvZmZjaGFpbjoge30sXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICB9XG4gICAgICAgIH0pLFxuICAgICk7XG4gICAgcmV0dXJuIHtcbiAgICAgIHBhZ2U6IGFzc2V0cy52YWx1ZS5wYWdlLFxuICAgICAgdG90YWw6IGFzc2V0cy52YWx1ZS50b3RhbCxcbiAgICAgIGxpbWl0OiBhc3NldHMudmFsdWUubGltaXQsXG4gICA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gICAgbGFtcG9ydHM6XG4gICAgICAgICAgICBhd2FpdCBOb2RlLmdldENvbm5lY3Rpb24oKS5nZXRNaW5pbXVtQmFsYW5jZUZvclJlbnRFeGVtcHRpb24oc3BhY2UpLFxuICAgICAgICAgIHNwYWNlOiBzcGFjZSxcbiAgICAgICAgICBwcm9ncmFtSWQ6IFNQTF9BQ0NPVU5UX0NPTVBSRVNTSU9OX1BST0dSQU1fSUQsXG4gICAgICAgIH0pLFxuICAgICAgKTtcblxuICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgIGNyZWF0ZUNyZWF0ZVRyZWVJbnN0cnVjdGlvbihcbiAgICAgICAgICB7XG4gICAgICAgICAgICBtZXJrbGVUcmVlOiB0cmVlT3duZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICAgICAgdHJlZUF1dGhvcml0eSxcbiAgICAgICAgICAgIHRyZWVDcmVhdG9yOiBvd25lci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgICAgICBwYXllcjogcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICAgICAgbG9nV3JhcHBlcjogU1BMX05PT1BfUFJPR1JBTV9JRCxcbiAgICAgICAgICAgIGNvbXByZXNzaW9uUHJvZ3JhbTogU1BMX0FDQ09VTlRfQ09NUFJFU1NJT05fUFJPR1JBTV9JRCxcbiAgICAgICAgICB9LFxuICAgICAgICAgIHtcbiAgICAgICAgICAgIG1heEJ1ZmZlclNpemUsXG4gICAgICAgICAgICBtYXhEZXB0aCxcbiAgICAgICAgICAgIHB1YmxpYzogZmFsc2UsXG4gICAgICAgICAgfSxcbiAgICAgICAgICBNUExfQlVCQkxFR1VNX1BST0dSQU1fSUQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgKSxcbiAgICAgICk7XG5cbiAgICAgIHJldHVybiBuZXcgVHJhbnNhY3Rpb25CdWlsZGVyLk1pbnQoXG4gICAgICAgIGluc3RydWN0aW9ucyx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F1dGhvcml0eVJlY29yZFBkYTogQlVCQkxFR1VNX1BST0dSQU1fSUQsXG4gICAgICAgICAgICBjb21wcmVzc2lvblByb2dyYW06IFNQTF9BQ0NPVU5UX0NPTVBSRVNTSU9OX1BST0dSQU1fSUQsXG4gICAgICAgICAgICB0b2tlbk1ldGFkYXRhUHJvZ3JhbTogVE9LRU5fTUVUQURBVEFfUFJPR1JBTV9JRCxcbiAgICAgICAgICB9LFxuICAgICAgICAgIHtcbiAgICAgICAgICAgIG1ldGFkYXRhQXJncyxcbiAgICAgICAgICB9LFxuICAgICAgICApLFxuICAgICAgKTtcblxuICAgICAgaWYgKGlucHV0LmNyZWF0b3JzKSB7XG4gICAgICAgIGNvbnN0IGFzc2V0SWQgPSBhd2FpdCBuZXcgU3BhY2UuU3BhY2UodHJlZU93bmVyKS5nZXRBc3NldElkKCk7XG4gICAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICAgIGF3YWl0IGNyZWF0ZVZlcmlmeUNyZWF0b3IoXG4gICAgICAgICAgICBtZXRhZGF0YUFyZ3MuY3JlYXRvcnMsXG4gICAgICAgICAgICBhc3NldElkLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICB0cmVlT3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIG1ldGFkYXRhQXJncyxcbiAgICAgICAgICAgIHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5NaW50KFxuICAgICAgICBpbnN0cnVjdGlvbnMsXG4gICAgICAgIFtvd25lci50b0tleXBhaXIoKV0sXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICBuZXcgU3BhY2UuU3BhY2UodHJlZU93bmVyKSxcbiAgICAgICk7XG4gICAgfSk7XG4gIH07XG59XG4iLCAiaW1wb3J0IHsgY3JlYXRl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tYXAoYXN5bmMgKGQpID0+IHtcbiAgICAgICAgY29uc3QgbWludCA9IGQuYWNjb3VudC5kYXRhLnBhcnNlZC5pbmZvLm1pbnQgYXMgUHVia2V5O1xuICAgICAgICBjb25zdCB0b2tlbkFtb3VudCA9IGQuYWNjb3VudC5kYXRhLnBhcnNlZC5pbmZvLnRva2VuQW1vdW50XG4gICAgICAgICAgLmFtb3VudCBhcyBzdHJpbmc7XG4gICAgICAgIGlmICh0b2tlbkFtb3VudCA9PT0gJzEnKSB7XG4gICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBNZXRhZGF0YS5mcm9tQWNjb3VudEFkZHJlc3MoXG4gICAgICAgICAgY29ubmVjdGlvbixcbiAgICAgICAgICBBY2NvdW50LlBkYS5nZXRNZXRhZGF0YShtaW50KSxcbiAgICAgICAgKVxuICAgICAgICAgIC50aGVuKGFzeW5jIChtZXRhZGF0YSkgPT4ge1xuICAgICAgICAgICAgLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLWV4cGxpY2l0LWFueSAqL1xuICAgICAgICAgICAgcmV0dXJuIGZldGNoUmV0cnkobWV0YWRhdGEuZGF0YS51cmkpLnRoZW4oKGpzb246IGFueSkgPT4ge1xuICAgICAgICAgICAgICByZXR1cm4gY29udmVydGVyKG1ldGFkYXRhLCBqc29uLCB0b2tlbkFtb3VudCk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICB9KVxuICAgICAgICAgIC5jYXRjaCgoZXJyKSA9PiBkZWJ1Z0xvZygnIyBbRmV0Y2ggZXJyb3JdJywgZXJyKSk7XG4gICAgICB9KTtcblxuICAgICAgY29uc3QgZmlsdGVycyA9IChhd2FpdCBQcm9taXNlLmFsbChkYXRhcykpLmZpbHRlcihcbiAgICAgICAgKGRhdGEpID0+IGRhdGEgIT09IHVuZGVmaW5lZCxcbiAgICAgICk7XG4gICAgICByZXR1cm4gZmlsdGVycyBhcyBUb2tlbk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4gICAgICAgIG93bmVyLFxuICAgICAgICBtaW50LFxuICAgICAgKSxcbiAgICApO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVNaW50VG9DaGVja2VkSW5zdHJ1Y3Rpb24oXG4gICAgICAgIG1pbnQsXG4gICAgICAgIHRva2VuQXNzb2NpYXRlZCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIENhbGN1bGF0ZS5jYWxjdWxhdGVBbW91bnQodG90YWxBbW91bnQsIG1pbnREZWNpbWFsKSxcbiAgICAgICAgbWludERlY2ltYWwsXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUNyZWF0ZU1ldGFkYXRhQWNjb3VudFYzSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHtcbiAgICAgICAgICBtZXRhZGF0YTogbWV0YWRhdGFQZGEsXG4gICAgICAgICAgbWludCxcbiAgICAgICAgICBtaW50QXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBwYXllcjogZmVlUGF5ZXIsXG4gICAgICAgICAgdXBkYXRlQXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgIGNyZWF0ZU1ldGFkYXRhQWNjb3VudEFyZ3NWMzoge1xuICAgICAgICAgICAgZGF0YTogdG9rZW5NZXRhZGF0YSxcbiAgICAgICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICAgICAgIGNvbGxlY3Rpb25EZXRhaWxzOiBudWxsLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICApLFxuICAgICk7XG4gICAgcmV0dXJuIGluc3RydWN0aW9ucztcbiAgfTtcblxuICAvKipcbiAgICogU1BMLVRPS0VOIG1pbnRcbiAgICpcbiAgICogQHBhcmFtIHtTZWNyZXR9IG93bmVyICAgICAgLy8gdG9rZW4gb3duZXIgU2VjcmV0XG4gICAqIEBwYXJhbSB7bnVtYm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AuLi5zdG9yYWdlTWV0YWRhdGEsIC4uLmltYWdlIH0sXG4gICAgICAgICAgc3RvcmFnZVR5cGUsXG4gICAgICAgICAgcGF5ZXIsXG4gICAgICAgICk7XG4gICAgICAgIGlmICh1cGxvYWRlZC5pc0Vycikge1xuICAgICAgICAgIHRocm93IHVwbG9hZGVkO1xuICAgICAgICB9XG4gICAgICAgIHVyaSA9IHVwbG9hZGVkLnZhbHVlO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgdGhyb3cgRXJyb3IoYE11c3Qgc2V0IGZpbGVQYXRoJyBvciAndXJpJ2ApO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBpc011dGFibGUgPSB0cnVlO1xuXG4gICAgICBjb25zdCBkYXRhdjIgPSBDb252ZXJ0ZXIuVG9rZW5NZXRhZGF0YS5pbnRvSW5mcmEoXG4gICAgICAgIGlucHV0LFxuICAgICAgICB1cmksXG4gICAgICAgIHNlbGxlckZlZUJhc2lzUG9pbnRzLFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgZGF0YXYyOiAnLCBkYXRhdjIpO1xuICAgICAgZGVidWdMb2coJyMgdXBsb2FkIGNvbnRlbnQgdXJsOiAnLCB1cmkpO1xuXG4gICAgICBjb25zdCBtaW50ID0gQWNjb3VudC5LZXlwYWlyLmNyZWF0ZSgpO1xuICAgICAgY29uc3QgaW5zdHMgPSBhd2FpdCBjcmVhdGVNaW50KFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICB0b3RhbEFtb3VudCxcbiAgICAgICAgbWludERlY2ltYWwsXG4gICAgICAgIGRhdGF2MixcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICBpc011dGFibGUsXG4gICAgICApO1xuXG4gICAgICAvLyBmcmVlemVBdXRob3JpdHlcbiAgICAgIGlmIChmcmVlemVBdXRob3JpdHkpIHtcbiAgICAgICAgaW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3B0aW9ucy5mZWVQYXllciA/IG9wdGlvbnMuZmVlUGF5ZXIgOiBvd25lck9yTXVsdGlzaWdbMF07XG4gICAgICBjb25zdCBrZXlwYWlycyA9IG93bmVyT3JNdWx0aXNpZy5tYXAoKHMpID0+IHMudG9LZXlwYWlyKCkpO1xuXG4gICAgICBjb25zdCBzb3VyY2VUb2tlbiA9IGF3YWl0IEFjY291bnQuQXNzb2NpYXRlZC5yZXRyeUdldE9yQ3JlYXRlKFxuICAgICAgICBtaW50LFxuICAgICAgICBvd25lcixcbiAgICAgICAgcGF5ZXIsXG4gICAgICApO1xuXG4gICAgICBjb25zdCBkZXN0VG9rZW4gPSBhd2FpdCBBY2NvdW50LkFzc29jaWF0ZWQucmV0cnlHZXRPckNyZWF0ZShcbiAgICAgICAgbWludCxcbiAgICAgICAgZGVzdCxcbiAgICAgICAgcGF5ZXIsXG4gICAgICApO1xuXG4gICAgICBjb25zdCBpbnN0ID0gY3JlYXRlVHJhbnNmZXJDaGVja2VkSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHNvdXJjZVRva2VuLnRvUHVibGljS2V5KCksXG4gICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgZGVzdFRva2VuLnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIENhbGN1bGF0b3IuY2FsY3VsYXRlQW1vdW50KGFtb3VudCwgbWludERlY2ltYWwpLFxuICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICAga2V5cGFpcnMsXG4gICAgICApO1xuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb24oW2luc3RdLCBrZXlwYWlycywgcGF5ZXIudG9LZXlwYWlyKCkpO1xuICAgIH0pO1xuICB9O1xufVxuIiwgImltcG9ydCB7IFNwbFRva2VuIGFzIEFkZCB9IGZyb20gJy4vYWRkJztcbmltcG9ydCB7IFNwbFRva2VuIGFzIEJ1c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J1Y3Rpb24obWludCwgMCwgb3duZXIsIG93bmVyKSk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihmZWVQYXllciwgYXRhLCBvd25lciwgbWludCksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKGNyZWF0ZU1pbnRUb0NoZWNrZWRJbnN0cnVjdGlvbihtaW50LCBhdGEsIG93bmVyLCAxLCAwKSk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUNyZWF0ZU1ldGFkYXRhQWNjb3VudFYzSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHtcbiAgICAgICAgICBtZXRhZGF0YTogdG9rZW5NZXRhZGF0YVB1YmtleSxcbiAgICAgICAgICBtaW50LFxuICAgICAgICAgIG1pbnRBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICAgIHBheWVyOiBmZWVQYXllcixcbiAgICAgICAgICB1cGRhdGVBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICB9LFxuICAgICAgICB7XG4gICAgICAgICAgY3JlYXRlTWV0YWRhdGFBY2NvdW50QXJnc1YzOiB7XG4gICAgICAgICAgICBkYXRhOiBuZnRNZXRhZGF0YSxcbiAgICAgICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICAgICAgIGNvbGxlY3Rpb25EZXRhaWxzOiBudWxsLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUNyZWF0ZU1hc3RlckVkaXRpb25WM0luc3RydWN0aW9uKFxuICAgICAgICB7XG4gICAgICAgICAgZWRpdGlvbjogbWFzdGVyRWRpdGlvblB1YmtleSxcbiAgICAgICAgICBtaW50LFxuICAgICAgICAgIHVwZGF0ZUF1dGhvcml0eTogb3duZXIsXG4gICAgICAgICAgbWludEF1dGhvcml0eTogb3duZXIsXG4gICAgICAgICAgcGF5ZXI6IGZlZVBheWVyLFxuICAgICAgICAgIG1ldGFkYXRhOiB0b2tlbk1ldGFkYXRhUHVia2V5LFxuICAgICAgICB9LFxuICAgICAgICB7XG4gICAgICAgICAgY3JlYXRlTWFzdGVyRWRpdGlvbkFyZ3M6IHtcbiAgICAgICAgICAgIG1heFN1cHBseTogMCxcbiAgICAgICAgICB9LFxuICAgICAgICB9LFxuICAgICAgKSxcbiAgICApO1xuICAgIHJldHVybiBpbnN0cnVjdGlvbnM7XG4gIH07XG5cbiAgLyoqXG4gICAqIFVwbG9hZCBjb250ZW50IGFuZCBORlQgbWludFxuICAgKlxuICAgKiBAcGFyYW0ge1NlY3JldH0gb3duZXIgICAgICAgICAvLyBvd25lcidzIFNlY3JldFxuICAgKiBAcGFyYW0ge0lucHV0TmZ0TWV0YWRhdGF9IGlucHV0XG4gICAqIHtcbiAgICogICBuYW1lOiBzdHJpbmcgICAgICAgICAgICAgICAvLyBuZnQgY29udGVudCBuYW1lXG4gICAqICAgc3ltYm9sOiBzdHJpbmcgICAgICAgICAgICAgLy8gbmZ0IHRpY2tlciBzeW1ib2xcbiAgICogICBmaWxlUGF0aDogc3RyaW5nIHwgRmlsZSAgICAvLyBuZnQgdGlja2VyIHN5bWJvbFxuICAgKiAgIHJveWFsdHk6IG51bWJlciAgICAgICAgICAgIC8vIHJveWFsdHkgcGVyY2VudGFnZVxuICAgKiAgIHN0b3JhZ2VUeXBlOiAnYXJ3ZWF2ZSd8J25mdFN0b3JhZ2UnIC8vIERlY2VudHJhbGl6ZWQgc3RvcmFnZVxuICAgKiAgIGRlc2NyaXB0aW9uPzogc3RyaW5nICAgICAgIC8vIG5mdCBjb250ZW50IGRlc2NyaXB0aW9uXG4gICAqICAgZXh0ZXJuYWxfdXJsPzogc3RyaW5nICAgICAgLy8gbGFuZGluZyBwYWdlLCBob21lIHBhZ2UgdXJpLCByZWxhdGVkIHVybF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ICAgICAgLy8gZnJlZXplQXV0aG9yaXR5XG4gICAgICBpZiAoZnJlZXplQXV0aG9yaXR5KSB7XG4gICAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICAgIGNyZWF0ZURlbGVhZ2F0ZShcbiAgICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICAgICAgZnJlZXplQXV0aG9yaXR5LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgLy8gY29sbGVjdGlvbiAtLS1cbiAgICAgIGlmIChpbnB1dC5jb2xsZWN0aW9uKSB7XG4gICAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICAgIGNyZWF0ZVZlcmlmeVNpemVkQ29sbGVjdGlvbihcbiAgICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIGlucHV0LmNvbGxlY3Rpb24udG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBrZXlwYWlycyA9IFtvd25lci50b0tleXBhaXIoKSwgbWludC50b0tleXBhaXIoKV07XG5cbiAgICAgIC8vIGNyZWF0b3IgLS0tXG4gICAgICBpZiAoaW5wdXQuY3JlYXRvcnMpIHtcbiAgICAgICAgaW5wdXQuY3JlYXRvcnMuZm9yRWFjaCgoY3JlYXRvcikgPT4ge1xuICAgICAgICAgIGlmIChBY2NvdW50LktleXBhaXIuaXNTZWNyZXQoY3JlYXRvci5zZWNyZXQpKSB7XG4gICAgICAgICAgICBjb25zdCBjcmVhdG9yUHVia2V5ID0gY3JlYXRvci5hZGRyZXNzLnRvUHVibGljS2V5KCk7XG4gICAgICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRl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WN0aW9uTWludCA9IEFjY291bnQuS2V5cGFpci5jcmVhdGUoKTtcbiAgICAgIGNvbnN0IGNvbGxlY3Rpb25NZXRhZGF0YUFjY291bnQgPSBBY2NvdW50LlBkYS5nZXRNZXRhZGF0YShcbiAgICAgICAgY29sbGVjdGlvbk1pbnQucHVia2V5LFxuICAgICAgKTtcblxuICAgICAgY29uc3QgaW5zdHJ1Y3Rpb25zID0gYXdhaXQgTWludC5jcmVhdGVNaW50KFxuICAgICAgICBjb2xsZWN0aW9uTWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgZGF0YXYyLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICk7XG5cbiAgICAgIC8vIGZyZWV6ZUF1dGhvcml0eVxuICAgICAgaWYgKGZyZWV6ZUF1dGhvcml0eSkge1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgICBNaW50LmNyZWF0ZURlbGVhZ2F0ZShcbiAgICAgICAgICAgIGNvbGxlY3Rpb25NaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgICAgIGZyZWV6ZUF1dGhvcml0eS50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGNvbGxlY3Rpb25zID0ge1xuICAgICAgICBjb2xsZWN0aW9uTWV0YWRhdGE6IGNvbGxlY3Rpb25NZXRhZGF0YUFjY291bnQsXG4gICAgICAgIGNvbGxlY3Rpb25BdXRob3JpdHk6IG93bmVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgY29sbGVjdGlvbk1pbnQ6IGNvbGxlY3Rpb25NaW50LnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgIH07XG5cbiAgICAgIGluc3RydWN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XIiLCAiU3BsVG9rZW4iLCAiUmVndWxhck5mdCIsICJTcGxUb2tlbiIsICJSZWd1bGFyTmZ0IiwgIkRhc0FwaSIsICJpbXBvcnRfc3BsX3Rva2VuIiwgImltcG9ydF9tcGxfdG9rZW5fbWV0YWRhdGEiLCAiUmVndWxhck5mdCIsICJBY2NvdW50IiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJpbXBvcnRfd2ViMyIsICJpbXBvcnRfc3BsX3Rva2VuIiwgImltcG9ydF9tcGxfdG9rZW5fbWV0YWRhdGEiLCAiUmVndWxhck5mdCIsICJtaW50IiwgIkFjY291bnQiLCAiQ29udmVydGVyIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJpbXBvcnRfd2ViMyIsICJSZWd1bGFyTmZ0IiwgIkNvbnZlcnRlciIsICJBY2NvdW50IiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJSZWd1bGFyTmZ0IiwgIlNwbFRva2VuIiwgImltcG9ydF9tcGxfdG9rZW5fbWV0YWRhdGEiLCAiUmVndWxhck5mdCIsICJDb252ZXJ0ZXIiLCAiQWNjb3VudCIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiaW1wb3J0X3NwbF90b2tlbiIsICJpbXBvcnRfbXBsX3Rva2VuX21ldGFkYXRhIiwgIlJlZ3VsYXJOZnQiLCAiQWNjb3VudCIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiUmVndWxhck5mdCIsICJTcGxUb2tlbiIsICJSZWd1bGFyTmZ0IiwgIkNvbXByZXNzZWROZnQiLCAiUmVndWxhck5mdCIsICJDb21wcmVzc2VkTmZ0Il0KfQo= \ No newline at end of file diff --git a/packages/suite-compressed-nft/dist/index.mjs b/packages/suite-compressed-nft/dist/index.mjs index 0075853be..64ffb734d 100644 --- a/packages/suite-compressed-nft/dist/index.mjs +++ b/packages/suite-compressed-nft/dist/index.mjs @@ -1,4 +1,4 @@ -// ../shared/src/constants.ts +// ../suite-utils/src/constants.ts import { PublicKey } from "@solana/web3.js"; import SolanaJsonConfig from "@solana-suite/config/load"; var Config = SolanaJsonConfig; @@ -215,65 +215,6 @@ var TransactionBuilder; TransactionBuilder7.Common = Common2; })(TransactionBuilder || (TransactionBuilder = {})); -// ../shared/src/shared.ts -var overwriteObject = (object, targets) => { - const that = object; - targets.forEach((target) => { - delete that[target.existsKey]; - that[target.will.key] = target.will.value; - }); - return that; -}; -var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { - if (Constants.isDebugging === "true" || process.env.DEBUG === "true") { - console.log("[DEBUG]", data1, data2, data3, data4); - } -}; -var sleep = async (sec) => { - return new Promise((r) => setTimeout(r, sec * 1e3)); -}; -var isBrowser = () => { - return typeof window !== "undefined" && typeof window.document !== "undefined"; -}; -var isNode = () => { - return typeof process !== "undefined" && process.versions != null && process.versions.node != null; -}; -var isPromise = (obj) => { - return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; -}; -function Try(input, finallyInput) { - try { - const v = input(); - if (isPromise(v)) { - return v.then( - (x) => Result2.ok(x), - (err) => Result2.err(err) - ); - } else { - return Result2.ok(v); - } - } catch (e) { - if (e instanceof Error) { - return Result2.err(e); - } - return Result2.err(Error(e)); - } finally { - if (finallyInput) { - debugLog("# finally input:", finallyInput); - finallyInput(); - } - } -} -var convertTimestampToDateTime = (created_at) => { - if (created_at) { - return new Date(created_at * 1e3); - } - return; -}; -var unixTimestamp = () => { - return Math.floor((/* @__PURE__ */ new Date()).getTime() / 1e3); -}; - // ../transaction-builder/src/batch.ts var TransactionBuilder2; ((TransactionBuilder7) => { @@ -741,12 +682,71 @@ var TransactionBuilder6 = { ...TransactionBuilder4 }; -// ../shared/src/result.ts +// ../suite-utils/src/shared.ts +var overwriteObject = (object, targets) => { + const that = object; + targets.forEach((target) => { + delete that[target.existsKey]; + that[target.will.key] = target.will.value; + }); + return that; +}; +var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { + if (Constants.isDebugging === "true" || process.env.DEBUG === "true") { + console.log("[DEBUG]", data1, data2, data3, data4); + } +}; +var sleep = async (sec) => { + return new Promise((r) => setTimeout(r, sec * 1e3)); +}; +var isBrowser = () => { + return typeof window !== "undefined" && typeof window.document !== "undefined"; +}; +var isNode = () => { + return typeof process !== "undefined" && process.versions != null && process.versions.node != null; +}; +var isPromise = (obj) => { + return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; +}; +function Try(input, finallyInput) { + try { + const v = input(); + if (isPromise(v)) { + return v.then( + (x) => Result5.ok(x), + (err) => Result5.err(err) + ); + } else { + return Result5.ok(v); + } + } catch (e) { + if (e instanceof Error) { + return Result5.err(e); + } + return Result5.err(Error(e)); + } finally { + if (finallyInput) { + debugLog("# finally input:", finallyInput); + finallyInput(); + } + } +} +var convertTimestampToDateTime = (created_at) => { + if (created_at) { + return new Date(created_at * 1e3); + } + return; +}; +var unixTimestamp = () => { + return Math.floor((/* @__PURE__ */ new Date()).getTime() / 1e3); +}; + +// ../suite-utils/src/result.ts var AbstractResult = class { unwrap(ok, err) { const r = this._chain( - (value) => Result2.ok(ok ? ok(value) : value), - (error) => err ? Result2.ok(err(error)) : Result2.err(error) + (value) => Result5.ok(ok ? ok(value) : value), + (error) => err ? Result5.ok(err(error)) : Result5.err(error) ); if (r.isErr) { throw r.error; @@ -755,17 +755,17 @@ var AbstractResult = class { } map(ok, err) { return this._chain( - (value) => Result2.ok(ok(value)), - (error) => Result2.err(err ? err(error) : error) + (value) => Result5.ok(ok(value)), + (error) => Result5.err(err ? err(error) : error) ); } chain(ok, err) { - return this._chain(ok, err || ((error) => Result2.err(error))); + return this._chain(ok, err || ((error) => Result5.err(error))); } match(ok, err) { this._chain( - (value) => Result2.ok(ok(value)), - (error) => Result2.err(err(error)) + (value) => Result5.ok(ok(value)), + (error) => Result5.err(err(error)) ); } /// single TransactionBuilder //// @@ -787,7 +787,7 @@ var AbstractResult = class { } ); if (res.isErr) { - return Result2.err(res.error); + return Result5.err(res.error); } return res.value; } @@ -822,7 +822,7 @@ Array.prototype.submit = async function(feePayer) { } else if (obj.isOk) { instructions.push(obj.value); } else { - return Result2.err(Error("Only Array Instruction object")); + return Result5.err(Error("Only Array Instruction object")); } } debugLog("# Result batch submit: ", instructions); @@ -852,16 +852,16 @@ var InternalErr = class extends AbstractResult { return err(this.error); } }; -var Result2; -((Result31) => { +var Result5; +((Result32) => { function ok(value) { return new InternalOk(value); } - Result31.ok = ok; + Result32.ok = ok; function err(error) { return new InternalErr(error || Error()); } - Result31.err = err; + Result32.err = err; function all(obj) { if (Array.isArray(obj)) { const resArr = []; @@ -871,7 +871,7 @@ var Result2; } resArr.push(item.value); } - return Result31.ok(resArr); + return Result32.ok(resArr); } const res = {}; const keys = Object.keys(obj); @@ -882,10 +882,10 @@ var Result2; } res[key] = item.value; } - return Result31.ok(res); + return Result32.ok(res); } - Result31.all = all; -})(Result2 || (Result2 = {})); + Result32.all = all; +})(Result5 || (Result5 = {})); // ../converter/src/collection.ts var Converter; @@ -1514,7 +1514,7 @@ var Node; signature }, commitment - ).then(Result2.ok).catch(Result2.err); + ).then(Result5.ok).catch(Result5.err); }; })(Node || (Node = {})); @@ -3527,4 +3527,4 @@ var CompressedNft9 = { export { CompressedNft9 as CompressedNft }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vc2hhcmVkL3NyYy9jb25zdGFudHMudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvYmF0Y2gudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY29tbW9uLnRzIiwgIi4uLy4uL3NoYXJlZC9zcmMvc2hhcmVkLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL21pbnQudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvcGFydGlhbC1zaWduLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uL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FsU2lnbmVycyA9IHRoaXMuc2lnbmVycztcblxuICAgICAgICBpZiAodGhpcy5mZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gdGhpcy5mZWVQYXllci5wdWJsaWNLZXk7XG4gICAgICAgICAgZmluYWxTaWduZXJzID0gW3RoaXMuZmVlUGF5ZXIsIC4uLnRoaXMuc2lnbmVyc107XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLmluc3RydWN0aW9ucy5mb3JFYWNoKChpbnN0KSA9PiB0cmFuc2FjdGlvbi5hZGQoaW5zdCkpO1xuXG4gICAgICAgIGNvbnN0IG9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IE1BWF9SRVRSSUVTLFxuICAgICAgICB9O1xuXG4gICAgICAgIHJldHVybiBhd2FpdCBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uKFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICBvcHRpb25zLFxuICAgICAgICApO1xuICAgICAgfSk7XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IEFueU9iamVjdCB9IGZyb20gJ34vdHlwZXMvc2hhcmVkJztcbmltcG9ydCB7IENvbnN0YW50cyB9IGZyb20gJy4vY29uc3RhbnRzJztcbmltcG9ydCB7IFJlc3VsdCB9IGZyb20gJy4vcmVzdWx0JztcblxuLyoqXG4gKiBjb252ZXJ0IGJ1ZmZlciB0byBBcnJheVxuICpcbiAqIEBwYXJhbSB7QnVmZmVyfSBidWZmZXJcbiAqIEByZXR1cm5zIG51bWJlcltdXG4gKi9cbmV4cG9ydCBjb25zdCBidWZmZXJUb0FycmF5ID0gKGJ1ZmZlcjogQnVmZmVyKTogbnVtYmVyW10gPT4ge1xuICBjb25zdCBudW1zID0gW107XG4g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AgICByZXR1cm4gcmVzLnRva2VuQWNjb3VudDtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uPFB1YmtleT4oXG4gICAgICAgIFtyZXMuaW5zdF0sXG4gICAgICAgIFtdLFxuICAgICAgICBmZWVQYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgcmVzLnRva2VuQWNjb3VudCEsXG4gICAgICApO1xuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiBSZXRyeSBmdW5jdGlvbiBpZiBjcmVhdGUgbmV3IHRva2VuIGFjY291aW50XG4gICAgICpcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gbWludFxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBvd25lclxuICAgICAqIEBwYXJhbSB7U2VjcmV0fSBmZWVQYXllclxuICAgICAqIEByZXR1cm5zIFByb21pc2U8c3RyaW5nPlxuICAgICAqL1xuICAgIGV4cG9ydCBjb25zdCByZXRyeUdldE9yQ3JlYXRlID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyOiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxzdHJpbmc+ID0+IHtcbiAgICAgIGxldCBjb3VudGVyID0gMTtcbiAgICAgIHdoaWxlIChjb3VudGVyIDwgUkVUUllfT1ZFUl9MSU1JVCkge1xuICAgICAgICB0cnkge1xuICAgICAgICAgIGNvbnN0IGluc3QgPSBhd2FpdCBnZXQobWludCwgb3duZXIsIGZlZVBheWVyLCB0cnVlKTtcblxuICAgICAgICAgIGlmIChpbnN0ICYmIHR5cGVvZiBpbnN0ID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgaW5zdCk7XG4gICAgICAgICAgICByZXR1cm4gaW5zdDtcbiAgICAgICAgICB9IGVsc2UgaWYgKGluc3QgaW5zdGFuY2VvZiBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uKSB7XG4gICAgICAgICAgICAoYXdhaXQgaW5zdC5zdWJtaXQoKSkubWFwKFxuICAgICAgICAgICAgICBhc3luYyAob2s6IHN0cmluZykgPT4ge1xuICAgICAgICAgICAgICAgIGF3YWl0IE5vZGUuY29uZmlybWVkU2lnKG9rKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gaW5zdC5kYXRhO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAoZXJyOiBFcnJvcikgPT4ge1xuICAgICAgICAgICAgICAgIGRlYnVnTG9nKCcjIEVycm9yIHN1Ym1pdCByZXRyeUdldE9yQ3JlYXRlOiAnLCBlcnIpO1xuICAgICAgICAgICAgICAgIHRocm93IGVycjtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgZGVidWdMb2coYCMgcmV0cnk6ICR7Y291bnRlcn0gY3JlYXRlIHRva2VuIGFjY291bnQ6IGAsIGUpO1xuICAgICAgICAgIGRlYnVnTG9nKGAjIG1pbnQ6ICR7bWludH0sIG93bmVyOiAke293bmVyfSwgZmVlUGF5ZXI6ICR7ZmVlUGF5ZXJ9YCk7XG4gICAgICAgIH1cbiAgICAgICAgYXdhaXQgc2xlZXAoUkVUUllfU0xFRVBfVElNRSk7XG4gICAgICAgIGNvdW50ZXIrKztcbiAgICAgIH1cbiAgICAgIHRocm93IEVycm9yKGByZXRyeSBhY3Rpb24gaXMgb3ZlciBsaW1pdCAke1JFVFJZX09WRVJfTElNSVR9YCk7XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIFtNYWluIGxvZ2ljXUdldCBBc3NvY2lhdGVkIHRva2VuIEFjY291bnQuXG4gICAgICogaWYgbm90IGNyZWF0ZWQsIGNyZWF0ZSBuZXcgdG9rZW4gYWNjb3VpbnRcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBtaW50XG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAgICogQHBhcmFtIHtQdWJrZXl9IGZlZVBheWVyXG4gICAgICogQHJldHVybnMgUHJvbWlzZTxzdHJpbmc+XG4gICAgICovXG4gICAgZXhwb3J0IGNvbnN0IG1ha2VPckNyZWF0ZUluc3RydWN0aW9uID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyPzogUHVia2V5LFxuICAgICAgYWxsb3dPd25lck9mZkN1cnZlID0gZmFsc2UsXG4gICAgKTogUHJvbWlzZTx7XG4gICAgICB0b2tlbkFjY291bnQ6IHN0cmluZztcbiAgICAgIGluc3Q6IFRyYW5zYWN0aW9uSW5zdHJ1Y3Rpb24gfCB1bmRlZmluZWQ7XG4gICAgfT4gPT4ge1xuICAgICAgY29uc3QgYXNzb2NpYXRlZFRva2VuQWNjb3VudCA9IGdldEFzc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jKFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSxcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3QsXG4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ICAgIH1cbiAgICAgIHJldHVybiBpbnB1dC5tYXAoKGRhdGEpID0+IHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICBhZGRyZXNzOiBkYXRhLmFkZHJlc3MudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBzaGFyZTogZGF0YS5zaGFyZSxcbiAgICAgICAgICB2ZXJpZmllZDogZmFsc2UsXG4gICAgICAgIH07XG4gICAgICB9KTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGludG9Db21wcmVzc2VkTmZ0SW5mcmEgPSAoXG4gICAgICBpbnB1dDogT3B0aW9uPElucHV0Q3JlYXRvcnNbXT4gfCB1bmRlZmluZWQsXG4gICAgKTogSW50ZXJuYWxDcmVhdG9yc1tdID0+IHtcbiAgICAgIGlmICghaW5wdXQpIHtcbiAgICAgICAgcmV0dXJuIFtdO1xuICAgICAgfVxuICAgICAgcmV0dXJuIGlucHV0IS5tYXAoKGRhdGEpID0+IHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICBhZGRyZXNzOiBkYXRhLmFkZHJlc3MudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBzaGFyZTogZGF0YS5zaGFyZSxcbiAgICAgICAgICB2ZXJpZmllZDogZmFsc2UsXG4gICAgICAgIH07XG4gICAgICB9KTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGludG9Vc2VyID0gKFxuICAgICAgb3V0cHV0OiBPcHRpb248SW50ZXJuYWxDcmVhdG9yc1tdPixcbiAgICApOiBDcmVhdG9yc1tdIHwgdW5kZWZpbmVkID0+IHtcbiAgICAgIGlmICghb3V0cHV0KSB7XG4gICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBvdXRwdXQubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvU3RyaW5nKCksXG4gICA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RvcmFnZVR5cGU6IFN0b3JhZ2VUeXBlLFxuICAgICAgZmVlUGF5ZXI/OiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxQcm9wZXJ0aWVzPiA9PiB7XG4gICAgICBpZiAoIWlucHV0IHx8ICFpbnB1dC5maWxlcykge1xuICAgICAgICByZXR1cm4ge307XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGZpbGVzID0gYXdhaXQgUHJvbWlzZS5hbGwoXG4gICAgICAgIGlucHV0LmZpbGVzLm1hcChhc3luYyAoZmlsZSkgPT4ge1xuICAgICAgICAgIGlmICghZmlsZS5maWxlUGF0aCkge1xuICAgICAgICAgICAgcmV0dXJuIHt9O1xuICAgICAgICAgIH1cbiAgICAgICAgICBjb25zdCByZXMgPSBhd2FpdCBjYWxsYmFja0Z1bmMoZmlsZS5maWxlUGF0aCwgc3RvcmFnZVR5cGUsIGZlZVBheWVyKTtcbiAgICAgICAgICBpZiAocmVzLmlzRXJyKSB7XG4gICAgICAgICAgICB0aHJvdyBFcnJvcihyZXMuZXJyb3IubWVzc2FnZSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBvdmVyd3JpdGVPYmplY3QoZmlsZSwgW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBleGlzdHNLZXk6ICdmaWxlUGF0aCcsXG4gICAgICAgICAgICAgIHdpbGw6IHsga2V5OiAndXJpJywgdmFsdWU6IHJlcy52YWx1ZSB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICBdKTtcbiAgICAgICAgfSksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHsgLi4uaW5wdXQsIGZpbGVzIH0gYXMgUHJvcGVydGllcztcbiAgICB9O1xuICB9XG59XG4iLCAiLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLXVudXNlZC12YXJzICovXG5pbXBvcnQgeyBPcHRpb24sIFVzZXMgfSBmcm9tICd+L3R5cGVzL3JlZ3VsYXItbmZ0J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CAoa2V5KSB7XG4gICAgICAgICAgY2FzZSAnaW1hZ2UnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5pbWFnZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc0ltYWdlVXJsKG1ldGFkYXRhLmltYWdlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3JveWFsdHknOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5yb3lhbHR5KSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzUm95YWx0eShtZXRhZGF0YS5yb3lhbHR5KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlcl9mZWVfYmFzaXNfcG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJGZWVCYXNpc1BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0YWRhd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xcbiAgICAgIHBhZ2UsXG4gICAgICBzb3J0QnksXG4gICAgICBiZWZvcmUsXG4gICAgICBhZnRlcixcbiAgICApO1xuICAgIGlmIChhc3NldHMuaXNFcnIpIHtcbiAgICAgIHRocm93IGFzc2V0cy5lcnJvcjtcbiAgICB9XG5cbiAgICBjb25zdCBpdGVtcyA9IGFzc2V0cy52YWx1ZS5pdGVtcztcblxuICAgIGNvbnN0IG1ldGFkYXRhcyA9IGF3YWl0IFByb21pc2UuYWxsKFxuICAgICAgaXRlbXNcbiAgICAgICAgLmZpbHRlcigoaXRlbSkgPT4gaXRlbS5jb21wcmVzc2lvbi5jb21wcmVzc2VkID09PSBpc0NvbXByZXNzZWQpXG4gICAgICAgIC5tYXAoYXN5bmMgKGl0ZW0pID0+IHtcbiAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgY29uc3Qgb2ZmY2hhaW46IE9mZmNoYWluID0gYXdhaXQgZmV0Y2hPZmZjaGFpbihcbiAgICAgICAgICAgICAgaXRlbS5jb250ZW50Lmpzb25fdXJpLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIGNvbnN0IG1lcmdlZCA9IHtcbiAgICAgICAgICAgICAgb25jaGFpbjogaXRlbSxcbiAgICAgICAgICAgICAgb2ZmY2hhaW46IG9mZmNoYWluLFxuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIHJldHVybiBDb252ZXJ0ZXIuTmZ0LmludG9Vc2VyKG1lcmdlZCk7XG4gICAgICAgICAgfSBjYXRjaCAoZXJyKSB7XG4gICAgICAgICAgICBkZWJ1Z0xvZygnIyBGYWlsZWQgZmV0Y2ggb2ZmY2hhaW4gdXJsOiAnLCBpdGVtLmNvbnRlbnQuanNvbl91cmkpO1xuICAgICAgICAgICAgcmV0dXJuIENvbnZlcnRlci5OZnQuaW50b1VzZXIoe1xuICAgICAgICAgICAgICBvbmNoYWluOiBpdGVtLFxuICAgICAgICAgICAgICBvZmZjaGFpbjoge30sXG4gICAgICAgICAgICB9KT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GZyb21QdWJrZXk6IHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgICBuZXdBY2NvdW50UHVia2V5OiB0cmVlT3duZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICAgIGxhbXBvcnRzOlxuICAgICAgICAgICAgYXdhaXQgTm9kZS5nZXRDb25uZWN0aW9uKCkuZ2V0TWluaW11bUJhbGFuY2VGb3JSZW50RXhlbXB0aW9uKHNwYWNlKSxcbiAgICAgICAgICBzcGFjZTogc3BhY2UsXG4gICAgICAgICAgcHJvZ3JhbUlkOiBTUExfQUNDT1VOVF9DT01QUkVTU0lPTl9QUk9HUkFNX0lELFxuICAgICAgICB9KSxcbiAgICAgICk7XG5cbiAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICBjcmVhdGVDcmVhdGVUcmVlSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAge1xuICAgICAgICAgICAgbWVya2xlVHJlZTogdHJlZU93bmVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgICAgIHRyZWVBdXRob3JpdHksXG4gICAgICAgICAgICB0cmVlQ3JlYXRvcjogb3duZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICAgICAgcGF5ZXI6IHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgICAgIGxvZ1dyYXBwZXI6IFNQTF9OT09QX1BST0dSQU1fSUQsXG4gICAgICAgICAgICBjb21wcmVzc2lvblByb2dyYW06IFNQTF9BQ0NPVU5UX0NPTVBSRVNTSU9OX1BST0dSQU1fSUQsXG4gICAgICAgICAgfSxcbiAgICAgICAgICB7XG4gICAgICAgICAgICBtYXhCdWZmZXJTaXplLFxuICAgICAgICAgICAgbWF4RGVwdGgsXG4gICAgICAgICAgICBwdWJsaWM6IGZhbHNlLFxuICAgICAgICAgIH0sXG4gICAgICAgICAgTVBMX0JVQkJMRUdVTV9QUk9HUkFNX0lELn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cGxvYWQoXG4gICAgICAgICAgc3RvcmFnZU1ldGFkYXRhLFxuICAgICAgICAgIGlucHV0LmZpbGVQYXRoLFxuICAgICAgICAgIHN0b3JhZ2VUeXBlLFxuICAgICAgICAgIHBheWVyLFxuICAgICAgICApO1xuICAgICAgICBkZWJ1Z0xvZygnIyB1cGxvYWQgY29udGVudCB1cmw6ICcsIHVwbG9hZGVkKTtcbiAgICAgICAgaWYgKHVwbG9hZGVkLmlzRXJyKSB7XG4gICAgICAgICAgdGhyb3cgdXBsb2FkZWQ7XG4gICAgICAgIH1cbiAgICAgICAgdXJpID0gdXBsb2FkZWQudmFsdWU7XG4gICAgICAgIC8vIHVwbG9hZGVkIGZpbGVcbiAgICAgIH0gZWxzZSBpZiAoaW5wdXQudXJpKSB7XG4gICAgICAgIGNvbnN0IGltYWdlID0geyBpbWFnZTogaW5wdXQudXJpIH07XG4gICAgICAgIGNvbnN0IHVwbG9hZGVkID0gYXdhaXQgU3RvcmFnZS51cGxvYWREYXRhKFxuICAgICAgICAgIHsgLi4uc3RvcmFnZU1ldGFkYXRhLCAuLi5pbWFnZSB9LFxuICAgICAgICAgIHN0b3JhZ2VUeXBlLFxuICAgICAgICAgIHBheWVyLFxuICAgICAgICApO1xuICAgICAgICBpZiAodXBsb2FkZWQuaXNFcnIpIHtcbiAgICAgICAgICB0aHJvdyB1cGxvYWRlZDtcbiAgICAgICAgfVxuICAgICAgICB1cmkgPSB1cGxvYWRlZC52YWx1ZTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHRocm93IEVycm9yKGBNdXN0IHNldCBmaWxlUGF0aCcgb3IgJ3VyaSdgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgY29udmVydGVkID0gQ29udmVydGVyLkNvbXByZXNzZWROZnRNZXRhZGF0YS5pbnRvSW5mcmEoXG4gICAgICAgIGlucHV0LFxuICAgICAgICB1cmksXG4gICAgICAgIHNlbGxlckZlZUJhc2lzUG9pbnRzLFxuICAgICAgKTtcblxuICAgICAgY29uc3QgbWV0YWRhdGFBcmdzOiBNZXRhZGF0YUFyZ3MgPSB7XG4gICAgICAgIC4uLmNvbnZlcnRlZCxcbiAgICAgICAgY29sbGVjdGlvbjogeyBrZXk6IGNvbGxlY3Rpb25NaW50LnRvUHVibGljS2V5KCksIHZlcmlmaWVkOiBmYWxzZSB9LFxuICAgICAgfTtcblxuICAgICAgZGVidWdMb2coJyMgaW5wdXQ6ICcsIGlucHV0KTtcbiAgICAgIGRlYnVnTG9nKCcjIG1ldGFkYXRhQXJnczogJywgbWV0YWRhdGFBcmdzKTtcblxuICAgICAgY29uc3QgaW5zdHJ1Y3Rpb25zID0gW107XG4gICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgY3JlYXRlTWludFRvQ29sbGVjdGlvblYxSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAge1xuICAgICAgICAgICAgbWVya2xlVHJlZTogdHJlZU93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICB0cmVlQXV0aG9yaXR5LFxuICAgICAgICAgICAgdHJlZURlbGVnYXRlOiBvd25lclB1YmxpY0tleSxcbiAgICAgICAgICAgIHBheWVyOiBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgICAgICBsZWFmT3duZXI6IGxlYWZPd25lciwgLy8gcmVjZWl2ZXJcbiAgICAgICAgICAgIGxlYWZEZWxlZ2F0ZTogbGVhZkRlbGVnYXRlLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBjb2xsZWN0aW9uQXV0aG9yaXR5OiBvd25lclB1YmxpY0tleSxcbiAgICAgICAgICAgIGNvbGxlY3Rpb25NaW50OiBjb2xsZWN0aW9uTWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgY29sbGVjdGlvbk1ldGFkYXRhLFxuICAgICAgICAgICAgZWRpdGlvbkFjY291bnQ6IGNvbGxlY3Rpb25NYXN0ZXJFZGl0aW9uQWNjb3VudCxcbiAgICAgICAgICAgIGJ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pLFxuICAgICAgICB7XG4gICAgICAgICAgcHJvZ3JhbUlkOiBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICB9LFxuICAgICAgKTtcblxuICAgICAgY29uc3QgZGF0YXMgPSBpbmZvLnZhbHVlLm1hcChhc3luYyAoZCkgPT4ge1xuICAgICAgICBjb25zdCBtaW50ID0gZC5hY2NvdW50LmRhdGEucGFyc2VkLmluZm8ubWludCBhcyBQdWJrZXk7XG4gICAgICAgIGNvbnN0IHRva2VuQW1vdW50ID0gZC5hY2NvdW50LmRhdGEucGFyc2VkLmluZm8udG9rZW5BbW91bnRcbiAgICAgICAgICAuYW1vdW50IGFzIHN0cmluZztcbiAgICAgICAgaWYgKHRva2VuQW1vdW50ID09PSAnMScpIHtcbiAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIE1ldGFkYXRhLmZyb21BY2NvdW50QWRkcmVzcyhcbiAgICAgICAgICBjb25uZWN0aW9uLFxuICAgICAgICAgIEFjY291bnQuUGRhLmdldE1ldGFkYXRhKG1pbnQpLFxuICAgICAgICApXG4gICAgICAgICAgLnRoZW4oYXN5bmMgKG1ldGFkYXRhKSA9PiB7XG4gICAgICAgICAgICAvKiBlc2xpbnQtZGlzYWJsZSBAdHlwZXNjcmlwdC1lc2xpbnQvbm8tZXhwbGljaXQtYW55ICovXG4gICAgICAgICAgICByZXR1cm4gZmV0Y2hSZXRyeShtZXRhZGF0YS5kYXRhLnVyaSkudGhlbigoanNvbjogYW55KSA9PiB7XG4gICAgICAgICAgICAgIHJldHVybiBjb252ZXJ0ZXIobWV0YWRhdGEsIGpzb24sIHRva2VuQW1vdW50KTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgIH0pXG4gICAgICAgICAgLmNhdGNoKChlcnIpID0+IGRlYnVnTG9nKCcjIFtGZXRjaCBlcnJvcl0nLCBlcnIpKTtcbiAgICAgIH0pO1xuXG4gICAgICBjb25zdCBmaWx0ZXJzID0gKGF3YWl0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PckNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICBtaW50LFxuICAgICAgICBkZXN0LFxuICAgICAgICBmZWVQYXllcixcbiAgICAgICk7XG5cbiAgICAgIGxldCBpbnN0MjtcbiAgICAgIGNvbnN0IGJsb2NraGFzaE9iaiA9IGF3YWl0IE5vZGUuZ2V0Q29ubmVjdGlvbigpLmdldExhdGVzdEJsb2NraGFzaCgpO1xuXG4gICAgICBjb25zdCB0eCA9IG5ldyBUcmFuc2FjdGlvbih7XG4gICAgICAgIGxhc3RWYWxpZEJsb2NrSGVpZ2h0OiBibG9ja2hhc2hPYmoubGFzdFZhbGlkQmxvY2tIZWlnaHQsXG4gICAgICAgIGJsb2NraGFzaDogYmxvY2toYXNoT2JqLmJsb2NraGFzaCxcbiAgICAgICAgZmVlUGF5ZXI6IGZlZVBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICB9KTtcblxuICAgICAgLy8gcmV0dXJuIGFzc29jaWF0ZWQgdG9rZW4gYWNjb3VudFxuICAgICAgaWYgKCFkZXN0VG9rZW4uaW5zdCkge1xuICAgICAgICBpbnN0MiA9IGNyZWF0ZVRyYW5zZmVyQ2hlY2tlZEluc3RydWN0aW9uKFxuICAgICAgICAgIHNvdXJjZVRva2VuLnRva2VuQWNjb3VudC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBkZXN0VG9rZW4udG9rZW5BY2NvdW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgICAgQ2FsY3VsYXRvci5jYWxjdWxhdGVBbW91bnQoYW1vdW50LCBtaW50RGVjaW1hbCksXG4gICAgICAgICAgbWludERlY2ltYWwsXG4gICAgICAgICAgW293bmVyLnRvS2V5cGFpcigpXSxcbiAgICAgICAgKTtcbiAgICAgICAgdHguYWRkKGluc3QyKTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIC8vIHJldHVybiB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ChcbiAgICAgIGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgZmVlUGF5ZXIsXG4gICAgICAgIHRva2VuQXNzb2NpYXRlZCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIG1pbnQsXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZU1pbnRUb0NoZWNrZWRJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgdG9rZW5Bc3NvY2lhdGVkLFxuICAgICAgICBvd25lcixcbiAgICAgICAgQ2FsY3VsYXRlLmNhbGN1bGF0ZUFtb3VudCh0b3RhbEFtb3VudCwgbWludERlY2ltYWwpLFxuICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlQ3JlYXRlTWV0YWRhdGFBY2NvdW50VjNJbnN0cnVjdGlvbihcbiAgICAgICAge1xuICAgICAgICAgIG1ldGFkYXRhOiBtZXRhZGF0YVBkYSxcbiAgICAgICAgICBtaW50LFxuICAgICAgICAgIG1pbnRBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICAgIHBheWVyOiBmZWVQYXllcixcbiAgICAgICAgICB1cGRhdGVBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICB9LFxuICAgICAgICB7XG4gICAgICAgICAgY3JlYXRlTWV0YWRhdGFBY2NvdW50QXJnc1YzOiB7XG4gICAgICAgICAgICBkYXRhOiB0b2tlbk1ldGFkYXRhLFxuICAgICAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgICAgICAgY29sbGVjdGlvbkRldGFpbHM6IG51bGwsXG4gICAgICAgICAgfSxcbiAgICAgICAgfSxcbiAgICAgICksXG4gICAgKTtcbiAgICByZXR1cm4gaW5zdHJ1Y3Rpb25zO1xuICB9O1xuXG4gIC8qKlxuICAgKiB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G4gICk6IFByb21pc2U8UmVzdWx0PENvbW1vblN0cnVjdHVyZSwgRXJyb3I+PiA9PiB7XG4gICAgcmV0dXJuIFRyeShhc3luYyAoKSA9PiB7XG4gICAgICBjb25zdCBwYXllciA9IG9wdGlvbnMuZmVlUGF5ZXIgPyBvcHRpb25zLmZlZVBheWVyIDogb3duZXJPck11bHRpc2lnWzBdO1xuICAgICAgY29uc3Qga2V5cGFpcnMgPSBvd25lck9yTXVsdGlzaWcubWFwKChzKSA9PiBzLnRvS2V5cGFpcigpKTtcblxuICAgICAgY29uc3Qgc291cmNlVG9rZW4gPSBhd2FpdCBBY2NvdW50LkFzc29jaWF0ZWQucmV0cnlHZXRPckNyZWF0ZShcbiAgICAgICAgbWludCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIHBheWVyLFxuICAgICAgKTtcblxuICAgICAgY29uc3QgZGVzdFRva2VuID0gYXdhaXQgQWNjb3VudC5Bc3NvY2lhdGVkLnJldHJ5R2V0T3JDcmVhdGUoXG4gICAgICAgIG1pbnQsXG4gICAgICAgIGRlc3QsXG4gICAgICAgIHBheWVyLFxuICAgICAgKTtcblxuICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZVRyYW5zZmVyQ2hlY2tlZEluc3RydWN0aW9uKFxuICAgICAgICBzb3VyY2VUb2tlbi50b1B1YmxpY0tleSgpLFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIGRlc3RUb2tlbi50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICBDYWxjdWxhdG9yLmNhbGN1bGF0ZUFtb3VudChhbW91bnQsIG1pbnREZWNpbWFsKSxcbiAgICAgICAgbWludERlY2ltYWwsXG4gICAgICAgIGtleXBhaXJzLFxuICAgICAgKTtcblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uKFtpbnN0XSwga2V5cGFpcnMsIHBheWVyLnRvS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Rpb24oXG4gICAgICAgIHtcbiAgICAgICAgICBlZGl0aW9uOiBtYXN0ZXJFZGl0aW9uUHVia2V5LFxuICAgICAgICAgIG1pbnQsXG4gICAgICAgICAgdXBkYXRlQXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBtaW50QXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBwYXllcjogZmVlUGF5ZXIsXG4gICAgICAgICAgbWV0YWRhdGE6IHRva2VuTWV0YWRhdGFQdWJrZXksXG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICBjcmVhdGVNYXN0ZXJFZGl0aW9uQXJnczoge1xuICAgICAgICAgICAgbWF4U3VwcGx5OiAwLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICApLFxuICAgICk7XG4gICAgcmV0dXJuIGluc3RydWN0aW9ucztcbiAgfTtcblxuICAvKipcbiAgICogVXBsb2FkIGNvbnRlbnQgYW5kIE5GVCBtaW50XG4gICAqXG4gICAqIEBwYXJhbSB7U2VjcmV0fSBvd25lciAgICAgICAgIC8vIG93bmVyJ3MgU2VjcmV0XG4gICAqIEBwYXJhbSB7SW5wdXROZnRNZXRhZGF0YX0gaW5wdXRcbiAgICoge1xuICAgKiAgIG5hbWU6IHN0cmluZyAgICAgICAgICAgICAgIC8vIG5mdCBjb250ZW50IG5hbWVcbiAgICogICBzeW1ib2w6IHN0cmluZyAgICAgICAgICAgICAvLyBuZnQgdGlja2VyIHN5bWJvbFxuICAgKiAgIGZpbGVQYXRoOiBzdHJpbmcgfCBGaWxlICAgIC8vIG5mdCB0aWNrZXIgc3ltYm9sXG4gICAqICAgcm95YWx0eTogbnVtYmVyICAgICAgICAgICAgLy8gcm95YWx0eSBwZXJjZW50YWdlXG4gICAqICAgc3RvcmFnZVR5cGU6ICdhcndlYXZlJ3wnbmZ0U3RvcmFnZScgLy8gRGVjZW50cmFsaXplZCBzdG9yYWdlXG4gICAqICAgZGVzY3JpcHRpb24/OiBzdHJpbmcg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xcbiAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgIGRhdGF2MixcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICBpc011dGFibGUsXG4gICAgICApO1xuXG4gICAgICAvLyBmcmVlemVBdXRob3JpdHlcbiAgICAgIGlmIChmcmVlemVBdXRob3JpdHkpIHtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgICAgY3JlYXRlRGVsZWFnYXRlKFxuICAgICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgICAgICBmcmVlemVBdXRob3JpdHkudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICAvLyBjb2xsZWN0aW9uIC0tLVxuICAgICAgaWYgKGlucHV0LmNvbGxlY3Rpb24pIHtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgICAgY3JlYXRlVmVyaWZ5U2l6ZWRDb2xsZWN0aW9uKFxuICAgICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgaW5wdXQuY29sbGVjdGlvbi50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGtleXBhaXJzID0gW293bmVyLnRvS2V5cGFpcigpLCBtaW50LnRvS2V5cGFpcigpXTtcblxuICAgICAgLy8gY3JlYXRvciAtLS1cbiAgICAgIGlmIChpbnB1dC5jcmVhdG9ycykge1xuICAgICAgICBpbnB1dC5jcmVhdG9ycy5mb3JFYWNoKChjcmVhdG9yKSA9PiB7XG4gICAgICAgICAgaWYgKEFjY291bnQuS2V5cGFpci5pc1NlY3JldChjcmVhdG9yLnNlY3JldC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5cbiAgICAgIGRlYnVnTG9nKCcjIGlucHV0OiAnLCBpbnB1dCk7XG4gICAgICBkZWJ1Z0xvZygnIyBkYXRhdjI6ICcsIGRhdGF2Mik7XG5cbiAgICAgIGNvbnN0IGNvbGxlY3Rpb25NaW50ID0gQWNjb3VudC5LZXlwYWlyLmNyZWF0ZSgpO1xuICAgICAgY29uc3QgY29sbGVjdGlvbk1ldGFkYXRhQWNjb3VudCA9IEFjY291bnQuUGRhLmdldE1ldGFkYXRhKFxuICAgICAgICBjb2xsZWN0aW9uTWludC5wdWJrZXksXG4gICAgICApO1xuXG4gICAgICBjb25zdCBpbnN0cnVjdGlvbnMgPSBhd2FpdCBNaW50LmNyZWF0ZU1pbnQoXG4gICAgICAgIGNvbGxlY3Rpb25NaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICBkYXRhdjIsXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgKTtcblxuICAgICAgLy8gZnJlZXplQXV0aG9yaXR5XG4gICAgICBpZiAoZnJlZXplQXV0aG9yaXR5KSB7XG4gICAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICAgIE1pbnQuY3JlYXRlRGVsZWFnYXRlKFxuICAgICAgICAgICAgY29sbGVjdGlvbk1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICAgICAgZnJlZXplQXV0aG9yaXR5LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgY29sbGVjdGlvbnMgPSB7XG4gICAgICAgIGNvbGxlY3Rpb25NZXRhZGF0YTogY29sbGVjdGlvbk1ldGFkYXRhQWNjb3VudCxcbiAgICAgICAgY29sbGVjdGlvbkF1dGhvcml0eTogb3duZXIudG9LZXlwYWl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2FjdGlvbiIsICJSZWd1bGFyTmZ0IiwgIkNvbnZlcnRlciIsICJBY2NvdW50IiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJSZWd1bGFyTmZ0IiwgIlNwbFRva2VuIiwgIlJlZ3VsYXJOZnQiLCAiQ29udmVydGVyIiwgIkFjY291bnQiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgImdldEFzc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jIiwgIlJlZ3VsYXJOZnQiLCAiQWNjb3VudCIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiUmVndWxhck5mdCIsICJTcGxUb2tlbiIsICJSZWd1bGFyTmZ0IiwgIkNvbXByZXNzZWROZnQiLCAiUmVndWxhck5mdCIsICJDb21wcmVzc2VkTmZ0Il0KfQo= \ No newline at end of file +//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9iYXRjaC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jb21tb24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvbWludC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9wYXJ0aWFsLXNpZ24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY2FsY3VsYXRlLXR4c2l6ZS50cyIsICIuLi8uLi9nbG9iYWwvc3JjL2luZGV4LnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2Fzc29jaWF0ZWQudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMva2V5cGFpci50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9wZGEudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvaW5kZXgudHMiLCAiLi4vLi4vdHJh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ICBjb25zdCByZXMgPSBhd2FpdCBtYWtlT3JDcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIG5ldyBLZXlwYWlyLktleXBhaXIoeyBzZWNyZXQ6IGZlZVBheWVyIH0pLnB1YmtleSxcbiAgICAgICAgYWxsb3dPd25lck9mZkN1cnZlLFxuICAgICAgKTtcblxuICAgICAgaWYgKCFyZXMuaW5zdCkge1xuICAgICAgICByZXR1cm4gcmVzLnRva2VuQWNjb3VudDtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uPFB1YmtleT4oXG4gICAgICAgIFtyZXMuaW5zdF0sXG4gICAgICAgIFtdLFxuICAgICAgICBmZWVQYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgcmVzLnRva2VuQWNjb3VudCEsXG4gICAgICApO1xuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiBSZXRyeSBmdW5jdGlvbiBpZiBjcmVhdGUgbmV3IHRva2VuIGFjY291aW50XG4gICAgICpcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gbWludFxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBvd25lclxuICAgICAqIEBwYXJhbSB7U2VjcmV0fSBmZWVQYXllclxuICAgICAqIEByZXR1cm5zIFByb21pc2U8c3RyaW5nPlxuICAgICAqL1xuICAgIGV4cG9ydCBjb25zdCByZXRyeUdldE9yQ3JlYXRlID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyOiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxzdHJpbmc+ID0+IHtcbiAgICAgIGxldCBjb3VudGVyID0gMTtcbiAgICAgIHdoaWxlIChjb3VudGVyIDwgUkVUUllfT1ZFUl9MSU1JVCkge1xuICAgICAgICB0cnkge1xuICAgICAgICAgIGNvbnN0IGluc3QgPSBhd2FpdCBnZXQobWludCwgb3duZXIsIGZlZVBheWVyLCB0cnVlKTtcblxuICAgICAgICAgIGlmIChpbnN0ICYmIHR5cGVvZiBpbnN0ID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgaW5zdCk7XG4gICAgICAgICAgICByZXR1cm4gaW5zdDtcbiAgICAgICAgICB9IGVsc2UgaWYgKGluc3QgaW5zdGFuY2VvZiBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uKSB7XG4gICAgICAgICAgICAoYXdhaXQgaW5zdC5zdWJtaXQoKSkubWFwKFxuICAgICAgICAgICAgICBhc3luYyAob2s6IHN0cmluZykgPT4ge1xuICAgICAgICAgICAgICAgIGF3YWl0IE5vZGUuY29uZmlybWVkU2lnKG9rKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gaW5zdC5kYXRhO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAoZXJyOiBFcnJvcikgPT4ge1xuICAgICAgICAgICAgICAgIGRlYnVnTG9nKCcjIEVycm9yIHN1Ym1pdCByZXRyeUdldE9yQ3JlYXRlOiAnLCBlcnIpO1xuICAgICAgICAgICAgICAgIHRocm93IGVycjtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgZGVidWdMb2coYCMgcmV0cnk6ICR7Y291bnRlcn0gY3JlYXRlIHRva2VuIGFjY291bnQ6IGAsIGUpO1xuICAgICAgICAgIGRlYnVnTG9nKGAjIG1pbnQ6ICR7bWludH0sIG93bmVyOiAke293bmVyfSwgZmVlUGF5ZXI6ICR7ZmVlUGF5ZXJ9YCk7XG4gICAgICAgIH1cbiAgICAgICAgYXdhaXQgc2xlZXAoUkVUUllfU0xFRVBfVElNRSk7XG4gICAgICAgIGNvdW50ZXIrKztcbiAgICAgIH1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2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpL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HV0LmZpbGVzLm1hcChhc3luYyAoZmlsZSkgPT4ge1xuICAgICAgICAgIGlmICghZmlsZS5maWxlUGF0aCkge1xuICAgICAgICAgICAgcmV0dXJuIHt9O1xuICAgICAgICAgIH1cbiAgICAgICAgICBjb25zdCByZXMgPSBhd2FpdCBjYWxsYmFja0Z1bmMoZmlsZS5maWxlUGF0aCwgc3RvcmFnZVR5cGUsIGZlZVBheWVyKTtcbiAgICAgICAgICBpZiAocmVzLmlzRXJyKSB7XG4gICAgICAgICAgICB0aHJvdyBFcnJvcihyZXMuZXJyb3IubWVzc2FnZSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBvdmVyd3JpdGVPYmplY3QoZmlsZSwgW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBleGlzdHNLZXk6ICdmaWxlUGF0aCcsXG4gICAgICAgICAgICAgIHdpbGw6IHsga2V5OiAndXJpJywgdmFsdWU6IHJlcy52YWx1ZSB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICBdKTtcbiAgICAgICAgfSksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHsgLi4uaW5wdXQsIGZpbGVzIH0gYXMgUHJvcGVydGllcztcbiAgICB9O1xuICB9XG59XG4iLCAiLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLXVudXNlZC12YXJzICovXG5pbXBvcnQgeyBPcHRpb24sIFVzZXMgfSBmcm9tICd+L3R5cGVzL3JlZ3VsYXItbmZ0JztcblxuZXhwb3J0IG5hbWVzcGFjZSBDb252ZXJ0ZXIge1xuICBleHBvcnQgbmFtZXNwYWNlIFVzZXMge1xuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlclNpZGUgPSAob3V0cHV0OiBPcHRpb248VXNlcz4pOiBVc2VzIHwgdW5kZWZpbmVkID0+IHtcbiAgICAgIGlmICghb3V0cHV0KSB7XG4gICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgICB9XG4gICAgICBy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AgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAncm95YWx0eSc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnJveWFsdHkpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNSb3lhbHR5KG1ldGFkYXRhLnJveWFsdHkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEuc3ltYm9sKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU3ltYm9sKG1ldGFkYXRhLnN5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uXG4gICAgY29uc3QgbWV0YWRhdGFzID0gYXdhaXQgUHJvbWlzZS5hbGwoXG4gICAgICBpdGVtc1xuICAgICAgICAuZmlsdGVyKChpdGVtKSA9PiBpdGVtLmNvbXByZXNzaW9uLmNvbXByZXNzZWQgPT09IGlzQ29tcHJlc3NlZClcbiAgICAgICAgLm1hcChhc3luYyAoaXRlbSkgPT4ge1xuICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICBjb25zdCBvZmZjaGFpbjogT2ZmY2hhaW4gPSBhd2FpdCBmZXRjaE9mZmNoYWluKFxuICAgICAgICAgICAgICBpdGVtLmNvbnRlbnQuanNvbl91cmksXG4gICAgICAgICAgICApO1xuICAgICAgICAgICAgY29uc3QgbWVyZ2VkID0ge1xuICAgICAgICAgICAgICBvbmNoYWluOiBpdGVtLFxuICAgICAgICAgICAgICBvZmZjaGFpbjogb2ZmY2hhaW4sXG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgcmV0dXJuIENvbnZlcnRlci5OZnQuaW50b1VzZXIobWVyZ2VkKTtcbiAgICAgICAgICB9IGNhdGNoIChlcnIpIHtcbiAgICAgICAgICAgIGRlYnVnTG9nKCcjIEZhaWxlZCBmZXRjaCBvZmZjaGFpbiB1cmw6ICcsIGl0ZW0uY29udGVudC5qc29uX3VyaSk7XG4gICAgICAgICAgICByZXR1cm4gQ29udmVydGVyLk5mdC5pbnRvVXNlcih7XG4gICAgICAgICAgICAgIG9uY2hhaW46IGl0ZW0sXG4gICAgICAgICAgICAgIG9mZmNoYWluOiB7fSxcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgIH1cbiAgICAgICAgfSksXG4gICAgKTtcbiAgICByZXR1cm4ge1xuICAgICAgcGFnZTogYXNzZXRzLnZhbHVlLnBhZ2UsXG4gICAgICB0b3RhbDogYXNzZXRzLnZhbHVlLnRvdGFsLFxuICAgICAgbGltaXQ6IGFzc2V0cy52YWx1ZS5saW1pdCxcbiAgICAgIG1ldGFkYXRhcyxcbiAgIC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YmxpY0tleSxcbiAgICAgICAgICBsYW1wb3J0czpcbiAgICAgICAgICAgIGF3YWl0IE5vZGUuZ2V0Q29ubmVjdGlvbigpLmdldE1pbmltdW1CYWxhbmNlRm9yUmVudEV4ZW1wdGlvbihzcGFjZSksXG4gICAgICAgICAgc3BhY2U6IHNwYWNlLFxuICAgICAgICAgIHByb2dyYW1JZDogU1BMX0FDQ09VTlRfQ09NUFJFU1NJT05fUFJPR1JBTV9JRCxcbiAgICAgICAgfSksXG4gICAgICApO1xuXG4gICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgY3JlYXRlQ3JlYXRlVHJlZUluc3RydWN0aW9uKFxuICAgICAgICAgIHtcbiAgICAgICAgICAgIG1lcmtsZVRyZWU6IHRyZWVPd25lci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgICAgICB0cmVlQXV0aG9yaXR5LFxuICAgICAgICAgICAgdHJlZUNyZWF0b3I6IG93bmVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgICAgIHBheWVyOiBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgICAgICBsb2dXcmFwcGVyOiBTUExfTk9PUF9QUk9HUkFNX0lELFxuICAgICAgICAgICAgY29tcHJlc3Npb25Qcm9ncmFtOiBTUExfQUNDT1VOVF9DT01QUkVTU0lPTl9QUk9HUkFNX0lELFxuICAgICAgICAgIH0sXG4gICAgICAgICAge1xuICAgICAgICAgICAgbWF4QnVmZmVyU2l6ZSxcbiAgICAgICAgICAgIG1heERlcHRoLFxuICAgICAgICAgICAgcHVibGljOiBmYWxzZSxcbiAgICAgICAgICB9LFxuICAgICAgICAgIE1QTF9CVUJCTEVHVU1fUFJPR1JBTV9JRC50b1B1YmxpY0tleSgpLFxuICAgICAgICApLFxuICAgICAgKTtcblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuTWludChcbiAgICAgICAgaW5zdHJ1Y3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vbGxlY3Rpb25NaW50LnRvUHVibGljS2V5KCksIHZlcmlmaWVkOiBmYWxzZSB9LFxuICAgICAgfTtcblxuICAgICAgZGVidWdMb2coJyMgaW5wdXQ6ICcsIGlucHV0KTtcbiAgICAgIGRlYnVnTG9nKCcjIG1ldGFkYXRhQXJnczogJywgbWV0YWRhdGFBcmdzKTtcblxuICAgICAgY29uc3QgaW5zdHJ1Y3Rpb25zID0gW107XG4gICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgY3JlYXRlTWludFRvQ29sbGVjdGlvblYxSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAge1xuICAgICAgICAgICAgbWVya2xlVHJlZTogdHJlZU93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICB0cmVlQXV0aG9yaXR5LFxuICAgICAgICAgICAgdHJlZURlbGVnYXRlOiBvd25lclB1YmxpY0tleSxcbiAgICAgICAgICAgIHBheWVyOiBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgICAgICBsZWFmT3duZXI6IGxlYWZPd25lciwgLy8gcmVjZWl2ZXJcbiAgICAgICAgICAgIGxlYWZEZWxlZ2F0ZTogbGVhZkRlbGVnYXRlLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBjb2xsZWN0aW9uQXV0aG9yaXR5OiBvd25lclB1YmxpY0tleSxcbiAgICAgICAgICAgIGNvbGxlY3Rpb25NaW50OiBjb2xsZWN0aW9uTWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgY29sbGVjdGlvbk1ldGFkYXRhLFxuICAgICAgICAgICAgZWRpdGlvbkFjY291bnQ6IGNvbGxlY3Rpb25NYXN0ZXJFZGl0aW9uQWNjb3VudCxcbiAgICAgICAgICAgIGJ1YmJsZWd1bVNpZ25lcixcbiAgICAgICAgICAgIGxvZ1dyYXBwZXI6IFNQTF9OT09QX1BST0dSQU1fSUQsXG4gICAgICAgICAgICBjb2xsZWN0aW9uQXV0aG9yaXR5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ZhbHVlLm1hcChhc3luYyAoZCkgPT4ge1xuICAgICAgICBjb25zdCBtaW50ID0gZC5hY2NvdW50LmRhdGEucGFyc2VkLmluZm8ubWludCBhcyBQdWJrZXk7XG4gICAgICAgIGNvbnN0IHRva2VuQW1vdW50ID0gZC5hY2NvdW50LmRhdGEucGFyc2VkLmluZm8udG9rZW5BbW91bnRcbiAgICAgICAgICAuYW1vdW50IGFzIHN0cmluZztcbiAgICAgICAgaWYgKHRva2VuQW1vdW50ID09PSAnMScpIHtcbiAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIE1ldGFkYXRhLmZyb21BY2NvdW50QWRkcmVzcyhcbiAgICAgICAgICBjb25uZWN0aW9uLFxuICAgICAgICAgIEFjY291bnQuUGRhLmdldE1ldGFkYXRhKG1pbnQpLFxuICAgICAgICApXG4gICAgICAgICAgLnRoZW4oYXN5bmMgKG1ldGFkYXRhKSA9PiB7XG4gICAgICAgICAgICAvKiBlc2xpbnQtZGlzYWJsZSBAdHlwZXNjcmlwdC1lc2xpbnQvbm8tZXhwbGljaXQtYW55ICovXG4gICAgICAgICAgICByZXR1cm4gZmV0Y2hSZXRyeShtZXRhZGF0YS5kYXRhLnVyaSkudGhlbigoanNvbjogYW55KSA9PiB7XG4gICAgICAgICAgICAgIHJldHVybiBjb252ZXJ0ZXIobWV0YWRhdGEsIGpzb24sIHRva2VuQW1vdW50KTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgIH0pXG4gICAgICAgICAgLmNhdGNoKChlcnIpID0+IGRlYnVnTG9nKCcjIFtGZXRjaCBlcnJvcl0nLCBlcnIpKTtcbiAgICAgIH0pO1xuXG4gICAgICBjb25zdCBmaWx0ZXJzID0gKGF3YWl0IFByb21pc2UuYWxsKGRhdGFzKSkuZmlsdGVyKFxuICAgICAgICAoZGF0YSkgPT4gZGF0YSAhPT0gdW5kZWZpbmVkLFxuICAgICAgKTtcbiAgICAgIHJldHVybiBmaWx0ZXJzI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dDI7XG4gICAgICBjb25zdCBibG9ja2hhc2hPYmogPSBhd2FpdCBOb2RlLmdldENvbm5lY3Rpb24oKS5nZXRMYXRlc3RCbG9ja2hhc2goKTtcblxuICAgICAgY29uc3QgdHggPSBuZXcgVHJhbnNhY3Rpb24oe1xuICAgICAgICBsYXN0VmFsaWRCbG9ja0hlaWdodDogYmxvY2toYXNoT2JqLmxhc3RWYWxpZEJsb2NrSGVpZ2h0LFxuICAgICAgICBibG9ja2hhc2g6IGJsb2NraGFzaE9iai5ibG9ja2hhc2gsXG4gICAgICAgIGZlZVBheWVyOiBmZWVQYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgfSk7XG5cbiAgICAgIC8vIHJldHVybiBhc3NvY2lhdGVkIHRva2VuIGFjY291bnRcbiAgICAgIGlmICghZGVzdFRva2VuLmluc3QpIHtcbiAgICAgICAgaW5zdDIgPSBjcmVhdGVUcmFuc2ZlckNoZWNrZWRJbnN0cnVjdGlvbihcbiAgICAgICAgICBzb3VyY2VUb2tlbi50b2tlbkFjY291bnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgZGVzdFRva2VuLnRva2VuQWNjb3VudC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICAgIENhbGN1bGF0b3IuY2FsY3VsYXRlQW1vdW50KGFtb3VudCwgbWludERlY2ltYWwpLFxuICAgICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICAgIFtvd25lci50b0tleXBhaXIoKV0sXG4gICAgICAgICk7XG4gICAgICAgIHR4LmFkZChpbnN0Mik7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICAvLyByZXR1cm4gaW5zdHJ1Y3Rpb24gYW5kIHVuZGVjaWRlZCBhc3NvY2lhdGVkIHRva2VuIGFjY291bnRcbiAgICAgICAgaW5zdDIgPSBjcmVhdGVUcmFuc2ZlckNoZWNrZWRJbnN0cnVjdG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NpYXRlZCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIG1pbnQsXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZU1pbnRUb0NoZWNrZWRJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgdG9rZW5Bc3NvY2lhdGVkLFxuICAgICAgICBvd25lcixcbiAgICAgICAgQ2FsY3VsYXRlLmNhbGN1bGF0ZUFtb3VudCh0b3RhbEFtb3VudCwgbWludERlY2ltYWwpLFxuICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlQ3JlYXRlTWV0YWRhdGFBY2NvdW50VjNJbnN0cnVjdGlvbihcbiAgICAgICAge1xuICAgICAgICAgIG1ldGFkYXRhOiBtZXRhZGF0YVBkYSxcbiAgICAgICAgICBtaW50LFxuICAgICAgICAgIG1pbnRBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICAgIHBheWVyOiBmZWVQYXllcixcbiAgICAgICAgICB1cGRhdGVBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICB9LFxuICAgICAgICB7XG4gICAgICAgICAgY3JlYXRlTWV0YWRhdGFBY2NvdW50QXJnc1YzOiB7XG4gICAgICAgICAgICBkYXRhOiB0b2tlbk1ldGFkYXRhLFxuICAgICAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgICAgICAgY29sbGVjdGlvbkRldGFpbHM6IG51bGwsXG4gICAgICAgICAgfSxcbiAgICAgICAgfSxcbiAgICAgICksXG4gICAgKTtcbiAgICByZXR1cm4gaW5zdHJ1Y3Rpb25zO1xuICB9O1xuXG4gIC8qKlxuICAgKiBTUEwtVE9LRU4gbWludFxuICAgKlxuICAgKiBAcGFyYW0ge1NlY3JldH0gb3duZXIgICAgICAvLyB0b2tlbiBvd25lciBTZWNyZXRcbiAgICogQHBhcmFtIHtud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HkgbXVsdGlTaWcgYWNjb3VudFxuICAgKlxuICAgKiBAcGFyYW0ge1B1YmtleX0gbWludCAgICAgICAgICAgICAgIC8vIG1pbnRlZCBhY2NvdW50XG4gICAqIEBwYXJhbSB7UHVia2V5fSBvd25lciAgICAgICAgICAgICAgLy8gY3VycmVudCBtdWx0aXNpZyBvd25lclxuICAgKiBAcGFyYW0ge1B1YmtleX0gZGVzdCAgICAgICAgICAgICAgIC8vIG5ldyBvd25lclxuICAgKiBAcGFyYW0ge1NlY3JldFtdfSBvd25lck9yTXVsdGlzaWcgIC8vIG93bmVyIG9yIG11bHRpc2lnIGFjY291bnQgU2VjcmV0XG4gICAqIEBwYXJhbSB7bnVtYmVyfSBhbW91bnQgICAgICAgICAgICAgLy8gd2FudCB0byB0cmFuc2ZlciBTT0wgYW1vdW50XG4gICAqIEBwYXJhbSB7bnVtYmVyfSBtaW50RGVjaW1hbCAgICAgICAgLy8gbWludGVkIHRva2VuIGRlY2ltYWxcbiAgICogQHBhcmFtIHtQYXJ0aWFsPE1pbnRPcHRpb25zPn0gb3B0aW9ucyAgICAgICAvLyBvcHRpb25zXG4gICAqIEByZXR1cm4ge1Jlc3VsdDxDb21tb25TdHJ1Y3R1cmU8dW5rbm93bj4sIEVycm9yPiB9XG4gICAqL1xuICBleHBvcnQgY29uc3QgdHJhbnNmZXIgPSBhc3luYyAoXG4gICAgbWludDogUHVia2V5LFxuICAgIG93bmVyOiBQdWJrZXksXG4gICAgZGVzdDogUHVia2V5LFxuICAgIG93bmVyT3JNdWx0aXNpZzogU2VjcmV0W10sXG4gICAgYW1vdW50OiBudW1iZXIsXG4gICAgbWludERlY2ltYWw6IG51bWJlcixcbiAgICBvcHRpb25zOiBQYXJ0aWFsPE1pbnRPcHRpb25zPiA9IHt9LFxuICApOiBQcm9taXNlPFJlc3VsdDxDb21tb25TdHJ1Y3R1cmUsIEVycm9yPj4gPT4ge1xuICAgIHJldHVybiBUcnkoYXN5bmMgKCkgPT4ge1xuICAgICAg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5LFxuICAgICAgICAgIG1pbnQsXG4gICAgICAgICAgdXBkYXRlQXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBtaW50QXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBwYXllcjogZmVlUGF5ZXIsXG4gICAgICAgICAgbWV0YWRhdGE6IHRva2VuTWV0YWRhdGFQdWJrZXksXG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICBjcmVhdGVNYXN0ZXJFZGl0aW9uQXJnczoge1xuICAgICAgICAgICAgbWF4U3VwcGx5OiAwLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICApLFxuICAgICk7XG4gICAgcmV0dXJuIGluc3RydWN0aW9ucztcbiAgfTtcblxuICAvKipcbiAgICogVXBsb2FkIGNvbnRlbnQgYW5kIE5GVCBtaW50XG4gICAqXG4gICAqIEBwYXJhbSB7U2VjcmV0fSBvd25lciAgICAgICAgIC8vIG93bmVyJ3MgU2VjcmV0XG4gICAqIEBwYXJhbSB7SW5wdXROZnRNZXRhZGF0YX0gaW5wdXRcbiAgICoge1xuICAgKiAgIG5hbWU6IHN0cmluZyAgICAgICAgICAgICAgIC8vIG5mdCBjb250ZW50IG5hbWVcbiAgICogICBzeW1ib2w6IHN0cmluZyAgICAgICAgICAgICAvLyBuZnQgdGlja2VyIHN5bWJvbFxuICAgKiAgIGZpbGVQYXRoOiBzdHJpbmcgfCBGaWxlICAgIC8vIG5mdCB0aWNrZXIgc3ltYm9sXG4gICAqICAgcm95YWx0eTogbnVtYmVyICAgICAgICAgICAgLy8gcm95YWx0eSBwZXJjZW50YWdlXG4gICAqICAgc3RvcmFnZVR5cGU6ICdhcndlYXZlJ3wnbmZ0U3RvcmFnZScgLy8gRGVjZW50cmFsaXplZCBzdG9yYWdlXG4gICAqICAgZGVzY3JpcHRpb24/OiBzdHJpbmcgICAgICAgLy8gbmZ0IGNvbnRlbnQgZGVzY3JpcHRpb25cbiAgICogICBleHRlcm5hbF91cmw/OiB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IudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICBpc011dGFibGUsXG4gICAgICApO1xuXG4gICAgICAvLyBmcmVlemVBdXRob3JpdHlcbiAgICAgIGlmIChmcmVlemVBdXRob3JpdHkpIHtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgICAgY3JlYXRlRGVsZWFnYXRlKFxuICAgICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgICAgICBmcmVlemVBdXRob3JpdHkudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICAvLyBjb2xsZWN0aW9uIC0tLVxuICAgICAgaWYgKGlucHV0LmNvbGxlY3Rpb24pIHtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgICAgY3JlYXRlVmVyaWZ5U2l6ZWRDb2xsZWN0aW9uKFxuICAgICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgaW5wdXQuY29sbGVjdGlvbi50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGtleXBhaXJzID0gW293bmVyLnRvS2V5cGFpcigpLCBtaW50LnRvS2V5cGFpcigpXTtcblxuICAgICAgLy8gY3JlYXRvciAtLS1cbiAgICAgIGlmIChpbnB1dC5jcmVhdG9ycykge1xuICAgICAgICBpbnB1dC5jcmVhdG9ycy5mb3JFYWNoKChjcmVhdG9yKSA9PiB7XG4gICAgICAgICAgaWYgKEFjY291bnQuS2V5cGFpci5pc1NlY3JldChjcmVhdG9yLnNlY3JldCkpIHtcbiAgICAgICAgICAgIGNvbnN0IGNyZWF0b3JQdWJrZXkgPSBjcmVhdG9yLmFkZHJlc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dXNoKFxuICAgICAgICAgIE1pbnQuY3JlYXRlRGVsZWFnYXRlKFxuICAgICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgb3duZXJQdWJsaWNrZXksXG4gICAgICAgICAgICBvcHRpb25zLmZyZWV6ZUF1dGhvcml0eS50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGJsb2NraGFzaE9iaiA9IGF3YWl0IE5vZGUuZ2V0Q29ubmVjdGlvbigpLmdldExhdGVzdEJsb2NraGFzaCgpO1xuICAgICAgY29uc3QgdHggPSBuZXcgVHJhbnNhY3Rpb24oe1xuICAgICAgICBsYXN0VmFsaWRCbG9ja0hlaWdodDogYmxvY2toYXNoT2JqLmxhc3RWYWxpZEJsb2NrSGVpZ2h0LFxuICAgICAgICBibG9ja2hhc2g6IGJsb2NraGFzaE9iai5ibG9ja2hhc2gsXG4gICAgICAgIGZlZVBheWVyOiBmZWVQYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgfSk7XG5cbiAgICAgIGluc3RzLmZvckVhY2goKGluc3QpID0+IHR4LmFkZChpbnN0KSk7XG4gICAgICB0eC5yZWNlbnRCbG9ja2hhc2ggPSBibG9ja2hhc2hPYmouYmxvY2toYXNoO1xuICAgICAgW293bmVyLCBtaW50XS5mb3JFYWNoKChzaWduZXIpID0+IHR4LnBhcnRpYWxTaWduKHNpZ25lci50b0tleXBhaXIoKSkpO1xuXG4gICAgICBjb25zdCBzZXJpYWxpemVkVHggPSB0eC5zZXJpYWxpemUoe1xuICAgICAgICByZXF1aXJlQWxsU2lnbmF0dXJlczogZmFsc2UsXG4gICAgICB9KTtcbiAgICAgIGNvbnN0IGhleCA9IHNlcmlhbGl6ZWRUeC50b1N0cmluZygnaGV4Jyk7XG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5QYXJ0aWFsU2lnbihoZXgsIG1pbnQucHVia2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mik7XG5cbiAgICAgIGNvbnN0IGNvbGxlY3Rpb25NaW50ID0gQWNjb3VudC5LZXlwYWlyLmNyZWF0ZSgpO1xuICAgICAgY29uc3QgY29sbGVjdGlvbk1ldGFkYXRhQWNjb3VudCA9IEFjY291bnQuUGRhLmdldE1ldGFkYXRhKFxuICAgICAgICBjb2xsZWN0aW9uTWludC5wdWJrZXksXG4gICAgICApO1xuXG4gICAgICBjb25zdCBpbnN0cnVjdGlvbnMgPSBhd2FpdCBNaW50LmNyZWF0ZU1pbnQoXG4gICAgICAgIGNvbGxlY3Rpb25NaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICBkYXRhdjIsXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgKTtcblxuICAgICAgLy8gZnJlZXplQXV0aG9yaXR5XG4gICAgICBpZiAoZnJlZXplQXV0aG9yaXR5KSB7XG4gICAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICAgIE1pbnQuY3JlYXRlRGVsZWFnYXRlKFxuICAgICAgICAgICAgY29sbGVjdGlvbk1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICAgICAgZnJlZXplQXV0aG9yaXR5LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgY29sbGVjdGlvbnMgPSB7XG4gICAgICAgIGNvbGxlY3Rpb25NZXRhZGF0YTogY29sbGVjdGlvbk1ldGFkYXRhQWNjb3VudCxcbiAgICAgICAgY29sbGVjdGlvbkF1dGhvcml0eTogb3duZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICBjb2xsZWN0aW9uTWludDogY29sbGVjdGlvbk1pbnQudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICA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aW9uQnVpbGRlciIsICJSZWd1bGFyTmZ0IiwgIlNwbFRva2VuIiwgIlJlZ3VsYXJOZnQiLCAiQ29udmVydGVyIiwgIkFjY291bnQiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgImdldEFzc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jIiwgIlJlZ3VsYXJOZnQiLCAiQWNjb3VudCIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiUmVndWxhck5mdCIsICJTcGxUb2tlbiIsICJSZWd1bGFyTmZ0IiwgIkNvbXByZXNzZWROZnQiLCAiUmVndWxhck5mdCIsICJDb21wcmVzc2VkTmZ0Il0KfQo= \ No newline at end of file diff --git a/packages/suite-compressed-nft/tsconfig.json b/packages/suite-compressed-nft/tsconfig.json index 42525de86..5c9ddb62e 100644 --- a/packages/suite-compressed-nft/tsconfig.json +++ b/packages/suite-compressed-nft/tsconfig.json @@ -11,7 +11,6 @@ "~/*": [ "../*/src/index.ts" ], - "~/shared/exports": ["../shared/src/exports.ts"] } }, "include": ["src/**/*.ts", "test/**/*.ts"], diff --git a/packages/suite-memo/dist/index.d.mts b/packages/suite-memo/dist/index.d.mts index 3c7b1c957..1bbad4909 100644 --- a/packages/suite-memo/dist/index.d.mts +++ b/packages/suite-memo/dist/index.d.mts @@ -260,24 +260,6 @@ type MemoOptions = { feePayer: Secret; }; -type Find = { - sol?: string; - account?: string; - destination?: Pubkey; - source?: Pubkey; - authority?: Pubkey; - multisigAuthority?: Pubkey; - signers?: Pubkey[]; - mint?: Pubkey; - mintAuthority?: Pubkey; - tokenAmount?: string; - memo?: string; - dateTime?: Date; - type?: string; - sig?: string; - innerInstruction?: boolean; -}; - type History = { sol?: string; account?: string; @@ -300,9 +282,6 @@ type FindOptions = { narrowDown: number; }; -type OnOk = (ok: T[]) => void; -type OnErr = (err: Error) => void; - /** @namespace */ declare const Memo: { findByOwner: (owner: Pubkey, onOk: OnOk, onErr: OnErr, options?: Partial) => Promise; diff --git a/packages/suite-memo/dist/index.d.ts b/packages/suite-memo/dist/index.d.ts index 3c7b1c957..1bbad4909 100644 --- a/packages/suite-memo/dist/index.d.ts +++ b/packages/suite-memo/dist/index.d.ts @@ -260,24 +260,6 @@ type MemoOptions = { feePayer: Secret; }; -type Find = { - sol?: string; - account?: string; - destination?: Pubkey; - source?: Pubkey; - authority?: Pubkey; - multisigAuthority?: Pubkey; - signers?: Pubkey[]; - mint?: Pubkey; - mintAuthority?: Pubkey; - tokenAmount?: string; - memo?: string; - dateTime?: Date; - type?: string; - sig?: string; - innerInstruction?: boolean; -}; - type History = { sol?: string; account?: string; @@ -300,9 +282,6 @@ type FindOptions = { narrowDown: number; }; -type OnOk = (ok: T[]) => void; -type OnErr = (err: Error) => void; - /** @namespace */ declare const Memo: { findByOwner: (owner: Pubkey, onOk: OnOk, onErr: OnErr, options?: Partial) => Promise; diff --git a/packages/suite-memo/dist/index.js b/packages/suite-memo/dist/index.js index 6a8ff745c..18d292319 100644 --- a/packages/suite-memo/dist/index.js +++ b/packages/suite-memo/dist/index.js @@ -40,7 +40,7 @@ var import_web310 = require("@solana/web3.js"); // ../transaction-builder/src/batch.ts var import_web37 = require("@solana/web3.js"); -// ../shared/src/constants.ts +// ../suite-utils/src/constants.ts var import_web3 = require("@solana/web3.js"); var import_load = __toESM(require("@solana-suite/config/load")); var Config = import_load.default; @@ -201,7 +201,7 @@ var Constants; })(Constants || (Constants = {})); console.log(Constants.WarnningMessage.ANNOUNCE); -// ../shared/src/shared.ts +// ../suite-utils/src/shared.ts var overwriteObject = (object, targets) => { const that = object; targets.forEach((target) => { @@ -251,7 +251,7 @@ var convertTimestampToDateTime = (created_at) => { return; }; -// ../shared/src/result.ts +// ../suite-utils/src/result.ts var AbstractResult = class { unwrap(ok, err) { const r = this._chain( @@ -363,15 +363,15 @@ var InternalErr = class extends AbstractResult { } }; var Result; -((Result8) => { +((Result9) => { function ok(value) { return new InternalOk(value); } - Result8.ok = ok; + Result9.ok = ok; function err(error) { return new InternalErr(error || Error()); } - Result8.err = err; + Result9.err = err; function all(obj) { if (Array.isArray(obj)) { const resArr = []; @@ -381,7 +381,7 @@ var Result; } resArr.push(item.value); } - return Result8.ok(resArr); + return Result9.ok(resArr); } const res = {}; const keys = Object.keys(obj); @@ -392,9 +392,9 @@ var Result; } res[key] = item.value; } - return Result8.ok(res); + return Result9.ok(res); } - Result8.all = all; + Result9.all = all; })(Result || (Result = {})); // ../account/src/associated.ts @@ -1754,4 +1754,4 @@ var Memo3 = { ...Memo, ...Memo2 }; 0 && (module.exports = { Memo }); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uL3NyYy9jcmVhdGUudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvYmF0Y2gudHMiLCAiLi4vLi4vc2hhcmVkL3NyYy9jb25zdGFudHMudHMiLCAiLi4vLi4vc2hhcmVkL3NyYy9zaGFyZWQudHMiLCAiLi4vLi4vc2hhcmVkL3NyYy9yZXN1bHQudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvYXNzb2NpYXRlZC50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9rZXlwYWlyLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL3BkYS50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9pbmRleC50cyIsICIuLi8uLi9nbG9iYWwvc3JjL2luZGV4LnRzIiwgIi4uLy4uL2NvbnZlcnRlci9zcmMvY29sbGVjdGlvbi50cyIsICIuLi8uLi9jb252ZXJ0ZXIvc3JjL2NyZWF0b3JzLnRzIiwgIi4uLy4uL2NvbnZlcnRlci9zcmMvY29tcHJlc3NlZC1uZnQtbWV0YWRhdGEudHMiLCAiLi4vLi4vY29udmVydGVyL3NyYy9yb3lhbHR5LnRzIiwgIi4uLy4uL2NvbnZlcnRlci9zcmMvbmZ0LnRzIiwgIi4uLy4uL2NvbnZlcnRlci9zcm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cmVzLnRva2VuQWNjb3VudDtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uPFB1YmtleT4oXG4gICAgICAgIFtyZXMuaW5zdF0sXG4gICAgICAgIFtdLFxuICAgICAgICBmZWVQYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgcmVzLnRva2VuQWNjb3VudCEsXG4gICAgICApO1xuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiBSZXRyeSBmdW5jdGlvbiBpZiBjcmVhdGUgbmV3IHRva2VuIGFjY291aW50XG4gICAgICpcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gbWludFxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBvd25lclxuICAgICAqIEBwYXJhbSB7U2VjcmV0fSBmZWVQYXllclxuICAgICAqIEByZXR1cm5zIFByb21pc2U8c3RyaW5nPlxuICAgICAqL1xuICAgIGV4cG9ydCBjb25zdCByZXRyeUdldE9yQ3JlYXRlID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyOiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxzdHJpbmc+ID0+IHtcbiAgICAgIGxldCBjb3VudGVyID0gMTtcbiAgICAgIHdoaWxlIChjb3VudGVyIDwgUkVUUllfT1ZFUl9MSU1JVCkge1xuICAgICAgICB0cnkge1xuICAgICAgICAgIGNvbnN0IGluc3QgPSBhd2FpdCBnZXQobWludCwgb3duZXIsIGZlZVBheWVyLCB0cnVlKTtcblxuICAgICAgICAgIGlmIChpbnN0ICYmIHR5cGVvZiBpbnN0ID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgaW5zdCk7XG4gICAgICAgICAgICByZXR1cm4gaW5zdDtcbiAgICAgICAgICB9IGVsc2UgaWYgKGluc3QgaW5zdGFuY2VvZiBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uKSB7XG4gICAgICAgICAgICAoYXdhaXQgaW5zdC5zdWJtaXQoKSkubWFwKFxuICAgICAgICAgICAgICBhc3luYyAob2s6IHN0cmluZykgPT4ge1xuICAgICAgICAgICAgICAgIGF3YWl0IE5vZGUuY29uZmlybWVkU2lnKG9rKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gaW5zdC5kYXRhO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAoZXJyOiBFcnJvcikgPT4ge1xuICAgICAgICAgICAgICAgIGRlYnVnTG9nKCcjIEVycm9yIHN1Ym1pdCByZXRyeUdldE9yQ3JlYXRlOiAnLCBlcnIpO1xuICAgICAgICAgICAgICAgIHRocm93IGVycjtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgZGVidWdMb2coYCMgcmV0cnk6ICR7Y291bnRlcn0gY3JlYXRlIHRva2VuIGFjY291bnQ6IGAsIGUpO1xuICAgICAgICAgIGRlYnVnTG9nKGAjIG1pbnQ6ICR7bWludH0sIG93bmVyOiAke293bmVyfSwgZmVlUGF5ZXI6ICR7ZmVlUGF5ZXJ9YCk7XG4gICAgICAgIH1cbiAgICAgICAgYXdhaXQgc2xlZXAoUkVUUllfU0xFRVBfVElNRSk7XG4gICAgICAgIGNvdW50ZXIrKztcbiAgICAgIH1cbiAgICAgIHRocm93IEVycm9yKGByZXRyeSBhY3Rpb24gaXMgb3ZlciBsaW1pdCAke1JFVFJZX09WRVJfTElNSVR9YCk7XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIFtNYWluIGxvZ2ljXUdldCBBc3NvY2lhdGVkIHRva2VuIEFjY291bnQuXG4gICAgICogaWYgbm90IGNyZWF0ZWQsIGNyZWF0ZSBuZXcgdG9rZW4gYWNjb3VpbnRcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBtaW50XG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAgICogQHBhcmFtIHtQdWJrZXl9IGZlZVBheWVyXG4gICAgICogQHJldHVybnMgUHJvbWlzZTxzdHJpbmc+XG4gICAgICovXG4gICAgZXhwb3J0IGNvbnN0IG1ha2VPckNyZWF0ZUluc3RydWN0aW9uID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyPzogUHVia2V5LFxuICAgICAgYWxsb3dPd25lck9mZkN1cnZlID0gZmFsc2UsXG4gICAgKTogUHJvbWlzZTx7XG4gICAgICB0b2tlbkFjY291bnQ6IHN0cmluZztcbiAgICAgIGluc3Q6IFRyYW5zYWN0aW9uSW5zdHJ1Y3Rpb24gfCB1bmRlZmluZWQ7XG4gICAgfT4gPT4ge1xuICAgICAgY29uc3QgYXNzb2NpYXRlZFRva2VuQWNjb3VudCA9IGdldEFzc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jKFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSxcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3QsXG4gICAgICAgIH07XG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GaWxlVHlwZSxcbiAgICAgICAgc3RvcmFnZVR5cGU6IFN0b3JhZ2VUeXBlLFxuICAgICAgICBmZWVQYXllcj86IFNlY3JldCxcbiAgICAgICkgPT4gUHJvbWlzZTxSZXN1bHQ8c3RyaW5nLCBFcnJvcj4+LFxuICAgICAgc3RvcmFnZVR5cGU6IFN0b3JhZ2VUeXBlLFxuICAgICAgZmVlUGF5ZXI/OiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxQcm9wZXJ0aWVzPiA9PiB7XG4gICAgICBpZiAoIWlucHV0IHx8ICFpbnB1dC5maWxlcykge1xuICAgICAgICByZXR1cm4ge307XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGZpbGVzID0gYXdhaXQgUHJvbWlzZS5hbGwoXG4gICAgICAgIGlucHV0LmZpbGVzLm1hcChhc3luYyAoZmlsZSkgPT4ge1xuICAgICAgICAgIGlmICghZmlsZS5maWxlUGF0aCkge1xuICAgICAgICAgICAgcmV0dXJuIHt9O1xuICAgICAgICAgIH1cbiAgICAgICAgICBjb25zdCByZXMgPSBhd2FpdCBjYWxsYmFja0Z1bmMoZmlsZS5maWxlUGF0aCwgc3RvcmFnZVR5cGUsIGZlZVBheWVyKTtcbiAgICAgICAgICBpZiAocmVzLmlzRXJyKSB7XG4gICAgICAgICAgICB0aHJvdyBFcnJvcihyZXMuZXJyb3IubWVzc2FnZSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBvdmVyd3JpdGVPYmplY3QoZmlsZSwgW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBleGlzdHNLZXk6ICdmaWxlUGF0aCcsXG4gICAgICAgICAgICAgIHdpbGw6IHsga2V5OiAndXJpJywgdmFsdWU6IHJlcy52YWx1ZSB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICBdKTtcbiAgICAgICAgfSksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHsgLi4uaW5wdXQsIGZpbGVzIH0gYXMgUHJvcGVydGllczt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gbGV0IGluc3RydWN0aW9uVHJhbnNmZXI7XG5cbiAgICAgICAgICAgICAgICAvLyBmZXRjaCAgdHJhbnNmZXIgdHJhbnNhY3Rpb24gZm9yIHJlbGF0aW9uYWwgbWVtb1xuICAgICAgICAgICAgICAgIHR4TWV0YS50cmFuc2FjdGlvbi5tZXNzYWdlLmluc3RydWN0aW9ucy5mb3JFYWNoKFxuICAgICAgICAgICAgICAgICAgKGluc3RydWN0aW9uKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICBpc1BhcnNlZEluc3RydWN0aW9uKGluc3RydWN0aW9uKSAmJlxuICAgICAgICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuVHJhbnNmZXIucHJvZ3JhbS5pbmNsdWRlcyhcbiAgICAgICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLnByb2dyYW0sXG4gICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyID0gaW5zdHJ1Y3Rpb247XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgKTtcblxuICAgICAgICAgICAgICAgIC8vIHNwbC10b2tlbiBvciBzeXN0ZW1cbiAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyICYmXG4gICAgICAgICAgICAgICAgICBtb2R1bGVOYW1lICE9PSBpbnN0cnVjdGlvblRyYW5zZmVyWydwcm9ncmFtJ11cbiAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgIGRlYnVnTG9nKFxuICAgICAgICAgICAgICAgICAgICAnIyBGaWx0ZXJUeXBlLk1lbW8gYnJlYWsgaW5zdHJ1Y3Rpb246ICcsXG4gICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIsXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgLy8gZmV0Y2ggbWVtbyBvbmx5IHRyYW5zYWN0aW9uXG4gICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5NZW1vLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlcixcbiAgICAgICAgICAgICAgICAgIHBvc3RUb2tlbkFjY291bnQsXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5Pbmx5TWVtbzoge1xuICAgICAgICAgICAgICBpZiAoRmlsdGVyT3B0aW9ucy5NZW1vLnByb2dyYW0uaW5jbHVkZXMoaW5zdHJ1Y3Rpb24ucHJvZ3JhbSkpIHtcbiAgICAgICAgICAgICAgICBsZXQgaW5zdHJ1Y3Rpb25UcmFuc2ZlcjtcblxuICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuTWVtby5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIsXG4gICAgICAgICAgICAgICAgICBwb3N0VG9rZW5BY2NvdW50LFxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXNlIEZpbHRlclR5cGUuTWludDoge1xuICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5NaW50LnByb2dyYW0uaW5jbHVkZXMoaW5zdHJ1Y3Rpb24ucHJvZ3JhbSkgJiZcbiAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLk1pbnQuYWN0aW9uLmluY2x1ZGVzKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24ucGFyc2VkLnR5cGUgYXMgc3RyaW5nLFxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5NaW50LmludG9Vc2VyU2lkZShpbnN0cnVjdGlvbiwgdHhNZXRhKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5UcmFuc2ZlcjpcbiAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgIG1vZHVsZU5hbWUgPT09IGluc3RydWN0aW9uLnByb2dyYW0gJiZcbiAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLlRyYW5zZmVyLmFjdGlvbi5pbmNsdWRlcyhcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLnBhcnNlZC50eXBlIGFzIHN0cmluZyxcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgIGlmIChpbnN0cnVjdGlvbi5wYXJzZWQudHlwZSA9PT0gJ3RyYW5zZmVyQ2hlY2tlZCcpIHtcbiAgICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuVHJhbnNmZXJDaGVja2VkLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgICAgcG9zdFRva2VuQWNjb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z59IG9wdGlvbnNcbiAgICogQHJldHVybiBQcm9taXNlPFJlc3VsdDxUcmFuc2FjdGlvbiwgRXJyb3I+PlxuICAgKiBAbW9kdWxlIE1lbW9cbiAgICovXG4gIGV4cG9ydCBjb25zdCBjcmVhdGUgPSAoXG4gICAgZGF0YTogc3RyaW5nLFxuICAgIG93bmVyOiBTZWNyZXQsXG4gICAgb3B0aW9uczogUGFydGlhbDxNZW1vT3B0aW9ucz4gPSB7fSxcbiAgKTogUmVzdWx0PENvbW1vblN0cnVjdHVyZSwgRXJyb3I+ID0+IHtcbiAgICByZXR1cm4gVHJ5KCgpID0+IHtcbiAgICAgIGNvbnN0IGZlZVBheWVyID0gb3B0aW9ucy5mZWVQYXllcjtcblxuICAgICAgY29uc3Qga2V5ID0gb3duZXIudG9LZXlwYWlyKCkucHVibGljS2V5XG4gICAgICAgID8gW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBwdWJrZXk6IG93bmVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgICAgICAgaXNTaWduZXI6IHRydWUsXG4gICAgICAgICAgICAgIGlzV3JpdGFibGU6IHRydWUsXG4gICAgICAgICAgICB9LFxuICAgICAgICAgIF1cbiAgICAgICAgOiBbXTtcblxuICAgICAgY29uc3QgaW5zdHJ1Y3Rpb24gPSBuZXcgVHJhbnNhY3Rpb25JbnN0cnVjdGlvbih7XG4gICAgICAgIHByb2dyYW1JZDogQ29uc3RhbnRzLk1FTU9fUFJPR1JBTV9JRCxcbiAgICAgICAgZGF0YTogZW5jb2RlKGRhdGEpLFxuICAgICAgICBrZXlzOiBrZXksXG4gICAgICB9KTtcblxuICAgICAgY29uc3QgcGF5ZXIgPSBmZWVQYXllciB8fCBvd25lcjtcblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uKFxuICAgICAgICBbaW5zdHJ1Y3Rpb25dLFxuICAgICAgICBbb3duZXIudG9LZXlwYWlyKCldL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ibWl0KCkpLm1hcChcbiAgICAgICAgICAgICAgYXN5bmMgKG9rOiBzdHJpbmcpID0+IHtcbiAgICAgICAgICAgICAgICBhd2FpdCBOb2RlLmNvbmZpcm1lZFNpZyhvayk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGluc3QuZGF0YTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgKGVycjogRXJyb3IpID0+IHtcbiAgICAgICAgICAgICAgICBkZWJ1Z0xvZygnIyBFcnJvciBzdWJtaXQgcmV0cnlHZXRPckNyZWF0ZTogJywgZXJyKTtcbiAgICAgICAgICAgICAgICB0aHJvdyBlcnI7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgIGRlYnVnTG9nKGAjIHJldHJ5OiAke2NvdW50ZXJ9IGNyZWF0ZSB0b2tlbiBhY2NvdW50OiBgLCBlKTtcbiAgICAgICAgICBkZWJ1Z0xvZyhgIyBtaW50OiAke21pbnR9LCBvd25lcjogJHtvd25lcn0sIGZlZVBheWVyOiAke2ZlZVBheWVyfWApO1xuICAgICAgICB9XG4gICAgICAgIGF3YWl0IHNsZWVwKFJFVFJZX1NMRUVQX1RJTUUpO1xuICAgICAgICBjb3VudGVyKys7XG4gICAgICB9XG4gICAgICB0aHJvdyBFcnJvcihgcmV0cnkgYWN0aW9uIGlzIG92ZXIgbGltaXQgJHtSRVRSWV9PVkVSX0xJTUlUfWApO1xuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiBbTWFpbiBsb2dpY11HZXQgQXNzb2NpYXRlZCB0b2tlbiBBY2NvdW50LlxuICAgICAqIGlmIG5vdCBjcmVhdGVkLCBjcmVhdGUgbmV3IHRva2VuIGFjY291aW50XG4gICAgICpcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gbWludFxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBvd25lclxuICAgICAqIEBwYXJhbSB7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Uk9HUkFNX0lELFxuICAgICAgICApO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3Q6IHVuZGVmaW5lZCxcbiAgICAgICAgfTtcbiAgICAgIH0gY2F0Y2ggKGVycm9yOiB1bmtub3duKSB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5BY2NvdW50Tm90Rm91bmRFcnJvcikgJiZcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5JbnZhbGlkQWNjb3VudE93bmVyRXJyb3IpXG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9yKCdVbmV4cGVjdGVkIGVycm9yJyk7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBwYXllciA9ICFmZWVQYXllciA/IG93bmVyIDogZmVlUGF5ZXI7XG5cbiAgICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgICBwYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgICBBU1NPQ0lBVEVEX1RPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG5cbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICB0b2tlbkFjY291bnQ6IGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSxcbiAgICAgICAgICBpbnN0LFxuICAgICAgICB9O1xuICAgICAgfVxuICAgIH07XG4gIH1cbn1cbiIsICJpbXBvcnQgeyBLZXlwYW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HlwZTogU3RvcmFnZVR5cGUsXG4gICAgICAgIGZlZVBheWVyPzogU2VjcmV0LFxuICAgICAgKSA9PiBQcm9taXNlPFJlc3VsdDxzdHJpbmcsIEVycm9yPj4sXG4gICAgICBzdG9yYWdlVHlwZTogU3RvcmFnZVR5cGUsXG4gICAgICBmZWVQYXllcj86IFNlY3JldCxcbiAgICApOiBQcm9taXNlPFByb3BlcnRpZXM+ID0+IHtcbiAgICAgIGlmICghaW5wdXQgfHwgIWlucHV0LmZpbGVzKSB7XG4gICAgICAgIHJldHVybiB7fTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgZmlsZXMgPSBhd2FpdCBQcm9taXNlLmFsbChcbiAgICAgICAgaW5wdXQuZmlsZXMubWFwKGFzeW5jIChmaWxlKSA9PiB7XG4gICAgICAgICAgaWYgKCFmaWxlLmZpbGVQYXRoKSB7XG4gICAgICAgICAgICByZXR1cm4ge307XG4gICAgICAgICAgfVxuICAgICAgICAgIGNvbnN0IHJlcyA9IGF3YWl0IGNhbGxiYWNrRnVuYyhmaWxlLmZpbGVQYXRoLCBzdG9yYWdlVHlwZSwgZmVlUGF5ZXIpO1xuICAgICAgICAgIGlmIChyZXMuaXNFcnIpIHtcbiAgICAgICAgICAgIHRocm93IEVycm9yKHJlcy5lcnJvci5tZXNzYWdlKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgcmV0dXJuIG92ZXJ3cml0ZU9iamVjdChmaWxlLCBbXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGV4aXN0c0tleTogJ2ZpbGVQYXRoJyxcbiAgICAgICAgICAgICAgd2lsbDogeyBrZXk6ICd1cmknLCB2YWx1ZTogcmVzLnZhbHVlIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgIF0pO1xuICAgICAgICB9KSxcbiAgICAgICk7XG4gICAgICByZXR1cm4geyAuLi5pbnB1dCwgZmlsZXMgfSBhcyBQcm9wZXJ0aWVzO1xuICAgIH07XG4gIH1cbn1cbiIsICIvKi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5cyA9IE9iamVjdC5rZXlzKG1ldGFkYXRhKTtcbiAgICAgIGNvbnN0IHJlc3VsdHM6IERldGFpbHNbXSA9IFtdO1xuICAgICAga2V5cy5tYXAoKGtleSkgPT4ge1xuICAgICAgICBsZXQgcmVzITogUmVzdWx0PHN0cmluZywgVmFsaWRhdG9yRXJyb3I+O1xuICAgICAgICBzd2l0Y2ggKGtleSkge1xuICAgICAgICAgIGNhc2UgJ2ltYWdlJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuaW1hZ2UpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNJbWFnZVVybChtZXRhZGF0YS5pbWFnZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdyb3lhbHR5JzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEucm95YWx0eSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1JveWFsdHkobWV0YWRhdGEucm95YWx0eSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkY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hbS5pbmNsdWRlcyhpbnN0cnVjdGlvbi5wcm9ncmFtKSkge1xuICAgICAgICAgICAgICAgIGxldCBpbnN0cnVjdGlvblRyYW5zZmVyO1xuXG4gICAgICAgICAgICAgICAgLy8gZmV0Y2ggIHRyYW5zZmVyIHRyYW5zYWN0aW9uIGZvciByZWxhdGlvbmFsIG1lbW9cbiAgICAgICAgICAgICAgICB0eE1ldGEudHJhbnNhY3Rpb24ubWVzc2FnZS5pbnN0cnVjdGlvbnMuZm9yRWFjaChcbiAgICAgICAgICAgICAgICAgIChpbnN0cnVjdGlvbikgPT4ge1xuICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgaXNQYXJzZWRJbnN0cnVjdGlvbihpbnN0cnVjdGlvbikgJiZcbiAgICAgICAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLlRyYW5zZmVyLnByb2dyYW0uaW5jbHVkZXMoXG4gICAgICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbi5wcm9ncmFtLFxuICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlciA9IGluc3RydWN0aW9uO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICk7XG5cbiAgICAgICAgICAgICAgICAvLyBzcGwtdG9rZW4gb3Igc3lzdGVtXG4gICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlciAmJlxuICAgICAgICAgICAgICAgICAgbW9kdWxlTmFtZSAhPT0gaW5zdHJ1Y3Rpb25UcmFuc2ZlclsncHJvZ3JhbSddXG4gICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICBkZWJ1Z0xvZyhcbiAgICAgICAgICAgICAgICAgICAgJyMgRmlsdGVyVHlwZS5NZW1vIGJyZWFrIGluc3RydWN0aW9uOiAnLFxuICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyLFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vIGZldGNoIG1lbW8gb25seSB0cmFuc2FjdGlvblxuICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuTWVtby5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIsXG4gICAgICAgICAgICAgICAgICBwb3N0VG9rZW5BY2NvdW50LFxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXNlIEZpbHRlclR5cGUuT25seU1lbW86IHtcbiAgICAgICAgICAgICAgaWYgKEZpbHRlck9wdGlvbnMuTWVtby5wcm9ncmFtLmluY2x1ZGVzKGluc3RydWN0aW9uLnByb2dyYW0pKSB7XG4gICAgICAgICAgICAgICAgbGV0IGluc3RydWN0aW9uVHJhbnNmZXI7XG5cbiAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLk1lbW8uaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyLFxuICAgICAgICAgICAgICAgICAgcG9zdFRva2VuQWNjb3VudCxcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLk1pbnQ6IHtcbiAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuTWludC5wcm9ncmFtLmluY2x1ZGVzKGluc3RydWN0aW9uLnByb2dyYW0pICYmXG4gICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5NaW50LmFjdGlvbi5pbmNsdWRlcyhcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLnBhcnNlZC50eXBlIGFzIHN0cmluZyxcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuTWludC5pbnRvVXNlclNpZGUoaW5zdHJ1Y3Rpb24sIHR4TWV0YSk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXNlIEZpbHRlclR5cGUuVHJhbnNmZXI6XG4gICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICBtb2R1bGVOYW1lID09PSBpbnN0cnVjdGlvbi5wcm9ncmFtICYmXG4gICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5UcmFuc2Zlci5hY3Rpb24uaW5jbHVkZXMoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbi5wYXJzZWQudHlwZSBhcyBzdHJpbmcsXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICBpZiAoaW5zdHJ1Y3Rpb24ucGFyc2VkLnR5cGUgPT09ICd0cmFuc2ZlckNoZWNrZWQnKSB7XG4gICAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLlRyYW5zZmVyQ2hlY2tlZC5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICAgIHBvc3RUb2tlbkFjY291bnQsXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLlRyYW5zZmVyLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIHJldHVybiBoaXN0b3J5O1xuICAgIH07XG59XG4iLCAiaW1wb3J0IHsgUHVia2V5IH0gZnJvbSAnfi90eXBlcy9hY2NvdW50JztcbmltcG9ydCB7IEZpbmRPcHRpb25zLCBIaXN0b3J5IH0gZnJvbSAnfi90eXBlcy9oaXN0b3J5JztcbmltcG9ydCB7IE9uRXJyLCBPbk9rIH0gZnJvbSAnfi90eXBlcy9zdWl0ZS11dGlscyc7XG5pbXBvcnQgeyBGaWx0ZXJUeXBlLCBNb2R1bGVOYW1lIH0gZnJvbSAnfi90eXBlcy90cmFuc2FjdGlvbi1maWx0ZXInO1xuaW1wb3J0IHsgU2lnbmF0dXJlcywgVHJhbnNhY3Rpb25GaWx0ZXIgfSBmcm9tICd+L3RyYW5zYWN0aW9uLWZpbHRlcic7XG5cbmV4cG9ydCBuYW1lc3BhY2UgTWVtbyB7XG4gIC8qKlxuICAgKiBGaW5kIG1lbW8gbWVzc2FnZSBieSBvd25lciBhY2NvdW50XG4gICAqIEBtb2R1bGUgTWVtb1xuICAgKi9cbiAgZXhwb3J0IGNvbnN0IGZpbmRCeU93bmVyID0gYXN5bmMgKFxuICAgIG93bmVyOiBQdWJrZXksXG4gICAgb25PazogT25PazxIaXN0b3J5PixcbiAgICBvbkVycjogT25FcnIsX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lvbkJ1aWxkZXIiLCAiaW1wb3J0X3dlYjMiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiaW1wb3J0X2JzNTgiLCAiTWVtbyIsICJicyIsICJTaWduYXR1cmVzIiwgIlRyYW5zYWN0aW9uRmlsdGVyIiwgImluc3RydWN0aW9uIiwgIkNvbnZlcnRlciIsICJNZW1vIiwgIk1lbW8iXQp9Cg== \ No newline at end of file diff --git a/packages/suite-memo/dist/index.mjs b/packages/suite-memo/dist/index.mjs index 7d5bcdd35..e7ffe943c 100644 --- a/packages/suite-memo/dist/index.mjs +++ b/packages/suite-memo/dist/index.mjs @@ -7,7 +7,7 @@ import { Transaction as Transaction2 } from "@solana/web3.js"; -// ../shared/src/constants.ts +// ../suite-utils/src/constants.ts import { PublicKey } from "@solana/web3.js"; import SolanaJsonConfig from "@solana-suite/config/load"; var Config = SolanaJsonConfig; @@ -168,7 +168,7 @@ var Constants; })(Constants || (Constants = {})); console.log(Constants.WarnningMessage.ANNOUNCE); -// ../shared/src/shared.ts +// ../suite-utils/src/shared.ts var overwriteObject = (object, targets) => { const that = object; targets.forEach((target) => { @@ -218,7 +218,7 @@ var convertTimestampToDateTime = (created_at) => { return; }; -// ../shared/src/result.ts +// ../suite-utils/src/result.ts var AbstractResult = class { unwrap(ok, err) { const r = this._chain( @@ -330,15 +330,15 @@ var InternalErr = class extends AbstractResult { } }; var Result; -((Result8) => { +((Result9) => { function ok(value) { return new InternalOk(value); } - Result8.ok = ok; + Result9.ok = ok; function err(error) { return new InternalErr(error || Error()); } - Result8.err = err; + Result9.err = err; function all(obj) { if (Array.isArray(obj)) { const resArr = []; @@ -348,7 +348,7 @@ var Result; } resArr.push(item.value); } - return Result8.ok(resArr); + return Result9.ok(resArr); } const res = {}; const keys = Object.keys(obj); @@ -359,9 +359,9 @@ var Result; } res[key] = item.value; } - return Result8.ok(res); + return Result9.ok(res); } - Result8.all = all; + Result9.all = all; })(Result || (Result = {})); // ../account/src/associated.ts @@ -1739,4 +1739,4 @@ var Memo3 = { ...Memo, ...Memo2 }; export { Memo3 as Memo }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2NyZWF0ZS50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9iYXRjaC50cyIsICIuLi8uLi9zaGFyZWQvc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi9zaGFyZWQvc3JjL3NoYXJlZC50cyIsICIuLi8uLi9zaGFyZWQvc3JjL3Jlc3VsdC50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9hc3NvY2lhdGVkLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2tleXBhaXIudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvcGRhLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2luZGV4LnRzIiwgIi4uLy4uL2dsb2JhbC9zcmMvaW5kZXgudHMiLCAiLi4vLi4vY29udmVydGVyL3NyYy9jb2xsZWN0aW9uLnRzIiwgIi4uLy4uL2NvbnZlcnRlci9zcmMvY3JlYXRvcnMudHMiLCAiLi4vLi4vY29udmVydGVyL3NyYy9jb21wcmVzc2VkLW5mdC1tZXRhZGF0YS50cyIsICIuLi8uLi9jb252ZXJ0ZXIvc3JjL3JveWFsdHkudHMiLCAiLi4vLi4vY29udmVydGVyL3NyYy9uZnQudHMiLCAiLi4vLi4vY29udmVydGVyL3NyYy9tZW1vLnRzIiwgIi4uLy4uL2NvbnZlcnRlci9zcmMvbWludC50cyIsICIuLi8uLi9jb252ZXJ0ZXIvc3JjL3JlZ3VsYXItbmZ0LW1ldGFkYXRhLnRzIiwgIi4uLy4uL2NvbnZlcnRlci9zcmMvcHJvcGVydGllcy50cyIsICIuLi8uLi9jb252ZXJ0ZXIvc3JjL3VzZXMudHMiLCAiLi4vLi4vY29udmVydG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ucy5mZWVQYXllcjtcblxuICAgICAgY29uc3Qga2V5ID0gb3duZXIudG9LZXlwYWlyKCkucHVibGljS2V5XG4gICAgICAgID8gW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBwdWJrZXk6IG93bmVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgICAgICAgaXNTaWduZXI6IHRydWUsXG4gICAgICAgICAgICAgIGlzV3JpdGFibGU6IHRydWUsXG4gICAgICAgICAgICB9LFxuICAgICAgICAgIF1cbiAgICAgICAgOiBbXTtcblxuICAgICAgY29uc3QgaW5zdHJ1Y3Rpb24gPSBuZXcgVHJhbnNhY3Rpb25JbnN0cnVjdGlvbih7XG4gICAgICAgIHByb2dyYW1JZDogQ29uc3RhbnRzLk1FTU9fUFJPR1JBTV9JRCxcbiAgICAgICAgZGF0YTogZW5jb2RlKGRhdGEpLFxuICAgICAgICBrZXlzOiBrZXksXG4gICAgICB9KTtcblxuICAgICAgY29uc3QgcGF5ZXIgPSBmZWVQYXllciB8fCBvd25lcjtcblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uKFxuICAgICAgICBbaW5zdHJ1Y3Rpb25dLFxuICAgICAgICBbb3duZXIudG9LZXlwYWlyKCldLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKSxcbiAgICAgICk7XG4gICAgfSk7XG4gIH07XG59XG4iLCAiaW1wb3J0IHtcbiAgQ29uZmlybU9wdGlvbnMsXG4gIHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24sXG4gIFRyYW5zYWN0aW9uLFxuICBUcmFuc2FjdGlvblNpZ25hdHVyZSxcbn0gZnJvbSAnQHNvbGFuYS93ZWIzLmpzJztcblxuaW1wb3J0IHsgTm9kZSB9IGZyb20gJ34vbm9kZSc7XG5pbXBvcnQgeyBNQVhfUkVUUklFUywgVHJhbnNhY3Rpb25CdWlsZGVyIGFzIENvbW1vbiB9IGZyb20gJy4vY29tbW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gYXJyLmZpbHRlcigoYSkgPT4gYS5mZWVQYXllciAhPT0gdW5kZWZpbmVkKTtcbiAgICAgICAgbGV0IGZlZVBheWVyID0gc2lnbmVyc1swXTtcbiAgICAgICAgaWYgKGZlZVBheWVycy5sZW5ndGggPiAwICYmIGZlZVBheWVyc1swXS5mZWVQYXllcikge1xuICAgICAgICAgIGZlZVBheWVyID0gZmVlUGF5ZXJzWzBdLmZlZVBheWVyO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgdHJhbnNhY3Rpb24gPSBuZXcgVHJhbnNhY3Rpb24oKTtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHNpZ25lcnM7XG4gICAgICAgIGlmIChmZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gZmVlUGF5ZXIucHVibGljS2V5O1xuICAgICAgICAgIGZpbmFsU2lnbmVycyA9IFtmZWVQYXllciwgLi4uc2lnbmVyc107XG4gICAgICAgIH1cbiAgICAgICAgaW5zdHJ1Y3Rpb25zLm1hcCgoaW5zdCkgPT4gdHJhbnNhY3Rpb24uYWRkKGluc3QpKTtcblxuICAgICAgICAvLyBDYWxjdWxhdGVUeHNpemUuaXNNYXhUcmFuc2FjdGlvblNpemUodHJhbnNhY3Rpb24sIGZlZVBheWVyLnB1YmxpY0tleSk7XG5cbiAgICAgICAgY29uc3Qgb3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogTUFYX1JFVFJJRVMsXG4gICAgICAgIH07XG5cbiAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgIG9wdGlvbnMsXG4gICAgICAgICk7XG4gICAgICB9KTtcbiAgICB9O1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ob2JqLmlzRXJyKSB7XG4gICAgICAgIHJldHVybiBvYmo7XG4gICAgICB9IGVsc2UgaWYgKG9iai52YWx1ZS5jYW5TdWJtaXQpIHtcbiAgICAgICAgZGVidWdMb2coJyMgUmVzdWx0IGJhdGNoIGNhblN1Ym1pdCcpO1xuICAgICAgICBjb25zdCBzaWcgPSBhd2FpdCAob2JqIGFzIFBhcnRpYWxTaWduU3RydWN0dXJlKS5zdWJtaXQoZmVlUGF5ZXIpO1xuICAgICAgICBpZiAoc2lnLmlzRXJyKSB7XG4gICAgICAgICAgcmV0dXJuIHNpZztcbiAgICAgICAgfVxuICAgICAgICBhd2FpdCBOb2RlLmNvbmZpcm1lZFNpZyhzaWcudmFsdWUpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgZGVidWdMb2coJyMgUmVzdWx0IGJhdGNoIG90aGVyIHRoYW4gY2FuU3VibWl0Jyk7XG4gICAgICAgIGlmICh0aGlzLmxlbmd0aCA9PSBpKSB7XG4gICAgICAgICAgLy8gbGFzdCBvYmplY3RcbiAgICAgICAgICByZXR1cm4gb2JqLnN1Ym1pdChmZWVQYXllcik7XG4gICAgICAgIH1cbiAgICAgICAgb2JqLnN1Ym1pdChmZWVQYXllcik7XG4gICAgICB9XG4gICAgICBpKys7XG4gICAgfVxuICB9IGVsc2Uge1xuICAgIGNvbnN0IGluc3RydWN0aW9uczogQ29tbW9uU3RydWN0dXJlIHwgTWludFN0cnVjdHVyZVtdID0gW107XG4gICAgZm9yIChjb25zdCBvYmogb2YgdGhpcykge1xuICAgICAgaWYgKG9iai5pc0Vycikge1xuICAgICAgICByZXR1cm4gb2JqO1xuICAgICAgfSBlbHNlIGlmIChvYmouaXNPaykge1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChvYmoudmFsdWUpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgcmV0dXJuIFJlc3VsdC5lcnIoRXJyb3IoJ09ubHkgQXJyYXkgSW5zdHJ1Y3Rpb24gb2JqZWN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Y2lhdGVkIHtcbiAgICBjb25zdCBSRVRSWV9PVkVSX0xJTUlUID0gMTA7XG4gICAgY29uc3QgUkVUUllfU0xFRVBfVElNRSA9IDM7XG4gICAgLy9AaW50ZXJuYWxcbiAgICBjb25zdCBnZXQgPSBhc3luYyAoXG4gICAgICBtaW50OiBQdWJrZXksXG4gICAgICBvd25lcjogUHVia2V5LFxuICAgICAgZmVlUGF5ZXI6IFNlY3JldCxcbiAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSA9IGZhbHNlLFxuICAgICk6IFByb21pc2U8c3RyaW5nIHwgQ29tbW9uU3RydWN0dXJlPFB1YmtleT4+ID0+IHtcbiAgICAgIGNvbnN0IHJlcyA9IGF3YWl0IG1ha2VPckNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICBtaW50LFxuICAgICAgICBvd25lcixcbiAgICAgICAgbmV3IEtleXBhaXIuS2V5cGFpcih7IHNlY3JldDogZmVlUGF5ZXIgfSkucHVia2V5LFxuICAgICAgICBhbGxvd093bmVyT2ZmQ3VydmUsXG4gICAgICApO1xuXG4gICAgICBpZiAoIXJlcy5pbnN0KSB7XG4gICAgICAgIHJldHVybiByZXMudG9rZW5BY2NvdW50O1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb248UHVia2V5PihcbiAgICAgICAgW3Jlcy5pbnN0XSxcbiAgICAgICAgW10sXG4gICAgICAgIGZlZVBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICByZXMudG9rZW5BY2NvdW50ISxcbiAgICAgICk7XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIFJldHJ5IGZ1bmN0aW9uIGlmIGNyZWF0ZSBuZXcgdG9rZW4gYWNjb3VpbnRcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBtaW50XG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAgICogQHBhcmFtIHtTZWNyZXR9IGZlZVBheWVyXG4gICAgICogQHJldHVybnMgUHJvbWlzZTxzdHJpbmc+XG4gICAgICovXG4gICAgZXhwb3J0IGNvbnN0IHJldHJ5R2V0T3JDcmVhdGUgPSBhc3luYyAoXG4gICAgICBtaW50OiBQdWJrZXksXG4gICAgICBvd25lcjogUHVia2V5LFxuICAgICAgZmVlUGF5ZXI6IFNlY3JldCxcbiAgICApOiBQcm9taXNlPHN0cmluZz4gPT4ge1xuICAgICAgbGV0IGNvdW50ZXIgPSAxO1xuICAgICAgd2hpbGUgKGNvdW50ZXIgPCBSRVRSWV9PVkVSX0xJTUlUKSB7XG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgY29uc3QgaW5zdCA9IGF3YWl0IGdldChtaW50LCBvd25lciwgZmVlUGF5ZXIsIHRydWUpO1xuXG4gICAgICAgICAgaWYgKGluc3QgJiYgdHlwZW9mIGluc3QgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICBkZWJ1Z0xvZygnIyBhc3NvY2lhdGVkVG9rZW5BY2NvdW50OiAnLCBpbnN0KTtcbiAgICAgICAgICAgIHJldHVybiBpbnN0O1xuICAgICAgICAgIH0gZWxzZSBpZiAoaW5zdCBpbnN0YW5jZW9mIFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb24pIHtcbiAgICAgICAgICAgIChhd2FpdCBpbnN0LnN1Ym1pdCgpKS5tYXAoXG4gICAgICAgICAgICAgIGFzeW5jIChvazogc3RyaW5nKSA9PiB7XG4gICAgICAgICAgICAgICAgYXdhaXQgTm9kZS5jb25maXJtZWRTaWcob2spO1xuICAgICAgICAgICAgICAgIHJldHVybiBpbnN0LmRhdGE7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIChlcnI6IEVycm9yKSA9PiB7XG4gICAgICAgICAgICAgICAgZGVidWdMb2coJyMgRXJyb3Igc3VibWl0IHJldHJ5R2V0T3JDcmVhdGU6ICcsIGVycik7XG4gICAgICAgICAgICAgICAgdGhyb3cgZXJyO1xuICAg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ZW9mIFRva2VuSW52YWxpZEFjY291bnRPd25lckVycm9yKVxuICAgICAgICApIHtcbiAgICAgICAgICB0aHJvdyBFcnJvcignVW5leHBlY3RlZCBlcnJvcicpO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgcGF5ZXIgPSAhZmVlUGF5ZXIgPyBvd25lciA6IGZlZVBheWVyO1xuXG4gICAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVBc3NvY2lhdGVkVG9rZW5BY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgcGF5ZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdCxcbiAgICAgICAgfTtcbiAgICAgIH1cbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHsgS2V5cGFpciBhcyBPcmlnaW5hbCwgUHVibGljS2V5IH0gZnJvbSAnQHNvbGFuYS93ZWIzLmpzJztcbmltcG9ydCB7IFB1YmtleSwgU2VjcmV0IH0gZnJvbSAnfi90eXBlcy9hY2NvdW50JztcbmltcG9ydCBicyBmcm9tICdiczU4JztcblxuZXhwb3J0IG5hbWVzcGFjZSBBY2NvdW50IHtcbiAgZXhwb3J0IGNsYXNzIEtleXBhaXIge1xuICAgIHNlY3JldDogU2VjcmV0O1xuICAgIHB1YmtleTogUHVia2V5O1xuXG4gICAgY29uc3RydWN0b3IocGFyYW1zOiB7IHB1YmtleT86IF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RhdGEnKSxcbiAgICAgICAgICBQUk9HUkFNX0lELnRvQnVmZmVyKCksXG4gICAgICAgICAgYWRkcmVzcy50b1B1YmxpY0tleSgpLnRvQnVmZmVyKCksXG4gICAgICAgIF0sXG4gICAgICAgIFBST0dSQU1fSUQsXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGdldE1hc3RlckVkaXRpb24gPSAoYWRkcmVzczogUHVia2V5KTogUHVibGljS2V5ID0+IHtcbiAgICAgIGNvbnN0IFtwdWJsaWNLZXldID0gUHVibGljS2V5LmZpbmRQcm9ncmFtQWRkcmVzc1N5bmMoXG4gICAgICAgIFtcbiAgICAgICAgICBCdWZmZXIuZnJvbSgnbWV0YWRhdGEnKSxcbiAgICAgICAgICBQUk9HUkFNX0lELnRvQnVmZmVyKCksXG4gICAgICAgICAgYWRkcmVzcy50b1B1YmxpY0tleSgpLnRvQnVmZmVyKCksXG4gICAgICAgICAgQnVmZmVyLmZyb20oJ2VkaXRpb24nKSxcbiAgICAgICAgXSxcbiAgICAgICAgUFJPR1JBTV9JRCxcbiAgICAgICk7XG4gICAgICByZXR1cm4gcHVibGljS2V5O1xuICAgIH07XG5cbiAgICBleHBvcnQgY29uc3QgZ2V0VHJlZUF1dGhvcml0eSA9IChhZGRyZXNzOiBQdWJrZXkpOiBQdWJsaWNLZXkgPT4ge1xuICAgICAgY29uc3QgW3B1YmxpY0tleV0gPSBQdWJsaWNLZXkuZmluZFByb2dyYW1BZGRyZXNzU3luYyhcbiAgICAgICAgW2FkZHJlc3MudG9QdWJsaWNLZXkoKS50b0J1ZmZlcigpXSxcbiAgICAgICAgTVBMX0JVQkJMRUdVTV9QUk9HUkFNX0lELnRvUHVibGljS2V5KCksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGdldEJndW1TaWduZXIgPSAoKTogUH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GEuaW1hZ2UpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAncm95YWx0eSc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnJveWFsdHkpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNSb3lhbHR5KG1ldGFkYXRhLnJveWFsdHkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEuc3ltYm9sKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU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bW8gPSB7XG4gIHNpZzogc3RyaW5nW107XG4gIG1lbW86IHN0cmluZztcbn07XG5cbmV4cG9ydCB0eXBlIFRyYW5zZmVyID0ge1xuICBwYXJzZWQ6IHtcbiAgICBpbmZvOiB7XG4gICAgICBkZXN0aW5hdGlvbjogUHVia2V5O1xuICAgICAgc291cmNlOiBQdWJrZXk7XG4gICAgICBsYW1wb3J0czogbnVtYmVyO1xuICAgIH07XG4gICAgdHlwZTogc3RyaW5nO1xuICB9O1xuICBwcm9ncmFtOiBzdHJpbmc7XG4gIHByb2dyYW1JZD86IFB1YmxpY0tleTtcbn07XG5cbmV4cG9ydCB0eXBlIE1pbnRUbyA9IHtcbiAgcGFyc2VkOiB7XG4gICAgaW5mbzoge1xuICAgICAgYWNjb3VudDogUHVia2V5O1xuICAgICAgbWludDogUHVia2V5O1xuICAgICAgbWludEF1dGhvcml0eTogUHVia2V5O1xuICAgICAgdG9rZW5BbW91bnQ6IHN0cmluZztcbiAgICB9O1xuICAgIHR5cGU6IHN0cmluZztcbiAgfTtcbiAgcHJvZ3JhbTogc3RyaW5nO1xuICBwcm9ncmFtSWQ/OiBQdWJsaWNLZXk7XG59O1xuXG5leHBvcnQgdHlwZSBNaW50VG9DaGVja2VkID0gTWludFRvO1xuXG5leHBvcnQgdHlwZSBUcmFuc2ZlckNoZWNrZWQgPSB7XG4gIHBhcnNlZDoge1xuICAgIGluZm86IHtcbiAgICAgIGRlc3RpbmF0aW9uOiBQdWJrZXk7XG4gICAgICBtaW50OiBQdWJrZXk7XG4gICAgICBtdWx0aXNpZ0F1dGhvcml0eTogUHVia2V5O1xuICAgICAgc2lnbmVyczogUHVia2V5W107XG4gICAgICBzb3VyY2U6IFB1YmtleTtcbiAgICAgIHRva2VuQW1vdW50OiBzdHJpbmc7XG4gICAgfTtcbiAgICB0eXBlOiBzdHJpbmc7XG4gIH07XG4gIHByb2dyYW06IHN0cmluZztcbiAgcHJvZ3JhbUlkPzogUHVibGljS2V5O1xufTtcblxuZXh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aW5zdHJ1Y3Rpb24pID0+IHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgIGlzUGFyc2VkSW5zdHJ1Y3Rpb24oaW5zdHJ1Y3Rpb24pICYmXG4gICAgICAgICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5UcmFuc2Zlci5wcm9ncmFtLmluY2x1ZGVzKFxuICAgICAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24ucHJvZ3JhbSxcbiAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIgPSBpbnN0cnVjdGlvbjtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICApO1xuXG4gICAgICAgICAgICAgICAgLy8gc3BsLXRva2VuIG9yIHN5c3RlbVxuICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIgJiZcbiAgICAgICAgICAgICAgICAgIG1vZHVsZU5hbWUgIT09IGluc3RydWN0aW9uVHJhbnNmZXJbJ3Byb2dyYW0nXVxuICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgZGVidWdMb2coXG4gICAgICAgICAgICAgICAgICAgICcjIEZpbHRlclR5cGUuTWVtbyBicmVhayBpbnN0cnVjdGlvbjogJyxcbiAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlcixcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAvLyBmZXRjaCBtZW1vIG9ubHkgdHJhbnNhY3Rpb25cbiAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLk1lbW8uaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyLFxuICAgICAgICAgICAgICAgICAgcG9zdFRva2VuQWNjb3VudCxcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLk9ubHlNZW1vOiB7XG4gICAgICAgICAgICAgIGlmIChGaWx0ZXJPcHRpb25zLk1lbW8ucHJvZ3JhbS5pbmNsdWRlcyhpbnN0cnVjdGlvbi5wcm9ncmFtKSkge1xuICAgICAgICAgICAgICAgIGxldCBpbnN0cnVjdGlvblRyYW5zZmVyO1xuXG4gICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5NZW1vLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlcixcbiAgICAgICAgICAgICAgICAgIHBvc3RUb2tlbkFjY291bnQsXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5NaW50OiB7XG4gICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLk1pbnQucHJvZ3JhbS5pbmNsdWRlcyhpbnN0cnVjdGlvbi5wcm9ncmFtKSAmJlxuICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuTWludC5hY3Rpb24uaW5jbHVkZXMoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbi5wYXJzZWQudHlwZSBhcyBzdHJpbmcsXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLk1pbnQuaW50b1VzZXJTaWRlKGluc3RydWN0aW9uLCB0eE1ldGEpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLlRyYW5zZmVyOlxuICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgbW9kdWxlTmFtZSA9PT0gaW5zdHJ1Y3Rpb24ucHJvZ3JhbSAmJlxuICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuVHJhbnNmZXIuYWN0aW9uLmluY2x1ZGVzKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24ucGFyc2VkLnR5cGUgYXMgc3RyaW5nLFxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgaWYgKGluc3RydWN0aW9uLnBhcnNlZC50eXBlID09PSAndHJhbnNmZXJDaGVja2VkJykge1xuICAgICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5UcmFuc2ZlckNoZWNrZWQuaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgICBwb3N0VG9rZW5BY2NvdW50LFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5UcmFuc2Zlci5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICApO1xuICAg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Rva2VuQWNjb3VudCEsXG4gICAgICApO1xuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiBSZXRyeSBmdW5jdGlvbiBpZiBjcmVhdGUgbmV3IHRva2VuIGFjY291aW50XG4gICAgICpcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gbWludFxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBvd25lclxuICAgICAqIEBwYXJhbSB7U2VjcmV0fSBmZWVQYXllclxuICAgICAqIEByZXR1cm5zIFByb21pc2U8c3RyaW5nPlxuICAgICAqL1xuICAgIGV4cG9ydCBjb25zdCByZXRyeUdldE9yQ3JlYXRlID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyOiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxzdHJpbmc+ID0+IHtcbiAgICAgIGxldCBjb3VudGVyID0gMTtcbiAgICAgIHdoaWxlIChjb3VudGVyIDwgUkVUUllfT1ZFUl9MSU1JVCkge1xuICAgICAgICB0cnkge1xuICAgICAgICAgIGNvbnN0IGluc3QgPSBhd2FpdCBnZXQobWludCwgb3duZXIsIGZlZVBheWVyLCB0cnVlKTtcblxuICAgICAgICAgIGlmIChpbnN0ICYmIHR5cGVvZiBpbnN0ID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgaW5zdCk7XG4gICAgICAgICAgICByZXR1cm4gaW5zdDtcbiAgICAgICAgICB9IGVsc2UgaWYgKGluc3QgaW5zdGFuY2VvZiBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uKSB7XG4gICAgICAgICAgICAoYXdhaXQgaW5zdC5zdWJtaXQoKSkubWFwKFxuICAgICAgICAgICAgICBhc3luYyAob2s6IHN0cmluZykgPT4ge1xuICAgICAgICAgICAgICAgIGF3YWl0IE5vZGUuY29uZmlybWVkU2lnKG9rKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gaW5zdC5kYXRhO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAoZXJyOiBFcnJvcikgPT4ge1xuICAgICAgICAgICAgICAgIGRlYnVnTG9nKCcjIEVycm9yIHN1Ym1pdCByZXRyeUdldE9yQ3JlYXRlOiAnLCBlcnIpO1xuICAgICAgICAgICAgICAgIHRocm93IGVycjtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgZGVidWdMb2coYCMgcmV0cnk6ICR7Y291bnRlcn0gY3JlYXRlIHRva2VuIGFjY291bnQ6IGAsIGUpO1xuICAgICAgICAgIGRlYnVnTG9nKGAjIG1pbnQ6ICR7bWludH0sIG93bmVyOiAke293bmVyfSwgZmVlUGF5ZXI6ICR7ZmVlUGF5ZXJ9YCk7XG4gICAgICAgIH1cbiAgICAgICAgYXdhaXQgc2xlZXAoUkVUUllfU0xFRVBfVElNRSk7XG4gICAgICAgIGNvdW50ZXIrKztcbiAgICAgIH1cbiAgICAgIHRocm93IEVycm9yKGByZXRyeSBhY3Rpb24gaXMgb3ZlciBsaW1pdCAke1JFVFJZX09WRVJfTElNSVR9YCk7XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIFtNYWluIGxvZ2ljXUdldCBBc3NvY2lhdGVkIHRva2VuIEFjY291bnQuXG4gICAgICogaWYgbm90IGNyZWF0ZWQsIGNyZWF0ZSBuZXcgdG9rZW4gYWNjb3VpbnRcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBtaW50XG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAgICogQHBhcmFtIHtQdWJrZXl9IGZlZVBheWVyXG4gICAgICogQHJldHVybnMgUHJvbWlzZTxzdHJpbmc+XG4gICAgICovXG4gICAgZXhwb3J0IGNvbnN0IG1ha2VPckNyZWF0ZUluc3RydWN0aW9uID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyPzogUHVia2V5LFxuICAgICAgYWxsb3dPd25lck9mZkN1cnZlID0gZmFsc2UsXG4gICAgKTogUHJvbWlzZTx7XG4gICAgICB0b2tlbkFjY291bnQ6IHN0cmluZztcbiAgICAgIGluc3Q6IFRyYW5zYWN0aW9uSW5zdHJ1Y3Rpb24gfCB1bmRlZmluZWQ7XG4gICAgfT4gPT4ge1xuICAgICAgY29uc3QgYXNzb2NpYXRlZFRva2VuQWNjb3VudCA9IGdldEFzc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jKFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSxcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3QsXG4gICAgICAgIH07XG4gICAgICB9XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IEtleXBhaXIgYXMgT3JpZ2luYWwsIFB1YmxpY0tleSB9IGZyb20gJ0Bzb2xhbmEvd2ViMy5qcyc7XG5pbXBvcnQgeyBQdWJrZXksIFNlY3JldCB9IGZyb20gJ34vdHlwZXMvYWNjb3VudCc7XG5pbXBvcnQg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xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIGFkZHJlc3M6IGRhdGEuYWRkcmVzcy50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIHNoYXJlOiBkYXRhLnNoYXJlLFxuICAgICAgICAgIHZlcmlmaWVkOiBmYWxzZSxcbiAgICAgICAgfTtcbiAgICAgIH0pO1xuICAgIH07XG5cbiAgICBleHBvcnQgY29uc3QgaW50b0NvbXByZXNzZWROZnRJbmZyYSA9IChcbiAgICAgIGlucHV0OiBPcHRpb248SW5wdXRDcmVhdG9yc1tdPiB8IHVuZGVmaW5lZCxcbiAgICApOiBJbnRlcm5hbENyZWF0b3JzW10gPT4ge1xuICAgICAgaWYgKCFpbnB1dCkge1xuICAgICAgICByZXR1cm4gW107XG4gICAgICB9XG4gICAgICByZXR1cm4gaW5wdXQhLm1hcCgoZGF0YSkgPT4ge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIGFkZHJlc3M6IGRhdGEuYWRkcmVzcy50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIHNoYXJlOiBkYXRhLnNoYXJlLFxuICAgICAgICAgIHZlcmlmaWVkOiBmYWxzZSxcbiAgICAgICAgfTtcbiAgICAgIH0pO1xuICAgIH07XG5cbiAgICBleHBvcnQgY29uc3QgaW50b1VzZXIgPSAoXG4gICAgICBvdXRwdXQ6IE9wdGlvbjxJbnRlcm5hbENyZWF0b3JzW10+LFxuICAgICk6IENyZWF0b3JzW10gfCB1bmRlZmluZWQgPT4ge1xuICAgICAgaWYgKCFvdXRwdXQpIHtcbiAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG91dHB1dC5tYXAoKGRhdGEpID0+IHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICBhZGRyZXNzOiBkYXRhLmFkZHJlc3MudG9TdHJpbmcoKSxcbiAgICAgICAgICBzaGFyZTogZGF0YS5zaGFyZSxcbiAgICAgICAgICB2ZXJpZ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WN0aW9uLnByb2dyYW0pKSB7XG4gICAgICAgICAgICAgICAgbGV0IGluc3RydWN0aW9uVHJhbnNmZXI7XG5cbiAgICAgICAgICAgICAgICAvLyBmZXRjaCAgdHJhbnNmZXIgdHJhbnNhY3Rpb24gZm9yIHJlbGF0aW9uYWwgbWVtb1xuICAgICAgICAgICAgICAgIHR4TWV0YS50cmFuc2FjdGlvbi5tZXNzYWdlLmluc3RydWN0aW9ucy5mb3JFYWNoKFxuICAgICAgICAgICAgICAgICAgKGluc3RydWN0aW9uKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICBpc1BhcnNlZEluc3RydWN0aW9uKGluc3RydWN0aW9uKSAmJlxuICAgICAgICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuVHJhbnNmZXIucHJvZ3JhbS5pbmNsdWRlcyhcbiAgICAgICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLnByb2dyYW0sXG4gICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyID0gaW5zdHJ1Y3Rpb247XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgKTtcblxuICAgICAgICAgICAgICAgIC8vIHNwbC10b2tlbiBvciBzeXN0ZW1cbiAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyICYmXG4gICAgICAgICAgICAgICAgICBtb2R1bGVOYW1lICE9PSBpbnN0cnVjdGlvblRyYW5zZmVyWydwcm9ncmFtJ11cbiAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgIGRlYnVnTG9nKFxuICAgICAgICAgICAgICAgICAgICAnIyBGaWx0ZXJUeXBlLk1lbW8gYnJlYWsgaW5zdHJ1Y3Rpb246ICcsXG4gICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIsXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgLy8gZmV0Y2ggbWVtbyBvbmx5IHRyYW5zYWN0aW9uXG4gICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5NZW1vLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlcixcbiAgICAgICAgICAgICAgICAgIHBvc3RUb2tlbkFjY291bnQsXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5Pbmx5TWVtbzoge1xuICAgICAgICAgICAgICBpZiAoRmlsdGVyT3B0aW9ucy5NZW1vLnByb2dyYW0uaW5jbHVkZXMoaW5zdHJ1Y3Rpb24ucHJvZ3JhbSkpIHtcbiAgICAgICAgICAgICAgICBsZXQgaW5zdHJ1Y3Rpb25UcmFuc2ZlcjtcblxuICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuTWVtby5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIsXG4gICAgICAgICAgICAgICAgICBwb3N0VG9rZW5BY2NvdW50LFxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXNlIEZpbHRlclR5cGUuTWludDoge1xuICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5NaW50LnByb2dyYW0uaW5jbHVkZXMoaW5zdHJ1Y3Rpb24ucHJvZ3JhbSkgJiZcbiAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLk1pbnQuYWN0aW9uLmluY2x1ZGVzKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24ucGFyc2VkLnR5cGUgYXMgc3RyaW5nLFxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5NaW50LmludG9Vc2VyU2lkZShpbnN0cnVjdGlvbiwgdHhNZXRhKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5UcmFuc2ZlcjpcbiAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgIG1vZHVsZU5hbWUgPT09IGluc3RydWN0aW9uLnByb2dyYW0gJiZcbiAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLlRyYW5zZmVyLmFjdGlvbi5pbmNsdWRlcyhcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLnBhcnNlZC50eXBlIGFzIHN0cmluZyxcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgIGlmIChpbnN0cnVjdGlvbi5wYXJzZWQudHlwZSA9PT0gJ3RyYW5zZmVyQ2hlY2tlZCcpIHtcbiAgICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuVHJhbnNmZXJDaGVja2VkLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICAgIHR4TWV0YS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NZXRhZGF0YSIsICJDb252ZXJ0ZXIiLCAiVHJhbnNmZXJDaGVja2VkIiwgIkNvbnZlcnRlciIsICJUcmFuc2ZlciIsICJDb252ZXJ0ZXIiLCAiVmFsaWRhdG9yIiwgIk1lc3NhZ2UiLCAiQ29udmVydGVyIiwgIk5vZGUiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIkNvbW1vbiIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiVHJhbnNhY3Rpb24iLCAic2VuZEFuZENvbmZpcm1UcmFuc2FjdGlvbiIsICJzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uIiwgIlRyYW5zYWN0aW9uIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJUcmFuc2FjdGlvbiIsICJzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uIiwgIlRyYW5zYWN0aW9uIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJUcmFuc2FjdGlvbiIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgImJzIiwgIk1lbW8iLCAiVHJhbnNhY3Rpb25JbnN0cnVjdGlvbiIsICJTaWduYXR1cmVzIiwgIlRyYW5zYWN0aW9uRmlsdGVyIiwgImluc3RydWN0aW9uIiwgIkNvbnZlcnRlciIsICJNZW1vIiwgIk1lbW8iXQp9Cg== \ No newline at end of file diff --git a/packages/suite-memo/tsconfig.json b/packages/suite-memo/tsconfig.json index 669033bf7..c64e3437e 100644 --- a/packages/suite-memo/tsconfig.json +++ b/packages/suite-memo/tsconfig.json @@ -9,12 +9,15 @@ ], "~/*": [ "../*/src/index.ts" - ], - "~/shared/exports": [ - "../shared/src/exports.ts" ] } }, - "include": ["src/**/*.ts", "test/**/*.ts"], - "exclude": ["node_modules", "dist"] + "include": [ + "src/**/*.ts", + "test/**/*.ts" + ], + "exclude": [ + "node_modules", + "dist" + ] } diff --git a/packages/suite-multisig/dist/index.js b/packages/suite-multisig/dist/index.js index c6faa68e2..d13cb1fd7 100644 --- a/packages/suite-multisig/dist/index.js +++ b/packages/suite-multisig/dist/index.js @@ -39,7 +39,7 @@ var import_web310 = require("@solana/web3.js"); var import_buffer_layout = require("@solana/buffer-layout"); var import_spl_token2 = require("@solana/spl-token"); -// ../shared/src/constants.ts +// ../suite-utils/src/constants.ts var import_web3 = require("@solana/web3.js"); var import_load = __toESM(require("@solana-suite/config/load")); var Config = import_load.default; @@ -315,56 +315,6 @@ var TransactionBuilder; TransactionBuilder7.Common = Common2; })(TransactionBuilder || (TransactionBuilder = {})); -// ../shared/src/shared.ts -var overwriteObject = (object, targets) => { - const that = object; - targets.forEach((target) => { - delete that[target.existsKey]; - that[target.will.key] = target.will.value; - }); - return that; -}; -var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { - if (Constants.isDebugging === "true" || process.env.DEBUG === "true") { - console.log("[DEBUG]", data1, data2, data3, data4); - } -}; -var sleep = async (sec) => { - return new Promise((r) => setTimeout(r, sec * 1e3)); -}; -var isPromise = (obj) => { - return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; -}; -function Try(input, finallyInput) { - try { - const v = input(); - if (isPromise(v)) { - return v.then( - (x) => Result.ok(x), - (err) => Result.err(err) - ); - } else { - return Result.ok(v); - } - } catch (e) { - if (e instanceof Error) { - return Result.err(e); - } - return Result.err(Error(e)); - } finally { - if (finallyInput) { - debugLog("# finally input:", finallyInput); - finallyInput(); - } - } -} -var convertTimestampToDateTime = (created_at) => { - if (created_at) { - return new Date(created_at * 1e3); - } - return; -}; - // ../transaction-builder/src/batch.ts var TransactionBuilder2; ((TransactionBuilder7) => { @@ -819,7 +769,57 @@ var TransactionBuilder6 = { ...TransactionBuilder4 }; -// ../shared/src/result.ts +// ../suite-utils/src/shared.ts +var overwriteObject = (object, targets) => { + const that = object; + targets.forEach((target) => { + delete that[target.existsKey]; + that[target.will.key] = target.will.value; + }); + return that; +}; +var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { + if (Constants.isDebugging === "true" || process.env.DEBUG === "true") { + console.log("[DEBUG]", data1, data2, data3, data4); + } +}; +var sleep = async (sec) => { + return new Promise((r) => setTimeout(r, sec * 1e3)); +}; +var isPromise = (obj) => { + return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; +}; +function Try(input, finallyInput) { + try { + const v = input(); + if (isPromise(v)) { + return v.then( + (x) => Result.ok(x), + (err) => Result.err(err) + ); + } else { + return Result.ok(v); + } + } catch (e) { + if (e instanceof Error) { + return Result.err(e); + } + return Result.err(Error(e)); + } finally { + if (finallyInput) { + debugLog("# finally input:", finallyInput); + finallyInput(); + } + } +} +var convertTimestampToDateTime = (created_at) => { + if (created_at) { + return new Date(created_at * 1e3); + } + return; +}; + +// ../suite-utils/src/result.ts var AbstractResult = class { unwrap(ok, err) { const r = this._chain( @@ -931,15 +931,15 @@ var InternalErr = class extends AbstractResult { } }; var Result; -((Result10) => { +((Result11) => { function ok(value) { return new InternalOk(value); } - Result10.ok = ok; + Result11.ok = ok; function err(error) { return new InternalErr(error || Error()); } - Result10.err = err; + Result11.err = err; function all(obj) { if (Array.isArray(obj)) { const resArr = []; @@ -949,7 +949,7 @@ var Result; } resArr.push(item.value); } - return Result10.ok(resArr); + return Result11.ok(resArr); } const res = {}; const keys = Object.keys(obj); @@ -960,9 +960,9 @@ var Result; } res[key] = item.value; } - return Result10.ok(res); + return Result11.ok(res); } - Result10.all = all; + Result11.all = all; })(Result || (Result = {})); // ../converter/src/collection.ts @@ -1687,4 +1687,4 @@ var Multisig4 = { ...Multisig, ...Multisig2, ...Multisig3 }; 0 && (module.exports = { Multisig }); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uL3NyYy9jcmVhdGUudHMiLCAiLi4vLi4vc2hhcmVkL3NyYy9jb25zdGFudHMudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tY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LnNpZ25lcnMpIHtcbiAgICAgICAgICAgIHRocm93IEVycm9yKFxuICAgICAgICAgICAgICBgb25seSBJbnN0cnVjdGlvbiBvYmplY3QgdGhhdCBjYW4gdXNlIGJhdGNoU3VibWl0KCkuXG4gICAgICAgICAgICBJbmRleDogJHtpfSwgU2V0IHZhbHVlOiAke0pTT04uc3RyaW5naWZ5KGEpfWAsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICBpKys7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBpbnN0cnVjdGlvbnMgPSBhcnIuZmxhdE1hcCgoYSkgPT4gYS5pbnN0cnVjdGlvbnMpO1xuICAgICAgICBjb25zdCBzaWduZXJzID0gYXJyLmZsYXRNYXAoKGEpID0+IGEuc2lnbmVycyk7XG4gICAgICAgIGNvbnN0IGZlZVBheWVycyA9IGFyci5maWx0ZXIoKGEpID0+IGEuZmVlUGF5ZXIgIT09IHVuZGVmaW5lZCk7XG4gICAgICAgIGxldCBmZWVQYXllciA9IHNpZ25lcnNbMF07XG4gICAgICAgIGlmIChmZWVQYXllcnMubGVuZ3RoID4gMCAmJiBmZWVQYXllcnNbMF0uZmVlUGF5ZXIpIHtcbiAgICAgICAgICBmZWVQYXllciA9IGZlZVBheWVyc1swXS5mZWVQYXllcjtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHRyYW5zYWN0aW9uID0gbmV3IFRyYW5zYWN0aW9uKCk7XG4gICAgICAgIGxldCBmaW5hbFNpZ25lcnMgPSBzaWduZXJzO1xuICAgICAgICBpZiAoZmVlUGF5ZXIpIHtcbiAgICAgICAgICB0cmFuc2FjdGlvbi5mZWVQYXllciA9IGZlZVBheWVyLnB1YmxpY0tleTtcbiAgICAgICAgICBmaW5hbFNpZ25lcnMgPSBbZmVlUGF5ZXIsIC4uLnNpZ25lcnNdO1xuICAgICAgICB9XG4gICAgICAgIGluc3RydWN0aW9ucy5tYXAoKGluc3QpID0+IHRyYW5zYWN0aW9u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XQgY291bnRlciA9IDE7XG4gICAgICB3aGlsZSAoY291bnRlciA8IFJFVFJZX09WRVJfTElNSVQpIHtcbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICBjb25zdCBpbnN0ID0gYXdhaXQgZ2V0KG1pbnQsIG93bmVyLCBmZWVQYXllciwgdHJ1ZSk7XG5cbiAgICAgICAgICBpZiAoaW5zdCAmJiB0eXBlb2YgaW5zdCA9PT0gJ3N0cmluZycpIHtcbiAgICAgICAgICAgIGRlYnVnTG9nKCcjIGFzc29jaWF0ZWRUb2tlbkFjY291bnQ6ICcsIGluc3QpO1xuICAgICAgICAgICAgcmV0dXJuIGluc3Q7XG4gICAgICAgICAgfSBlbHNlIGlmIChpbnN0IGluc3RhbmNlb2YgVHJhbnNhY3Rpb25CdWlsZGVyLkNvbW1vbikge1xuICAgICAgICAgICAgKGF3YWl0IGluc3Quc3VibWl0KCkpLm1hcChcbiAgICAgICAgICAgICAgYXN5bmMgKG9rOiBzdHJpbmcpID0+IHtcbiAgICAgICAgICAgICAgICBhd2FpdCBOb2RlLmNvbmZpcm1lZFNpZyhvayk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGluc3QuZGF0YTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgKGVycjogRXJyb3IpID0+IHtcbiAgICAgICAgICAgICAgICBkZWJ1Z0xvZygnIyBFcnJvciBzdWJtaXQgcmV0cnlHZXRPckNyZWF0ZTogJywgZXJyKTtcbiAgICAgICAgICAgICAgICB0aHJvdyBlcnI7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgIGRlYnVnTG9nKGAjIHJldHJ5OiAke2NvdW50ZXJ9IGNyZWF0ZSB0b2tlbiBhY2NvdW50OiBgLCBlKTtcbiAgICAgICAgICBkZWJ1Z0xvZyhgIyBtaW50OiAke21pbnR9LCBvd25lcjogJHtvd25lcn0sIGZlZVBheWVyOiAke2ZlZVBheWVyfWApO1xuICAgICAgICB9XG4gICAgICAgIGF3YWl0IHNsZWVwKFJFVFJZX1NMRUVQX1RJTUUpO1xuICAgICAgICBjb3VudGVyKys7XG4gICAgICB9XG4gICAgICB0aHJvdyBFcnJvcihgcmV0cnkgYWN0aW9uIGlzIG92ZXIgbGltaXQgJHtSRVRSWV9PVkVSX0xJTUlUfWApO1xuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiBbTWFpbiBsb2dpY11HZXQgQXNzb2NpYXRlZCB0b2tlbiBBY2NvdW50LlxuICAgICAqIGlmIG5vdCBjcmVhdGVkLCBjcmVhdGUgbmV3IHRva2VuIGFjY291aW50XG4gICAgICpcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gbWludFxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBvd25lclxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBmZWVQYXllclxuICAgICAqIEByZXR1cm5zIFByb21pc2U8c3RyaW5nPlxuICAgICAqL1xuICAgIGV4cG9ydCBjb25zdCBtYWtlT3JDcmVhdGVJbnN0cnVjdGlvbiA9IGFzeW5jIChcbiAgICAgIG1pbnQ6IFB1YmtleSxcbiAgICAgIG93bmVyOiBQdWJrZXksXG4gICAgICBmZWVQYXllcj86IFB1YmtleSxcbiAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSA9IGZhbHNlLFxuICAgICk6IFByb21pc2U8e1xuICAgICAgdG9rZW5BY2NvdW50OiBzdHJpbmc7XG4gICAgICBpbnN0OiBUcmFuc2FjdGlvbkluc3RydWN0aW9uIHwgdW5kZWZpbmVkO1xuICAgIH0+ID0+IHtcbiAgICAgIGNvbnN0IGFzc29jaWF0ZWRUb2tlbkFjY291bnQgPSBnZXRBc3NvY2lhdGVkVG9rZW5BZGRyZXNzU3luYyhcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICBhbGxvd093bmVyT2ZmQ3VydmUsXG4gICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGFzc29jaWF0ZWRUb2tlbkFjY291bnQ6ICcsIGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSk7XG5cbiAgICAgIHRyeSB7XG4gICAgICAgIC8vIERvbnQgdXNlIFJlc3VsdFxuICAgICAgICBhd2FpdCBnZXRBY2NvdW50KFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCkuY29tbWl0bWVudCxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3Q6IHVuZGVmaW5lZCxcbiAgICAgICAgfTtcbiAgICAgIH0gY2F0Y2ggKGVycm9yOiB1bmtub3duKSB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5BY2NvdW50Tm90Rm91bmRFcnJvcikgJiZcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5JbnZhbGlkQWNjb3VudE93bmVyRXJyb3IpXG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9yKCdVbmV4cGVjdGVkIGVycm9yJyk7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBwYXllciA9ICFmZWVQYXllciA/IG93bmVyIDogZmVlUGF5ZXI7XG5cbiAgICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFj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QnO1xuaW1wb3J0IHsgSW50ZXJuYWxDcmVhdG9ycyB9IGZyb20gJ34vdHlwZXMvY29udmVydGVyJztcblxuZXhwb3J0IG5hbWVzcGFjZSBDb252ZXJ0ZXIge1xuICBleHBvcnQgbmFtZXNwYWNlIENyZWF0b3JzIHtcbiAgICBleHBvcnQgY29uc3QgaW50b0luZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IE9wdGlvbjxJbnRlcm5hbENyZWF0b3JzW10+ID0+IHtcbiAgICAgIGlmICghaW5wdXQpIHtcbiAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICB9XG4gICAgICByZXR1cm4gaW5wdXQubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvQ29tcHJlc3NlZE5mdEluZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IEludGVybmFsQ3JlYXRvcnNbXSA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBbXTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBpbnB1dCEubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICA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RvcmFnZU1ldGFwbGV4IHwgUGlja01ldGFwbGV4LFxuICA+KFxuICAgIG1ldGFkYXRhOiBULFxuICApOiBSZXN1bHQ8c3RyaW5nLCBWYWxpZGF0b3JFcnJvcj4gPT4ge1xuICAgIHJldHVybiBUcnkoKCkgPT4ge1xuICAgICAgY29uc3Qga2V5cyA9IE9iamVjdC5rZXlzKG1ldGFkYXRhKTtcbiAgICAgIGNvbnN0IHJlc3VsdHM6IERldGFpbHNbXSA9IFtdO1xuICAgICAga2V5cy5tYXAoKGtleSkgPT4ge1xuICAgICAgICBsZXQgcmVzITogUmVzdWx0PHN0cmluZywgVmFsaWRhdG9yRXJyb3I+O1xuICAgICAgICBzd2l0Y2ggKGtleSkge1xuICAgICAgICAgIGNhc2UgJ2ltYWdlJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuaW1hZ2UpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNJbWFnZVVybChtZXRhZGF0YS5pbWFnZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdyb3lhbHR5JzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEucm95YWx0eSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1JveWFsdHkobWV0YWRhdGEucm95YWx0eSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAg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c2lnSW5zdHJ1Y3Rpb24iLCAiaW1wb3J0X3NwbF90b2tlbiIsICJpbXBvcnRfd2ViMyIsICJNdWx0aXNpZyIsICJNdWx0aXNpZyIsICJNdWx0aXNpZyJdCn0K \ No newline at end of file +//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uL3NyYy9jcmVhdGUudHMiLCAiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9iYXRjaC50cyIsICIuLi8uLi9ub2RlL3NyYy9pbmRleC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jb21tb24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvbWludC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9wYXJ0aWFsLXNpZ24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY2FsY3VsYXRlLXR4c2l6ZS50cyIsICIuLi8uLi9nbG9iYWwvc3JjL2luZGV4LnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2Fzc29jaWF0ZWQudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMva2V5cGFpci50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9wZGEudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvaW5kZXgudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvaW5kZXgudHMiLCAiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL3NoYXJlZC50cyIsICIuLi8uLi9zdWl0ZS11dGlscy9zcmMvcmVzdWx0LnRzIiwgIi4uLy4uL2NvbnZlcnRlci9zcmMvY29sbGVjdGlvbi50cyIsICIuLi8uLi9jb252ZXJ0ZXIvc3JjL2NyZWF0b3JzL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PSBhc3luYyAoXG4gICAgICBhcnI6IENvbW1vbi5Db21tb25bXSB8IE1pbnQuTWludFtdLFxuICAgICk6IFByb21pc2U8UmVzdWx0PFRyYW5zYWN0aW9uU2lnbmF0dXJlLCBFcnJvcj4+ID0+IHtcbiAgICAgIHJldHVybiBUcnkoYXN5bmMgKCkgPT4ge1xuICAgICAgICBsZXQgaSA9IDA7XG4gICAgICAgIGZvciAoY29uc3QgYSBvZiBhcnIpIHtcbiAgICAgICAgICBpZiAoIWEuaW5zdHJ1Y3Rpb25zICYmICFhLnNpZ25lcnMpIHtcbiAgICAgICAgICAgIHRocm93IEVycm9yKFxuICAgICAgICAgICAgICBgb25seSBJbnN0cnVjdGlvbiBvYmplY3QgdGhhdCBjYW4gdXNlIGJhdGNoU3VibWl0KCkuXG4gICAgICAgICAgICBJbmRleDogJHtpfSwgU2V0IHZhbHVlOiAke0pTT04uc3RyaW5naWZ5KGEpfWAsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICBpKys7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBpbnN0cnVjdGlvbnMgPSBhcnIuZmxhdE1hcCgoYSkgPT4gYS5pbnN0cnVjdGlvbnMpO1xuICAgICAgICBjb25zdCBzaWduZXJzID0gYXJyLmZsYXRNYXAoKGEpID0+IGEuc2lnbmVycyk7XG4gICAgICAgIGNvbnN0IGZlZVBheWVycyA9IGFyci5maWx0ZXIoKGEpID0+IGEuZmVlUGF5ZXIgIT09IHVuZGVmaW5lZCk7XG4gICAgICAgIGxldCBmZWVQYXllciA9IHNpZ25lcnNbMF07XG4gICAgICAgIGlmIChmZWVQYXllcnMubGVuZ3RoID4gMCAmJiBmZWVQYXllcnNbMF0uZmVlUGF5ZXIpIHtcbiAgICAgICAgICBmZWVQYXllciA9IGZlZVBheWVyc1swXS5mZWVQYXllcjtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHRyYW5zYWN0aW9uID0gbmV3IFRyYW5zYWN0a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YmxvY2toYXNoT2JqLmJsb2NraGFzaDtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHRoaXMuc2lnbmVycztcblxuICAgICAgICBpZiAodGhpcy5mZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gdGhpcy5mZWVQYXllci5wdWJsaWNLZXk7XG4gICAgICAgICAgZmluYWxTaWduZXJzID0gW3RoaXMuZmVlUGF5ZXIsIC4uLnRoaXMuc2lnbmVyc107XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLmluc3RydWN0aW9ucy5mb3JFYWNoKChpbnN0KSA9PiB0cmFuc2FjdGlvbi5hZGQoaW5zdCkpO1xuXG4gICAgICAgIGNvbnN0IG9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IE1BWF9SRVRSSUVTLFxuICAgICAgICB9O1xuXG4gICAgICAgIGlmIChOb2RlLmdldENvbm5lY3Rpb24oKS5ycGNFbmRwb2ludCA9PT0gQ29uc3RhbnRzLkVuZFBvaW50VXJsLnByZCkge1xuICAgICAgICAgIGRlYnVnTG9nKCcjIENoYW5nZSBtZXRhcGxleCBjbHVzdGVyIG9uIG1haW5uZXQtYmV0YScpO1xuICAgICAgICAgIE5vZGUuY2hhbmdlQ29ubmVjdGlvbih7IGNsdXN0ZXI6IENvbnN0YW50cy5DbHVzdGVyLnByZE1ldGFwbGV4IH0pO1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgIG9wdGlvbnMsXG4gICAgICAgICk7XG4gICAgICB9KTtcbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHtcbiAgQ29uZmlybU9wd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d25lcixcbiAgICAgICAgbmV3IEtleXBhaXIuS2V5cGFpcih7IHNlY3JldDogZmVlUGF5ZXIgfSkucHVia2V5LFxuICAgICAgICBhbGxvd093bmVyT2ZmQ3VydmUsXG4gICAgICApO1xuXG4gICAgICBpZiAoIXJlcy5pbnN0KSB7XG4gICAgICAgIHJldHVybiByZXMudG9rZW5BY2NvdW50O1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb248UHVia2V5PihcbiAgICAgICAgW3Jlcy5pbnN0XSxcbiAgICAgICAgW10sXG4gICAgICAgIGZlZVBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICByZXMudG9rZW5BY2NvdW50ISxcbiAgICAgICk7XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIFJldHJ5IGZ1bmN0aW9uIGlmIGNyZWF0ZSBuZXcgdG9rZW4gYWNjb3VpbnRcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBtaW50XG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAgICogQHBhcmFtIHtTZWNyZXR9IGZlZVBheWVyXG4gICAgICogQHJldHVybnMgUHJvbWlzZTxzdHJpbmc+XG4gICAgICovXG4gICAgZXhwb3J0IGNvbnN0IHJldHJ5R2V0T3JDcmVhdGUgPSBhc3luYyAoXG4gICAgICBtaW50OiBQdWJrZXksXG4gICAgICBvd25lcjogUHVia2V5LFxuICAgICAgZmVlUGF5ZXI6IFNlY3JldCxcbiAgICApOiBQcm9taXNlPHN0cmluZz4gPT4ge1xuICAgICAgbGV0IGNvdW50ZXIgPSAxO1xuICAgICAgd2hpbGUgKGNvdW50ZXIgPCBSRVRSWV9PVkVSX0xJTUlUKSB7XG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgY29uc3QgaW5zdCA9IGF3YWl0IGdldChtaW50LCBvd25lciwgZmVlUGF5ZXIsIHRydWUpO1xuXG4gICAgICAgICAgaWYgKGluc3QgJiYgdHlwZW9mIGluc3QgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICBkZWJ1Z0xvZygnIyBhc3NvY2lhdGVkVG9rZW5BY2NvdW50OiAnLCBpbnN0KTtcbiAgICAgICAgICAgIHJldHVybiBpbnN0O1xuICAgICAgICAgIH0gZWxzZSBpZiAoaW5zdCBpbnN0YW5jZW9mIFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb24pIHtcbiAgICAgICAgICAgIChhd2FpdCBpbnN0LnN1Ym1pdCgpKS5tYXAoXG4gICAgICAgICAgICAgIGFzeW5jIChvazogc3RyaW5nKSA9PiB7XG4gICAgICAgICAgICAgICAgYXdhaXQgTm9kZS5jb25maXJtZWRTaWcob2spO1xuICAgICAgICAgICAgICAgIHJldHVybiBpbnN0LmRhdGE7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIChlcnI6IEVycm9yKSA9PiB7XG4gICAgICAgICAgICAgICAgZGVidWdMb2coJyMgRXJyb3Igc3VibWl0IHJldHJ5R2V0T3JDcmVhdGU6ICcsIGVycik7XG4gICAgICAgICAgICAgICAgdGhyb3cgZXJyO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICBkZWJ1Z0xvZyhgIyByZXRyeTogJHtjb3VudGVyfSBjcmVhdGUgdG9rZW4gYWNjb3VudDogYCwgZSk7XG4gICAgICAgICAgZGVidWdMb2coYCMgbWludDogJHttaW50fSwgb3duZXI6ICR7b3duZXJ9LCBmZWVQYXllcjogJHtmZWVQYXllcn1gKTtcbiAgICAgICAgfVxuICAgICAgICBhd2FpdCBzbGVlcChSRVRSWV9TTEVFUF9USU1FKTtcbiAgICAgICAgY291bnRlcisrO1xuICAgICAgfVxuICAgICAgdGhyb3cgRXJyb3IoYHJldHJ5IGFjdGlvbiBpcyBvdmVyIGxpbWl0ICR7UkVUUllfT1ZFUl9MS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W5BY2NvdW50LnRvU3RyaW5nKCkpO1xuXG4gICAgICB0cnkge1xuICAgICAgICAvLyBEb250IHVzZSBSZXN1bHRcbiAgICAgICAgYXdhaXQgZ2V0QWNjb3VudChcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLmNvbW1pdG1lbnQsXG4gICAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICB0b2tlbkFjY291bnQ6IGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSxcbiAgICAgICAgICBpbnN0OiB1bmRlZmluZWQsXG4gICAgICAgIH07XG4gICAgICB9IGNhdGNoIChlcnJvcjogdW5rbm93bikge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuQWNjb3VudE5vdEZvdW5kRXJyb3IpICYmXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuSW52YWxpZEFjY291bnRPd25lckVycm9yKVxuICAgICAgICApIHtcbiAgICAgICAgICB0aHJvdyBFcnJvcignVW5leHBlY3RlZCBlcnJvcicpO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgcGF5ZXIgPSAhZmVlUGF5ZXIgPyBvd25lciA6IGZlZVBheWVyO1xuXG4gICAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVBc3NvY2lhdGVkVG9rZW5BY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgcGF5ZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICA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W5BY2NvdW50KSB7XG4gICAgICAgIGNvbnN0IGZvdW5kU291cmNlID0gbWFwcGluZ1Rva2VuQWNjb3VudC5maW5kKFxuICAgICAgICAgIChtKSA9PiBtLmFjY291bnQgPT09IG91dHB1dC5wYXJzZWQuaW5mby5zb3VyY2UsXG4gICAgICAgICk7XG4gICAgICAgIGNvbnN0IGZvdW5kRGVzdCA9IG1hcHBpbmdUb2tlbkFjY291bnQuZmluZChcbiAgICAgICAgICAobSkgPT4gbS5hY2NvdW50ID09PSBvdXRwdXQucGFyc2VkLmluZm8uZGVzdGluYXRpb24sXG4gICAgICAgICk7XG4gICAgICAgIGZvdW5kU291cmNlICYmIChoaXN0b3J5LnNvdXJjZSA9IGZvdW5kU291cmNlLm93bmVyKTtcbiAgICAgICAgZm91bmREZXN0ICYmIChoaXN0b3J5LmRlc3RpbmF0aW9uID0gZm91bmREZXN0Lm93bmVyKTtcbiAgICAgIH1cblxuICAgICAgaGlzdG9yeS50b2tlbkFtb3VudCA9IG91dHB1dC5wYXJzZWQuaW5mby50b2tlbkFtb3VudDtcbiAgICAgIGhpc3RvcnkubWludCA9IG91dHB1dC5wYXJzZWQuaW5mby5taW50O1xuICAgICAgaGlzdG9yeS5tdWx0aXNpZ0F1dGhvcml0eSA9IG91dHB1dC5wYXJzZWQuaW5mby5tdWx0aXNpZ0F1dGhvcml0eTtcbiAgICAgIGhpc3Rvcnkuc2lnbmVycyA9IG91dHB1dC5wYXJzZWQuaW5mby5zaWduZXJzO1xuICAgICAgaGlzdG9yeS50eXBlID0gb3V0cHV0LnByb2dyYW07XG4gICAgICBoaXN0b3J5LmRhdGVUaW1lID0gY29udmVydFRpbWVzdGFtcFRvRGF0ZVRpbWUobWV0YS5ibG9ja1RpbWUgYXMgbnVtYmVyKTtcbiAgICAgIGhpc3Rvcnkuc2lnID0gbWV0YS50cmFuc2FjdGlvbi5zaWduYXR1cmVzWzBdO1xuICAgICAgaGlzdG9yeS5pbm5lckluc3RydWN0aW9uID0gZmFs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AgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEucm95YWx0eSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1JveWFsdHkobWV0YWRhdGEucm95YWx0eSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ25hbWUnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLm5hbWUpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNOYW1lKG1ldGFkYXRhLm5hbWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc3ltYm9sJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5zeW1ib2wpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTeW1ib2wobWV0YWRhdGEuc3ltYm9sKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgICAgIGlmIChyZXMg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G9ycyIsICJDb252ZXJ0ZXIiLCAiQ29tcHJlc3NlZE5mdE1ldGFkYXRhIiwgIkNvbnZlcnRlciIsICJSb3lhbHR5IiwgIkNvbnZlcnRlciIsICJOZnQiLCAiQ29udmVydGVyIiwgIk1lbW8iLCAiQ29udmVydGVyIiwgIk1pbnQiLCAiQ29udmVydGVyIiwgIlJlZ3VsYXJOZnRNZXRhZGF0YSIsICJDb252ZXJ0ZXIiLCAiUHJvcGVydGllcyIsICJDb252ZXJ0ZXIiLCAiVXNlcyIsICJDb252ZXJ0ZXIiLCAiVG9rZW5NZXRhZGF0YSIsICJDb252ZXJ0ZXIiLCAiVHJhbnNmZXJDaGVja2VkIiwgIkNvbnZlcnRlciIsICJUcmFuc2ZlciIsICJDb252ZXJ0ZXIiLCAiVmFsaWRhdG9yIiwgIk1lc3NhZ2UiLCAiQ29udmVydGVyIiwgIk11bHRpc2lnIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJNdWx0aXNpZ0luc3RydWN0aW9uIiwgImltcG9ydF9zcGxfdG9rZW4iLCAiaW1wb3J0X3dlYjMiLCAiTXVsdGlzaWciLCAiTXVsdGlzaWciLCAiTXVsdGlzaWciXQp9Cg== \ No newline at end of file diff --git a/packages/suite-multisig/dist/index.mjs b/packages/suite-multisig/dist/index.mjs index 73b6abc7d..ff1ed2baf 100644 --- a/packages/suite-multisig/dist/index.mjs +++ b/packages/suite-multisig/dist/index.mjs @@ -8,7 +8,7 @@ import { import { blob, struct, u8 } from "@solana/buffer-layout"; import { TOKEN_PROGRAM_ID as TOKEN_PROGRAM_ID2 } from "@solana/spl-token"; -// ../shared/src/constants.ts +// ../suite-utils/src/constants.ts import { PublicKey } from "@solana/web3.js"; import SolanaJsonConfig from "@solana-suite/config/load"; var Config = SolanaJsonConfig; @@ -290,56 +290,6 @@ var TransactionBuilder; TransactionBuilder7.Common = Common2; })(TransactionBuilder || (TransactionBuilder = {})); -// ../shared/src/shared.ts -var overwriteObject = (object, targets) => { - const that = object; - targets.forEach((target) => { - delete that[target.existsKey]; - that[target.will.key] = target.will.value; - }); - return that; -}; -var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { - if (Constants.isDebugging === "true" || process.env.DEBUG === "true") { - console.log("[DEBUG]", data1, data2, data3, data4); - } -}; -var sleep = async (sec) => { - return new Promise((r) => setTimeout(r, sec * 1e3)); -}; -var isPromise = (obj) => { - return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; -}; -function Try(input, finallyInput) { - try { - const v = input(); - if (isPromise(v)) { - return v.then( - (x) => Result.ok(x), - (err) => Result.err(err) - ); - } else { - return Result.ok(v); - } - } catch (e) { - if (e instanceof Error) { - return Result.err(e); - } - return Result.err(Error(e)); - } finally { - if (finallyInput) { - debugLog("# finally input:", finallyInput); - finallyInput(); - } - } -} -var convertTimestampToDateTime = (created_at) => { - if (created_at) { - return new Date(created_at * 1e3); - } - return; -}; - // ../transaction-builder/src/batch.ts var TransactionBuilder2; ((TransactionBuilder7) => { @@ -807,7 +757,57 @@ var TransactionBuilder6 = { ...TransactionBuilder4 }; -// ../shared/src/result.ts +// ../suite-utils/src/shared.ts +var overwriteObject = (object, targets) => { + const that = object; + targets.forEach((target) => { + delete that[target.existsKey]; + that[target.will.key] = target.will.value; + }); + return that; +}; +var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { + if (Constants.isDebugging === "true" || process.env.DEBUG === "true") { + console.log("[DEBUG]", data1, data2, data3, data4); + } +}; +var sleep = async (sec) => { + return new Promise((r) => setTimeout(r, sec * 1e3)); +}; +var isPromise = (obj) => { + return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; +}; +function Try(input, finallyInput) { + try { + const v = input(); + if (isPromise(v)) { + return v.then( + (x) => Result.ok(x), + (err) => Result.err(err) + ); + } else { + return Result.ok(v); + } + } catch (e) { + if (e instanceof Error) { + return Result.err(e); + } + return Result.err(Error(e)); + } finally { + if (finallyInput) { + debugLog("# finally input:", finallyInput); + finallyInput(); + } + } +} +var convertTimestampToDateTime = (created_at) => { + if (created_at) { + return new Date(created_at * 1e3); + } + return; +}; + +// ../suite-utils/src/result.ts var AbstractResult = class { unwrap(ok, err) { const r = this._chain( @@ -919,15 +919,15 @@ var InternalErr = class extends AbstractResult { } }; var Result; -((Result10) => { +((Result11) => { function ok(value) { return new InternalOk(value); } - Result10.ok = ok; + Result11.ok = ok; function err(error) { return new InternalErr(error || Error()); } - Result10.err = err; + Result11.err = err; function all(obj) { if (Array.isArray(obj)) { const resArr = []; @@ -937,7 +937,7 @@ var Result; } resArr.push(item.value); } - return Result10.ok(resArr); + return Result11.ok(resArr); } const res = {}; const keys = Object.keys(obj); @@ -948,9 +948,9 @@ var Result; } res[key] = item.value; } - return Result10.ok(res); + return Result11.ok(res); } - Result10.all = all; + Result11.all = all; })(Result || (Result = {})); // ../converter/src/collection.ts @@ -1677,4 +1677,4 @@ var Multisig4 = { ...Multisig, ...Multisig2, ...Multisig3 }; export { Multisig4 as Multisig }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2NyZWF0ZS50cyIsICIuLi8uLi9zaGFyZWQvc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9iYXRjaC50cyIsICIuLi8uLi9ub2RlL3NyYy9pbmRleC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jb21tb24udHMiLCAiLi4vLi4vc2hhcmVkL3NyYy9zaGFyZWQudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvbWludC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9wYXJ0aWFsLXNpZ24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY2FsY3VsYXRlLXR4c2l6ZS50cyIsICIuLi8uLi9nbG9iYWwvc3JjL2luZGV4Ln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OX1BST0dSQU1fSUQsXG4gICAgfSk7XG4gIH07XG5cbiAgZXhwb3J0IGNvbnN0IG11bHRpc2lnID0gKFxuICAgIG06IG51bWJlcixcbiAgICBmZWVQYXllcjogS2V5cGFpcixcbiAgICBzaWduZXJQdWJrZXk6IFB1YmxpY0tleVtdLFxuICApOiBUcmFuc2FjdGlvbkluc3RydWN0aW9uID0+IHtcbiAgICBjb25zdCBrZXlzID0gW1xuICAgICAge1xuICAgICAgICBwdWJrZXk6IGZlZVBheWVyLnB1YmxpY0tleSxcbiAgICAgICAgaXNTaWduZXI6IGZhbHNlLFxuICAgICAgICBpc1dyaXRhYmxlOiB0cnVlLFxuICAgICAgfSxcbiAgICAgIHtcbiAgICAgICAgcHVia2V5OiBTWVNWQVJfUkVOVF9QVUJLRVksXG4gICAgICAgIGlzU2lnbmVyOiBmYWxzZSxcbiAgICAgICAgaXNXcml0YWJsZTogZmFsc2UsXG4gICAgICB9LFxuICAgIF07XG4gICAgc2lnbmVyUHVia2V5LmZvckVhY2goKHB1YmtleSkgPT5cbiAgICAgIGtleXMucHVzaCh7XG4gICAgICAgIHB1YmtleSxcbiAgICAgICAgaXNTaWduZXI6IGZhbHNlLFxuICAgICAgICBpc1dyaXRhYmxlOiBmYWxzZSxcbiAgICAgIH0pLFxuICAgICk7XG5cbiAgICBjb25zdCBkYXRhTGF5b3V0ID0gc3RydWN0PHsgaW5zdHJ1Y3Rpb246IG51bWJlcjsgbTogbnVtYmVyIH0+KFtcbiAgICAgIHU4KCdpbnN0cnVjdGlvbicpLFxuICAgICAgdTgoJ20nKSxcbiAgICBdKTtcblxuICAgIGNvbnN0IGRhdGEgPSBCdWZmZXIuYWxsb2MoZGF0YUxheW91dC5zcGFuKTtcblxuICAgIGRhdGFMYXlvdXQuZW5jb2RlKFxuICAgICAge1xuICAgICAgICBpbnN0cnVjdGlvbjogMixcbiAgICAgICAgbSxcbiAgICAgIH0sXG4gICAgICBkYXRhLFxuICAgICk7XG5cbiAgICByZXR1cm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GE7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIChlcnI6IEVycm9yKSA9PiB7XG4gICAgICAgICAgICAgICAgZGVidWdMb2coJyMgRXJyb3Igc3VibWl0IHJldHJ5R2V0T3JDcmVhdGU6ICcsIGVycik7XG4gICAgICAgICAgICAgICAgdGhyb3cgZXJyO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICBkZWJ1Z0xvZyhgIyByZXRyeTogJHtjb3VudGVyfSBjcmVhdGUgdG9rZW4gYWNjb3VudDogYCwgZSk7XG4gICAgICAgICAgZGVidWdMb2coYCMgbWludDogJHttaW50fSwgb3duZXI6ICR7b3duZXJ9LCBmZWVQYXllcjogJHtmZWVQYXllcn1gKTtcbiAgICAgICAgfVxuICAgICAgICBhd2FpdCBzbGVlcChSRVRSWV9TTEVFUF9USU1FKTtcbiAgICAgICAgY291bnRlcisrO1xuICAgICAgfVxuICAgICAgdGhyb3cgRXJyb3IoYHJldHJ5IGFjdGlvbiBpcyBvdmVyIGxpbWl0ICR7UkVUUllfT1ZFUl9MSU1JVH1gKTtcbiAgICB9O1xuXG4gICAgLyoqXG4gICAgICogW01haW4gbG9naWNdR2V0IEFzc29jaWF0ZWQgdG9rZW4gQWNjb3VudC5cbiAgICAgKiBpZiBub3QgY3JlYXRlZCwgY3JlYXRlIG5ldyB0b2tlbiBhY2NvdWludFxuICAgICAqXG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG1pbnRcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gb3duZXJcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gZmVlUGF5ZXJcbiAgICAgKiBAcmV0dXJucyBQcm9taXNlPHN0cmluZz5cbiAgICAgKi9cbiAgICBleHBvcnQgY29uc3QgbWFrZU9yQ3JlYXRlSW5zdHJ1Y3Rpb24gPSBhc3luYyAoXG4gICAgICBtaW50Oi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bmRlZmluZWQsXG4gICAgICAgIH07XG4gICAgICB9IGNhdGNoIChlcnJvcjogdW5rbm93bikge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuQWNjb3VudE5vdEZvdW5kRXJyb3IpICYmXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuSW52YWxpZEFjY291bnRPd25lckVycm9yKVxuICAgICAgICApIHtcbiAgICAgICAgICB0aHJvdyBFcnJvcignVW5leHBlY3RlZCBlcnJvcicpO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgcGF5ZXIgPSAhZmVlUGF5ZXIgPyBvd25lciA6IGZlZVBheWVyO1xuXG4gICAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVBc3NvY2lhdGVkVG9rZW5BY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgcGF5ZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdCxcbiAgICAgICAgfTtcbiAgICAgIH1cbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHsgS2V5cGFpciBhcyBPcmlnaW5hbCwgUHVibGljS2V5IH0gZnJvbSAnQHNvbGFuYS93ZWIzLmpzJztcbmltcG9ydCB7IFB1YmtleSwgU2VjcmV0IH0gZnJvbSAnfi90eXBlcy9hY2NvdW50JztcbmltcG9ydCBic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koKS50b0J1ZmZlcigpXSxcbiAgICAgICAgTVBMX0JVQkJMRUdVTV9QUk9HUkFNX0lELnRvUHVibGljS2V5KCksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGdldEJndW1TaWduZXIgPSAoKTogUHVibGljS2V5ID0+IHtcbiAgICAgIGNvbnN0IFtwdWJsaWNLZXldID0gUHVibGljS2V5LmZpbmRQcm9ncmFtQWRkcmVzc1N5bmMoXG4gICAgICAgIFtCdWZmZXIuZnJvbSgnY29sbGVjdGlvbl9jcGknLCAndXRmOCcpXSxcbiAgICAgICAgTVBMX0JVQkJMRUdVTV9QUk9HUkFNX0lELnRvUHVibGljS2V5KCksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGdldEFzc2V0SWQgPSAoYWRkcmVzczogUHVia2V5LCBsZWFmSW5kZXg6IG51bWJlcik6IFB1YmtleSA9PiB7XG4gICAgICBjb25zdCBub2RlID0gbmV3IEJOLkJOKGxlYWZJbmRleCk7XG4gICAgICBjb25zdCBbYXNzZXRJZF0gPSBQdWJsaWNLZXkuZmluZFByb2dyYW1BZGRyZXNzU3luYyhcbiAgICAgICAgW1xuICAgICAgICAgIEJ1ZmZlci5mcm9tKCdhc3NldCcsICd1dGY4JyksXG4gICAgICAgICAgYWRkcmVzcy50b1B1YmxpY0tleSgpLnRvQnVmZmVyKCksXG4gICAgICAgICAgVWludDhBcnJheS5mcm9tKG5vZGUudG9BcnJheSgnbGUnLCA4KSksXG4gICAgICAgIF0sXG4gICAgICAgIE1QTF9CVUJCTEVHVU1fUFJPR1JBTV9JRC50b1B1YmxpY0tleSgpLFxuICAgICAgKTtcbiAgICAgIHJldHVybiBhc3NldElkLnRvU3RyaW5nKCk7XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IEFjY291bnQgYXMgQXN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gICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAncm95YWx0eSc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnJveWFsdHkpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNSb3lhbHR5KG1ldGFkYXRhLnJveWFsdHkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEuc3ltYm9sKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU3ltYm9sKG1ldGFkYXR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biAgKTogbnVtYmVyID0+IHtcbiAgICBjb25zdCBmZWVQYXllclBrID0gW2ZlZVBheWVyLnRvQmFzZTU4KCldO1xuXG4gICAgY29uc3Qgc2lnbmVycyA9IG5ldyBTZXQ8c3RyaW5nPihmZWVQYXllclBrKTtcbiAgICBjb25zdCBhY2NvdW50cyA9IG5ldyBTZXQ8c3RyaW5nPihmZWVQYXllclBrKTtcblxuICAgIGNvbnN0IGl4c1NpemUgPSB0cmFuc2FjdGlvbi5pbnN0cnVjdGlvbnMucmVkdWNlKChhY2MsIGl4KSA9PiB7XG4gICAgICBpeC5rZXlzLmZvckVhY2goKHsgcHVia2V5LCBpc1NpZ25lciB9KSA9PiB7XG4gICAgICAgIGNvbnN0IHBrID0gcHVia2V5LnRvQmFzZTU4KCk7XG4gICAgICAgIGlmIChpc1NpZ25lcikgc2lnbmVycy5hZGQocGspO1xuICAgICAgICBhY2NvdW50cy5hZGQocGspO1xuICAgICAgfSk7XG5cbiAgICAgIGFjY291bnRzLmFkZChpeC5wcm9ncmFtSWQudG9CYXNlNTgoKSk7XG5cbiAgICAgIGNvbnN0IG5JbmRleGVzID0gaXgua2V5cy5sZW5ndGg7XG4gICAgICBjb25zdCBvcGFxdWVEYXRhID0gaXguZGF0YS5sZW5ndGg7XG5cbiAgICAgIHJldHVybiAoXG4gICAgICAgIGFjYyArXG4gICAgICAgIDEgKyAvLyBQSUQgaW5kZXhcbiAgICAgICAgY29tcGFjdEFycmF5U2l6ZShuSW5kZXhlcywgMSkgK1xuICAgICAgICBjb21wYWN0QXJyYXlTaXplKG9wYXF1ZURhdGEsIDEpXG4gICAgICApO1xuICAgIH0sIDApO1xuXG4gICAgcmV0dXJuIChcbiAgICAgIGNvbXBhY3RBcnJheVNpemUoc2lnbmVycy5zaXplLCA2NCkgKyAvLyBzaWduYXR1cmVzXG4gICAgICAzICsgLy8gaGVhZGVyXG4gICAgICBjb21wYWN0QXJyYXlTaXplKGFjY291bnRzLnNpemUsIDMyKSArIC8vIGF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XBhaXIoeyBzZWNyZXQ6IGZlZVBheWVyIH0pLnB1YmtleSxcbiAgICAgICAgYWxsb3dPd25lck9mZkN1cnZlLFxuICAgICAgKTtcblxuICAgICAgaWYgKCFyZXMuaW5zdCkge1xuICAgICAgICByZXR1cm4gcmVzLnRva2VuQWNjb3VudDtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uPFB1YmtleT4oXG4gICAgICAgIFtyZXMuaW5zdF0sXG4gICAgICAgIFtdLFxuICAgICAgICBmZWVQYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgcmVzLnRva2VuQWNjb3VudCEsXG4gICAgICApO1xuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiBSZXRyeSBmdW5jdGlvbiBpZiBjcmVhdGUgbmV3IHRva2VuIGFjY291aW50XG4gICAgICpcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gbWludFxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBvd25lclxuICAgICAqIEBwYXJhbSB7U2VjcmV0fSBmZWVQYXllclxuICAgICAqIEByZXR1cm5zIFByb21pc2U8c3RyaW5nPlxuICAgICAqL1xuICAgIGV4cG9ydCBjb25zdCByZXRyeUdldE9yQ3JlYXRlID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyOiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxzdHJpbmc+ID0+IHtcbiAgICAgIGxldCBjb3VudGVyID0gMTtcbiAgICAgIHdoaWxlIChjb3VudGVyIDwgUkVUUllfT1ZFUl9MSU1JVCkge1xuICAgICAgICB0cnkge1xuICAgICAgICAgIGNvbnN0IGluc3QgPSBhd2FpdCBnZXQobWludCwgb3duZXIsIGZlZVBheWVyLCB0cnVlKTtcblxuICAgICAgICAgIGlmIChpbnN0ICYmIHR5cGVvZiBpbnN0ID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgaW5zdCk7XG4gICAgICAgICAgICByZXR1cm4gaW5zdDtcbiAgICAgICAgICB9IGVsc2UgaWYgKGluc3QgaW5zdGFuY2VvZiBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uKSB7XG4gICAgICAgICAgICAoYXdhaXQgaW5zdC5zdWJtaXQoKSkubWFwKFxuICAgICAgICAgICAgICBhc3luYyAob2s6IHN0cmluZykgPT4ge1xuICAgICAgICAgICAgICAgIGF3YWl0IE5vZGUuY29uZmlybWVkU2lnKG9rKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gaW5zdC5kYXRhO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAoZXJyOiBFcnJvcikgPT4ge1xuICAgICAgICAgICAgICAgIGRlYnVnTG9nKCcjIEVycm9yIHN1Ym1pdCByZXRyeUdldE9yQ3JlYXRlOiAnLCBlcnIpO1xuICAgICAgICAgICAgICAgIHRocm93IGVycjtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgZGVidWdMb2coYCMgcmV0cnk6ICR7Y291bnRlcn0gY3JlYXRlIHRva2VuIGFjY291bnQ6IGAsIGUpO1xuICAgICAgICAgIGRlYnVnTG9nKGAjIG1pbnQ6ICR7bWludH0sIG93bmVyOiAke293bmVyfSwgZmVlUGF5ZXI6ICR7ZmVlUGF5ZXJ9YCk7XG4gICAgICAgIH1cbiAgICAgICAgYXdhaXQgc2xlZXAoUkVUUllfU0xFRVBfVElNRSk7XG4gICAgICAgIGNvdW50ZXIrKztcbiAgICAgIH1cbiAgICAgIHRocm93IEVycm9yKGByZXRyeSBhY3Rpb24gaXMgb3ZlciBsaW1pdCAke1JFVFJZX09WRVJfTElNSVR9YCk7XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIFtNYWluIGxvZ2ljXUdldCBBc3NvY2lhdGVkIHRva2VuIEFjY291bnQuXG4gICAgICogaWYgbm90IGNyZWF0ZWQsIGNyZWF0ZSBuZXcgdG9rZW4gYWNjb3VpbnRcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBtaW50XG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAgICogQHBhcmFtIHtQdWJrZXl9IGZlZVBheWVyXG4gICAgICogQHJldHVybnMgUHJvbWlzZTxzdHJpbmc+XG4gICAgICovXG4gICAgZXhwb3J0IGNvbnN0IG1ha2VPckNyZWF0ZUluc3RydWN0aW9uID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyPzogUHVia2V5LFxuICAgICAgYWxsb3dPd25lck9mZkN1cnZlID0gZmFsc2UsXG4gICAgKTogUHJvbWlzZTx7XG4gICAgICB0b2tlbkFjY291bnQ6IHN0cmluZztcbiAgICAgIGluc3Q6IFRyYW5zYWN0aW9uSW5zdHJ1Y3Rpb24gfCB1bmRlZmluZWQ7XG4gICAgfT4gPT4ge1xuICAgICAgY29uc3QgYXNzb2NpYXRlZFRva2VuQWNjb3VudCA9IGdldEFzc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jKFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSxcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JR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WFsdHkpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNSb3lhbHR5KG1ldGFkYXRhLnJveWFsdHkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEuc3ltYm9sKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU3ltYm9sKG1ldGFkYXRhLnN5bWJvbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAocmVzICYmIHJlcy5pc0Vycikge1xuICAgICAgICAgIHJlc3VsdHMuc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VHJhbnNmZXIiLCAiQ29udmVydGVyIiwgIlZhbGlkYXRvciIsICJNZXNzYWdlIiwgIkNvbnZlcnRlciIsICJNdWx0aXNpZyIsICJLZXlwYWlyIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJNdWx0aXNpZ0luc3RydWN0aW9uIiwgIlRPS0VOX1BST0dSQU1fSUQiLCAiVHJhbnNhY3Rpb25JbnN0cnVjdGlvbiIsICJUT0tFTl9QUk9HUkFNX0lEIiwgIlB1YmxpY0tleSIsICJNdWx0aXNpZyIsICJUT0tFTl9QUk9HUkFNX0lEIiwgIlB1YmxpY0tleSIsICJNdWx0aXNpZyIsICJNdWx0aXNpZyJdCn0K \ No newline at end of file diff --git a/packages/suite-multisig/tsconfig.json b/packages/suite-multisig/tsconfig.json index 84c295200..a24b61f77 100644 --- a/packages/suite-multisig/tsconfig.json +++ b/packages/suite-multisig/tsconfig.json @@ -4,11 +4,20 @@ "display": "@solana-suite/multisig", "compilerOptions": { "paths": { - "~/types/*": ["../types/src/*/index.ts"], - "~/*": ["../*/src/index.ts"], - "~/shared/exports": ["../shared/src/exports.ts"] + "~/types/*": [ + "../types/src/*/index.ts" + ], + "~/*": [ + "../*/src/index.ts" + ] } }, - "include": ["src/**/*.ts", "test/**/*.ts"], - "exclude": ["node_modules", "dist"] + "include": [ + "src/**/*.ts", + "test/**/*.ts" + ], + "exclude": [ + "node_modules", + "dist" + ] } diff --git a/packages/suite-phantom/dist/index.mjs b/packages/suite-phantom/dist/index.mjs index cf76cf47d..013773caa 100644 --- a/packages/suite-phantom/dist/index.mjs +++ b/packages/suite-phantom/dist/index.mjs @@ -4,7 +4,7 @@ import { Transaction as Transaction7 } from "@solana/web3.js"; // ../suite-spl-token/src/add.ts import { createMintToCheckedInstruction } from "@solana/spl-token"; -// ../shared/src/constants.ts +// ../suite-utils/src/constants.ts import { PublicKey } from "@solana/web3.js"; import SolanaJsonConfig from "@solana-suite/config/load"; var Config = SolanaJsonConfig; @@ -286,65 +286,6 @@ var TransactionBuilder; TransactionBuilder7.Common = Common2; })(TransactionBuilder || (TransactionBuilder = {})); -// ../shared/src/shared.ts -var overwriteObject = (object, targets) => { - const that = object; - targets.forEach((target) => { - delete that[target.existsKey]; - that[target.will.key] = target.will.value; - }); - return that; -}; -var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { - if (Constants.isDebugging === "true" || process.env.DEBUG === "true") { - console.log("[DEBUG]", data1, data2, data3, data4); - } -}; -var sleep = async (sec) => { - return new Promise((r) => setTimeout(r, sec * 1e3)); -}; -var isBrowser = () => { - return typeof window !== "undefined" && typeof window.document !== "undefined"; -}; -var isNode = () => { - return typeof process !== "undefined" && process.versions != null && process.versions.node != null; -}; -var isPromise = (obj) => { - return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; -}; -function Try(input, finallyInput) { - try { - const v = input(); - if (isPromise(v)) { - return v.then( - (x) => Result.ok(x), - (err) => Result.err(err) - ); - } else { - return Result.ok(v); - } - } catch (e) { - if (e instanceof Error) { - return Result.err(e); - } - return Result.err(Error(e)); - } finally { - if (finallyInput) { - debugLog("# finally input:", finallyInput); - finallyInput(); - } - } -} -var convertTimestampToDateTime = (created_at) => { - if (created_at) { - return new Date(created_at * 1e3); - } - return; -}; -var unixTimestamp = () => { - return Math.floor((/* @__PURE__ */ new Date()).getTime() / 1e3); -}; - // ../transaction-builder/src/batch.ts var TransactionBuilder2; ((TransactionBuilder7) => { @@ -812,7 +753,66 @@ var TransactionBuilder6 = { ...TransactionBuilder4 }; -// ../shared/src/result.ts +// ../suite-utils/src/shared.ts +var overwriteObject = (object, targets) => { + const that = object; + targets.forEach((target) => { + delete that[target.existsKey]; + that[target.will.key] = target.will.value; + }); + return that; +}; +var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { + if (Constants.isDebugging === "true" || process.env.DEBUG === "true") { + console.log("[DEBUG]", data1, data2, data3, data4); + } +}; +var sleep = async (sec) => { + return new Promise((r) => setTimeout(r, sec * 1e3)); +}; +var isBrowser = () => { + return typeof window !== "undefined" && typeof window.document !== "undefined"; +}; +var isNode = () => { + return typeof process !== "undefined" && process.versions != null && process.versions.node != null; +}; +var isPromise = (obj) => { + return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; +}; +function Try(input, finallyInput) { + try { + const v = input(); + if (isPromise(v)) { + return v.then( + (x) => Result.ok(x), + (err) => Result.err(err) + ); + } else { + return Result.ok(v); + } + } catch (e) { + if (e instanceof Error) { + return Result.err(e); + } + return Result.err(Error(e)); + } finally { + if (finallyInput) { + debugLog("# finally input:", finallyInput); + finallyInput(); + } + } +} +var convertTimestampToDateTime = (created_at) => { + if (created_at) { + return new Date(created_at * 1e3); + } + return; +}; +var unixTimestamp = () => { + return Math.floor((/* @__PURE__ */ new Date()).getTime() / 1e3); +}; + +// ../suite-utils/src/result.ts var AbstractResult = class { unwrap(ok, err) { const r = this._chain( @@ -924,15 +924,15 @@ var InternalErr = class extends AbstractResult { } }; var Result; -((Result27) => { +((Result28) => { function ok(value) { return new InternalOk(value); } - Result27.ok = ok; + Result28.ok = ok; function err(error) { return new InternalErr(error || Error()); } - Result27.err = err; + Result28.err = err; function all(obj) { if (Array.isArray(obj)) { const resArr = []; @@ -942,7 +942,7 @@ var Result; } resArr.push(item.value); } - return Result27.ok(resArr); + return Result28.ok(resArr); } const res = {}; const keys = Object.keys(obj); @@ -953,9 +953,9 @@ var Result; } res[key] = item.value; } - return Result27.ok(res); + return Result28.ok(res); } - Result27.all = all; + Result28.all = all; })(Result || (Result = {})); // ../converter/src/collection.ts @@ -3171,4 +3171,4 @@ export { PhantomSplToken3 as PhantomSplToken, RegularNft11 as RegularNft }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL3JlZ3VsYXItbmZ0L21pbnQudHMiLCAiLi4vLi4vc3VpdGUtc3BsLXRva2VuL3NyYy9hZGQudHMiLCAiLi4vLi4vc2hhcmVkL3NyYy9j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nRTdG9yYWdlTWV0YWRhdGEsXG4gICAgICAgIGlucHV0LmZpbGVQYXRoLFxuICAgICAgICBpbnB1dC5zdG9yYWdlVHlwZSxcbiAgICAgICk7XG5cbiAgICAgIGlmICh1cGxvYWRlZC5pc0Vycikge1xuICAgICAgICB0aHJvdyB1cGxvYWRlZDtcbiAgICAgIH1cbiAgICAgIGNvbnN0IHVyaSA9IHVwbG9hZGVkLnZhbHVlO1xuXG4gICAgICBjb25zdCBkYXRhdjIgPSBDb252ZXJ0ZXIuUmVndWxhck5mdE1ldGFkYXRhLmludG9JbmZyYShcbiAgICAgICAgaW5wdXQsXG4gICAgICAgIHVyaSxcbiAgICAgICAgc2VsbGVyRmVlQmFzaXNQb2ludHMsXG4gICAgICApO1xuXG4gICAgICBjb25zdCBjb25uZWN0aW9uID0gTm9kZS5nZXRDb25uZWN0aW9uKCk7XG4gICAgICBjb25zdCBtaW50ID0gQWNjb3VudC5LZXlwYWlyLmNyZWF0ZSgpO1xuICAgICAgY29uc3QgaXNNdXRhYmxlID0gdHJ1ZTtcblxuICAgICAgZGVidWdMb2coJyMgcHJvcGVydGllczogJywgcHJvcGVydGllcyk7XG4gICAgICBkZWJ1Z0xvZygnIyBzZWxsZXJGZWVCYXNpc1BvaW50czogJywgc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgZGVidWdMb2coJyMgbWludDogJywgbWludC5wdWJrZXkpO1xuXG4gICAgICBjb25zdCB0eCA9IG5ldyBUcmFuc2FjdGlvbigpO1xuXG4gICAgICBjb25zdCBpbnN0cyA9IGF3YWl0IFJlZ3VsYXJOZnQuY3JlYXRlTWludChcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBwaGFudG9tLnB1YmxpY0tleSEsXG4gICAgICAgIGRhdGF2MixcbiAgICAgICAgcGhhbnRvbS5wdWJsaWNLZXkhLFxuICAgICAgICBpc011dGFibGUsXG4gICAgICApO1xuXG4gICAgICBpbnN0cy5mb3JFYWNoKChp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BQcm9taXNlPFJlc3VsdDxDb21tb25TdHJ1Y3R1cmU8UHVia2V5PiwgRXJyb3I+PiA9PiB7XG4gICAgcmV0dXJuIFRyeShhc3luYyAoKSA9PiB7XG4gICAgICBjb25zdCBwYXllciA9IG9wdGlvbnMuZmVlUGF5ZXIgPyBvcHRpb25zLmZlZVBheWVyIDogb3duZXJPck11bHRpc2lnWzBdO1xuICAgICAgY29uc3Qga2V5cGFpcnMgPSBvd25lck9yTXVsdGlzaWcubWFwKChzKSA9PiBzLnRvS2V5cGFpcigpKTtcblxuICAgICAgY29uc3QgdG9rZW5Bc3NvY2lhdGVkID0gYXdhaXQgQWNjb3VudC5Bc3NvY2lhdGVkLnJldHJ5R2V0T3JDcmVhdGUoXG4gICAgICAgIHRva2VuLFxuICAgICAgICBvd25lcixcbiAgICAgICAgcGF5ZXIsXG4gICAgICApO1xuXG4gICAgICBjb25zdCBpbnN0ID0gY3JlYXRlTWludFRvQ2hlY2tlZEluc3RydWN0aW9uKFxuICAgICAgICB0b2tlbi50b1B1YmxpY0tleSgpLFxuICAgICAgICB0b2tlbkFzc29jaWF0ZWQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgQ2FsY3VsYXRlLmNhbGN1bGF0ZUFtb3VudCh0b3RhbEFtb3VudCwgbWludERlY2ltYWwpLFxuICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICAga2V5cGFpcnMsXG4gICAgICApO1xuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb248UHVia2V5PihcbiAgICAgICAgW2luc3RdLFxuICAgICAgICBrZXlwYWlycyxcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCksXG4gICAgICAgIHRva2VuLFxuICAgICAgKTtcbiAgICB9KTtcbiAgfTtcbn1cbiIsICJpbXBvcnQgeyBDb21taXRtZW50LCBQdWJsaWNLZXkgfSBmcm9tICdAc29sYW5hL3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AgICAgIHJldHVybiBUcnkoYXN5bmMgKCkgPT4ge1xuICAgICAgICBsZXQgaSA9IDA7XG4gICAgICAgIGZvciAoY29uc3QgYSBvZiBhcnIpIHtcbiAgICAgICAgICBpZiAoIWEuaW5zdHJ1Y3Rpb25zICYmICFhLnNpZ25lcnMpIHtcbiAgICAgICAgICAgIHRocm93IEVycm9yKFxuICAgICAgICAgICAgICBgb25seSBJbnN0cnVjdGlvbiBvYmplY3QgdGhhdCBjYW4gdXNlIGJhdGNoU3VibWl0KCkuXG4gICAgICAgICAgICBJbmRleDogJHtpfSwgU2V0IHZhbHVlOiAke0pTT04uc3RyaW5naWZ5KGEpfWAsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICBpKys7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBpbnN0cnVjdGlvbnMgPSBhcnIuZmxhdE1hcCgoYSkgPT4gYS5pbnN0cnVjdGlvbnMpO1xuICAgICAgICBjb25zdCBzaWduZXJzID0gYXJyLmZsYXRNYXAoKGEpID0+IGEuc2lnbmVycyk7XG4gICAgICAgIGNvbnN0IGZlZVBheWVycyA9IGFyci5maWx0ZXIoKGEpID0+IGEuZmVlUGF5ZXIgIT09IHVuZGVmaW5lZCk7XG4gICAgICAgIGxldCBmZWVQYXllciA9IHNpZ25lcnNbMF07XG4gICAgICAgIGlmIChmZWVQYXllcnMubGVuZ3RoID4gMCAmJiBmZWVQYXllcnNbMF0uZmVlUGF5ZXIpIHtcbiAgICAgICAgICBmZWVQYXllciA9IGZlZVBheWVyc1swXS5mZWVQYXllcjtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHRyYW5zYWN0aW9uID0gbmV3IFRyYW5zYWN0aW9uKCk7XG4gICAgICAgIGxldCBmaW5hbFNpZ25lcnMgPSBzaWduZXJzO1xuICAgICAgICBpZiAoZmVlUGF5ZXIpIHtcbiAgICAgICAgICB0cmFuc2FjdGlvbi5mZWVQYXllciA9IGZlZVBheWVyLnB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F0ZSA9IGFzeW5jIChcbiAgICAgIG1pbnQ6IFB1YmtleSxcbiAgICAgIG93bmVyOiBQdWJrZXksXG4gICAgICBmZWVQYXllcjogU2VjcmV0LFxuICAgICk6IFByb21pc2U8c3RyaW5nPiA9PiB7XG4gICAgICBsZXQgY291bnRlciA9IDE7XG4gICAgICB3aGlsZSAoY291bnRlciA8IFJFVFJZX09WRVJfTElNSVQpIHtcbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICBjb25zdCBpbnN0ID0gYXdhaXQgZ2V0KG1pbnQsIG93bmVyLCBmZWVQYXllciwgdHJ1ZSk7XG5cbiAgICAgICAgICBpZiAoaW5zdCAmJiB0eXBlb2YgaW5zdCA9PT0gJ3N0cmluZycpIHtcbiAgICAgICAgICAgIGRlYnVnTG9nKCcjIGFzc29jaWF0ZWRUb2tlbkFjY291bnQ6ICcsIGluc3QpO1xuICAgICAgICAgICAgcmV0dXJuIGluc3Q7XG4gICAgICAgICAgfSBlbHNlIGlmIChpbnN0IGluc3RhbmNlb2YgVHJhbnNhY3Rpb25CdWlsZGVyLkNvbW1vbikge1xuICAgICAgICAgICAgKGF3YWl0IGluc3Quc3VibWl0KCkpLm1hcChcbiAgICAgICAgICAgICAgYXN5bmMgKG9rOiBzdHJpbmcpID0+IHtcbiAgICAgICAgICAgICAgICBhd2FpdCBOb2RlLmNvbmZpcm1lZFNpZyhvayk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGluc3QuZGF0YTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgKGVycjogRXJyb3IpID0+IHtcbiAgICAgICAgICAgICAgICBkZWJ1Z0xvZygnIyBFcnJvciBzdWJtaXQgcmV0cnlHZXRPckNyZWF0ZTogJywgZXJyKTtcbiAgICAgICAgICAgICAgICB0aHJvdyBlcnI7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgIGRl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WRUb2tlbkFjY291bnQgPSBnZXRBc3NvY2lhdGVkVG9rZW5BZGRyZXNzU3luYyhcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICBhbGxvd093bmVyT2ZmQ3VydmUsXG4gICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGFzc29jaWF0ZWRUb2tlbkFjY291bnQ6ICcsIGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSk7XG5cbiAgICAgIHRyeSB7XG4gICAgICAgIC8vIERvbnQgdXNlIFJlc3VsdFxuICAgICAgICBhd2FpdCBnZXRBY2NvdW50KFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCkuY29tbWl0bWVudCxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3Q6IHVuZGVmaW5lZCxcbiAgICAgICAgfTtcbiAgICAgIH0gY2F0Y2ggKGVycm9yOiB1bmtub3duKSB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5BY2NvdW50Tm90Rm91bmRFcnJvcikgJiZcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5JbnZhbGlkQWNjb3VudE93bmVyRXJyb3IpXG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9yKCdVbmV4cGVjdGVkIGVyc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mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ25hbWUnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLm5hbWUpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNOYW1lKG1ldGFkYXRhLm5hbWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc3ltYm9sJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5zeW1ib2wpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTeW1ib2wobWV0YWRhdGEuc3ltYm9sKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgICAgIGlmIChyZXMgJiYgcmVzLmlzRXJyKSB7XG4gICAgICAgICAgcmVzdWx0cy5wdXNoKC4uLnJlcy5lcnJvci5kZXRhaWxzKTtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgICBpZiAocmVzdWx0cy5sZW5ndGggPiAwKSB7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPVxuICAgICAgICAgICdDYXVnaHQgaW4gdGhlIHZhbGlkYXRpb24gZXJyb3JzLiBzZWUgaW5mb3JtYXRpb24gZS5nOiBlcnI8Vm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TV9JRCxcbiAgICAgICAgfSxcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IGRhdGFzID0gaW5mby52YWx1ZS5tYXAoYXN5bmMgKGQpID0+IHtcbiAgICAgICAgY29uc3QgbWludCA9IGQuYWNjb3VudC5kYXRhLnBhcnNlZC5pbmZvLm1pbnQgYXMgUHVia2V5O1xuICAgICAgICBjb25zdCB0b2tlbkFtb3VudCA9IGQuYWNjb3VudC5kYXRhLnBhcnNlZC5pbmZvLnRva2VuQW1vdW50XG4gICAgICAgICAgLmFtb3VudCBhcyBzdHJpbmc7XG4gICAgICAgIGlmICh0b2tlbkFtb3VudCA9PT0gJzEnKSB7XG4gICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBNZXRhZGF0YS5mcm9tQWNjb3VudEFkZHJlc3MoXG4gICAgICAgICAgY29ubmVjdGlvbixcbiAgICAgICAgICBBY2NvdW50LlBkYS5nZXRNZXRhZGF0YShtaW50KSxcbiAgICAgICAgKVxuICAgICAgICAgIC50aGVuKGFzeW5jIChtZXRhZGF0YSkgPT4ge1xuICAgICAgICAgICAgLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLWV4cGxpY2l0LWFueSAqL1xuICAgICAgICAgICAgcmV0dXJuIGZldGNoUmV0cnkobWV0YWRhdGEuZGF0YS51cmkpLnRoZW4oKGpzb246IGFueSkgPT4ge1xuICAgICAgICAgICAgICByZXR1cm4gY29udmVydGVyKG1ldGFkYXRhLCBqc29uLCB0b2tlbkFtb3VudCk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICB9KVxuICAgICAgICAgIC5jYXRjaCgoZXJyKSA9PiBkZWJ1Z0xvZygnIyBbRmV0Y2ggZXJyb3JdJywgZXJyKSk7XG4gICAgICB9KTtcblxuICAgICAgY29uc3QgZmlsdGVycyA9IChhd2FpdCBQcm9taXNlLmFsbChkYXRhcykpLmZpbHRlcihcbiAgICAgICAgKGRhdGEpID0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mVlUGF5ZXIsXG4gICAgICApO1xuXG4gICAgICBsZXQgaW5zdDI7XG4gICAgICBjb25zdCBibG9ja2hhc2hPYmogPSBhd2FpdCBOb2RlLmdldENvbm5lY3Rpb24oKS5nZXRMYXRlc3RCbG9ja2hhc2goKTtcblxuICAgICAgY29uc3QgdHggPSBuZXcgVHJhbnNhY3Rpb24oe1xuICAgICAgICBsYXN0VmFsaWRCbG9ja0hlaWdodDogYmxvY2toYXNoT2JqLmxhc3RWYWxpZEJsb2NrSGVpZ2h0LFxuICAgICAgICBibG9ja2hhc2g6IGJsb2NraGFzaE9iai5ibG9ja2hhc2gsXG4gICAgICAgIGZlZVBheWVyOiBmZWVQYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgfSk7XG5cbiAgICAgIC8vIHJldHVybiBhc3NvY2lhdGVkIHRva2VuIGFjY291bnRcbiAgICAgIGlmICghZGVzdFRva2VuLmluc3QpIHtcbiAgICAgICAgaW5zdDIgPSBjcmVhdGVUcmFuc2ZlckNoZWNrZWRJbnN0cnVjdGlvbihcbiAgICAgICAgICBzb3VyY2VUb2tlbi50b2tlbkFjY291bnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgZGVzdFRva2VuLnRva2VuQWNjb3VudC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICAgIENhbGN1bGF0b3IuY2FsY3VsYXRlQW1vdW50KGFtb3VudCwgbWludERlY2ltYWwpLFxuICAgICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICAgIFtvd25lci50b0tleXBhaXIoKV0sXG4gICAgICAgICk7XG4gICAgICAgIHR4LmFkZChpbnN0Mik7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICAvLyByZXR1cm4gaW5zdHJ1Y3Rpb24gYW5kIHVuZGVjaWRlZCBhc3NvY2lhdGVkIHRva2VuIGFjY291bnRcbiAgICAgICAgaW5zdDI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24oXG4gICAgICAgIGZlZVBheWVyLFxuICAgICAgICB0b2tlbkFzc29jaWF0ZWQsXG4gICAgICAgIG93bmVyLFxuICAgICAgICBtaW50LFxuICAgICAgKSxcbiAgICApO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVNaW50VG9DaGVja2VkSW5zdHJ1Y3Rpb24oXG4gICAgICAgIG1pbnQsXG4gICAgICAgIHRva2VuQXNzb2NpYXRlZCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIENhbGN1bGF0ZS5jYWxjdWxhdGVBbW91bnQodG90YWxBbW91bnQsIG1pbnREZWNpbWFsKSxcbiAgICAgICAgbWludERlY2ltYWwsXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUNyZWF0ZU1ldGFkYXRhQWNjb3VudFYzSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHtcbiAgICAgICAgICBtZXRhZGF0YTogbWV0YWRhdGFQZGEsXG4gICAgICAgICAgbWludCxcbiAgICAgICAgICBtaW50QXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBwYXllcjogZmVlUGF5ZXIsXG4gICAgICAgICAgdXBkYXRlQXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgIGNyZWF0ZU1ldGFkYXRhQWNjb3VudEFyZ3NWMzoge1xuICAgICAgICAgICAgZGF0YTogdG9rZW5NZXRhZGF0YSxcbiAgICAgICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICAgICAgIGNvbGxlY3Rpb25EZXRhaWxzOiBudWxsLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICApLFxuICAgICk7XG4gICAgcmV0dXJuIGluc3RydWN0aW9ucztcbiAgfTtcblxuICAvKipcbiAgICogU1BMLVRPS0VOIG1pbnRcbiAgICpcbiAgICogQHBhcmFtIHtTZWNyZXR9IG93bmVy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b2FkZWQgPSBhd2FpdCBTdG9yYWdlLnVwbG9hZERhdGEoXG4gICAgICAgICAgeyAuLi5zdG9yYWdlTWV0YWRhdGEsIC4uLmltYWdlIH0sXG4gICAgICAgICAgc3RvcmFnZVR5cGUsXG4gICAgICAgICAgcGF5ZXIsXG4gICAgICAgICk7XG4gICAgICAgIGlmICh1cGxvYWRlZC5pc0Vycikge1xuICAgICAgICAgIHRocm93IHVwbG9hZGVkO1xuICAgICAgICB9XG4gICAgICAgIHVyaSA9IHVwbG9hZGVkLnZhbHVlO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgdGhyb3cgRXJyb3IoYE11c3Qgc2V0IGZpbGVQYXRoJyBvciAndXJpJ2ApO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBpc011dGFibGUgPSB0cnVlO1xuXG4gICAgICBjb25zdCBkYXRhdjIgPSBDb252ZXJ0ZXIuVG9rZW5NZXRhZGF0YS5pbnRvSW5mcmEoXG4gICAgICAgIGlucHV0LFxuICAgICAgICB1cmksXG4gICAgICAgIHNlbGxlckZlZUJhc2lzUG9pbnRzLFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgZGF0YXYyOiAnLCBkYXRhdjIpO1xuICAgICAgZGVidWdMb2coJyMgdXBsb2FkIGNvbnRlbnQgdXJsOiAnLCB1cmkpO1xuXG4gICAgICBjb25zdCBtaW50ID0gQWNjb3VudC5LZXlwYWlyLmNyZWF0ZSgpO1xuICAgICAgY29uc3QgaW5zdHMgPSBhd2FpdCBjcmVhdGVNaW50KFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICB0b3RhbEFtb3VudCxcbiAgICAgICAgbWludERlY2ltYWwsXG4gICAgICAgIGRhdGF2MixcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICBpc011dGFibGUsXG4gICAgICApO1xuXG4gICAgICAvLyBmcmVlemVBd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AgKiBAcGFyYW0ge1B1YmtleX0gbWludCAgICAgICAgICAgICAvLyBtaW50IGFkZHJlc3NcbiAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyICAgICAgICAgICAgLy8gY3VycmVudCBvd25lclxuICAgKiBAcGFyYW0ge1BhcnRpYWw8RnJlZXplT3B0aW9ucz59IG9wdGlvbnNcbiAgICogQHJldHVybiBSZXN1bHQ8Q29tbW9uU3RydWN0dXJlLCBFcnJvcj5cbiAgICovXG4gIGV4cG9ydCBjb25zdCBmcmVlemUgPSAoXG4gICAgbWludDogUHVia2V5LFxuICAgIG93bmVyOiBQdWJrZXksXG4gICAgZnJlZXplQXV0aG9yaXR5OiBTZWNyZXQsXG4gICAgb3B0aW9uczogUGFydGlhbDxGcmVlemVPcHRpb25zPiA9IHt9LFxuICApOiBSZXN1bHQ8Q29tbW9uU3RydWN0dXJlLCBFcnJvcj4gPT4ge1xuICAgIHJldHVybiBUcnkoKCkgPT4ge1xuICAgICAgY29uc3QgcGF5ZXIgPSBvcHRpb25zLmZlZVBheWVyID8gb3B0aW9ucy5mZWVQYXllciA6IGZyZWV6ZUF1dGhvcml0eTtcbiAgICAgIGNvbnN0IHRva2VuQWNjb3VudCA9IGdldEFzc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jKFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICApO1xuICAgICAgY29uc3QgZWRpdGlvbkFkZHJlc3MgPSBBY2NvdW50LlBkYS5nZXRNYXN0ZXJFZGl0aW9uKG1pbnQpO1xuXG4gICAgICBjb25zdCBpbnN0ID0gY3JlYXRlRnJlZXplRGVsZWdhdGVkQWNjb3VudEluc3RydWN0aW9uKHtcbiAgICAgICAgZGVsZWdhdGU6IG5ldyBBY2NvdW50LktleXBhaXIoe1xuICAgICAgICAgIHNlY3JldDogZnJlZXplQXV0aG9yaXR5LFxuICAgICAgICB9KS50b1B1YmxpY0tleS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WRhdGE6IHRva2VuTWV0YWRhdGFQdWJrZXksXG4gICAgICAgICAgbWludCxcbiAgICAgICAgICBtaW50QXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBwYXllcjogZmVlUGF5ZXIsXG4gICAgICAgICAgdXBkYXRlQXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgIGNyZWF0ZU1ldGFkYXRhQWNjb3VudEFyZ3NWMzoge1xuICAgICAgICAgICAgZGF0YTogbmZ0TWV0YWRhdGEsXG4gICAgICAgICAgICBpc011dGFibGUsXG4gICAgICAgICAgICBjb2xsZWN0aW9uRGV0YWlsczogbnVsbCxcbiAgICAgICAgICB9LFxuICAgICAgICB9LFxuICAgICAgKSxcbiAgICApO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVDcmVhdGVNYXN0ZXJFZGl0aW9uVjNJbnN0cnVjdGlvbihcbiAgICAgICAge1xuICAgICAgICAgIGVkaXRpb246IG1hc3RlckVkaXRpb25QdWJrZXksXG4gICAgICAgICAgbWludCxcbiAgICAgICAgICB1cGRhdGVBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICAgIG1pbnRBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICAgIHBheWVyOiBmZWVQYXllcixcbiAgICAgICAgICBtZXRhZGF0YTogdG9rZW5NZXRhZGF0YVB1YmtleSxcbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgIGNyZWF0ZU1hc3RlckVkaXRpb25BcmdzOiB7XG4gICAgICAgICAgICBtYXhTdXBwbHk6IDAsXG4gICAgICAgICAgfSxcbiAgICAgICAgfSxcbiAgICAgICksXG4gICAgKTtcbiAgICByZXR1cm4gaW5zdHJ1Y3Rpb25zO1xuICB9O1xuXG4gIC8qKlxuICAgKiBVcGxvYWQgY29udGVudCBhbmQgTkZUIG1pbnRcbiAgICpcbiAgICogQHBhcmFtIHtTZWNyZXR9IG93bmVy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nZlcnRlci5SZWd1bGFyTmZ0TWV0YWRhdGEuaW50b0luZnJhKFxuICAgICAgICBpbnB1dCxcbiAgICAgICAgdXJpLFxuICAgICAgICBzZWxsZXJGZWVCYXNpc1BvaW50cyxcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IGlzTXV0YWJsZSA9IGlucHV0LmlzTXV0YWJsZSA9PT0gdW5kZWZpbmVkID8gdHJ1ZSA6IGlucHV0LmlzTXV0YWJsZTtcblxuICAgICAgZGVidWdMb2coJyMgaW5wdXQ6ICcsIGlucHV0KTtcbiAgICAgIGRlYnVnTG9nKCcjIGRhdGF2MjogJywgZGF0YXYyKTtcblxuICAgICAgY29uc3QgbWludCA9IEFjY291bnQuS2V5cGFpci5jcmVhdGUoKTtcblxuICAgICAgY29uc3QgaW5zdHJ1Y3Rpb25zID0gYXdhaXQgY3JlYXRlTWludChcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgZGF0YXYyLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICk7XG5cbiAgICAgIC8vIGZyZWV6ZUF1dGhvcml0eVxuICAgICAgaWYgKGZyZWV6ZUF1dGhvcml0eSkge1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgICBjcmVhdGVEZWxlYWdhdGUoXG4gICAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgICAgIGZyZWV6ZUF1dGhvcml0eS50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIC8vIGNvbGxlY3Rpb24gLS0tXG4gICAgICBpZiAoaW5wdXQuY29sbGVjdGlvbikge1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgICBjcmVhdGVWZXJpZnlTaXplZENvbGxlY3Rpb24oXG4gICAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBpbnB1dC5jb2xsZWN0aW9uLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3Qga2V5cGFpcnMgPSBbb3duZXIudG9LZXlwYWlyKCksIG1pbnQudG9LZXlwYWlyKCldO1xuXG4gICAgICAvLyBjcmVhdG9yIC0tLVxuICAgICAgaWYgKGlucHV0LmNyZWF0b3JzKSB7XG4gICAgICAgIGlucHV0LmNyZWF0b3JzLmZvckVhY2goKGNyZWF0b3IpID0+IHtcbiAgICAgICAgICBpZiAoQWNjb3VudC5LZXlwYWlyLmlzU2VjcmV0KGNyZWF0b3Iuc2VjcmV0KSkge1xuICAgICAgICAgICAgY29uc3QgY3JlYXRvclB1YmtleSA9IGNyZWF0b3IuYWRkcmVzcy50b1B1YmxpY0tleSgpO1xuICAgICAgICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZVZlcmlmeUNyZWF0b3IobWludC50b1B1YmxpY0tleSgpLCBjcmVhdG9yUHVia2V5KTtcbiAgICAgICAgICAgIGluc3RydWN0aW9ucy5wdXNoKGluc3QpO1xuICAgICAgICAgICAga2V5cGFpcnMucHVzaChjcmVhdG9yLnNlY3JldC50b0tleXBhaXIoKSk7XG4gICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuTWludChcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLFxuICAgICAgICBrZXlwYWlycyxcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCksXG4gICAgICAgIG1pbnQucHVia2V5LFxuICAgICAgKTtcbiAgICB9KTtcbiAgfTtcbn1cbiIsICJpbXB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AgZGVidWdMb2coJyMgaW5wdXQ6ICcsIGlucHV0KTtcbiAgICAgIGRlYnVnTG9nKCcjIHNlbGxlckZlZUJhc2lzUG9pbnRzOiAnLCBzZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICBkZWJ1Z0xvZygnIyBkYXRhdjI6ICcsIGRhdGF2Mik7XG5cbiAgICAgIGNvbnN0IG1pbnQgPSBBY2NvdW50LktleXBhaXIuY3JlYXRlKCk7XG4gICAgICBjb25zdCBpbnN0cyA9IGF3YWl0IE1pbnQuY3JlYXRlTWludChcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lclB1YmxpY2tleSxcbiAgICAgICAgZGF0YXYyLFxuICAgICAgICBmZWVQYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgICBpc011dGFibGUsXG4gICAgICApO1xuXG4gICAgICAvLyBmcmVlemVBdXRob3JpdHlcbiAgICAgIGlmIChvcHRpb25zLmZyZWV6ZUF1dGhvcml0eSkge1xuICAgICAgICBpbnN0cy5wdXNoKFxuICAgICAgICAgIE1pbnQuY3JlYXRlRGVsZWFnYXRlKFxuICAgICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgb3duZXJQdWJsaWNrZXksXG4gICAgICAgICAgICBvcHRpb25zLmZyZWV6ZUF1dGhvcml0eS50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGJsb2NraGFzaE9iaiA9IGF3YWl0IE5vZGUuZ2V0Q29ubmVjdGlvbigpLmdldExhdGVzdEJsb2NraGFzaCgpO1xuICAgICAgY29uc3QgdHggPSBuZXcgVHJhbnNhY3Rpb24oe1xuICAgICAgICBsYXN0VmFsaWRCbG9ja0hlaWdodDogYmxvY2toYXNoT2JqLmxhc3RWYWxpZEJsb2NrSGVpZ2h0LFxuICAgICAgICBibG9ja2hhc2g6IGJsb2NraGFzaE9iai5ibG9ja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lemVBdXRob3JpdHlcbiAgICAgIGlmIChmcmVlemVBdXRob3JpdHkpIHtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgICAgTWludC5jcmVhdGVEZWxlYWdhdGUoXG4gICAgICAgICAgICBjb2xsZWN0aW9uTWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgICAgICBmcmVlemVBdXRob3JpdHkudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBjb2xsZWN0aW9ucyA9IHtcbiAgICAgICAgY29sbGVjdGlvbk1ldGFkYXRhOiBjb2xsZWN0aW9uTWV0YWRhdGFBY2NvdW50LFxuICAgICAgICBjb2xsZWN0aW9uQXV0aG9yaXR5OiBvd25lci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgIGNvbGxlY3Rpb25NaW50OiBjb2xsZWN0aW9uTWludC50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICB9O1xuXG4gICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgY3JlYXRlU2V0Q29sbGVjdGlvblNpemVJbnN0cnVjdGlvbihjb2xsZWN0aW9ucywge1xuICAgICAgICAgIHNldENvbGxlY3Rpb25TaXplQXJnczoge1xuICAgICAgICAgICAgc2l6ZTogY29sbGVjdGlvblNpemUgfHwgREVGQVVMVF9DT0xMRUNUSU9OX1NJWkUsXG4gICAgICAgICAgfSxcbiAgICAgICAgfSksXG4gICAgICApO1xuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5NaW50KFxuICAgICAgICBpbnN0cnVjdGlvbnMsXG4gICAgICAgIFtvd25lci50b0tleXBhaXIoKSwgY29sbGVjdGlvbk1pbnQudG9LZXlwYWlyKCldLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgY29sbGVjdG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FkZHJlc3NTeW5jIiwgIlJlZ3VsYXJOZnQiLCAiQWNjb3VudCIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiUmVndWxhck5mdCIsICJTcGxUb2tlbiIsICJSZWd1bGFyTmZ0IiwgIlBoYW50b21NZXRhcGxleCIsICJDb252ZXJ0ZXIiLCAibWludCIsICJBY2NvdW50IiwgIlRyYW5zYWN0aW9uIiwgIlJlZ3VsYXJOZnQiLCAic2lnIiwgIlJlZ3VsYXJOZnQiLCAiY3JlYXRlTWludFRvQ2hlY2tlZEluc3RydWN0aW9uIiwgIlRPS0VOX1BST0dSQU1fSUQiLCAiVHJhbnNhY3Rpb24iLCAiUGhhbnRvbVNwbFRva2VuIiwgIlRyYW5zYWN0aW9uIiwgIkFjY291bnQiLCAiY3JlYXRlTWludFRvQ2hlY2tlZEluc3RydWN0aW9uIiwgIlRPS0VOX1BST0dSQU1fSUQiLCAiS2V5cGFpciIsICJUcmFuc2FjdGlvbiIsICJQaGFudG9tU3BsVG9rZW4iLCAiVHJhbnNhY3Rpb24iLCAibWludCIsICJLZXlwYWlyIiwgIkNvbnZlcnRlciIsICJTcGxUb2tlbiIsICJzaWciLCAiUGhhbnRvbVNwbFRva2VuIl0KfQo= \ No newline at end of file +//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL3JlZ3VsYXItbmZ0L21pbnQudHMiLCAiLi4vLi4vc3VpdGUtc3BsLXRva2VuL3NyYy9hZGQudHMiLCAiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9iYXRjaC50cyIsICIuLi8uLi9ub2RlL3NyYy9pbmRleC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jb21tb24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvbWludC50cyIsICI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cbiAgICAgICAgICAgICAgYXN5bmMgKG9rOiBzdHJpbmcpID0+IHtcbiAgICAgICAgICAgICAgICBhd2FpdCBOb2RlLmNvbmZpcm1lZFNpZyhvayk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGluc3QuZGF0YTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgKGVycjogRXJyb3IpID0+IHtcbiAgICAgICAgICAgICAgICBkZWJ1Z0xvZygnIyBFcnJvciBzdWJtaXQgcmV0cnlHZXRPckNyZWF0ZTogJywgZXJyKTtcbiAgICAgICAgICAgICAgICB0aHJvdyBlcnI7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgIGRlYnVnTG9nKGAjIHJldHJ5OiAke2NvdW50ZXJ9IGNyZWF0ZSB0b2tlbiBhY2NvdW50OiBgLCBlKTtcbiAgICAgICAgICBkZWJ1Z0xvZyhgIyBtaW50OiAke21pbnR9LCBvd25lcjogJHtvd25lcn0sIGZlZVBheWVyOiAke2ZlZVBheWVyfWApO1xuICAgICAgICB9XG4gICAgICAgIGF3YWl0IHNsZWVwKFJFVFJZX1NMRUVQX1RJTUUpO1xuICAgICAgICBjb3VudGVyKys7XG4gICAgICB9XG4gICAgICB0aHJvdyBFcnJvcihgcmV0cnkgYWN0aW9uIGlzIG92ZXIgbGltaXQgJHtSRVRSWV9PVkVSX0xJTUlUfWApO1xuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiBbTWFpbiBsb2dpY11HZXQgQXNzb2NpYXRlZCB0b2tlbiBBY2NvdW50LlxuICAgICAqIGlmIG5vdCBjcmVhdGVkLCBjcmVhdGUgbmV3IHRva2VuIGFjY291aW50XG4gICAgICpcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gbWludFxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBvd25lclxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBmZWV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uICAgICAgICApO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3Q6IHVuZGVmaW5lZCxcbiAgICAgICAgfTtcbiAgICAgIH0gY2F0Y2ggKGVycm9yOiB1bmtub3duKSB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5BY2NvdW50Tm90Rm91bmRFcnJvcikgJiZcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5JbnZhbGlkQWNjb3VudE93bmVyRXJyb3IpXG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9yKCdVbmV4cGVjdGVkIGVycm9yJyk7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBwYXllciA9ICFmZWVQYXllciA/IG93bmVyIDogZmVlUGF5ZXI7XG5cbiAgICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgICBwYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgICBBU1NPQ0lBVEVEX1RPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG5cbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICB0b2tlbkFjY291bnQ6IGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSxcbiAgICAgICAgICBpbnN0LFxuICAgICAgICB9O1xuICAgICAgfVxuICAgIH07XG4gIH1cbn1cbiIsICJpbXBvcnQgeyBLZXlwYWlyIGFzIE9yaWdp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VzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJGZWVCYXNpc1BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0YWRhdGEubmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzeW1ib2wnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLnN5bWJvbCkge1xuICAgICAgICAgICAgICByZXMgPSBpc1N5bWJvbChtZXRhZGF0YS5zeW1ib2wpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHJlcyAmJiByZXMuaXNFcnIpIHtcbiAgICAgICAgICByZXN1bHRzLnB1c2goLi4ucmVzLmVycm9yLmRldGFpbHMpO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIGlmIChyZXN1bHRzLmxlbmd0aCA+IDApIHtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9XG4gICAgICAgICAgJ0NhdWdodCBpbiB0aGUgdmFsaWRhdGlvbiBlcnJvcnMuIHNlZSBpbmZvcm1hdGlvbiBlLmc6IGVycjxWYWxpZGF0b3JFcnJvcj4uZGV0YWlscyc7XG4gICAgICAgIHRocm93IG5ldyBWYWxpZGF0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ICk7XG5cbiAgICAgIGNvbnN0IGRhdGFzID0gaW5mby52YWx1ZS5tYXAoYXN5bmMgKGQpID0+IHtcbiAgICAgICAgY29uc3QgbWludCA9IGQuYWNjb3VudC5kYXRhLnBhcnNlZC5pbmZvLm1pbnQgYXMgUHVia2V5O1xuICAgICAgICBjb25zdCB0b2tlbkFtb3VudCA9IGQuYWNjb3VudC5kYXRhLnBhcnNlZC5pbmZvLnRva2VuQW1vdW50XG4gICAgICAgICAgLmFtb3VudCBhcyBzdHJpbmc7XG4gICAgICAgIGlmICh0b2tlbkFtb3VudCA9PT0gJzEnKSB7XG4gICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBNZXRhZGF0YS5mcm9tQWNjb3VudEFkZHJlc3MoXG4gICAgICAgICAgY29ubmVjdGlvbixcbiAgICAgICAgICBBY2NvdW50LlBkYS5nZXRNZXRhZGF0YShtaW50KSxcbiAgICAgICAgKVxuICAgICAgICAgIC50aGVuKGFzeW5jIChtZXRhZGF0YSkgPT4ge1xuICAgICAgICAgICAgLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLWV4cGxpY2l0LWFueSAqL1xuICAgICAgICAgICAgcmV0dXJuIGZldGNoUmV0cnkobWV0YWRhdGEuZGF0YS51cmkpLnRoZW4oKGpzb246IGFueSkgPT4ge1xuICAgICAgICAgICAgICByZXR1cm4gY29udmVydGVyKG1ldGFkYXRhLCBqc29uLCB0b2tlbkFtb3VudCk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICB9KVxuICAgICAgICAgIC5jYXRjaCgoZXJyKSA9PiBkZWJ1Z0xvZygnIyBbRmV0Y2ggZXJyb3JdJywgZXJyKSk7XG4gICAgICB9KTtcblxuICAgICAgY29uc3QgZmlsdGVycyA9IChhd2FpdCBQcm9taXNlLmFsbChkYXRhcykpLmZpbHRlcihcbiAgICAgICAgKGRhdGEpID0+IGRhdGEgIT09IHVuZGVmaW5lZCxcb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gIGZlZVBheWVyLFxuICAgICAgICB0b2tlbkFzc29jaWF0ZWQsXG4gICAgICAgIG93bmVyLFxuICAgICAgICBtaW50LFxuICAgICAgKSxcbiAgICApO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVNaW50VG9DaGVja2VkSW5zdHJ1Y3Rpb24oXG4gICAgICAgIG1pbnQsXG4gICAgICAgIHRva2VuQXNzb2NpYXRlZCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIENhbGN1bGF0ZS5jYWxjdWxhdGVBbW91bnQodG90YWxBbW91bnQsIG1pbnREZWNpbWFsKSxcbiAgICAgICAgbWludERlY2ltYWwsXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUNyZWF0ZU1ldGFkYXRhQWNjb3VudFYzSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHtcbiAgICAgICAgICBtZXRhZGF0YTogbWV0YWRhdGFQZGEsXG4gICAgICAgICAgbWludCxcbiAgICAgICAgICBtaW50QXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBwYXllcjogZmVlUGF5ZXIsXG4gICAgICAgICAgdXBkYXRlQXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgIGNyZWF0ZU1ldGFkYXRhQWNjb3VudEFyZ3NWMzoge1xuICAgICAgICAgICAgZGF0YTogdG9rZW5NZXRhZGF0YSxcbiAgICAgICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICAgICAgIGNvbGxlY3Rpb25EZXRhaWxzOiBudWxsLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICApLFxuICAgICk7XG4gICAgcmV0dXJuIGluc3RydWN0aW9ucztcbiAgfTtcblxuICAvKipcbiAgICogU1BMLVRPS0VOIG1pbnRcbiAgICpcbiAgICogQHBhcmFtIHtTZWNyZXR9IG93bmVyICAgICAgLy8gd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hd2FpdCBTdG9yYWdlLnVwbG9hZERhdGEoXG4gICAgICAgICAgeyAuLi5zdG9yYWdlTWV0YWRhdGEsIC4uLmltYWdlIH0sXG4gICAgICAgICAgc3RvcmFnZVR5cGUsXG4gICAgICAgICAgcGF5ZXIsXG4gICAgICAgICk7XG4gICAgICAgIGlmICh1cGxvYWRlZC5pc0Vycikge1xuICAgICAgICAgIHRocm93IHVwbG9hZGVkO1xuICAgICAgICB9XG4gICAgICAgIHVyaSA9IHVwbG9hZGVkLnZhbHVlO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgdGhyb3cgRXJyb3IoYE11c3Qgc2V0IGZpbGVQYXRoJyBvciAndXJpJ2ApO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBpc011dGFibGUgPSB0cnVlO1xuXG4gICAgICBjb25zdCBkYXRhdjIgPSBDb252ZXJ0ZXIuVG9rZW5NZXRhZGF0YS5pbnRvSW5mcmEoXG4gICAgICAgIGlucHV0LFxuICAgICAgICB1cmksXG4gICAgICAgIHNlbGxlckZlZUJhc2lzUG9pbnRzLFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgZGF0YXYyOiAnLCBkYXRhdjIpO1xuICAgICAgZGVidWdMb2coJyMgdXBsb2FkIGNvbnRlbnQgdXJsOiAnLCB1cmkpO1xuXG4gICAgICBjb25zdCBtaW50ID0gQWNjb3VudC5LZXlwYWlyLmNyZWF0ZSgpO1xuICAgICAgY29uc3QgaW5zdHMgPSBhd2FpdCBjcmVhdGVNaW50KFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICB0b3RhbEFtb3VudCxcbiAgICAgICAgbWludERlY2ltYWwsXG4gICAgICAgIGRhdGF2MixcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICBpc011dGFibGUsXG4gICAgICApO1xuXG4gICAgICAvLyBmcmVlemVBdXRob3JpdHlcb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F0YSwgb3duZXIsIG1pbnQpLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChjcmVhdGVNaW50VG9DaGVja2VkSW5zdHJ1Y3Rpb24obWludCwgYXRhLCBvd25lciwgMSwgMCkpO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVDcmVhdGVNZXRhZGF0YUFjY291bnRWM0luc3RydWN0aW9uKFxuICAgICAgICB7XG4gICAgICAgICAgbWV0YWRhdGE6IHRva2VuTWV0YWRhdGFQdWJrZXksXG4gICAgICAgICAgbWludCxcbiAgICAgICAgICBtaW50QXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBwYXllcjogZmVlUGF5ZXIsXG4gICAgICAgICAgdXBkYXRlQXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgIGNyZWF0ZU1ldGFkYXRhQWNjb3VudEFyZ3NWMzoge1xuICAgICAgICAgICAgZGF0YTogbmZ0TWV0YWRhdGEsXG4gICAgICAgICAgICBpc011dGFibGUsXG4gICAgICAgICAgICBjb2xsZWN0aW9uRGV0YWlsczogbnVsbCxcbiAgICAgICAgICB9LFxuICAgICAgICB9LFxuICAgICAgKSxcbiAgICApO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVDcmVhdGVNYXN0ZXJFZGl0aW9uVjNJbnN0cnVjdGlvbihcbiAgICAgICAge1xuICAgICAgICAgIGVkaXRpb246IG1hc3RlckVkaXRpb25QdWJrZXksXG4gICAgICAgICAgbWludCxcbiAgICAgICAgICB1cGRhdGVBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICAgIG1pbnRBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICAgIHBheWVyOiBmZWVQYXllcixcbiAgICAgICAgICBtZXRhZGF0YTogdG9rZW5NZXRhZGF0YVB1YmtleSxcbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAg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gKTtcbiAgICAgICAgaWYgKHVwbG9hZGVkLmlzRXJyKSB7XG4gICAgICAgICAgdGhyb3cgdXBsb2FkZWQ7XG4gICAgICAgIH1cbiAgICAgICAgdXJpID0gdXBsb2FkZWQudmFsdWU7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICB0aHJvdyBFcnJvcihgTXVzdCBzZXQgZmlsZVBhdGgnIG9yICd1cmknYCk7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGRhdGF2MiA9IENvbnZlcnRlci5SZWd1bGFyTmZ0TWV0YWRhdGEuaW50b0luZnJhKFxuICAgICAgICBpbnB1dCxcbiAgICAgICAgdXJpLFxuICAgICAgICBzZWxsZXJGZWVCYXNpc1BvaW50cyxcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IGlzTXV0YWJsZSA9IGlucHV0LmlzTXV0YWJsZSA9PT0gdW5kZWZpbmVkID8gdHJ1ZSA6IGlucHV0LmlzTXV0YWJsZTtcblxuICAgICAgZGVidWdMb2coJyMgaW5wdXQ6ICcsIGlucHV0KTtcbiAgICAgIGRlYnVnTG9nKCcjIGRhdGF2MjogJywgZGF0YXYyKTtcblxuICAgICAgY29uc3QgbWludCA9IEFjY291bnQuS2V5cGFpci5jcmVhdGUoKTtcblxuICAgICAgY29uc3QgaW5zdHJ1Y3Rpb25zID0gYXdhaXQgY3JlYXRlTWludChcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgZGF0YXYyLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICk7XG5cbiAgICAgIC8vIGZyZWV6ZUF1dGhvcml0eVxuICAgICAgaWYgKGZyZWV6ZUF1dGhvcml0eSkge1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgICBjcmVhdGVEZWxlYWdhdGUoXG4gICAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgICAgIGZyZWV6ZUF1dGhvcml0eS50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIC8vIGNvbGxlY3Rpb24gLS0tXG4gICAgICBpZiAoaW5wdXQuY29sbGVjdGlvbikge1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgICBjcmVhdGVWZXJpZnlTaXplZENvbGxlY3Rpb24oXG4gICAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBpbnB1dC5jb2xsZWN0aW9uLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3Qga2V5cGFpcnMgPSBbb3duZXIudG9LZXlwYWlyKCksIG1pbnQudG9LZXlwYWlyKCldO1xuXG4gICAgICAvLyBjcmVhdG9yIC0tLVxuICAgICAgaWYgKGlucHV0LmNyZWF0b3JzKSB7XG4gICAgICAgIGlucHV0LmNyZWF0b3JzLmZvckVhY2goKGNyZWF0b3IpID0+IHtcbiAgICAgICAgICBpZiAoQWNjb3VudC5LZXlwYWlyLmlzU2VjcmV0KGNyZWF0b3Iuc2VjcmV0KSkge1xuICAgICAgICAgICAgY29uc3QgY3JlYXRvclB1YmtleSA9IGNyZWF0b3IuYWRkcmVzcy50b1B1YmxpY0tleSgpO1xuICAgICAgICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZVZlcmlmeUNyZWF0b3IobWludC50b1B1YmxpY0tleSgpLCBjcmVhdG9yUHVia2V5KTtcbiAgICAgICAgICAgIGluc3RydWN0aW9ucy5wdXNoKGluc3QpO1xuICAgICAgICAgICAga2V5cGFpcnMucHVzaChjcmVhdG9yLnNlY3JldC50b0tleXBhaXIo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pb24uaW50b0luZnJhKGlucHV0LmNvbGxlY3Rpb24pO1xuICAgICAgICBkYXRhdjIgPSB7IC4uLmRhdGF2MiwgY29sbGVjdGlvbiB9O1xuICAgICAgfVxuICAgICAgLy8tLS0gY29sbGVjdGlvbiAtLS1cblxuICAgICAgY29uc3QgaXNNdXRhYmxlID0gaW5wdXQuaXNNdXRhYmxlID09PSB1bmRlZmluZWQgPyB0cnVlIDogaW5wdXQuaXNNdXRhYmxlO1xuXG4gICAgICBkZWJ1Z0xvZygnIyBpbnB1dDogJywgaW5wdXQpO1xuICAgICAgZGVidWdMb2coJyMgc2VsbGVyRmVlQmFzaXNQb2ludHM6ICcsIHNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgIGRlYnVnTG9nKCcjIGRhdGF2MjogJywgZGF0YXYyKTtcblxuICAgICAgY29uc3QgbWludCA9IEFjY291bnQuS2V5cGFpci5jcmVhdGUoKTtcbiAgICAgIGNvbnN0IGluc3RzID0gYXdhaXQgTWludC5jcmVhdGVNaW50KFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyUHVibGlja2V5LFxuICAgICAgICBkYXRhdjIsXG4gICAgICAgIGZlZVBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICk7XG5cbiAgICAgIC8vIGZyZWV6ZUF1dGhvcml0eVxuICAgICAgaWYgKG9wdGlvbnMuZnJlZXplQXV0aG9yaXR5KSB7XG4gICAgICAgIGluc3RzLnB1c2goXG4gICAgICAgICAgTWludC5jcmVhdGVEZWxlYWdhdGUoXG4gICAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBvd25lclB1YmxpY2tleSxcbiAgICAgICAgICAgIG9wdGlvbnMuZnJlZXplQXV0aG9yaXR5LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgYmxvY2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tleSxcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IGluc3RydWN0aW9ucyA9IGF3YWl0IE1pbnQuY3JlYXRlTWludChcbiAgICAgICAgY29sbGVjdGlvbk1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgIGRhdGF2MixcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICBpc011dGFibGUsXG4gICAgICApO1xuXG4gICAgICAvLyBmcmVlemVBdXRob3JpdHlcbiAgICAgIGlmIChmcmVlemVBdXRob3JpdHkpIHtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgICAgTWludC5jcmVhdGVEZWxlYWdhdGUoXG4gICAgICAgICAgICBjb2xsZWN0aW9uTWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgICAgICBmcmVlemVBdXRob3JpdHkudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBjb2xsZWN0aW9ucyA9IHtcbiAgICAgICAgY29sbGVjdGlvbk1ldGFkYXRhOiBjb2xsZWN0aW9uTWV0YWRhdGFBY2NvdW50LFxuICAgICAgICBjb2xsZWN0aW9uQXV0aG9yaXR5OiBvd25lci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgIGNvbGxlY3Rpb25NaW50OiBjb2xsZWN0aW9uTWludC50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICB9O1xuXG4gICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgY3JlYXRlU2V0Q29sbGVjdGlvblNpemVJbnN0cnVjdGlvbihjb2xsZWN0aW9ucywge1xuICAgICAgICAgIHNldENvbGxlY3Rpb25TaXplQXJnczoge1xuICAgICAgICAgICAgc2l6ZTogY29sbGVjdGlvblNpemUgfHwg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mVydGVyIiwgIkFjY291bnQiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlJlZ3VsYXJOZnQiLCAiU3BsVG9rZW4iLCAiUmVndWxhck5mdCIsICJDb252ZXJ0ZXIiLCAiQWNjb3VudCIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiZ2V0QXNzb2NpYXRlZFRva2VuQWRkcmVzc1N5bmMiLCAiUmVndWxhck5mdCIsICJBY2NvdW50IiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJSZWd1bGFyTmZ0IiwgIlNwbFRva2VuIiwgIlJlZ3VsYXJOZnQiLCAiUGhhbnRvbU1ldGFwbGV4IiwgIkNvbnZlcnRlciIsICJtaW50IiwgIkFjY291bnQiLCAiVHJhbnNhY3Rpb24iLCAiUmVndWxhck5mdCIsICJzaWciLCAiUmVndWxhck5mdCIsICJjcmVhdGVNaW50VG9DaGVja2VkSW5zdHJ1Y3Rpb24iLCAiVE9LRU5fUFJPR1JBTV9JRCIsICJUcmFuc2FjdGlvbiIsICJQaGFudG9tU3BsVG9rZW4iLCAiVHJhbnNhY3Rpb24iLCAiQWNjb3VudCIsICJjcmVhdGVNaW50VG9DaGVja2VkSW5zdHJ1Y3Rpb24iLCAiVE9LRU5fUFJPR1JBTV9JRCIsICJLZXlwYWlyIiwgIlRyYW5zYWN0aW9uIiwgIlBoYW50b21TcGxUb2tlbiIsICJUcmFuc2FjdGlvbiIsICJtaW50IiwgIktleXBhaXIiLCAiQ29udmVydGVyIiwgIlNwbFRva2VuIiwgInNpZyIsICJQaGFudG9tU3BsVG9rZW4iXQp9Cg== \ No newline at end of file diff --git a/packages/suite-phantom/tsconfig.json b/packages/suite-phantom/tsconfig.json index caca3a713..42108c777 100644 --- a/packages/suite-phantom/tsconfig.json +++ b/packages/suite-phantom/tsconfig.json @@ -1,7 +1,6 @@ { "$schema": "https://json.schemastore.org/tsconfig", "extends": "build-configs/tsconfig/base.json", - "display": "@solana-suite/phantom", "compilerOptions": { "paths": { @@ -10,10 +9,15 @@ ], "~/*": [ "../*/src/index.ts" - ], - "~/shared/exports": ["../shared/src/exports.ts"] + ] } }, - "include": ["src/**/*.ts", "test/**/*.ts"], - "exclude": ["node_modules", "dist"] + "include": [ + "src/**/*.ts", + "test/**/*.ts" + ], + "exclude": [ + "node_modules", + "dist" + ] } diff --git a/packages/suite-regular-nft/dist/index.js b/packages/suite-regular-nft/dist/index.js index 40d1f0057..ff1966491 100644 --- a/packages/suite-regular-nft/dist/index.js +++ b/packages/suite-regular-nft/dist/index.js @@ -37,7 +37,7 @@ module.exports = __toCommonJS(src_exports); // ../suite-spl-token/src/add.ts var import_spl_token2 = require("@solana/spl-token"); -// ../shared/src/constants.ts +// ../suite-utils/src/constants.ts var import_web3 = require("@solana/web3.js"); var import_load = __toESM(require("@solana-suite/config/load")); var Config = import_load.default; @@ -313,65 +313,6 @@ var TransactionBuilder; TransactionBuilder7.Common = Common2; })(TransactionBuilder || (TransactionBuilder = {})); -// ../shared/src/shared.ts -var overwriteObject = (object, targets) => { - const that = object; - targets.forEach((target) => { - delete that[target.existsKey]; - that[target.will.key] = target.will.value; - }); - return that; -}; -var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { - if (Constants.isDebugging === "true" || process.env.DEBUG === "true") { - console.log("[DEBUG]", data1, data2, data3, data4); - } -}; -var sleep = async (sec) => { - return new Promise((r) => setTimeout(r, sec * 1e3)); -}; -var isBrowser = () => { - return typeof window !== "undefined" && typeof window.document !== "undefined"; -}; -var isNode = () => { - return typeof process !== "undefined" && process.versions != null && process.versions.node != null; -}; -var isPromise = (obj) => { - return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; -}; -function Try(input, finallyInput) { - try { - const v = input(); - if (isPromise(v)) { - return v.then( - (x) => Result.ok(x), - (err) => Result.err(err) - ); - } else { - return Result.ok(v); - } - } catch (e) { - if (e instanceof Error) { - return Result.err(e); - } - return Result.err(Error(e)); - } finally { - if (finallyInput) { - debugLog("# finally input:", finallyInput); - finallyInput(); - } - } -} -var convertTimestampToDateTime = (created_at) => { - if (created_at) { - return new Date(created_at * 1e3); - } - return; -}; -var unixTimestamp = () => { - return Math.floor((/* @__PURE__ */ new Date()).getTime() / 1e3); -}; - // ../transaction-builder/src/batch.ts var TransactionBuilder2; ((TransactionBuilder7) => { @@ -826,7 +767,66 @@ var TransactionBuilder6 = { ...TransactionBuilder4 }; -// ../shared/src/result.ts +// ../suite-utils/src/shared.ts +var overwriteObject = (object, targets) => { + const that = object; + targets.forEach((target) => { + delete that[target.existsKey]; + that[target.will.key] = target.will.value; + }); + return that; +}; +var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { + if (Constants.isDebugging === "true" || process.env.DEBUG === "true") { + console.log("[DEBUG]", data1, data2, data3, data4); + } +}; +var sleep = async (sec) => { + return new Promise((r) => setTimeout(r, sec * 1e3)); +}; +var isBrowser = () => { + return typeof window !== "undefined" && typeof window.document !== "undefined"; +}; +var isNode = () => { + return typeof process !== "undefined" && process.versions != null && process.versions.node != null; +}; +var isPromise = (obj) => { + return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; +}; +function Try(input, finallyInput) { + try { + const v = input(); + if (isPromise(v)) { + return v.then( + (x) => Result.ok(x), + (err) => Result.err(err) + ); + } else { + return Result.ok(v); + } + } catch (e) { + if (e instanceof Error) { + return Result.err(e); + } + return Result.err(Error(e)); + } finally { + if (finallyInput) { + debugLog("# finally input:", finallyInput); + finallyInput(); + } + } +} +var convertTimestampToDateTime = (created_at) => { + if (created_at) { + return new Date(created_at * 1e3); + } + return; +}; +var unixTimestamp = () => { + return Math.floor((/* @__PURE__ */ new Date()).getTime() / 1e3); +}; + +// ../suite-utils/src/result.ts var AbstractResult = class { unwrap(ok, err) { const r = this._chain( @@ -938,15 +938,15 @@ var InternalErr = class extends AbstractResult { } }; var Result; -((Result24) => { +((Result25) => { function ok(value) { return new InternalOk(value); } - Result24.ok = ok; + Result25.ok = ok; function err(error) { return new InternalErr(error || Error()); } - Result24.err = err; + Result25.err = err; function all(obj) { if (Array.isArray(obj)) { const resArr = []; @@ -956,7 +956,7 @@ var Result; } resArr.push(item.value); } - return Result24.ok(resArr); + return Result25.ok(resArr); } const res = {}; const keys = Object.keys(obj); @@ -967,9 +967,9 @@ var Result; } res[key] = item.value; } - return Result24.ok(res); + return Result25.ok(res); } - Result24.all = all; + Result25.all = all; })(Result || (Result = {})); // ../converter/src/collection.ts @@ -2951,4 +2951,4 @@ var RegularNft10 = { 0 && (module.exports = { RegularNft }); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uLy4uL3N1aXRlLXNwbC10b2tlbi9zcmMvYWRkLnRzIiwgIi4uLy4uL3NoYXJlZC9zcmMvY29uc3RhbnRzLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2JhdGNoLnRzIiwgIi4uLy4uL25vZGUvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2NvbW1vbi50cyIsICIuLi8uLi9zaGFyZWQvc3JjL3NoYXJlZC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9taW50LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL3BhcnRpYWwtc2lnbi50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jYWxjdWxhdGUtdHhzaXplLnRzIiwgIi4uLy4uL2dsb2JhbC9zcmMvaW5kZXgudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvYXNzb2NpYXRlZC50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9rZXlwYWlyLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL3BkYS50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9pbmRleC50cyIsICIuLi8uLi90cmFuc2FjdGlvb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ogUHVia2V5LFxuICAgICAgZmVlUGF5ZXI6IFNlY3JldCxcbiAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSA9IGZhbHNlLFxuICAgICk6IFByb21pc2U8c3RyaW5nIHwgQ29tbW9uU3RydWN0dXJlPFB1YmtleT4+ID0+IHtcbiAgICAgIGNvbnN0IHJlcyA9IGF3YWl0IG1ha2VPckNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICBtaW50LFxuICAgICAgICBvd25lcixcbiAgICAgICAgbmV3IEtleXBhaXIuS2V5cGFpcih7IHNlY3JldDogZmVlUGF5ZXIgfSkucHVia2V5LFxuICAgICAgICBhbGxvd093bmVyT2ZmQ3VydmUsXG4gICAgICApO1xuXG4gICAgICBpZiAoIXJlcy5pbnN0KSB7XG4gICAgICAgIHJldHVybiByZXMudG9rZW5BY2NvdW50O1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb248UHVia2V5PihcbiAgICAgICAgW3Jlcy5pbnN0XSxcbiAgICAgICAgW10sXG4gICAgICAgIGZlZVBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICByZXMudG9rZW5BY2NvdW50ISxcbiAgICAgICk7XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIFJldHJ5IGZ1bmN0aW9uIGlmIGNyZWF0ZSBuZXcgdG9rZW4gYWNjb3VpbnRcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBtaW50XG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAgICogQHBhcmFtIHtTZWNyZXR9IGZlZVBheWVyXG4gICAgICogQHJldHVybnMgUHJvbWlzZTxzdHJpbmc+XG4gICAgICovXG4gICAgZXhwb3J0IGNvbnN0IHJldHJ5R2V0T3JDcmVhdGUgPSBhc3luYyAoXG4gICAgICBtaW50OiBQdWJrZXksXG4gICAgICBvd25lcjogUHVia2V5LFxuICAgICAgZmVlUGF5ZXI6IFNlY3JldCxcbiAgICApOiBQcm9taXNlPHN0cmluZz4gPT4ge1xuICAgICAgbGV0IGNvdW50ZXIgPSAxO1xuICAgICAgd2hpbGUgKGNvdW50ZXIgPCBSRVRSWV9PVkVSX0xJTUlUKSB7XG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgY29uc3QgaW5zdCA9IGF3YWl0IGdldChtaW50LCBvd25lciwgZmVlUGF5ZXIsIHRydWUpO1xuXG4gICAgICAgICAgaWYgKGluc3QgJiYgdHlwZW9mIGluc3QgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICBkZWJ1Z0xvZygnIyBhc3NvY2lhdGVkVG9rZW5BY2NvdW50OiAnLCBpbnN0KTtcbiAgICAgICAgICAgIHJldHVybiBpbnN0O1xuICAgICAgICAgIH0gZWxzZSBpZiAoaW5zdCBpbnN0YW5jZW9mIFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb24pIHtcbiAgICAgICAgICAgIChhd2FpdCBpbnN0LnN1Ym1pdCgpKS5tYXAoXG4gICAgICAgICAgICAgIGFzeW5jIChvazogc3RyaW5nKSA9PiB7XG4gICAgICAgICAgICAgICAgYXdhaXQgTm9kZS5jb25maXJtZWRTaWcob2spO1xuICAgICAgICAgICAgICAgIHJldHVybiBpbnN0LmRhdGE7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIChlcnI6IEVycm9yKSA9PiB7XG4gICAgICAgICAgICAgICAgZGVidWdMb2coJyMgRXJyb3Igc3VibWl0IHJldHJ5R2V0T3JDcmVhdGU6ICcsIGVycik7XG4gICAgICAgICAgICAgICAgdGhyb3cgZXJyO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICBkZWJ1Z0xvZyhgIyByZXRyeTogJHtjb3VudGVyfSBjcmVhdGUgdG9rZW4gYWNjb3VudDogYCwgZSk7XG4gICAgICAgICAgZGVidWdMb2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KSxcbiAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgYWxsb3dPd25lck9mZkN1cnZlLFxuICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICBBU1NPQ0lBVEVEX1RPS0VOX1BST0dSQU1fSUQsXG4gICAgICApO1xuXG4gICAgICBkZWJ1Z0xvZygnIyBhc3NvY2lhdGVkVG9rZW5BY2NvdW50OiAnLCBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCkpO1xuXG4gICAgICB0cnkge1xuICAgICAgICAvLyBEb250IHVzZSBSZXN1bHRcbiAgICAgICAgYXdhaXQgZ2V0QWNjb3VudChcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLmNvbW1pdG1lbnQsXG4gICAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICB0b2tlbkFjY291bnQ6IGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSxcbiAgICAgICAgICBpbnN0OiB1bmRlZmluZWQsXG4gICAgICAgIH07XG4gICAgICB9IGNhdGNoIChlcnJvcjogdW5rbm93bikge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuQWNjb3VudE5vdEZvdW5kRXJyb3IpICYmXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuSW52YWxpZEFjY291bnRPd25lckVycm9yKVxuICAgICAgICApIHtcbiAgICAgICAgICB0aHJvdyBFcnJvcignVW5leHBlY3RlZCBlcnJvcicpO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgcGF5ZXIgPSAhZmVlUGF5ZXIgPyBvd25lciA6IGZlZVBheWVyO1xuXG4gICAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVBc3NvY2lhdGVkVG9rZW5BY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgcGF5ZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdCxcbiAgICAgICAgfTtcbiAgICAgIH1cbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHsgS2V5cGFpciBhcyBPcmlnaW5hbCwgUHVibGljS2V5IH0gZnJvbSAnQHNvbGFuYS93ZWIzLmpzJztcbmltcG9ydCB7IFB1YmtleSwgU2VjcmV0IH0gZnJvbSAnfi90eXBlcy9hY2NvdW50JztcbmltcG9ydCBicyBmcm9tICdiczU4JztcblxuZXhwb3J0IG5hbWVzcGFjZSBBY2NvdW50IHtcbiAgZXhwb3J0IGNsYXNzIEtleXBhaXIge1xuICAgIHNlY3JldDogU2VjcmV0O1xuICAgIHB1YmtleTogUHVia2V5O1xuXG4gICAgY29uc3RydWN0b3IocGFyYW1zOiB7IHB1YmtleT86IFB1YmtleTsgc2VjcmV0OiBTZWNyZXQgfSkge1xuICAgICAgaWYgKCFwYXJhbXMucHVia2V5KSB7XG4gICAgICAgIGNvbnN0IGtleXBhaXIgPSBwYXJhbXMuc2VjcmV0LnRvS2V5cGFpcigpO1xuICAgICAgICB0aGlzLnB1YmtleSA9IGtleXBhaXIucHVibGljS2V5LnRv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3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEuc3ltYm9sKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU3ltYm9sKG1ldGFkYXRhLnN5bWJvbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAocmVzICYmIHJlcy5pc0Vycikge1xuICAgICAgICAgIHJlc3VsdHMucHVzaCguLi5yZXMuZXJyb3IuZGV0YWlscyk7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgICAgaWYgKHJlc3VsdHMubGVuZ3RoID4gMCkge1xuICAgICAgICBjb25zdCBtZXNzYWdlID1cbiAgICAgICAgICAnQ2F1Z2h0IGluIHRoZSB2YWxpZGF0aW9uIGVycm9ycy4gc2VlIGluZm9ybWF0aW9uIGUuZzogZXJyPFZhbGlkYXRvckVycm9yPi5kZXRh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4gICAgICAgIH0sXG4gICAgICApO1xuXG4gICAgICBjb25zdCBkYXRhcyA9IGluZm8udmFsdWUubWFwKGFzeW5jIChkKSA9PiB7XG4gICAgICAgIGNvbnN0IG1pbnQgPSBkLmFjY291bnQuZGF0YS5wYXJzZWQuaW5mby5taW50IGFzIFB1YmtleTtcbiAgICAgICAgY29uc3QgdG9rZW5BbW91bnQgPSBkLmFjY291bnQuZGF0YS5wYXJzZWQuaW5mby50b2tlbkFtb3VudFxuICAgICAgICAgIC5hbW91bnQgYXMgc3RyaW5nO1xuICAgICAgICBpZiAodG9rZW5BbW91bnQgPT09ICcxJykge1xuICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gTWV0YWRhdGEuZnJvbUFjY291bnRBZGRyZXNzKFxuICAgICAgICAgIGNvbm5lY3Rpb24sXG4gICAgICAgICAgQWNjb3VudC5QZGEuZ2V0TWV0YWRhdGEobWludCksXG4gICAgICAgIClcbiAgICAgICAgICAudGhlbihhc3luYyAobWV0YWRhdGEpID0+IHtcbiAgICAgICAgICAgIC8qIGVzbGludC1kaXNhYmxlIEB0eXBlc2NyaXB0LWVzbGludC9uby1leHBsaWNpdC1hbnkgKi9cbiAgICAgICAgICAgIHJldHVybiBmZXRjaFJldHJ5KG1ldGFkYXRhLmRhdGEudXJpKS50aGVuKChqc29uOiBhbnkpID0+IHtcbiAgICAgICAgICAgICAgcmV0dXJuIGNvbnZlcnRlcihtZXRhZGF0YSwganNvbiwgdG9rZW5BbW91bnQpO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfSlcbiAgICAgICAgICAuY2F0Y2goKGVycikgPT4gZGVidWdMb2coJyMgW0ZldGNoIGVycm9yXScsIGVycikpO1xuICAgICAgfSk7XG5cbiAgICAgIGNvbnN0IGZpbHRlcnMgPSAoYXdhaXQgUHJvbWlzZS5hbGwoZGF0YXMpKS5maWx0ZXIoXG4gICAgICAgIChkYXRhKSA9PiBkYXRhICE9PSB1bmRlZ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udEluc3RydWN0aW9uKFxuICAgICAgICBmZWVQYXllcixcbiAgICAgICAgdG9rZW5Bc3NvY2lhdGVkLFxuICAgICAgICBvd25lcixcbiAgICAgICAgbWludCxcbiAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlTWludFRvQ2hlY2tlZEluc3RydWN0aW9uKFxuICAgICAgICBtaW50LFxuICAgICAgICB0b2tlbkFzc29jaWF0ZWQsXG4gICAgICAgIG93bmVyLFxuICAgICAgICBDYWxjdWxhdGUuY2FsY3VsYXRlQW1vdW50KHRvdGFsQW1vdW50LCBtaW50RGVjaW1hbCksXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgKSxcbiAgICApO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVDcmVhdGVNZXRhZGF0YUFjY291bnRWM0luc3RydWN0aW9uKFxuICAgICAgICB7XG4gICAgICAgICAgbWV0YWRhdGE6IG1ldGFkYXRhUGRhLFxuICAgICAgICAgIG1pbnQsXG4gICAgICAgICAgbWludEF1dGhvcml0eTogb3duZXIsXG4gICAgICAgICAgcGF5ZXI6IGZlZVBheWVyLFxuICAgICAgICAgIHVwZGF0ZUF1dGhvcml0eTogb3duZXIsXG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICBjcmVhdGVNZXRhZGF0YUFjY291bnRBcmdzVjM6IHtcbiAgICAgICAgICAgIGRhdGE6IHRva2VuTWV0YWRhdGEsXG4gICAgICAgICAgICBpc011dGFibGUsXG4gICAgICAgICAgICBjb2xsZWN0aW9uRGV0YWlsczogbnVsbCxcbiAgICAgICAgICB9LFxuICAgICAgICB9LFxuICAgICAgKSxcbiAgICApO1xuICAgIHJldHVybiBpbnN0cnVjdGlvbnM7XG4gIH07XG5cbiAgLyoqXG4gICAqIFNQTC1UT0tFTiBtaW50XG4gICAqXG4gICAqIEBwYXJhbSB7U2VjcmV0fSBvd25lciA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VkID0gYXdhaXQgU3RvcmFnZS51cGxvYWREYXRhKFxuICAgICAgICAgIHsgLi4uc3RvcmFnZU1ldGFkYXRhLCAuLi5pbWFnZSB9LFxuICAgICAgICAgIHN0b3JhZ2VUeXBlLFxuICAgICAgICAgIHBheWVyLFxuICAgICAgICApO1xuICAgICAgICBpZiAodXBsb2FkZWQuaXNFcnIpIHtcbiAgICAgICAgICB0aHJvdyB1cGxvYWRlZDtcbiAgICAgICAgfVxuICAgICAgICB1cmkgPSB1cGxvYWRlZC52YWx1ZTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHRocm93IEVycm9yKGBNdXN0IHNldCBmaWxlUGF0aCcgb3IgJ3VyaSdgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgaXNNdXRhYmxlID0gdHJ1ZTtcblxuICAgICAgY29uc3QgZGF0YXYyID0gQ29udmVydGVyLlRva2VuTWV0YWRhdGEuaW50b0luZnJhKFxuICAgICAgICBpbnB1dCxcbiAgICAgICAgdXJpLFxuICAgICAgICBzZWxsZXJGZWVCYXNpc1BvaW50cyxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGRhdGF2MjogJywgZGF0YXYyKTtcbiAgICAgIGRlYnVnTG9nKCcjIHVwbG9hZCBjb250ZW50IHVybDogJywgdXJpKTtcblxuICAgICAgY29uc3QgbWludCA9IEFjY291bnQuS2V5cGFpci5jcmVhdGUoKTtcbiAgICAgIGNvbnN0IGluc3RzID0gYXdhaXQgY3JlYXRlTWludChcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgdG90YWxBbW91bnQsXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICBkYXRhdjIsXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgKTtcblxuICAgICAgLy8gZnJlZXplQXV0aG9yaXR5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AgIG9mZmNoYWluOiBvZmZjaGFpbixcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICByZXR1cm4gQ29udmVydGVyLk5mdC5pbnRvVXNlcihtZXJnZWQpO1xuICAgICAgICAgIH0gY2F0Y2ggKGVycikge1xuICAgICAgICAgICAgZGVidWdMb2coJyMgRmFpbGVkIGZldGNoIG9mZmNoYWluIHVybDogJywgaXRlbS5jb250ZW50Lmpzb25fdXJpKTtcbiAgICAgICAgICAgIHJldHVybiBDb252ZXJ0ZXIuTmZ0LmludG9Vc2VyKHtcbiAgICAgICAgICAgICAgb25jaGFpbjogaXRlbSxcbiAgICAgICAgICAgICAgb2ZmY2hhaW46IHt9LFxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfVxuICAgICAgICB9KSxcbiAgICApO1xuICAgIHJldHVybiB7XG4gICAgICBwYWdlOiBhc3NldHMudmFsdWUucGFnZSxcbiAgICAgIHRvdGFsOiBhc3NldHMudmFsdWUudG90YWwsXG4gICAgICBsaW1pdDogYXNzZXRzLnZhbHVlLmxpbWl0LFxuICAgICAgbWV0YWRhdGFzLFxuICAgIH07XG4gIH07XG5cbiAgLyoqXG4gICAqIEZpbmQgbmZ0IGJ5IGNvbGxlY3Rpb24gbWludFxuICAgKlxuICAgKiBAcGFyYW0ge1B1YmtleX0gY29sbGVjdGlvbk1pbnRcbiAgICogQHBhcmFtIHtib29sZWFufSBpc0NvbXByZXNzZWQsXG4gICAqIEBwYXJhbSB7UGFydGlhbDxGaW5kT3B0aW9ucz59IG9wdGlvbnNcbiAgICogQHJldHVybiBQcm9taXNlPFJlc3VsdDxDb21wcmVzc2VkTmZ0TWV0YWRhdGEsIEVycm9yPj5cbiAgICovXG4gIGV4cG9ydCBjb25zdCBmaW5kQnlDb2xsZWN0aW9uID0gYXN5bmMgKFxuICAgIGNvbGxlY3Rpb25NaW50OiBQdWJrZXksXG4gICAgaXNDb21wcmVzc2VkOiBib29sZWFuLFxuICAgIG9wdGlvbnM6IFBhcnRpY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3JlYXRlTWV0YWRhdGFBY2NvdW50VjNJbnN0cnVjdGlvbihcbiAgICAgICAge1xuICAgICAgICAgIG1ldGFkYXRhOiB0b2tlbk1ldGFkYXRhUHVia2V5LFxuICAgICAgICAgIG1pbnQsXG4gICAgICAgICAgbWludEF1dGhvcml0eTogb3duZXIsXG4gICAgICAgICAgcGF5ZXI6IGZlZVBheWVyLFxuICAgICAgICAgIHVwZGF0ZUF1dGhvcml0eTogb3duZXIsXG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICBjcmVhdGVNZXRhZGF0YUFjY291bnRBcmdzVjM6IHtcbiAgICAgICAgICAgIGRhdGE6IG5mdE1ldGFkYXRhLFxuICAgICAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgICAgICAgY29sbGVjdGlvbkRldGFpbHM6IG51bGwsXG4gICAgICAgICAgfSxcbiAgICAgICAgfSxcbiAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlQ3JlYXRlTWFzdGVyRWRpdGlvblYzSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHtcbiAgICAgICAgICBlZGl0aW9uOiBtYXN0ZXJFZGl0aW9uUHVia2V5LFxuICAgICAgICAgIG1pbnQsXG4gICAgICAgICAgdXBkYXRlQXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBtaW50QXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBwYXllcjogZmVlUGF5ZXIsXG4gICAgICAgICAgbWV0YWRhdGE6IHRva2VuTWV0YWRhdGFQdWJrZXksXG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICBjcmVhdGVNYXN0ZXJFZGl0aW9uQXJnczoge1xuICAgICAgICAgICAgbWF4U3VwcGx5OiAwLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICApLFxuICAgICk7XG4gICAgcmV0dXJuIGluc3RydWN0aW9ucztcbiAgfTtcblxuICAvKipcb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11c3Qgc2V0IGZpbGVQYXRoJyBvciAndXJpJ2ApO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBkYXRhdjIgPSBDb252ZXJ0ZXIuUmVndWxhck5mdE1ldGFkYXRhLmludG9JbmZyYShcbiAgICAgICAgaW5wdXQsXG4gICAgICAgIHVyaSxcbiAgICAgICAgc2VsbGVyRmVlQmFzaXNQb2ludHMsXG4gICAgICApO1xuXG4gICAgICBjb25zdCBpc011dGFibGUgPSBpbnB1dC5pc011dGFibGUgPT09IHVuZGVmaW5lZCA/IHRydWUgOiBpbnB1dC5pc011dGFibGU7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGlucHV0OiAnLCBpbnB1dCk7XG4gICAgICBkZWJ1Z0xvZygnIyBkYXRhdjI6ICcsIGRhdGF2Mik7XG5cbiAgICAgIGNvbnN0IG1pbnQgPSBBY2NvdW50LktleXBhaXIuY3JlYXRlKCk7XG5cbiAgICAgIGNvbnN0IGluc3RydWN0aW9ucyA9IGF3YWl0IGNyZWF0ZU1pbnQoXG4gICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgIGRhdGF2MixcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICBpc011dGFibGUsXG4gICAgICApO1xuXG4gICAgICAvLyBmcmVlemVBdXRob3JpdHlcbiAgICAgIGlmIChmcmVlemVBdXRob3JpdHkpIHtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgICAgY3JlYXRlRGVsZWFnYXRlKFxuICAgICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgICAgICBmcmVlemVBdXRob3JpdHkudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICAvLyBjb2xsZWN0aW9uIC0tLVxuICAgICAgaWYgKGlucHV0LmNvbGxlY3Rpb24pIHtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgICAgY3JlYXRlVmVyaWZ5U2l6ZWRDb2xsZWN0aW9uKFxuICAgICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgaW5wdXQuY29sbGVjdGlvbi50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGtleXBhaXJzID0gW293bmVyLnRvS2V5cGFpcigpLCBtaW50LnRvS2V5cGFpcigpXTtcblxuICAgICAgLy8gY3JlYXRvciAtLS1cbiAgICAgIGlmIChpbnB1dC5jcmVhdG9ycykge1xuICAgICAgICBpbnB1dC5jcmVhdG9ycy5mb3JFYWNoKChjcmVhdG9yKSA9PiB7XG4gICAgICAgICAgaWYgKEFjY291bnQuS2V5cGFpci5pc1NlY3JldChjcmVhdG9yLnNlY3JldCkpIHtcbiAgICAgICAgICAgIGNvbnN0IGNyZWF0b3JQdWJrZXkgPSBjcmVhdG9yLmFkZHJlc3MudG9QdWJsaWNLZXkoKTtcbiAgICAgICAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVWZXJpZnlDcmVhdG9yKG1pbnQudG9QdWJsaWNLZXkoKSwgY3JlYXRvclB1YmtleSk7XG4gICAgICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChpbnN0KTtcbiAgICAgICAgICAgIGtleXBhaXJzLnB1c2goY3JlYXRvci5zZWNyZXQudG9LZXlwYWlyKCkpO1xuICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBuZXcgVHJhbnNhY3Rpb25CdWlsZGVyLk1pbnQoXG4gICAgICAgIGluc3RydWN0aW9ucyxcbiAgICAgICAga2V5cGFpcnMsXG4gICAgICA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hdjIsXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgKTtcblxuICAgICAgLy8gZnJlZXplQXV0aG9yaXR5XG4gICAgICBpZiAoZnJlZXplQXV0aG9yaXR5KSB7XG4gICAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICAgIE1pbnQuY3JlYXRlRGVsZWFnYXRlKFxuICAgICAgICAgICAgY29sbGVjdGlvbk1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICAgICAgZnJlZXplQXV0aG9yaXR5LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgY29sbGVjdGlvbnMgPSB7XG4gICAgICAgIGNvbGxlY3Rpb25NZXRhZGF0YTogY29sbGVjdGlvbk1ldGFkYXRhQWNjb3VudCxcbiAgICAgICAgY29sbGVjdGlvbkF1dGhvcml0eTogb3duZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICBjb2xsZWN0aW9uTWludDogY29sbGVjdGlvbk1pbnQudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgfTtcblxuICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgIGNyZWF0ZVNldENvbGxlY3Rpb25TaXplSW5zdHJ1Y3Rpb24oY29sbGVjdGlvbnMsIHtcbiAgICAgICAgICBzZXRDb2xsZWN0aW9uU2l6ZUFyZ3M6IHtcbiAgICAgICAgICAgIHNpemU6IGNvbGxlY3Rpb25TaXplIHx8IERFRkFVTFRfQ09MTEVDVElPTl9TSVpFLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0pLFxuICAgICAgKTtcblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuTWludChcbiAgICAgICAgaW5zdHJ1Y3Rpb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BuYW1lc3BhY2UgQXNzb2NpYXRlZCB7XG4gICAgY29uc3QgUkVUUllfT1ZFUl9MSU1JVCA9IDEwO1xuICAgIGNvbnN0IFJFVFJZX1NMRUVQX1RJTUUgPSAzO1xuICAgIC8vQGludGVybmFsXG4gICAgY29uc3QgZ2V0ID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyOiBTZWNyZXQsXG4gICAgICBhbGxvd093bmVyT2ZmQ3VydmUgPSBmYWxzZSxcbiAgICApOiBQcm9taXNlPHN0cmluZyB8IENvbW1vblN0cnVjdHVyZTxQdWJrZXk+PiA9PiB7XG4gICAgICBjb25zdCByZXMgPSBhd2FpdCBtYWtlT3JDcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIG5ldyBLZXlwYWlyLktleXBhaXIoeyBzZWNyZXQ6IGZlZVBheWVyIH0pLnB1YmtleSxcbiAgICAgICAgYWxsb3dPd25lck9mZkN1cnZlLFxuICAgICAgKTtcblxuICAgICAgaWYgKCFyZXMuaW5zdCkge1xuICAgICAgICByZXR1cm4gcmVzLnRva2VuQWNjb3VudDtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uPFB1YmtleT4oXG4gICAgICAgIFtyZXMuaW5zdF0sXG4gICAgICAgIFtdLFxuICAgICAgICBmZWVQYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgcmVzLnRva2VuQWNjb3VudCEsXG4gICAgICApO1xuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiBSZXRyeSBmdW5jdGlvbiBpZiBjcmVhdGUgbmV3IHRva2VuIGFjY291aW50XG4gICAgICpcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gbWludFxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBvd25lclxuICAgICAqIEBwYXJhbSB7U2VjcmV0fSBmZWVQYXllclxuICAgICAqIEByZXR1cm5zIFByb21pc2U8c3RyaW5nPlxuICAgICAqL1xuICAgIGV4cG9ydCBjb25zdCByZXRyeUdldE9yQ3JlYXRlID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyOiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxzdHJpbmc+ID0+IHtcbiAgICAgIGxldCBjb3VudGVyID0gMTtcbiAgICAgIHdoaWxlIChjb3VudGVyIDwgUkVUUllfT1ZFUl9MSU1JVCkge1xuICAgICAgICB0cnkge1xuICAgICAgICAgIGNvbnN0IGluc3QgPSBhd2FpdCBnZXQobWludCwgb3duZXIsIGZlZVBheWVyLCB0cnVlKTtcblxuICAgICAgICAgIGlmIChpbnN0ICYmIHR5cGVvZiBpbnN0ID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgaW5zdCk7XG4gICAgICAgICAgICByZXR1cm4gaW5zdDtcbiAgICAgICAgICB9IGVsc2UgaWYgKGluc3QgaW5zdGFuY2VvZiBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uKSB7XG4gICAgICAgICAgICAoYXdhaXQgaW5zdC5zdWJtaXQoKSkubWFwKFxuICAgICAgICAgICAgICBhc3luYyAob2s6IHN0cmluZykgPT4ge1xuICAgICAgICAgICAgICAgIGF3YWl0IE5vZGUuY29uZmlybWVkU2lnKG9rKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gaW5zdC5kYXRhO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAoZXJyOiBFcnJvcikgPT4ge1xuICAgICAgICAgICAgICAgIGRlYnVnTG9nKCcjIEVycm9yIHN1Ym1pdCByZXRyeUdldE9yQ3JlYXRlOiAnLCBlcnIpO1xuICAgICAgICAgICAgICAgIHRocm93IGVycjtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgZGVidWdMb2coYCMgcmV0cnk6ICR7Y291bnRlcn0gY3JlYXRlIHRva2VuIGFjY291bnQ6IGAsIGUpO1xuICAgICAgICAgIGRlYnVnTG9nKGAjIG1pbnQ6ICR7bWludH0sIG93bmVyOiAke293bmVyfSwgZmVlUGF5ZXI6ICR7ZmVlUGF5ZXJ9YCk7XG4gICAgICAgIH1cbiAgICAgICAgYXdhaXQgc2xlZXAoUkVUUllfU0xFRVBfVElNRSk7XG4gICAgICAgIGNvdW50ZXIrKztcbiAgICAgIH1cbiAgICAgIHRocm93IEVycm9yKGByZXRyeSBhY3Rpb24gaXMgb3ZlciBsaW1pdCAke1JFVFJZX09WRVJfTElNSVR9YCk7XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIFtNYWluIGxvZ2ljXUdldCBBc3NvY2lhdGVkIHRva2VuIEFjY291bnQuXG4gICAgICogaWYgbm90IGNyZWF0ZWQsIGNyZWF0ZSBuZXcgdG9rZW4gYWNjb3VpbnRcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBtaW50XG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAgICogQHBhcmFtIHtQdWJrZXl9IGZlZVBheWVyXG4gICAgICogQHJldHVybnMgUHJvbWlzZTxzdHJpbmc+XG4gICAgICovXG4gICAgZXhwb3J0IGNvbnN0IG1ha2VPckNyZWF0ZUluc3RydWN0aW9uID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyPzogUHVia2V5LFxuICAgICAgYWxsb3dPd25lck9mZkN1cnZlID0gZmFsc2UsXG4gICAgKTogUHJvbWlzZTx7XG4gICAgICB0b2tlbkFjY291bnQ6IHN0cmluZztcbiAgICAgIGluc3Q6IFRyYW5zYWN0aW9uSW5zdHJ1Y3Rpb24gfCB1bmRlZmluZWQ7XG4gICAgfT4gPT4ge1xuICAgICAgY29uc3QgYXNzb2NpYXRlZFRva2VuQWNjb3VudCA9IGdldEFzc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jKFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSxcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3QsXG4gICAgICAgIH07XG4gICAgICB9XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IEtleXBhaXIgYXMgT3JpZ2luYWwsIFB1YmxpY0tleSB9IGZyb20gJ0Bzb2xhbmEvd2ViMy5qcyc7XG5pbXBvcnQgeyBQdWJrZXksIFNlY3JldCB9IGZyb20gJ34vdHlwZXMvYWNjb3VudCc7XG5pbXBvcnQgYnMgZnJvbSAnYnM1OCc7XG5cbmV4cG9ydCBuYW1lc3BhY2UgQWNjb3VudCB7XG4gIGV4cG9ydCBjbGFzcyBLZXlwYWlyIHtcbiAgICBzZWNyZXQ6IFNlY3JldDtcbiAgICBwdWJrZXk6IFB1YmtleTtcblxuICAgIGNvbnN0cnVjdG9yKHBhcmFtczogeyBwdWJrZXk/OiBQdWJrZXk7IHN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E9wdGlvbjxJbnRlcm5hbENyZWF0b3JzW10+ID0+IHtcbiAgICAgIGlmICghaW5wdXQpIHtcbiAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICB9XG4gICAgICByZXR1cm4gaW5wdXQubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvQ29tcHJlc3NlZE5mdEluZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IEludGVybmFsQ3JlYXRvcnNbXSA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBbXTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBpbnB1dCEubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlciA9IChcbiAgICAgIG91dHB1dDogT3B0aW9uPEludGVybmFsQ3JlYXRvcnNbXT4sXG4gICAgKTogQ3JlYXRvcnNbXSB8IHVuZGVmaW5lZCA9PiB7XG4gICAgICBpZiAoIW91dHB1dCkge1xuICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gb3V0cHV0Lm1hcCgoZGF0YS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3JhZ2VUeXBlLFxuICAgICAgICBmZWVQYXllcj86IFNlY3JldCxcbiAgICAgICkgPT4gUHJvbWlzZTxSZXN1bHQ8c3RyaW5nLCBFcnJvcj4+LFxuICAgICAgc3RvcmFnZVR5cGU6IFN0b3JhZ2VUeXBlLFxuICAgICAgZmVlUGF5ZXI/OiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxQcm9wZXJ0aWVzPiA9PiB7XG4gICAgICBpZiAoIWlucHV0IHx8ICFpbnB1dC5maWxlcykge1xuICAgICAgICByZXR1cm4ge307XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGZpbGVzID0gYXdhaXQgUHJvbWlzZS5hbGwoXG4gICAgICAgIGlucHV0LmZpbGVzLm1hcChhc3luYyAoZmlsZSkgPT4ge1xuICAgICAgICAgIGlmICghZmlsZS5maWxlUGF0aCkge1xuICAgICAgICAgICAgcmV0dXJuIHt9O1xuICAgICAgICAgIH1cbiAgICAgICAgICBjb25zdCByZXMgPSBhd2FpdCBjYWxsYmFja0Z1bmMoZmlsZS5maWxlUGF0aCwgc3RvcmFnZVR5cGUsIGZlZVBheWVyKTtcbiAgICAgICAgICBpZiAocmVzLmlzRXJyKSB7XG4gICAgICAgICAgICB0aHJvdyBFcnJvcihyZXMuZXJyb3IubWVzc2FnZSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBvdmVyd3JpdGVPYmplY3QoZmlsZSwgW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBleGlzdHNLZXk6ICdmaWxlUGF0aCcsXG4gICAgICAgICAgICAgIHdpbGw6IHsga2V5OiAndXJpJywgdmFsdWU6IHJlcy52YWx1ZSB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICBdKTtcbiAgICAgICAgfSksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHsgLi4uaW5wdXQsIGZpbGVzIH0gYXMgUHJvcGVydGllcztcbiAgICB9O1xuICB9XG59XG4iLCAiLyogZXNsaW50LWRpc2Fib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PYmplY3Qua2V5cyhtZXRhZGF0YSk7XG4gICAgICBjb25zdCByZXN1bHRzOiBEZXRhaWxzW10gPSBbXTtcbiAgICAgIGtleXMubWFwKChrZXkpID0+IHtcbiAgICAgICAgbGV0IHJlcyE6IFJlc3VsdDxzdHJpbmcsIFZhbGlkYXRvckVycm9yPjtcbiAgICAgICAgc3dpdGNoIChrZXkpIHtcbiAgICAgICAgICBjYXNlICdpbWFnZSc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLmltYWdlKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzSW1hZ2VVcmwobWV0YWRhdGEuaW1hZ2UpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAncm95YWx0eSc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnJveWFsdHkpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNSb3lhbHR5KG1ldGFkYXRhLnJveWFsdHkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEuc3ltYm9sKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU3ltYm9sKG1ldGFkYXRhLnN5bWJvbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAocmVzICYmIHJlcy5pc0Vycikge1xuICAgICAgICAgIHJlc3VsdHMucHVzaCguLi5yZXMuZXJyb3IuZGV0YWlscyk7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgICAgaWYgKHJlc3VsdHMubGVuZ3RoID4gMCkge1xuICAgICAgICBjb25zdCBtZXNzYWdlID1cbiAgICAgICAgICAnQ2F1Z2h0IGluIHRoZSB2YWxpZGF0aW9uIGVycm9ycy4gc2VlIGluZm9ybWF0aW9uIGUuZzogZXJyPFZhbGlkYXRvckVycm9yPi5kZXRhaWxzJztcbiAgICAgICAgdGhyb3cgbmV3IFZhbGlkYXRvckVycm9yKG1lc3NhZ2UsIHJlc3VsdHMpO1xuICAgICAgfVxuICAgICAgcmV0dXJuIE1lc3NhZ2UuU1VDQ0VTUztcbiAgICB9KTtcbiAgfTtcblxuICB0eXBlIFBpY2tOZnRTdG9yYWdlID0gUGljazxcbiAgICBPZmZjaGFpbixcbiAgICAnbmFtZScgfCAnc3ltYm9sJyB8ICdpbWFnZScgfCAnc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMnXG4gID47XG4gIHR5cGUgUGlja05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uICAgICAgICBibG9ja2hhc2g6IGJsb2NraGFzaE9iai5ibG9ja2hhc2gsXG4gICAgICAgIGZlZVBheWVyOiBmZWVQYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgfSk7XG5cbiAgICAgIC8vIHJldHVybiBhc3NvY2lhdGVkIHRva2VuIGFjY291bnRcbiAgICAgIGlmICghZGVzdFRva2VuLmluc3QpIHtcbiAgICAgICAgaW5zdDIgPSBjcmVhdGVUcmFuc2ZlckNoZWNrZWRJbnN0cnVjdGlvbihcbiAgICAgICAgICBzb3VyY2VUb2tlbi50b2tlbkFjY291bnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgZGVzdFRva2VuLnRva2VuQWNjb3VudC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICAgIENhbGN1bGF0b3IuY2FsY3VsYXRlQW1vdW50KGFtb3VudCwgbWludERlY2ltYWwpLFxuICAgICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICAgIFtvd25lci50b0tleXBhaXIoKV0sXG4gICAgICAgICk7XG4gICAgICAgIHR4LmFkZChpbnN0Mik7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICAvLyByZXR1cm4gaW5zdHJ1Y3Rpb24gYW5kIHVuZGVjaWRlZCBhc3NvY2lhdGVkIHRva2VuIGFjY291bnRcbiAgICAgICAgaW5zdDIgPSBjcmVhdGVUcmFuc2ZlckNoZWNrZWRJbnN0cnVjdGlvbihcbiAgICAgICAgICBzb3VyY2VUb2tlbi50b2tlbkFjY291bnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgZGVzdFRva2VuLnRva2VuQWNjb3VudC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICAgIENhbGN1bGF0b3IuY2FsY3VsYXRlQW1v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WRhdGEobWludC50b1N0cmluZygpKTtcbiAgICBjb25zdCB0b2tlbkFzc29jaWF0ZWQgPSBnZXRBc3NvY2lhdGVkVG9rZW5BZGRyZXNzU3luYyhtaW50LCBvd25lcik7XG4gICAgY29uc3QgaW5zdHJ1Y3Rpb25zID0gW107XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIFN5c3RlbVByb2dyYW0uY3JlYXRlQWNjb3VudCh7XG4gICAgICAgIGZyb21QdWJrZXk6IGZlZVBheWVyLFxuICAgICAgICBuZXdBY2NvdW50UHVia2V5OiBtaW50LFxuICAgICAgICBzcGFjZTogTUlOVF9TSVpFLFxuICAgICAgICBsYW1wb3J0czogbGFtcG9ydHMsXG4gICAgICAgIHByb2dyYW1JZDogVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgIH0pLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUluaXRpYWxpemVNaW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgIG1pbnQsXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICBvd25lcixcbiAgICAgICAgb3duZXIsXG4gICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgZmVlUGF5ZXIsXG4gICAgICAgIHRva2VuQXNzb2NpYXRlZCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIG1pbnQsXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZU1pbnRUb0NoZWNrZWRJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgdG9rZW5Bc3NvY2lhdGVkLFxuICAgICAgICBvd25lcixcbiAgICAgICAgQ2FsY3VsYXRlLmNhbGN1bGF0ZUFtb3VudCh0b3RhbEFtb3VudCwgbWludERlY2ltYWwpLFxuICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlQ3JlYXRlTWV0YWRhdGFBY2NvdW50VjNJbnN0cnVjdGlvbihcbiAgICAgICAge1xuICAgICAgICAgIG1ldGFkYXRhOiBtZXRhZGF0YVBkYSxcbiAgICAgICAgICBtaW50LFxuICAgICAgICAgIG1pbnRBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICAgIHBheWVyOiBmZWVQYXllcixcbiAgICAgICAgICB1cGRhdGVBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICB9LFxuICAgICAgICB7XG4gICAgICAgICAgY3JlYXRlTWV0YWRhdGFBY2NvdW50QXJnc1YzOiB7XG4gICAgICAgICAgICBkYXRhOiB0b2tlbk1ldGFkYXRhLFxuICAgICAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgICAgICAgY29sbGVjdGlvbkRldGFpbHM6IG51bGwsXG4gICAgICAgICAgfSxcbiAgICAgICAgfSxcbiAgICAgICksXG4gICAgKTtcbiAgICByZXR1cm4gaW5zdHJ1Y3Rpb25zO1xuICB9O1xuXG4gIC8qKlxuICAgKiBTUEwtVE9LRU4gbWludFxuICAgKlxuICAgKiBAcGFyYW0ge1NlY3JldH0gb3duZXIgICAgICAvLyB0b2tlbiBvd25lciBTZWNyZXRcbiAgICogQHBhcmFtIHtudW1iZXJ9IHRvdGFsQW1vdW50IC8vIHRvdGFsIG51bWJlclxuICAgKiBAcGFyYW0ge251bWJlcn0gbWludERlY2ltYWwgLy8gdG9rZW4gZGVjaW1hbFxuICAgKiBAcGFyYW0ge0lucHV0VG9rZW5NZXRhZGF0YX0gaW5wdXQgICAgICAgLy8gdG9rZW4gbWV0YWRhdGFcbiAgICogQHBhcmFtIHtQYXJ0aWFsPE1pbnRPcHRpb25z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BkZXN0OiBQdWJrZXksXG4gICAgb3duZXJPck11bHRpc2lnOiBTZWNyZXRbXSxcbiAgICBhbW91bnQ6IG51bWJlcixcbiAgICBtaW50RGVjaW1hbDogbnVtYmVyLFxuICAgIG9wdGlvbnM6IFBhcnRpYWw8TWludE9wdGlvbnM+ID0ge30sXG4gICk6IFByb21pc2U8UmVzdWx0PENvbW1vblN0cnVjdHVyZSwgRXJyb3I+PiA9PiB7XG4gICAgcmV0dXJuIFRyeShhc3luYyAoKSA9PiB7XG4gICAgICBjb25zdCBwYXllciA9IG9wdGlvbnMuZmVlUGF5ZXIgPyBvcHRpb25zLmZlZVBheWVyIDogb3duZXJPck11bHRpc2lnWzBdO1xuICAgICAgY29uc3Qga2V5cGFpcnMgPSBvd25lck9yTXVsdGlzaWcubWFwKChzKSA9PiBzLnRvS2V5cGFpcigpKTtcblxuICAgICAgY29uc3Qgc291cmNlVG9rZW4gPSBhd2FpdCBBY2NvdW50LkFzc29jaWF0ZWQucmV0cnlHZXRPckNyZWF0ZShcbiAgICAgICAgbWludCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIHBheWVyLFxuICAgICAgKTtcblxuICAgICAgY29uc3QgZGVzdFRva2VuID0gYXdhaXQgQWNjb3VudC5Bc3NvY2lhdGVkLnJldHJ5R2V0T3JDcmVhdGUoXG4gICAgICAgIG1pbnQsXG4gICAgICAgIGRlc3QsXG4gICAgICAgIHBheWVyLFxuICAgICAgKTtcblxuICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZVRyYW5zZmVyQ2hlY2tlZEluc3RydWN0aW9uKFxuICAgICAgICBzb3VyY2VUb2tlbi50b1B1YmxpY0tleSgpLFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIGRlc3RUb2tlbi50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICBDYWxjdWxhdG9yLmNhbGN1bGF0ZUFtb3VudChhbW91bnQsIG1pbn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iAgICAgIC4uLmRlZmF1bHRPcHRpb25zLFxuICAgICAgLi4ub3B0aW9ucyxcbiAgICB9O1xuXG4gICAgY29uc3QgYXNzZXRzID0gYXdhaXQgQXBpLmdldEFzc2V0c0J5T3duZXIoXG4gICAgICBvd25lcixcbiAgICAgIGxpbWl0LFxuICAgICAgcGFnZSxcbiAgICAgIHNvcnRCeSxcbiAgICAgIGJlZm9yZSxcbiAgICAgIGFmdGVyLFxuICAgICk7XG4gICAgaWYgKGFzc2V0cy5pc0Vycikge1xuICAgICAgdGhyb3cgYXNzZXRzLmVycm9yO1xuICAgIH1cblxuICAgIGNvbnN0IGl0ZW1zID0gYXNzZXRzLnZhbHVlLml0ZW1zO1xuXG4gICAgY29uc3QgbWV0YWRhdGFzID0gYXdhaXQgUHJvbWlzZS5hbGwoXG4gICAgICBpdGVtc1xuICAgICAgICAuZmlsdGVyKChpdGVtKSA9PiBpdGVtLmNvbXByZXNzaW9uLmNvbXByZXNzZWQgPT09IGlzQ29tcHJlc3NlZClcbiAgICAgICAgLm1hcChhc3luYyAoaXRlbSkgPT4ge1xuICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICBjb25zdCBvZmZjaGFpbjogT2ZmY2hhaW4gPSBhd2FpdCBmZXRjaE9mZmNoYWluKFxuICAgICAgICAgICAgICBpdGVtLmNvbnRlbnQuanNvbl91cmksXG4gICAgICAgICAgICApO1xuICAgICAgICAgICAgY29uc3QgbWVyZ2VkID0ge1xuICAgICAgICAgICAgICBvbmNoYWluOiBpdGVtLFxuICAgICAgICAgICAgICBvZmZjaGFpbjogb2ZmY2hhaW4sXG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgcmV0dXJuIENvbnZlcnRlci5OZnQuaW50b1VzZXIobWVyZ2VkKTtcbiAgICAgICAgICB9IGNhdGNoIChlcnIpIHtcbiAgICAgICAgICAgIGRlYnVnTG9nKCcjIEZhaWxlZCBmZXRjaCBvZmZjaGFpbiB1cmw6ICcsIGl0ZW0uY29udGVudC5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WJrZXl9IG93bmVyICAgICAgICAgICAgLy8gY3VycmVudCBvd25lclxuICAgKiBAcGFyYW0ge1BhcnRpYWw8RnJlZXplT3B0aW9ucz59IG9wdGlvbnNcbiAgICogQHJldHVybiBSZXN1bHQ8Q29tbW9uU3RydWN0dXJlLCBFcnJvcj5cbiAgICovXG4gIGV4cG9ydCBjb25zdCBmcmVlemUgPSAoXG4gICAgbWludDogUHVia2V5LFxuICAgIG93bmVyOiBQdWJrZXksXG4gICAgZnJlZXplQXV0aG9yaXR5OiBTZWNyZXQsXG4gICAgb3B0aW9uczogUGFydGlhbDxGcmVlemVPcHRpb25zPiA9IHt9LFxuICApOiBSZXN1bHQ8Q29tbW9uU3RydWN0dXJlLCBFcnJvcj4gPT4ge1xuICAgIHJldHVybiBUcnkoKCkgPT4ge1xuICAgICAgY29uc3QgcGF5ZXIgPSBvcHRpb25zLmZlZVBheWVyID8gb3B0aW9ucy5mZWVQYXllciA6IGZyZWV6ZUF1dGhvcml0eTtcbiAgICAgIGNvbnN0IHRva2VuQWNjb3VudCA9IGdldEFzc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jKFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICApO1xuICAgICAgY29uc3QgZWRpdGlvbkFkZHJlc3MgPSBBY2NvdW50LlBkYS5nZXRNYXN0ZXJFZGl0aW9uKG1pbnQpO1xuXG4gICAgICBjb25zdCBpbnN0ID0gY3JlYXRlRnJlZXplRGVsZWdhdGVkQWNjb3VudEluc3RydWN0aW9uKHtcbiAgICAgICAgZGVsZWdhdGU6IG5ldyBBY2NvdW50LktleXBhaXIoe1xuICAgICAgICAgIHNlY3JldDogZnJlZXplQXV0aG9yaXR5LFxuICAgICAgICB9KS50b1B1YmxpY0tleSgpLFxuICAgICAgICB0b2tlbkFjY291bnQ6IHRva2VuQWNjb3VudCxcbiAgICAgICAgZWRpdGlvbjogZWRpdGlvbkFk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QYXllcixcbiAgICAgICAgICB1cGRhdGVBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICB9LFxuICAgICAgICB7XG4gICAgICAgICAgY3JlYXRlTWV0YWRhdGFBY2NvdW50QXJnc1YzOiB7XG4gICAgICAgICAgICBkYXRhOiBuZnRNZXRhZGF0YSxcbiAgICAgICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICAgICAgIGNvbGxlY3Rpb25EZXRhaWxzOiBudWxsLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUNyZWF0ZU1hc3RlckVkaXRpb25WM0luc3RydWN0aW9uKFxuICAgICAgICB7XG4gICAgICAgICAgZWRpdGlvbjogbWFzdGVyRWRpdGlvblB1YmtleSxcbiAgICAgICAgICBtaW50LFxuICAgICAgICAgIHVwZGF0ZUF1dGhvcml0eTogb3duZXIsXG4gICAgICAgICAgbWludEF1dGhvcml0eTogb3duZXIsXG4gICAgICAgICAgcGF5ZXI6IGZlZVBheWVyLFxuICAgICAgICAgIG1ldGFkYXRhOiB0b2tlbk1ldGFkYXRhUHVia2V5LFxuICAgICAgICB9LFxuICAgICAgICB7XG4gICAgICAgICAgY3JlYXRlTWFzdGVyRWRpdGlvbkFyZ3M6IHtcbiAgICAgICAgICAgIG1heFN1cHBseTogMCxcbiAgICAgICAgICB9LFxuICAgICAgICB9LFxuICAgICAgKSxcbiAgICApO1xuICAgIHJldHVybiBpbnN0cnVjdGlvbnM7XG4gIH07XG5cbiAgLyoqXG4gICAqIFVwbG9hZCBjb250ZW50IGFuZCBORlQgbWludFxuICAgKlxuICAgKiBAcGFyYW0ge1NlY3JldH0gb3duZXIgICAgICAgICAvLyBvd25lcidzIFNlY3JldFxuICAgKiBAcGFyYW0ge0lucHV0TmZ0TWV0YWRhdGF9IGlucHV0XG4gICAqIHtcbiAgICogICBuYW1lOiBzdHJpbmcgICAgICAg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9pbnRzLFxuICAgICAgKTtcblxuICAgICAgY29uc3QgaXNNdXRhYmxlID0gaW5wdXQuaXNNdXRhYmxlID09PSB1bmRlZmluZWQgPyB0cnVlIDogaW5wdXQuaXNNdXRhYmxlO1xuXG4gICAgICBkZWJ1Z0xvZygnIyBpbnB1dDogJywgaW5wdXQpO1xuICAgICAgZGVidWdMb2coJyMgZGF0YXYyOiAnLCBkYXRhdjIpO1xuXG4gICAgICBjb25zdCBtaW50ID0gQWNjb3VudC5LZXlwYWlyLmNyZWF0ZSgpO1xuXG4gICAgICBjb25zdCBpbnN0cnVjdGlvbnMgPSBhd2FpdCBjcmVhdGVNaW50KFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICBkYXRhdjIsXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgKTtcblxuICAgICAgLy8gZnJlZXplQXV0aG9yaXR5XG4gICAgICBpZiAoZnJlZXplQXV0aG9yaXR5KSB7XG4gICAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICAgIGNyZWF0ZURlbGVhZ2F0ZShcbiAgICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICAgICAgZnJlZXplQXV0aG9yaXR5LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgLy8gY29sbGVjdGlvbiAtLS1cbiAgICAgIGlmIChpbnB1dC5jb2xsZWN0aW9uKSB7XG4gICAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICAgIGNyZWF0ZVZlcmlmeVNpemVkQ29sbGVjdGlvbihcbiAgICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIGlucHV0LmNvbGxlY3Rpb24udG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBrZXlwYWlycyA9IFtvd25lci50b0tleXBhaXIoKSwgbWludC50b0tleXBhaXIoKV07XG5cbiAgICAgIC8vIGNyZWF0b3IgLS0tXG4gICAgICBpZiAoaW5wdXQuY3JlYXRvcnMpIHtcbiAgICAgICAgaW5wdXQuY3JlYXRvcnMuZm9yRWFjaCgoY3JlYXRvcikgPT4ge1xuICAgICAgICAgIGlmIChBY2NvdW50LktleXBhaXIuaXNTZWNyZXQoY3JlYXRvci5zZWNyZXQpKSB7XG4gICAgICAgICAgICBjb25zdCBjcmVhdG9yUHVia2V5ID0gY3JlYXRvci5hZGRyZXNzLnRvUHVibGljS2V5KCk7XG4gICAgICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlVmVyaWZ5Q3JlYXRvcihtaW50LnRvUHVibGljS2V5KCksIGNyZWF0b3JQdWJrZXkpO1xuICAgICAgICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goaW5zdCk7XG4gICAgICAgICAgICBrZXlwYWlycy5wdXNoKGNyZWF0b3Iuc2VjcmV0LnRvS2V5cGFpcigpKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5NaW50KFxuICAgICAgICBpbnN0cnVjdGlvbnMsXG4gICAgICAgIGtleXBhaXJzLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgbWludC5wdWJrZXksXG4gICAgICApO1xuICAgIH0pO1xuICB9O1xufVxuIiwgImltcG9ydCB7IGRlYnVnTG9nLCBSZXN1bHQsIFRyeSwgdW5peFRpbWVzdGFtcCB9IGZyb20gJ34vc3VpdGUtdXRpbHMnO1xuaW1wb3J0IHsg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ikge1xuICAgICAgICAgIHRocm93IHVwbG9hZGVkO1xuICAgICAgICB9XG4gICAgICAgIHVyaSA9IHVwbG9hZGVkLnZhbHVlO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgdGhyb3cgRXJyb3IoYE11c3Qgc2V0IGZpbGVQYXRoJyBvciAndXJpJ2ApO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBkYXRhdjIgPSBDb252ZXJ0ZXIuUmVndWxhck5mdE1ldGFkYXRhLmludG9JbmZyYShpbnB1dCwgdXJpLCAwKTtcblxuICAgICAgY29uc3QgaXNNdXRhYmxlID0gaW5wdXQuaXNNdXRhYmxlID09PSB1bmRlZmluZWQgPyB0cnVlIDogaW5wdXQuaXNNdXRhYmxlO1xuXG4gICAgICBkZWJ1Z0xvZygnIyBpbnB1dDogJywgaW5wdXQpO1xuICAgICAgZGVidWdMb2coJyMgZGF0YXYyOiAnLCBkYXRhdjIpO1xuXG4gICAgICBjb25zdCBjb2xsZWN0aW9uTWludCA9IEFjY291bnQuS2V5cGFpci5jcmVhdGUoKTtcbiAgICAgIGNvbnN0IGNvbGxlY3Rpb25NZXRhZGF0YUFjY291bnQgPSBBY2NvdW50LlBkYS5nZXRNZXRhZGF0YShcbiAgICAgICAgY29sbGVjdGlvbk1pbnQucHVia2V5LFxuICAgICAgKTtcblxuICAgICAgY29uc3QgaW5zdHJ1Y3Rpb25zID0gYXdhaXQgTWludC5jcmVhdGVNaW50KFxuICAgICAgICBjb2xsZWN0aW9uTWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgZGF0YXYyLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICk7XG5cbiAgICAgIC8vIGZyZWV6ZUF1dGhvcml0eVxuICAgICAgaWYgKGZyZWV6ZUF1dGhvcml0eSkge1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgICBNaW50LmNyZWF0ZURlbGVhZ2F0ZShcbiAgICAgICAgICAgIGNvbGxlY3Rpb25NaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgICAgIGZyZWV6ZUF1dGhvcml0eS50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGNvbGxlY3Rpb25zID0ge1xuICAgICAgICBjb2xsZWN0aW9uTWV0YWRhdGE6IGNvbGxlY3Rpb25NZXRhZGF0YUFjY291bnQsXG4gICAgICAgIGNvbGxlY3Rpb25BdXRob3JpdHk6IG93bmVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgY29sbGVjdGlvbk1pbnQ6IGNvbGxlY3Rpb25NaW50LnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgIH07XG5cbiAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICBjcmVhdGVTZXRDb2xsZWN0aW9uU2l6ZUluc3RydWN0aW9uKGNvbGxlY3Rpb25zLCB7XG4gICAgICAgICAgc2V0Q29sbGVjdGlvblNpemVBcmdzOiB7XG4gICAgICAgICAgICBzaXplOiBjb2xsZWN0aW9uU2l6ZSB8fCBERUZBVUxUX0NPTExFQ1RJT05fU0laRSxcbiAgICAgICAgICB9LFxuICAgICAgICB9KSxcbiAgICAgICk7XG5cbiAgICAgIHJldHVybiBuZXcgVHJhbnNhY3Rpb25CdWlsZGVyLk1pbnQoXG4gICAgICAgIGluc3RydWN0aW9ucyxcbiAgICAgICAgW293bmVyLnRvS2V5cGFpcigpLCBjb2xsZWN0aW9uTWludC50b0tleXBhaXIoKV0sXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICBjb2xsZWN0aW9uTWludC5wdWJrZXksXG4gICAgICApO1xuICAgIH0pO1xuICB9O1xufVxuIiwgImltcG9ydCB7IF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YXNBcGkiLCAiQ29udmVydGVyIiwgIkRhc0FwaSIsICJSZWd1bGFyTmZ0IiwgIkRhc0FwaSIsICJpbXBvcnRfc3BsX3Rva2VuIiwgImltcG9ydF9tcGxfdG9rZW5fbWV0YWRhdGEiLCAiUmVndWxhck5mdCIsICJBY2NvdW50IiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJpbXBvcnRfd2ViMyIsICJpbXBvcnRfc3BsX3Rva2VuIiwgImltcG9ydF9tcGxfdG9rZW5fbWV0YWRhdGEiLCAiUmVndWxhck5mdCIsICJtaW50IiwgIkFjY291bnQiLCAiQ29udmVydGVyIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJpbXBvcnRfd2ViMyIsICJSZWd1bGFyTmZ0IiwgIkNvbnZlcnRlciIsICJBY2NvdW50IiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJSZWd1bGFyTmZ0IiwgIlNwbFRva2VuIiwgImltcG9ydF9tcGxfdG9rZW5fbWV0YWRhdGEiLCAiUmVndWxhck5mdCIsICJDb252ZXJ0ZXIiLCAiQWNjb3VudCIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiaW1wb3J0X3NwbF90b2tlbiIsICJpbXBvcnRfbXBsX3Rva2VuX21ldGFkYXRhIiwgIlJlZ3VsYXJOZnQiLCAiQWNjb3VudCIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiUmVndWxhck5mdCIsICJTcGxUb2tlbiIsICJSZWd1bGFyTmZ0Il0KfQo= \ No newline at end of file diff --git a/packages/suite-regular-nft/dist/index.mjs b/packages/suite-regular-nft/dist/index.mjs index 0d3893fb7..51663145a 100644 --- a/packages/suite-regular-nft/dist/index.mjs +++ b/packages/suite-regular-nft/dist/index.mjs @@ -1,7 +1,7 @@ // ../suite-spl-token/src/add.ts import { createMintToCheckedInstruction } from "@solana/spl-token"; -// ../shared/src/constants.ts +// ../suite-utils/src/constants.ts import { PublicKey } from "@solana/web3.js"; import SolanaJsonConfig from "@solana-suite/config/load"; var Config = SolanaJsonConfig; @@ -283,65 +283,6 @@ var TransactionBuilder; TransactionBuilder7.Common = Common2; })(TransactionBuilder || (TransactionBuilder = {})); -// ../shared/src/shared.ts -var overwriteObject = (object, targets) => { - const that = object; - targets.forEach((target) => { - delete that[target.existsKey]; - that[target.will.key] = target.will.value; - }); - return that; -}; -var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { - if (Constants.isDebugging === "true" || process.env.DEBUG === "true") { - console.log("[DEBUG]", data1, data2, data3, data4); - } -}; -var sleep = async (sec) => { - return new Promise((r) => setTimeout(r, sec * 1e3)); -}; -var isBrowser = () => { - return typeof window !== "undefined" && typeof window.document !== "undefined"; -}; -var isNode = () => { - return typeof process !== "undefined" && process.versions != null && process.versions.node != null; -}; -var isPromise = (obj) => { - return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; -}; -function Try(input, finallyInput) { - try { - const v = input(); - if (isPromise(v)) { - return v.then( - (x) => Result.ok(x), - (err) => Result.err(err) - ); - } else { - return Result.ok(v); - } - } catch (e) { - if (e instanceof Error) { - return Result.err(e); - } - return Result.err(Error(e)); - } finally { - if (finallyInput) { - debugLog("# finally input:", finallyInput); - finallyInput(); - } - } -} -var convertTimestampToDateTime = (created_at) => { - if (created_at) { - return new Date(created_at * 1e3); - } - return; -}; -var unixTimestamp = () => { - return Math.floor((/* @__PURE__ */ new Date()).getTime() / 1e3); -}; - // ../transaction-builder/src/batch.ts var TransactionBuilder2; ((TransactionBuilder7) => { @@ -809,7 +750,66 @@ var TransactionBuilder6 = { ...TransactionBuilder4 }; -// ../shared/src/result.ts +// ../suite-utils/src/shared.ts +var overwriteObject = (object, targets) => { + const that = object; + targets.forEach((target) => { + delete that[target.existsKey]; + that[target.will.key] = target.will.value; + }); + return that; +}; +var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { + if (Constants.isDebugging === "true" || process.env.DEBUG === "true") { + console.log("[DEBUG]", data1, data2, data3, data4); + } +}; +var sleep = async (sec) => { + return new Promise((r) => setTimeout(r, sec * 1e3)); +}; +var isBrowser = () => { + return typeof window !== "undefined" && typeof window.document !== "undefined"; +}; +var isNode = () => { + return typeof process !== "undefined" && process.versions != null && process.versions.node != null; +}; +var isPromise = (obj) => { + return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; +}; +function Try(input, finallyInput) { + try { + const v = input(); + if (isPromise(v)) { + return v.then( + (x) => Result.ok(x), + (err) => Result.err(err) + ); + } else { + return Result.ok(v); + } + } catch (e) { + if (e instanceof Error) { + return Result.err(e); + } + return Result.err(Error(e)); + } finally { + if (finallyInput) { + debugLog("# finally input:", finallyInput); + finallyInput(); + } + } +} +var convertTimestampToDateTime = (created_at) => { + if (created_at) { + return new Date(created_at * 1e3); + } + return; +}; +var unixTimestamp = () => { + return Math.floor((/* @__PURE__ */ new Date()).getTime() / 1e3); +}; + +// ../suite-utils/src/result.ts var AbstractResult = class { unwrap(ok, err) { const r = this._chain( @@ -921,15 +921,15 @@ var InternalErr = class extends AbstractResult { } }; var Result; -((Result24) => { +((Result25) => { function ok(value) { return new InternalOk(value); } - Result24.ok = ok; + Result25.ok = ok; function err(error) { return new InternalErr(error || Error()); } - Result24.err = err; + Result25.err = err; function all(obj) { if (Array.isArray(obj)) { const resArr = []; @@ -939,7 +939,7 @@ var Result; } resArr.push(item.value); } - return Result24.ok(resArr); + return Result25.ok(resArr); } const res = {}; const keys = Object.keys(obj); @@ -950,9 +950,9 @@ var Result; } res[key] = item.value; } - return Result24.ok(res); + return Result25.ok(res); } - Result24.all = all; + Result25.all = all; })(Result || (Result = {})); // ../converter/src/collection.ts @@ -2975,4 +2975,4 @@ var RegularNft10 = { export { RegularNft10 as RegularNft }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vc3VpdGUtc3BsLXRva2VuL3NyYy9hZGQudHMiLCAiLi4vLi4vc2hhcmVkL3NyYy9jb25zdGFudHMud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DtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHRoaXMuc2lnbmVycztcblxuICAgICAgICBpZiAodGhpcy5mZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gdGhpcy5mZWVQYXllci5wdWJsaWNLZXk7XG4gICAgICAgICAgZmluYWxTaWduZXJzID0gW3RoaXMuZmVlUGF5ZXIsIC4uLnRoaXMuc2lnbmVyc107XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLmluc3RydWN0aW9ucy5mb3JFYWNoKChpbnN0KSA9PiB0cmFuc2FjdGlvbi5hZGQoaW5zdCkpO1xuXG4gICAgICAgIGNvbnN0IG9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IE1BWF9SRVRSSUVTLFxuICAgICAgICB9O1xuXG4gICAgICAgIGlmIChOb2RlLmdldENvbm5lY3Rpb24oKS5ycGNFbmRwb2ludCA9PT0gQ29uc3RhbnRzLkVuZFBvaW50VXJsLnByZCkge1xuICAgICAgICAgIGRlYnVnTG9nKCcjIENoYW5nZSBtZXRhcGxleCBjbHVzdGVyIG9uIG1haW5uZXQtYmV0YScpO1xuICAgICAgICAgIE5vZGUuY2hhbmdlQ29ubmVjdGlvbih7IGNsdXN0ZXI6IENvbnN0YW50cy5DbHVzdGVyLnByZE1ldGFwbGV4IH0pO1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgIG9wdGlvbnMsXG4gICAgICAgICk7XG4gICAgICB9KTtcbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHtcbiAgQ29uZmlybU9wdGlvbnMsXG4gIFRyYW5zYWN0aW9u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YmVyID0+IHtcbiAgICBjb25zdCBmZWVQYXllclBrID0gW2ZlZVBheWVyLnRvQmFzZTU4KCldO1xuXG4gICAgY29uc3Qgc2lnbmVycyA9IG5ldyBTZXQ8c3RyaW5nPihmZWVQYXllclBrKTtcbiAgICBjb25zdCBhY2NvdW50cyA9IG5ldyBTZXQ8c3RyaW5nPihmZWVQYXllclBrKTtcblxuICAgIGNvbnN0IGl4c1NpemUgPSB0cmFuc2FjdGlvbi5pbnN0cnVjdGlvbnMucmVkdWNlKChhY2MsIGl4KSA9PiB7XG4gICAgICBpeC5rZXlzLmZvckVhY2goKHsgcHVia2V5LCBpc1NpZ25lciB9KSA9PiB7XG4gICAgICAgIGNvbnN0IHBrID0gcHVia2V5LnRvQmFzZTU4KCk7XG4gICAgICAgIGlmIChpc1NpZ25lcikgc2lnbmVycy5hZGQocGspO1xuICAgICAgICBhY2NvdW50cy5hZGQocGspO1xuICAgICAgfSk7XG5cbiAgICAgIGFjY291bnRzLmFkZChpeC5wcm9ncmFtSWQudG9CYXNlNTgoKSk7XG5cbiAgICAgIGNvbnN0IG5JbmRleGVzID0gaXgua2V5cy5sZW5ndGg7XG4gICAgICBjb25zdCBvcGFxdWVEYXRhID0gaXguZGF0YS5sZW5ndGg7XG5cbiAgICAgIHJldHVybiAoXG4gICAgICAgIGFjYyArXG4gICAgICAgIDEgKyAvLyBQSUQgaW5kZXhcbiAgICAgICAgY29tcGFjdEFycmF5U2l6ZShuSW5kZXhlcywgMSkgK1xuICAgICAgICBjb21wYWN0QXJyYXlTaXplKG9wYXF1ZURhdGEsIDEpXG4gICAgICApO1xuICAgIH0sIDApO1xuXG4gICAgcmV0dXJuIChcbiAgICAgIGNvbXBhY3RBcnJheVNpemUoc2lnbmVycy5zaXplLCA2NCkgKyAvLyBzaWduYXR1cmVzXG4gICAgICAzICsgLy8gaGVhZGVyXG4gICAgICBjb21wYWN0QXJyYXlTaXplKGFjY291bnRzLnNpemUsIDMyKSArIC8vIGFjY291bnRzXG4g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leXBhaXIuS2V5cGFpcih7IHNlY3JldDogZmVlUGF5ZXIgfSkucHVia2V5LFxuICAgICAgICBhbGxvd093bmVyT2ZmQ3VydmUsXG4gICAgICApO1xuXG4gICAgICBpZiAoIXJlcy5pbnN0KSB7XG4gICAgICAgIHJldHVybiByZXMudG9rZW5BY2NvdW50O1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb248UHVia2V5PihcbiAgICAgICAgW3Jlcy5pbnN0XSxcbiAgICAgICAgW10sXG4gICAgICAgIGZlZVBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICByZXMudG9rZW5BY2NvdW50ISxcbiAgICAgICk7XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIFJldHJ5IGZ1bmN0aW9uIGlmIGNyZWF0ZSBuZXcgdG9rZW4gYWNjb3VpbnRcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBtaW50XG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAgICogQHBhcmFtIHtTZWNyZXR9IGZlZVBheWVyXG4gICAgICogQHJldHVybnMgUHJvbWlzZTxzdHJpbmc+XG4gICAgICovXG4gICAgZXhwb3J0IGNvbnN0IHJldHJ5R2V0T3JDcmVhdGUgPSBhc3luYyAoXG4gICAgICBtaW50OiBQdWJrZXksXG4gICAgICBvd25lcjogUHVia2V5LFxuICAgICAgZmVlUGF5ZXI6IFNlY3JldCxcbiAgICApOiBQcm9taXNlPHN0cmluZz4gPT4ge1xuICAgICAgbGV0IGNvdW50ZXIgPSAxO1xuICAgICAgd2hpbGUgKGNvdW50ZXIgPCBSRVRSWV9PVkVSX0xJTUlUKSB7XG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgY29uc3QgaW5zdCA9IGF3YWl0IGdldChtaW50LCBvd25lciwgZmVlUGF5ZXIsIHRydWUpO1xuXG4gICAgICAgICAgaWYgKGluc3QgJiYgdHlwZW9mIGluc3QgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICBkZWJ1Z0xvZygnIyBhc3NvY2lhdGVkVG9rZW5BY2NvdW50OiAnLCBpbnN0KTtcbiAgICAgICAgICAgIHJldHVybiBpbnN0O1xuICAgICAgICAgIH0gZWxzZSBpZiAoaW5zdCBpbnN0YW5jZW9mIFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb24pIHtcbiAgICAgICAgICAgIChhd2FpdCBpbnN0LnN1Ym1pdCgpKS5tYXAoXG4gICAgICAgICAgICAgIGFzeW5jIChvazogc3RyaW5nKSA9PiB7XG4gICAgICAgICAgICAgICAgYXdhaXQgTm9kZS5jb25maXJtZWRTaWcob2spO1xuICAgICAgICAgICAgICAgIHJldHVybiBpbnN0LmRhdGE7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIChlcnI6IEVycm9yKSA9PiB7XG4gICAgICAgICAgICAgICAgZGVidWdMb2coJyMgRXJyb3Igc3VibWl0IHJldHJ5R2V0T3JDcmVhdGU6ICcsIGVycik7XG4gICAgICAgICAgICAgICAgdGhyb3cgZXJyO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICBkZWJ1Z0xvZyhgIyByZXRyeTogJHtjb3VudGVyfSBjcmVhdGUgdG9rZW4gYWNjb3VudDogYCwgZSk7XG4gICAgICAgICAgZGVidWdMb2coYCMgbWludDogJHttaW50fSwgb3duZXI6ICR7b3duZXJ9LCBmZWVQYXllcjogJHtmZWVQYXllcn1gKTtcbiAgICAgICAgfVxuICAgICAgICBhd2FpdCBzbGVlcChSRVRSWV9TTEVFUF9USU1FKTtcbiAgICAgICAgY291bnRlcisrO1xuICAgICAgfVxuICAgICAgdGhyb3cgRXJyb3IoYHJldHJ5IGFjdGlvbiBpcyBvdmVyIGxpbWl0ICR7UkVUUllfT1ZFUl9MSU1JVH1gKTtcbiAgICB9O1xuX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CkpO1xuXG4gICAgICB0cnkge1xuICAgICAgICAvLyBEb250IHVzZSBSZXN1bHRcbiAgICAgICAgYXdhaXQgZ2V0QWNjb3VudChcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLmNvbW1pdG1lbnQsXG4gICAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICB0b2tlbkFjY291bnQ6IGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSxcbiAgICAgICAgICBpbnN0OiB1bmRlZmluZWQsXG4gICAgICAgIH07XG4gICAgICB9IGNhdGNoIChlcnJvcjogdW5rbm93bikge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuQWNjb3VudE5vdEZvdW5kRXJyb3IpICYmXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuSW52YWxpZEFjY291bnRPd25lckVycm9yKVxuICAgICAgICApIHtcbiAgICAgICAgICB0aHJvdyBFcnJvcignVW5leHBlY3RlZCBlcnJvcicpO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgcGF5ZXIgPSAhZmVlUGF5ZXIgPyBvd25lciA6IGZlZVBheWVyO1xuXG4gICAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVBc3NvY2lhdGVkVG9rZW5BY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgcGF5ZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1f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SW50ZXJuYWxDcmVhdG9yc1tdPiA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBudWxsO1xuICAgICAgfVxuICAgICAgcmV0dXJuIGlucHV0Lm1hcCgoZGF0YSkgPT4ge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIGFkZHJlc3M6IGRhdGEuYWRkcmVzcy50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIHNoYXJlOiBkYXRhLnNoYXJlLFxuICAgICAgICAgIHZlcmlmaWVkOiBmYWxzZSxcbiAgICAgICAgfTtcbiAgICAgIH0pO1xuICAgIH07XG5cbiAgICBleHBvcnQgY29uc3QgaW50b0NvbXByZXNzZWROZnRJbmZyYSA9IChcbiAgICAgIGlucHV0OiBPcHRpb248SW5wdXRDcmVhdG9yc1tdPiB8IHVuZGVmaW5lZCxcbiAgICApOiBJbnRlcm5hbENyZWF0b3JzW10gPT4ge1xuICAgICAgaWYgKCFpbnB1dCkge1xuICAgICAgICByZXR1cm4gW107XG4gICAgICB9XG4gICAgICByZXR1cm4gaW5wdXQhLm1hcCgoZGF0YSkgPT4ge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIGFkZHJlc3M6IGRhdGEuYWRkcmVzcy50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIHNoYXJlOiBkYXRhLnNoYXJlLFxuICAgICAgICAgIHZlcmlmaWVkOiBmYWxzZSxcbiAgICAgICAgfTtcbiAgICAgIH0pO1xuICAgIH07XG5cbiAgICBleHBvcnQgY29uc3QgaW50b1VzZXIgPSAoXG4gICAgICBvdXRwdXQ6IE9wdGlvbjxJbnRlcm5hbENyZWF0b3JzW10+LFxuICAgICk6IENyZWF0b3JzW10gfCB1bmRlZmluZWQgPT4ge1xuICAgICAgaWYgKCFvdXRwdXQpIHtcbiAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG91dHB1dC5tYXAoKGRhdGEpID0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VHlwZTogU3RvcmFnZVR5cGUsXG4gICAgICAgIGZlZVBheWVyPzogU2VjcmV0LFxuICAgICAgKSA9PiBQcm9taXNlPFJlc3VsdDxzdHJpbmcsIEVycm9yPj4sXG4gICAgICBzdG9yYWdlVHlwZTogU3RvcmFnZVR5cGUsXG4gICAgICBmZWVQYXllcj86IFNlY3JldCxcbiAgICApOiBQcm9taXNlPFByb3BlcnRpZXM+ID0+IHtcbiAgICAgIGlmICghaW5wdXQgfHwgIWlucHV0LmZpbGVzKSB7XG4gICAgICAgIHJldHVybiB7fTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgZmlsZXMgPSBhd2FpdCBQcm9taXNlLmFsbChcbiAgICAgICAgaW5wdXQuZmlsZXMubWFwKGFzeW5jIChmaWxlKSA9PiB7XG4gICAgICAgICAgaWYgKCFmaWxlLmZpbGVQYXRoKSB7XG4gICAgICAgICAgICByZXR1cm4ge307XG4gICAgICAgICAgfVxuICAgICAgICAgIGNvbnN0IHJlcyA9IGF3YWl0IGNhbGxiYWNrRnVuYyhmaWxlLmZpbGVQYXRoLCBzdG9yYWdlVHlwZSwgZmVlUGF5ZXIpO1xuICAgICAgICAgIGlmIChyZXMuaXNFcnIpIHtcbiAgICAgICAgICAgIHRocm93IEVycm9yKHJlcy5lcnJvci5tZXNzYWdlKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgcmV0dXJuIG92ZXJ3cml0ZU9iamVjdChmaWxlLCBbXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGV4aXN0c0tleTogJ2ZpbGVQYXRoJyxcbiAgICAgICAgICAgICAgd2lsbDogeyBrZXk6ICd1cmknLCB2YWx1ZTogcmVzLnZhbHVlIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgIF0pO1xuICAgICAgICB9KSxcbiAgICAgICk7XG4gICAgICByZXR1cm4geyAuLi5pbnB1dCwgZmlsZXMgfSBhcyBQcm9wZXJ0aWVzO1xuICAgIH07XG4gIH1cbn1cbiIsICIvK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ID0+IHtcbiAgICAgIGNvbnN0IGtleXMgPSBPYmplY3Qua2V5cyhtZXRhZGF0YSk7XG4gICAgICBjb25zdCByZXN1bHRzOiBEZXRhaWxzW10gPSBbXTtcbiAgICAgIGtleXMubWFwKChrZXkpID0+IHtcbiAgICAgICAgbGV0IHJlcyE6IFJlc3VsdDxzdHJpbmcsIFZhbGlkYXRvckVycm9yPjtcbiAgICAgICAgc3dpdGNoIChrZXkpIHtcbiAgICAgICAgICBjYXNlICdpbWFnZSc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLmltYWdlKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzSW1hZ2VVcmwobWV0YWRhdGEuaW1hZ2UpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAncm95YWx0eSc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnJveWFsdHkpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNSb3lhbHR5KG1ldGFkYXRhLnJveWFsdHkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEuc3ltYm9sKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU3ltYm9sKG1ldGFkYXRhLnN5bWJvbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAocmVzICYmIHJlcy5pc0Vycikge1xuICAgICAgICAgIHJlc3VsdHMucHVzaCguLi5yZXMuZXJyb3IuZGV0YWlscyk7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgICAgaWYgKHJlc3VsdHMubGVuZ3RoID4gMCkge1xuICAgICAgICBjb25zdCBtZXNzYWdlID1cbiAgICAgICAgICAnQ2F1Z2h0IGluIHRoZSB2YWxpZGF0aW9uIGVycm9ycy4gc2VlIGluZm9ybWF0aW9uIGUuZzogZXJyPFZhbGlkYXRvckVycm9yPi5kZXRhaWxzJztcbiAgICAgICAgdGhyb3cgbmV3IFZhbGlkYXRvckVycm9yKG1lc3NhZ2UsIHJlc3VsdHMpO1xuICAgICAgfVxuICAgICAgcmV0dXJuIE1lc3NhZ2UuU1VDQ0VTUztcbiAgICB9KTtcbiAgfTtcblxuICB0eXBlIFBpY2tOZnRTdG9yYWdlID0gUGljazxcbiAgICBPZmZjaGFpbixcbiAgICAnbmFtZScgfCAnc3ltYm9sJyB8ICdpbWFnZScgfCAnc2VsbGVyX2ZlZV9iYXNpc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gYXMgc3RyaW5nO1xuICAgICAgICBpZiAodG9rZW5BbW91bnQgPT09ICcxJykge1xuICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gTWV0YWRhdGEuZnJvbUFjY291bnRBZGRyZXNzKFxuICAgICAgICAgIGNvbm5lY3Rpb24sXG4gICAgICAgICAgQWNjb3VudC5QZGEuZ2V0TWV0YWRhdGEobWludCksXG4gICAgICAgIClcbiAgICAgICAgICAudGhlbihhc3luYyAobWV0YWRhdGEpID0+IHtcbiAgICAgICAgICAgIC8qIGVzbGludC1kaXNhYmxlIEB0eXBlc2NyaXB0LWVzbGludC9uby1leHBsaWNpdC1hbnkgKi9cbiAgICAgICAgICAgIHJldHVybiBmZXRjaFJldHJ5KG1ldGFkYXRhLmRhdGEudXJpKS50aGVuKChqc29uOiBhbnkpID0+IHtcbiAgICAgICAgICAgICAgcmV0dXJuIGNvbnZlcnRlcihtZXRhZGF0YSwganNvbiwgdG9rZW5BbW91bnQpO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfSlcbiAgICAgICAgICAuY2F0Y2goKGVycikgPT4gZGVidWdMb2coJyMgW0ZldGNoIGVycm9yXScsIGVycikpO1xuICAgICAgfSk7XG5cbiAgICAgIGNvbnN0IGZpbHRlcnMgPSAoYXdhaXQgUHJvbWlzZS5hbGwoZGF0YXMpKS5maWx0ZXIoXG4gICAgICAgIChkYXRhKSA9PiBkYXRhICE9PSB1bmRlZmluZWQsXG4gICAgICApO1xuICAgICAgcmV0dXJuIGZpbHRlcnMgYXMgVG9rZW5NZXRhZGF0YVtdO1xuICAgIH0pO1xuICB9O1xuXG4gIC8qKlxuICAgKiBGZXRjaCBtaW50ZWQgbWV0YWRhdGEgYnkgbWludCBhZGRyZXNzXG4gICAqXG4gICAqIEBwYXJhbSB7UHVia2V5fSBtaW50XG4gICAqIEByZXR1cm4gUHJvbWlzZTxSZXN1bHQ8VXNlclNpZGVPdXRwdXQuVG9rZW5NZXRhZG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5sYXN0VmFsaWRCbG9ja0hlaWdodCxcbiAgICAgICAgYmxvY2toYXNoOiBibG9ja2hhc2hPYmouYmxvY2toYXNoLFxuICAgICAgICBmZWVQYXllcjogZmVlUGF5ZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgIH0pO1xuXG4gICAgICAvLyByZXR1cm4gYXNzb2NpYXRlZCB0b2tlbiBhY2NvdW50XG4gICAgICBpZiAoIWRlc3RUb2tlbi5pbnN0KSB7XG4gICAgICAgIGluc3QyID0gY3JlYXRlVHJhbnNmZXJDaGVja2VkSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgc291cmNlVG9rZW4udG9rZW5BY2NvdW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGRlc3RUb2tlbi50b2tlbkFjY291bnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgICBDYWxjdWxhdG9yLmNhbGN1bGF0ZUFtb3VudChhbW91bnQsIG1pbnREZWNpbWFsKSxcbiAgICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICAgICBbb3duZXIudG9LZXlwYWlyKCldLFxuICAgICAgICApO1xuICAgICAgICB0eC5hZGQoaW5zdDIpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgLy8gcmV0dXJuIGluc3RydWN0aW9uIGFuZCB1bmRlY2lkZWQgYXNzb2NpYXRlZCB0b2tlbiBhY2NvdW50XG4gICAgICAgIGluc3QyID0gY3JlYXRlVHJhbnNmZXJDaGVja2VkSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgc291cmNlVG9rZW4udG9rZW5BY2NvdW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGRlc3RUb2tlbi50b2tlbkFjY291bnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgIC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LlBkYS5nZXRNZXRhZGF0YShtaW50LnRvU3RyaW5nKCkpO1xuICAgIGNvbnN0IHRva2VuQXNzb2NpYXRlZCA9IGdldEFzc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jKG1pbnQsIG93bmVyKTtcbiAgICBjb25zdCBpbnN0cnVjdGlvbnMgPSBbXTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgU3lzdGVtUHJvZ3JhbS5jcmVhdGVBY2NvdW50KHtcbiAgICAgICAgZnJvbVB1YmtleTogZmVlUGF5ZXIsXG4gICAgICAgIG5ld0FjY291bnRQdWJrZXk6IG1pbnQsXG4gICAgICAgIHNwYWNlOiBNSU5UX1NJWkUsXG4gICAgICAgIGxhbXBvcnRzOiBsYW1wb3J0cyxcbiAgICAgICAgcHJvZ3JhbUlkOiBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgfSksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlSW5pdGlhbGl6ZU1pbnRJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgbWludERlY2ltYWwsXG4gICAgICAgIG93bmVyLFxuICAgICAgICBvd25lcixcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICBmZWVQYXllcixcbiAgICAgICAgdG9rZW5Bc3NvY2lhdGVkLFxuICAgICAgICBvd25lcixcbiAgICAgICAgbWludCxcbiAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlTWludFRvQ2hlY2tlZEluc3RydWN0aW9uKFxuICAgICAgICBtaW50LFxuICAgICAgICB0b2tlbkFzc29jaWF0ZWQsXG4gICAgICAgIG93bmVyLFxuICAgICAgICBDYWxjdWxhdGUuY2FsY3VsYXRlQW1vdW50KHRvdGFsQW1vdW50LCBtaW50RGVjaW1hbCksXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgKSxcbiAgICApO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVDcmVhdGVNZXRhZGF0YUFjY291bnRWM0luc3RydWN0aW9uKFxuICAgICAgICB7XG4gICAgICAgICAgbWV0YWRhdGE6IG1ldGFkYXRhUGRhLFxuICAgICAgICAgIG1pbnQsXG4gICAgICAgICAgbWludEF1dGhvcml0eTogb3duZXIsXG4gICAgICAgICAgcGF5ZXI6IGZlZVBheWVyLFxuICAgICAgICAgIHVwZGF0ZUF1dGhvcml0eTogb3duZXIsXG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICBjcmVhdGVNZXRhZGF0YUFjY291bnRBcmdzVjM6IHtcbiAgICAgICAgICAgIGRhdGE6IHRva2VuTWV0YWRhdGEsXG4gICAgICAgICAgICBpc011dGFibGUsXG4gICAgICAgICAgICBjb2xsZWN0aW9uRGV0YWlsczogbnVsbCxcbiAgICAgICAgICB9LFxuICAgICAgICB9LFxuICAgICAgKSxcbiAgICApO1xuICAgIHJldHVybiBpbnN0cnVjdGlvbnM7XG4gIH07XG5cbiAgLyoqXG4gICAqIFNQTC1UT0tFTiBtaW50XG4gICAqXG4gICAqIEBwYXJhbSB7U2VjcmV0fSBvd25lciAgICAgIC8vIHRva2VuIG93bmVyIFNlY3JldFxuICAgKiBAcGFyYW0ge251bWJlcn0gdG90YWxBbW91bnQgLy8gdG90YWwgbnVtYmVyXG4gICAqIEBwYXJhbSB7bnVtYmVyfSBtaW50RGVjaW1hbCAvLyB0b2tlbiBkZWNpbWFsXG4gICAqIEBwYXJhbSB7SW5wdXRUb2tlbk1ldGFkYXRhfSBpbnB1dCAgICAgICAvLyB0b2tlbiBtZXRhZGF0YVxuICAgKiBAcGFyYW0ge1BhcnRpYWw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52YWx1ZTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHRocm93IEVycm9yKGBNdXN0IHNldCBmaWxlUGF0aCcgb3IgJ3VyaSdgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgaXNNdXRhYmxlID0gdHJ1ZTtcblxuICAgICAgY29uc3QgZGF0YXYyID0gQ29udmVydGVyLlRva2VuTWV0YWRhdGEuaW50b0luZnJhKFxuICAgICAgICBpbnB1dCxcbiAgICAgICAgdXJpLFxuICAgICAgICBzZWxsZXJGZWVCYXNpc1BvaW50cyxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGRhdGF2MjogJywgZGF0YXYyKTtcbiAgICAgIGRlYnVnTG9nKCcjIHVwbG9hZCBjb250ZW50IHVybDogJywgdXJpKTtcblxuICAgICAgY29uc3QgbWludCA9IEFjY291bnQuS2V5cGFpci5jcmVhdGUoKTtcbiAgICAgIGNvbnN0IGluc3RzID0gYXdhaXQgY3JlYXRlTWludChcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgdG90YWxBbW91bnQsXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICBkYXRhdjIsXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgKTtcblxuICAgICAgLy8gZnJlZXplQXV0aG9yaXR5XG4gICAgICBpZiAoZnJlZXplQXV0aG9yaXR5KSB7XG4gICAgICAgIGluc3RzLnB1c2goXG4gICAgICAgICAgY3JlYXRlRnJlZXplQXV0aG9yaXR5KFxuICAgICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgICAgICBmcmVlemVBdXRob3JpdHkudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICA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zLFxuICAgIH07XG5cbiAgICBjb25zdCBhc3NldHMgPSBhd2FpdCBBcGkuZ2V0QXNzZXRzQnlPd25lcihcbiAgICAgIG93bmVyLFxuICAgICAgbGltaXQsXG4gICAgICBwYWdlLFxuICAgICAgc29ydEJ5LFxuICAgICAgYmVmb3JlLFxuICAgICAgYWZ0ZXIsXG4gICAgKTtcbiAgICBpZiAoYXNzZXRzLmlzRXJyKSB7XG4gICAgICB0aHJvdyBhc3NldHMuZXJyb3I7XG4gICAgfVxuXG4gICAgY29uc3QgaXRlbXMgPSBhc3NldHMudmFsdWUuaXRlbXM7XG5cbiAgICBjb25zdCBtZXRhZGF0YXMgPSBhd2FpdCBQcm9taXNlLmFsbChcbiAgICAgIGl0ZW1zXG4gICAgICAgIC5maWx0ZXIoKGl0ZW0pID0+IGl0ZW0uY29tcHJlc3Npb24uY29tcHJlc3NlZCA9PT0gaXNDb21wcmVzc2VkKVxuICAgICAgICAubWFwKGFzeW5jIChpdGVtKSA9PiB7XG4gICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgIGNvbnN0IG9mZmNoYWluOiBPZmZjaGFpbiA9IGF3YWl0IGZldGNoT2ZmY2hhaW4oXG4gICAgICAgICAgICAgIGl0ZW0uY29udGVudC5qc29uX3VyaSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgICBjb25zdCBtZXJnZWQgPSB7XG4gICAgICAgICAgICAgIG9uY2hhaW46IGl0ZW0sXG4gICAgICAgICAgICAgIG9mZmNoYWluOiBvZmZjaGFpbixcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICByZXR1cm4gQ29udmVydGVyLk5mdC5pbnRvVXNlcihtZXJnZWQpO1xuICAgICAgICAgIH0gY2F0Y2ggKGVycikge1xuICAgICAgICAgICAgZGVidWdMb2coJyMgRmFpbGVkIGZldGNoIG9mZmNoYWluIHVybDogJywgaXRlbS5jb250ZW50Lmpzb25fdXJpKTtcbiAgICAgICAgICAgIHJldHVybiBDb252ZXJ0ZXIuTm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biAgICAgICAgICBjcmVhdGVNZXRhZGF0YUFjY291bnRBcmdzVjM6IHtcbiAgICAgICAgICAgIGRhdGE6IG5mdE1ldGFkYXRhLFxuICAgICAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgICAgICAgY29sbGVjdGlvbkRldGFpbHM6IG51bGwsXG4gICAgICAgICAgfSxcbiAgICAgICAgfSxcbiAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlQ3JlYXRlTWFzdGVyRWRpdGlvblYzSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHtcbiAgICAgICAgICBlZGl0aW9uOiBtYXN0ZXJFZGl0aW9uUHVia2V5LFxuICAgICAgICAgIG1pbnQsXG4gICAgICAgICAgdXBkYXRlQXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBtaW50QXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBwYXllcjogZmVlUGF5ZXIsXG4gICAgICAgICAgbWV0YWRhdGE6IHRva2VuTWV0YWRhdGFQdWJrZXksXG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICBjcmVhdGVNYXN0ZXJFZGl0aW9uQXJnczoge1xuICAgICAgICAgICAgbWF4U3VwcGx5OiAwLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICApLFxuICAgICk7XG4gICAgcmV0dXJuIGluc3RydWN0aW9ucztcbiAgfTtcblxuICAvKipcbiAgICogVXBsb2FkIGNvbnRlbnQgYW5kIE5GVCBtaW50XG4gICAqXG4gICAqIEBwYXJhbSB7U2VjcmV0fSBvd25lciAgICAgICAgIC8vIG93bmVyJ3MgU2VjcmV0XG4gICAqIEBwYXJhbSB7SW5wdXROZnRNZXRhZGF0YX0gaW5wdXRcbiAgICoge1xuICAgKiAgIG5hbWU6IHN0cmluZyAgICAgICAgICAgICAgIC8vIG5mdCBjb250ZW50IG5hbWVcbiAgICogICBzeW1ib2w6IHN0cmluZyAgICA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ICAgICAgaW5wdXQuZmlsZVBhdGgsXG4gICAgICAgICAgc3RvcmFnZVR5cGUsXG4gICAgICAgICAgcGF5ZXIsXG4gICAgICAgICk7XG4gICAgICAgIGRlYnVnTG9nKCcjIHVwbG9hZCBjb250ZW50IHVybDogJywgdXBsb2FkZWQpO1xuICAgICAgICBpZiAodXBsb2FkZWQuaXNFcnIpIHtcbiAgICAgICAgICB0aHJvdyB1cGxvYWRlZDtcbiAgICAgICAgfVxuICAgICAgICB1cmkgPSB1cGxvYWRlZC52YWx1ZTtcbiAgICAgICAgLy8gdXBsb2FkZWQgZmlsZVxuICAgICAgfSBlbHNlIGlmIChpbnB1dC51cmkpIHtcbiAgICAgICAgY29uc3QgaW1hZ2UgPSB7IGltYWdlOiBpbnB1dC51cmkgfTtcbiAgICAgICAgY29uc3QgdXBsb2FkZWQgPSBhd2FpdCBTdG9yYWdlLnVwbG9hZERhdGEoXG4gICAgICAgICAgeyAuLi5zdG9yYWdlTWV0YWRhdGEsIC4uLmltYWdlIH0sXG4gICAgICAgICAgc3RvcmFnZVR5cGUsXG4gICAgICAgICAgcGF5ZXIsXG4gICAgICAgICk7XG4gICAgICAgIGlmICh1cGxvYWRlZC5pc0Vycikge1xuICAgICAgICAgIHRocm93IHVwbG9hZGVkO1xuICAgICAgICB9XG4gICAgICAgIHVyaSA9IHVwbG9hZGVkLnZhbHVlO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgdGhyb3cgRXJyb3IoYE11c3Qgc2V0IGZpbGVQYXRoJyBvciAndXJpJ2ApO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBkYXRhdjIgPSBDb252ZXJ0ZXIuUmVndWxhck5mdE1ldGFkYXRhLmludG9JbmZyYShcbiAgICAgICAgaW5wdXQsXG4gICAgICAgIHVyaSxcbiAgICAgICAgc2VsbGVyRmVlQmFzaXNQb2ludHMsXG4gICAgICApO1xuXG4gICAgICBjb25zdCBpc011dGFibGUgPSBpbnB1dC5pc011dGFibGUgPT09IHVuZGVmaW5lZCA/IHRydWUgOiBpbnB1dC5pc011dGFibGU7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGlucHV0OiAnLCBpbnB1dCk7XG4gICAgICBkZWJ1Z0xvZygnIyBkYXRhdjI6ICcsIGRhdGF2Mik7XG5cbiAgICAgIGNvbnN0IG1pbnQgPSBBY2NvdW50LktleXBhaXIuY3JlYXRlKCk7XG5cbiAgICAgIGNvbnN0IGluc3RydWN0aW9ucyA9IGF3YWl0IGNyZWF0ZU1pbnQoXG4gICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgIGRhdGF2MixcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICBpc011dGFibGUsXG4gICAgICApO1xuXG4gICAgICAvLyBmcmVlemVBdXRob3JpdHlcbiAgICAgIGlmIChmcmVlemVBdXRob3JpdHkpIHtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgICAgY3JlYXRlRGVsZWFnYXRlKFxuICAgICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgICAgICBmcmVlemVBdXRob3JpdHkudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICAvLyBjb2xsZWN0aW9uIC0tLVxuICAgICAgaWYgKGlucHV0LmNvbGxlY3Rpb24pIHtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgICAgY3JlYXRlVmVyaWZ5U2l6ZWRDb2xsZWN0aW9uKFxuICAgICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgaW5wdXQuY29sbGVjdGlvbi50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuIC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sPE1pbnRPcHRpb25zPiA9IHt9LFxuICApOiBQcm9taXNlPFJlc3VsdDxDb21tb25TdHJ1Y3R1cmU8UHVia2V5PiwgRXJyb3I+PiA9PiB7XG4gICAgcmV0dXJuIFRyeShhc3luYyAoKSA9PiB7XG4gICAgICBjb25zdCBwYXllciA9IG9wdGlvbnMuZmVlUGF5ZXIgPyBvcHRpb25zLmZlZVBheWVyIDogb3duZXJPck11bHRpc2lnWzBdO1xuICAgICAgY29uc3Qga2V5cGFpcnMgPSBvd25lck9yTXVsdGlzaWcubWFwKChzKSA9PiBzLnRvS2V5cGFpcigpKTtcblxuICAgICAgY29uc3QgdG9rZW5Bc3NvY2lhdGVkID0gYXdhaXQgQWNjb3VudC5Bc3NvY2lhdGVkLnJldHJ5R2V0T3JDcmVhdGUoXG4gICAgICAgIHRva2VuLFxuICAgICAgICBvd25lcixcbiAgICAgICAgcGF5ZXIsXG4gICAgICApO1xuXG4gICAgICBjb25zdCBpbnN0ID0gY3JlYXRlTWludFRvQ2hlY2tlZEluc3RydWN0aW9uKFxuICAgICAgICB0b2tlbi50b1B1YmxpY0tleSgpLFxuICAgICAgICB0b2tlbkFzc29jaWF0ZWQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgQ2FsY3VsYXRlLmNhbGN1bGF0ZUFtb3VudCh0b3RhbEFtb3VudCwgbWludERlY2ltYWwpLFxuICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICAga2V5cGFpcnMsXG4gICAgICApO1xuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb248UHVia2V5PihcbiAgICAgICAgW2luc3RdLFxuICAgICAgICBrZXlwYWlycyxcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCksXG4gICAgICAgIHRva2VuLFxuICAgICAgKTtcbiAgICB9KTtcbiAgfTtcbn1cbiIsICJpbXBvcnQgeyBDb21taXRtZW50LCBQ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8c3RyaW5nPihmZWVQYXllclBrKTtcblxuICAgIGNvbnN0IGl4c1NpemUgPSB0cmFuc2FjdGlvbi5pbnN0cnVjdGlvbnMucmVkdWNlKChhY2MsIGl4KSA9PiB7XG4gICAgICBpeC5rZXlzLmZvckVhY2goKHsgcHVia2V5LCBpc1NpZ25lciB9KSA9PiB7XG4gICAgICAgIGNvbnN0IHBrID0gcHVia2V5LnRvQmFzZTU4KCk7XG4gICAgICAgIGlmIChpc1NpZ25lcikgc2lnbmVycy5hZGQocGspO1xuICAgICAgICBhY2NvdW50cy5hZGQocGspO1xuICAgICAgfSk7XG5cbiAgICAgIGFjY291bnRzLmFkZChpeC5wcm9ncmFtSWQudG9CYXNlNTgoKSk7XG5cbiAgICAgIGNvbnN0IG5JbmRleGVzID0gaXgua2V5cy5sZW5ndGg7XG4gICAgICBjb25zdCBvcGFxdWVEYXRhID0gaXguZGF0YS5sZW5ndGg7XG5cbiAgICAgIHJldHVybiAoXG4gICAgICAgIGFjYyArXG4gICAgICAgIDEgKyAvLyBQSUQgaW5kZXhcbiAgICAgICAgY29tcGFjdEFycmF5U2l6ZShuSW5kZXhlcywgMSkgK1xuICAgICAgICBjb21wYWN0QXJyYXlTaXplKG9wYXF1ZURhdGEsIDEpXG4gICAgICApO1xuICAgIH0sIDApO1xuXG4gICAgcmV0dXJuIChcbiAgICAgIGNvbXBhY3RBcnJheVNpemUoc2lnbmVycy5zaXplLCA2NCkgKyAvLyBzaWduYXR1cmVzXG4gICAgICAzICsgLy8gaGVhZGVyXG4gICAgICBjb21wYWN0QXJyYXlTaXplKGFjY291bnRzLnNpemUsIDMyKSArIC8vIGFjY291bnRzXG4gICAgICAzMiArIC8vIGJsb2NraGFzaFxuICAgICAgY29tcGFjdEhlYWRlcih0cmFuc2FjdGlvbi5pbnN0cnVjdGlvbnMubGVuZ3RoKSArIC8vIGluc3RydWN0aW9uc1xuICAgICAgaXhzU2l6ZVxuICAgICk7XG4gIH07XG5cbiAgLyoqXG4gICAqIEl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gcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uPFB1YmtleT4oXG4gICAgICAgIFtyZXMuaW5zdF0sXG4gICAgICAgIFtdLFxuICAgICAgICBmZWVQYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgcmVzLnRva2VuQWNjb3VudCEsXG4gICAgICApO1xuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiBSZXRyeSBmdW5jdGlvbiBpZiBjcmVhdGUgbmV3IHRva2VuIGFjY291aW50XG4gICAgICpcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gbWludFxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBvd25lclxuICAgICAqIEBwYXJhbSB7U2VjcmV0fSBmZWVQYXllclxuICAgICAqIEByZXR1cm5zIFByb21pc2U8c3RyaW5nPlxuICAgICAqL1xuICAgIGV4cG9ydCBjb25zdCByZXRyeUdldE9yQ3JlYXRlID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyOiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxzdHJpbmc+ID0+IHtcbiAgICAgIGxldCBjb3VudGVyID0gMTtcbiAgICAgIHdoaWxlIChjb3VudGVyIDwgUkVUUllfT1ZFUl9MSU1JVCkge1xuICAgICAgICB0cnkge1xuICAgICAgICAgIGNvbnN0IGluc3QgPSBhd2FpdCBnZXQobWludCwgb3duZXIsIGZlZVBheWVyLCB0cnVlKTtcblxuICAgICAgICAgIGlmIChpbnN0ICYmIHR5cGVvZiBpbnN0ID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgaW5zdCk7XG4gICAgICAgICAgICByZXR1cm4gaW5zdDtcbiAgICAgICAgICB9IGVsc2UgaWYgKGluc3QgaW5zdGFuY2VvZiBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uKSB7XG4gICAgICAgICAgICAoYXdhaXQgaW5zdC5zdWJtaXQoKSkubWFwKFxuICAgICAgICAgICAgICBhc3luYyAob2s6IHN0cmluZykgPT4ge1xuICAgICAgICAgICAgICAgIGF3YWl0IE5vZGUuY29uZmlybWVkU2lnKG9rKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gaW5zdC5kYXRhO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAoZXJyOiBFcnJvcikgPT4ge1xuICAgICAgICAgICAgICAgIGRlYnVnTG9nKCcjIEVycm9yIHN1Ym1pdCByZXRyeUdldE9yQ3JlYXRlOiAnLCBlcnIpO1xuICAgICAgICAgICAgICAgIHRocm93IGVycjtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgZGVidWdMb2coYCMgcmV0cnk6ICR7Y291bnRlcn0gY3JlYXRlIHRva2VuIGFjY291bnQ6IGAsIGUpO1xuICAgICAgICAgIGRlYnVnTG9nKGAjIG1pbnQ6ICR7bWludH0sIG93bmVyOiAke293bmVyfSwgZmVlUGF5ZXI6ICR7ZmVlUGF5ZXJ9YCk7XG4gICAgICAgIH1cbiAgICAgICAgYXdhaXQgc2xlZXAoUkVUUllfU0xFRVBfVElNRSk7XG4gICAgICAgIGNvdW50ZXIrKztcbiAgICAgIH1cbiAgICAgIHRocm93IEVycm9yKGByZXRyeSBhY3Rpb24gaXMgb3ZlciBsaW1pdCAke1JFVFJZX09WRVJfTElNSVR9YCk7XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIFtNYWluIGxvZ2ljXUdldCBBc3NvY2lhdGVkIHRva2VuIEFjY291bnQuXG4gICAgICogaWYgbm90IGNyZWF0ZWQsIGNyZWF0ZSBuZXcgdG9rZW4gYWNjb3VpbnRcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBtaW50XG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAgICogQHBhcmFtIHtQdWJrZXl9IGZlZVBheWVyXG4gICAgICogQHJldHVybnMgUHJvbWlzZTxzdHJpbmc+XG4gICAgICovXG4gICAgZXhwb3J0IGNvbnN0IG1ha2VPckNyZWF0ZUluc3RydWN0aW9uID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyPzogUHVia2V5LFxuICAgICAgYWxsb3dPd25lck9mZkN1cnZlID0gZmFsc2UsXG4gICAgKTogUHJvbWlzZTx7XG4gICAgICB0b2tlbkFjY291bnQ6IHN0cmluZztcbiAgICAgIGluc3Q6IFRyYW5zYWN0aW9uSW5zdHJ1Y3Rpb24gfCB1bmRlZmluZWQ7XG4gICAgfT4gPT4ge1xuICAgICAgY29uc3QgYXNzb2NpYXRlZFRva2VuQWNjb3VudCA9IGdldEFzc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jKFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSxcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3QsXG4gICAgICAgIH07XG4gICAgICB9XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9yd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KGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEuc3ltYm9sKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU3ltYm9sKG1ldGFkYXRhLnN5bWJvbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAocmVzICYmIHJlcy5pc0Vycikge1xuICAgICAgICAgIHJlc3VsdHMucHVzaCguLi5yZXMuZXJyb3IuZGV0YWlscyk7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgICAgaWYgKHJlc3VsdHMubGVuZ3RoID4gMCkge1xuICAgICAgICBjb25zdCBtZXNzYWdlID1cbiAgICAgICAgICAnQ2F1Z2h0IGluIHRoZSB2YWxpZGF0aW9uIGVycm9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xpY0tleSgpLFxuICAgICAgICB7XG4gICAgICAgICAgcHJvZ3JhbUlkOiBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICB9LFxuICAgICAgKTtcblxuICAgICAgY29uc3QgZGF0YXMgPSBpbmZvLnZhbHVlLm1hcChhc3luYyAoZCkgPT4ge1xuICAgICAgICBjb25zdCBtaW50ID0gZC5hY2NvdW50LmRhdGEucGFyc2VkLmluZm8ubWludCBhcyBQdWJrZXk7XG4gICAgICAgIGNvbnN0IHRva2VuQW1vdW50ID0gZC5hY2NvdW50LmRhdGEucGFyc2VkLmluZm8udG9rZW5BbW91bnRcbiAgICAgICAgICAuYW1vdW50IGFzIHN0cmluZztcbiAgICAgICAgaWYgKHRva2VuQW1vdW50ID09PSAnMScpIHtcbiAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIE1ldGFkYXRhLmZyb21BY2NvdW50QWRkcmVzcyhcbiAgICAgICAgICBjb25uZWN0aW9uLFxuICAgICAgICAgIEFjY291bnQuUGRhLmdldE1ldGFkYXRhKG1pbnQpLFxuICAgICAgICApXG4gICAgICAgICAgLnRoZW4oYXN5bmMgKG1ldGFkYXRhKSA9PiB7XG4gICAgICAgICAgICAvKiBlc2xpbnQtZGlzYWJsZSBAdHlwZXNjcmlwdC1lc2xpbnQvbm8tZXhwbGljaXQtYW55ICovXG4gICAgICAgICAgICByZXR1cm4gZmV0Y2hSZXRyeShtZXRhZGF0YS5kYXRhLnVyaSkudGhlbigoanNvbjogYW55KSA9PiB7XG4gICAgICAgICAgICAgIHJldHVybiBjb252ZXJ0ZXIobWV0YWRhdGEsIGpzb24sIHRva2VuQW1vdW50KTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgIH0pXG4gICAgICAgICAgLmNhdGNoKChlcnIpID0+IGRlYnVnTG9nKCcjIFtGZXRjaCBlcnJvcl0nLCBlcnIpKTtcbiAgICAgIH0pO1xuXG4gICAgICBjb25zdCBmaWx0ZXJzID0g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zb2NpYXRlZC5tYWtlT3JDcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgZGVzdCxcbiAgICAgICAgZmVlUGF5ZXIsXG4gICAgICApO1xuXG4gICAgICBsZXQgaW5zdDI7XG4gICAgICBjb25zdCBibG9ja2hhc2hPYmogPSBhd2FpdCBOb2RlLmdldENvbm5lY3Rpb24oKS5nZXRMYXRlc3RCbG9ja2hhc2goKTtcblxuICAgICAgY29uc3QgdHggPSBuZXcgVHJhbnNhY3Rpb24oe1xuICAgICAgICBsYXN0VmFsaWRCbG9ja0hlaWdodDogYmxvY2toYXNoT2JqLmxhc3RWYWxpZEJsb2NrSGVpZ2h0LFxuICAgICAgICBibG9ja2hhc2g6IGJsb2NraGFzaE9iai5ibG9ja2hhc2gsXG4gICAgICAgIGZlZVBheWVyOiBmZWVQYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgfSk7XG5cbiAgICAgIC8vIHJldHVybiBhc3NvY2lhdGVkIHRva2VuIGFjY291bnRcbiAgICAgIGlmICghZGVzdFRva2VuLmluc3QpIHtcbiAgICAgICAgaW5zdDIgPSBjcmVhdGVUcmFuc2ZlckNoZWNrZWRJbnN0cnVjdGlvbihcbiAgICAgICAgICBzb3VyY2VUb2tlbi50b2tlbkFjY291bnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgZGVzdFRva2VuLnRva2VuQWNjb3VudC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICAgIENhbGN1bGF0b3IuY2FsY3VsYXRlQW1vdW50KGFtb3VudCwgbWludERlY2ltYWwpLFxuICAgICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICAgIFtvd25lci50b0tleXBhaXIoKV0sXG4gICAgICAgICk7XG4gICAgICAgIHR4LmFkZChpbnN0Mik7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICAvLyByZXR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ICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgZmVlUGF5ZXIsXG4gICAgICAgIHRva2VuQXNzb2NpYXRlZCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIG1pbnQsXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZU1pbnRUb0NoZWNrZWRJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgdG9rZW5Bc3NvY2lhdGVkLFxuICAgICAgICBvd25lcixcbiAgICAgICAgQ2FsY3VsYXRlLmNhbGN1bGF0ZUFtb3VudCh0b3RhbEFtb3VudCwgbWludERlY2ltYWwpLFxuICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlQ3JlYXRlTWV0YWRhdGFBY2NvdW50VjNJbnN0cnVjdGlvbihcbiAgICAgICAge1xuICAgICAgICAgIG1ldGFkYXRhOiBtZXRhZGF0YVBkYSxcbiAgICAgICAgICBtaW50LFxuICAgICAgICAgIG1pbnRBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICAgIHBheWVyOiBmZWVQYXllcixcbiAgICAgICAgICB1cGRhdGVBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICB9LFxuICAgICAgICB7XG4gICAgICAgICAgY3JlYXRlTWV0YWRhdGFBY2NvdW50QXJnc1YzOiB7XG4gICAgICAgICAgICBkYXRhOiB0b2tlbk1ldGFkYXRhLFxuICAgICAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgICAgICAgY29sbGVjdGlvbkRldGFpbHM6IG51bGwsXG4gICAgICAgICAgfSxcbiAgICAgICAgfSxcbiAgICAgICksXG4gICAgKTtcbiAgICByZXR1cm4gaW5zdHJ1Y3Rpb25zO1xuICB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WVQYXllcjogUHVibGljS2V5LFxuICAgIGlzTXV0YWJsZTogYm9vbGVhbixcbiAgKTogUHJvbWlzZTxUcmFuc2FjdGlvbkluc3RydWN0aW9uW10+ID0+IHtcbiAgICBjb25zdCBhdGEgPSBnZXRBc3NvY2lhdGVkVG9rZW5BZGRyZXNzU3luYyhtaW50LCBvd25lcik7XG4gICAgY29uc3QgdG9rZW5NZXRhZGF0YVB1YmtleSA9IEFjY291bnQuUGRhLmdldE1ldGFkYXRhKG1pbnQudG9TdHJpbmcoKSk7XG4gICAgY29uc3QgbWFzdGVyRWRpdGlvblB1YmtleSA9IEFjY291bnQuUGRhLmdldE1hc3RlckVkaXRpb24obWludC50b1N0cmluZygpKTtcbiAgICBjb25zdCBjb25uZWN0aW9uID0gTm9kZS5nZXRDb25uZWN0aW9uKCk7XG4gICAgY29uc3QgaW5zdHJ1Y3Rpb25zID0gW107XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIFN5c3RlbVByb2dyYW0uY3JlYXRlQWNjb3VudCh7XG4gICAgICAgIGZyb21QdWJrZXk6IGZlZVBheWVyLFxuICAgICAgICBuZXdBY2NvdW50UHVia2V5OiBtaW50LFxuICAgICAgICBsYW1wb3J0czogYXdhaXQgZ2V0TWluaW11bUJhbGFuY2VGb3JSZW50RXhlbXB0TWludChjb25uZWN0aW9uKSxcbiAgICAgICAgc3BhY2U6IE1JTlRfU0laRSxcbiAgICAgICAgcHJvZ3JhbUlkOiBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgfSksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKGNyZWF0ZUluaXRpYWxpemVNaW50SW5zdHJ1Y3Rpb24obWludCwgMCwgb3duZXIsIG93bmVyKSk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihmZWVQYXllciwgYXRhLCBvd25lciwgbWludCksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKGNyZWF0ZU1pbnRUb0NoZWNrZWRJbnN0cnVjdGlvbihtaW50LCBhdGEsIG93bmVyLCAxLCAwKSk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUNyZWF0ZU1ldGFkYXRhQWNjb3VudFYzSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHtcbiAgICAgICAgICBtZXRhZGF0YTogdG9rZW5NZXRhZGF0YVB1YmtleSxcbiAgICAgICAgICBtaW50LFxuICAgICAgICAgIG1pbnRBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICAgIHBheWVyOiBmZWVQYXllcixcbiAgICAgICAgICB1cGRhdGVBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICB9LFxuICAgICAgICB7XG4gICAgICAgICAgY3JlYXRlTWV0YWRhdGFBY2NvdW50QXJnc1YzOiB7XG4gICAgICAgICAgICBkYXRhOiBuZnRNZXRhZGF0YSxcbiAgICAgICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICAgICAgIGNvbGxlY3Rpb25EZXRhaWxzOiBudWxsLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUNyZWF0ZU1hc3RlckVkaXRpb25WM0luc3RydWN0aW9uKFxuICAgICAgICB7XG4gICAgICAgICAgZWRpdGlvbjogbWFzdGVyRWRpdGlvblB1YmtleSxcbiAgICAgICAgICBtaW50LFxuICAgICAgICAgIHVwZGF0ZUF1dGhvcml0eTogb3duZXIsXG4gICAgICAgICAgbWludEF1dGhvcml0eTogb3duZXIsXG4gICAgICAgICAgcGF5ZXI6IGZlZVBheWVyLFxuICAgICAgICAgIG1ldGFkYXRhOiB0b2tlbk1ldGFkYXRhUHVia2V5LFxuICAgICAgICB9LFxuICAgICAgICB7XG4gICAgICAgICAgY3Jl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dWJsaWNLZXkoKSxcbiAgICAgICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICAgICAgZnJlZXplQXV0aG9yaXR5LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgLy8gY29sbGVjdGlvbiAtLS1cbiAgICAgIGlmIChpbnB1dC5jb2xsZWN0aW9uKSB7XG4gICAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICAgIGNyZWF0ZVZlcmlmeVNpemVkQ29sbGVjdGlvbihcbiAgICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIGlucHV0LmNvbGxlY3Rpb24udG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBrZXlwYWlycyA9IFtvd25lci50b0tleXBhaXIoKSwgbWludC50b0tleXBhaXIoKV07XG5cbiAgICAgIC8vIGNyZWF0b3IgLS0tXG4gICAgICBpZiAoaW5wdXQuY3JlYXRvcnMpIHtcbiAgICAgICAgaW5wdXQuY3JlYXRvcnMuZm9yRWFjaCgoY3JlYXRvcikgPT4ge1xuICAgICAgICAgIGlmIChBY2NvdW50LktleXBhaXIuaXNTZWNyZXQoY3JlYXRvci5zZWNyZXQpKSB7XG4gICAgICAgICAgICBjb25zdCBjcmVhdG9yUHVia2V5ID0gY3JlYXRvci5hZGRyZXNzLnRvUHVibGljS2V5KCk7XG4gICAgICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlVmVyaWZ5Q3JlYXRvcihtaW50LnRvUHVibGljS2V5KCksIGNyZWF0b3JQdWJrZXkpO1xuICAgICAgICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goaW5zdCk7XG4gICAgICAgICAgICBrZXlwYWlycy5wdXNoKGNyZWF0b3Iuc2Vjcm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ia2V5LFxuICAgICAgKTtcblxuICAgICAgY29uc3QgaW5zdHJ1Y3Rpb25zID0gYXdhaXQgTWludC5jcmVhdGVNaW50KFxuICAgICAgICBjb2xsZWN0aW9uTWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgZGF0YXYyLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICk7XG5cbiAgICAgIC8vIGZyZWV6ZUF1dGhvcml0eVxuICAgICAgaWYgKGZyZWV6ZUF1dGhvcml0eSkge1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgICBNaW50LmNyZWF0ZURlbGVhZ2F0ZShcbiAgICAgICAgICAgIGNvbGxlY3Rpb25NaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgICAgIGZyZWV6ZUF1dGhvcml0eS50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGNvbGxlY3Rpb25zID0ge1xuICAgICAgICBjb2xsZWN0aW9uTWV0YWRhdGE6IGNvbGxlY3Rpb25NZXRhZGF0YUFjY291bnQsXG4gICAgICAgIGNvbGxlY3Rpb25BdXRob3JpdHk6IG93bmVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgY29sbGVjdGlvbk1pbnQ6IGNvbGxlY3Rpb25NaW50LnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgIH07XG5cbiAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICBjcmVhdGVTZXRDb2xsZWN0aW9uU2l6ZUluc3RydWN0aW9uKGNvbGxlY3Rpb25zLCB7XG4gICAgICAgICAgc2V0Q29sbGVjdGlvblNpemVBcmdzOiB7XG4gICAgICAgICAgICBzaXplOiBjb2xsZ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nN0cnVjdGlvbiIsICJSZWd1bGFyTmZ0IiwgIm1pbnQiLCAiQWNjb3VudCIsICJnZXRBc3NvY2lhdGVkVG9rZW5BZGRyZXNzU3luYyIsICJTeXN0ZW1Qcm9ncmFtIiwgImdldE1pbmltdW1CYWxhbmNlRm9yUmVudEV4ZW1wdE1pbnQiLCAiTUlOVF9TSVpFIiwgIlRPS0VOX1BST0dSQU1fSUQiLCAiY3JlYXRlSW5pdGlhbGl6ZU1pbnRJbnN0cnVjdGlvbiIsICJjcmVhdGVBc3NvY2lhdGVkVG9rZW5BY2NvdW50SW5zdHJ1Y3Rpb24iLCAiY3JlYXRlTWludFRvQ2hlY2tlZEluc3RydWN0aW9uIiwgIkNvbnZlcnRlciIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiVHJhbnNhY3Rpb24iLCAiUmVndWxhck5mdCIsICJDb252ZXJ0ZXIiLCAiQWNjb3VudCIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiUmVndWxhck5mdCIsICJTcGxUb2tlbiIsICJSZWd1bGFyTmZ0IiwgIkNvbnZlcnRlciIsICJBY2NvdW50IiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJnZXRBc3NvY2lhdGVkVG9rZW5BZGRyZXNzU3luYyIsICJSZWd1bGFyTmZ0IiwgIkFjY291bnQiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlJlZ3VsYXJOZnQiLCAiU3BsVG9rZW4iLCAiUmVndWxhck5mdCJdCn0K \ No newline at end of file diff --git a/packages/suite-sol-native/dist/index.js b/packages/suite-sol-native/dist/index.js index 230b0d7d6..3e95374c0 100644 --- a/packages/suite-sol-native/dist/index.js +++ b/packages/suite-sol-native/dist/index.js @@ -34,7 +34,7 @@ __export(src_exports, { }); module.exports = __toCommonJS(src_exports); -// ../shared/src/constants.ts +// ../suite-utils/src/constants.ts var import_web3 = require("@solana/web3.js"); var import_load = __toESM(require("@solana-suite/config/load")); var Config = import_load.default; @@ -310,56 +310,6 @@ var TransactionBuilder; TransactionBuilder7.Common = Common2; })(TransactionBuilder || (TransactionBuilder = {})); -// ../shared/src/shared.ts -var overwriteObject = (object, targets) => { - const that = object; - targets.forEach((target) => { - delete that[target.existsKey]; - that[target.will.key] = target.will.value; - }); - return that; -}; -var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { - if (Constants.isDebugging === "true" || process.env.DEBUG === "true") { - console.log("[DEBUG]", data1, data2, data3, data4); - } -}; -var sleep = async (sec) => { - return new Promise((r) => setTimeout(r, sec * 1e3)); -}; -var isPromise = (obj) => { - return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; -}; -function Try(input, finallyInput) { - try { - const v = input(); - if (isPromise(v)) { - return v.then( - (x) => Result.ok(x), - (err) => Result.err(err) - ); - } else { - return Result.ok(v); - } - } catch (e) { - if (e instanceof Error) { - return Result.err(e); - } - return Result.err(Error(e)); - } finally { - if (finallyInput) { - debugLog("# finally input:", finallyInput); - finallyInput(); - } - } -} -var convertTimestampToDateTime = (created_at) => { - if (created_at) { - return new Date(created_at * 1e3); - } - return; -}; - // ../transaction-builder/src/batch.ts var TransactionBuilder2; ((TransactionBuilder7) => { @@ -814,7 +764,57 @@ var TransactionBuilder6 = { ...TransactionBuilder4 }; -// ../shared/src/result.ts +// ../suite-utils/src/shared.ts +var overwriteObject = (object, targets) => { + const that = object; + targets.forEach((target) => { + delete that[target.existsKey]; + that[target.will.key] = target.will.value; + }); + return that; +}; +var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { + if (Constants.isDebugging === "true" || process.env.DEBUG === "true") { + console.log("[DEBUG]", data1, data2, data3, data4); + } +}; +var sleep = async (sec) => { + return new Promise((r) => setTimeout(r, sec * 1e3)); +}; +var isPromise = (obj) => { + return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; +}; +function Try(input, finallyInput) { + try { + const v = input(); + if (isPromise(v)) { + return v.then( + (x) => Result.ok(x), + (err) => Result.err(err) + ); + } else { + return Result.ok(v); + } + } catch (e) { + if (e instanceof Error) { + return Result.err(e); + } + return Result.err(Error(e)); + } finally { + if (finallyInput) { + debugLog("# finally input:", finallyInput); + finallyInput(); + } + } +} +var convertTimestampToDateTime = (created_at) => { + if (created_at) { + return new Date(created_at * 1e3); + } + return; +}; + +// ../suite-utils/src/result.ts var AbstractResult = class { unwrap(ok, err) { const r = this._chain( @@ -926,15 +926,15 @@ var InternalErr = class extends AbstractResult { } }; var Result; -((Result11) => { +((Result12) => { function ok(value) { return new InternalOk(value); } - Result11.ok = ok; + Result12.ok = ok; function err(error) { return new InternalErr(error || Error()); } - Result11.err = err; + Result12.err = err; function all(obj) { if (Array.isArray(obj)) { const resArr = []; @@ -944,7 +944,7 @@ var Result; } resArr.push(item.value); } - return Result11.ok(resArr); + return Result12.ok(resArr); } const res = {}; const keys = Object.keys(obj); @@ -955,9 +955,9 @@ var Result; } res[key] = item.value; } - return Result11.ok(res); + return Result12.ok(res); } - Result11.all = all; + Result12.all = all; })(Result || (Result = {})); // ../converter/src/collection.ts @@ -1841,4 +1841,4 @@ var SolNative5 = { 0 && (module.exports = { SolNative }); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uLy4uL3NoYXJlZC9zcmMvY29uc3RhbnRzLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2JhdGNoLnRzIiwgIi4uLy4uL25vZGUvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2NvbW1vbi50cyIsICIuLi8uLi9zaGFyZWQvc3JjL3NoYXJlZC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9taW50LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL3BhcnRpYWwtc2lnbi50cyIsICIuLi8uLi90cmFuc2FjdG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25zICYmICFhLnNpZ25lcnMpIHtcbiAgICAgICAgICAgIHRocm93IEVycm9yKFxuICAgICAgICAgICAgICBgb25seSBJbnN0cnVjdGlvbiBvYmplY3QgdGhhdCBjYW4gdXNlIGJhdGNoU3VibWl0KCkuXG4gICAgICAgICAgICBJbmRleDogJHtpfSwgU2V0IHZhbHVlOiAke0pTT04uc3RyaW5naWZ5KGEpfWAsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICBpKys7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBpbnN0cnVjdGlvbnMgPSBhcnIuZmxhdE1hcCgoYSkgPT4gYS5pbnN0cnVjdGlvbnMpO1xuICAgICAgICBjb25zdCBzaWduZXJzID0gYXJyLmZsYXRNYXAoKGEpID0+IGEuc2lnbmVycyk7XG4gICAgICAgIGNvbnN0IGZlZVBheWVycyA9IGFyci5maWx0ZXIoKGEpID0+IGEuZmVlUGF5ZXIgIT09IHVuZGVmaW5lZCk7XG4gICAgICAgIGxldCBmZWVQYXllciA9IHNpZ25lcnNbMF07XG4gICAgICAgIGlmIChmZWVQYXllcnMubGVuZ3RoID4gMCAmJiBmZWVQYXllcnNbMF0uZmVlUGF5ZXIpIHtcbiAgICAgICAgICBmZWVQYXllciA9IGZlZVBheWVyc1swXS5mZWVQYXllcjtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHRyYW5zYWN0aW9uID0gbmV3IFRyYW5zYWN0aW9uKCk7XG4gICAgICAgIGxldCBmaW5hbFNpZ25lcnMgPSBzaWduZXJzO1xuICAgICAgICBpZiAoZmVlUGF5ZXIpIHtcbiAgICAgICAgICB0cmFuc2FjdGlvbi5mZWVQYXllciA9IGZlZVBheWVyLnB1YmxpY0tleTtcbiAgICAgICAgICBmaW5hbFNpZ25lcnMgPSBbZmVlUGF5ZXIsIC4uLnNpZ25lcnNdO1xuICAgICAgICB9XG4gICAgICAgIGluc3RydWN0aW9ucy5tYXAoKGluc3QpID0+IHRyYW5z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gICAgICBsZXQgY291bnRlciA9IDE7XG4gICAgICB3aGlsZSAoY291bnRlciA8IFJFVFJZX09WRVJfTElNSVQpIHtcbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICBjb25zdCBpbnN0ID0gYXdhaXQgZ2V0KG1pbnQsIG93bmVyLCBmZWVQYXllciwgdHJ1ZSk7XG5cbiAgICAgICAgICBpZiAoaW5zdCAmJiB0eXBlb2YgaW5zdCA9PT0gJ3N0cmluZycpIHtcbiAgICAgICAgICAgIGRlYnVnTG9nKCcjIGFzc29jaWF0ZWRUb2tlbkFjY291bnQ6ICcsIGluc3QpO1xuICAgICAgICAgICAgcmV0dXJuIGluc3Q7XG4gICAgICAgICAgfSBlbHNlIGlmIChpbnN0IGluc3RhbmNlb2YgVHJhbnNhY3Rpb25CdWlsZGVyLkNvbW1vbikge1xuICAgICAgICAgICAgKGF3YWl0IGluc3Quc3VibWl0KCkpLm1hcChcbiAgICAgICAgICAgICAgYXN5bmMgKG9rOiBzdHJpbmcpID0+IHtcbiAgICAgICAgICAgICAgICBhd2FpdCBOb2RlLmNvbmZpcm1lZFNpZyhvayk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGluc3QuZGF0YTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgKGVycjogRXJyb3IpID0+IHtcbiAgICAgICAgICAgICAgICBkZWJ1Z0xvZygnIyBFcnJvciBzdWJtaXQgcmV0cnlHZXRPckNyZWF0ZTogJywgZXJyKTtcbiAgICAgICAgICAgICAgICB0aHJvdyBlcnI7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgIGRlYnVnTG9nKGAjIHJldHJ5OiAke2NvdW50ZXJ9IGNyZWF0ZSB0b2tlbiBhY2NvdW50OiBgLCBlKTtcbiAgICAgICAgICBkZWJ1Z0xvZyhgIyBtaW50OiAke21pbnR9LCBvd25lcjogJHtvd25l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Gxvd093bmVyT2ZmQ3VydmUsXG4gICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGFzc29jaWF0ZWRUb2tlbkFjY291bnQ6ICcsIGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSk7XG5cbiAgICAgIHRyeSB7XG4gICAgICAgIC8vIERvbnQgdXNlIFJlc3VsdFxuICAgICAgICBhd2FpdCBnZXRBY2NvdW50KFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCkuY29tbWl0bWVudCxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3Q6IHVuZGVmaW5lZCxcbiAgICAgICAgfTtcbiAgICAgIH0gY2F0Y2ggKGVycm9yOiB1bmtub3duKSB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5BY2NvdW50Tm90Rm91bmRFcnJvcikgJiZcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5JbnZhbGlkQWNjb3VudE93bmVyRXJyb3IpXG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9yKCdVbmV4cGVjdGVkIGVycm9yJyk7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBwYXllciA9ICFmZWVQYXllciA/IG93bmVyIDogZmVlUGF5ZXI7XG5cbiAgICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZUFzc29jaWF0ZWRU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Wxhci1uZnQnO1xuaW1wb3J0IHsgSW50ZXJuYWxDcmVhdG9ycyB9IGZyb20gJ34vdHlwZXMvY29udmVydGVyJztcblxuZXhwb3J0IG5hbWVzcGFjZSBDb252ZXJ0ZXIge1xuICBleHBvcnQgbmFtZXNwYWNlIENyZWF0b3JzIHtcbiAgICBleHBvcnQgY29uc3QgaW50b0luZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IE9wdGlvbjxJbnRlcm5hbENyZWF0b3JzW10+ID0+IHtcbiAgICAgIGlmICghaW5wdXQpIHtcbiAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICB9XG4gICAgICByZXR1cm4gaW5wdXQubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvQ29tcHJlc3NlZE5mdEluZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IEludGVybmFsQ3JlYXRvcnNbXSA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBbXTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBpbnB1dCEubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O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rTmZ0U3RvcmFnZU1ldGFwbGV4IHwgUGlja01ldGFwbGV4LFxuICA+KFxuICAgIG1ldGFkYXRhOiBULFxuICApOiBSZXN1bHQ8c3RyaW5nLCBWYWxpZGF0b3JFcnJvcj4gPT4ge1xuICAgIHJldHVybiBUcnkoKCkgPT4ge1xuICAgICAgY29uc3Qga2V5cyA9IE9iamVjdC5rZXlzKG1ldGFkYXRhKTtcbiAgICAgIGNvbnN0IHJlc3VsdHM6IERldGFpbHNbXSA9IFtdO1xuICAgICAga2V5cy5tYXAoKGtleSkgPT4ge1xuICAgICAgICBsZXQgcmVzITogUmVzdWx0PHN0cmluZywgVmFsaWRhdG9yRXJyb3I+O1xuICAgICAgICBzd2l0Y2ggKGtleSkge1xuICAgICAgICAgIGNhc2UgJ2ltYWdlJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuaW1hZ2UpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNJbWFnZVVybChtZXRhZGF0YS5pbWFnZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdyb3lhbHR5JzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEucm95YWx0eSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1JveWFsdHkobWV0YWRhdGEucm95YWx0eSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICA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RJbnN0cnVjdGlvbihpbnN0cnVjdGlvbikgJiZcbiAgICAgICAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLlRyYW5zZmVyLnByb2dyYW0uaW5jbHVkZXMoXG4gICAgICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbi5wcm9ncmFtLFxuICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlciA9IGluc3RydWN0aW9uO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICk7XG5cbiAgICAgICAgICAgICAgICAvLyBzcGwtdG9rZW4gb3Igc3lzdGVtXG4gICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlciAmJlxuICAgICAgICAgICAgICAgICAgbW9kdWxlTmFtZSAhPT0gaW5zdHJ1Y3Rpb25UcmFuc2ZlclsncHJvZ3JhbSddXG4gICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICBkZWJ1Z0xvZyhcbiAgICAgICAgICAgICAgICAgICAgJyMgRmlsdGVyVHlwZS5NZW1vIGJyZWFrIGluc3RydWN0aW9uOiAnLFxuICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyLFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vIGZldGNoIG1lbW8gb25seSB0cmFuc2FjdGlvblxuICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuTWVtby5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIsXG4gICAgICAgICAgICAgICAgICBwb3N0VG9rZW5BY2NvdW50LFxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXNlIEZpbHRlclR5cGUuT25seU1lbW86IHtcbiAgICAgICAgICAgICAgaWYgKEZpbHRlck9wdGlvbnMuTWVtby5wcm9ncmFtLmluY2x1ZGVzKGluc3RydWN0aW9uLnByb2dyYW0pKSB7XG4gICAgICAgICAgICAgICAgbGV0IGluc3RydWN0aW9uVHJhbnNmZXI7XG5cbiAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLk1lbW8uaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyLFxuICAgICAgICAgICAgICAgICAgcG9zdFRva2VuQWNjb3VudCxcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLk1pbnQ6IHtcbiAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuTWludC5wcm9ncmFtLmluY2x1ZGVzKGluc3RydWN0aW9uLnByb2dyYW0pICYmXG4gICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5NaW50LmFjdGlvbi5pbmNsdWRlcyhcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLnBhcnNlZC50eXBlIGFzIHN0cmluZyxcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuTWludC5pbnRvVXNlclNpZGUoaW5zdHJ1Y3Rpb24sIHR4TWV0YSk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXNlIEZpbHRlclR5cGUuVHJhbnNmZXI6XG4gICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICBtb2R1bGVOYW1lID09PSBpbnN0cnVjdGlvbi5wcm9ncmFtICYmXG4gICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5UcmFuc2Zlci5hY3Rpb24uaW5jbHVkZXMoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbi5wYXJzZWQudHlwZSBhcyBzdHJpbmcsXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICBpZiAoaW5zdHJ1Y3Rpb24ucGFyc2VkLnR5cGUgPT09ICd0cmFuc2ZlckNoZWNrZWQnKSB7XG4gICAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLlRyYW5zZmVyQ2hlY2tlZC5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICAgIHBvc3RUb2tlbkFjY291bnQsXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLlRyYW5zZmVyLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIHJldHVyb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GNvbnN0IHBheWVyID0gb3B0aW9ucy5mZWVQYXllciA/IG9wdGlvbnMuZmVlUGF5ZXIgOiBtdWx0aXNpZ1swXTtcbiAgICAgIGNvbnN0IGtleXBhaXJzID0gbXVsdGlzaWcubWFwKChzKSA9PiBzLnRvS2V5cGFpcigpKTtcbiAgICAgIGNvbnN0IHdyYXBwZWQgPSBhd2FpdCBjcmVhdGVXcmFwcGVkTmF0aXZlQWNjb3VudChcbiAgICAgICAgY29ubmVjdGlvbixcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIHBhcnNlSW50KGAke2Ftb3VudC50b0xhbXBvcnRzKCl9YCwgUkFESVgpLFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgd3JhcHBlZCBzb2w6ICcsIHdyYXBwZWQudG9CYXNlNTgoKSk7XG5cbiAgICAgIGNvbnN0IGluc3RydWN0aW9ucyA9IFtdO1xuXG4gICAgICBjb25zdCB0b2tlbiA9IGF3YWl0IGNyZWF0ZU1pbnQoXG4gICAgICAgIGNvbm5lY3Rpb24sXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAwLFxuICAgICAgKTtcblxuICAgICAgY29uc3Qgc291cmNlVG9rZW4gPSBhd2FpdCBBY2NvdW50LkFzc29jaWF0ZWQucmV0cnlHZXRPckNyZWF0ZShcbiAgICAgICAgdG9rZW4udG9TdHJpbmcoKSxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIHBheWVyLFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgc291cmNlVG9rZW46ICcsIHNvdXJjZVRva2VuKTtcblxuICAgICAgY29uc3QgZGVzdFRva2VuID0gYXdhaXQgQWNjb3VudC5Bc3NvY2lhdGVkLnJldHJ5R2V0T3JDcmVhdGUoXG4gICAgICAgIHRva2VuLnRvU3RyaW5nKCksXG4gICAgICAgIHdyYXBwZWQudG9TdHJpbmcoKSxcbiAgICAgICAgcGF5ZXIsXG4gICAgICApO1xuXG4gICAgICBkZWJ1Z0xvZygnIyBkZXN0VG9rZW46ICcsIGRlc3RUb2tlbik7XG5cbiAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICBjcmVhdGVUcmFuc2Zlckluc3RydWN0aW9uKFxuICAgICAgICAgIHNvdXJjZVRva2VuLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgZGVzdFRva2VuLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBwYXJzZUludChgJHthbW91bnR9YCwgUkFESVgpLCAvLyBObyBsYW1wb3J0cywgaXRzIHNvbFxuICAgICAgICAgIGtleXBhaXJzLFxuICAgICAgICApLFxuICAgICAgKTtcblxuICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgIGNyZWF0ZUNsb3NlQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHdyYXBwZWQsXG4gICAgICAgICAgZGVzdC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAga2V5cGFpcnMsXG4gICAgICAgICksXG4gICAgICApO1xuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb24oXG4gICAgICAgIGluc3RydWN0aW9ucyxcbiAgICAgICAgbXVsdGlzaWcubWFwKChzKSA9PiBzLnRvS2V5cGFpcigpKSxcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCksXG4gICAgICApO1xuICAgIH0pO1xuICB9O1xufVxuIl0sCiAgIm1hcHBpbmdzIjogIjs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBQUE7QUFBQTtBQUFBLG1CQUFBQTtBQU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BtYWtlT3JDcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIG5ldyBLZXlwYWlyLktleXBhaXIoeyBzZWNyZXQ6IGZlZVBheWVyIH0pLnB1YmtleSxcbiAgICAgICAgYWxsb3dPd25lck9mZkN1cnZlLFxuICAgICAgKTtcblxuICAgICAgaWYgKCFyZXMuaW5zdCkge1xuICAgICAgICByZXR1cm4gcmVzLnRva2VuQWNjb3VudDtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uPFB1YmtleT4oXG4gICAgICAgIFtyZXMuaW5zdF0sXG4gICAgICAgIFtdLFxuICAgICAgICBmZWVQYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgcmVzLnRva2VuQWNjb3VudCEsXG4gICAgICApO1xuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiBSZXRyeSBmdW5jdGlvbiBpZiBjcmVhdGUgbmV3IHRva2VuIGFjY291aW50XG4gICAgICpcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gbWludFxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBvd25lclxuICAgICAqIEBwYXJhbSB7U2VjcmV0fSBmZWVQYXllclxuICAgICAqIEByZXR1cm5zIFByb21pc2U8c3RyaW5nPlxuICAgICAqL1xuICAgIGV4cG9ydCBjb25zdCByZXRyeUdldE9yQ3JlYXRlID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyOiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxzdHJpbmc+ID0+IHtcbiAgICAgIGxldCBjb3VudGVyID0gMTtcbiAgICAgIHdoaWxlIChjb3VudGVyIDwgUkVUUllfT1ZFUl9MSU1JVCkge1xuICAgICAgICB0cnkge1xuICAgICAgICAgIGNvbnN0IGluc3QgPSBhd2FpdCBnZXQobWludCwgb3duZXIsIGZlZVBheWVyLCB0cnVlKTtcblxuICAgICAgICAgIGlmIChpbnN0ICYmIHR5cGVvZiBpbnN0ID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgaW5zdCk7XG4gICAgICAgICAgICByZXR1cm4gaW5zdDtcbiAgICAgICAgICB9IGVsc2UgaWYgKGluc3QgaW5zdGFuY2VvZiBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uKSB7XG4gICAgICAgICAgICAoYXdhaXQgaW5zdC5zdWJtaXQoKSkubWFwKFxuICAgICAgICAgICAgICBhc3luYyAob2s6IHN0cmluZykgPT4ge1xuICAgICAgICAgICAgICAgIGF3YWl0IE5vZGUuY29uZmlybWVkU2lnKG9rKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gaW5zdC5kYXRhO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAoZXJyOiBFcnJvcikgPT4ge1xuICAgICAgICAgICAgICAgIGRlYnVnTG9nKCcjIEVycm9yIHN1Ym1pdCByZXRyeUdldE9yQ3JlYXRlOiAnLCBlcnIpO1xuICAgICAgICAgICAgICAgIHRocm93IGVycjtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgZGVidWdMb2coYCMgcmV0cnk6ICR7Y291bnRlcn0gY3JlYXRlIHRva2VuIGFjY291bnQ6IGAsIGUpO1xuICAgICAgICAgIGRlYnVnTG9nKGAjIG1pbnQ6ICR7bWludH0sIG93bmVyOiAke293bmVyfSwgZmVlUGF5ZXI6ICR7ZmVlUGF5ZXJ9YCk7XG4gICAgICAgIH1cbiAgICAgICAgYXdhaXQgc2xlZXAoUkVUUllfU0xFRVBfVElNRSk7XG4gICAgICAgIGNvdW50ZXIrKztcbiAgICAgIH1cbiAgICAgIHRocm93IEVycm9yKG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VuQWNjb3VudDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG1pbnQudG9Q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AoZmlsZSkgPT4ge1xuICAgICAgICAgIGlmICghZmlsZS5maWxlUGF0aCkge1xuICAgICAgICAgICAgcmV0dXJuIHt9O1xuICAgICAgICAgIH1cbiAgICAgICAgICBjb25zdCByZXMgPSBhd2FpdCBjYWxsYmFja0Z1bmMoZmlsZS5maWxlUGF0aCwgc3RvcmFnZVR5cGUsIGZlZVBheWVyKTtcbiAgICAgICAgICBpZiAocmVzLmlzRXJyKSB7XG4gICAgICAgICAgICB0aHJvdyBFcnJvcihyZXMuZXJyb3IubWVzc2FnZSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBvdmVyd3JpdGVPYmplY3QoZmlsZSwgW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBleGlzdHNLZXk6ICdmaWxlUGF0aCcsXG4gICAgICAgICAgICAgIHdpbGw6IHsga2V5OiAndXJpJywgdmFsdWU6IHJlcy52YWx1ZSB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICBdKTtcbiAgICAgICAgfSksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHsgLi4uaW5wdXQsIGZpbGVzIH0gYXMgUHJvcGVydGllcztcbiAgICB9O1xuICB9XG59XG4iLCAiLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLXVudXNlZC12YXJzICovXG5pbXBvcnQgeyBPcHRpb24sIFVzZXMgfSBmcm9tICd+L3R5cGVzL3JlZ3VsYXItbmZ0JztcblxuZXhwb3J0IG5hbWVzcGFjZSBDb252ZXJ0ZXIge1xuICBleHBvcnQgbmFtZXNwYWNlIFVzZXMge1xuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlclNpZGUgPSAob3V0cHV0OiBPcHRpb248VXNlcz4pOiBVc2VzIHwgdW5kZWZpbmVkID0+IHtcbiAgICAgIGlmICghb3V0cHV0KSB7XG4gICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgICB9XG4gICAgICByZXR1cm4gb3V0cHV0O1xuICAg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JlYWs7XG4gICAgICAgICAgY2FzZSAncm95YWx0eSc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnJveWFsdHkpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNSb3lhbHR5KG1ldGFkYXRhLnJveWFsdHkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEuc3ltYm9sKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU3ltYm9sKG1ldGFkYXRhLnN5bWJvbCk7XG4gICAgICAgICAgICB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AgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLk1lbW86IHtcbiAgICAgICAgICAgICAgaWYgKEZpbHRlck9wdGlvbnMuTWVtby5wcm9ncmFtLmluY2x1ZGVzKGluc3RydWN0aW9uLnByb2dyYW0pKSB7XG4gICAgICAgICAgICAgICAgbGV0IGluc3RydWN0aW9uVHJhbnNmZXI7XG5cbiAgICAgICAgICAgICAgICAvLyBmZXRjaCAgdHJhbnNmZXIgdHJhbnNhY3Rpb24gZm9yIHJlbGF0aW9uYWwgbWVtb1xuICAgICAgICAgICAgICAgIHR4TWV0YS50cmFuc2FjdGlvbi5tZXNzYWdlLmluc3RydWN0aW9ucy5mb3JFYWNoKFxuICAgICAgICAgICAgICAgICAgKGluc3RydWN0aW9uKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICBpc1BhcnNlZEluc3RydWN0aW9uKGluc3RydWN0aW9uKSAmJlxuICAgICAgICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuVHJhbnNmZXIucHJvZ3JhbS5pbmNsdWRlcyhcbiAgICAgICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLnByb2dyYW0sXG4gICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyID0gaW5zdHJ1Y3Rpb247XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgKTtcblxuICAgICAgICAgICAgICAgIC8vIHNwbC10b2tlbiBvciBzeXN0ZW1cbiAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyICYmXG4gICAgICAgICAgICAgICAgICBtb2R1bGVOYW1lICE9PSBpbnN0cnVjdGlvblRyYW5zZmVyWydwcm9ncmFtJ11cbiAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgIGRlYnVnTG9nKFxuICAgICAgICAgICAgICAgICAgICAnIyBGaWx0ZXJUeXBlLk1lbW8gYnJlYWsgaW5zdHJ1Y3Rpb246ICcsXG4gICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIsXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgLy8gZmV0Y2ggbWVtbyBvbmx5IHRyYW5zYWN0aW9uXG4gICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5NZW1vLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlcixcbiAgICAgICAgICAgICAgICAgIHBvc3RUb2tlbkFjY291bnQsXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5Pbmx5TWVtbzoge1xuICAgICAgICAgICAgICBpZiAoRmlsdGVyT3B0aW9ucy5NZW1vLnByb2dyYW0uaW5jbHVkZXMoaW5zdHJ1Y3Rpb24ucHJvZ3JhbSkpIHtcbiAgICAgICAgICAgICAgICBsZXQgaW5zdHJ1Y3Rpb25UcmFuc2ZlcjtcblxuICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuTWVtby5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIsXG4gICAgICAgICAgICAgICAgICBwb3N0VG9rZW5BY2NvdW50LFxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXNlIEZpbHRlclR5cGUuTWludDoge1xuICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5NaW50LnByb2dyYW0uaW5jbHVkZXMoaW5zdHJ1Y3Rpb24ucHJvZ3JhbSkgJiZcbiAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLk1pbnQuYWN0aW9uLmluY2x1ZGVzKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24ucGFyc2VkLnR5cGUgYXMgc3RyaW5nLFxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5NaW50LmludG9Vc2VyU2lkZShpbnN0cnVjdGlvbiwgdHhNZXRhKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5UcmFuc2ZlcjpcbiAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgIG1vZHVsZU5hbWUgPT09IGluc3RydWN0aW9uLnByb2dyYW0gJiZcbiAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLlRyYW5zZmVyLmFjdGlvbi5pbmNsdWRlcyhcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLnBhcnNlZC50eXBlIGFzIHN0cmluZyxcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgIGlmIChpbnN0cnVjdGlvbi5wYXJzZWQudHlwZSA9PT0gJ3RyYW5zZmVyQ2hlY2tlZCcpIHtcbiAgICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuVHJhbnNmZXJDaGVja2VkLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgICAgcG9zdFRva2VuQWNjb3VudCxcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuVHJhbnNmZXIuaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgICAgcmV0dXJuIGhpc3Rvcnk7XG4gICAgfTtcbn1cbiIsICJpbXBvcnQgeyBQYXJzZWRBY2NvdW50RGF0YSB9IGZyb20gJ0Bzb2xhbmEvd2ViMy5qcyc7XG5pbXBvcnQgeyBSZXN1bHQsIFRyeSB9IGZyb20gJ34vc3VpdGUtdXRpbHMnO1xuaW1wb3J0IHsgTm9kZSB9IGZyb20gJ34vbm9kZSc7XG5pbXBvcnQgeyBPd25lckluZm8sIFB1YmtleSB9IGZyb20gJ34vdHlwZXMvYWNjb3VudCc7XG5pbXBvcnQgeyBUcmFuc2FjdGlvbkZpbHRlciB9IGZyb20gJ34vdHJhbnNhY3Rpb24tZmlsdGVyJztcblxuZXhwb3J0IG5hbWVzcGFjZSBTb2xOYXRpdmUge1xuICAvKipcbiAgICogRmluZCBuZnQgYnkgb3duZXIgYWRkcmVzc1xuICAgKlxuICAgKiBAcGFyYW0ge1B1YmtleX0gb3duZXJcbiAgICogQHJldHVybiBQcm9taXNlPFJlc3VsdDxPd25lckluZm8sIEVycm9yPj5cbiAgICovXG4gIG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cmVhdGVNaW50KFxuICAgICAgICBjb25uZWN0aW9uLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgMCxcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IHNvdXJjZVRva2VuID0gYXdhaXQgQWNjb3VudC5Bc3NvY2lhdGVkLnJldHJ5R2V0T3JDcmVhdGUoXG4gICAgICAgIHRva2VuLnRvU3RyaW5nKCksXG4gICAgICAgIG93bmVyLFxuICAgICAgICBwYXllcixcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIHNvdXJjZVRva2VuOiAnLCBzb3VyY2VUb2tlbik7XG5cbiAgICAgIGNvbnN0IGRlc3RUb2tlbiA9IGF3YWl0IEFjY291bnQuQXNzb2NpYXRlZC5yZXRyeUdldE9yQ3JlYXRlKFxuICAgICAgICB0b2tlbi50b1N0cmluZygpLFxuICAgICAgICB3cmFwcGVkLnRvU3RyaW5nKCksXG4gICAgICAgIHBheWVyLFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgZGVzdFRva2VuOiAnLCBkZXN0VG9rZW4pO1xuXG4gICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgY3JlYXRlVHJhbnNmZXJJbnN0cnVjdGlvbihcbiAgICAgICAgICBzb3VyY2VUb2tlbi50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGRlc3RUb2tlbi50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgcGFyc2VJbnQoYCR7YW1vdW50fWAsIFJBRElYKSwgLy8gTm8gbGFtcG9ydHMsIGl0cyBzb2xcbiAgICAgICAgICBrZXlwYWlycyxcbiAgICAgICAgKSxcbiAgICAgICk7XG5cbiAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICBjcmV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NvbnZlcnRlciIsICJTaWduYXR1cmVzIiwgIlRyYW5zYWN0aW9uRmlsdGVyIiwgImluc3RydWN0aW9uIiwgIkNvbnZlcnRlciIsICJTb2xOYXRpdmUiLCAiaW1wb3J0X3dlYjMiLCAiU29sTmF0aXZlIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJpbXBvcnRfd2ViMyIsICJTb2xOYXRpdmUiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgImltcG9ydF9zcGxfdG9rZW4iLCAiU29sTmF0aXZlIiwgIkFjY291bnQiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlNvbE5hdGl2ZSJdCn0K \ No newline at end of file diff --git a/packages/suite-sol-native/dist/index.mjs b/packages/suite-sol-native/dist/index.mjs index 40ca4d997..fd0d919b1 100644 --- a/packages/suite-sol-native/dist/index.mjs +++ b/packages/suite-sol-native/dist/index.mjs @@ -1,4 +1,4 @@ -// ../shared/src/constants.ts +// ../suite-utils/src/constants.ts import { PublicKey } from "@solana/web3.js"; import SolanaJsonConfig from "@solana-suite/config/load"; var Config = SolanaJsonConfig; @@ -280,56 +280,6 @@ var TransactionBuilder; TransactionBuilder7.Common = Common2; })(TransactionBuilder || (TransactionBuilder = {})); -// ../shared/src/shared.ts -var overwriteObject = (object, targets) => { - const that = object; - targets.forEach((target) => { - delete that[target.existsKey]; - that[target.will.key] = target.will.value; - }); - return that; -}; -var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { - if (Constants.isDebugging === "true" || process.env.DEBUG === "true") { - console.log("[DEBUG]", data1, data2, data3, data4); - } -}; -var sleep = async (sec) => { - return new Promise((r) => setTimeout(r, sec * 1e3)); -}; -var isPromise = (obj) => { - return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; -}; -function Try(input, finallyInput) { - try { - const v = input(); - if (isPromise(v)) { - return v.then( - (x) => Result.ok(x), - (err) => Result.err(err) - ); - } else { - return Result.ok(v); - } - } catch (e) { - if (e instanceof Error) { - return Result.err(e); - } - return Result.err(Error(e)); - } finally { - if (finallyInput) { - debugLog("# finally input:", finallyInput); - finallyInput(); - } - } -} -var convertTimestampToDateTime = (created_at) => { - if (created_at) { - return new Date(created_at * 1e3); - } - return; -}; - // ../transaction-builder/src/batch.ts var TransactionBuilder2; ((TransactionBuilder7) => { @@ -797,7 +747,57 @@ var TransactionBuilder6 = { ...TransactionBuilder4 }; -// ../shared/src/result.ts +// ../suite-utils/src/shared.ts +var overwriteObject = (object, targets) => { + const that = object; + targets.forEach((target) => { + delete that[target.existsKey]; + that[target.will.key] = target.will.value; + }); + return that; +}; +var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { + if (Constants.isDebugging === "true" || process.env.DEBUG === "true") { + console.log("[DEBUG]", data1, data2, data3, data4); + } +}; +var sleep = async (sec) => { + return new Promise((r) => setTimeout(r, sec * 1e3)); +}; +var isPromise = (obj) => { + return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; +}; +function Try(input, finallyInput) { + try { + const v = input(); + if (isPromise(v)) { + return v.then( + (x) => Result.ok(x), + (err) => Result.err(err) + ); + } else { + return Result.ok(v); + } + } catch (e) { + if (e instanceof Error) { + return Result.err(e); + } + return Result.err(Error(e)); + } finally { + if (finallyInput) { + debugLog("# finally input:", finallyInput); + finallyInput(); + } + } +} +var convertTimestampToDateTime = (created_at) => { + if (created_at) { + return new Date(created_at * 1e3); + } + return; +}; + +// ../suite-utils/src/result.ts var AbstractResult = class { unwrap(ok, err) { const r = this._chain( @@ -909,15 +909,15 @@ var InternalErr = class extends AbstractResult { } }; var Result; -((Result11) => { +((Result12) => { function ok(value) { return new InternalOk(value); } - Result11.ok = ok; + Result12.ok = ok; function err(error) { return new InternalErr(error || Error()); } - Result11.err = err; + Result12.err = err; function all(obj) { if (Array.isArray(obj)) { const resArr = []; @@ -927,7 +927,7 @@ var Result; } resArr.push(item.value); } - return Result11.ok(resArr); + return Result12.ok(resArr); } const res = {}; const keys = Object.keys(obj); @@ -938,9 +938,9 @@ var Result; } res[key] = item.value; } - return Result11.ok(res); + return Result12.ok(res); } - Result11.all = all; + Result12.all = all; })(Result || (Result = {})); // ../converter/src/collection.ts @@ -1831,4 +1831,4 @@ var SolNative5 = { export { SolNative5 as SolNative }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vc2hhcmVkL3NyYy9jb25zdGFudHMudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvYmF0Y2gudHMiLCAiLi4vLi4vbm9kZS9zcmMvaW5kZXgudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY29tbW9uLnRzIiwgIi4uLy4uL3NoYXJlZC9zcmMvc2hhcmVkLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL21pbnQudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvcGFydGlhbC1zaWduLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2NhbGN1bGF0ZS10eHNpemUudHMiLCAiLi4vLi4vZ2xvYmFsL3NyYy9pbmRleC50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9hc3NvY2lhdGVkLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2tleXBhaXIudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvcGRhLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3NoYXJlZC9zcmMvcmVzdWx0LnRzIiwgIi4uLy4uL2NvbnZlcnRlci9zcmMvY29sbGVjdGlvbi50cyIsICIuLi8uLi9jb252ZXJ0ZXIvc3JjL2NyZWF0b3JzLnRzIiwgIi4uLy4uL2NvbnZlcnRlci9zcmMvY29tcHJlc3N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kgPT4ge1xuICAgICAgICBsZXQgaSA9IDA7XG4gICAgICAgIGZvciAoY29uc3QgYSBvZiBhcnIpIHtcbiAgICAgICAgICBpZiAoIWEuaW5zdHJ1Y3Rpb25zICYmICFhLnNpZ25lcnMpIHtcbiAgICAgICAgICAgIHRocm93IEVycm9yKFxuICAgICAgICAgICAgICBgb25seSBJbnN0cnVjdGlvbiBvYmplY3QgdGhhdCBjYW4gdXNlIGJhdGNoU3VibWl0KCkuXG4gICAgICAgICAgICBJbmRleDogJHtpfSwgU2V0IHZhbHVlOiAke0pTT04uc3RyaW5naWZ5KGEpfWAsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICBpKys7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBpbnN0cnVjdGlvbnMgPSBhcnIuZmxhdE1hcCgoYSkgPT4gYS5pbnN0cnVjdGlvbnMpO1xuICAgICAgICBjb25zdCBzaWduZXJzID0gYXJyLmZsYXRNYXAoKGEpID0+IGEuc2lnbmVycyk7XG4gICAgICAgIGNvbnN0IGZlZVBheWVycyA9IGFyci5maWx0ZXIoKGEpID0+IGEuZmVlUGF5ZXIgIT09IHVuZGVmaW5lZCk7XG4gICAgICAgIGxldCBmZWVQYXllciA9IHNpZ25lcnNbMF07XG4gICAgICAgIGlmIChmZWVQYXllcnMubGVuZ3RoID4gMCAmJiBmZWVQYXllcnNbMF0uZmVlUGF5ZXIpIHtcbiAgICAgICAgICBmZWVQYXllciA9IGZlZVBheWVyc1swXS5mZWVQYXllcjtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHRyYW5zYWN0aW9uID0gbmV3IFRyYW5zYWN0aW9uKCk7XG4gICAgICAgIGxldCBmaW5hbFNpZ25lcnMgPSBzaWduZXJzO1xuICAgICAgICBpZiAoZmVlUGF5ZXIpIHtcbiAgICAgICAgICB0cmFuc2FjdGlvbi5mZWVQYXllciA9IGZlZVBheWVyLnB1YmxpY0tleTtcbiAgICAgICAgICBmaW5h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bnQ6IFB1YmtleSxcbiAgICAgIG93bmVyOiBQdWJrZXksXG4gICAgICBmZWVQYXllcjogU2VjcmV0LFxuICAgICk6IFByb21pc2U8c3RyaW5nPiA9PiB7XG4gICAgICBsZXQgY291bnRlciA9IDE7XG4gICAgICB3aGlsZSAoY291bnRlciA8IFJFVFJZX09WRVJfTElNSVQpIHtcbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICBjb25zdCBpbnN0ID0gYXdhaXQgZ2V0KG1pbnQsIG93bmVyLCBmZWVQYXllciwgdHJ1ZSk7XG5cbiAgICAgICAgICBpZiAoaW5zdCAmJiB0eXBlb2YgaW5zdCA9PT0gJ3N0cmluZycpIHtcbiAgICAgICAgICAgIGRlYnVnTG9nKCcjIGFzc29jaWF0ZWRUb2tlbkFjY291bnQ6ICcsIGluc3QpO1xuICAgICAgICAgICAgcmV0dXJuIGluc3Q7XG4gICAgICAgICAgfSBlbHNlIGlmIChpbnN0IGluc3RhbmNlb2YgVHJhbnNhY3Rpb25CdWlsZGVyLkNvbW1vbikge1xuICAgICAgICAgICAgKGF3YWl0IGluc3Quc3VibWl0KCkpLm1hcChcbiAgICAgICAgICAgICAgYXN5bmMgKG9rOiBzdHJpbmcpID0+IHtcbiAgICAgICAgICAgICAgICBhd2FpdCBOb2RlLmNvbmZpcm1lZFNpZyhvayk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGluc3QuZGF0YTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgKGVycjogRXJyb3IpID0+IHtcbiAgICAgICAgICAgICAgICBkZWJ1Z0xvZygnIyBFcnJvciBzdWJtaXQgcmV0cnlHZXRPckNyZWF0ZTogJywgZXJyKTtcbiAgICAgICAgICAgICAgICB0aHJvdyBlcnI7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgIGRlYnVnTG9nKGAjIHJldHJ5OiAke2NvdW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Y2lhdGVkVG9rZW5BZGRyZXNzU3luYyhcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICBhbGxvd093bmVyT2ZmQ3VydmUsXG4gICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGFzc29jaWF0ZWRUb2tlbkFjY291bnQ6ICcsIGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSk7XG5cbiAgICAgIHRyeSB7XG4gICAgICAgIC8vIERvbnQgdXNlIFJlc3VsdFxuICAgICAgICBhd2FpdCBnZXRBY2NvdW50KFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCkuY29tbWl0bWVudCxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3Q6IHVuZGVmaW5lZCxcbiAgICAgICAgfTtcbiAgICAgIH0gY2F0Y2ggKGVycm9yOiB1bmtub3duKSB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5BY2NvdW50Tm90Rm91bmRFcnJvcikgJiZcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5JbnZhbGlkQWNjb3VudE93bmVyRXJyb3IpXG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9yKCdVbmV4cGVjdGVkIGVycm9yJyk7XG4gICAgICAgIH1cblxuICAgICA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ICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ25hbWUnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLm5hbWUpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNOYW1lKG1ldGFkYXRhLm5hbWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc3ltYm9sJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5zeW1ib2wpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTeW1ib2wobWV0YWRhdGEuc3ltYm9sKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgICAgIGlmIChyZXMgJiYgcmVzLmlzRXJyKSB7XG4gICAgICAgICAgcmVzdWx0cy5wdXNoKC4uLnJlcy5lcnJvci5kZXRhaWxzKTtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgICBpZiAocmVzdWx0cy5sZW5ndGggPiAwKSB7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPVxuICAgICAgICAgICdDYXVnaHQgaW4gdGhlIHZhbGlkYXRpb24gZXJyb3JzLiBzZWUgaW5mb3JtYXRpb24gZS5nOiBlcnI8VmFsaWRhdG9yRXJyb3I+LmRldGFpbHMn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aChcbiAgICAgICAgICAgICAgICAgIChpbnN0cnVjdGlvbikgPT4ge1xuICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgaXNQYXJzZWRJbnN0cnVjdGlvbihpbnN0cnVjdGlvbikgJiZcbiAgICAgICAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLlRyYW5zZmVyLnByb2dyYW0uaW5jbHVkZXMoXG4gICAgICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbi5wcm9ncmFtLFxuICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlciA9IGluc3RydWN0aW9uO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICk7XG5cbiAgICAgICAgICAgICAgICAvLyBzcGwtdG9rZW4gb3Igc3lzdGVtXG4gICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlciAmJlxuICAgICAgICAgICAgICAgICAgbW9kdWxlTmFtZSAhPT0gaW5zdHJ1Y3Rpb25UcmFuc2ZlclsncHJvZ3JhbSddXG4gICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICBkZWJ1Z0xvZyhcbiAgICAgICAgICAgICAgICAgICAgJyMgRmlsdGVyVHlwZS5NZW1vIGJyZWFrIGluc3RydWN0aW9uOiAnLFxuICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyLFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vIGZldGNoIG1lbW8gb25seSB0cmFuc2FjdGlvblxuICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuTWVtby5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIsXG4gICAgICAgICAgICAgICAgICBwb3N0VG9rZW5BY2NvdW50LFxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXNlIEZpbHRlclR5cGUuT25seU1lbW86IHtcbiAgICAgICAgICAgICAgaWYgKEZpbHRlck9wdGlvbnMuTWVtby5wcm9ncmFtLmluY2x1ZGVzKGluc3RydWN0aW9uLnByb2dyYW0pKSB7XG4gICAgICAgICAgICAgICAgbGV0IGluc3RydWN0aW9uVHJhbnNmZXI7XG5cbiAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLk1lbW8uaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyLFxuICAgICAgICAgICAgICAgICAgcG9zdFRva2VuQWNjb3VudCxcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLk1pbnQ6IHtcbiAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuTWludC5wcm9ncmFtLmluY2x1ZGVzKGluc3RydWN0aW9uLnByb2dyYW0pICYmXG4gICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5NaW50LmFjdGlvbi5pbmNsdWRlcyhcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLnBhcnNlZC50eXBlIGFzIHN0cmluZyxcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuTWludC5pbnRvVXNlclNpZGUoaW5zdHJ1Y3Rpb24sIHR4TWV0YSk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXNlIEZpbHRlclR5cGUuVHJhbnNmZXI6XG4gICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICBtb2R1bGVOYW1lID09PSBpbnN0cnVjdGlvbi5wcm9ncmFtICYmXG4gICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5UcmFuc2Zlci5hY3Rpb24uaW5jbHVkZXMoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbi5wYXJzZWQudHlwZSBhcyBzdHJpbmcsXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICBpZiAoaW5zdHJ1Y3Rpb24ucGFyc2VkLnR5cGUgPT09ICd0cmFuc2ZlckNoZWNrZWQnKSB7XG4gICAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLlRyYW5zZmVyQ2hlY2tlZC5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICAgIHBvc3RUb2tlbkFjY291bnQsXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLlRyYW5zZmVyLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICA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ZW46ICcsIHNvdXJjZVRva2VuKTtcblxuICAgICAgY29uc3QgZGVzdFRva2VuID0gYXdhaXQgQWNjb3VudC5Bc3NvY2lhdGVkLnJldHJ5R2V0T3JDcmVhdGUoXG4gICAgICAgIHRva2VuLnRvU3RyaW5nKCksXG4gICAgICAgIHdyYXBwZWQudG9TdHJpbmcoKSxcbiAgICAgICAgcGF5ZXIsXG4gICAgICApO1xuXG4gICAgICBkZWJ1Z0xvZygnIyBkZXN0VG9rZW46ICcsIGRlc3RUb2tlbik7XG5cbiAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICBjcmVhdGVUcmFuc2Zlckluc3RydWN0aW9uKFxuICAgICAgICAgIHNvdXJjZVRva2VuLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgZGVzdFRva2VuLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBwYXJzZUludChgJHthbW91bnR9YCwgUkFESVgpLCAvLyBObyBsYW1wb3J0cywgaXRzIHNvbFxuICAgICAgICAgIGtleXBhaXJzLFxuICAgICAgICApLFxuICAgICAgKTtcblxuICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgIGNyZWF0ZUNsb3NlQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHdyYXBwZWQsXG4gICAgICAgICAgZGVzdC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAga2V5cGFpcnMsXG4gICAgICAgICksXG4gICAgICApO1xuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb24oXG4gICAgICAgIGluc3RydWN0aW9ucyxcbiAgICAgICAgbXVsdGlzaWcubWFwKChzKSA9PiBzLnRvS2V5cGFpcigpKSxcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCksXG4gICAgICApO1xuICAgIH0pO1xuICB9O1xufV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xuICAgICAgICB9XG4gICAgICAgIGNvbnN0IHVybHMgPSBDb25zdGFudHMuQnVuZGxyVXJsLnByZC5zcGxpdCgnLCcpO1xuICAgICAgICBjb25zdCBpbmRleCA9IERhdGUubm93KCkgJSB1cmxzLmxlbmd0aDtcbiAgICAgICAgcmV0dXJuIHVybHNbaW5kZXhdO1xuICAgICAgfVxuICAgICAgZGVmYXVsdDoge1xuICAgICAgICBjb25zdCB1cmxzID0gQ29uc3RhbnRzLkRhc0FwaVVybC5kZXYuc3BsaXQoJywnKTtcbiAgICAgICAgY29uc3QgaW5kZXggPSBEYXRlLm5vdygpICUgdXJscy5sZW5ndGg7XG4gICAgICAgIHJldHVybiB1cmxzW2luZGV4XTtcbiAgICAgIH1cbiAgICB9XG4gIH07XG5cbiAgZXhwb3J0IGNvbnN0IHN3aXRjaE5mdFN0b3JhZ2UgPSAoZW52OiBzdHJpbmcpOiBzdHJpbmcgPT4ge1xuICAgIHN3aXRjaCAoZW52KSB7XG4gICAgICBjYXNlIENvbnN0YW50cy5DbHVzdGVyLnByZDpcbiAgICAgICAgaWYgKCFuZnRTdG9yYWdlQXBpS2V5KSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoV2Fybm5pbmdNZXNzYWdlLk5GVF9TVE9SQUdFX0FQSV9LRVkpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBuZnRTdG9yYWdlQXBpS2V5O1xuICAgICAgZGVmYXVsdDoge1xuICAgICAgICByZXR1cm4gQ29uc3RhbnRzLk5mdHN0b3JhZ2VBcGlLZXkuZGV2O1xuICAgICAgfVxuICAgIH1cbiAgfTtcblxuICBleHBvcnQgY29uc3QgV1JBUFBFRF9UT0tFTl9QUk9HUkFNX0lEID0gbmV3IFB1YmxpY0tleShcbiAgICAnU28xMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMicsXG4gICk7XG4gIGV4cG9ydCBjb25zdCBNRU1PX1BST0dSQU1fSUQgPSBuZXcgUHVibGljS2V5K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AgICAgKiBAcGFyYW0ge1B1YmtleX0gbWludFxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBvd25lclxuICAgICAqIEBwYXJhbSB7U2VjcmV0fSBmZWVQYXllclxuICAgICAqIEByZXR1cm5zIFByb21pc2U8c3RyaW5nPlxuICAgICAqL1xuICAgIGV4cG9ydCBjb25zdCByZXRyeUdldE9yQ3JlYXRlID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyOiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxzdHJpbmc+ID0+IHtcbiAgICAgIGxldCBjb3VudGVyID0gMTtcbiAgICAgIHdoaWxlIChjb3VudGVyIDwgUkVUUllfT1ZFUl9MSU1JVCkge1xuICAgICAgICB0cnkge1xuICAgICAgICAgIGNvbnN0IGluc3QgPSBhd2FpdCBnZXQobWludCwgb3duZXIsIGZlZVBheWVyLCB0cnVlKTtcblxuICAgICAgICAgIGlmIChpbnN0ICYmIHR5cGVvZiBpbnN0ID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgaW5zdCk7XG4gICAgICAgICAgICByZXR1cm4gaW5zdDtcbiAgICAgICAgICB9IGVsc2UgaWYgKGluc3QgaW5zdGFuY2VvZiBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uKSB7XG4gICAgICAgICAgICAoYXdhaXQgaW5zdC5zdWJtaXQoKSkubWFwKFxuICAgICAgICAgICAgICBhc3luYyAob2s6IHN0cmluZykgPT4ge1xuICAgICAgICAgICAgICAgIGF3YWl0IE5vZGUuY29uZmlybWVkU2lnKG9rKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gaW5zdC5kYXRhO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAoZXJyOiBFcnJvcikgPT4ge1xuICAgICAgICAgICAgICAgIGRlYnVnTG9nKCcjIEVycm9yIHN1Ym1pdCByZXRyeUdldE9yQ3JlYXRlOiAnLCBlcnIpO1xuICAgICAgICAgICAgICAgIHRocm93IGVycjtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgZGVidWdMb2coYCMgcmV0cnk6ICR7Y291bnRlcn0gY3JlYXRlIHRva2VuIGFjY291bnQ6IGAsIGUpO1xuICAgICAgICAgIGRlYnVnTG9nKGAjIG1pbnQ6ICR7bWludH0sIG93bmVyOiAke293bmVyfSwgZmVlUGF5ZXI6ICR7ZmVlUGF5ZXJ9YCk7XG4gICAgICAgIH1cbiAgICAgICAgYXdhaXQgc2xlZXAoUkVUUllfU0xFRVBfVElNRSk7XG4gICAgICAgIGNvdW50ZXIrKztcbiAgICAgIH1cbiAgICAgIHRocm93IEVycm9yKGByZXRyeSBhY3Rpb24gaXMgb3ZlciBsaW1pdCAke1JFVFJZX09WRVJfTElNSVR9YCk7XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIFtNYWluIGxvZ2ljXUdldCBBc3NvY2lhdGVkIHRva2VuIEFjY291bnQuXG4gICAgICogaWYgbm90IGNyZWF0ZWQsIGNyZWF0ZSBuZXcgdG9rZW4gYWNjb3VpbnRcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBtaW50XG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAgICogQHBhcmFtIHtQdWJrZXl9IGZlZVBheWVyXG4gICAgICogQHJldHVybnMgUHJvbWlzZTxzdHJpbmc+XG4gICAgICovXG4gICAgZXhwb3J0IGNvbnN0IG1ha2VPckNyZWF0ZUluc3RydWN0aW9uID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyPzogUHVia2V5LFxuICAgICAgYWxsb3dPd25lck9mZkN1cnZlID0gZmFsc2UsXG4gICAgKTogUHJvbWlzZTx7XG4gICAgICB0b2tlbkFjY291bnQ6IHN0cmluZztcbiAgICAgIGluc3Q6IFRyYW5zYWN0aW9uSW5zdHJ1Y3Rpb24gfCB1bmRlZmluZWQ7XG4gICAgfT4gPT4ge1xuICAgICAgY29uc3QgYXNzb2NpYXRlZFRva2VuQWNjb3VudCA9IGdldEFzc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jKFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSxcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3QsXG4gICAgICAgIH07XG4gICAgICB9XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IEtleXBhaXIgYXMgT3JpZ2luYWwsIFB1YmxpY0tleSB9IGZyb20gJ0Bzb2xhbmEvd2ViMy5qcyc7XG5pbXBvcnQgeyBQdWJrZXksIFNlY3JldCB9IGZyb20gJ34vdHlwZXMvYWNjb3VudCc7XG5pbXBvcnQgYnMgZnJvbSAnYnM1OCc7XG5cbmV4cG9ydCBuYW1lc3BhY2UgQWNjb3VudCB7XG4gIGV4cG9ydCBjbGFzcyBLZXlwYWlyIHtcbiAgICBzZWNyZXQ6IFNlY3JldDtcbi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ZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IE9wdGlvbjxJbnRlcm5hbENyZWF0b3JzW10+ID0+IHtcbiAgICAgIGlmICghaW5wdXQpIHtcbiAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICB9XG4gICAgICByZXR1cm4gaW5wdXQubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvQ29tcHJlc3NlZE5mdEluZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IEludGVybmFsQ3JlYXRvcnNbXSA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBbXTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBpbnB1dCEubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlciA9IChcbiAgICAgIG91dHB1dDogT3B0aW9uPEludGVybmFsQ3JlYXRvcnNbXT4sXG4gICAgKTogQ3JlYXRvcnNbXSB8IHVuZGVmaW5lZCA9PiB7XG4gICAgICBpZiAoIW91dHB1dCkge1x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JhY2tGdW5jOiAoXG4gICAgICAgIGZpbGVQYXRoOiBGaWxlVHlwZSxcbiAgICAgICAgc3RvcmFnZVR5cGU6IFN0b3JhZ2VUeXBlLFxuICAgICAgICBmZWVQYXllcj86IFNlY3JldCxcbiAgICAgICkgPT4gUHJvbWlzZTxSZXN1bHQ8c3RyaW5nLCBFcnJvcj4+LFxuICAgICAgc3RvcmFnZVR5cGU6IFN0b3JhZ2VUeXBlLFxuICAgICAgZmVlUGF5ZXI/OiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxQcm9wZXJ0aWVzPiA9PiB7XG4gICAgICBpZiAoIWlucHV0IHx8ICFpbnB1dC5maWxlcykge1xuICAgICAgICByZXR1cm4ge307XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGZpbGVzID0gYXdhaXQgUHJvbWlzZS5hbGwoXG4gICAgICAgIGlucHV0LmZpbGVzLm1hcChhc3luYyAoZmlsZSkgPT4ge1xuICAgICAgICAgIGlmICghZmlsZS5maWxlUGF0aCkge1xuICAgICAgICAgICAgcmV0dXJuIHt9O1xuICAgICAgICAgIH1cbiAgICAgICAgICBjb25zdCByZXMgPSBhd2FpdCBjYWxsYmFja0Z1bmMoZmlsZS5maWxlUGF0aCwgc3RvcmFnZVR5cGUsIGZlZVBheWVyKTtcbiAgICAgICAgICBpZiAocmVzLmlzRXJyKSB7XG4gICAgICAgICAgICB0aHJvdyBFcnJvcihyZXMuZXJyb3IubWVzc2FnZSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBvdmVyd3JpdGVPYmplY3QoZmlsZSwgW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBleGlzdHNLZXk6ICdmaWxlUGF0aCcsXG4gICAgICAgICAgICAgIHdpbGw6IHsga2V5OiAndXJpJywgdmFsdWU6IHJlcy52YWx1ZSB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICBdKTtcbiAgICAgICAgfSksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHsgL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IChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEuc3ltYm9sKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU3ltYm9sKG1ldGFkYXRhLnN5bWJvbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAocmVzICYmIHJlcy5pc0Vycikge1xuICAgICAgICAgIHJlc3VsdHMucHVzaCguLi5yZXMuZXJyb3IuZGV0YWlscyk7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgICAgaWYgKHJlc3VsdHMubGVuZ3RoID4gMCkge1xuICAgICAgICBjb25zdCBtZXNzYWdlID1cbiAgICAgICAgICAnQ2F1Z2h0IGluIHRoZSB2YWxpZGF0aW9uIGVycm9ycy4gc2VlIGluZm9ybWF0aW9uIGUuZzogZXJyPFZhbGlkYXRvckVycm9yPi5kZXRhaWxzJztcbiAgICAgICAgdGhyb3cgbmV3IFZhbGlkYXRvckVycm9yKG1lc3NhZ2UsIHJlc3VsdHMpO1xuICAgICAgfVxuICAgICAgcmV0dXJuIE1lc3NhZ2UuU1VDQ0VTUztcbiAgICB9KTtcbiAgfTtcblxuICB0eXBlIFBpY2tOZnRTdG9yYWdlID0gUGljazxcbiAgICBPZmZjaGFpbixcbiAgICAnbmFtZScgfC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JhbS5pbmNsdWRlcyhcbiAgICAgICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLnByb2dyYW0sXG4gICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyID0gaW5zdHJ1Y3Rpb247XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgKTtcblxuICAgICAgICAgICAgICAgIC8vIHNwbC10b2tlbiBvciBzeXN0ZW1cbiAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyICYmXG4gICAgICAgICAgICAgICAgICBtb2R1bGVOYW1lICE9PSBpbnN0cnVjdGlvblRyYW5zZmVyWydwcm9ncmFtJ11cbiAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgIGRlYnVnTG9nKFxuICAgICAgICAgICAgICAgICAgICAnIyBGaWx0ZXJUeXBlLk1lbW8gYnJlYWsgaW5zdHJ1Y3Rpb246ICcsXG4gICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIsXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgLy8gZmV0Y2ggbWVtbyBvbmx5IHRyYW5zYWN0aW9uXG4gICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5NZW1vLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlcixcbiAgICAgICAgICAgICAgICAgIHBvc3RUb2tlbkFjY291bnQsXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5Pbmx5TWVtbzoge1xuICAgICAgICAgICAgICBpZiAoRmlsdGVyT3B0aW9ucy5NZW1vLnByb2dyYW0uaW5jbHVkZXMoaW5zdHJ1Y3Rpb24ucHJvZ3JhbSkpIHtcbiAgICAgICAgICAgICAgICBsZXQgaW5zdHJ1Y3Rpb25UcmFuc2ZlcjtcblxuICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuTWVtby5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIsXG4gICAgICAgICAgICAgICAgICBwb3N0VG9rZW5BY2NvdW50LFxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXNlIEZpbHRlclR5cGUuTWludDoge1xuICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5NaW50LnByb2dyYW0uaW5jbHVkZXMoaW5zdHJ1Y3Rpb24ucHJvZ3JhbSkgJiZcbiAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLk1pbnQuYWN0aW9uLmluY2x1ZGVzKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24ucGFyc2VkLnR5cGUgYXMgc3RyaW5nLFxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5NaW50LmludG9Vc2VyU2lkZShpbnN0cnVjdGlvbiwgdHhNZXRhKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5UcmFuc2ZlcjpcbiAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgIG1vZHVsZU5hbWUgPT09IGluc3RydWN0aW9uLnByb2dyYW0gJiZcbiAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLlRyYW5zZmVyLmFjdGlvbi5pbmNsdWRlcyhcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLnBhcnNlZC50eXBlIGFzIHN0cmluZyxcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgIGlmIChpbnN0cnVjdGlvbi5wYXJzZWQudHlwZSA9PT0gJ3RyYW5zZmVyQ2hlY2tlZCcpIHtcbiAgICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuVHJhbnNmZXJDaGVja2VkLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgICAgcG9zdFRva2VuQWNjb3VudCxcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuVHJhbnNmZXIuaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgICAgcmV0dXJuIGhpc3Rvcnk7XG4gICAgfTtcbn1cbiIsICJpbXBvcnQgeyBQYXJzZWRBY2NvdW50RGF0YSB9IGZ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dGlzaWdbMF07XG4gICAgICBjb25zdCBrZXlwYWlycyA9IG11bHRpc2lnLm1hcCgocykgPT4gcy50b0tleXBhaXIoKSk7XG4gICAgICBjb25zdCB3cmFwcGVkID0gYXdhaXQgY3JlYXRlV3JhcHBlZE5hdGl2ZUFjY291bnQoXG4gICAgICAgIGNvbm5lY3Rpb24sXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICBwYXJzZUludChgJHthbW91bnQudG9MYW1wb3J0cygpfWAsIFJBRElYKSxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIHdyYXBwZWQgc29sOiAnLCB3cmFwcGVkLnRvQmFzZTU4KCkpO1xuXG4gICAgICBjb25zdCBpbnN0cnVjdGlvbnMgPSBbXTtcblxuICAgICAgY29uc3QgdG9rZW4gPSBhd2FpdCBjcmVhdGVNaW50KFxuICAgICAgICBjb25uZWN0aW9uLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgMCxcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IHNvdXJjZVRva2VuID0gYXdhaXQgQWNjb3VudC5Bc3NvY2lhdGVkLnJldHJ5R2V0T3JDcmVhdGUoXG4gICAgICAgIHRva2VuLnRvU3RyaW5nKCksXG4gICAgICAgIG93bmVyLFxuICAgICAgICBwYXllcixcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIHNvdXJjZVRva2VuOiAnLCBzb3VyY2VUb2tlbik7XG5cbiAgICAgIGNvbnN0IGRlc3RUb2tlbiA9IGF3YWl0IEFjY291bnQuQXNzb2NpYXRlZC5yZXRyeUdldE9yQ3JlYXRlKFxuICAgICAgICB0b2tlbi50b1N0cmluZygpLFxuICAgICAgICB3cmFwcGVkLnRvU3RyaW5nKCksXG4gICAgICAgIHBheWVyLFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgZGVzdFRva2VuOiAnLCBkZXN0VG9rZW4pO1xuXG4gICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgY3JlYXRlVHJhbnNmZXJJbnN0cnVjdGlvbihcbiAgICAgICAgICBzb3VyY2VUb2tlbi50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGRlc3RUb2tlbi50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgcGFyc2VJbnQoYCR7YW1vdW50fWAsIFJBRElYKSwgLy8gTm8gbGFtcG9ydHMsIGl0cyBzb2xcbiAgICAgICAgICBrZXlwYWlycyxcbiAgICAgICAgKSxcbiAgICAgICk7XG5cbiAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICBjcmVhdGVDbG9zZUFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgICB3cmFwcGVkLFxuICAgICAgICAgIGRlc3QudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGtleXBhaXJzLFxuICAgICAgICApLFxuICAgICAgKTtcblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uKFxuICAgICAgICBpbnN0cnVjdGlvbnMsXG4gICAgICAgIG11bHRpc2lnLm1hcCgocykgPT4gcy50b0tleXBhaXIoKSksXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgKTtcbiAgICB9KTtcbiAgfTtcbn1cbiIsICJpbXBvcnQgeyBTb2xOYXRpdmUgYXMgRmluZCB9IGZyb20gJy4vZmluZCc7XG5pbXBvcnQgeyBTb2xOYXRpdmUgYXMgR2FzTGVzcyB9IGZyb20gJy4vZ2FzLWxlc3MtdHJhbnNmZXInO1xuaW1wb3J0IHsgU29sTmF0aXZlIG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iQ29udmVydGVyIiwgIlJveWFsdHkiLCAiQ29udmVydGVyIiwgIk5mdCIsICJDb252ZXJ0ZXIiLCAiTWVtbyIsICJDb252ZXJ0ZXIiLCAiTWludCIsICJDb252ZXJ0ZXIiLCAiUmVndWxhck5mdE1ldGFkYXRhIiwgIkNvbnZlcnRlciIsICJQcm9wZXJ0aWVzIiwgIkNvbnZlcnRlciIsICJVc2VzIiwgIkNvbnZlcnRlciIsICJUb2tlbk1ldGFkYXRhIiwgIkNvbnZlcnRlciIsICJUcmFuc2ZlckNoZWNrZWQiLCAiQ29udmVydGVyIiwgIlRyYW5zZmVyIiwgIkNvbnZlcnRlciIsICJWYWxpZGF0b3IiLCAiTWVzc2FnZSIsICJDb252ZXJ0ZXIiLCAiU2lnbmF0dXJlcyIsICJUcmFuc2FjdGlvbkZpbHRlciIsICJpbnN0cnVjdGlvbiIsICJDb252ZXJ0ZXIiLCAiU29sTmF0aXZlIiwgIlRyYW5zYWN0aW9uIiwgIlNvbE5hdGl2ZSIsICJUcmFuc2FjdGlvbiIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiU3lzdGVtUHJvZ3JhbSIsICJTb2xOYXRpdmUiLCAiU3lzdGVtUHJvZ3JhbSIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiU29sTmF0aXZlIiwgIkFjY291bnQiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlNvbE5hdGl2ZSJdCn0K \ No newline at end of file diff --git a/packages/suite-sol-native/tsconfig.json b/packages/suite-sol-native/tsconfig.json index e2eff2fc6..6b756b496 100644 --- a/packages/suite-sol-native/tsconfig.json +++ b/packages/suite-sol-native/tsconfig.json @@ -6,7 +6,6 @@ "paths": { "~/types/*": ["../types/src/*/index.ts"], "~/*": ["../*/src/index.ts"], - "~/shared/exports": ["../shared/src/exports.ts"] } }, "include": ["src/**/*.ts", "test/**/*.ts"], diff --git a/packages/suite-spl-token/dist/index.js b/packages/suite-spl-token/dist/index.js index 273c5796b..d3bd45aa8 100644 --- a/packages/suite-spl-token/dist/index.js +++ b/packages/suite-spl-token/dist/index.js @@ -37,7 +37,7 @@ module.exports = __toCommonJS(src_exports); // src/add.ts var import_spl_token2 = require("@solana/spl-token"); -// ../shared/src/constants.ts +// ../suite-utils/src/constants.ts var import_web3 = require("@solana/web3.js"); var import_load = __toESM(require("@solana-suite/config/load")); var Config = import_load.default; @@ -313,65 +313,6 @@ var TransactionBuilder; TransactionBuilder7.Common = Common2; })(TransactionBuilder || (TransactionBuilder = {})); -// ../shared/src/shared.ts -var overwriteObject = (object, targets) => { - const that = object; - targets.forEach((target) => { - delete that[target.existsKey]; - that[target.will.key] = target.will.value; - }); - return that; -}; -var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { - if (Constants.isDebugging === "true" || process.env.DEBUG === "true") { - console.log("[DEBUG]", data1, data2, data3, data4); - } -}; -var sleep = async (sec) => { - return new Promise((r) => setTimeout(r, sec * 1e3)); -}; -var isBrowser = () => { - return typeof window !== "undefined" && typeof window.document !== "undefined"; -}; -var isNode = () => { - return typeof process !== "undefined" && process.versions != null && process.versions.node != null; -}; -var isPromise = (obj) => { - return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; -}; -function Try(input, finallyInput) { - try { - const v = input(); - if (isPromise(v)) { - return v.then( - (x) => Result.ok(x), - (err) => Result.err(err) - ); - } else { - return Result.ok(v); - } - } catch (e) { - if (e instanceof Error) { - return Result.err(e); - } - return Result.err(Error(e)); - } finally { - if (finallyInput) { - debugLog("# finally input:", finallyInput); - finallyInput(); - } - } -} -var convertTimestampToDateTime = (created_at) => { - if (created_at) { - return new Date(created_at * 1e3); - } - return; -}; -var unixTimestamp = () => { - return Math.floor((/* @__PURE__ */ new Date()).getTime() / 1e3); -}; - // ../transaction-builder/src/batch.ts var TransactionBuilder2; ((TransactionBuilder7) => { @@ -826,7 +767,66 @@ var TransactionBuilder6 = { ...TransactionBuilder4 }; -// ../shared/src/result.ts +// ../suite-utils/src/shared.ts +var overwriteObject = (object, targets) => { + const that = object; + targets.forEach((target) => { + delete that[target.existsKey]; + that[target.will.key] = target.will.value; + }); + return that; +}; +var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { + if (Constants.isDebugging === "true" || process.env.DEBUG === "true") { + console.log("[DEBUG]", data1, data2, data3, data4); + } +}; +var sleep = async (sec) => { + return new Promise((r) => setTimeout(r, sec * 1e3)); +}; +var isBrowser = () => { + return typeof window !== "undefined" && typeof window.document !== "undefined"; +}; +var isNode = () => { + return typeof process !== "undefined" && process.versions != null && process.versions.node != null; +}; +var isPromise = (obj) => { + return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; +}; +function Try(input, finallyInput) { + try { + const v = input(); + if (isPromise(v)) { + return v.then( + (x) => Result.ok(x), + (err) => Result.err(err) + ); + } else { + return Result.ok(v); + } + } catch (e) { + if (e instanceof Error) { + return Result.err(e); + } + return Result.err(Error(e)); + } finally { + if (finallyInput) { + debugLog("# finally input:", finallyInput); + finallyInput(); + } + } +} +var convertTimestampToDateTime = (created_at) => { + if (created_at) { + return new Date(created_at * 1e3); + } + return; +}; +var unixTimestamp = () => { + return Math.floor((/* @__PURE__ */ new Date()).getTime() / 1e3); +}; + +// ../suite-utils/src/result.ts var AbstractResult = class { unwrap(ok, err) { const r = this._chain( @@ -938,15 +938,15 @@ var InternalErr = class extends AbstractResult { } }; var Result; -((Result17) => { +((Result18) => { function ok(value) { return new InternalOk(value); } - Result17.ok = ok; + Result18.ok = ok; function err(error) { return new InternalErr(error || Error()); } - Result17.err = err; + Result18.err = err; function all(obj) { if (Array.isArray(obj)) { const resArr = []; @@ -956,7 +956,7 @@ var Result; } resArr.push(item.value); } - return Result17.ok(resArr); + return Result18.ok(resArr); } const res = {}; const keys = Object.keys(obj); @@ -967,9 +967,9 @@ var Result; } res[key] = item.value; } - return Result17.ok(res); + return Result18.ok(res); } - Result17.all = all; + Result18.all = all; })(Result || (Result = {})); // ../converter/src/collection.ts @@ -2218,4 +2218,4 @@ var SplToken10 = { 0 && (module.exports = { SplToken }); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uL3NyYy9hZGQudHMiLCAiLi4vLi4vc2hhcmVkL3NyYy9jb25zdGFudHMudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvYmF0Y2gudHMiLCAiLi4vLi4vbm9kZS9zcmMvaW5kZXgudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY29tbW9uLnRzIiwgIi4uLy4uL3NoYXJlZC9zcmMvc2hhcmVkLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL21pbnQudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvcGFydGlhbC1zaWduLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2NhbGN1bGF0ZS10eHNpemUudHMiLCAiLi4vLi4vZ2xvYmFsL3NyYy9pbmRleC50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9hc3NvY2lhdGVkLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2tleXBhaXIudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvcGRhLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3NoYXJlZC9zcmMvcmVzdWx0LnRzIiwgIi4uLy4uL2NvbnZlcnRlci9zcmMvY29sbGVjdGlvbi50cyIsICIuLi8uLi9jb252ZXJ0ZXIvc3JjL2NyZWF0b3JzLnRzIiwgIi4uLy4uL2NvbnZlcnRlci9zcmMvY29tcHJlc3NlZC1uZnQtbWV0YWRhdGEudHMiLCAiLi4vLi4vY29udmVydGVyL3NyYy9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VJfTElNSVQpIHtcbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICBjb25zdCBpbnN0ID0gYXdhaXQgZ2V0KG1pbnQsIG93bmVyLCBmZWVQYXllciwgdHJ1ZSk7XG5cbiAgICAgICAgICBpZiAoaW5zdCAmJiB0eXBlb2YgaW5zdCA9PT0gJ3N0cmluZycpIHtcbiAgICAgICAgICAgIGRlYnVnTG9nKCcjIGFzc29jaWF0ZWRUb2tlbkFjY291bnQ6ICcsIGluc3QpO1xuICAgICAgICAgICAgcmV0dXJuIGluc3Q7XG4gICAgICAgICAgfSBlbHNlIGlmIChpbnN0IGluc3RhbmNlb2YgVHJhbnNhY3Rpb25CdWlsZGVyLkNvbW1vbikge1xuICAgICAgICAgICAgKGF3YWl0IGluc3Quc3VibWl0KCkpLm1hcChcbiAgICAgICAgICAgICAgYXN5bmMgKG9rOiBzdHJpbmcpID0+IHtcbiAgICAgICAgICAgICAgICBhd2FpdCBOb2RlLmNvbmZpcm1lZFNpZyhvayk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGluc3QuZGF0YTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgKGVycjogRXJyb3IpID0+IHtcbiAgICAgICAgICAgICAgICBkZWJ1Z0xvZygnIyBFcnJvciBzdWJtaXQgcmV0cnlHZXRPckNyZWF0ZTogJywgZXJyKTtcbiAgICAgICAgICAgICAgICB0aHJvdyBlcnI7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgIGRlYnVnTG9nKGAjIHJldHJ5OiAke2NvdW50ZXJ9IGNyZWF0ZSB0b2tlbiBhY2NvdW50OiBgLCBlKTtcbiAgICAgICAgICBkZWJ1Z0xvZyhgIyBtaW50OiAke21pbnR9LCBvd25lcjogJHtvd25lcn0sIGZlZVBheWVyOiAke2ZlZVBheWVyfWApO1xuICAgICAgICB9XG4gICAgICAgIGF3YWl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AgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGFzc29jaWF0ZWRUb2tlbkFjY291bnQ6ICcsIGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSk7XG5cbiAgICAgIHRyeSB7XG4gICAgICAgIC8vIERvbnQgdXNlIFJlc3VsdFxuICAgICAgICBhd2FpdCBnZXRBY2NvdW50KFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCkuY29tbWl0bWVudCxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3Q6IHVuZGVmaW5lZCxcbiAgICAgICAgfTtcbiAgICAgIH0gY2F0Y2ggKGVycm9yOiB1bmtub3duKSB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5BY2NvdW50Tm90Rm91bmRFcnJvcikgJiZcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5JbnZhbGlkQWNjb3VudE93bmVyRXJyb3IpXG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9yKCdVbmV4cGVjdGVkIGVycm9yJyk7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBwYXllciA9ICFmZWVQYXllciA/IG93bmVyIDogZmVlUGF5ZXI7XG5cbiAgICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgICBwYXllci50b1B1YmxpY0tleSgpL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T4ge1xuICAgICAgY29uc3QgW3B1YmxpY0tleV0gPSBQdWJsaWNLZXkuZmluZFByb2dyYW1BZGRyZXNzU3luYyhcbiAgICAgICAgW1xuICAgICAgICAgIEJ1ZmZlci5mcm9tKCdtZXRhZGF0YScpLFxuICAgICAgICAgIFBST0dSQU1fSUQudG9CdWZmZXIoKSxcbiAgICAgICAgICBhZGRyZXNzLnRvUHVibGljS2V5KCkudG9CdWZmZXIoKSxcbiAgICAgICAgICBCdWZmZXIuZnJvbSgnZWRpdGlvbicpLFxuICAgICAgICBdLFxuICAgICAgICBQUk9HUkFNX0lELFxuICAgICAgKTtcbiAgICAgIHJldHVybiBwdWJsaWNLZXk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBnZXRUcmVlQXV0aG9yaXR5ID0gKGFkZHJlc3M6IFB1YmtleSk6IFB1YmxpY0tleSA9PiB7XG4gICAgICBjb25zdCBbcHVibGljS2V5XSA9IFB1YmxpY0tleS5maW5kUHJvZ3JhbUFkZHJlc3NTeW5jKFxuICAgICAgICBbYWRkcmVzcy50b1B1YmxpY0tleSgpLnRvQnVmZmVyKCldLFxuICAgICAgICBNUExfQlVCQkxFR1VNX1BST0dSQU1fSUQudG9QdWJsaWNLZXkoKSxcbiAgICAgICk7XG4gICAgICByZXR1cm4gcHVibGljS2V5O1xuICAgIH07XG5cbiAgICBleHBvcnQgY29uc3QgZ2V0Qmd1bVNpZ25lciA9ICgpOiBQdWJsaWNLZXkgPT4ge1xuICAgICAgY29uc3QgW3B1YmxpY0tleV0gPSBQdWJsaWNLZXkuZmluZFByb2dyYW1BZGRyZXNzU3luYyhcbiAgICAgICAgW0J1ZmZlci5mcm9tKCdjb2xsZWN0aW9uX2NwaScsICd1dGY4JyldLFxuICAgICAgICBNUExfQlVCQkxFR1VNX1BST0dSQU1fSUQudG9QdWJsaWNLZXkoKSxcbiAgICAgICk7XG4gICAgICByZXR1cm4gcHVibGljS2V5O1xuICAgIH07XG5cbiAgICBleHBvcnQg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lwZXMvY29udmVydGVyJztcblxuZXhwb3J0IG5hbWVzcGFjZSBDb252ZXJ0ZXIge1xuICBleHBvcnQgbmFtZXNwYWNlIENyZWF0b3JzIHtcbiAgICBleHBvcnQgY29uc3QgaW50b0luZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IE9wdGlvbjxJbnRlcm5hbENyZWF0b3JzW10+ID0+IHtcbiAgICAgIGlmICghaW5wdXQpIHtcbiAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICB9XG4gICAgICByZXR1cm4gaW5wdXQubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvQ29tcHJlc3NlZE5mdEluZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IEludGVybmFsQ3JlYXRvcnNbXSA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBbXTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBpbnB1dCEubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlciA9IChc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GFkYXRhOiBULFxuICApOiBSZXN1bHQ8c3RyaW5nLCBWYWxpZGF0b3JFcnJvcj4gPT4ge1xuICAgIHJldHVybiBUcnkoKCkgPT4ge1xuICAgICAgY29uc3Qga2V5cyA9IE9iamVjdC5rZXlzKG1ldGFkYXRhKTtcbiAgICAgIGNvbnN0IHJlc3VsdHM6IERldGFpbHNbXSA9IFtdO1xuICAgICAga2V5cy5tYXAoKGtleSkgPT4ge1xuICAgICAgICBsZXQgcmVzITogUmVzdWx0PHN0cmluZywgVmFsaWRhdG9yRXJyb3I+O1xuICAgICAgICBzd2l0Y2ggKGtleSkge1xuICAgICAgICAgIGNhc2UgJ2ltYWdlJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuaW1hZ2UpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNJbWFnZVVybChtZXRhZGF0YS5pbWFnZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdyb3lhbHR5JzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEucm95YWx0eSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1JveWFsdHkobWV0YWRhdGEucm95YWx0eSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFza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lbkFtb3VudCA9IGQuYWNjb3VudC5kYXRhLnBhcnNlZC5pbmZvLnRva2VuQW1vdW50XG4gICAgICAgICAgLmFtb3VudCBhcyBzdHJpbmc7XG4gICAgICAgIGlmICh0b2tlbkFtb3VudCA9PT0gJzEnKSB7XG4gICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBNZXRhZGF0YS5mcm9tQWNjb3VudEFkZHJlc3MoXG4gICAgICAgICAgY29ubmVjdGlvbixcbiAgICAgICAgICBBY2NvdW50LlBkYS5nZXRNZXRhZGF0YShtaW50KSxcbiAgICAgICAgKVxuICAgICAgICAgIC50aGVuKGFzeW5jIChtZXRhZGF0YSkgPT4ge1xuICAgICAgICAgICAgLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLWV4cGxpY2l0LWFueSAqL1xuICAgICAgICAgICAgcmV0dXJuIGZldGNoUmV0cnkobWV0YWRhdGEuZGF0YS51cmkpLnRoZW4oKGpzb246IGFueSkgPT4ge1xuICAgICAgICAgICAgICByZXR1cm4gY29udmVydGVyKG1ldGFkYXRhLCBqc29uLCB0b2tlbkFtb3VudCk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICB9KVxuICAgICAgICAgIC5jYXRjaCgoZXJyKSA9PiBkZWJ1Z0xvZygnIyBbRmV0Y2ggZXJyb3JdJywgZXJyKSk7XG4gICAgICB9KTtcblxuICAgICAgY29uc3QgZmlsdGVycyA9IChhd2FpdCBQcm9taXNlLmFsbChkYXRhcykpLmZpbHRlcihcbiAgICAgICAgKGRhdGEpID0+IGRhdGEgIT09IHVuZGVmaW5lZCxcbiAgICAgICk7XG4gICAgICByZXR1cm4gZmlsdGVycyBhcyBUb2tlbk1ldGFkYXRhW107XG4gICAgfSk7XG4gIH07XG5cbiAgLyoqXG4gICAqIEZldGNoIG1pbnRlZCBtZXRhZGF0YSBieSBtaW50IGFkZHJlc3NcbiAgICpcbiAgICogQHBhcmFtIHtQd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XN0VmFsaWRCbG9ja0hlaWdodDogYmxvY2toYXNoT2JqLmxhc3RWYWxpZEJsb2NrSGVpZ2h0LFxuICAgICAgICBibG9ja2hhc2g6IGJsb2NraGFzaE9iai5ibG9ja2hhc2gsXG4gICAgICAgIGZlZVBheWVyOiBmZWVQYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgfSk7XG5cbiAgICAgIC8vIHJldHVybiBhc3NvY2lhdGVkIHRva2VuIGFjY291bnRcbiAgICAgIGlmICghZGVzdFRva2VuLmluc3QpIHtcbiAgICAgICAgaW5zdDIgPSBjcmVhdGVUcmFuc2ZlckNoZWNrZWRJbnN0cnVjdGlvbihcbiAgICAgICAgICBzb3VyY2VUb2tlbi50b2tlbkFjY291bnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgZGVzdFRva2VuLnRva2VuQWNjb3VudC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICAgIENhbGN1bGF0b3IuY2FsY3VsYXRlQW1vdW50KGFtb3VudCwgbWludERlY2ltYWwpLFxuICAgICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICAgIFtvd25lci50b0tleXBhaXIoKV0sXG4gICAgICAgICk7XG4gICAgICAgIHR4LmFkZChpbnN0Mik7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICAvLyByZXR1cm4gaW5zdHJ1Y3Rpb24gYW5kIHVuZGVjaWRlZCBhc3NvY2lhdGVkIHRva2VuIGFjY291bnRcbiAgICAgICAgaW5zdDIgPSBjcmVhdGVUcmFuc2ZlckNoZWNrZWRJbnN0cnVjdGlvbihcbiAgICAgICAgICBzb3VyY2VUb2tlbi50b2tlbkFjY291bnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgZGVzdFRva2VuLnRva2VuQWNjb3VudC50b1B1YmxpY0tleSgpLF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AgICAgIG1pbnQsXG4gICAgICAgIHRva2VuQXNzb2NpYXRlZCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIENhbGN1bGF0ZS5jYWxjdWxhdGVBbW91bnQodG90YWxBbW91bnQsIG1pbnREZWNpbWFsKSxcbiAgICAgICAgbWludERlY2ltYWwsXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUNyZWF0ZU1ldGFkYXRhQWNjb3VudFYzSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHtcbiAgICAgICAgICBtZXRhZGF0YTogbWV0YWRhdGFQZGEsXG4gICAgICAgICAgbWludCxcbiAgICAgICAgICBtaW50QXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBwYXllcjogZmVlUGF5ZXIsXG4gICAgICAgICAgdXBkYXRlQXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgIGNyZWF0ZU1ldGFkYXRhQWNjb3VudEFyZ3NWMzoge1xuICAgICAgICAgICAgZGF0YTogdG9rZW5NZXRhZGF0YSxcbiAgICAgICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICAgICAgIGNvbGxlY3Rpb25EZXRhaWxzOiBudWxsLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICApLFxuICAgICk7XG4gICAgcmV0dXJuIGluc3RydWN0aW9ucztcbiAgfTtcblxuICAvKipcbiAgICogU1BMLVRPS0VOIG1pbnRcbiAgICpcbiAgICogQHBhcmFtIHtTZWNyZXR9IG93bmVyICAgICAgLy8gdG9rZW4gb3duZXIgU2VjcmV0XG4gICAqIEBwYXJhbSB7bnVtYmVyfSB0b3RhbEFtb3VudCAvLyB0b3RhbCBudW1iZXJcbiAgICogQHBhcmFtIHtudW1iZXJ9IG1pbnREZWNpbWFsIC8vIHRva2VuIGRlY2ltYWxcbiAgICogQHBhcmFtIHtJbnB1dFRva2VuTWV0YWRhd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xuICAgICAgICAgIHRocm93IHVwbG9hZGVkO1xuICAgICAgICB9XG4gICAgICAgIHVyaSA9IHVwbG9hZGVkLnZhbHVlO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgdGhyb3cgRXJyb3IoYE11c3Qgc2V0IGZpbGVQYXRoJyBvciAndXJpJ2ApO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBpc011dGFibGUgPSB0cnVlO1xuXG4gICAgICBjb25zdCBkYXRhdjIgPSBDb252ZXJ0ZXIuVG9rZW5NZXRhZGF0YS5pbnRvSW5mcmEoXG4gICAgICAgIGlucHV0LFxuICAgICAgICB1cmksXG4gICAgICAgIHNlbGxlckZlZUJhc2lzUG9pbnRzLFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgZGF0YXYyOiAnLCBkYXRhdjIpO1xuICAgICAgZGVidWdMb2coJyMgdXBsb2FkIGNvbnRlbnQgdXJsOiAnLCB1cmkpO1xuXG4gICAgICBjb25zdCBtaW50ID0gQWNjb3VudC5LZXlwYWlyLmNyZWF0ZSgpO1xuICAgICAgY29uc3QgaW5zdHMgPSBhd2FpdCBjcmVhdGVNaW50KFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICB0b3RhbEFtb3VudCxcbiAgICAgICAgbWludERlY2ltYWwsXG4gICAgICAgIGRhdGF2MixcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICBpc011dGFibGUsXG4gICAgICApO1xuXG4gICAgICAvLyBmcmVlemVBdXRob3JpdHlcbiAgICAgIGlmIChmcmVlemVBdXRob3JpdHkpIHtcbiAgICAgICAgaW5zdHMucHVzaChcbiAgICAgICAgICBjcmVhdGVGcmVlemVBdXRob3JpdHkoXG4gICAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgICAgIGZyZWV6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RcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBtaW50XG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAgICogQHBhcmFtIHtTZWNyZXR9IGZlZVBheWVyXG4gICAgICogQHJldHVybnMgUHJvbWlzZTxzdHJpbmc+XG4gICAgICovXG4gICAgZXhwb3J0IGNvbnN0IHJldHJ5R2V0T3JDcmVhdGUgPSBhc3luYyAoXG4gICAgICBtaW50OiBQdWJrZXksXG4gICAgICBvd25lcjogUHVia2V5LFxuICAgICAgZmVlUGF5ZXI6IFNlY3JldCxcbiAgICApOiBQcm9taXNlPHN0cmluZz4gPT4ge1xuICAgICAgbGV0IGNvdW50ZXIgPSAxO1xuICAgICAgd2hpbGUgKGNvdW50ZXIgPCBSRVRSWV9PVkVSX0xJTUlUKSB7XG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgY29uc3QgaW5zdCA9IGF3YWl0IGdldChtaW50LCBvd25lciwgZmVlUGF5ZXIsIHRydWUpO1xuXG4gICAgICAgICAgaWYgKGluc3QgJiYgdHlwZW9mIGluc3QgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICBkZWJ1Z0xvZygnIyBhc3NvY2lhdGVkVG9rZW5BY2NvdW50OiAnLCBpbnN0KTtcbiAgICAgICAgICAgIHJldHVybiBpbnN0O1xuICAgICAgICAgIH0gZWxzZSBpZiAoaW5zdCBpbnN0YW5jZW9mIFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb24pIHtcbiAgICAgICAgICAgIChhd2FpdCBpbnN0LnN1Ym1pdCgpKS5tYXAoXG4gICAgICAgICAgICAgIGFzeW5jIChvazogc3RyaW5nKSA9PiB7XG4gICAgICAgICAgICAgICAgYXdhaXQgTm9kZS5jb25maXJtZWRTaWcob2spO1xuICAgICAgICAgICAgICAgIHJldHVybiBpbnN0LmRhdGE7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIChlcnI6IEVycm9yKSA9PiB7XG4g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ICAgICAgICBpZiAoXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuQWNjb3VudE5vdEZvdW5kRXJyb3IpICYmXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuSW52YWxpZEFjY291bnRPd25lckVycm9yKVxuICAgICAgICApIHtcbiAgICAgICAgICB0aHJvdyBFcnJvcignVW5leHBlY3RlZCBlcnJvcicpO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgcGF5ZXIgPSAhZmVlUGF5ZXIgPyBvd25lciA6IGZlZVBheWVyO1xuXG4gICAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVBc3NvY2lhdGVkVG9rZW5BY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgcGF5ZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdCxcbiAgICAgICAgfTtcbiAgICAgIH1cbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHsgS2V5cGFpciBhcyBPcmlnaW5hbCwgUHVibGljS2V5IH0gZnJvbSAnQHNvbGFuYS93ZWIzLmpzJztcbmltcG9ydCB7IFB1YmtleSwgU2VjcmV0IH0gZnJvbSAnfi90eXBlcy9hY2NvdW50JztcbmltcG9ydCBicyBmcm9tICdiczU4JztcblxuZXhwb3J0IG5hbWVzcGFjZSBBY2NvdW50IHtcbiAgZXhwb3J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vUHVibGljS2V5KCksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGdldEJndW1TaWduZXIgPSAoKTogUHVibGljS2V5ID0+IHtcbiAgICAgIGNvbnN0IFtwdWJsaWNLZXldID0gUHVibGljS2V5LmZpbmRQcm9ncmFtQWRkcmVzc1N5bmMoXG4gICAgICAgIFtCdWZmZXIuZnJvbSgnY29sbGVjdGlvbl9jcGknLCAndXRmOCcpXSxcbiAgICAgICAgTVBMX0JVQkJMRUdVTV9QUk9HUkFNX0lELnRvUHVibGljS2V5KCksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGdldEFzc2V0SWQgPSAoYWRkcmVzczogUHVia2V5LCBsZWFmSW5kZXg6IG51bWJlcik6IFB1YmtleSA9PiB7XG4gICAgICBjb25zdCBub2RlID0gbmV3IEJOLkJOKGxlYWZJbmRleCk7XG4gICAgICBjb25zdCBbYXNzZXRJZF0gPSBQdWJsaWNLZXkuZmluZFByb2dyYW1BZGRyZXNzU3luYyhcbiAgICAgICAgW1xuICAgICAgICAgIEJ1ZmZlci5mcm9tKCdhc3NldCcsICd1dGY4JyksXG4gICAgICAgICAgYWRkcmVzcy50b1B1YmxpY0tleSgpLnRvQnVmZmVyKCksXG4gICAgICAgICAgVWludDhBcnJheS5mcm9tKG5vZGUudG9BcnJheSgnbGUnLCA4KSksXG4gICAgICAgIF0sXG4gICAgICAgIE1QTF9CVUJCTEVHVU1fUFJPR1JBTV9JRC50b1B1YmxpY0tleSgpLFxuICAgICAgKTtcbiAgICAgIHJldHVybiBhc3NldElkLnRvU3RyaW5nKCk7XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IEFjY291bnQgYXMgQXNzb2NpYXRlZCB9IGZyb20gJy4vYXNzb2NpYXRlZCc7XG5pbXBvcnQgeyBBY2NvdW50IG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MgfCB1bmRlZmluZWQsXG4gICAgICBjYWxsYmFja0Z1bmM6IChcbiAgICAgICAgZmlsZVBhdGg6IEZpbGVUeXBlLFxuICAgICAgICBzdG9yYWdlVHlwZTogU3RvcmFnZVR5cGUsXG4gICAgICAgIGZlZVBheWVyPzogU2VjcmV0LFxuICAgICAgKSA9PiBQcm9taXNlPFJlc3VsdDxzdHJpbmcsIEVycm9yPj4sXG4gICAgICBzdG9yYWdlVHlwZTogU3RvcmFnZVR5cGUsXG4gICAgICBmZWVQYXllcj86IFNlY3JldCxcbiAgICApOiBQcm9taXNlPFByb3BlcnRpZXM+ID0+IHtcbiAgICAgIGlmICghaW5wdXQgfHwgIWlucHV0LmZpbGVzKSB7XG4gICAgICAgIHJldHVybiB7fTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgZmlsZXMgPSBhd2FpdCBQcm9taXNlLmFsbChcbiAgICAgICAgaW5wdXQuZmlsZXMubWFwKGFzeW5jIChmaWxlKSA9PiB7XG4gICAgICAgICAgaWYgKCFmaWxlLmZpbGVQYXRoKSB7XG4gICAgICAgICAgICByZXR1cm4ge307XG4gICAgICAgICAgfVxuICAgICAgICAgIGNvbnN0IHJlcyA9IGF3YWl0IGNhbGxiYWNrRnVuYyhmaWxlLmZpbGVQYXRoLCBzdG9yYWdlVHlwZSwgZmVlUGF5ZXIpO1xuICAgICAgICAgIGlmIChyZXMuaXNFcnIpIHtcbiAgICAgICAgICAgIHRocm93IEVycm9yKHJlcy5lcnJvci5tZXNzYWdlKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgcmV0dXJuIG92ZXJ3cml0ZU9iamVjdChmaWxlLCBbXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGV4aXN0c0tleTogJ2ZpbGVQYXRoJyxcbiAgICAgICAgICAgICAgd2lsbDogeyBrZXk6ICd1cmknLCB2YWx1ZTogcmVzLnZhbHVlIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgIF0pO1xuICAgICAgICB9KSxc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xuICApOiBSZXN1bHQ8c3RyaW5nLCBWYWxpZGF0b3JFcnJvcj4gPT4ge1xuICAgIHJldHVybiBUcnkoKCkgPT4ge1xuICAgICAgY29uc3Qga2V5cyA9IE9iamVjdC5rZXlzKG1ldGFkYXRhKTtcbiAgICAgIGNvbnN0IHJlc3VsdHM6IERldGFpbHNbXSA9IFtdO1xuICAgICAga2V5cy5tYXAoKGtleSkgPT4ge1xuICAgICAgICBsZXQgcmVzITogUmVzdWx0PHN0cmluZywgVmFsaWRhdG9yRXJyb3I+O1xuICAgICAgICBzd2l0Y2ggKGtleSkge1xuICAgICAgICAgIGNhc2UgJ2ltYWdlJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuaW1hZ2UpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNJbWFnZVVybChtZXRhZGF0YS5pbWFnZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdyb3lhbHR5JzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEucm95YWx0eSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1JveWFsdHkobWV0YWRhdGEucm95YWx0eSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOl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tleTtcbiAgICAgICAgY29uc3QgdG9rZW5BbW91bnQgPSBkLmFjY291bnQuZGF0YS5wYXJzZWQuaW5mby50b2tlbkFtb3VudFxuICAgICAgICAgIC5hbW91bnQgYXMgc3RyaW5nO1xuICAgICAgICBpZiAodG9rZW5BbW91bnQgPT09ICcxJykge1xuICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gTWV0YWRhdGEuZnJvbUFjY291bnRBZGRyZXNzKFxuICAgICAgICAgIGNvbm5lY3Rpb24sXG4gICAgICAgICAgQWNjb3VudC5QZGEuZ2V0TWV0YWRhdGEobWludCksXG4gICAgICAgIClcbiAgICAgICAgICAudGhlbihhc3luYyAobWV0YWRhdGEpID0+IHtcbiAgICAgICAgICAgIC8qIGVzbGludC1kaXNhYmxlIEB0eXBlc2NyaXB0LWVzbGludC9uby1leHBsaWNpdC1hbnkgKi9cbiAgICAgICAgICAgIHJldHVybiBmZXRjaFJldHJ5KG1ldGFkYXRhLmRhdGEudXJpKS50aGVuKChqc29uOiBhbnkpID0+IHtcbiAgICAgICAgICAgICAgcmV0dXJuIGNvbnZlcnRlcihtZXRhZGF0YSwganNvbiwgdG9rZW5BbW91bnQpO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfSlcbiAgICAgICAgICAuY2F0Y2goKGVycikgPT4gZGVidWdMb2coJyMgW0ZldGNoIGVycm9yXScsIGVycikpO1xuICAgICAgfSk7XG5cbiAgICAgIGNvbnN0IGZpbHRlcnMgPSAoYXdhaXQgUHJvbWlzZS5hbGwoZGF0YXMpKS5maWx0ZXIoXG4gICAgICAgIChkYXRhKSA9PiBkYXRhICE9PSB1bmRlZmluZWQsXG4gICAgICApO1xuICAgICAgcmV0dXJuIGZpbHRlcnMgYXMgVG9rZW5NZXRhZGF0YVtdO1xuICAgIH0pO1xuICB9O1xuXG4gIC8qKlxuICAgKiBGZXRjaCBtaW50ZWQgbWV0YWRhdGEgYnkgbWludCBhZGRyZXNzXG4gIC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N0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlTWludFRvQ2hlY2tlZEluc3RydWN0aW9uKFxuICAgICAgICBtaW50LFxuICAgICAgICB0b2tlbkFzc29jaWF0ZWQsXG4gICAgICAgIG93bmVyLFxuICAgICAgICBDYWxjdWxhdGUuY2FsY3VsYXRlQW1vdW50KHRvdGFsQW1vdW50LCBtaW50RGVjaW1hbCksXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgKSxcbiAgICApO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVDcmVhdGVNZXRhZGF0YUFjY291bnRWM0luc3RydWN0aW9uKFxuICAgICAgICB7XG4gICAgICAgICAgbWV0YWRhdGE6IG1ldGFkYXRhUGRhLFxuICAgICAgICAgIG1pbnQsXG4gICAgICAgICAgbWludEF1dGhvcml0eTogb3duZXIsXG4gICAgICAgICAgcGF5ZXI6IGZlZVBheWVyLFxuICAgICAgICAgIHVwZGF0ZUF1dGhvcml0eTogb3duZXIsXG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICBjcmVhdGVNZXRhZGF0YUFjY291bnRBcmdzVjM6IHtcbiAgICAgICAgICAgIGRhdGE6IHRva2VuTWV0YWRhdGEsXG4gICAgICAgICAgICBpc011dGFibGUsXG4gICAgICAgICAgICBjb2xsZWN0aW9uRGV0YWlsczogbnVsbCxcbiAgICAgICAgICB9LFxuICAgICAgICB9LFxuICAgICAgKSxcbiAgICApO1xuICAgIHJldHVybiBpbnN0cnVjdGlvbnM7XG4gIH07XG5cbiAgLyoqXG4gICAqIFNQTC1UT0tFTiBtaW50XG4gICAqXG4gICAqIEBwYXJhbSB7U2VjcmV0fSBvd25lciAgICAgIC8vIHRva2VuIG93bmVyIFNlY3JldFxuICAgKiBAcGFyYW0ge251bWJlcn0gdG90YWxBbW91bnQgLy8gdG90YWwgbnVtYmVyXG4gICAqIEBwYXJhbSB7bnVtYmVyfSBtaW50RGVjaW1hbCAv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BheWVyLFxuICAgICAgICApO1xuICAgICAgICBpZiAodXBsb2FkZWQuaXNFcnIpIHtcbiAgICAgICAgICB0aHJvdyB1cGxvYWRlZDtcbiAgICAgICAgfVxuICAgICAgICB1cmkgPSB1cGxvYWRlZC52YWx1ZTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHRocm93IEVycm9yKGBNdXN0IHNldCBmaWxlUGF0aCcgb3IgJ3VyaSdgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgaXNNdXRhYmxlID0gdHJ1ZTtcblxuICAgICAgY29uc3QgZGF0YXYyID0gQ29udmVydGVyLlRva2VuTWV0YWRhdGEuaW50b0luZnJhKFxuICAgICAgICBpbnB1dCxcbiAgICAgICAgdXJpLFxuICAgICAgICBzZWxsZXJGZWVCYXNpc1BvaW50cyxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGRhdGF2MjogJywgZGF0YXYyKTtcbiAgICAgIGRlYnVnTG9nKCcjIHVwbG9hZCBjb250ZW50IHVybDogJywgdXJpKTtcblxuICAgICAgY29uc3QgbWludCA9IEFjY291bnQuS2V5cGFpci5jcmVhdGUoKTtcbiAgICAgIGNvbnN0IGluc3RzID0gYXdhaXQgY3JlYXRlTWludChcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgdG90YWxBbW91bnQsXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICBkYXRhdjIsXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgKTtcblxuICAgICAgLy8gZnJlZXplQXV0aG9yaXR5XG4gICAgICBpZiAoZnJlZXplQXV0aG9yaXR5KSB7XG4gICAgICAgIGluc3RzLnB1c2goXG4gICAgICAgICAgY3JlYXRlRnJlZXplQXV0aG9yaXR5KFxuICAgICAgICAgICAgbWludC50b1B1YmxpY0tleSgp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aW9uQnVpbGRlciIsICJpbXBvcnRfc3BsX3Rva2VuIiwgIlNwbFRva2VuIiwgIkFjY291bnQiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlNwbFRva2VuIl0KfQo= \ No newline at end of file diff --git a/packages/suite-spl-token/dist/index.mjs b/packages/suite-spl-token/dist/index.mjs index 4c28f9591..eee324f36 100644 --- a/packages/suite-spl-token/dist/index.mjs +++ b/packages/suite-spl-token/dist/index.mjs @@ -1,7 +1,7 @@ // src/add.ts import { createMintToCheckedInstruction } from "@solana/spl-token"; -// ../shared/src/constants.ts +// ../suite-utils/src/constants.ts import { PublicKey } from "@solana/web3.js"; import SolanaJsonConfig from "@solana-suite/config/load"; var Config = SolanaJsonConfig; @@ -283,65 +283,6 @@ var TransactionBuilder; TransactionBuilder7.Common = Common2; })(TransactionBuilder || (TransactionBuilder = {})); -// ../shared/src/shared.ts -var overwriteObject = (object, targets) => { - const that = object; - targets.forEach((target) => { - delete that[target.existsKey]; - that[target.will.key] = target.will.value; - }); - return that; -}; -var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { - if (Constants.isDebugging === "true" || process.env.DEBUG === "true") { - console.log("[DEBUG]", data1, data2, data3, data4); - } -}; -var sleep = async (sec) => { - return new Promise((r) => setTimeout(r, sec * 1e3)); -}; -var isBrowser = () => { - return typeof window !== "undefined" && typeof window.document !== "undefined"; -}; -var isNode = () => { - return typeof process !== "undefined" && process.versions != null && process.versions.node != null; -}; -var isPromise = (obj) => { - return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; -}; -function Try(input, finallyInput) { - try { - const v = input(); - if (isPromise(v)) { - return v.then( - (x) => Result.ok(x), - (err) => Result.err(err) - ); - } else { - return Result.ok(v); - } - } catch (e) { - if (e instanceof Error) { - return Result.err(e); - } - return Result.err(Error(e)); - } finally { - if (finallyInput) { - debugLog("# finally input:", finallyInput); - finallyInput(); - } - } -} -var convertTimestampToDateTime = (created_at) => { - if (created_at) { - return new Date(created_at * 1e3); - } - return; -}; -var unixTimestamp = () => { - return Math.floor((/* @__PURE__ */ new Date()).getTime() / 1e3); -}; - // ../transaction-builder/src/batch.ts var TransactionBuilder2; ((TransactionBuilder7) => { @@ -809,7 +750,66 @@ var TransactionBuilder6 = { ...TransactionBuilder4 }; -// ../shared/src/result.ts +// ../suite-utils/src/shared.ts +var overwriteObject = (object, targets) => { + const that = object; + targets.forEach((target) => { + delete that[target.existsKey]; + that[target.will.key] = target.will.value; + }); + return that; +}; +var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { + if (Constants.isDebugging === "true" || process.env.DEBUG === "true") { + console.log("[DEBUG]", data1, data2, data3, data4); + } +}; +var sleep = async (sec) => { + return new Promise((r) => setTimeout(r, sec * 1e3)); +}; +var isBrowser = () => { + return typeof window !== "undefined" && typeof window.document !== "undefined"; +}; +var isNode = () => { + return typeof process !== "undefined" && process.versions != null && process.versions.node != null; +}; +var isPromise = (obj) => { + return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; +}; +function Try(input, finallyInput) { + try { + const v = input(); + if (isPromise(v)) { + return v.then( + (x) => Result.ok(x), + (err) => Result.err(err) + ); + } else { + return Result.ok(v); + } + } catch (e) { + if (e instanceof Error) { + return Result.err(e); + } + return Result.err(Error(e)); + } finally { + if (finallyInput) { + debugLog("# finally input:", finallyInput); + finallyInput(); + } + } +} +var convertTimestampToDateTime = (created_at) => { + if (created_at) { + return new Date(created_at * 1e3); + } + return; +}; +var unixTimestamp = () => { + return Math.floor((/* @__PURE__ */ new Date()).getTime() / 1e3); +}; + +// ../suite-utils/src/result.ts var AbstractResult = class { unwrap(ok, err) { const r = this._chain( @@ -921,15 +921,15 @@ var InternalErr = class extends AbstractResult { } }; var Result; -((Result17) => { +((Result18) => { function ok(value) { return new InternalOk(value); } - Result17.ok = ok; + Result18.ok = ok; function err(error) { return new InternalErr(error || Error()); } - Result17.err = err; + Result18.err = err; function all(obj) { if (Array.isArray(obj)) { const resArr = []; @@ -939,7 +939,7 @@ var Result; } resArr.push(item.value); } - return Result17.ok(resArr); + return Result18.ok(resArr); } const res = {}; const keys = Object.keys(obj); @@ -950,9 +950,9 @@ var Result; } res[key] = item.value; } - return Result17.ok(res); + return Result18.ok(res); } - Result17.all = all; + Result18.all = all; })(Result || (Result = {})); // ../converter/src/collection.ts @@ -2226,4 +2226,4 @@ var SplToken10 = { export { SplToken10 as SplToken }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2FkZC50cyIsICIuLi8uLi9zaGFyZWQvc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9iYXRjaC50cyIsICIuLi8uLi9ub2RlL3NyYy9pbmRleC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jb21tb24udHMiLCAiLi4vLi4vc2hhcmVkL3NyYy9zaGFyZWQudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvbWludC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9wYXJ0aWFsLXNpZ24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY2FsY3VsYXRlLXR4c2l6ZS50cyIsICIuLi8uLi9nbG9iYWwvc3JjL2luZGV4LnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2Fzc29jaWF0ZWQudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMva2V5cGFpci50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9wZGEudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvaW5kZXgudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvaW5kZXgudHMiLCAiLi4vLi4vc2hhcmVkL3NyYy9yZXN1bHQudHMiLCAiLi4vLi4vY29udmVydGVyL3NyYy9jb2xsZWN0aW9uLnRzIiwgIi4u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XG5cbiAgICAvKipcbiAgICAgKiBSZXRyeSBmdW5jdGlvbiBpZiBjcmVhdGUgbmV3IHRva2VuIGFjY291aW50XG4gICAgICpcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gbWludFxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBvd25lclxuICAgICAqIEBwYXJhbSB7U2VjcmV0fSBmZWVQYXllclxuICAgICAqIEByZXR1cm5zIFByb21pc2U8c3RyaW5nPlxuICAgICAqL1xuICAgIGV4cG9ydCBjb25zdCByZXRyeUdldE9yQ3JlYXRlID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyOiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxzdHJpbmc+ID0+IHtcbiAgICAgIGxldCBjb3VudGVyID0gMTtcbiAgICAgIHdoaWxlIChjb3VudGVyIDwgUkVUUllfT1ZFUl9MSU1JVCkge1xuICAgICAgICB0cnkge1xuICAgICAgICAgIGNvbnN0IGluc3QgPSBhd2FpdCBnZXQobWludCwgb3duZXIsIGZlZVBheWVyLCB0cnVlKTtcblxuICAgICAgICAgIGlmIChpbnN0ICYmIHR5cGVvZiBpbnN0ID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgaW5zdCk7XG4gICAgICAgICAgICByZXR1cm4gaW5zdDtcbiAgICAgICAgICB9IGVsc2UgaWYgKGluc3QgaW5zdGFuY2VvZiBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uKSB7XG4gICAgICAgICAgICAoYXdhaXQgaW5zdC5zdWJtaXQoKSkubWFwKFxuICAgICAgICAgICAgICBhc3luYyAob2s6IHN0cmluZykgPT4ge1xuICAgICAgICAgICAgICAgIGF3YWl0IE5vZGUuY29uZmlybWVkU2lnKG9rKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gaW5zdC5kYXRhO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAoZXJyOiBFcnJvcikgPT4ge1xuICAgICAgICAgICAgICAgIGRlYnVnTG9nKCcjIEVycm9yIHN1Ym1pdCByZXRyeUdldE9yQ3JlYXRlOiAnLCBlcnIpO1xuICAgICAgICAgICAgICAgIHRocm93IGVycjtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgZGVidWdMb2coYCMgcmV0cnk6ICR7Y291bnRlcn0gY3JlYXRlIHRva2VuIGFjY291bnQ6IGAsIGUpO1xuICAgICAgICAgIGRlYnVnTG9nKGAjIG1pbnQ6ICR7bWludH0sIG93bmVyOiAke293bmVyfSwgZmVlUGF5ZXI6ICR7ZmVlUGF5ZXJ9YCk7XG4gICAgICAgIH1cbiAgICAgICAgYXdhaXQgc2xlZXAoUkVUUllfU0xFRVBfVElNRSk7XG4gICAgICAgIGNvdW50ZXIrKztcbiAgICAgIH1cbiAgICAgIHRocm93IEVycm9yKGByZXRyeSBhY3Rpb24gaXMgb3ZlciBsaW1pdCAke1JFVFJZX09WRVJfTElNSVR9YCk7XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIFtNYWluIGxvZ2ljXUdldCBBc3NvY2lhdGVkIHRva2VuIEFjY291bnQuXG4gICAgICogaWYgbm90IGNyZWF0ZWQsIGNyZWF0ZSBuZXcgdG9rZW4gYWNjb3VpbnRcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBtaW50XG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAgICogQHBhcmFtIHtQdWJrZXl9IGZlZVBheWVyXG4gICAgICogQHJldHVybnMgUHJvbWlzZTxzdHJpbmc+XG4gICAgICovXG4gICAgZXhwb3J0IGNvbnN0IG1ha2VPckNyZWF0ZUluc3RydWN0aW9uID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyPzogUHVia2V5LFxuICAgICAgYWxsb3dPd25lck9mZkN1cnZlID0gZmFsc2UsXG4gICAgKTogUHJvbWlzZTx7XG4gICAgICB0b2tlbkFjY291bnQ6IHN0cmluZztcbiAgICAgIGluc3Q6IFRyYW5zYWN0aW9uSW5zdHJ1Y3Rpb24gfCB1bmRlZmluZWQ7XG4gICAgfT4gPT4ge1xuICAgICAgY29uc3QgYXNzb2NpYXRlZFRva2VuQWNjb3VudCA9IGdldEFzc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jKFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSxcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3QsXG4gICAgICAgIH07XG4gICAgICB9XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IEtleXBhaXIgYXMgT3JpZ2luYWwsIFB1YmxpY0tleSB9IGZyb20gJ0Bzb2xhbmEvd2ViMy5qcyc7XG5pbXBvcnQgeyBQdWJrZXksIFNlY3JldCB9IGZyb20gJ34vdHlwZXMvYWNjb3VudCc7XG5pbXBvcnQgYnMgZnJvbSAnYnM1OCc7XG5cbmV4cG9ydCB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ZiB0aGlzKSB7XG4gICAgICBpZiAob2JqLmlzRXJyKSB7XG4gICAgICAgIHJldHVybiBvYmo7XG4gICAgICB9IGVsc2UgaWYgKG9iai52YWx1ZS5jYW5TdWJtaXQpIHtcbiAgICAgICAgZGVidWdMb2coJyMgUmVzdWx0IGJhdGNoIGNhblN1Ym1pdCcpO1xuICAgICAgICBjb25zdCBzaWcgPSBhd2FpdCAob2JqIGFzIFBhcnRpYWxTaWduU3RydWN0dXJlKS5zdWJtaXQoZmVlUGF5ZXIpO1xuICAgICAgICBpZiAoc2lnLmlzRXJyKSB7XG4gICAgICAgICAgcmV0dXJuIHNpZztcbiAgICAgICAgfVxuICAgICAgICBhd2FpdCBOb2RlLmNvbmZpcm1lZFNpZyhzaWcudmFsdWUpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgZGVidWdMb2coJyMgUmVzdWx0IGJhdGNoIG90aGVyIHRoYW4gY2FuU3VibWl0Jyk7XG4gICAgICAgIGlmICh0aGlzLmxlbmd0aCA9PSBpKSB7XG4gICAgICAgICAgLy8gbGFzdCBvYmplY3RcbiAgICAgICAgICByZXR1cm4gb2JqLnN1Ym1pdChmZWVQYXllcik7XG4gICAgICAgIH1cbiAgICAgICAgb2JqLnN1Ym1pdChmZWVQYXllcik7XG4gICAgICB9XG4gICAgICBpKys7XG4gICAgfVxuICB9IGVsc2Uge1xuICAgIGNvbnN0IGluc3RydWN0aW9uczogQ29tbW9uU3RydWN0dXJlIHwgTWludFN0cnVjdHVyZVtdID0gW107XG4gICAgZm9yIChjb25zdCBvYmogb2YgdGhpcykge1xuICAgICAgaWYgKG9iai5pc0Vycikge1xuICAgICAgICByZXR1cm4gb2JqO1xuICAgICAgfSBlbHNlIGlmIChvYmouaXNPaykge1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChvYmoudmFsdWUpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgcmV0dXJuIFJlc3VsdC5lcnIoRXJyb3IoJ09ubHkgQXJyYXkg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AgICAgIGlucHV0LmZpbGVzLm1hcChhc3luYyAoZmlsZSkgPT4ge1xuICAgICAgICAgIGlmICghZmlsZS5maWxlUGF0aCkge1xuICAgICAgICAgICAgcmV0dXJuIHt9O1xuICAgICAgICAgIH1cbiAgICAgICAgICBjb25zdCByZXMgPSBhd2FpdCBjYWxsYmFja0Z1bmMoZmlsZS5maWxlUGF0aCwgc3RvcmFnZVR5cGUsIGZlZVBheWVyKTtcbiAgICAgICAgICBpZiAocmVzLmlzRXJyKSB7XG4gICAgICAgICAgICB0aHJvdyBFcnJvcihyZXMuZXJyb3IubWVzc2FnZSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBvdmVyd3JpdGVPYmplY3QoZmlsZSwgW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBleGlzdHNLZXk6ICdmaWxlUGF0aCcsXG4gICAgICAgICAgICAgIHdpbGw6IHsga2V5OiAndXJpJywgdmFsdWU6IHJlcy52YWx1ZSB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICBdKTtcbiAgICAgICAgfSksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHsgLi4uaW5wdXQsIGZpbGVzIH0gYXMgUHJvcGVydGllcztcbiAgICB9O1xuICB9XG59XG4iLCAiLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLXVudXNlZC12YXJzICovXG5pbXBvcnQgeyBPcHRpb24sIFVzZXMgfSBmcm9tICd+L3R5cGVzL3JlZ3VsYXItbmZ0JztcblxuZXhwb3J0IG5hbWVzcGFjZSBDb252ZXJ0ZXIge1xuICBleHBvcnQgbmFtZXNwYWNlIFVzZXMge1xuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlclNpZGUgPSAob3V0cHV0OiBPcHRpb248VXNlcz4pOiBVc2VzIHwgdW5kZWZpbmVkID0+IHtcbiAgICAgIGlmICghb3V0cHV0KSB7XG4gICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgICB9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ICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5yb3lhbHR5KSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzUm95YWx0eShtZXRhZGF0YS5yb3lhbHR5KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlcl9mZWVfYmFzaXNfcG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJGZWVCYXNpc1BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0YWRhdGEubmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzeW1ib2wnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLnN5bWJvbCkge1xuICAgICAgICAgICAgICByZXMgPSBpc1N5bWJvbChtZXRhZGF0YS5zeW1ib2wpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgaW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zZTxSZXN1bHQ8VG9rZW5NZXRhZGF0YVtdLCBFcnJvcj4+ID0+IHtcbiAgICByZXR1cm4gVHJ5KGFzeW5jICgpID0+IHtcbiAgICAgIGNvbnN0IGNvbm5lY3Rpb24gPSBOb2RlLmdldENvbm5lY3Rpb24oKTtcbiAgICAgIGNvbnN0IGluZm8gPSBhd2FpdCBjb25uZWN0aW9uLmdldFBhcnNlZFRva2VuQWNjb3VudHNCeU93bmVyKFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICB7XG4gICAgICAgICAgcHJvZ3JhbUlkOiBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICB9LFxuICAgICAgKTtcblxuICAgICAgY29uc3QgZGF0YXMgPSBpbmZvLnZhbHVlLm1hcChhc3luYyAoZCkgPT4ge1xuICAgICAgICBjb25zdCBtaW50ID0gZC5hY2NvdW50LmRhdGEucGFyc2VkLmluZm8ubWludCBhcyBQdWJrZXk7XG4gICAgICAgIGNvbnN0IHRva2VuQW1vdW50ID0gZC5hY2NvdW50LmRhdGEucGFyc2VkLmluZm8udG9rZW5BbW91bnRcbiAgICAgICAgICAuYW1vdW50IGFzIHN0cmluZztcbiAgICAgICAgaWYgKHRva2VuQW1vdW50ID09PSAnMScpIHtcbiAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIE1ldGFkYXRhLmZyb21BY2NvdW50QWRkcmVzcyhcbiAgICAgICAgICBjb25uZWN0aW9uLFxuICAgICAgICAgIEFjY291bnQuUGRhLmdldE1ldGFkYXRhKG1pbnQpLFxuICAgICAgICApXG4gICAgICAgICAgLnRoZW4oYXN5bmMgKG1ldGFkYXRhKSA9PiB7XG4gICAgICAgICAgICAvKiBlc2xpbnQtZGlzYWJsZSBAdHlwZXNjcmlwdC1lc2xpbnQvbm8tZXhwbGljaXQtYW55ICovXG4gICAgICAgICAgICByZXR1cm4gZmV0Y2hSZXRyeShtZXRhZGF0YS5kYXRhLnVyaS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UHVibGljS2V5KCksXG4gICAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgICAgQ2FsY3VsYXRvci5jYWxjdWxhdGVBbW91bnQoYW1vdW50LCBtaW50RGVjaW1hbCksXG4gICAgICAgICAgbWludERlY2ltYWwsXG4gICAgICAgICAgW293bmVyLnRvS2V5cGFpcigpXSxcbiAgICAgICAgKTtcbiAgICAgICAgdHguYWRkKGluc3QyKTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIC8vIHJldHVybiBpbnN0cnVjdGlvbiBhbmQgdW5kZWNpZGVkIGFzc29jaWF0ZWQgdG9rZW4gYWNjb3VudFxuICAgICAgICBpbnN0MiA9IGNyZWF0ZVRyYW5zZmVyQ2hlY2tlZEluc3RydWN0aW9uKFxuICAgICAgICAgIHNvdXJjZVRva2VuLnRva2VuQWNjb3VudC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBkZXN0VG9rZW4udG9rZW5BY2NvdW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgICAgQ2FsY3VsYXRvci5jYWxjdWxhdGVBbW91bnQoYW1vdW50LCBtaW50RGVjaW1hbCksXG4gICAgICAgICAgbWludERlY2ltYWwsXG4gICAgICAgICAgW293bmVyLnRvS2V5cGFpcigpXSxcbiAgICAgICAgKTtcbiAgICAgICAgdHguYWRkKGRlc3RUb2tlbi5pbnN0KS5hZGQoaW5zdDIpO1xuICAgICAgfVxuXG4gICAgICB0eC5yZWNlbnRCbG9ja2hhc2ggPSBibG9ja2hhc2hPYmouYmxvY2toYXNoO1xuICAgICAgdHgucGFydGlhbFNpZ24ob3duZXIudG9LZXlwYWlyKCkpO1xuXG4gICAgICBjb25zdCBzZXJpYWxpemVkVHggPSB0eC5zZXJpYWxpemUoe1xuICAgICAgICByZXF1aXJlQWxsU2lnbmF0dXJlczogZmFsc2UsXG4gICAgICB9KT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AgICAgIH0pLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUluaXRpYWxpemVNaW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgIG1pbnQsXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICBvd25lcixcbiAgICAgICAgb3duZXIsXG4gICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgZmVlUGF5ZXIsXG4gICAgICAgIHRva2VuQXNzb2NpYXRlZCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIG1pbnQsXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZU1pbnRUb0NoZWNrZWRJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgdG9rZW5Bc3NvY2lhdGVkLFxuICAgICAgICBvd25lcixcbiAgICAgICAgQ2FsY3VsYXRlLmNhbGN1bGF0ZUFtb3VudCh0b3RhbEFtb3VudCwgbWludERlY2ltYWwpLFxuICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlQ3JlYXRlTWV0YWRhdGFBY2NvdW50VjNJbnN0cnVjdGlvbihcbiAgICAgICAge1xuICAgICAgICAgIG1ldGFkYXRhOiBtZXRhZGF0YVBkYSxcbiAgICAgICAgICBtaW50LFxuICAgICAgICAgIG1pbnRBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICAgIHBheWVyOiBmZWVQYXllcixcbiAgICAgICAgICB1cGRhdGVBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICB9LFxuICAgICAgICB7XG4gICAgICAgICA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2FjdGlvbkJ1aWxkZXIge1xuICBleHBvcnQgY2xhc3MgQmF0Y2gge1xuICAgIHN1Ym1pdCA9IGFzeW5jIChcbiAgICAgIGFycjogQ29tbW9uLkNvbW1vbltdIHwgTWludC5NaW50W10sXG4gICAgKTogUHJvbWlzZTxSZXN1bHQ8VHJhbnNhY3Rpb25TaWduYXR1cmUsIEVycm9yPj4gPT4ge1xuICAgICAgcmV0dXJuIFRyeShhc3luYyAoKSA9PiB7XG4gICAgICAgIGxldCBpID0gMDtcbiAgICAgICAgZm9yIChjb25zdCBhIG9mIGFycikge1xuICAgICAgICAgIGlmICghYS5pbnN0cnVjdGlvbnMgJiYgIWEuc2lnbmVycykge1xuICAgICAgICAgICAgdGhyb3cgRXJyb3IoXG4gICAgICAgICAgICAgIGBvbmx5IEluc3RydWN0aW9uIG9iamVjdCB0aGF0IGNhbiB1c2UgYmF0Y2hTdWJtaXQoKS5cbiAgICAgICAgICAgIEluZGV4OiAke2l9LCBTZXQgdmFsdWU6ICR7SlNPTi5zdHJpbmdpZnkoYSl9YCxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIGkrKztcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IGluc3RydWN0aW9ucyA9IGFyci5mbGF0TWFwKChhKSA9PiBhLmluc3RydWN0aW9ucyk7XG4gICAgICAgIGNvbnN0IHNpZ25lcnMgPSBhcnIuZmxhdE1hcCgoYSkgPT4gYS5zaWduZXJzKTtcbiAgICAgICAgY29uc3QgZmVlUGF5ZXJzID0gYXJyLmZpbHRlcigoYSkgPT4gYS5mZWVQYXllciAhPT0gdW5kZWZpbmVkKTtcbiAgICAgICAgbGV0IGZlZVBheWVyID0gc2lnbmVyc1swXTtcbiAgICAgICAgaWYgKGZlZVBheWVycy5sZW5ndGggPiAwICYmIGZlZVBheWVyc1swXS5mZWVQYXllcikge1xuICAgICAgICAgIGZlZVBheWVyID0gZmVlUGF5ZXJzWzBdLmZlZVBheWVyO1xu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291bnRlciA9IDE7XG4gICAgICB3aGlsZSAoY291bnRlciA8IFJFVFJZX09WRVJfTElNSVQpIHtcbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICBjb25zdCBpbnN0ID0gYXdhaXQgZ2V0KG1pbnQsIG93bmVyLCBmZWVQYXllciwgdHJ1ZSk7XG5cbiAgICAgICAgICBpZiAoaW5zdCAmJiB0eXBlb2YgaW5zdCA9PT0gJ3N0cmluZycpIHtcbiAgICAgICAgICAgIGRlYnVnTG9nKCcjIGFzc29jaWF0ZWRUb2tlbkFjY291bnQ6ICcsIGluc3QpO1xuICAgICAgICAgICAgcmV0dXJuIGluc3Q7XG4gICAgICAgICAgfSBlbHNlIGlmIChpbnN0IGluc3RhbmNlb2YgVHJhbnNhY3Rpb25CdWlsZGVyLkNvbW1vbikge1xuICAgICAgICAgICAgKGF3YWl0IGluc3Quc3VibWl0KCkpLm1hcChcbiAgICAgICAgICAgICAgYXN5bmMgKG9rOiBzdHJpbmcpID0+IHtcbiAgICAgICAgICAgICAgICBhd2FpdCBOb2RlLmNvbmZpcm1lZFNpZyhvayk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGluc3QuZGF0YTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgKGVycjogRXJyb3IpID0+IHtcbiAgICAgICAgICAgICAgICBkZWJ1Z0xvZygnIyBFcnJvciBzdWJtaXQgcmV0cnlHZXRPckNyZWF0ZTogJywgZXJyKTtcbiAgICAgICAgICAgICAgICB0aHJvdyBlcnI7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgIGRlYnVnTG9nKGAjIHJldHJ5OiAke2NvdW50ZXJ9IGNyZWF0ZSB0b2tlbiBhY2NvdW50OiBgLCBlKTtcbiAgICAgICAgICBkZWJ1Z0xvZyhgIyBtaW50OiAke21pbnR9LCBvd25lcjogJHtvd25lcn0sIGZlZVBhe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ZmQ3VydmUsXG4gICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGFzc29jaWF0ZWRUb2tlbkFjY291bnQ6ICcsIGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSk7XG5cbiAgICAgIHRyeSB7XG4gICAgICAgIC8vIERvbnQgdXNlIFJlc3VsdFxuICAgICAgICBhd2FpdCBnZXRBY2NvdW50KFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCkuY29tbWl0bWVudCxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3Q6IHVuZGVmaW5lZCxcbiAgICAgICAgfTtcbiAgICAgIH0gY2F0Y2ggKGVycm9yOiB1bmtub3duKSB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5BY2NvdW50Tm90Rm91bmRFcnJvcikgJiZcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5JbnZhbGlkQWNjb3VudE93bmVyRXJyb3IpXG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9yKCdVbmV4cGVjdGVkIGVycm9yJyk7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBwYXllciA9ICFmZWVQYXllciA/IG93bmVyIDogZmVlUGF5ZXI7XG5cbiAgICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bn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AgICAgICAgICAgICByZXMgPSBpc0ltYWdlVXJsKG1ldGFkYXRhLmltYWdlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3JveWFsdHknOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5yb3lhbHR5KSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzUm95YWx0eShtZXRhZGF0YS5yb3lhbHR5KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlcl9mZWVfYmFzaXNfcG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJGZWVCYXNpc1BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0YWRhdGEubmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzeW1ib2wnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLnN5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XRhZGF0YVtdfCBFcnJvcj4+fVxuICAgKi9cbiAgZXhwb3J0IGNvbnN0IGZpbmRCeU93bmVyID0gYXN5bmMgKFxuICAgIG93bmVyOiBQdWJrZXksXG4gICk6IFByb21pc2U8UmVzdWx0PFRva2VuTWV0YWRhdGFbXSwgRXJyb3I+PiA9PiB7XG4gICAgcmV0dXJuIFRyeShhc3luYyAoKSA9PiB7XG4gICAgICBjb25zdCBjb25uZWN0aW9uID0gTm9kZS5nZXRDb25uZWN0aW9uKCk7XG4gICAgICBjb25zdCBpbmZvID0gYXdhaXQgY29ubmVjdGlvbi5nZXRQYXJzZWRUb2tlbkFjY291bnRzQnlPd25lcihcbiAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAge1xuICAgICAgICAgIHByb2dyYW1JZDogVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgfSxcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IGRhdGFzID0gaW5mby52YWx1ZS5tYXAoYXN5bmMgKGQpID0+IHtcbiAgICAgICAgY29uc3QgbWludCA9IGQuYWNjb3VudC5kYXRhLnBhcnNlZC5pbmZvLm1pbnQgYXMgUHVia2V5O1xuICAgICAgICBjb25zdCB0b2tlbkFtb3VudCA9IGQuYWNjb3VudC5kYXRhLnBhcnNlZC5pbmZvLnRva2VuQW1vdW50XG4gICAgICAgICAgLmFtb3VudCBhcyBzdHJpbmc7XG4gICAgICAgIGlmICh0b2tlbkFtb3VudCA9PT0gJzEnKSB7XG4gICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBNZXRhZGF0YS5mcm9tQWNjb3VudEFkZHJlc3MoXG4gICAgICAgICAgY29ubmVjdGlvbixcbiAgICAgICAgICBBY2NvdW50LlBkYS5nZXRNZXRhZGF0YShtaW50KSxcbiAgICAgICAgKVxuICAgICAgICAgIC50aGVuKGFzeW5jIChtZXRhZGF0YSkgPT4ge1xuICAgICAgICAgICAgLyogZXNsaW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lVG9rZW4udG9rZW5BY2NvdW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGRlc3RUb2tlbi50b2tlbkFjY291bnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgICBDYWxjdWxhdG9yLmNhbGN1bGF0ZUFtb3VudChhbW91bnQsIG1pbnREZWNpbWFsKSxcbiAgICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICAgICBbb3duZXIudG9LZXlwYWlyKCldLFxuICAgICAgICApO1xuICAgICAgICB0eC5hZGQoaW5zdDIpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgLy8gcmV0dXJuIGluc3RydWN0aW9uIGFuZCB1bmRlY2lkZWQgYXNzb2NpYXRlZCB0b2tlbiBhY2NvdW50XG4gICAgICAgIGluc3QyID0gY3JlYXRlVHJhbnNmZXJDaGVja2VkSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgc291cmNlVG9rZW4udG9rZW5BY2NvdW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGRlc3RUb2tlbi50b2tlbkFjY291bnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgICBDYWxjdWxhdG9yLmNhbGN1bGF0ZUFtb3VudChhbW91bnQsIG1pbnREZWNpbWFsKSxcbiAgICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICAgICBbb3duZXIudG9LZXlwYWlyKCldLFxuICAgICAgICApO1xuICAgICAgICB0eC5hZGQoZGVzdFRva2VuLmluc3QpLmFkZChpbnN0Mik7XG4gICAgICB9XG5cbiAgICAgIHR4LnJlY2VudEJsb2NraGFzaCA9IGJsb2NraGFzaE9iai5ibG9ja2hhc2g7XG4gICAgICB0eC5wYXJ0aWFsU2lnbihvd25lci50b0tleXBhaXIoKS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tleTogbWludCxcbiAgICAgICAgc3BhY2U6IE1JTlRfU0laRSxcbiAgICAgICAgbGFtcG9ydHM6IGxhbXBvcnRzLFxuICAgICAgICBwcm9ncmFtSWQ6IFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICB9KSxcbiAgICApO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVJbml0aWFsaXplTWludEluc3RydWN0aW9uKFxuICAgICAgICBtaW50LFxuICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIG93bmVyLFxuICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKSxcbiAgICApO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVBc3NvY2lhdGVkVG9rZW5BY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgIGZlZVBheWVyLFxuICAgICAgICB0b2tlbkFzc29jaWF0ZWQsXG4gICAgICAgIG93bmVyLFxuICAgICAgICBtaW50LFxuICAgICAgKSxcbiAgICApO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVNaW50VG9DaGVja2VkSW5zdHJ1Y3Rpb24oXG4gICAgICAgIG1pbnQsXG4gICAgICAgIHRva2VuQXNzb2NpYXRlZCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIENhbGN1bGF0ZS5jYWxjdWxhdGVBbW91bnQodG90YWxBbW91bnQsIG1pbnREZWNpbWFsKSxcbiAgICAgICAgbWludERlY2ltYWwsXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUNyZWF0ZU1ldGFkYXRhQWNjb3VudFYzSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHtcbiAgICAgICAgICBtZXRhZGF0YTogbWV0YWRhdGFQZGEsXG4gICAgICAgICAgbWludCxcbiAgICAgICAgICBtaW50QXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBwYXllcjogZmVlUGF5ZXIsXG4gICAgICAgICAgdXBkYXRlQXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgIGNyZWF0ZU1ldGFkYXRhQWNjb3VudEFyZ3NWMzoge1xuICAgICAgICAgICAgZGF0YTogdG9rZW5NZXRhZGF0YSxcbiAgICAgICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICAgICAgIGNvbGxlY3Rpb25EZXRhaWxzOiBudWxsLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICApLFxuICAgICk7XG4gICAgcmV0dXJuIGluc3RydWN0aW9ucztcbiAgfTtcblxuICAvKipcbiAgICogU1BMLVRPS0VOIG1pbnRcbiAgICpcbiAgICogQHBhcmFtIHtTZWNyZXR9IG93bmVyICAgICAgLy8gdG9rZW4gb3duZXIgU2VjcmV0XG4gICAqIEBwYXJhbSB7bnVtYmVyfSB0b3RhbEFtb3VudCAvLyB0b3RhbCBudW1iZXJcbiAgICogQHBhcmFtIHtudW1iZXJ9IG1pbnREZWNpbWFsIC8vIHRva2VuIGRlY2ltYWxcbiAgICogQHBhcmFtIHtJbnB1dFRva2VuTWV0YWRhdGF9IGlucHV0ICAgICAgIC8vIHRva2VuIG1ldGFkYXRhXG4gICAqIEBwYXJhbSB7UGFydGlhbDxNaW50T3B0aW9ucz59IG9wdGlvbnMgICAvLyBvcHRpb25zXG4gICAqIEByZXR1cm4gUHJvbWlzZTxSZXN1bHQ8TWludEluc3RydWN0aW9uLCBFcnJvcj4+XG4gICAqL1xuICBleHBvcnQgY29uc3QgbWludCA9IGFzeW5jIChcbiAgICBvd25lcjogU2VjcmV0LFxuICAgIHRvdGFsQW1vdW50OiBudW1iZXIsXG4gICAgbWludERlY2ltYWw6IG51bWJlcixcbiAgICBpbnB1dDogSW5wdXRUb2tlbk1ldGFkYXRhLFxuICAgIG9wdGlvbnM6IFBhcnRp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gaWYgKGlucHV0LmZpbGVQYXRoKSB7XG4gICAgICAgIGNvbnN0IHVwbG9hZGVkID0gYXdhaXQgU3RvcmFnZS51cGxvYWQoXG4gICAgICAgICAgc3RvcmFnZU1ldGFkYXRhLFxuICAgICAgICAgIGlucHV0LmZpbGVQYXRoLFxuICAgICAgICAgIHN0b3JhZ2VUeXBlLFxuICAgICAgICAgIHBheWVyLFxuICAgICAgICApO1xuXG4gICAgICAgIGlmICh1cGxvYWRlZC5pc0Vycikge1xuICAgICAgICAgIHRocm93IHVwbG9hZGVkO1xuICAgICAgICB9XG4gICAgICAgIHVyaSA9IHVwbG9hZGVkLnZhbHVlO1xuICAgICAgfSBlbHNlIGlmIChpbnB1dC51cmkpIHtcbiAgICAgICAgY29uc3QgaW1hZ2UgPSB7IGltYWdlOiBpbnB1dC51cmkgfTtcbiAgICAgICAgY29uc3QgdXBsb2FkZWQgPSBhd2FpdCBTdG9yYWdlLnVwbG9hZERhdGEoXG4gICAgICAgICAgeyAuLi5zdG9yYWdlTWV0YWRhdGEsIC4uLmltYWdlIH0sXG4gICAgICAgICAgc3RvcmFnZVR5cGUsXG4gICAgICAgICAgcGF5ZXIsXG4gICAgICAgICk7XG4gICAgICAgIGlmICh1cGxvYWRlZC5pc0Vycikge1xuICAgICAgICAgIHRocm93IHVwbG9hZGVkO1xuICAgICAgICB9XG4gICAgICAgIHVyaSA9IHVwbG9hZGVkLnZhbHVlO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgdGhyb3cgRXJyb3IoYE11c3Qgc2V0IGZpbGVQYXRoJyBvciAndXJpJ2ApO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBpc011dGFibGUgPSB0cnVlO1xuXG4gICAgICBjb25zdCBkYXRhdjIgPSBDb252ZXJ0ZXIuVG9rZW5NZXRhZGF0YS5pbnRvSW5mcmEoXG4gICAgICAgIGlucHV0LFxuICAgICAgICB1cmksXG4gICAgICAgIHNlbGxlckZlZUJhc2lzUG9pbnRzLFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgZGF0YXYyOiAnLCBkYXRhdjIpO1xuICAgICAgZGVidWdMb2coJyMgdXBsb2FkIGNvbnRlbnQgdXJsOiAnLCB1cmkpO1xuXG4gICAgICBjb25zdCBtaW50ID0gQWNjb3VudC5LZXlwYWlyLmNyZWF0ZSgpO1xuICAgICAgY29uc3QgaW5zdHMgPSBhd2FpdCBjcmVhdGVNaW50KFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICB0b3RhbEFtb3VudCxcbiAgICAgICAgbWludERlY2ltYWwsXG4gICAgICAgIGRhdGF2MixcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICBpc011dGFibGUsXG4gICAgICApO1xuXG4gICAgICAvLyBmcmVlemVBdXRob3JpdHlcbiAgICAgIGlmIChmcmVlemVBdXRob3JpdHkpIHtcbiAgICAgICAgaW5zdHMucHVzaChcbiAgICAgICAgICBjcmVhdGVGcmVlemVBdXRob3JpdHkoXG4gICAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgICAgIGZyZWV6ZUF1dGhvcml0eS50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBuZXcgVHJhbnNhY3Rpb25CdWlsZGVyLk1pbnQoXG4gICAgICAgIGluc3RzLFxuICAgICAgICBbb3duZXIudG9LZXlwYWlyKCksIG1pbnQudG9LZXlwYWlyKCldLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgbWludC5wdWJrZXksXG4gICAgICApO1xuICAgIH0pO1xuICB9O1xufVxuIiwgImltcG9ydCB7IENvbnN0YW50cywgZGVidWdMb2csIGlzQnJvd3NlciwgaXNOb2RlIH0gZnJvbSAnfi9zdWl0ZS11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ICAgKlxuICAgKiBAcGFyYW0ge1B1YmtleX0gbWludCAgICAgICAgICAgICAgIC8vIG1pbnRlZCBhY2NvdW50XG4gICAqIEBwYXJhbSB7UHVia2V5fSBvd25lciAgICAgICAgICAgICAgLy8gY3VycmVudCBtdWx0aXNpZyBvd25lclxuICAgKiBAcGFyYW0ge1B1YmtleX0gZGVzdCAgICAgICAgICAgICAgIC8vIG5ldyBvd25lclxuICAgKiBAcGFyYW0ge1NlY3JldFtdfSBvd25lck9yTXVsdGlzaWcgIC8vIG93bmVyIG9yIG11bHRpc2lnIGFjY291bnQgU2VjcmV0XG4gICAqIEBwYXJhbSB7bnVtYmVyfSBhbW91bnQgICAgICAgICAgICAgLy8gd2FudCB0byB0cmFuc2ZlciBTT0wgYW1vdW50XG4gICAqIEBwYXJhbSB7bnVtYmVyfSBtaW50RGVjaW1hbCAgICAgICAgLy8gbWludGVkIHRva2VuIGRlY2ltYWxcbiAgICogQHBhcmFtIHtQYXJ0aWFsPE1pbnRPcHRpb25zPn0gb3B0aW9ucyAgICAgICAvLyBvcHRpb25zXG4gICAqIEByZXR1cm4ge1Jlc3VsdDxDb21tb25TdHJ1Y3R1cmU8dW5rbm93bj4sIEVycm9yPiB9XG4gICAqL1xuICBleHBvcnQgY29uc3QgdHJhbnNmZXIgPSBhc3luYyAoXG4gICAgbWludDogUHVia2V5LFxuICAgIG93bmVyOiBQdWJrZXksXG4gICAgZGVzdDogUHVia2V5LFxuICAgIG93bmVyT3JNdWx0aXNpZzogU2VjcmV0W10sXG4gICAgYW1vdW50OiBudW1iZXIsXG4gICAgbWludERlY2ltYWw6IG51bWJlcixcbiAgICBvcHRpb25zOiBQYXJ0aWFsPE1pbnRPcHRpb25zPiA9IHt9LFxuICApOiBQcm9taXNlPFJlc3VsdDxDb21tb25TdHJ1Y3R1cmUsIEVycm9yPj4gPT4ge1xuICAgIHJldHVybiBUcnkoYXN5bmMgKCkgPT4ge1xuICAgICAgY29uc3QgcGF5ZXIgPSBvcHRpb25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VyIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJnZXRBc3NvY2lhdGVkVG9rZW5BZGRyZXNzU3luYyIsICJTcGxUb2tlbiIsICJBY2NvdW50IiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJjcmVhdGVUcmFuc2ZlckNoZWNrZWRJbnN0cnVjdGlvbiIsICJTcGxUb2tlbiIsICJBY2NvdW50IiwgImNyZWF0ZVRyYW5zZmVyQ2hlY2tlZEluc3RydWN0aW9uIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJTcGxUb2tlbiJdCn0K \ No newline at end of file diff --git a/packages/suite-spl-token/tsconfig.json b/packages/suite-spl-token/tsconfig.json index a9e87d9c5..18134e23a 100644 --- a/packages/suite-spl-token/tsconfig.json +++ b/packages/suite-spl-token/tsconfig.json @@ -9,10 +9,15 @@ ], "~/*": [ "../*/src/index.ts" - ], - "~/shared/exports": ["../shared/src/exports.ts"] + ] } }, - "include": ["src/**/*.ts", "test/**/*.ts"], - "exclude": ["node_modules", "dist"] + "include": [ + "src/**/*.ts", + "test/**/*.ts" + ], + "exclude": [ + "node_modules", + "dist" + ] } diff --git a/packages/suite-utils/dist/exports-8dfab8bf.d.ts b/packages/suite-utils/dist/exports-8dfab8bf.d.ts new file mode 100644 index 000000000..ba9bf6df5 --- /dev/null +++ b/packages/suite-utils/dist/exports-8dfab8bf.d.ts @@ -0,0 +1,546 @@ +import * as _solana_web3_js from '@solana/web3.js'; +import { TransactionSignature, TransactionInstruction, PublicKey, Keypair, Connection, Commitment } from '@solana/web3.js'; +import BN from 'bn.js'; +import { DataV2 } from '@metaplex-foundation/mpl-token-metadata'; + +declare const pubKeyNominality: unique symbol; +declare const secretNominality: unique symbol; +type Pubkey = (string & { + [pubKeyNominality]: never; +}) | string; +type Secret = (string & { + [secretNominality]: never; +}) | string; +type KeypairAccount = { + pubkey: Pubkey; + secret: Secret; +}; +type OwnerInfo = { + sol: number; + lamports: number; + owner: string; +}; + +declare abstract class AbstractResult { + protected abstract _chain(ok: (value: T) => Result, err: (error: E) => Result): Result; + unwrap(): T; + unwrap(ok: (value: T) => U): U; + unwrap(ok: (value: T) => U, err: (error: E) => V): U | V; + unwrap(ok: (value: T) => U, err: (error: E) => U): U; + map(ok: (value: T) => U): Result; + map(ok: (value: T) => U, err: (error: E) => F): Result; + chain(ok: (value: T) => Result): Result; + chain(ok: (value: T) => Result): Result; + chain(ok: (value: T) => Result, err: (error: E) => Result): Result; + match(ok: (value: T) => U, err: (error: E) => F): void | Promise; + submit(feePayer?: Secret): Promise>; +} +declare global { + interface Array { + submit(feePayer?: Secret): Promise>; + } +} +declare class InternalOk extends AbstractResult { + readonly value: T; + readonly isOk = true; + readonly isErr = false; + constructor(value: T); + protected _chain(ok: (value: T) => Result, _err: (error: E) => Result): Result; +} +declare class InternalErr extends AbstractResult { + readonly error: E; + readonly isOk = false; + readonly isErr = true; + constructor(error: E); + protected _chain(_ok: (value: T) => Result, err: (error: E) => Result): Result; +} +declare namespace Result { + export type Ok = InternalOk; + export type Err = InternalErr; + export function ok(value: T): Result; + export function err(error?: E): Result; + type U = Result; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3]): Result<[ + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2]): Result<[OkType, OkType, OkType], ErrType>; + export function all(obj: [R0, R1]): Result<[OkType, OkType], ErrType>; + export function all(obj: [R0]): Result<[OkType], ErrType>; + export function all(obj: []): Result<[]>; + export function all>(obj: T): Result<{ + [K in keyof T]: T[K] extends Result ? I : never; + }, { + [K in keyof T]: T[K] extends Result ? E : never; + }[keyof T]>; + export {}; +} +type Result = Result.Ok | Result.Err; +type OkType> = R extends Result ? O : never; +type ErrType> = R extends Result ? E : never; + +/** + * convert buffer to Array + * + * @param {Buffer} buffer + * @returns number[] + */ +declare const bufferToArray: (buffer: Buffer) => number[]; +/** + * Overwrite JS Object + * + * @param {unknown} object + * @param {OverwriteObject[]} targets + * @returns Object + */ +declare const overwriteObject: (object: unknown, targets: { + existsKey: string; + will: { + key: string; + value: unknown; + }; +}[]) => unknown; +/** + * Display log for solana-suite-config.js + * + * @param {unknown} data1 + * @param {unknown} data2 + * @param {unknown} data3 + * @param {unknown} data4 + * @returns void + */ +declare const debugLog: (data1: unknown, data2?: unknown, data3?: unknown, data4?: unknown) => void; +/** + * sleep timer + * + * @param {number} sec + * @returns Promise + */ +declare const sleep: (sec: number) => Promise; +/** + * Node.js or Browser js + * + * @returns boolean + */ +declare const isBrowser: () => boolean; +/** + * Node.js or Browser js + * + * @returns boolean + */ +declare const isNode: () => boolean; +/** + * argument is promise or other + * + * @param {unknown} obj + * @returns boolean + */ +declare const isPromise: (obj: unknown) => obj is Promise; +/** + * Try async monad + * + * @returns Promise> + */ +declare function Try(asyncblock: () => Promise, finallyInput?: () => void): Promise>; +declare function Try(block: () => T): Result; +/** + * argument is promise or other + * + * @param {number|undefined} created_at + * @returns Date | undefined + */ +declare const convertTimestampToDateTime: (created_at: number | undefined) => Date | undefined; +/** + * Get unix timestamp + * + * @returns number + */ +declare const unixTimestamp: () => number; + +/** + * 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 + */ +declare namespace Account$3 { + namespace Associated { + /** + * Retry function if create new token accouint + * + * @param {Pubkey} mint + * @param {Pubkey} owner + * @param {Secret} feePayer + * @returns Promise + */ + const retryGetOrCreate: (mint: Pubkey, owner: Pubkey, feePayer: Secret) => Promise; + /** + * [Main logic]Get Associated token Account. + * if not created, create new token accouint + * + * @param {Pubkey} mint + * @param {Pubkey} owner + * @param {Pubkey} feePayer + * @returns Promise + */ + const makeOrCreateInstruction: (mint: Pubkey, owner: Pubkey, feePayer?: Pubkey, allowOwnerOffCurve?: boolean) => Promise<{ + tokenAccount: string; + inst: TransactionInstruction | undefined; + }>; + } +} + +declare namespace Account$2 { + class Keypair { + secret: Secret; + pubkey: Pubkey; + constructor(params: { + pubkey?: Pubkey; + secret: Secret; + }); + toPublicKey(): PublicKey; + toKeypair(): Keypair; + static isPubkey: (value: string) => value is Pubkey; + static isSecret: (value: string) => value is Secret; + static create: () => Keypair; + static toKeyPair: (keypair: Keypair) => Keypair; + } +} + +declare namespace Account$1 { + namespace Pda { + const getMetadata: (address: Pubkey) => PublicKey; + const getMasterEdition: (address: Pubkey) => PublicKey; + const getTreeAuthority: (address: Pubkey) => PublicKey; + const getBgumSigner: () => PublicKey; + const getAssetId: (address: Pubkey, leafIndex: number) => Pubkey; + } +} + +declare const Account: { + Pda: typeof Account$1.Pda; + Keypair: typeof Account$2.Keypair; + Associated: typeof Account$3.Associated; +}; + +declare namespace Node { + const getConnection: () => Connection; + const changeConnection: (param: { + cluster?: string; + commitment?: Commitment; + customClusterUrl?: string[]; + }) => void; + const confirmedSig: (signature: string, commitment?: Commitment) => Promise, Error> | Result.Err<_solana_web3_js.RpcResponseAndContext<_solana_web3_js.SignatureResult>, Error> | Result.Ok | Result.Err>; +} + +type Condition = 'overMax' | 'underMin'; +interface Limit { + threshold: number; + condition: Condition; +} +interface Details { + key: string; + message: string; + actual: string | number; + limit?: Limit; +} + +type bignum = number | BN; +declare enum UseMethod { + Burn = 0, + Multiple = 1, + Single = 2 +} +type Uses = { + useMethod: UseMethod; + remaining: bignum; + total: bignum; +}; +type InputCreators = { + address: Pubkey; + secret: Secret; + share: number; +}; + +type FileType = string | File; + +type StorageType = 'nftStorage' | 'arweave' | string; +type Offchain = { + name?: string; + symbol?: string; + description?: string; + seller_fee_basis_points?: number; + image?: string; + external_url?: string; + attributes?: Attribute[]; + properties?: Properties; + collection?: { + name?: string; + family?: string; + [key: string]: unknown; + }; + collectionDetails?: { + kind: string; + size: number; + }; + created_at?: number; +}; +type Properties = { + creators?: { + address?: string; + share?: number; + [key: string]: unknown; + }[]; + files?: { + type?: string; + filePath?: FileType; + [key: string]: unknown; + }[]; + [key: string]: unknown; +}; +type Attribute = { + trait_type?: string; + value?: string; + [key: string]: unknown; +}; + +type InputCollection = Pubkey; +type Options = { + [key: string]: unknown; +}; +type InputNftMetadata = { + name: string; + symbol: string; + royalty?: number; + storageType?: StorageType; + filePath?: FileType; + uri?: string; + isMutable?: boolean; + description?: string; + external_url?: string; + attributes?: Attribute[]; + properties?: Properties; + maxSupply?: bignum; + creators?: InputCreators[]; + uses?: Uses; + collection?: InputCollection; + options?: Options; +}; + +declare namespace Validator { + export namespace Message { + const SUCCESS = "success"; + const SMALL_NUMBER = "too small"; + const BIG_NUMBER = "too big"; + const LONG_LENGTH = "too long"; + const EMPTY = "invalid empty value"; + const INVALID_URL = "invalid url"; + const ONLY_NODE_JS = "`string` type is only Node.js"; + } + export const NAME_LENGTH = 32; + export const SYMBOL_LENGTH = 10; + export const URL_LENGTH = 200; + export const ROYALTY_MAX = 100; + export const SELLER_FEE_BASIS_POINTS_MAX = 10000; + export const ROYALTY_MIN = 0; + export const isRoyalty: (royalty: number) => Result; + export const isSellerFeeBasisPoints: (royalty: number) => Result; + export const isName: (name: string) => Result; + export const isSymbol: (symbol: string) => Result; + export const isImageUrl: (image: string) => Result; + export const checkAll: (metadata: T) => Result; + type PickNftStorage = Pick; + type PickNftStorageMetaplex = Pick; + type PickMetaplex = Pick; + export {}; +} +declare class ValidatorError extends Error { + details: Details[]; + constructor(message: string, details: Details[]); +} + +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; +}; + +export { Account as A, Explorer as E, KeypairAccount as K, Node as N, OwnerInfo as O, Pubkey as P, Result as R, Secret as S, Try as T, Validator as V, isNode as a, bufferToArray as b, isPromise as c, debugLog as d, convertTimestampToDateTime as e, ValidatorError as f, ExplorerOptions as g, isBrowser as i, overwriteObject as o, sleep as s, unixTimestamp as u }; diff --git a/packages/suite-utils/dist/exports.d.mts b/packages/suite-utils/dist/exports.d.mts new file mode 100644 index 000000000..b37d67968 --- /dev/null +++ b/packages/suite-utils/dist/exports.d.mts @@ -0,0 +1,4 @@ +export { A as Account, E as Explorer, g as ExplorerOptions, K as KeypairAccount, N as Node, O as OwnerInfo, P as Pubkey, S as Secret, T as Try, V as Validator, f as ValidatorError, b as bufferToArray, e as convertTimestampToDateTime, d as debugLog, i as isBrowser, a as isNode, c as isPromise, o as overwriteObject, s as sleep, u as unixTimestamp } from './exports-8dfab8bf.js'; +import '@solana/web3.js'; +import 'bn.js'; +import '@metaplex-foundation/mpl-token-metadata'; diff --git a/packages/suite-utils/dist/exports.d.ts b/packages/suite-utils/dist/exports.d.ts new file mode 100644 index 000000000..b37d67968 --- /dev/null +++ b/packages/suite-utils/dist/exports.d.ts @@ -0,0 +1,4 @@ +export { A as Account, E as Explorer, g as ExplorerOptions, K as KeypairAccount, N as Node, O as OwnerInfo, P as Pubkey, S as Secret, T as Try, V as Validator, f as ValidatorError, b as bufferToArray, e as convertTimestampToDateTime, d as debugLog, i as isBrowser, a as isNode, c as isPromise, o as overwriteObject, s as sleep, u as unixTimestamp } from './exports-8dfab8bf.js'; +import '@solana/web3.js'; +import 'bn.js'; +import '@metaplex-foundation/mpl-token-metadata'; diff --git a/packages/suite-utils/dist/exports.js b/packages/suite-utils/dist/exports.js new file mode 100644 index 000000000..060b74b8e --- /dev/null +++ b/packages/suite-utils/dist/exports.js @@ -0,0 +1,1581 @@ +"use strict"; +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/exports.ts +var exports_exports = {}; +__export(exports_exports, { + Account: () => Account4, + Explorer: () => Explorer, + Node: () => Node, + Try: () => Try, + Validator: () => Validator, + ValidatorError: () => ValidatorError, + bufferToArray: () => bufferToArray, + convertTimestampToDateTime: () => convertTimestampToDateTime, + debugLog: () => debugLog, + isBrowser: () => isBrowser, + isNode: () => isNode, + isPromise: () => isPromise, + overwriteObject: () => overwriteObject, + sleep: () => sleep, + unixTimestamp: () => unixTimestamp +}); +module.exports = __toCommonJS(exports_exports); + +// src/constants.ts +var import_web3 = require("@solana/web3.js"); +var import_load = __toESM(require("@solana-suite/config/load")); +var Config = import_load.default; +var Constants; +((Constants2) => { + let WarnningMessage; + ((WarnningMessage2) => { + const THRESHHOLD = 50; + let isDisplay = false; + WarnningMessage2.NFT_STORAGE_API_KEY = ` + [YOU HAVE TO DO] + -------------------------------------- + You need to update nftStorageApiKey define parameter in solana-suite.json. + Can get api key from https://nft.storage/ + -------------------------------------- + `; + WarnningMessage2.DAS_API_URL = ` + [YOU HAVE TO DO] + -------------------------------------- + You need to update dasApiUrl define parameter in solana-suite.json. + can get api url from https://www.helius.dev/ + -------------------------------------- + `; + WarnningMessage2.ANNOUNCE = ` + [DEPRECATED] + -------------------------------------- + Account, Node, toExplorer, Pubkey, Secret have been moved to + @solana-suite/utils + ------------------------------------- + `; + WarnningMessage2.calculateProbability = () => { + const randomValue = Math.random(); + const probability = 1 / THRESHHOLD; + if (!isDisplay && randomValue < probability) { + isDisplay = true; + return true; + } + return false; + }; + })(WarnningMessage = Constants2.WarnningMessage || (Constants2.WarnningMessage = {})); +})(Constants || (Constants = {})); +((Constants2) => { + Constants2.currentCluster = Config.cluster.type; + Constants2.customClusterUrl = Config.cluster.customClusterUrl; + Constants2.isDebugging = Config.debugging; + Constants2.nftStorageApiKey = Config.nftStorageApiKey; + Constants2.dasApiUrl = Config.dasApiUrl; + let Cluster; + ((Cluster2) => { + Cluster2["prd"] = "mainnet-beta"; + Cluster2["prdMetaplex"] = "mainnet-beta-metaplex"; + Cluster2["dev"] = "devnet"; + Cluster2["test"] = "testnet"; + Cluster2["localhost"] = "localhost-devnet"; + })(Cluster = Constants2.Cluster || (Constants2.Cluster = {})); + let EndPointUrl; + ((EndPointUrl2) => { + EndPointUrl2["prd"] = "https://api.mainnet-beta.solana.com"; + EndPointUrl2["prdMetaplex"] = "https://api.metaplex.solana.com"; + EndPointUrl2["dev"] = "https://api.devnet.solana.com"; + EndPointUrl2["test"] = "https://api.testnet.solana.com"; + EndPointUrl2["localhost"] = "http://api.devnet.solana.com"; + })(EndPointUrl = Constants2.EndPointUrl || (Constants2.EndPointUrl = {})); + let BundlrUrl; + ((BundlrUrl2) => { + BundlrUrl2["prd"] = "https://node1.irys.xyz,https://node2.irys.xyz"; + BundlrUrl2["dev"] = "https://devnet.irys.xyz"; + })(BundlrUrl = Constants2.BundlrUrl || (Constants2.BundlrUrl = {})); + let DasApiUrl; + ((DasApiUrl2) => { + DasApiUrl2["dev"] = "https://devnet.helius-rpc.com/?api-key=15319bf4-5b40-4958-ac8d-6313aa55eb92,https://rpc-devnet.helius.xyz?api-key=9f70a843-3274-4ffd-a0a9-323f8b7c0639"; + })(DasApiUrl = Constants2.DasApiUrl || (Constants2.DasApiUrl = {})); + let NftstorageApiKey; + ((NftstorageApiKey2) => { + NftstorageApiKey2["dev"] = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJkaWQ6ZXRocjoweERGMjcyN2VkODZhRGU1RTMyZDZDZEJlODc0YzRFNDlEODY1OWZmOEMiLCJpc3MiOiJuZnQtc3RvcmFnZSIsImlhdCI6MTYyMDI2NDk0MzcwNiwibmFtZSI6ImRlbW8ifQ.d4J70mikxRB8a5vwNu6SO5HDA8JaueuseAj7Q_ytMCE"; + })(NftstorageApiKey = Constants2.NftstorageApiKey || (Constants2.NftstorageApiKey = {})); + Constants2.loadConfig = async () => { + Config = await import("@solana-suite/config/load"); + }; + Constants2.switchCluster = (param) => { + const { cluster: env, customClusterUrl: customClusterUrl2 } = param; + if (customClusterUrl2 && customClusterUrl2.length > 0) { + const index = Date.now() % customClusterUrl2.length; + return customClusterUrl2[index]; + } + switch (env) { + case "mainnet-beta" /* prd */: + return "https://api.mainnet-beta.solana.com" /* prd */; + case "mainnet-beta-metaplex" /* prdMetaplex */: + return "https://api.metaplex.solana.com" /* prdMetaplex */; + case "testnet" /* test */: + return "https://api.testnet.solana.com" /* test */; + case "devnet" /* dev */: + return "https://api.devnet.solana.com" /* dev */; + default: + return "http://api.devnet.solana.com" /* localhost */; + } + }; + Constants2.switchBundlr = (env) => { + switch (env) { + case "mainnet-beta" /* prd */: { + const urls = "https://node1.irys.xyz,https://node2.irys.xyz" /* prd */.split(","); + const index = Date.now() % urls.length; + return urls[index]; + } + default: { + return "https://devnet.irys.xyz" /* dev */; + } + } + }; + Constants2.switchDasApi = (env) => { + switch (env) { + case "mainnet-beta" /* prd */: { + if (Constants2.dasApiUrl.length < 1) { + throw Error(Constants2.WarnningMessage.DAS_API_URL); + } + const urls = "https://node1.irys.xyz,https://node2.irys.xyz" /* prd */.split(","); + const index = Date.now() % urls.length; + return urls[index]; + } + default: { + const urls = "https://devnet.helius-rpc.com/?api-key=15319bf4-5b40-4958-ac8d-6313aa55eb92,https://rpc-devnet.helius.xyz?api-key=9f70a843-3274-4ffd-a0a9-323f8b7c0639" /* dev */.split(","); + const index = Date.now() % urls.length; + return urls[index]; + } + } + }; + Constants2.switchNftStorage = (env) => { + switch (env) { + case "mainnet-beta" /* prd */: + if (!Constants2.nftStorageApiKey) { + throw Error(Constants2.WarnningMessage.NFT_STORAGE_API_KEY); + } + return Constants2.nftStorageApiKey; + default: { + return "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJkaWQ6ZXRocjoweERGMjcyN2VkODZhRGU1RTMyZDZDZEJlODc0YzRFNDlEODY1OWZmOEMiLCJpc3MiOiJuZnQtc3RvcmFnZSIsImlhdCI6MTYyMDI2NDk0MzcwNiwibmFtZSI6ImRlbW8ifQ.d4J70mikxRB8a5vwNu6SO5HDA8JaueuseAj7Q_ytMCE" /* dev */; + } + } + }; + Constants2.WRAPPED_TOKEN_PROGRAM_ID = new import_web3.PublicKey( + "So11111111111111111111111111111111111111112" + ); + Constants2.MEMO_PROGRAM_ID = new import_web3.PublicKey( + "Memo1UhkJRfHyvLMcVucJwxXeuD728EqVDDwQDxFMNo" + ); + Constants2.METAPLEX_PROGRAM_ID = new import_web3.PublicKey( + "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s" + ); + Constants2.COMMITMENT = "confirmed"; + Constants2.NFT_STORAGE_GATEWAY_URL = "https://ipfs.io/ipfs"; + Constants2.IRYS_GATEWAY_URL = "https://gateway.irys.xyz"; + Constants2.BUNDLR_NETWORK_URL = (0, Constants2.switchBundlr)(Config.cluster.type); + Constants2.DAS_API_URL = (0, Constants2.switchDasApi)(Config.cluster.type); + Constants2.NFT_STORAGE_API_KEY = (0, Constants2.switchNftStorage)(Config.cluster.type); + Constants2.EXPLORER_SOLSCAN_URL = "https://solscan.io"; + Constants2.EXPLORER_SOLANAFM_URL = "https://solana.fm"; + Constants2.EXPLORER_XRAY_URL = "https://xray.helius.xyz"; +})(Constants || (Constants = {})); +console.log(Constants.WarnningMessage.ANNOUNCE); + +// ../transaction-builder/src/batch.ts +var import_web37 = require("@solana/web3.js"); + +// ../types/src/global/index.ts +var Explorer = /* @__PURE__ */ ((Explorer2) => { + Explorer2["Solscan"] = "solscan"; + Explorer2["SolanaFM"] = "solanafm"; + Explorer2["Xray"] = "xray"; + return Explorer2; +})(Explorer || {}); + +// ../global/src/index.ts +var import_web34 = require("@solana/web3.js"); + +// ../account/src/associated.ts +var import_spl_token = require("@solana/spl-token"); + +// ../account/src/keypair.ts +var import_web32 = require("@solana/web3.js"); +var import_bs58 = __toESM(require("bs58")); +var Account; +((Account5) => { + class Keypair4 { + secret; + pubkey; + constructor(params) { + if (!params.pubkey) { + const keypair = params.secret.toKeypair(); + this.pubkey = keypair.publicKey.toString(); + } else { + this.pubkey = params.pubkey; + } + this.secret = params.secret; + } + toPublicKey() { + return new import_web32.PublicKey(this.pubkey); + } + toKeypair() { + const decoded = import_bs58.default.decode(this.secret); + return import_web32.Keypair.fromSecretKey(decoded); + } + static isPubkey = (value) => /^[0-9a-zA-Z]{32,44}$/.test(value); + static isSecret = (value) => /^[0-9a-zA-Z]{87,88}$/.test(value); + static create = () => { + const keypair = import_web32.Keypair.generate(); + return new Keypair4({ + pubkey: keypair.publicKey.toString(), + secret: import_bs58.default.encode(keypair.secretKey) + }); + }; + static toKeyPair = (keypair) => { + return new Keypair4({ + pubkey: keypair.publicKey.toString(), + secret: import_bs58.default.encode(keypair.secretKey) + }); + }; + } + Account5.Keypair = Keypair4; +})(Account || (Account = {})); + +// ../account/src/associated.ts +var Account2; +((Account5) => { + let Associated; + ((Associated2) => { + const RETRY_OVER_LIMIT = 10; + const RETRY_SLEEP_TIME = 3; + const get = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { + const res = await (0, Associated2.makeOrCreateInstruction)( + mint, + owner, + new Account.Keypair({ secret: feePayer }).pubkey, + allowOwnerOffCurve + ); + if (!res.inst) { + return res.tokenAccount; + } + return new TransactionBuilder.Common( + [res.inst], + [], + feePayer.toKeypair(), + res.tokenAccount + ); + }; + Associated2.retryGetOrCreate = async (mint, owner, feePayer) => { + let counter = 1; + while (counter < RETRY_OVER_LIMIT) { + try { + const inst = await get(mint, owner, feePayer, true); + if (inst && typeof inst === "string") { + debugLog("# associatedTokenAccount: ", inst); + return inst; + } else if (inst instanceof TransactionBuilder.Common) { + (await inst.submit()).map( + async (ok) => { + await Node.confirmedSig(ok); + return inst.data; + }, + (err) => { + debugLog("# Error submit retryGetOrCreate: ", err); + throw err; + } + ); + } + } catch (e) { + debugLog(`# retry: ${counter} create token account: `, e); + debugLog(`# mint: ${mint}, owner: ${owner}, feePayer: ${feePayer}`); + } + await sleep(RETRY_SLEEP_TIME); + counter++; + } + throw Error(`retry action is over limit ${RETRY_OVER_LIMIT}`); + }; + Associated2.makeOrCreateInstruction = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { + const associatedTokenAccount = (0, import_spl_token.getAssociatedTokenAddressSync)( + mint.toPublicKey(), + owner.toPublicKey(), + allowOwnerOffCurve, + import_spl_token.TOKEN_PROGRAM_ID, + import_spl_token.ASSOCIATED_TOKEN_PROGRAM_ID + ); + debugLog("# associatedTokenAccount: ", associatedTokenAccount.toString()); + try { + await (0, import_spl_token.getAccount)( + Node.getConnection(), + associatedTokenAccount, + Node.getConnection().commitment, + import_spl_token.TOKEN_PROGRAM_ID + ); + return { + tokenAccount: associatedTokenAccount.toString(), + inst: void 0 + }; + } catch (error) { + if (!(error instanceof import_spl_token.TokenAccountNotFoundError) && !(error instanceof import_spl_token.TokenInvalidAccountOwnerError)) { + throw Error("Unexpected error"); + } + const payer = !feePayer ? owner : feePayer; + const inst = (0, import_spl_token.createAssociatedTokenAccountInstruction)( + payer.toPublicKey(), + associatedTokenAccount, + owner.toPublicKey(), + mint.toPublicKey(), + import_spl_token.TOKEN_PROGRAM_ID, + import_spl_token.ASSOCIATED_TOKEN_PROGRAM_ID + ); + return { + tokenAccount: associatedTokenAccount.toString(), + inst + }; + } + }; + })(Associated = Account5.Associated || (Account5.Associated = {})); +})(Account2 || (Account2 = {})); + +// ../account/src/pda.ts +var import_web33 = require("@solana/web3.js"); +var import_mpl_token_metadata = require("@metaplex-foundation/mpl-token-metadata"); +var import_mpl_bubblegum = require("@metaplex-foundation/mpl-bubblegum"); +var import_bn = __toESM(require("bn.js")); +var Account3; +((Account5) => { + let Pda; + ((Pda2) => { + Pda2.getMetadata = (address) => { + const [publicKey] = import_web33.PublicKey.findProgramAddressSync( + [ + Buffer.from("metadata"), + import_mpl_token_metadata.PROGRAM_ID.toBuffer(), + address.toPublicKey().toBuffer() + ], + import_mpl_token_metadata.PROGRAM_ID + ); + return publicKey; + }; + Pda2.getMasterEdition = (address) => { + const [publicKey] = import_web33.PublicKey.findProgramAddressSync( + [ + Buffer.from("metadata"), + import_mpl_token_metadata.PROGRAM_ID.toBuffer(), + address.toPublicKey().toBuffer(), + Buffer.from("edition") + ], + import_mpl_token_metadata.PROGRAM_ID + ); + return publicKey; + }; + Pda2.getTreeAuthority = (address) => { + const [publicKey] = import_web33.PublicKey.findProgramAddressSync( + [address.toPublicKey().toBuffer()], + import_mpl_bubblegum.MPL_BUBBLEGUM_PROGRAM_ID.toPublicKey() + ); + return publicKey; + }; + Pda2.getBgumSigner = () => { + const [publicKey] = import_web33.PublicKey.findProgramAddressSync( + [Buffer.from("collection_cpi", "utf8")], + import_mpl_bubblegum.MPL_BUBBLEGUM_PROGRAM_ID.toPublicKey() + ); + return publicKey; + }; + Pda2.getAssetId = (address, leafIndex) => { + const node = new import_bn.default.BN(leafIndex); + const [assetId] = import_web33.PublicKey.findProgramAddressSync( + [ + Buffer.from("asset", "utf8"), + address.toPublicKey().toBuffer(), + Uint8Array.from(node.toArray("le", 8)) + ], + import_mpl_bubblegum.MPL_BUBBLEGUM_PROGRAM_ID.toPublicKey() + ); + return assetId.toString(); + }; + })(Pda = Account5.Pda || (Account5.Pda = {})); +})(Account3 || (Account3 = {})); + +// ../account/src/index.ts +var Account4 = { + ...Account2, + ...Account, + ...Account3 +}; + +// ../global/src/index.ts +var import_bignumber = require("bignumber.js"); +var import_bs582 = __toESM(require("bs58")); +String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, options = {}) { + const endPointUrl = Node.getConnection().rpcEndpoint; + debugLog("# toExplorerUrl rpcEndpoint:", endPointUrl); + let cluster = ""; + if (endPointUrl === Constants.EndPointUrl.prd) { + cluster = Constants.Cluster.prd; + } else if (endPointUrl === Constants.EndPointUrl.test) { + cluster = Constants.Cluster.test; + } else if (endPointUrl === Constants.EndPointUrl.dev) { + cluster = Constants.Cluster.dev; + } else { + cluster = Constants.Cluster.dev; + } + const addressOrSignature = this.toString(); + let url = ""; + if (options.replacePath) { + if (explorer === "solanafm" /* SolanaFM */) { + url = `${Constants.EXPLORER_SOLANAFM_URL}/${options.replacePath}/${addressOrSignature}?cluster=${cluster}`; + } else if (explorer === "xray" /* Xray */) { + url = `${Constants.EXPLORER_XRAY_URL}/${options.replacePath}/${addressOrSignature}?network=${cluster}`; + } else { + url = `${Constants.EXPLORER_SOLSCAN_URL}/${options.replacePath}/${addressOrSignature}?cluster=${cluster}`; + } + return url; + } + if (Account4.Keypair.isPubkey(addressOrSignature)) { + if (explorer === "solanafm" /* SolanaFM */) { + url = `${Constants.EXPLORER_SOLANAFM_URL}/address/${addressOrSignature}?cluster=${cluster}`; + } else if (explorer === "xray" /* Xray */) { + url = `${Constants.EXPLORER_XRAY_URL}/account/${addressOrSignature}?network=${cluster}`; + } else { + url = `${Constants.EXPLORER_SOLSCAN_URL}/account/${addressOrSignature}?cluster=${cluster}`; + } + } else { + if (explorer === "solanafm" /* SolanaFM */) { + url = `${Constants.EXPLORER_SOLANAFM_URL}/tx/${addressOrSignature}?cluster=${cluster}`; + } else if (explorer === "xray" /* Xray */) { + url = `${Constants.EXPLORER_XRAY_URL}/tx/${addressOrSignature}?network=${cluster}`; + } else { + url = `${Constants.EXPLORER_SOLSCAN_URL}/tx/${addressOrSignature}?cluster=${cluster}`; + } + } + return url; +}; +String.prototype.toPublicKey = function() { + if (!Account4.Keypair.isPubkey(this.toString())) { + throw Error(`No match KeyPair.PubKey: ${this.toString()}`); + } + return new import_web34.PublicKey(this.toString()); +}; +String.prototype.toKeypair = function() { + if (!Account4.Keypair.isSecret(this.toString())) { + throw Error(`No match KeyPair.Secret: ${this.toString()}`); + } + const decoded = import_bs582.default.decode(this.toString()); + return import_web34.Keypair.fromSecretKey(decoded); +}; +Number.prototype.toSol = function() { + return (0, import_bignumber.BigNumber)(this).div(import_web34.LAMPORTS_PER_SOL).toNumber(); +}; +Number.prototype.toLamports = function() { + return (0, import_bignumber.BigNumber)(this).times(import_web34.LAMPORTS_PER_SOL).toNumber(); +}; + +// ../node/src/index.ts +var import_web35 = require("@solana/web3.js"); +var Node; +((Node2) => { + const setted = { + clusterUrl: "", + commitment: Constants.COMMITMENT, + customClusterUrl: [] + }; + Node2.getConnection = () => { + if (setted.customClusterUrl.length > 0) { + setted.clusterUrl = Constants.switchCluster({ + customClusterUrl: setted.customClusterUrl + }); + } else if (Constants.customClusterUrl.length > 0) { + setted.clusterUrl = Constants.switchCluster({ + customClusterUrl: Constants.customClusterUrl + }); + } else if (!setted.clusterUrl) { + setted.clusterUrl = Constants.switchCluster({ + cluster: Constants.currentCluster + }); + } + if (!setted.commitment) { + setted.commitment = Constants.COMMITMENT; + } + return new import_web35.Connection(setted.clusterUrl, setted.commitment); + }; + Node2.changeConnection = (param) => { + setted.clusterUrl = ""; + setted.customClusterUrl = []; + setted.commitment = Constants.COMMITMENT; + const { cluster, commitment, customClusterUrl } = param; + if (commitment) { + setted.commitment = commitment; + debugLog("# Node change commitment: ", setted.commitment); + } + if (cluster) { + setted.clusterUrl = Constants.switchCluster({ cluster }); + debugLog("# Node change clusterUrl: ", setted.clusterUrl); + } + if (customClusterUrl) { + debugLog("# customClusterUrl: ", customClusterUrl); + setted.clusterUrl = Constants.switchCluster({ customClusterUrl }); + setted.customClusterUrl = customClusterUrl; + debugLog( + "# Node change cluster, custom cluster url: ", + setted.clusterUrl + ); + } + }; + Node2.confirmedSig = async (signature, commitment = Constants.COMMITMENT) => { + const connection = Node2.getConnection(); + const latestBlockhash = await connection.getLatestBlockhash(); + return await connection.confirmTransaction( + { + blockhash: latestBlockhash.blockhash, + lastValidBlockHeight: latestBlockhash.lastValidBlockHeight, + signature + }, + commitment + ).then(Result.ok).catch(Result.err); + }; +})(Node || (Node = {})); + +// ../transaction-builder/src/common.ts +var import_web36 = require("@solana/web3.js"); +var MAX_RETRIES = 3; +var TransactionBuilder2; +((TransactionBuilder7) => { + class Common2 { + static MAX_TRANSACTION_SIZE = 1232; + instructions; + signers; + feePayer; + data; + constructor(instructions, signers, feePayer, data) { + this.instructions = instructions; + this.signers = signers; + this.feePayer = feePayer; + this.data = data; + } + submit = async () => { + return Try(async () => { + if (!(this instanceof Common2)) { + throw Error("only Instruction object that can use this"); + } + const transaction = new import_web36.Transaction(); + const blockhashObj = await Node.getConnection().getLatestBlockhash(); + transaction.lastValidBlockHeight = blockhashObj.lastValidBlockHeight; + transaction.recentBlockhash = blockhashObj.blockhash; + let finalSigners = this.signers; + if (this.feePayer) { + transaction.feePayer = this.feePayer.publicKey; + finalSigners = [this.feePayer, ...this.signers]; + } + this.instructions.forEach((inst) => transaction.add(inst)); + const options = { + maxRetries: MAX_RETRIES + }; + return await (0, import_web36.sendAndConfirmTransaction)( + Node.getConnection(), + transaction, + finalSigners, + options + ); + }); + }; + } + TransactionBuilder7.Common = Common2; +})(TransactionBuilder2 || (TransactionBuilder2 = {})); + +// ../transaction-builder/src/batch.ts +var TransactionBuilder3; +((TransactionBuilder7) => { + class Batch { + submit = async (arr) => { + return Try(async () => { + let i = 0; + for (const a of arr) { + if (!a.instructions && !a.signers) { + throw Error( + `only Instruction object that can use batchSubmit(). + Index: ${i}, Set value: ${JSON.stringify(a)}` + ); + } + i++; + } + const instructions = arr.flatMap((a) => a.instructions); + const signers = arr.flatMap((a) => a.signers); + const feePayers = arr.filter((a) => a.feePayer !== void 0); + let feePayer = signers[0]; + if (feePayers.length > 0 && feePayers[0].feePayer) { + feePayer = feePayers[0].feePayer; + } + const transaction = new import_web37.Transaction(); + let finalSigners = signers; + if (feePayer) { + transaction.feePayer = feePayer.publicKey; + finalSigners = [feePayer, ...signers]; + } + instructions.map((inst) => transaction.add(inst)); + const options = { + maxRetries: MAX_RETRIES + }; + return await (0, import_web37.sendAndConfirmTransaction)( + Node.getConnection(), + transaction, + finalSigners, + options + ); + }); + }; + } + TransactionBuilder7.Batch = Batch; +})(TransactionBuilder3 || (TransactionBuilder3 = {})); + +// ../transaction-builder/src/mint.ts +var import_web38 = require("@solana/web3.js"); +var TransactionBuilder4; +((TransactionBuilder7) => { + class Mint { + instructions; + signers; + feePayer; + data; + constructor(instructions, signers, feePayer, data) { + this.instructions = instructions; + this.signers = signers; + this.data = data; + this.feePayer = feePayer; + } + submit = async () => { + return Try(async () => { + if (!(this instanceof Mint)) { + throw Error("only MintInstruction object that can use this"); + } + const transaction = new import_web38.Transaction(); + const blockhashObj = await Node.getConnection().getLatestBlockhash(); + transaction.lastValidBlockHeight = blockhashObj.lastValidBlockHeight; + transaction.recentBlockhash = blockhashObj.blockhash; + let finalSigners = this.signers; + if (this.feePayer) { + transaction.feePayer = this.feePayer.publicKey; + finalSigners = [this.feePayer, ...this.signers]; + } + this.instructions.forEach((inst) => transaction.add(inst)); + const options = { + maxRetries: MAX_RETRIES + }; + if (Node.getConnection().rpcEndpoint === Constants.EndPointUrl.prd) { + debugLog("# Change metaplex cluster on mainnet-beta"); + Node.changeConnection({ cluster: Constants.Cluster.prdMetaplex }); + } + return await (0, import_web38.sendAndConfirmTransaction)( + Node.getConnection(), + transaction, + finalSigners, + options + ); + }); + }; + } + TransactionBuilder7.Mint = Mint; +})(TransactionBuilder4 || (TransactionBuilder4 = {})); + +// ../transaction-builder/src/partial-sign.ts +var import_web39 = require("@solana/web3.js"); +var TransactionBuilder5; +((TransactionBuilder7) => { + class PartialSign { + hexInstruction; + data; + canSubmit; + constructor(instructions, mint, canSubmit = false) { + this.hexInstruction = instructions; + this.data = mint; + this.canSubmit = canSubmit; + } + submit = async (feePayer) => { + return Try(async () => { + if (!(this instanceof PartialSign)) { + throw Error("only PartialSignInstruction object that can use this"); + } + const decode = Buffer.from(this.hexInstruction, "hex"); + const transactionFromJson = import_web39.Transaction.from(decode); + transactionFromJson.partialSign(feePayer.toKeypair()); + const options = { + maxRetries: MAX_RETRIES + }; + const wireTransaction = transactionFromJson.serialize(); + return await Node.getConnection().sendRawTransaction( + wireTransaction, + options + ); + }); + }; + } + TransactionBuilder7.PartialSign = PartialSign; +})(TransactionBuilder5 || (TransactionBuilder5 = {})); + +// ../transaction-builder/src/calculate-txsize.ts +var TransactionBuilder6; +((TransactionBuilder7) => { + const LOW_VALUE = 127; + const HIGH_VALUE = 16383; + const MAX_TRANSACTION_SIZE = 1232; + const compactHeader = (n) => n <= LOW_VALUE ? 1 : n <= HIGH_VALUE ? 2 : 3; + const compactArraySize = (n, size) => compactHeader(n) + n * size; + TransactionBuilder7.calculateTxSize = (transaction, feePayer) => { + const feePayerPk = [feePayer.toBase58()]; + const signers = new Set(feePayerPk); + const accounts = new Set(feePayerPk); + const ixsSize = transaction.instructions.reduce((acc, ix) => { + ix.keys.forEach(({ pubkey, isSigner }) => { + const pk = pubkey.toBase58(); + if (isSigner) + signers.add(pk); + accounts.add(pk); + }); + accounts.add(ix.programId.toBase58()); + const nIndexes = ix.keys.length; + const opaqueData = ix.data.length; + return acc + 1 + // PID index + compactArraySize(nIndexes, 1) + compactArraySize(opaqueData, 1); + }, 0); + return compactArraySize(signers.size, 64) + // signatures + 3 + // header + compactArraySize(accounts.size, 32) + // accounts + 32 + // blockhash + compactHeader(transaction.instructions.length) + // instructions + ixsSize; + }; + TransactionBuilder7.isOverTransactionSize = (transaction, feePayer) => { + return (0, TransactionBuilder7.calculateTxSize)(transaction, feePayer) > MAX_TRANSACTION_SIZE; + }; +})(TransactionBuilder6 || (TransactionBuilder6 = {})); + +// ../transaction-builder/src/index.ts +var TransactionBuilder = { + ...TransactionBuilder3, + ...TransactionBuilder6, + ...TransactionBuilder4, + ...TransactionBuilder2, + ...TransactionBuilder5 +}; + +// src/result.ts +var AbstractResult = class { + unwrap(ok, err) { + const r = this._chain( + (value) => Result.ok(ok ? ok(value) : value), + (error) => err ? Result.ok(err(error)) : Result.err(error) + ); + if (r.isErr) { + throw r.error; + } + return r.value; + } + map(ok, err) { + return this._chain( + (value) => Result.ok(ok(value)), + (error) => Result.err(err ? err(error) : error) + ); + } + chain(ok, err) { + return this._chain(ok, err || ((error) => Result.err(error))); + } + match(ok, err) { + this._chain( + (value) => Result.ok(ok(value)), + (error) => Result.err(err(error)) + ); + } + /// single TransactionBuilder //// + /* eslint-disable @typescript-eslint/no-explicit-any */ + async submit(feePayer) { + const res = this.map( + async (ok) => { + debugLog("# result single submit: ", ok); + if (feePayer) { + const obj = ok; + return await obj.submit(feePayer); + } else { + const obj = ok; + return await obj.submit(); + } + }, + (err) => { + return err; + } + ); + if (res.isErr) { + return Result.err(res.error); + } + return res.value; + } +}; +Array.prototype.submit = async function(feePayer) { + if (feePayer) { + let i = 1; + for await (const obj of this) { + if (obj.isErr) { + return obj; + } else if (obj.value.canSubmit) { + debugLog("# Result batch canSubmit"); + const sig = await obj.submit(feePayer); + if (sig.isErr) { + return sig; + } + await Node.confirmedSig(sig.value); + } else { + debugLog("# Result batch other than canSubmit"); + if (this.length == i) { + return obj.submit(feePayer); + } + obj.submit(feePayer); + } + i++; + } + } else { + const instructions = []; + for (const obj of this) { + if (obj.isErr) { + return obj; + } else if (obj.isOk) { + instructions.push(obj.value); + } else { + return Result.err(Error("Only Array Instruction object")); + } + } + debugLog("# Result batch submit: ", instructions); + return new TransactionBuilder.Batch().submit(instructions); + } +}; +var InternalOk = class extends AbstractResult { + constructor(value) { + super(); + this.value = value; + } + isOk = true; + isErr = false; + /* eslint-disable @typescript-eslint/no-unused-vars */ + _chain(ok, _err) { + return ok(this.value); + } +}; +var InternalErr = class extends AbstractResult { + constructor(error) { + super(); + this.error = error; + } + isOk = false; + isErr = true; + _chain(_ok, err) { + return err(this.error); + } +}; +var Result; +((Result8) => { + function ok(value) { + return new InternalOk(value); + } + Result8.ok = ok; + function err(error) { + return new InternalErr(error || Error()); + } + Result8.err = err; + function all(obj) { + if (Array.isArray(obj)) { + const resArr = []; + for (const item of obj) { + if (item.isErr) { + return item; + } + resArr.push(item.value); + } + return Result8.ok(resArr); + } + const res = {}; + const keys = Object.keys(obj); + for (const key of keys) { + const item = obj[key]; + if (item.isErr) { + return item; + } + res[key] = item.value; + } + return Result8.ok(res); + } + Result8.all = all; +})(Result || (Result = {})); + +// src/shared.ts +var bufferToArray = (buffer) => { + const nums = []; + for (const byte of buffer) { + nums.push(buffer[byte]); + } + return nums; +}; +var overwriteObject = (object, targets) => { + const that = object; + targets.forEach((target) => { + delete that[target.existsKey]; + that[target.will.key] = target.will.value; + }); + return that; +}; +var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { + if (Constants.isDebugging === "true" || process.env.DEBUG === "true") { + console.log("[DEBUG]", data1, data2, data3, data4); + } +}; +var sleep = async (sec) => { + return new Promise((r) => setTimeout(r, sec * 1e3)); +}; +var isBrowser = () => { + return typeof window !== "undefined" && typeof window.document !== "undefined"; +}; +var isNode = () => { + return typeof process !== "undefined" && process.versions != null && process.versions.node != null; +}; +var isPromise = (obj) => { + return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; +}; +function Try(input, finallyInput) { + try { + const v = input(); + if (isPromise(v)) { + return v.then( + (x) => Result.ok(x), + (err) => Result.err(err) + ); + } else { + return Result.ok(v); + } + } catch (e) { + if (e instanceof Error) { + return Result.err(e); + } + return Result.err(Error(e)); + } finally { + if (finallyInput) { + debugLog("# finally input:", finallyInput); + finallyInput(); + } + } +} +var convertTimestampToDateTime = (created_at) => { + if (created_at) { + return new Date(created_at * 1e3); + } + return; +}; +var unixTimestamp = () => { + return Math.floor((/* @__PURE__ */ new Date()).getTime() / 1e3); +}; + +// ../converter/src/collection.ts +var Converter; +((Converter15) => { + let Collection; + ((Collection2) => { + Collection2.intoInfra = (input) => { + if (!input) { + return null; + } + return { + key: input.toPublicKey(), + verified: false + }; + }; + Collection2.intoUser = (output) => { + if (!output) { + return void 0; + } + return { + address: output.key.toString(), + verified: output.verified + }; + }; + })(Collection = Converter15.Collection || (Converter15.Collection = {})); + let CollectionMint; + ((CollectionMint2) => { + CollectionMint2.intoUser = (output) => { + const res = output.find((value) => { + if (value.group_key === "collection") { + return value.group_value; + } + }); + return res ? res.group_value : ""; + }; + })(CollectionMint = Converter15.CollectionMint || (Converter15.CollectionMint = {})); +})(Converter || (Converter = {})); + +// ../converter/src/creators.ts +var Converter2; +((Converter15) => { + let Creators; + ((Creators2) => { + Creators2.intoInfra = (input) => { + if (!input) { + return null; + } + return input.map((data) => { + return { + address: data.address.toPublicKey(), + share: data.share, + verified: false + }; + }); + }; + Creators2.intoCompressedNftInfra = (input) => { + if (!input) { + return []; + } + return input.map((data) => { + return { + address: data.address.toPublicKey(), + share: data.share, + verified: false + }; + }); + }; + Creators2.intoUser = (output) => { + if (!output) { + return void 0; + } + return output.map((data) => { + return { + address: data.address.toString(), + share: data.share, + verified: data.verified + }; + }); + }; + })(Creators = Converter15.Creators || (Converter15.Creators = {})); +})(Converter2 || (Converter2 = {})); + +// ../converter/src/compressed-nft-metadata.ts +var import_mpl_bubblegum_instruction = require("mpl-bubblegum-instruction"); +var Converter3; +((Converter15) => { + let CompressedNftMetadata; + ((CompressedNftMetadata2) => { + CompressedNftMetadata2.intoInfra = (input, uri, sellerFeeBasisPoints) => { + return { + name: input.name, + symbol: input.symbol, + uri, + sellerFeeBasisPoints, + creators: Converter2.Creators.intoCompressedNftInfra(input.creators), + collection: Converter.Collection.intoInfra(input.collection), + uses: input.uses || null, + primarySaleHappened: false, + isMutable: input.isMutable ?? false, + editionNonce: 0, + tokenStandard: import_mpl_bubblegum_instruction.TokenStandard.NonFungible, + tokenProgramVersion: import_mpl_bubblegum_instruction.TokenProgramVersion.Original + }; + }; + })(CompressedNftMetadata = Converter15.CompressedNftMetadata || (Converter15.CompressedNftMetadata = {})); +})(Converter3 || (Converter3 = {})); + +// ../converter/src/royalty.ts +var Converter4; +((Converter15) => { + let Royalty; + ((Royalty2) => { + Royalty2.THRESHOLD = 100; + Royalty2.intoInfra = (percentage) => { + return percentage * Royalty2.THRESHOLD; + }; + Royalty2.intoUser = (percentage) => { + return percentage * Royalty2.THRESHOLD; + }; + })(Royalty = Converter15.Royalty || (Converter15.Royalty = {})); +})(Converter4 || (Converter4 = {})); + +// ../converter/src/nft.ts +var Converter5; +((Converter15) => { + let Nft; + ((Nft2) => { + Nft2.intoUser = (output) => { + return { + mint: output.onchain.id.toString(), + collectionMint: Converter.CollectionMint.intoUser( + output.onchain.grouping + ), + authorities: output.onchain.authorities, + royalty: Converter4.Royalty.intoUser(output.onchain.royalty.percent), + name: output.onchain.content.metadata.name, + symbol: output.onchain.content.metadata.symbol, + uri: output.onchain.content.json_uri, + creators: Converter2.Creators.intoUser(output.onchain.creators), + treeAddress: output.onchain.compression.tree, + isCompressed: output.onchain.compression.compressed, + isMutable: output.onchain.mutable, + isBurn: output.onchain.burnt, + editionNonce: output.onchain.supply.edition_nonce, + primarySaleHappened: output.onchain.royalty.primary_sale_happened, + dateTime: convertTimestampToDateTime(output.offchain.created_at), + offchain: output.offchain + }; + }; + })(Nft = Converter15.Nft || (Converter15.Nft = {})); +})(Converter5 || (Converter5 = {})); + +// ../converter/src/memo.ts +var Converter6; +((Converter15) => { + let Memo; + ((Memo2) => { + Memo2.intoUserSide = (output, meta, outputTransfer, mappingTokenAccount) => { + const history = {}; + if (outputTransfer && outputTransfer.program !== "") { + if (mappingTokenAccount && outputTransfer.program === "spl-token") { + const foundSource = mappingTokenAccount.find( + (m) => m.account === outputTransfer.parsed.info.source + ); + const foundDest = mappingTokenAccount.find( + (m) => m.account === outputTransfer.parsed.info.destination + ); + history.mint = outputTransfer.parsed.info.mint; + foundSource && (history.source = foundSource.owner); + foundDest && (history.destination = foundDest.owner); + } else { + history.source = outputTransfer.parsed.info.source; + history.destination = outputTransfer.parsed.info.destination; + } + } + history.memo = output.parsed; + history.type = output.program; + history.dateTime = convertTimestampToDateTime(meta.blockTime); + history.sig = meta.transaction.signatures[0]; + history.innerInstruction = false; + if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { + history.innerInstruction = true; + } + return history; + }; + })(Memo = Converter15.Memo || (Converter15.Memo = {})); +})(Converter6 || (Converter6 = {})); + +// ../converter/src/mint.ts +var Converter7; +((Converter15) => { + let Mint; + ((Mint2) => { + Mint2.intoUserSide = (output, meta) => { + const history = {}; + history.mint = output.parsed.info.mint; + history.mintAuthority = output.parsed.info.mintAuthority; + history.tokenAmount = output.parsed.info.tokenAmount; + history.account = output.parsed.info.account; + history.type = output.program; + history.dateTime = convertTimestampToDateTime(meta.blockTime); + history.sig = meta.transaction.signatures[0]; + history.innerInstruction = false; + if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { + history.innerInstruction = true; + } + return history; + }; + })(Mint = Converter15.Mint || (Converter15.Mint = {})); +})(Converter7 || (Converter7 = {})); + +// ../converter/src/regular-nft-metadata.ts +var Converter8; +((Converter15) => { + let RegularNftMetadata; + ((RegularNftMetadata2) => { + RegularNftMetadata2.intoInfra = (input, uri, sellerFeeBasisPoints) => { + return { + name: input.name, + symbol: input.symbol, + uri, + sellerFeeBasisPoints, + creators: Converter2.Creators.intoInfra(input.creators), + collection: Converter.Collection.intoInfra(input.collection), + uses: input.uses || null + }; + }; + })(RegularNftMetadata = Converter15.RegularNftMetadata || (Converter15.RegularNftMetadata = {})); +})(Converter8 || (Converter8 = {})); + +// ../converter/src/properties.ts +var Converter9; +((Converter15) => { + let Properties; + ((Properties2) => { + Properties2.intoInfra = async (input, callbackFunc, storageType, feePayer) => { + if (!input || !input.files) { + return {}; + } + const files = await Promise.all( + input.files.map(async (file) => { + if (!file.filePath) { + return {}; + } + const res = await callbackFunc(file.filePath, storageType, feePayer); + if (res.isErr) { + throw Error(res.error.message); + } + return overwriteObject(file, [ + { + existsKey: "filePath", + will: { key: "uri", value: res.value } + } + ]); + }) + ); + return { ...input, files }; + }; + })(Properties = Converter15.Properties || (Converter15.Properties = {})); +})(Converter9 || (Converter9 = {})); + +// ../converter/src/uses.ts +var Converter10; +((Converter15) => { + let Uses; + ((Uses2) => { + Uses2.intoUserSide = (output) => { + if (!output) { + return void 0; + } + return output; + }; + })(Uses = Converter15.Uses || (Converter15.Uses = {})); +})(Converter10 || (Converter10 = {})); + +// ../converter/src/token-metadata.ts +var Converter11; +((Converter15) => { + let TokenMetadata; + ((TokenMetadata2) => { + TokenMetadata2.intoInfra = (input, uri, sellerFeeBasisPoints) => { + return { + name: input.name, + symbol: input.symbol, + uri, + sellerFeeBasisPoints, + creators: Converter2.Creators.intoInfra(input.creators), + collection: null, + uses: input.uses || null + }; + }; + TokenMetadata2.intoUser = (output, tokenAmount) => { + return { + mint: output.onchain.mint.toString(), + royalty: output.onchain.data.sellerFeeBasisPoints, + name: (0, TokenMetadata2.deleteNullStrings)(output.onchain.data.name), + symbol: (0, TokenMetadata2.deleteNullStrings)(output.onchain.data.symbol), + tokenAmount, + uri: (0, TokenMetadata2.deleteNullStrings)(output.onchain.data.uri), + creators: Converter2.Creators.intoUser(output.onchain.data.creators), + uses: Converter10.Uses.intoUserSide(output.onchain.uses), + dateTime: convertTimestampToDateTime(output.offchain.created_at), + offchain: output.offchain + }; + }; + TokenMetadata2.deleteNullStrings = (str) => { + return str.replace(/\0/g, ""); + }; + })(TokenMetadata = Converter15.TokenMetadata || (Converter15.TokenMetadata = {})); +})(Converter11 || (Converter11 = {})); + +// ../converter/src/transfer-checked.ts +var Converter12; +((Converter15) => { + let TransferChecked; + ((TransferChecked2) => { + TransferChecked2.intoUserSide = (output, meta, mappingTokenAccount) => { + const history = {}; + if (mappingTokenAccount) { + const foundSource = mappingTokenAccount.find( + (m) => m.account === output.parsed.info.source + ); + const foundDest = mappingTokenAccount.find( + (m) => m.account === output.parsed.info.destination + ); + foundSource && (history.source = foundSource.owner); + foundDest && (history.destination = foundDest.owner); + } + history.tokenAmount = output.parsed.info.tokenAmount; + history.mint = output.parsed.info.mint; + history.multisigAuthority = output.parsed.info.multisigAuthority; + history.signers = output.parsed.info.signers; + history.type = output.program; + history.dateTime = convertTimestampToDateTime(meta.blockTime); + history.sig = meta.transaction.signatures[0]; + history.innerInstruction = false; + if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { + history.innerInstruction = true; + } + return history; + }; + })(TransferChecked = Converter15.TransferChecked || (Converter15.TransferChecked = {})); +})(Converter12 || (Converter12 = {})); + +// ../converter/src/transfer.ts +var Converter13; +((Converter15) => { + let Transfer; + ((Transfer2) => { + Transfer2.intoUserSide = (output, meta) => { + const history = {}; + if (!output.parsed.info.destination || !output.parsed.info.lamports) { + return; + } + history.source = output.parsed.info.source; + history.destination = output.parsed.info.destination; + history.sol = output.parsed.info.lamports?.toSol().toString(); + history.type = output.program; + history.dateTime = convertTimestampToDateTime(meta.blockTime); + history.sig = meta.transaction.signatures[0]; + history.innerInstruction = false; + if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { + history.innerInstruction = true; + } + return history; + }; + })(Transfer = Converter15.Transfer || (Converter15.Transfer = {})); +})(Converter13 || (Converter13 = {})); + +// ../converter/src/index.ts +var Converter14 = { + ...Converter3, + ...Converter, + ...Converter2, + ...Converter5, + ...Converter6, + ...Converter7, + ...Converter8, + ...Converter9, + ...Converter4, + ...Converter11, + ...Converter12, + ...Converter13, + ...Converter10 +}; + +// ../validator/src/index.ts +var Validator; +((Validator2) => { + let Message; + ((Message2) => { + Message2.SUCCESS = "success"; + Message2.SMALL_NUMBER = "too small"; + Message2.BIG_NUMBER = "too big"; + Message2.LONG_LENGTH = "too long"; + Message2.EMPTY = "invalid empty value"; + Message2.INVALID_URL = "invalid url"; + Message2.ONLY_NODE_JS = "`string` type is only Node.js"; + })(Message = Validator2.Message || (Validator2.Message = {})); + Validator2.NAME_LENGTH = 32; + Validator2.SYMBOL_LENGTH = 10; + Validator2.URL_LENGTH = 200; + Validator2.ROYALTY_MAX = 100; + Validator2.SELLER_FEE_BASIS_POINTS_MAX = 1e4; + Validator2.ROYALTY_MIN = 0; + Validator2.isRoyalty = (royalty) => { + return Try(() => { + const key = "royalty"; + if (royalty !== 0 && !royalty) { + throw createError(key, Message.EMPTY, royalty); + } + if (royalty < Validator2.ROYALTY_MIN) { + throw createError(key, Message.SMALL_NUMBER, royalty, { + threshold: Validator2.ROYALTY_MIN, + condition: "underMin" + }); + } else if (royalty > Validator2.ROYALTY_MAX) { + throw createError(key, Message.BIG_NUMBER, royalty, { + threshold: Validator2.ROYALTY_MAX, + condition: "overMax" + }); + } + return Message.SUCCESS; + }); + }; + Validator2.isSellerFeeBasisPoints = (royalty) => { + return Try(() => { + const key = "sellerFeeBasisPoints/seller_fee_basis_points"; + if (royalty !== 0 && !royalty) { + throw createError(key, Message.EMPTY, royalty); + } + if (royalty < Validator2.ROYALTY_MIN) { + throw createError(key, Message.SMALL_NUMBER, royalty, { + threshold: Validator2.ROYALTY_MIN, + condition: "underMin" + }); + } else if (royalty > Validator2.ROYALTY_MAX * Converter14.Royalty.THRESHOLD) { + throw createError(key, Message.BIG_NUMBER, royalty, { + threshold: Validator2.SELLER_FEE_BASIS_POINTS_MAX, + condition: "overMax" + }); + } + return Message.SUCCESS; + }); + }; + Validator2.isName = (name) => { + return Try(() => { + const key = "name"; + if (!name) { + throw createError(key, Message.EMPTY, name); + } + if (byteLength(name) > Validator2.NAME_LENGTH) { + throw createError(key, Message.LONG_LENGTH, name, { + threshold: Validator2.NAME_LENGTH, + condition: "overMax" + }); + } + return Message.SUCCESS; + }); + }; + Validator2.isSymbol = (symbol) => { + return Try(() => { + const key = "symbol"; + if (!symbol) { + throw createError(key, Message.EMPTY, symbol); + } + if (byteLength(symbol) > Validator2.SYMBOL_LENGTH) { + throw createError(key, Message.LONG_LENGTH, symbol, { + threshold: Validator2.SYMBOL_LENGTH, + condition: "overMax" + }); + } + return Message.SUCCESS; + }); + }; + Validator2.isImageUrl = (image) => isUriOrImage(image, "image"); + Validator2.checkAll = (metadata) => { + return Try(() => { + const keys = Object.keys(metadata); + const results = []; + keys.map((key) => { + let res; + switch (key) { + case "image": + if (key in metadata && metadata.image) { + res = (0, Validator2.isImageUrl)(metadata.image); + } + break; + case "royalty": + if (key in metadata && metadata.royalty) { + res = (0, Validator2.isRoyalty)(metadata.royalty); + } + break; + case "seller_fee_basis_points": + if (key in metadata && metadata.seller_fee_basis_points) { + res = (0, Validator2.isSellerFeeBasisPoints)(metadata.seller_fee_basis_points); + } + break; + case "sellerFeeBasisPoints": + if (key in metadata) { + res = (0, Validator2.isSellerFeeBasisPoints)(metadata.sellerFeeBasisPoints); + } + break; + case "name": + if (metadata.name) { + res = (0, Validator2.isName)(metadata.name); + } + break; + case "symbol": + if (metadata.symbol) { + res = (0, Validator2.isSymbol)(metadata.symbol); + } + break; + } + if (res && res.isErr) { + results.push(...res.error.details); + } + }); + if (results.length > 0) { + const message = "Caught in the validation errors. see information e.g: err.details"; + throw new ValidatorError(message, results); + } + return Message.SUCCESS; + }); + }; + const byteLength = (value) => { + const text = new TextEncoder(); + return text.encode(value).length; + }; + const createError = (key, message, actual, limit) => { + let error; + if (limit) { + error = new ValidatorError(message, [{ key, message, actual, limit }]); + } else { + error = new ValidatorError(message, [{ key, message, actual }]); + } + return error; + }; + const isUriOrImage = (imageOrUri, key) => { + return Try(() => { + if (!imageOrUri) { + throw createError(key, Message.EMPTY, imageOrUri); + } + if (byteLength(imageOrUri) > Validator2.URL_LENGTH) { + throw createError(key, Message.LONG_LENGTH, imageOrUri, { + threshold: Validator2.URL_LENGTH, + condition: "overMax" + }); + } + if (!/https?:\/\/[-_.!~*\\()a-zA-Z0-9;?:&=+,%#]+/g.test(imageOrUri)) { + throw createError(key, Message.INVALID_URL, imageOrUri); + } + return Message.SUCCESS; + }); + }; +})(Validator || (Validator = {})); +var ValidatorError = class extends Error { + details; + constructor(message, details) { + super(message); + this.details = details; + } +}; +// Annotate the CommonJS export names for ESM import in node: +0 && (module.exports = { + Account, + Explorer, + Node, + Try, + Validator, + ValidatorError, + bufferToArray, + convertTimestampToDateTime, + debugLog, + isBrowser, + isNode, + isPromise, + overwriteObject, + sleep, + unixTimestamp +}); +//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2V4cG9ydHMudHMiLCAiLi4vc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9iYXRjaC50cyIsICIuLi8uLi90eXBlcy9zcmMvZ2xvYmFsL2luZGV4LnRzIiwgIi4uLy4uL2dsb2JhbC9zcmMvaW5kZXgudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvYXNzb2NpYXRlZC50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9rZXlwYWlyLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL3BkYS50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9pbmRleC50cyIsICIuLi8uLi9ub2RlL3NyYy9pbmRleC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jb21tb24udHMiLCAiLi4vLi4vdHJhb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ldyBLZXlwYWlyLktleXBhaXIoeyBzZWNyZXQ6IGZlZVBheWVyIH0pLnB1YmtleSxcbiAgICAgICAgYWxsb3dPd25lck9mZkN1cnZlLFxuICAgICAgKTtcblxuICAgICAgaWYgKCFyZXMuaW5zdCkge1xuICAgICAgICByZXR1cm4gcmVzLnRva2VuQWNjb3VudDtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uPFB1YmtleT4oXG4gICAgICAgIFtyZXMuaW5zdF0sXG4gICAgICAgIFtdLFxuICAgICAgICBmZWVQYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgcmVzLnRva2VuQWNjb3VudCEsXG4gICAgICApO1xuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiBSZXRyeSBmdW5jdGlvbiBpZiBjcmVhdGUgbmV3IHRva2VuIGFjY291aW50XG4gICAgICpcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gbWludFxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBvd25lclxuICAgICAqIEBwYXJhbSB7U2VjcmV0fSBmZWVQYXllclxuICAgICAqIEByZXR1cm5zIFByb21pc2U8c3RyaW5nPlxuICAgICAqL1xuICAgIGV4cG9ydCBjb25zdCByZXRyeUdldE9yQ3JlYXRlID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyOiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxzdHJpbmc+ID0+IHtcbiAgICAgIGxldCBjb3VudGVyID0gMTtcbiAgICAgIHdoaWxlIChjb3VudGVyIDwgUkVUUllfT1ZFUl9MSU1JVCkge1xuICAgICAgICB0cnkge1xuICAgICAgICAgIGNvbnN0IGluc3QgPSBhd2FpdCBnZXQobWludCwgb3duZXIsIGZlZVBheWVyLCB0cnVlKTtcblxuICAgICAgICAgIGlmIChpbnN0ICYmIHR5cGVvZiBpbnN0ID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgaW5zdCk7XG4gICAgICAgICAgICByZXR1cm4gaW5zdDtcbiAgICAgICAgICB9IGVsc2UgaWYgKGluc3QgaW5zdGFuY2VvZiBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uKSB7XG4gICAgICAgICAgICAoYXdhaXQgaW5zdC5zdWJtaXQoKSkubWFwKFxuICAgICAgICAgICAgICBhc3luYyAob2s6IHN0cmluZykgPT4ge1xuICAgICAgICAgICAgICAgIGF3YWl0IE5vZGUuY29uZmlybWVkU2lnKG9rKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gaW5zdC5kYXRhO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAoZXJyOiBFcnJvcikgPT4ge1xuICAgICAgICAgICAgICAgIGRlYnVnTG9nKCcjIEVycm9yIHN1Ym1pdCByZXRyeUdldE9yQ3JlYXRlOiAnLCBlcnIpO1xuICAgICAgICAgICAgICAgIHRocm93IGVycjtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgZGVidWdMb2coYCMgcmV0cnk6ICR7Y291bnRlcn0gY3JlYXRlIHRva2VuIGFjY291bnQ6IGAsIGUpO1xuICAgICAgICAgIGRlYnVnTG9nKGAjIG1pbnQ6ICR7bWludH0sIG93bmVyOiAke293bmVyfSwgZmVlUGF5ZXI6ICR7ZmVlUGF5ZXJ9YCk7XG4gICAgICAgIH1cbiAgICAgICAgYXdhaXQgc2xlZXAoUkVUUllfU0xFRVBfVElNRSk7XG4gICAgICAgIGNvdW50ZXIrKztcbiAgICAgIH1cbiAgICAgIHRocm93IEVycm9yKGByZXRyeSBhY3Rpb24gaXMgb3ZlciBsaW1pdCAke1JFVFJZX09WRVJfTElNSVR9YCk7XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIFtNYWluIGxvZ2ljXUdldCBBc3NvY2lhdGVkIHRva2VuIEFjY291bnQuXG4gICAgICogaWYgbm90IGNyZWF0ZWQsIGNyZWF0ZSBuZXcgdG9rZW4gYWNjb3VpbnRcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBtaW50XG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAgICogQHBhcmFtIHtQdWJrZXl9IGZlZVBheWVyXG4gICAgICogQHJldHVybnMgUHJvbWlzZTxzdHJpbmc+XG4gICAgICovXG4gICAgZXhwb3J0IGNvbnN0IG1ha2VPckNyZWF0ZUluc3RydWN0aW9uID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyPzogUHVia2V5LFxuICAgICAgYWxsb3dPd25lck9mZkN1cnZlID0gZmFsc2UsXG4gICAgKTogUHJvbWlzZTx7XG4gICAgICB0b2tlbkFjY291bnQ6IHN0cmluZztcbiAgICAgIGluc3Q6IFRyYW5zYWN0aW9uSW5zdHJ1Y3Rpb24gfCB1bmRlZmluZWQ7XG4gICAgfT4gPT4ge1xuICAgICAgY29uc3QgYXNzb2NpYXRlZFRva2VuQWNjb3VudCA9IGdldEFzc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jKFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSxcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICAgIEFTU09DSUFURURfVE9LR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RyaW5nPihmZWVQYXllclBrKTtcbiAgICBjb25zdCBhY2NvdW50cyA9IG5ldyBTZXQ8c3RyaW5nPihmZWVQYXllclBrKTtcblxuICAgIGNvbnN0IGl4c1NpemUgPSB0cmFuc2FjdGlvbi5pbnN0cnVjdGlvbnMucmVkdWNlKChhY2MsIGl4KSA9PiB7XG4gICAgICBpeC5rZXlzLmZvckVhY2goKHsgcHVia2V5LCBpc1NpZ25lciB9KSA9PiB7XG4gICAgICAgIGNvbnN0IHBrID0gcHVia2V5LnRvQmFzZTU4KCk7XG4gICAgICAgIGlmIChpc1NpZ25lcikgc2lnbmVycy5hZGQocGspO1xuICAgICAgICBhY2NvdW50cy5hZGQocGspO1xuICAgICAgfSk7XG5cbiAgICAgIGFjY291bnRzLmFkZChpeC5wcm9ncmFtSWQudG9CYXNlNTgoKSk7XG5cbiAgICAgIGNvbnN0IG5JbmRleGVzID0gaXgua2V5cy5sZW5ndGg7XG4gICAgICBjb25zdCBvcGFxdWVEYXRhID0gaXguZGF0YS5sZW5ndGg7XG5cbiAgICAgIHJldHVybiAoXG4gICAgICAgIGFjYyArXG4gICAgICAgIDEgKyAvLyBQSUQgaW5kZXhcbiAgICAgICAgY29tcGFjdEFycmF5U2l6ZShuSW5kZXhlcywgMSkgK1xuICAgICAgICBjb21wYWN0QXJyYXlTaXplKG9wYXF1ZURhdGEsIDEpXG4gICAgICApO1xuICAgIH0sIDApO1xuXG4gICAgcmV0dXJuIChcbiAgICAgIGNvbXBhY3RBcnJheVNpemUoc2lnbmVycy5zaXplLCA2NCkgKyAvLyBzaWduYXR1cmVzXG4gICAgICAzICsgLy8gaGVhZGVyXG4gICAgICBjb21wYWN0QXJyYXlTaXplKGFjY291bnRzLnNpemUsIDMyKSArIC8vIGFjY291bnRzXG4gICAgICAzMiArIC8vIGJsb2NraGFzaFxuICAgICAgY29tcGFjdEhlYWRlcih0cmFuc2FjdGlvbi5pbnN0cnVjdGlvbnMubGVuZ3RoKSArIC8vIGluc3RydWN0a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JlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEuc3ltYm9sKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU3ltYm9sKG1ldGFkYXRhLnN5bWJvbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAocmVzICYmIHJlcy5pc0Vycikge1xuICAgICAgICAgIHJlc3VsdHMucHVzaCguLi5yZXMuZXJyb3IuZGV0YWlscyk7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgICAgaWYgKHJlc3VsdHMubGVuZ3RoID4gMCkge1xuIC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wgIkFjY291bnQiLCAiYnMiLCAiaW1wb3J0X3dlYjMiLCAiTm9kZSIsICJpbXBvcnRfd2ViMyIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiQ29tbW9uIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJpbXBvcnRfd2ViMyIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiaW1wb3J0X3dlYjMiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiUmVzdWx0IiwgIkNvbnZlcnRlciIsICJDb2xsZWN0aW9uIiwgIkNvbGxlY3Rpb25NaW50IiwgIkNvbnZlcnRlciIsICJDcmVhdG9ycyIsICJDb252ZXJ0ZXIiLCAiQ29tcHJlc3NlZE5mdE1ldGFkYXRhIiwgIkNvbnZlcnRlciIsICJSb3lhbHR5IiwgIkNvbnZlcnRlciIsICJOZnQiLCAiQ29udmVydGVyIiwgIk1lbW8iLCAiQ29udmVydGVyIiwgIk1pbnQiLCAiQ29udmVydGVyIiwgIlJlZ3VsYXJOZnRNZXRhZGF0YSIsICJDb252ZXJ0ZXIiLCAiUHJvcGVydGllcyIsICJDb252ZXJ0ZXIiLCAiVXNlcyIsICJDb252ZXJ0ZXIiLCAiVG9rZW5NZXRhZGF0YSIsICJDb252ZXJ0ZXIiLCAiVHJhbnNmZXJDaGVja2VkIiwgIkNvbnZlcnRlciIsICJUcmFuc2ZlciIsICJDb252ZXJ0ZXIiLCAiVmFsaWRhdG9yIiwgIk1lc3NhZ2UiLCAiQ29udmVydGVyIl0KfQo= \ No newline at end of file diff --git a/packages/suite-utils/dist/exports.mjs b/packages/suite-utils/dist/exports.mjs new file mode 100644 index 000000000..8665e598b --- /dev/null +++ b/packages/suite-utils/dist/exports.mjs @@ -0,0 +1,1552 @@ +// src/constants.ts +import { PublicKey } from "@solana/web3.js"; +import SolanaJsonConfig from "@solana-suite/config/load"; +var Config = SolanaJsonConfig; +var Constants; +((Constants2) => { + let WarnningMessage; + ((WarnningMessage2) => { + const THRESHHOLD = 50; + let isDisplay = false; + WarnningMessage2.NFT_STORAGE_API_KEY = ` + [YOU HAVE TO DO] + -------------------------------------- + You need to update nftStorageApiKey define parameter in solana-suite.json. + Can get api key from https://nft.storage/ + -------------------------------------- + `; + WarnningMessage2.DAS_API_URL = ` + [YOU HAVE TO DO] + -------------------------------------- + You need to update dasApiUrl define parameter in solana-suite.json. + can get api url from https://www.helius.dev/ + -------------------------------------- + `; + WarnningMessage2.ANNOUNCE = ` + [DEPRECATED] + -------------------------------------- + Account, Node, toExplorer, Pubkey, Secret have been moved to + @solana-suite/utils + ------------------------------------- + `; + WarnningMessage2.calculateProbability = () => { + const randomValue = Math.random(); + const probability = 1 / THRESHHOLD; + if (!isDisplay && randomValue < probability) { + isDisplay = true; + return true; + } + return false; + }; + })(WarnningMessage = Constants2.WarnningMessage || (Constants2.WarnningMessage = {})); +})(Constants || (Constants = {})); +((Constants2) => { + Constants2.currentCluster = Config.cluster.type; + Constants2.customClusterUrl = Config.cluster.customClusterUrl; + Constants2.isDebugging = Config.debugging; + Constants2.nftStorageApiKey = Config.nftStorageApiKey; + Constants2.dasApiUrl = Config.dasApiUrl; + let Cluster; + ((Cluster2) => { + Cluster2["prd"] = "mainnet-beta"; + Cluster2["prdMetaplex"] = "mainnet-beta-metaplex"; + Cluster2["dev"] = "devnet"; + Cluster2["test"] = "testnet"; + Cluster2["localhost"] = "localhost-devnet"; + })(Cluster = Constants2.Cluster || (Constants2.Cluster = {})); + let EndPointUrl; + ((EndPointUrl2) => { + EndPointUrl2["prd"] = "https://api.mainnet-beta.solana.com"; + EndPointUrl2["prdMetaplex"] = "https://api.metaplex.solana.com"; + EndPointUrl2["dev"] = "https://api.devnet.solana.com"; + EndPointUrl2["test"] = "https://api.testnet.solana.com"; + EndPointUrl2["localhost"] = "http://api.devnet.solana.com"; + })(EndPointUrl = Constants2.EndPointUrl || (Constants2.EndPointUrl = {})); + let BundlrUrl; + ((BundlrUrl2) => { + BundlrUrl2["prd"] = "https://node1.irys.xyz,https://node2.irys.xyz"; + BundlrUrl2["dev"] = "https://devnet.irys.xyz"; + })(BundlrUrl = Constants2.BundlrUrl || (Constants2.BundlrUrl = {})); + let DasApiUrl; + ((DasApiUrl2) => { + DasApiUrl2["dev"] = "https://devnet.helius-rpc.com/?api-key=15319bf4-5b40-4958-ac8d-6313aa55eb92,https://rpc-devnet.helius.xyz?api-key=9f70a843-3274-4ffd-a0a9-323f8b7c0639"; + })(DasApiUrl = Constants2.DasApiUrl || (Constants2.DasApiUrl = {})); + let NftstorageApiKey; + ((NftstorageApiKey2) => { + NftstorageApiKey2["dev"] = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJkaWQ6ZXRocjoweERGMjcyN2VkODZhRGU1RTMyZDZDZEJlODc0YzRFNDlEODY1OWZmOEMiLCJpc3MiOiJuZnQtc3RvcmFnZSIsImlhdCI6MTYyMDI2NDk0MzcwNiwibmFtZSI6ImRlbW8ifQ.d4J70mikxRB8a5vwNu6SO5HDA8JaueuseAj7Q_ytMCE"; + })(NftstorageApiKey = Constants2.NftstorageApiKey || (Constants2.NftstorageApiKey = {})); + Constants2.loadConfig = async () => { + Config = await import("@solana-suite/config/load"); + }; + Constants2.switchCluster = (param) => { + const { cluster: env, customClusterUrl: customClusterUrl2 } = param; + if (customClusterUrl2 && customClusterUrl2.length > 0) { + const index = Date.now() % customClusterUrl2.length; + return customClusterUrl2[index]; + } + switch (env) { + case "mainnet-beta" /* prd */: + return "https://api.mainnet-beta.solana.com" /* prd */; + case "mainnet-beta-metaplex" /* prdMetaplex */: + return "https://api.metaplex.solana.com" /* prdMetaplex */; + case "testnet" /* test */: + return "https://api.testnet.solana.com" /* test */; + case "devnet" /* dev */: + return "https://api.devnet.solana.com" /* dev */; + default: + return "http://api.devnet.solana.com" /* localhost */; + } + }; + Constants2.switchBundlr = (env) => { + switch (env) { + case "mainnet-beta" /* prd */: { + const urls = "https://node1.irys.xyz,https://node2.irys.xyz" /* prd */.split(","); + const index = Date.now() % urls.length; + return urls[index]; + } + default: { + return "https://devnet.irys.xyz" /* dev */; + } + } + }; + Constants2.switchDasApi = (env) => { + switch (env) { + case "mainnet-beta" /* prd */: { + if (Constants2.dasApiUrl.length < 1) { + throw Error(Constants2.WarnningMessage.DAS_API_URL); + } + const urls = "https://node1.irys.xyz,https://node2.irys.xyz" /* prd */.split(","); + const index = Date.now() % urls.length; + return urls[index]; + } + default: { + const urls = "https://devnet.helius-rpc.com/?api-key=15319bf4-5b40-4958-ac8d-6313aa55eb92,https://rpc-devnet.helius.xyz?api-key=9f70a843-3274-4ffd-a0a9-323f8b7c0639" /* dev */.split(","); + const index = Date.now() % urls.length; + return urls[index]; + } + } + }; + Constants2.switchNftStorage = (env) => { + switch (env) { + case "mainnet-beta" /* prd */: + if (!Constants2.nftStorageApiKey) { + throw Error(Constants2.WarnningMessage.NFT_STORAGE_API_KEY); + } + return Constants2.nftStorageApiKey; + default: { + return "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJkaWQ6ZXRocjoweERGMjcyN2VkODZhRGU1RTMyZDZDZEJlODc0YzRFNDlEODY1OWZmOEMiLCJpc3MiOiJuZnQtc3RvcmFnZSIsImlhdCI6MTYyMDI2NDk0MzcwNiwibmFtZSI6ImRlbW8ifQ.d4J70mikxRB8a5vwNu6SO5HDA8JaueuseAj7Q_ytMCE" /* dev */; + } + } + }; + Constants2.WRAPPED_TOKEN_PROGRAM_ID = new PublicKey( + "So11111111111111111111111111111111111111112" + ); + Constants2.MEMO_PROGRAM_ID = new PublicKey( + "Memo1UhkJRfHyvLMcVucJwxXeuD728EqVDDwQDxFMNo" + ); + Constants2.METAPLEX_PROGRAM_ID = new PublicKey( + "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s" + ); + Constants2.COMMITMENT = "confirmed"; + Constants2.NFT_STORAGE_GATEWAY_URL = "https://ipfs.io/ipfs"; + Constants2.IRYS_GATEWAY_URL = "https://gateway.irys.xyz"; + Constants2.BUNDLR_NETWORK_URL = (0, Constants2.switchBundlr)(Config.cluster.type); + Constants2.DAS_API_URL = (0, Constants2.switchDasApi)(Config.cluster.type); + Constants2.NFT_STORAGE_API_KEY = (0, Constants2.switchNftStorage)(Config.cluster.type); + Constants2.EXPLORER_SOLSCAN_URL = "https://solscan.io"; + Constants2.EXPLORER_SOLANAFM_URL = "https://solana.fm"; + Constants2.EXPLORER_XRAY_URL = "https://xray.helius.xyz"; +})(Constants || (Constants = {})); +console.log(Constants.WarnningMessage.ANNOUNCE); + +// ../transaction-builder/src/batch.ts +import { + sendAndConfirmTransaction as sendAndConfirmTransaction2, + Transaction as Transaction2 +} from "@solana/web3.js"; + +// ../types/src/global/index.ts +var Explorer = /* @__PURE__ */ ((Explorer2) => { + Explorer2["Solscan"] = "solscan"; + Explorer2["SolanaFM"] = "solanafm"; + Explorer2["Xray"] = "xray"; + return Explorer2; +})(Explorer || {}); + +// ../global/src/index.ts +import { Keypair, LAMPORTS_PER_SOL, PublicKey as PublicKey4 } from "@solana/web3.js"; + +// ../account/src/associated.ts +import { + ASSOCIATED_TOKEN_PROGRAM_ID, + createAssociatedTokenAccountInstruction, + getAccount, + getAssociatedTokenAddressSync, + TOKEN_PROGRAM_ID, + TokenAccountNotFoundError, + TokenInvalidAccountOwnerError +} from "@solana/spl-token"; + +// ../account/src/keypair.ts +import { Keypair as Original, PublicKey as PublicKey2 } from "@solana/web3.js"; +import bs from "bs58"; +var Account; +((Account5) => { + class Keypair4 { + secret; + pubkey; + constructor(params) { + if (!params.pubkey) { + const keypair = params.secret.toKeypair(); + this.pubkey = keypair.publicKey.toString(); + } else { + this.pubkey = params.pubkey; + } + this.secret = params.secret; + } + toPublicKey() { + return new PublicKey2(this.pubkey); + } + toKeypair() { + const decoded = bs.decode(this.secret); + return Original.fromSecretKey(decoded); + } + static isPubkey = (value) => /^[0-9a-zA-Z]{32,44}$/.test(value); + static isSecret = (value) => /^[0-9a-zA-Z]{87,88}$/.test(value); + static create = () => { + const keypair = Original.generate(); + return new Keypair4({ + pubkey: keypair.publicKey.toString(), + secret: bs.encode(keypair.secretKey) + }); + }; + static toKeyPair = (keypair) => { + return new Keypair4({ + pubkey: keypair.publicKey.toString(), + secret: bs.encode(keypair.secretKey) + }); + }; + } + Account5.Keypair = Keypair4; +})(Account || (Account = {})); + +// ../account/src/associated.ts +var Account2; +((Account5) => { + let Associated; + ((Associated2) => { + const RETRY_OVER_LIMIT = 10; + const RETRY_SLEEP_TIME = 3; + const get = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { + const res = await (0, Associated2.makeOrCreateInstruction)( + mint, + owner, + new Account.Keypair({ secret: feePayer }).pubkey, + allowOwnerOffCurve + ); + if (!res.inst) { + return res.tokenAccount; + } + return new TransactionBuilder.Common( + [res.inst], + [], + feePayer.toKeypair(), + res.tokenAccount + ); + }; + Associated2.retryGetOrCreate = async (mint, owner, feePayer) => { + let counter = 1; + while (counter < RETRY_OVER_LIMIT) { + try { + const inst = await get(mint, owner, feePayer, true); + if (inst && typeof inst === "string") { + debugLog("# associatedTokenAccount: ", inst); + return inst; + } else if (inst instanceof TransactionBuilder.Common) { + (await inst.submit()).map( + async (ok) => { + await Node.confirmedSig(ok); + return inst.data; + }, + (err) => { + debugLog("# Error submit retryGetOrCreate: ", err); + throw err; + } + ); + } + } catch (e) { + debugLog(`# retry: ${counter} create token account: `, e); + debugLog(`# mint: ${mint}, owner: ${owner}, feePayer: ${feePayer}`); + } + await sleep(RETRY_SLEEP_TIME); + counter++; + } + throw Error(`retry action is over limit ${RETRY_OVER_LIMIT}`); + }; + Associated2.makeOrCreateInstruction = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { + const associatedTokenAccount = getAssociatedTokenAddressSync( + mint.toPublicKey(), + owner.toPublicKey(), + allowOwnerOffCurve, + TOKEN_PROGRAM_ID, + ASSOCIATED_TOKEN_PROGRAM_ID + ); + debugLog("# associatedTokenAccount: ", associatedTokenAccount.toString()); + try { + await getAccount( + Node.getConnection(), + associatedTokenAccount, + Node.getConnection().commitment, + TOKEN_PROGRAM_ID + ); + return { + tokenAccount: associatedTokenAccount.toString(), + inst: void 0 + }; + } catch (error) { + if (!(error instanceof TokenAccountNotFoundError) && !(error instanceof TokenInvalidAccountOwnerError)) { + throw Error("Unexpected error"); + } + const payer = !feePayer ? owner : feePayer; + const inst = createAssociatedTokenAccountInstruction( + payer.toPublicKey(), + associatedTokenAccount, + owner.toPublicKey(), + mint.toPublicKey(), + TOKEN_PROGRAM_ID, + ASSOCIATED_TOKEN_PROGRAM_ID + ); + return { + tokenAccount: associatedTokenAccount.toString(), + inst + }; + } + }; + })(Associated = Account5.Associated || (Account5.Associated = {})); +})(Account2 || (Account2 = {})); + +// ../account/src/pda.ts +import { PublicKey as PublicKey3 } from "@solana/web3.js"; +import { PROGRAM_ID } from "@metaplex-foundation/mpl-token-metadata"; +import { MPL_BUBBLEGUM_PROGRAM_ID } from "@metaplex-foundation/mpl-bubblegum"; +import BN from "bn.js"; +var Account3; +((Account5) => { + let Pda; + ((Pda2) => { + Pda2.getMetadata = (address) => { + const [publicKey] = PublicKey3.findProgramAddressSync( + [ + Buffer.from("metadata"), + PROGRAM_ID.toBuffer(), + address.toPublicKey().toBuffer() + ], + PROGRAM_ID + ); + return publicKey; + }; + Pda2.getMasterEdition = (address) => { + const [publicKey] = PublicKey3.findProgramAddressSync( + [ + Buffer.from("metadata"), + PROGRAM_ID.toBuffer(), + address.toPublicKey().toBuffer(), + Buffer.from("edition") + ], + PROGRAM_ID + ); + return publicKey; + }; + Pda2.getTreeAuthority = (address) => { + const [publicKey] = PublicKey3.findProgramAddressSync( + [address.toPublicKey().toBuffer()], + MPL_BUBBLEGUM_PROGRAM_ID.toPublicKey() + ); + return publicKey; + }; + Pda2.getBgumSigner = () => { + const [publicKey] = PublicKey3.findProgramAddressSync( + [Buffer.from("collection_cpi", "utf8")], + MPL_BUBBLEGUM_PROGRAM_ID.toPublicKey() + ); + return publicKey; + }; + Pda2.getAssetId = (address, leafIndex) => { + const node = new BN.BN(leafIndex); + const [assetId] = PublicKey3.findProgramAddressSync( + [ + Buffer.from("asset", "utf8"), + address.toPublicKey().toBuffer(), + Uint8Array.from(node.toArray("le", 8)) + ], + MPL_BUBBLEGUM_PROGRAM_ID.toPublicKey() + ); + return assetId.toString(); + }; + })(Pda = Account5.Pda || (Account5.Pda = {})); +})(Account3 || (Account3 = {})); + +// ../account/src/index.ts +var Account4 = { + ...Account2, + ...Account, + ...Account3 +}; + +// ../global/src/index.ts +import { BigNumber } from "bignumber.js"; +import bs2 from "bs58"; +String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, options = {}) { + const endPointUrl = Node.getConnection().rpcEndpoint; + debugLog("# toExplorerUrl rpcEndpoint:", endPointUrl); + let cluster = ""; + if (endPointUrl === Constants.EndPointUrl.prd) { + cluster = Constants.Cluster.prd; + } else if (endPointUrl === Constants.EndPointUrl.test) { + cluster = Constants.Cluster.test; + } else if (endPointUrl === Constants.EndPointUrl.dev) { + cluster = Constants.Cluster.dev; + } else { + cluster = Constants.Cluster.dev; + } + const addressOrSignature = this.toString(); + let url = ""; + if (options.replacePath) { + if (explorer === "solanafm" /* SolanaFM */) { + url = `${Constants.EXPLORER_SOLANAFM_URL}/${options.replacePath}/${addressOrSignature}?cluster=${cluster}`; + } else if (explorer === "xray" /* Xray */) { + url = `${Constants.EXPLORER_XRAY_URL}/${options.replacePath}/${addressOrSignature}?network=${cluster}`; + } else { + url = `${Constants.EXPLORER_SOLSCAN_URL}/${options.replacePath}/${addressOrSignature}?cluster=${cluster}`; + } + return url; + } + if (Account4.Keypair.isPubkey(addressOrSignature)) { + if (explorer === "solanafm" /* SolanaFM */) { + url = `${Constants.EXPLORER_SOLANAFM_URL}/address/${addressOrSignature}?cluster=${cluster}`; + } else if (explorer === "xray" /* Xray */) { + url = `${Constants.EXPLORER_XRAY_URL}/account/${addressOrSignature}?network=${cluster}`; + } else { + url = `${Constants.EXPLORER_SOLSCAN_URL}/account/${addressOrSignature}?cluster=${cluster}`; + } + } else { + if (explorer === "solanafm" /* SolanaFM */) { + url = `${Constants.EXPLORER_SOLANAFM_URL}/tx/${addressOrSignature}?cluster=${cluster}`; + } else if (explorer === "xray" /* Xray */) { + url = `${Constants.EXPLORER_XRAY_URL}/tx/${addressOrSignature}?network=${cluster}`; + } else { + url = `${Constants.EXPLORER_SOLSCAN_URL}/tx/${addressOrSignature}?cluster=${cluster}`; + } + } + return url; +}; +String.prototype.toPublicKey = function() { + if (!Account4.Keypair.isPubkey(this.toString())) { + throw Error(`No match KeyPair.PubKey: ${this.toString()}`); + } + return new PublicKey4(this.toString()); +}; +String.prototype.toKeypair = function() { + if (!Account4.Keypair.isSecret(this.toString())) { + throw Error(`No match KeyPair.Secret: ${this.toString()}`); + } + const decoded = bs2.decode(this.toString()); + return Keypair.fromSecretKey(decoded); +}; +Number.prototype.toSol = function() { + return BigNumber(this).div(LAMPORTS_PER_SOL).toNumber(); +}; +Number.prototype.toLamports = function() { + return BigNumber(this).times(LAMPORTS_PER_SOL).toNumber(); +}; + +// ../node/src/index.ts +import { Connection } from "@solana/web3.js"; +var Node; +((Node2) => { + const setted = { + clusterUrl: "", + commitment: Constants.COMMITMENT, + customClusterUrl: [] + }; + Node2.getConnection = () => { + if (setted.customClusterUrl.length > 0) { + setted.clusterUrl = Constants.switchCluster({ + customClusterUrl: setted.customClusterUrl + }); + } else if (Constants.customClusterUrl.length > 0) { + setted.clusterUrl = Constants.switchCluster({ + customClusterUrl: Constants.customClusterUrl + }); + } else if (!setted.clusterUrl) { + setted.clusterUrl = Constants.switchCluster({ + cluster: Constants.currentCluster + }); + } + if (!setted.commitment) { + setted.commitment = Constants.COMMITMENT; + } + return new Connection(setted.clusterUrl, setted.commitment); + }; + Node2.changeConnection = (param) => { + setted.clusterUrl = ""; + setted.customClusterUrl = []; + setted.commitment = Constants.COMMITMENT; + const { cluster, commitment, customClusterUrl } = param; + if (commitment) { + setted.commitment = commitment; + debugLog("# Node change commitment: ", setted.commitment); + } + if (cluster) { + setted.clusterUrl = Constants.switchCluster({ cluster }); + debugLog("# Node change clusterUrl: ", setted.clusterUrl); + } + if (customClusterUrl) { + debugLog("# customClusterUrl: ", customClusterUrl); + setted.clusterUrl = Constants.switchCluster({ customClusterUrl }); + setted.customClusterUrl = customClusterUrl; + debugLog( + "# Node change cluster, custom cluster url: ", + setted.clusterUrl + ); + } + }; + Node2.confirmedSig = async (signature, commitment = Constants.COMMITMENT) => { + const connection = Node2.getConnection(); + const latestBlockhash = await connection.getLatestBlockhash(); + return await connection.confirmTransaction( + { + blockhash: latestBlockhash.blockhash, + lastValidBlockHeight: latestBlockhash.lastValidBlockHeight, + signature + }, + commitment + ).then(Result.ok).catch(Result.err); + }; +})(Node || (Node = {})); + +// ../transaction-builder/src/common.ts +import { + sendAndConfirmTransaction, + Transaction +} from "@solana/web3.js"; +var MAX_RETRIES = 3; +var TransactionBuilder2; +((TransactionBuilder7) => { + class Common2 { + static MAX_TRANSACTION_SIZE = 1232; + instructions; + signers; + feePayer; + data; + constructor(instructions, signers, feePayer, data) { + this.instructions = instructions; + this.signers = signers; + this.feePayer = feePayer; + this.data = data; + } + submit = async () => { + return Try(async () => { + if (!(this instanceof Common2)) { + throw Error("only Instruction object that can use this"); + } + const transaction = new Transaction(); + const blockhashObj = await Node.getConnection().getLatestBlockhash(); + transaction.lastValidBlockHeight = blockhashObj.lastValidBlockHeight; + transaction.recentBlockhash = blockhashObj.blockhash; + let finalSigners = this.signers; + if (this.feePayer) { + transaction.feePayer = this.feePayer.publicKey; + finalSigners = [this.feePayer, ...this.signers]; + } + this.instructions.forEach((inst) => transaction.add(inst)); + const options = { + maxRetries: MAX_RETRIES + }; + return await sendAndConfirmTransaction( + Node.getConnection(), + transaction, + finalSigners, + options + ); + }); + }; + } + TransactionBuilder7.Common = Common2; +})(TransactionBuilder2 || (TransactionBuilder2 = {})); + +// ../transaction-builder/src/batch.ts +var TransactionBuilder3; +((TransactionBuilder7) => { + class Batch { + submit = async (arr) => { + return Try(async () => { + let i = 0; + for (const a of arr) { + if (!a.instructions && !a.signers) { + throw Error( + `only Instruction object that can use batchSubmit(). + Index: ${i}, Set value: ${JSON.stringify(a)}` + ); + } + i++; + } + const instructions = arr.flatMap((a) => a.instructions); + const signers = arr.flatMap((a) => a.signers); + const feePayers = arr.filter((a) => a.feePayer !== void 0); + let feePayer = signers[0]; + if (feePayers.length > 0 && feePayers[0].feePayer) { + feePayer = feePayers[0].feePayer; + } + const transaction = new Transaction2(); + let finalSigners = signers; + if (feePayer) { + transaction.feePayer = feePayer.publicKey; + finalSigners = [feePayer, ...signers]; + } + instructions.map((inst) => transaction.add(inst)); + const options = { + maxRetries: MAX_RETRIES + }; + return await sendAndConfirmTransaction2( + Node.getConnection(), + transaction, + finalSigners, + options + ); + }); + }; + } + TransactionBuilder7.Batch = Batch; +})(TransactionBuilder3 || (TransactionBuilder3 = {})); + +// ../transaction-builder/src/mint.ts +import { + sendAndConfirmTransaction as sendAndConfirmTransaction3, + Transaction as Transaction3 +} from "@solana/web3.js"; +var TransactionBuilder4; +((TransactionBuilder7) => { + class Mint { + instructions; + signers; + feePayer; + data; + constructor(instructions, signers, feePayer, data) { + this.instructions = instructions; + this.signers = signers; + this.data = data; + this.feePayer = feePayer; + } + submit = async () => { + return Try(async () => { + if (!(this instanceof Mint)) { + throw Error("only MintInstruction object that can use this"); + } + const transaction = new Transaction3(); + const blockhashObj = await Node.getConnection().getLatestBlockhash(); + transaction.lastValidBlockHeight = blockhashObj.lastValidBlockHeight; + transaction.recentBlockhash = blockhashObj.blockhash; + let finalSigners = this.signers; + if (this.feePayer) { + transaction.feePayer = this.feePayer.publicKey; + finalSigners = [this.feePayer, ...this.signers]; + } + this.instructions.forEach((inst) => transaction.add(inst)); + const options = { + maxRetries: MAX_RETRIES + }; + if (Node.getConnection().rpcEndpoint === Constants.EndPointUrl.prd) { + debugLog("# Change metaplex cluster on mainnet-beta"); + Node.changeConnection({ cluster: Constants.Cluster.prdMetaplex }); + } + return await sendAndConfirmTransaction3( + Node.getConnection(), + transaction, + finalSigners, + options + ); + }); + }; + } + TransactionBuilder7.Mint = Mint; +})(TransactionBuilder4 || (TransactionBuilder4 = {})); + +// ../transaction-builder/src/partial-sign.ts +import { + Transaction as Transaction4 +} from "@solana/web3.js"; +var TransactionBuilder5; +((TransactionBuilder7) => { + class PartialSign { + hexInstruction; + data; + canSubmit; + constructor(instructions, mint, canSubmit = false) { + this.hexInstruction = instructions; + this.data = mint; + this.canSubmit = canSubmit; + } + submit = async (feePayer) => { + return Try(async () => { + if (!(this instanceof PartialSign)) { + throw Error("only PartialSignInstruction object that can use this"); + } + const decode = Buffer.from(this.hexInstruction, "hex"); + const transactionFromJson = Transaction4.from(decode); + transactionFromJson.partialSign(feePayer.toKeypair()); + const options = { + maxRetries: MAX_RETRIES + }; + const wireTransaction = transactionFromJson.serialize(); + return await Node.getConnection().sendRawTransaction( + wireTransaction, + options + ); + }); + }; + } + TransactionBuilder7.PartialSign = PartialSign; +})(TransactionBuilder5 || (TransactionBuilder5 = {})); + +// ../transaction-builder/src/calculate-txsize.ts +var TransactionBuilder6; +((TransactionBuilder7) => { + const LOW_VALUE = 127; + const HIGH_VALUE = 16383; + const MAX_TRANSACTION_SIZE = 1232; + const compactHeader = (n) => n <= LOW_VALUE ? 1 : n <= HIGH_VALUE ? 2 : 3; + const compactArraySize = (n, size) => compactHeader(n) + n * size; + TransactionBuilder7.calculateTxSize = (transaction, feePayer) => { + const feePayerPk = [feePayer.toBase58()]; + const signers = new Set(feePayerPk); + const accounts = new Set(feePayerPk); + const ixsSize = transaction.instructions.reduce((acc, ix) => { + ix.keys.forEach(({ pubkey, isSigner }) => { + const pk = pubkey.toBase58(); + if (isSigner) + signers.add(pk); + accounts.add(pk); + }); + accounts.add(ix.programId.toBase58()); + const nIndexes = ix.keys.length; + const opaqueData = ix.data.length; + return acc + 1 + // PID index + compactArraySize(nIndexes, 1) + compactArraySize(opaqueData, 1); + }, 0); + return compactArraySize(signers.size, 64) + // signatures + 3 + // header + compactArraySize(accounts.size, 32) + // accounts + 32 + // blockhash + compactHeader(transaction.instructions.length) + // instructions + ixsSize; + }; + TransactionBuilder7.isOverTransactionSize = (transaction, feePayer) => { + return (0, TransactionBuilder7.calculateTxSize)(transaction, feePayer) > MAX_TRANSACTION_SIZE; + }; +})(TransactionBuilder6 || (TransactionBuilder6 = {})); + +// ../transaction-builder/src/index.ts +var TransactionBuilder = { + ...TransactionBuilder3, + ...TransactionBuilder6, + ...TransactionBuilder4, + ...TransactionBuilder2, + ...TransactionBuilder5 +}; + +// src/result.ts +var AbstractResult = class { + unwrap(ok, err) { + const r = this._chain( + (value) => Result.ok(ok ? ok(value) : value), + (error) => err ? Result.ok(err(error)) : Result.err(error) + ); + if (r.isErr) { + throw r.error; + } + return r.value; + } + map(ok, err) { + return this._chain( + (value) => Result.ok(ok(value)), + (error) => Result.err(err ? err(error) : error) + ); + } + chain(ok, err) { + return this._chain(ok, err || ((error) => Result.err(error))); + } + match(ok, err) { + this._chain( + (value) => Result.ok(ok(value)), + (error) => Result.err(err(error)) + ); + } + /// single TransactionBuilder //// + /* eslint-disable @typescript-eslint/no-explicit-any */ + async submit(feePayer) { + const res = this.map( + async (ok) => { + debugLog("# result single submit: ", ok); + if (feePayer) { + const obj = ok; + return await obj.submit(feePayer); + } else { + const obj = ok; + return await obj.submit(); + } + }, + (err) => { + return err; + } + ); + if (res.isErr) { + return Result.err(res.error); + } + return res.value; + } +}; +Array.prototype.submit = async function(feePayer) { + if (feePayer) { + let i = 1; + for await (const obj of this) { + if (obj.isErr) { + return obj; + } else if (obj.value.canSubmit) { + debugLog("# Result batch canSubmit"); + const sig = await obj.submit(feePayer); + if (sig.isErr) { + return sig; + } + await Node.confirmedSig(sig.value); + } else { + debugLog("# Result batch other than canSubmit"); + if (this.length == i) { + return obj.submit(feePayer); + } + obj.submit(feePayer); + } + i++; + } + } else { + const instructions = []; + for (const obj of this) { + if (obj.isErr) { + return obj; + } else if (obj.isOk) { + instructions.push(obj.value); + } else { + return Result.err(Error("Only Array Instruction object")); + } + } + debugLog("# Result batch submit: ", instructions); + return new TransactionBuilder.Batch().submit(instructions); + } +}; +var InternalOk = class extends AbstractResult { + constructor(value) { + super(); + this.value = value; + } + isOk = true; + isErr = false; + /* eslint-disable @typescript-eslint/no-unused-vars */ + _chain(ok, _err) { + return ok(this.value); + } +}; +var InternalErr = class extends AbstractResult { + constructor(error) { + super(); + this.error = error; + } + isOk = false; + isErr = true; + _chain(_ok, err) { + return err(this.error); + } +}; +var Result; +((Result8) => { + function ok(value) { + return new InternalOk(value); + } + Result8.ok = ok; + function err(error) { + return new InternalErr(error || Error()); + } + Result8.err = err; + function all(obj) { + if (Array.isArray(obj)) { + const resArr = []; + for (const item of obj) { + if (item.isErr) { + return item; + } + resArr.push(item.value); + } + return Result8.ok(resArr); + } + const res = {}; + const keys = Object.keys(obj); + for (const key of keys) { + const item = obj[key]; + if (item.isErr) { + return item; + } + res[key] = item.value; + } + return Result8.ok(res); + } + Result8.all = all; +})(Result || (Result = {})); + +// src/shared.ts +var bufferToArray = (buffer) => { + const nums = []; + for (const byte of buffer) { + nums.push(buffer[byte]); + } + return nums; +}; +var overwriteObject = (object, targets) => { + const that = object; + targets.forEach((target) => { + delete that[target.existsKey]; + that[target.will.key] = target.will.value; + }); + return that; +}; +var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { + if (Constants.isDebugging === "true" || process.env.DEBUG === "true") { + console.log("[DEBUG]", data1, data2, data3, data4); + } +}; +var sleep = async (sec) => { + return new Promise((r) => setTimeout(r, sec * 1e3)); +}; +var isBrowser = () => { + return typeof window !== "undefined" && typeof window.document !== "undefined"; +}; +var isNode = () => { + return typeof process !== "undefined" && process.versions != null && process.versions.node != null; +}; +var isPromise = (obj) => { + return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; +}; +function Try(input, finallyInput) { + try { + const v = input(); + if (isPromise(v)) { + return v.then( + (x) => Result.ok(x), + (err) => Result.err(err) + ); + } else { + return Result.ok(v); + } + } catch (e) { + if (e instanceof Error) { + return Result.err(e); + } + return Result.err(Error(e)); + } finally { + if (finallyInput) { + debugLog("# finally input:", finallyInput); + finallyInput(); + } + } +} +var convertTimestampToDateTime = (created_at) => { + if (created_at) { + return new Date(created_at * 1e3); + } + return; +}; +var unixTimestamp = () => { + return Math.floor((/* @__PURE__ */ new Date()).getTime() / 1e3); +}; + +// ../converter/src/collection.ts +var Converter; +((Converter15) => { + let Collection; + ((Collection2) => { + Collection2.intoInfra = (input) => { + if (!input) { + return null; + } + return { + key: input.toPublicKey(), + verified: false + }; + }; + Collection2.intoUser = (output) => { + if (!output) { + return void 0; + } + return { + address: output.key.toString(), + verified: output.verified + }; + }; + })(Collection = Converter15.Collection || (Converter15.Collection = {})); + let CollectionMint; + ((CollectionMint2) => { + CollectionMint2.intoUser = (output) => { + const res = output.find((value) => { + if (value.group_key === "collection") { + return value.group_value; + } + }); + return res ? res.group_value : ""; + }; + })(CollectionMint = Converter15.CollectionMint || (Converter15.CollectionMint = {})); +})(Converter || (Converter = {})); + +// ../converter/src/creators.ts +var Converter2; +((Converter15) => { + let Creators; + ((Creators2) => { + Creators2.intoInfra = (input) => { + if (!input) { + return null; + } + return input.map((data) => { + return { + address: data.address.toPublicKey(), + share: data.share, + verified: false + }; + }); + }; + Creators2.intoCompressedNftInfra = (input) => { + if (!input) { + return []; + } + return input.map((data) => { + return { + address: data.address.toPublicKey(), + share: data.share, + verified: false + }; + }); + }; + Creators2.intoUser = (output) => { + if (!output) { + return void 0; + } + return output.map((data) => { + return { + address: data.address.toString(), + share: data.share, + verified: data.verified + }; + }); + }; + })(Creators = Converter15.Creators || (Converter15.Creators = {})); +})(Converter2 || (Converter2 = {})); + +// ../converter/src/compressed-nft-metadata.ts +import { + TokenProgramVersion, + TokenStandard +} from "mpl-bubblegum-instruction"; +var Converter3; +((Converter15) => { + let CompressedNftMetadata; + ((CompressedNftMetadata2) => { + CompressedNftMetadata2.intoInfra = (input, uri, sellerFeeBasisPoints) => { + return { + name: input.name, + symbol: input.symbol, + uri, + sellerFeeBasisPoints, + creators: Converter2.Creators.intoCompressedNftInfra(input.creators), + collection: Converter.Collection.intoInfra(input.collection), + uses: input.uses || null, + primarySaleHappened: false, + isMutable: input.isMutable ?? false, + editionNonce: 0, + tokenStandard: TokenStandard.NonFungible, + tokenProgramVersion: TokenProgramVersion.Original + }; + }; + })(CompressedNftMetadata = Converter15.CompressedNftMetadata || (Converter15.CompressedNftMetadata = {})); +})(Converter3 || (Converter3 = {})); + +// ../converter/src/royalty.ts +var Converter4; +((Converter15) => { + let Royalty; + ((Royalty2) => { + Royalty2.THRESHOLD = 100; + Royalty2.intoInfra = (percentage) => { + return percentage * Royalty2.THRESHOLD; + }; + Royalty2.intoUser = (percentage) => { + return percentage * Royalty2.THRESHOLD; + }; + })(Royalty = Converter15.Royalty || (Converter15.Royalty = {})); +})(Converter4 || (Converter4 = {})); + +// ../converter/src/nft.ts +var Converter5; +((Converter15) => { + let Nft; + ((Nft2) => { + Nft2.intoUser = (output) => { + return { + mint: output.onchain.id.toString(), + collectionMint: Converter.CollectionMint.intoUser( + output.onchain.grouping + ), + authorities: output.onchain.authorities, + royalty: Converter4.Royalty.intoUser(output.onchain.royalty.percent), + name: output.onchain.content.metadata.name, + symbol: output.onchain.content.metadata.symbol, + uri: output.onchain.content.json_uri, + creators: Converter2.Creators.intoUser(output.onchain.creators), + treeAddress: output.onchain.compression.tree, + isCompressed: output.onchain.compression.compressed, + isMutable: output.onchain.mutable, + isBurn: output.onchain.burnt, + editionNonce: output.onchain.supply.edition_nonce, + primarySaleHappened: output.onchain.royalty.primary_sale_happened, + dateTime: convertTimestampToDateTime(output.offchain.created_at), + offchain: output.offchain + }; + }; + })(Nft = Converter15.Nft || (Converter15.Nft = {})); +})(Converter5 || (Converter5 = {})); + +// ../converter/src/memo.ts +var Converter6; +((Converter15) => { + let Memo; + ((Memo2) => { + Memo2.intoUserSide = (output, meta, outputTransfer, mappingTokenAccount) => { + const history = {}; + if (outputTransfer && outputTransfer.program !== "") { + if (mappingTokenAccount && outputTransfer.program === "spl-token") { + const foundSource = mappingTokenAccount.find( + (m) => m.account === outputTransfer.parsed.info.source + ); + const foundDest = mappingTokenAccount.find( + (m) => m.account === outputTransfer.parsed.info.destination + ); + history.mint = outputTransfer.parsed.info.mint; + foundSource && (history.source = foundSource.owner); + foundDest && (history.destination = foundDest.owner); + } else { + history.source = outputTransfer.parsed.info.source; + history.destination = outputTransfer.parsed.info.destination; + } + } + history.memo = output.parsed; + history.type = output.program; + history.dateTime = convertTimestampToDateTime(meta.blockTime); + history.sig = meta.transaction.signatures[0]; + history.innerInstruction = false; + if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { + history.innerInstruction = true; + } + return history; + }; + })(Memo = Converter15.Memo || (Converter15.Memo = {})); +})(Converter6 || (Converter6 = {})); + +// ../converter/src/mint.ts +var Converter7; +((Converter15) => { + let Mint; + ((Mint2) => { + Mint2.intoUserSide = (output, meta) => { + const history = {}; + history.mint = output.parsed.info.mint; + history.mintAuthority = output.parsed.info.mintAuthority; + history.tokenAmount = output.parsed.info.tokenAmount; + history.account = output.parsed.info.account; + history.type = output.program; + history.dateTime = convertTimestampToDateTime(meta.blockTime); + history.sig = meta.transaction.signatures[0]; + history.innerInstruction = false; + if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { + history.innerInstruction = true; + } + return history; + }; + })(Mint = Converter15.Mint || (Converter15.Mint = {})); +})(Converter7 || (Converter7 = {})); + +// ../converter/src/regular-nft-metadata.ts +var Converter8; +((Converter15) => { + let RegularNftMetadata; + ((RegularNftMetadata2) => { + RegularNftMetadata2.intoInfra = (input, uri, sellerFeeBasisPoints) => { + return { + name: input.name, + symbol: input.symbol, + uri, + sellerFeeBasisPoints, + creators: Converter2.Creators.intoInfra(input.creators), + collection: Converter.Collection.intoInfra(input.collection), + uses: input.uses || null + }; + }; + })(RegularNftMetadata = Converter15.RegularNftMetadata || (Converter15.RegularNftMetadata = {})); +})(Converter8 || (Converter8 = {})); + +// ../converter/src/properties.ts +var Converter9; +((Converter15) => { + let Properties; + ((Properties2) => { + Properties2.intoInfra = async (input, callbackFunc, storageType, feePayer) => { + if (!input || !input.files) { + return {}; + } + const files = await Promise.all( + input.files.map(async (file) => { + if (!file.filePath) { + return {}; + } + const res = await callbackFunc(file.filePath, storageType, feePayer); + if (res.isErr) { + throw Error(res.error.message); + } + return overwriteObject(file, [ + { + existsKey: "filePath", + will: { key: "uri", value: res.value } + } + ]); + }) + ); + return { ...input, files }; + }; + })(Properties = Converter15.Properties || (Converter15.Properties = {})); +})(Converter9 || (Converter9 = {})); + +// ../converter/src/uses.ts +var Converter10; +((Converter15) => { + let Uses; + ((Uses2) => { + Uses2.intoUserSide = (output) => { + if (!output) { + return void 0; + } + return output; + }; + })(Uses = Converter15.Uses || (Converter15.Uses = {})); +})(Converter10 || (Converter10 = {})); + +// ../converter/src/token-metadata.ts +var Converter11; +((Converter15) => { + let TokenMetadata; + ((TokenMetadata2) => { + TokenMetadata2.intoInfra = (input, uri, sellerFeeBasisPoints) => { + return { + name: input.name, + symbol: input.symbol, + uri, + sellerFeeBasisPoints, + creators: Converter2.Creators.intoInfra(input.creators), + collection: null, + uses: input.uses || null + }; + }; + TokenMetadata2.intoUser = (output, tokenAmount) => { + return { + mint: output.onchain.mint.toString(), + royalty: output.onchain.data.sellerFeeBasisPoints, + name: (0, TokenMetadata2.deleteNullStrings)(output.onchain.data.name), + symbol: (0, TokenMetadata2.deleteNullStrings)(output.onchain.data.symbol), + tokenAmount, + uri: (0, TokenMetadata2.deleteNullStrings)(output.onchain.data.uri), + creators: Converter2.Creators.intoUser(output.onchain.data.creators), + uses: Converter10.Uses.intoUserSide(output.onchain.uses), + dateTime: convertTimestampToDateTime(output.offchain.created_at), + offchain: output.offchain + }; + }; + TokenMetadata2.deleteNullStrings = (str) => { + return str.replace(/\0/g, ""); + }; + })(TokenMetadata = Converter15.TokenMetadata || (Converter15.TokenMetadata = {})); +})(Converter11 || (Converter11 = {})); + +// ../converter/src/transfer-checked.ts +var Converter12; +((Converter15) => { + let TransferChecked; + ((TransferChecked2) => { + TransferChecked2.intoUserSide = (output, meta, mappingTokenAccount) => { + const history = {}; + if (mappingTokenAccount) { + const foundSource = mappingTokenAccount.find( + (m) => m.account === output.parsed.info.source + ); + const foundDest = mappingTokenAccount.find( + (m) => m.account === output.parsed.info.destination + ); + foundSource && (history.source = foundSource.owner); + foundDest && (history.destination = foundDest.owner); + } + history.tokenAmount = output.parsed.info.tokenAmount; + history.mint = output.parsed.info.mint; + history.multisigAuthority = output.parsed.info.multisigAuthority; + history.signers = output.parsed.info.signers; + history.type = output.program; + history.dateTime = convertTimestampToDateTime(meta.blockTime); + history.sig = meta.transaction.signatures[0]; + history.innerInstruction = false; + if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { + history.innerInstruction = true; + } + return history; + }; + })(TransferChecked = Converter15.TransferChecked || (Converter15.TransferChecked = {})); +})(Converter12 || (Converter12 = {})); + +// ../converter/src/transfer.ts +var Converter13; +((Converter15) => { + let Transfer; + ((Transfer2) => { + Transfer2.intoUserSide = (output, meta) => { + const history = {}; + if (!output.parsed.info.destination || !output.parsed.info.lamports) { + return; + } + history.source = output.parsed.info.source; + history.destination = output.parsed.info.destination; + history.sol = output.parsed.info.lamports?.toSol().toString(); + history.type = output.program; + history.dateTime = convertTimestampToDateTime(meta.blockTime); + history.sig = meta.transaction.signatures[0]; + history.innerInstruction = false; + if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { + history.innerInstruction = true; + } + return history; + }; + })(Transfer = Converter15.Transfer || (Converter15.Transfer = {})); +})(Converter13 || (Converter13 = {})); + +// ../converter/src/index.ts +var Converter14 = { + ...Converter3, + ...Converter, + ...Converter2, + ...Converter5, + ...Converter6, + ...Converter7, + ...Converter8, + ...Converter9, + ...Converter4, + ...Converter11, + ...Converter12, + ...Converter13, + ...Converter10 +}; + +// ../validator/src/index.ts +var Validator; +((Validator2) => { + let Message; + ((Message2) => { + Message2.SUCCESS = "success"; + Message2.SMALL_NUMBER = "too small"; + Message2.BIG_NUMBER = "too big"; + Message2.LONG_LENGTH = "too long"; + Message2.EMPTY = "invalid empty value"; + Message2.INVALID_URL = "invalid url"; + Message2.ONLY_NODE_JS = "`string` type is only Node.js"; + })(Message = Validator2.Message || (Validator2.Message = {})); + Validator2.NAME_LENGTH = 32; + Validator2.SYMBOL_LENGTH = 10; + Validator2.URL_LENGTH = 200; + Validator2.ROYALTY_MAX = 100; + Validator2.SELLER_FEE_BASIS_POINTS_MAX = 1e4; + Validator2.ROYALTY_MIN = 0; + Validator2.isRoyalty = (royalty) => { + return Try(() => { + const key = "royalty"; + if (royalty !== 0 && !royalty) { + throw createError(key, Message.EMPTY, royalty); + } + if (royalty < Validator2.ROYALTY_MIN) { + throw createError(key, Message.SMALL_NUMBER, royalty, { + threshold: Validator2.ROYALTY_MIN, + condition: "underMin" + }); + } else if (royalty > Validator2.ROYALTY_MAX) { + throw createError(key, Message.BIG_NUMBER, royalty, { + threshold: Validator2.ROYALTY_MAX, + condition: "overMax" + }); + } + return Message.SUCCESS; + }); + }; + Validator2.isSellerFeeBasisPoints = (royalty) => { + return Try(() => { + const key = "sellerFeeBasisPoints/seller_fee_basis_points"; + if (royalty !== 0 && !royalty) { + throw createError(key, Message.EMPTY, royalty); + } + if (royalty < Validator2.ROYALTY_MIN) { + throw createError(key, Message.SMALL_NUMBER, royalty, { + threshold: Validator2.ROYALTY_MIN, + condition: "underMin" + }); + } else if (royalty > Validator2.ROYALTY_MAX * Converter14.Royalty.THRESHOLD) { + throw createError(key, Message.BIG_NUMBER, royalty, { + threshold: Validator2.SELLER_FEE_BASIS_POINTS_MAX, + condition: "overMax" + }); + } + return Message.SUCCESS; + }); + }; + Validator2.isName = (name) => { + return Try(() => { + const key = "name"; + if (!name) { + throw createError(key, Message.EMPTY, name); + } + if (byteLength(name) > Validator2.NAME_LENGTH) { + throw createError(key, Message.LONG_LENGTH, name, { + threshold: Validator2.NAME_LENGTH, + condition: "overMax" + }); + } + return Message.SUCCESS; + }); + }; + Validator2.isSymbol = (symbol) => { + return Try(() => { + const key = "symbol"; + if (!symbol) { + throw createError(key, Message.EMPTY, symbol); + } + if (byteLength(symbol) > Validator2.SYMBOL_LENGTH) { + throw createError(key, Message.LONG_LENGTH, symbol, { + threshold: Validator2.SYMBOL_LENGTH, + condition: "overMax" + }); + } + return Message.SUCCESS; + }); + }; + Validator2.isImageUrl = (image) => isUriOrImage(image, "image"); + Validator2.checkAll = (metadata) => { + return Try(() => { + const keys = Object.keys(metadata); + const results = []; + keys.map((key) => { + let res; + switch (key) { + case "image": + if (key in metadata && metadata.image) { + res = (0, Validator2.isImageUrl)(metadata.image); + } + break; + case "royalty": + if (key in metadata && metadata.royalty) { + res = (0, Validator2.isRoyalty)(metadata.royalty); + } + break; + case "seller_fee_basis_points": + if (key in metadata && metadata.seller_fee_basis_points) { + res = (0, Validator2.isSellerFeeBasisPoints)(metadata.seller_fee_basis_points); + } + break; + case "sellerFeeBasisPoints": + if (key in metadata) { + res = (0, Validator2.isSellerFeeBasisPoints)(metadata.sellerFeeBasisPoints); + } + break; + case "name": + if (metadata.name) { + res = (0, Validator2.isName)(metadata.name); + } + break; + case "symbol": + if (metadata.symbol) { + res = (0, Validator2.isSymbol)(metadata.symbol); + } + break; + } + if (res && res.isErr) { + results.push(...res.error.details); + } + }); + if (results.length > 0) { + const message = "Caught in the validation errors. see information e.g: err.details"; + throw new ValidatorError(message, results); + } + return Message.SUCCESS; + }); + }; + const byteLength = (value) => { + const text = new TextEncoder(); + return text.encode(value).length; + }; + const createError = (key, message, actual, limit) => { + let error; + if (limit) { + error = new ValidatorError(message, [{ key, message, actual, limit }]); + } else { + error = new ValidatorError(message, [{ key, message, actual }]); + } + return error; + }; + const isUriOrImage = (imageOrUri, key) => { + return Try(() => { + if (!imageOrUri) { + throw createError(key, Message.EMPTY, imageOrUri); + } + if (byteLength(imageOrUri) > Validator2.URL_LENGTH) { + throw createError(key, Message.LONG_LENGTH, imageOrUri, { + threshold: Validator2.URL_LENGTH, + condition: "overMax" + }); + } + if (!/https?:\/\/[-_.!~*\\()a-zA-Z0-9;?:&=+,%#]+/g.test(imageOrUri)) { + throw createError(key, Message.INVALID_URL, imageOrUri); + } + return Message.SUCCESS; + }); + }; +})(Validator || (Validator = {})); +var ValidatorError = class extends Error { + details; + constructor(message, details) { + super(message); + this.details = details; + } +}; +export { + Account4 as Account, + Explorer, + Node, + Try, + Validator, + ValidatorError, + bufferToArray, + convertTimestampToDateTime, + debugLog, + isBrowser, + isNode, + isPromise, + overwriteObject, + sleep, + unixTimestamp +}; +//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9iYXRjaC50cyIsICIuLi8uLi90eXBlcy9zcmMvZ2xvYmFsL2luZGV4LnRzIiwgIi4uLy4uL2dsb2JhbC9zcmMvaW5kZXgudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvYXNzb2NpYXRlZC50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9rZXlwYWlyLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL3BkYS50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9pbmRleC50cyIsICIuLi8uLi9ub2RlL3NyYy9pbmRleC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jb21tb24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvbWludC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9wYXJ0aWFsLXNpZ24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYn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gICAgICAgIHJldHVybiBpbnN0LmRhdGE7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIChlcnI6IEVycm9yKSA9PiB7XG4gICAgICAgICAgICAgICAgZGVidWdMb2coJyMgRXJyb3Igc3VibWl0IHJldHJ5R2V0T3JDcmVhdGU6ICcsIGVycik7XG4gICAgICAgICAgICAgICAgdGhyb3cgZXJyO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICBkZWJ1Z0xvZyhgIyByZXRyeTogJHtjb3VudGVyfSBjcmVhdGUgdG9rZW4gYWNjb3VudDogYCwgZSk7XG4gICAgICAgICAgZGVidWdMb2coYCMgbWludDogJHttaW50fSwgb3duZXI6ICR7b3duZXJ9LCBmZWVQYXllcjogJHtmZWVQYXllcn1gKTtcbiAgICAgICAgfVxuICAgICAgICBhd2FpdCBzbGVlcChSRVRSWV9TTEVFUF9USU1FKTtcbiAgICAgICAgY291bnRlcisrO1xuICAgICAgfVxuICAgICAgdGhyb3cgRXJyb3IoYHJldHJ5IGFjdGlvbiBpcyBvdmVyIGxpbWl0ICR7UkVUUllfT1ZFUl9MSU1JVH1gKTtcbiAgICB9O1xuXG4gICAgLyoqXG4gICAgICogW01haW4gbG9naWNdR2V0IEFzc29jaWF0ZWQgdG9rZW4gQWNjb3VudC5cbiAgICAgKiBpZiBub3QgY3JlYXRlZCwgY3JlYXRlIG5ldyB0b2tlbiBhY2NvdWludFxuICAgICAqXG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG1pbnRcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gb3duZXJcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gZmVlUGF5ZXJcbiAgICAgKiBAcmV0dXJucyBQcm9taXNlPHN0cmluZz5cbiAgICAgKi9cbiAgICBleHBvcnQgY29uc3QgbWFrZU9yQ3JlYXRlSW5zdHJ1Y3Rpb24g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oKSxcbiAgICAgICAgICBpbnN0OiB1bmRlZmluZWQsXG4gICAgICAgIH07XG4gICAgICB9IGNhdGNoIChlcnJvcjogdW5rbm93bikge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuQWNjb3VudE5vdEZvdW5kRXJyb3IpICYmXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuSW52YWxpZEFjY291bnRPd25lckVycm9yKVxuICAgICAgICApIHtcbiAgICAgICAgICB0aHJvdyBFcnJvcignVW5leHBlY3RlZCBlcnJvcicpO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgcGF5ZXIgPSAhZmVlUGF5ZXIgPyBvd25lciA6IGZlZVBheWVyO1xuXG4gICAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVBc3NvY2lhdGVkVG9rZW5BY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgcGF5ZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdCxcbiAgICAgICAgfTtcbiAgICAgIH1cbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHsgS2V5cGFpciBhcyBPcmlnaW5hbCwgUHVibGljS2V5IH0gZnJvbSAnQHNvbGFuYS93ZWIzLmpzJztcbmltcG9ydCB7IFB1YmtleSwgU2VjcmV0IH0gZnJvbSAnfi90eXB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gW2FkZHJlc3MudG9QdWJsaWNLZXkoKS50b0J1ZmZlcigpXSxcbiAgICAgICAgTVBMX0JVQkJMRUdVTV9QUk9HUkFNX0lELnRvUHVibGljS2V5KCksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGdldEJndW1TaWduZXIgPSAoKTogUHVibGljS2V5ID0+IHtcbiAgICAgIGNvbnN0IFtwdWJsaWNLZXldID0gUHVibGljS2V5LmZpbmRQcm9ncmFtQWRkcmVzc1N5bmMoXG4gICAgICAgIFtCdWZmZXIuZnJvbSgnY29sbGVjdGlvbl9jcGknLCAndXRmOCcpXSxcbiAgICAgICAgTVBMX0JVQkJMRUdVTV9QUk9HUkFNX0lELnRvUHVibGljS2V5KCksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGdldEFzc2V0SWQgPSAoYWRkcmVzczogUHVia2V5LCBsZWFmSW5kZXg6IG51bWJlcik6IFB1YmtleSA9PiB7XG4gICAgICBjb25zdCBub2RlID0gbmV3IEJOLkJOKGxlYWZJbmRleCk7XG4gICAgICBjb25zdCBbYXNzZXRJZF0gPSBQdWJsaWNLZXkuZmluZFByb2dyYW1BZGRyZXNzU3luYyhcbiAgICAgICAgW1xuICAgICAgICAgIEJ1ZmZlci5mcm9tKCdhc3NldCcsICd1dGY4JyksXG4gICAgICAgICAgYWRkcmVzcy50b1B1YmxpY0tleSgpLnRvQnVmZmVyKCksXG4gICAgICAgICAgVWludDhBcnJheS5mcm9tKG5vZGUudG9BcnJheSgnbGUnLCA4KSksXG4gICAgICAgIF0sXG4gICAgICAgIE1QTF9CVUJCTEVHVU1fUFJPR1JBTV9JRC50b1B1YmxpY0tleSgpLFxuICAgICAgKTtcbiAgICAgIHJldHVybiBhc3NldElkLnRvU3RyaW5nKCk7XG4gICAgfTtcbiAgfVxufVxuIiwgIm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lLFxuICAgICAgICBzdG9yYWdlVHlwZTogU3RvcmFnZVR5cGUsXG4gICAgICAgIGZlZVBheWVyPzogU2VjcmV0LFxuICAgICAgKSA9PiBQcm9taXNlPFJlc3VsdDxzdHJpbmcsIEVycm9yPj4sXG4gICAgICBzdG9yYWdlVHlwZTogU3RvcmFnZVR5cGUsXG4gICAgICBmZWVQYXllcj86IFNlY3JldCxcbiAgICApOiBQcm9taXNlPFByb3BlcnRpZXM+ID0+IHtcbiAgICAgIGlmICghaW5wdXQgfHwgIWlucHV0LmZpbGVzKSB7XG4gICAgICAgIHJldHVybiB7fTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgZmlsZXMgPSBhd2FpdCBQcm9taXNlLmFsbChcbiAgICAgICAgaW5wdXQuZmlsZXMubWFwKGFzeW5jIChmaWxlKSA9PiB7XG4gICAgICAgICAgaWYgKCFmaWxlLmZpbGVQYXRoKSB7XG4gICAgICAgICAgICByZXR1cm4ge307XG4gICAgICAgICAgfVxuICAgICAgICAgIGNvbnN0IHJlcyA9IGF3YWl0IGNhbGxiYWNrRnVuYyhmaWxlLmZpbGVQYXRoLCBzdG9yYWdlVHlwZSwgZmVlUGF5ZXIpO1xuICAgICAgICAgIGlmIChyZXMuaXNFcnIpIHtcbiAgICAgICAgICAgIHRocm93IEVycm9yKHJlcy5lcnJvci5tZXNzYWdlKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgcmV0dXJuIG92ZXJ3cml0ZU9iamVjdChmaWxlLCBbXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGV4aXN0c0tleTogJ2ZpbGVQYXRoJyxcbiAgICAgICAgICAgICAgd2lsbDogeyBrZXk6ICd1cmknLCB2YWx1ZTogcmVzLnZhbHVlIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgIF0pO1xuICAgICAgICB9KSxcbiAgICAgICk7XG4gICAgICByZXR1cm4geyAuLi5pbnB1dCwgZmlsZXMgfSBhcyBQcm9wZXJ0aWVzO1xuICAgI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T4ge1xuICAgICAgY29uc3Qga2V5cyA9IE9iamVjdC5rZXlzKG1ldGFkYXRhKTtcbiAgICAgIGNvbnN0IHJlc3VsdHM6IERldGFpbHNbXSA9IFtdO1xuICAgICAga2V5cy5tYXAoKGtleSkgPT4ge1xuICAgICAgICBsZXQgcmVzITogUmVzdWx0PHN0cmluZywgVmFsaWRhdG9yRXJyb3I+O1xuICAgICAgICBzd2l0Y2ggKGtleSkge1xuICAgICAgICAgIGNhc2UgJ2ltYWdlJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuaW1hZ2UpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNJbWFnZVVybChtZXRhZGF0YS5pbWFnZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdyb3lhbHR5JzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEucm95YWx0eSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1JveWFsdHkobWV0YWRhdGEucm95YWx0eSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZU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hbnNhY3Rpb24iLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJSZXN1bHQiLCAiQ29udmVydGVyIiwgIkNvbGxlY3Rpb24iLCAiQ29sbGVjdGlvbk1pbnQiLCAiQ29udmVydGVyIiwgIkNyZWF0b3JzIiwgIkNvbnZlcnRlciIsICJDb21wcmVzc2VkTmZ0TWV0YWRhdGEiLCAiQ29udmVydGVyIiwgIlJveWFsdHkiLCAiQ29udmVydGVyIiwgIk5mdCIsICJDb252ZXJ0ZXIiLCAiTWVtbyIsICJDb252ZXJ0ZXIiLCAiTWludCIsICJDb252ZXJ0ZXIiLCAiUmVndWxhck5mdE1ldGFkYXRhIiwgIkNvbnZlcnRlciIsICJQcm9wZXJ0aWVzIiwgIkNvbnZlcnRlciIsICJVc2VzIiwgIkNvbnZlcnRlciIsICJUb2tlbk1ldGFkYXRhIiwgIkNvbnZlcnRlciIsICJUcmFuc2ZlckNoZWNrZWQiLCAiQ29udmVydGVyIiwgIlRyYW5zZmVyIiwgIkNvbnZlcnRlciIsICJWYWxpZGF0b3IiLCAiTWVzc2FnZSIsICJDb252ZXJ0ZXIiXQp9Cg== \ No newline at end of file diff --git a/packages/suite-utils/dist/index.d.mts b/packages/suite-utils/dist/index.d.mts new file mode 100644 index 000000000..c93bddc0c --- /dev/null +++ b/packages/suite-utils/dist/index.d.mts @@ -0,0 +1,66 @@ +import { PublicKey, Commitment } from '@solana/web3.js'; +export { A as Account, E as Explorer, g as ExplorerOptions, K as KeypairAccount, N as Node, O as OwnerInfo, P as Pubkey, R as Result, S as Secret, T as Try, V as Validator, f as ValidatorError, b as bufferToArray, e as convertTimestampToDateTime, d as debugLog, i as isBrowser, a as isNode, c as isPromise, o as overwriteObject, s as sleep, u as unixTimestamp } from './exports-8dfab8bf.js'; +import 'bn.js'; +import '@metaplex-foundation/mpl-token-metadata'; + +declare namespace Constants { + namespace WarnningMessage { + const NFT_STORAGE_API_KEY = "\n [YOU HAVE TO DO]\n --------------------------------------\n You need to update nftStorageApiKey define parameter in solana-suite.json.\n Can get api key from https://nft.storage/\n --------------------------------------\n "; + const DAS_API_URL = "\n [YOU HAVE TO DO]\n --------------------------------------\n You need to update dasApiUrl define parameter in solana-suite.json.\n can get api url from https://www.helius.dev/\n -------------------------------------- \n "; + const ANNOUNCE = "\n [DEPRECATED]\n --------------------------------------\n Account, Node, toExplorer, Pubkey, Secret have been moved to \n @solana-suite/utils \n ------------------------------------- \n "; + const calculateProbability: () => boolean; + } +} +declare namespace Constants { + const currentCluster: string; + const customClusterUrl: never[]; + const isDebugging: string; + const nftStorageApiKey: string; + const dasApiUrl: never[]; + enum Cluster { + prd = "mainnet-beta", + prdMetaplex = "mainnet-beta-metaplex", + dev = "devnet", + test = "testnet", + localhost = "localhost-devnet" + } + enum EndPointUrl { + prd = "https://api.mainnet-beta.solana.com", + prdMetaplex = "https://api.metaplex.solana.com", + dev = "https://api.devnet.solana.com", + test = "https://api.testnet.solana.com", + localhost = "http://api.devnet.solana.com" + } + enum BundlrUrl { + prd = "https://node1.irys.xyz,https://node2.irys.xyz", + dev = "https://devnet.irys.xyz" + } + enum DasApiUrl { + dev = "https://devnet.helius-rpc.com/?api-key=15319bf4-5b40-4958-ac8d-6313aa55eb92,https://rpc-devnet.helius.xyz?api-key=9f70a843-3274-4ffd-a0a9-323f8b7c0639" + } + enum NftstorageApiKey { + dev = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJkaWQ6ZXRocjoweERGMjcyN2VkODZhRGU1RTMyZDZDZEJlODc0YzRFNDlEODY1OWZmOEMiLCJpc3MiOiJuZnQtc3RvcmFnZSIsImlhdCI6MTYyMDI2NDk0MzcwNiwibmFtZSI6ImRlbW8ifQ.d4J70mikxRB8a5vwNu6SO5HDA8JaueuseAj7Q_ytMCE" + } + const loadConfig: () => Promise; + const switchCluster: (param: { + cluster?: string; + customClusterUrl?: string[]; + }) => string; + const switchBundlr: (env: string) => string; + const switchDasApi: (env: string) => string; + const switchNftStorage: (env: string) => string; + const WRAPPED_TOKEN_PROGRAM_ID: PublicKey; + const MEMO_PROGRAM_ID: PublicKey; + const METAPLEX_PROGRAM_ID: PublicKey; + const COMMITMENT: Commitment; + const NFT_STORAGE_GATEWAY_URL = "https://ipfs.io/ipfs"; + const IRYS_GATEWAY_URL = "https://gateway.irys.xyz"; + const BUNDLR_NETWORK_URL: string; + const DAS_API_URL: string; + const NFT_STORAGE_API_KEY: string; + const EXPLORER_SOLSCAN_URL = "https://solscan.io"; + const EXPLORER_SOLANAFM_URL = "https://solana.fm"; + const EXPLORER_XRAY_URL = "https://xray.helius.xyz"; +} + +export { Constants }; diff --git a/packages/suite-utils/dist/index.d.ts b/packages/suite-utils/dist/index.d.ts new file mode 100644 index 000000000..c93bddc0c --- /dev/null +++ b/packages/suite-utils/dist/index.d.ts @@ -0,0 +1,66 @@ +import { PublicKey, Commitment } from '@solana/web3.js'; +export { A as Account, E as Explorer, g as ExplorerOptions, K as KeypairAccount, N as Node, O as OwnerInfo, P as Pubkey, R as Result, S as Secret, T as Try, V as Validator, f as ValidatorError, b as bufferToArray, e as convertTimestampToDateTime, d as debugLog, i as isBrowser, a as isNode, c as isPromise, o as overwriteObject, s as sleep, u as unixTimestamp } from './exports-8dfab8bf.js'; +import 'bn.js'; +import '@metaplex-foundation/mpl-token-metadata'; + +declare namespace Constants { + namespace WarnningMessage { + const NFT_STORAGE_API_KEY = "\n [YOU HAVE TO DO]\n --------------------------------------\n You need to update nftStorageApiKey define parameter in solana-suite.json.\n Can get api key from https://nft.storage/\n --------------------------------------\n "; + const DAS_API_URL = "\n [YOU HAVE TO DO]\n --------------------------------------\n You need to update dasApiUrl define parameter in solana-suite.json.\n can get api url from https://www.helius.dev/\n -------------------------------------- \n "; + const ANNOUNCE = "\n [DEPRECATED]\n --------------------------------------\n Account, Node, toExplorer, Pubkey, Secret have been moved to \n @solana-suite/utils \n ------------------------------------- \n "; + const calculateProbability: () => boolean; + } +} +declare namespace Constants { + const currentCluster: string; + const customClusterUrl: never[]; + const isDebugging: string; + const nftStorageApiKey: string; + const dasApiUrl: never[]; + enum Cluster { + prd = "mainnet-beta", + prdMetaplex = "mainnet-beta-metaplex", + dev = "devnet", + test = "testnet", + localhost = "localhost-devnet" + } + enum EndPointUrl { + prd = "https://api.mainnet-beta.solana.com", + prdMetaplex = "https://api.metaplex.solana.com", + dev = "https://api.devnet.solana.com", + test = "https://api.testnet.solana.com", + localhost = "http://api.devnet.solana.com" + } + enum BundlrUrl { + prd = "https://node1.irys.xyz,https://node2.irys.xyz", + dev = "https://devnet.irys.xyz" + } + enum DasApiUrl { + dev = "https://devnet.helius-rpc.com/?api-key=15319bf4-5b40-4958-ac8d-6313aa55eb92,https://rpc-devnet.helius.xyz?api-key=9f70a843-3274-4ffd-a0a9-323f8b7c0639" + } + enum NftstorageApiKey { + dev = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJkaWQ6ZXRocjoweERGMjcyN2VkODZhRGU1RTMyZDZDZEJlODc0YzRFNDlEODY1OWZmOEMiLCJpc3MiOiJuZnQtc3RvcmFnZSIsImlhdCI6MTYyMDI2NDk0MzcwNiwibmFtZSI6ImRlbW8ifQ.d4J70mikxRB8a5vwNu6SO5HDA8JaueuseAj7Q_ytMCE" + } + const loadConfig: () => Promise; + const switchCluster: (param: { + cluster?: string; + customClusterUrl?: string[]; + }) => string; + const switchBundlr: (env: string) => string; + const switchDasApi: (env: string) => string; + const switchNftStorage: (env: string) => string; + const WRAPPED_TOKEN_PROGRAM_ID: PublicKey; + const MEMO_PROGRAM_ID: PublicKey; + const METAPLEX_PROGRAM_ID: PublicKey; + const COMMITMENT: Commitment; + const NFT_STORAGE_GATEWAY_URL = "https://ipfs.io/ipfs"; + const IRYS_GATEWAY_URL = "https://gateway.irys.xyz"; + const BUNDLR_NETWORK_URL: string; + const DAS_API_URL: string; + const NFT_STORAGE_API_KEY: string; + const EXPLORER_SOLSCAN_URL = "https://solscan.io"; + const EXPLORER_SOLANAFM_URL = "https://solana.fm"; + const EXPLORER_XRAY_URL = "https://xray.helius.xyz"; +} + +export { Constants }; diff --git a/packages/suite-utils/dist/index.js b/packages/suite-utils/dist/index.js new file mode 100644 index 000000000..5fba45df0 --- /dev/null +++ b/packages/suite-utils/dist/index.js @@ -0,0 +1,1585 @@ +"use strict"; +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + Account: () => Account4, + Constants: () => Constants, + Explorer: () => Explorer, + Node: () => Node, + Result: () => Result, + Try: () => Try, + Validator: () => Validator, + ValidatorError: () => ValidatorError, + bufferToArray: () => bufferToArray, + convertTimestampToDateTime: () => convertTimestampToDateTime, + debugLog: () => debugLog, + isBrowser: () => isBrowser, + isNode: () => isNode, + isPromise: () => isPromise, + overwriteObject: () => overwriteObject, + sleep: () => sleep, + unixTimestamp: () => unixTimestamp +}); +module.exports = __toCommonJS(src_exports); + +// src/constants.ts +var import_web3 = require("@solana/web3.js"); +var import_load = __toESM(require("@solana-suite/config/load")); +var Config = import_load.default; +var Constants; +((Constants2) => { + let WarnningMessage; + ((WarnningMessage2) => { + const THRESHHOLD = 50; + let isDisplay = false; + WarnningMessage2.NFT_STORAGE_API_KEY = ` + [YOU HAVE TO DO] + -------------------------------------- + You need to update nftStorageApiKey define parameter in solana-suite.json. + Can get api key from https://nft.storage/ + -------------------------------------- + `; + WarnningMessage2.DAS_API_URL = ` + [YOU HAVE TO DO] + -------------------------------------- + You need to update dasApiUrl define parameter in solana-suite.json. + can get api url from https://www.helius.dev/ + -------------------------------------- + `; + WarnningMessage2.ANNOUNCE = ` + [DEPRECATED] + -------------------------------------- + Account, Node, toExplorer, Pubkey, Secret have been moved to + @solana-suite/utils + ------------------------------------- + `; + WarnningMessage2.calculateProbability = () => { + const randomValue = Math.random(); + const probability = 1 / THRESHHOLD; + if (!isDisplay && randomValue < probability) { + isDisplay = true; + return true; + } + return false; + }; + })(WarnningMessage = Constants2.WarnningMessage || (Constants2.WarnningMessage = {})); +})(Constants || (Constants = {})); +((Constants2) => { + Constants2.currentCluster = Config.cluster.type; + Constants2.customClusterUrl = Config.cluster.customClusterUrl; + Constants2.isDebugging = Config.debugging; + Constants2.nftStorageApiKey = Config.nftStorageApiKey; + Constants2.dasApiUrl = Config.dasApiUrl; + let Cluster; + ((Cluster2) => { + Cluster2["prd"] = "mainnet-beta"; + Cluster2["prdMetaplex"] = "mainnet-beta-metaplex"; + Cluster2["dev"] = "devnet"; + Cluster2["test"] = "testnet"; + Cluster2["localhost"] = "localhost-devnet"; + })(Cluster = Constants2.Cluster || (Constants2.Cluster = {})); + let EndPointUrl; + ((EndPointUrl2) => { + EndPointUrl2["prd"] = "https://api.mainnet-beta.solana.com"; + EndPointUrl2["prdMetaplex"] = "https://api.metaplex.solana.com"; + EndPointUrl2["dev"] = "https://api.devnet.solana.com"; + EndPointUrl2["test"] = "https://api.testnet.solana.com"; + EndPointUrl2["localhost"] = "http://api.devnet.solana.com"; + })(EndPointUrl = Constants2.EndPointUrl || (Constants2.EndPointUrl = {})); + let BundlrUrl; + ((BundlrUrl2) => { + BundlrUrl2["prd"] = "https://node1.irys.xyz,https://node2.irys.xyz"; + BundlrUrl2["dev"] = "https://devnet.irys.xyz"; + })(BundlrUrl = Constants2.BundlrUrl || (Constants2.BundlrUrl = {})); + let DasApiUrl; + ((DasApiUrl2) => { + DasApiUrl2["dev"] = "https://devnet.helius-rpc.com/?api-key=15319bf4-5b40-4958-ac8d-6313aa55eb92,https://rpc-devnet.helius.xyz?api-key=9f70a843-3274-4ffd-a0a9-323f8b7c0639"; + })(DasApiUrl = Constants2.DasApiUrl || (Constants2.DasApiUrl = {})); + let NftstorageApiKey; + ((NftstorageApiKey2) => { + NftstorageApiKey2["dev"] = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJkaWQ6ZXRocjoweERGMjcyN2VkODZhRGU1RTMyZDZDZEJlODc0YzRFNDlEODY1OWZmOEMiLCJpc3MiOiJuZnQtc3RvcmFnZSIsImlhdCI6MTYyMDI2NDk0MzcwNiwibmFtZSI6ImRlbW8ifQ.d4J70mikxRB8a5vwNu6SO5HDA8JaueuseAj7Q_ytMCE"; + })(NftstorageApiKey = Constants2.NftstorageApiKey || (Constants2.NftstorageApiKey = {})); + Constants2.loadConfig = async () => { + Config = await import("@solana-suite/config/load"); + }; + Constants2.switchCluster = (param) => { + const { cluster: env, customClusterUrl: customClusterUrl2 } = param; + if (customClusterUrl2 && customClusterUrl2.length > 0) { + const index = Date.now() % customClusterUrl2.length; + return customClusterUrl2[index]; + } + switch (env) { + case "mainnet-beta" /* prd */: + return "https://api.mainnet-beta.solana.com" /* prd */; + case "mainnet-beta-metaplex" /* prdMetaplex */: + return "https://api.metaplex.solana.com" /* prdMetaplex */; + case "testnet" /* test */: + return "https://api.testnet.solana.com" /* test */; + case "devnet" /* dev */: + return "https://api.devnet.solana.com" /* dev */; + default: + return "http://api.devnet.solana.com" /* localhost */; + } + }; + Constants2.switchBundlr = (env) => { + switch (env) { + case "mainnet-beta" /* prd */: { + const urls = "https://node1.irys.xyz,https://node2.irys.xyz" /* prd */.split(","); + const index = Date.now() % urls.length; + return urls[index]; + } + default: { + return "https://devnet.irys.xyz" /* dev */; + } + } + }; + Constants2.switchDasApi = (env) => { + switch (env) { + case "mainnet-beta" /* prd */: { + if (Constants2.dasApiUrl.length < 1) { + throw Error(Constants2.WarnningMessage.DAS_API_URL); + } + const urls = "https://node1.irys.xyz,https://node2.irys.xyz" /* prd */.split(","); + const index = Date.now() % urls.length; + return urls[index]; + } + default: { + const urls = "https://devnet.helius-rpc.com/?api-key=15319bf4-5b40-4958-ac8d-6313aa55eb92,https://rpc-devnet.helius.xyz?api-key=9f70a843-3274-4ffd-a0a9-323f8b7c0639" /* dev */.split(","); + const index = Date.now() % urls.length; + return urls[index]; + } + } + }; + Constants2.switchNftStorage = (env) => { + switch (env) { + case "mainnet-beta" /* prd */: + if (!Constants2.nftStorageApiKey) { + throw Error(Constants2.WarnningMessage.NFT_STORAGE_API_KEY); + } + return Constants2.nftStorageApiKey; + default: { + return "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJkaWQ6ZXRocjoweERGMjcyN2VkODZhRGU1RTMyZDZDZEJlODc0YzRFNDlEODY1OWZmOEMiLCJpc3MiOiJuZnQtc3RvcmFnZSIsImlhdCI6MTYyMDI2NDk0MzcwNiwibmFtZSI6ImRlbW8ifQ.d4J70mikxRB8a5vwNu6SO5HDA8JaueuseAj7Q_ytMCE" /* dev */; + } + } + }; + Constants2.WRAPPED_TOKEN_PROGRAM_ID = new import_web3.PublicKey( + "So11111111111111111111111111111111111111112" + ); + Constants2.MEMO_PROGRAM_ID = new import_web3.PublicKey( + "Memo1UhkJRfHyvLMcVucJwxXeuD728EqVDDwQDxFMNo" + ); + Constants2.METAPLEX_PROGRAM_ID = new import_web3.PublicKey( + "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s" + ); + Constants2.COMMITMENT = "confirmed"; + Constants2.NFT_STORAGE_GATEWAY_URL = "https://ipfs.io/ipfs"; + Constants2.IRYS_GATEWAY_URL = "https://gateway.irys.xyz"; + Constants2.BUNDLR_NETWORK_URL = (0, Constants2.switchBundlr)(Config.cluster.type); + Constants2.DAS_API_URL = (0, Constants2.switchDasApi)(Config.cluster.type); + Constants2.NFT_STORAGE_API_KEY = (0, Constants2.switchNftStorage)(Config.cluster.type); + Constants2.EXPLORER_SOLSCAN_URL = "https://solscan.io"; + Constants2.EXPLORER_SOLANAFM_URL = "https://solana.fm"; + Constants2.EXPLORER_XRAY_URL = "https://xray.helius.xyz"; +})(Constants || (Constants = {})); +console.log(Constants.WarnningMessage.ANNOUNCE); + +// ../transaction-builder/src/batch.ts +var import_web34 = require("@solana/web3.js"); + +// ../node/src/index.ts +var import_web32 = require("@solana/web3.js"); +var Node; +((Node2) => { + const setted = { + clusterUrl: "", + commitment: Constants.COMMITMENT, + customClusterUrl: [] + }; + Node2.getConnection = () => { + if (setted.customClusterUrl.length > 0) { + setted.clusterUrl = Constants.switchCluster({ + customClusterUrl: setted.customClusterUrl + }); + } else if (Constants.customClusterUrl.length > 0) { + setted.clusterUrl = Constants.switchCluster({ + customClusterUrl: Constants.customClusterUrl + }); + } else if (!setted.clusterUrl) { + setted.clusterUrl = Constants.switchCluster({ + cluster: Constants.currentCluster + }); + } + if (!setted.commitment) { + setted.commitment = Constants.COMMITMENT; + } + return new import_web32.Connection(setted.clusterUrl, setted.commitment); + }; + Node2.changeConnection = (param) => { + setted.clusterUrl = ""; + setted.customClusterUrl = []; + setted.commitment = Constants.COMMITMENT; + const { cluster, commitment, customClusterUrl } = param; + if (commitment) { + setted.commitment = commitment; + debugLog("# Node change commitment: ", setted.commitment); + } + if (cluster) { + setted.clusterUrl = Constants.switchCluster({ cluster }); + debugLog("# Node change clusterUrl: ", setted.clusterUrl); + } + if (customClusterUrl) { + debugLog("# customClusterUrl: ", customClusterUrl); + setted.clusterUrl = Constants.switchCluster({ customClusterUrl }); + setted.customClusterUrl = customClusterUrl; + debugLog( + "# Node change cluster, custom cluster url: ", + setted.clusterUrl + ); + } + }; + Node2.confirmedSig = async (signature, commitment = Constants.COMMITMENT) => { + const connection = Node2.getConnection(); + const latestBlockhash = await connection.getLatestBlockhash(); + return await connection.confirmTransaction( + { + blockhash: latestBlockhash.blockhash, + lastValidBlockHeight: latestBlockhash.lastValidBlockHeight, + signature + }, + commitment + ).then(Result.ok).catch(Result.err); + }; +})(Node || (Node = {})); + +// ../transaction-builder/src/common.ts +var import_web33 = require("@solana/web3.js"); +var MAX_RETRIES = 3; +var TransactionBuilder; +((TransactionBuilder7) => { + class Common2 { + static MAX_TRANSACTION_SIZE = 1232; + instructions; + signers; + feePayer; + data; + constructor(instructions, signers, feePayer, data) { + this.instructions = instructions; + this.signers = signers; + this.feePayer = feePayer; + this.data = data; + } + submit = async () => { + return Try(async () => { + if (!(this instanceof Common2)) { + throw Error("only Instruction object that can use this"); + } + const transaction = new import_web33.Transaction(); + const blockhashObj = await Node.getConnection().getLatestBlockhash(); + transaction.lastValidBlockHeight = blockhashObj.lastValidBlockHeight; + transaction.recentBlockhash = blockhashObj.blockhash; + let finalSigners = this.signers; + if (this.feePayer) { + transaction.feePayer = this.feePayer.publicKey; + finalSigners = [this.feePayer, ...this.signers]; + } + this.instructions.forEach((inst) => transaction.add(inst)); + const options = { + maxRetries: MAX_RETRIES + }; + return await (0, import_web33.sendAndConfirmTransaction)( + Node.getConnection(), + transaction, + finalSigners, + options + ); + }); + }; + } + TransactionBuilder7.Common = Common2; +})(TransactionBuilder || (TransactionBuilder = {})); + +// ../transaction-builder/src/batch.ts +var TransactionBuilder2; +((TransactionBuilder7) => { + class Batch { + submit = async (arr) => { + return Try(async () => { + let i = 0; + for (const a of arr) { + if (!a.instructions && !a.signers) { + throw Error( + `only Instruction object that can use batchSubmit(). + Index: ${i}, Set value: ${JSON.stringify(a)}` + ); + } + i++; + } + const instructions = arr.flatMap((a) => a.instructions); + const signers = arr.flatMap((a) => a.signers); + const feePayers = arr.filter((a) => a.feePayer !== void 0); + let feePayer = signers[0]; + if (feePayers.length > 0 && feePayers[0].feePayer) { + feePayer = feePayers[0].feePayer; + } + const transaction = new import_web34.Transaction(); + let finalSigners = signers; + if (feePayer) { + transaction.feePayer = feePayer.publicKey; + finalSigners = [feePayer, ...signers]; + } + instructions.map((inst) => transaction.add(inst)); + const options = { + maxRetries: MAX_RETRIES + }; + return await (0, import_web34.sendAndConfirmTransaction)( + Node.getConnection(), + transaction, + finalSigners, + options + ); + }); + }; + } + TransactionBuilder7.Batch = Batch; +})(TransactionBuilder2 || (TransactionBuilder2 = {})); + +// ../transaction-builder/src/mint.ts +var import_web35 = require("@solana/web3.js"); +var TransactionBuilder3; +((TransactionBuilder7) => { + class Mint { + instructions; + signers; + feePayer; + data; + constructor(instructions, signers, feePayer, data) { + this.instructions = instructions; + this.signers = signers; + this.data = data; + this.feePayer = feePayer; + } + submit = async () => { + return Try(async () => { + if (!(this instanceof Mint)) { + throw Error("only MintInstruction object that can use this"); + } + const transaction = new import_web35.Transaction(); + const blockhashObj = await Node.getConnection().getLatestBlockhash(); + transaction.lastValidBlockHeight = blockhashObj.lastValidBlockHeight; + transaction.recentBlockhash = blockhashObj.blockhash; + let finalSigners = this.signers; + if (this.feePayer) { + transaction.feePayer = this.feePayer.publicKey; + finalSigners = [this.feePayer, ...this.signers]; + } + this.instructions.forEach((inst) => transaction.add(inst)); + const options = { + maxRetries: MAX_RETRIES + }; + if (Node.getConnection().rpcEndpoint === Constants.EndPointUrl.prd) { + debugLog("# Change metaplex cluster on mainnet-beta"); + Node.changeConnection({ cluster: Constants.Cluster.prdMetaplex }); + } + return await (0, import_web35.sendAndConfirmTransaction)( + Node.getConnection(), + transaction, + finalSigners, + options + ); + }); + }; + } + TransactionBuilder7.Mint = Mint; +})(TransactionBuilder3 || (TransactionBuilder3 = {})); + +// ../transaction-builder/src/partial-sign.ts +var import_web36 = require("@solana/web3.js"); +var TransactionBuilder4; +((TransactionBuilder7) => { + class PartialSign { + hexInstruction; + data; + canSubmit; + constructor(instructions, mint, canSubmit = false) { + this.hexInstruction = instructions; + this.data = mint; + this.canSubmit = canSubmit; + } + submit = async (feePayer) => { + return Try(async () => { + if (!(this instanceof PartialSign)) { + throw Error("only PartialSignInstruction object that can use this"); + } + const decode = Buffer.from(this.hexInstruction, "hex"); + const transactionFromJson = import_web36.Transaction.from(decode); + transactionFromJson.partialSign(feePayer.toKeypair()); + const options = { + maxRetries: MAX_RETRIES + }; + const wireTransaction = transactionFromJson.serialize(); + return await Node.getConnection().sendRawTransaction( + wireTransaction, + options + ); + }); + }; + } + TransactionBuilder7.PartialSign = PartialSign; +})(TransactionBuilder4 || (TransactionBuilder4 = {})); + +// ../transaction-builder/src/calculate-txsize.ts +var TransactionBuilder5; +((TransactionBuilder7) => { + const LOW_VALUE = 127; + const HIGH_VALUE = 16383; + const MAX_TRANSACTION_SIZE = 1232; + const compactHeader = (n) => n <= LOW_VALUE ? 1 : n <= HIGH_VALUE ? 2 : 3; + const compactArraySize = (n, size) => compactHeader(n) + n * size; + TransactionBuilder7.calculateTxSize = (transaction, feePayer) => { + const feePayerPk = [feePayer.toBase58()]; + const signers = new Set(feePayerPk); + const accounts = new Set(feePayerPk); + const ixsSize = transaction.instructions.reduce((acc, ix) => { + ix.keys.forEach(({ pubkey, isSigner }) => { + const pk = pubkey.toBase58(); + if (isSigner) + signers.add(pk); + accounts.add(pk); + }); + accounts.add(ix.programId.toBase58()); + const nIndexes = ix.keys.length; + const opaqueData = ix.data.length; + return acc + 1 + // PID index + compactArraySize(nIndexes, 1) + compactArraySize(opaqueData, 1); + }, 0); + return compactArraySize(signers.size, 64) + // signatures + 3 + // header + compactArraySize(accounts.size, 32) + // accounts + 32 + // blockhash + compactHeader(transaction.instructions.length) + // instructions + ixsSize; + }; + TransactionBuilder7.isOverTransactionSize = (transaction, feePayer) => { + return (0, TransactionBuilder7.calculateTxSize)(transaction, feePayer) > MAX_TRANSACTION_SIZE; + }; +})(TransactionBuilder5 || (TransactionBuilder5 = {})); + +// ../types/src/global/index.ts +var Explorer = /* @__PURE__ */ ((Explorer2) => { + Explorer2["Solscan"] = "solscan"; + Explorer2["SolanaFM"] = "solanafm"; + Explorer2["Xray"] = "xray"; + return Explorer2; +})(Explorer || {}); + +// ../global/src/index.ts +var import_web39 = require("@solana/web3.js"); + +// ../account/src/associated.ts +var import_spl_token = require("@solana/spl-token"); + +// ../account/src/keypair.ts +var import_web37 = require("@solana/web3.js"); +var import_bs58 = __toESM(require("bs58")); +var Account; +((Account5) => { + class Keypair4 { + secret; + pubkey; + constructor(params) { + if (!params.pubkey) { + const keypair = params.secret.toKeypair(); + this.pubkey = keypair.publicKey.toString(); + } else { + this.pubkey = params.pubkey; + } + this.secret = params.secret; + } + toPublicKey() { + return new import_web37.PublicKey(this.pubkey); + } + toKeypair() { + const decoded = import_bs58.default.decode(this.secret); + return import_web37.Keypair.fromSecretKey(decoded); + } + static isPubkey = (value) => /^[0-9a-zA-Z]{32,44}$/.test(value); + static isSecret = (value) => /^[0-9a-zA-Z]{87,88}$/.test(value); + static create = () => { + const keypair = import_web37.Keypair.generate(); + return new Keypair4({ + pubkey: keypair.publicKey.toString(), + secret: import_bs58.default.encode(keypair.secretKey) + }); + }; + static toKeyPair = (keypair) => { + return new Keypair4({ + pubkey: keypair.publicKey.toString(), + secret: import_bs58.default.encode(keypair.secretKey) + }); + }; + } + Account5.Keypair = Keypair4; +})(Account || (Account = {})); + +// ../account/src/associated.ts +var Account2; +((Account5) => { + let Associated; + ((Associated2) => { + const RETRY_OVER_LIMIT = 10; + const RETRY_SLEEP_TIME = 3; + const get = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { + const res = await (0, Associated2.makeOrCreateInstruction)( + mint, + owner, + new Account.Keypair({ secret: feePayer }).pubkey, + allowOwnerOffCurve + ); + if (!res.inst) { + return res.tokenAccount; + } + return new TransactionBuilder6.Common( + [res.inst], + [], + feePayer.toKeypair(), + res.tokenAccount + ); + }; + Associated2.retryGetOrCreate = async (mint, owner, feePayer) => { + let counter = 1; + while (counter < RETRY_OVER_LIMIT) { + try { + const inst = await get(mint, owner, feePayer, true); + if (inst && typeof inst === "string") { + debugLog("# associatedTokenAccount: ", inst); + return inst; + } else if (inst instanceof TransactionBuilder6.Common) { + (await inst.submit()).map( + async (ok) => { + await Node.confirmedSig(ok); + return inst.data; + }, + (err) => { + debugLog("# Error submit retryGetOrCreate: ", err); + throw err; + } + ); + } + } catch (e) { + debugLog(`# retry: ${counter} create token account: `, e); + debugLog(`# mint: ${mint}, owner: ${owner}, feePayer: ${feePayer}`); + } + await sleep(RETRY_SLEEP_TIME); + counter++; + } + throw Error(`retry action is over limit ${RETRY_OVER_LIMIT}`); + }; + Associated2.makeOrCreateInstruction = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { + const associatedTokenAccount = (0, import_spl_token.getAssociatedTokenAddressSync)( + mint.toPublicKey(), + owner.toPublicKey(), + allowOwnerOffCurve, + import_spl_token.TOKEN_PROGRAM_ID, + import_spl_token.ASSOCIATED_TOKEN_PROGRAM_ID + ); + debugLog("# associatedTokenAccount: ", associatedTokenAccount.toString()); + try { + await (0, import_spl_token.getAccount)( + Node.getConnection(), + associatedTokenAccount, + Node.getConnection().commitment, + import_spl_token.TOKEN_PROGRAM_ID + ); + return { + tokenAccount: associatedTokenAccount.toString(), + inst: void 0 + }; + } catch (error) { + if (!(error instanceof import_spl_token.TokenAccountNotFoundError) && !(error instanceof import_spl_token.TokenInvalidAccountOwnerError)) { + throw Error("Unexpected error"); + } + const payer = !feePayer ? owner : feePayer; + const inst = (0, import_spl_token.createAssociatedTokenAccountInstruction)( + payer.toPublicKey(), + associatedTokenAccount, + owner.toPublicKey(), + mint.toPublicKey(), + import_spl_token.TOKEN_PROGRAM_ID, + import_spl_token.ASSOCIATED_TOKEN_PROGRAM_ID + ); + return { + tokenAccount: associatedTokenAccount.toString(), + inst + }; + } + }; + })(Associated = Account5.Associated || (Account5.Associated = {})); +})(Account2 || (Account2 = {})); + +// ../account/src/pda.ts +var import_web38 = require("@solana/web3.js"); +var import_mpl_token_metadata = require("@metaplex-foundation/mpl-token-metadata"); +var import_mpl_bubblegum = require("@metaplex-foundation/mpl-bubblegum"); +var import_bn = __toESM(require("bn.js")); +var Account3; +((Account5) => { + let Pda; + ((Pda2) => { + Pda2.getMetadata = (address) => { + const [publicKey] = import_web38.PublicKey.findProgramAddressSync( + [ + Buffer.from("metadata"), + import_mpl_token_metadata.PROGRAM_ID.toBuffer(), + address.toPublicKey().toBuffer() + ], + import_mpl_token_metadata.PROGRAM_ID + ); + return publicKey; + }; + Pda2.getMasterEdition = (address) => { + const [publicKey] = import_web38.PublicKey.findProgramAddressSync( + [ + Buffer.from("metadata"), + import_mpl_token_metadata.PROGRAM_ID.toBuffer(), + address.toPublicKey().toBuffer(), + Buffer.from("edition") + ], + import_mpl_token_metadata.PROGRAM_ID + ); + return publicKey; + }; + Pda2.getTreeAuthority = (address) => { + const [publicKey] = import_web38.PublicKey.findProgramAddressSync( + [address.toPublicKey().toBuffer()], + import_mpl_bubblegum.MPL_BUBBLEGUM_PROGRAM_ID.toPublicKey() + ); + return publicKey; + }; + Pda2.getBgumSigner = () => { + const [publicKey] = import_web38.PublicKey.findProgramAddressSync( + [Buffer.from("collection_cpi", "utf8")], + import_mpl_bubblegum.MPL_BUBBLEGUM_PROGRAM_ID.toPublicKey() + ); + return publicKey; + }; + Pda2.getAssetId = (address, leafIndex) => { + const node = new import_bn.default.BN(leafIndex); + const [assetId] = import_web38.PublicKey.findProgramAddressSync( + [ + Buffer.from("asset", "utf8"), + address.toPublicKey().toBuffer(), + Uint8Array.from(node.toArray("le", 8)) + ], + import_mpl_bubblegum.MPL_BUBBLEGUM_PROGRAM_ID.toPublicKey() + ); + return assetId.toString(); + }; + })(Pda = Account5.Pda || (Account5.Pda = {})); +})(Account3 || (Account3 = {})); + +// ../account/src/index.ts +var Account4 = { + ...Account2, + ...Account, + ...Account3 +}; + +// ../global/src/index.ts +var import_bignumber = require("bignumber.js"); +var import_bs582 = __toESM(require("bs58")); +String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, options = {}) { + const endPointUrl = Node.getConnection().rpcEndpoint; + debugLog("# toExplorerUrl rpcEndpoint:", endPointUrl); + let cluster = ""; + if (endPointUrl === Constants.EndPointUrl.prd) { + cluster = Constants.Cluster.prd; + } else if (endPointUrl === Constants.EndPointUrl.test) { + cluster = Constants.Cluster.test; + } else if (endPointUrl === Constants.EndPointUrl.dev) { + cluster = Constants.Cluster.dev; + } else { + cluster = Constants.Cluster.dev; + } + const addressOrSignature = this.toString(); + let url = ""; + if (options.replacePath) { + if (explorer === "solanafm" /* SolanaFM */) { + url = `${Constants.EXPLORER_SOLANAFM_URL}/${options.replacePath}/${addressOrSignature}?cluster=${cluster}`; + } else if (explorer === "xray" /* Xray */) { + url = `${Constants.EXPLORER_XRAY_URL}/${options.replacePath}/${addressOrSignature}?network=${cluster}`; + } else { + url = `${Constants.EXPLORER_SOLSCAN_URL}/${options.replacePath}/${addressOrSignature}?cluster=${cluster}`; + } + return url; + } + if (Account4.Keypair.isPubkey(addressOrSignature)) { + if (explorer === "solanafm" /* SolanaFM */) { + url = `${Constants.EXPLORER_SOLANAFM_URL}/address/${addressOrSignature}?cluster=${cluster}`; + } else if (explorer === "xray" /* Xray */) { + url = `${Constants.EXPLORER_XRAY_URL}/account/${addressOrSignature}?network=${cluster}`; + } else { + url = `${Constants.EXPLORER_SOLSCAN_URL}/account/${addressOrSignature}?cluster=${cluster}`; + } + } else { + if (explorer === "solanafm" /* SolanaFM */) { + url = `${Constants.EXPLORER_SOLANAFM_URL}/tx/${addressOrSignature}?cluster=${cluster}`; + } else if (explorer === "xray" /* Xray */) { + url = `${Constants.EXPLORER_XRAY_URL}/tx/${addressOrSignature}?network=${cluster}`; + } else { + url = `${Constants.EXPLORER_SOLSCAN_URL}/tx/${addressOrSignature}?cluster=${cluster}`; + } + } + return url; +}; +String.prototype.toPublicKey = function() { + if (!Account4.Keypair.isPubkey(this.toString())) { + throw Error(`No match KeyPair.PubKey: ${this.toString()}`); + } + return new import_web39.PublicKey(this.toString()); +}; +String.prototype.toKeypair = function() { + if (!Account4.Keypair.isSecret(this.toString())) { + throw Error(`No match KeyPair.Secret: ${this.toString()}`); + } + const decoded = import_bs582.default.decode(this.toString()); + return import_web39.Keypair.fromSecretKey(decoded); +}; +Number.prototype.toSol = function() { + return (0, import_bignumber.BigNumber)(this).div(import_web39.LAMPORTS_PER_SOL).toNumber(); +}; +Number.prototype.toLamports = function() { + return (0, import_bignumber.BigNumber)(this).times(import_web39.LAMPORTS_PER_SOL).toNumber(); +}; + +// ../transaction-builder/src/index.ts +var TransactionBuilder6 = { + ...TransactionBuilder2, + ...TransactionBuilder5, + ...TransactionBuilder3, + ...TransactionBuilder, + ...TransactionBuilder4 +}; + +// src/shared.ts +var bufferToArray = (buffer) => { + const nums = []; + for (const byte of buffer) { + nums.push(buffer[byte]); + } + return nums; +}; +var overwriteObject = (object, targets) => { + const that = object; + targets.forEach((target) => { + delete that[target.existsKey]; + that[target.will.key] = target.will.value; + }); + return that; +}; +var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { + if (Constants.isDebugging === "true" || process.env.DEBUG === "true") { + console.log("[DEBUG]", data1, data2, data3, data4); + } +}; +var sleep = async (sec) => { + return new Promise((r) => setTimeout(r, sec * 1e3)); +}; +var isBrowser = () => { + return typeof window !== "undefined" && typeof window.document !== "undefined"; +}; +var isNode = () => { + return typeof process !== "undefined" && process.versions != null && process.versions.node != null; +}; +var isPromise = (obj) => { + return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; +}; +function Try(input, finallyInput) { + try { + const v = input(); + if (isPromise(v)) { + return v.then( + (x) => Result.ok(x), + (err) => Result.err(err) + ); + } else { + return Result.ok(v); + } + } catch (e) { + if (e instanceof Error) { + return Result.err(e); + } + return Result.err(Error(e)); + } finally { + if (finallyInput) { + debugLog("# finally input:", finallyInput); + finallyInput(); + } + } +} +var convertTimestampToDateTime = (created_at) => { + if (created_at) { + return new Date(created_at * 1e3); + } + return; +}; +var unixTimestamp = () => { + return Math.floor((/* @__PURE__ */ new Date()).getTime() / 1e3); +}; + +// src/result.ts +var AbstractResult = class { + unwrap(ok, err) { + const r = this._chain( + (value) => Result.ok(ok ? ok(value) : value), + (error) => err ? Result.ok(err(error)) : Result.err(error) + ); + if (r.isErr) { + throw r.error; + } + return r.value; + } + map(ok, err) { + return this._chain( + (value) => Result.ok(ok(value)), + (error) => Result.err(err ? err(error) : error) + ); + } + chain(ok, err) { + return this._chain(ok, err || ((error) => Result.err(error))); + } + match(ok, err) { + this._chain( + (value) => Result.ok(ok(value)), + (error) => Result.err(err(error)) + ); + } + /// single TransactionBuilder //// + /* eslint-disable @typescript-eslint/no-explicit-any */ + async submit(feePayer) { + const res = this.map( + async (ok) => { + debugLog("# result single submit: ", ok); + if (feePayer) { + const obj = ok; + return await obj.submit(feePayer); + } else { + const obj = ok; + return await obj.submit(); + } + }, + (err) => { + return err; + } + ); + if (res.isErr) { + return Result.err(res.error); + } + return res.value; + } +}; +Array.prototype.submit = async function(feePayer) { + if (feePayer) { + let i = 1; + for await (const obj of this) { + if (obj.isErr) { + return obj; + } else if (obj.value.canSubmit) { + debugLog("# Result batch canSubmit"); + const sig = await obj.submit(feePayer); + if (sig.isErr) { + return sig; + } + await Node.confirmedSig(sig.value); + } else { + debugLog("# Result batch other than canSubmit"); + if (this.length == i) { + return obj.submit(feePayer); + } + obj.submit(feePayer); + } + i++; + } + } else { + const instructions = []; + for (const obj of this) { + if (obj.isErr) { + return obj; + } else if (obj.isOk) { + instructions.push(obj.value); + } else { + return Result.err(Error("Only Array Instruction object")); + } + } + debugLog("# Result batch submit: ", instructions); + return new TransactionBuilder6.Batch().submit(instructions); + } +}; +var InternalOk = class extends AbstractResult { + constructor(value) { + super(); + this.value = value; + } + isOk = true; + isErr = false; + /* eslint-disable @typescript-eslint/no-unused-vars */ + _chain(ok, _err) { + return ok(this.value); + } +}; +var InternalErr = class extends AbstractResult { + constructor(error) { + super(); + this.error = error; + } + isOk = false; + isErr = true; + _chain(_ok, err) { + return err(this.error); + } +}; +var Result; +((Result8) => { + function ok(value) { + return new InternalOk(value); + } + Result8.ok = ok; + function err(error) { + return new InternalErr(error || Error()); + } + Result8.err = err; + function all(obj) { + if (Array.isArray(obj)) { + const resArr = []; + for (const item of obj) { + if (item.isErr) { + return item; + } + resArr.push(item.value); + } + return Result8.ok(resArr); + } + const res = {}; + const keys = Object.keys(obj); + for (const key of keys) { + const item = obj[key]; + if (item.isErr) { + return item; + } + res[key] = item.value; + } + return Result8.ok(res); + } + Result8.all = all; +})(Result || (Result = {})); + +// ../converter/src/collection.ts +var Converter; +((Converter15) => { + let Collection; + ((Collection2) => { + Collection2.intoInfra = (input) => { + if (!input) { + return null; + } + return { + key: input.toPublicKey(), + verified: false + }; + }; + Collection2.intoUser = (output) => { + if (!output) { + return void 0; + } + return { + address: output.key.toString(), + verified: output.verified + }; + }; + })(Collection = Converter15.Collection || (Converter15.Collection = {})); + let CollectionMint; + ((CollectionMint2) => { + CollectionMint2.intoUser = (output) => { + const res = output.find((value) => { + if (value.group_key === "collection") { + return value.group_value; + } + }); + return res ? res.group_value : ""; + }; + })(CollectionMint = Converter15.CollectionMint || (Converter15.CollectionMint = {})); +})(Converter || (Converter = {})); + +// ../converter/src/creators.ts +var Converter2; +((Converter15) => { + let Creators; + ((Creators2) => { + Creators2.intoInfra = (input) => { + if (!input) { + return null; + } + return input.map((data) => { + return { + address: data.address.toPublicKey(), + share: data.share, + verified: false + }; + }); + }; + Creators2.intoCompressedNftInfra = (input) => { + if (!input) { + return []; + } + return input.map((data) => { + return { + address: data.address.toPublicKey(), + share: data.share, + verified: false + }; + }); + }; + Creators2.intoUser = (output) => { + if (!output) { + return void 0; + } + return output.map((data) => { + return { + address: data.address.toString(), + share: data.share, + verified: data.verified + }; + }); + }; + })(Creators = Converter15.Creators || (Converter15.Creators = {})); +})(Converter2 || (Converter2 = {})); + +// ../converter/src/compressed-nft-metadata.ts +var import_mpl_bubblegum_instruction = require("mpl-bubblegum-instruction"); +var Converter3; +((Converter15) => { + let CompressedNftMetadata; + ((CompressedNftMetadata2) => { + CompressedNftMetadata2.intoInfra = (input, uri, sellerFeeBasisPoints) => { + return { + name: input.name, + symbol: input.symbol, + uri, + sellerFeeBasisPoints, + creators: Converter2.Creators.intoCompressedNftInfra(input.creators), + collection: Converter.Collection.intoInfra(input.collection), + uses: input.uses || null, + primarySaleHappened: false, + isMutable: input.isMutable ?? false, + editionNonce: 0, + tokenStandard: import_mpl_bubblegum_instruction.TokenStandard.NonFungible, + tokenProgramVersion: import_mpl_bubblegum_instruction.TokenProgramVersion.Original + }; + }; + })(CompressedNftMetadata = Converter15.CompressedNftMetadata || (Converter15.CompressedNftMetadata = {})); +})(Converter3 || (Converter3 = {})); + +// ../converter/src/royalty.ts +var Converter4; +((Converter15) => { + let Royalty; + ((Royalty2) => { + Royalty2.THRESHOLD = 100; + Royalty2.intoInfra = (percentage) => { + return percentage * Royalty2.THRESHOLD; + }; + Royalty2.intoUser = (percentage) => { + return percentage * Royalty2.THRESHOLD; + }; + })(Royalty = Converter15.Royalty || (Converter15.Royalty = {})); +})(Converter4 || (Converter4 = {})); + +// ../converter/src/nft.ts +var Converter5; +((Converter15) => { + let Nft; + ((Nft2) => { + Nft2.intoUser = (output) => { + return { + mint: output.onchain.id.toString(), + collectionMint: Converter.CollectionMint.intoUser( + output.onchain.grouping + ), + authorities: output.onchain.authorities, + royalty: Converter4.Royalty.intoUser(output.onchain.royalty.percent), + name: output.onchain.content.metadata.name, + symbol: output.onchain.content.metadata.symbol, + uri: output.onchain.content.json_uri, + creators: Converter2.Creators.intoUser(output.onchain.creators), + treeAddress: output.onchain.compression.tree, + isCompressed: output.onchain.compression.compressed, + isMutable: output.onchain.mutable, + isBurn: output.onchain.burnt, + editionNonce: output.onchain.supply.edition_nonce, + primarySaleHappened: output.onchain.royalty.primary_sale_happened, + dateTime: convertTimestampToDateTime(output.offchain.created_at), + offchain: output.offchain + }; + }; + })(Nft = Converter15.Nft || (Converter15.Nft = {})); +})(Converter5 || (Converter5 = {})); + +// ../converter/src/memo.ts +var Converter6; +((Converter15) => { + let Memo; + ((Memo2) => { + Memo2.intoUserSide = (output, meta, outputTransfer, mappingTokenAccount) => { + const history = {}; + if (outputTransfer && outputTransfer.program !== "") { + if (mappingTokenAccount && outputTransfer.program === "spl-token") { + const foundSource = mappingTokenAccount.find( + (m) => m.account === outputTransfer.parsed.info.source + ); + const foundDest = mappingTokenAccount.find( + (m) => m.account === outputTransfer.parsed.info.destination + ); + history.mint = outputTransfer.parsed.info.mint; + foundSource && (history.source = foundSource.owner); + foundDest && (history.destination = foundDest.owner); + } else { + history.source = outputTransfer.parsed.info.source; + history.destination = outputTransfer.parsed.info.destination; + } + } + history.memo = output.parsed; + history.type = output.program; + history.dateTime = convertTimestampToDateTime(meta.blockTime); + history.sig = meta.transaction.signatures[0]; + history.innerInstruction = false; + if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { + history.innerInstruction = true; + } + return history; + }; + })(Memo = Converter15.Memo || (Converter15.Memo = {})); +})(Converter6 || (Converter6 = {})); + +// ../converter/src/mint.ts +var Converter7; +((Converter15) => { + let Mint; + ((Mint2) => { + Mint2.intoUserSide = (output, meta) => { + const history = {}; + history.mint = output.parsed.info.mint; + history.mintAuthority = output.parsed.info.mintAuthority; + history.tokenAmount = output.parsed.info.tokenAmount; + history.account = output.parsed.info.account; + history.type = output.program; + history.dateTime = convertTimestampToDateTime(meta.blockTime); + history.sig = meta.transaction.signatures[0]; + history.innerInstruction = false; + if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { + history.innerInstruction = true; + } + return history; + }; + })(Mint = Converter15.Mint || (Converter15.Mint = {})); +})(Converter7 || (Converter7 = {})); + +// ../converter/src/regular-nft-metadata.ts +var Converter8; +((Converter15) => { + let RegularNftMetadata; + ((RegularNftMetadata2) => { + RegularNftMetadata2.intoInfra = (input, uri, sellerFeeBasisPoints) => { + return { + name: input.name, + symbol: input.symbol, + uri, + sellerFeeBasisPoints, + creators: Converter2.Creators.intoInfra(input.creators), + collection: Converter.Collection.intoInfra(input.collection), + uses: input.uses || null + }; + }; + })(RegularNftMetadata = Converter15.RegularNftMetadata || (Converter15.RegularNftMetadata = {})); +})(Converter8 || (Converter8 = {})); + +// ../converter/src/properties.ts +var Converter9; +((Converter15) => { + let Properties; + ((Properties2) => { + Properties2.intoInfra = async (input, callbackFunc, storageType, feePayer) => { + if (!input || !input.files) { + return {}; + } + const files = await Promise.all( + input.files.map(async (file) => { + if (!file.filePath) { + return {}; + } + const res = await callbackFunc(file.filePath, storageType, feePayer); + if (res.isErr) { + throw Error(res.error.message); + } + return overwriteObject(file, [ + { + existsKey: "filePath", + will: { key: "uri", value: res.value } + } + ]); + }) + ); + return { ...input, files }; + }; + })(Properties = Converter15.Properties || (Converter15.Properties = {})); +})(Converter9 || (Converter9 = {})); + +// ../converter/src/uses.ts +var Converter10; +((Converter15) => { + let Uses; + ((Uses2) => { + Uses2.intoUserSide = (output) => { + if (!output) { + return void 0; + } + return output; + }; + })(Uses = Converter15.Uses || (Converter15.Uses = {})); +})(Converter10 || (Converter10 = {})); + +// ../converter/src/token-metadata.ts +var Converter11; +((Converter15) => { + let TokenMetadata; + ((TokenMetadata2) => { + TokenMetadata2.intoInfra = (input, uri, sellerFeeBasisPoints) => { + return { + name: input.name, + symbol: input.symbol, + uri, + sellerFeeBasisPoints, + creators: Converter2.Creators.intoInfra(input.creators), + collection: null, + uses: input.uses || null + }; + }; + TokenMetadata2.intoUser = (output, tokenAmount) => { + return { + mint: output.onchain.mint.toString(), + royalty: output.onchain.data.sellerFeeBasisPoints, + name: (0, TokenMetadata2.deleteNullStrings)(output.onchain.data.name), + symbol: (0, TokenMetadata2.deleteNullStrings)(output.onchain.data.symbol), + tokenAmount, + uri: (0, TokenMetadata2.deleteNullStrings)(output.onchain.data.uri), + creators: Converter2.Creators.intoUser(output.onchain.data.creators), + uses: Converter10.Uses.intoUserSide(output.onchain.uses), + dateTime: convertTimestampToDateTime(output.offchain.created_at), + offchain: output.offchain + }; + }; + TokenMetadata2.deleteNullStrings = (str) => { + return str.replace(/\0/g, ""); + }; + })(TokenMetadata = Converter15.TokenMetadata || (Converter15.TokenMetadata = {})); +})(Converter11 || (Converter11 = {})); + +// ../converter/src/transfer-checked.ts +var Converter12; +((Converter15) => { + let TransferChecked; + ((TransferChecked2) => { + TransferChecked2.intoUserSide = (output, meta, mappingTokenAccount) => { + const history = {}; + if (mappingTokenAccount) { + const foundSource = mappingTokenAccount.find( + (m) => m.account === output.parsed.info.source + ); + const foundDest = mappingTokenAccount.find( + (m) => m.account === output.parsed.info.destination + ); + foundSource && (history.source = foundSource.owner); + foundDest && (history.destination = foundDest.owner); + } + history.tokenAmount = output.parsed.info.tokenAmount; + history.mint = output.parsed.info.mint; + history.multisigAuthority = output.parsed.info.multisigAuthority; + history.signers = output.parsed.info.signers; + history.type = output.program; + history.dateTime = convertTimestampToDateTime(meta.blockTime); + history.sig = meta.transaction.signatures[0]; + history.innerInstruction = false; + if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { + history.innerInstruction = true; + } + return history; + }; + })(TransferChecked = Converter15.TransferChecked || (Converter15.TransferChecked = {})); +})(Converter12 || (Converter12 = {})); + +// ../converter/src/transfer.ts +var Converter13; +((Converter15) => { + let Transfer; + ((Transfer2) => { + Transfer2.intoUserSide = (output, meta) => { + const history = {}; + if (!output.parsed.info.destination || !output.parsed.info.lamports) { + return; + } + history.source = output.parsed.info.source; + history.destination = output.parsed.info.destination; + history.sol = output.parsed.info.lamports?.toSol().toString(); + history.type = output.program; + history.dateTime = convertTimestampToDateTime(meta.blockTime); + history.sig = meta.transaction.signatures[0]; + history.innerInstruction = false; + if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { + history.innerInstruction = true; + } + return history; + }; + })(Transfer = Converter15.Transfer || (Converter15.Transfer = {})); +})(Converter13 || (Converter13 = {})); + +// ../converter/src/index.ts +var Converter14 = { + ...Converter3, + ...Converter, + ...Converter2, + ...Converter5, + ...Converter6, + ...Converter7, + ...Converter8, + ...Converter9, + ...Converter4, + ...Converter11, + ...Converter12, + ...Converter13, + ...Converter10 +}; + +// ../validator/src/index.ts +var Validator; +((Validator2) => { + let Message; + ((Message2) => { + Message2.SUCCESS = "success"; + Message2.SMALL_NUMBER = "too small"; + Message2.BIG_NUMBER = "too big"; + Message2.LONG_LENGTH = "too long"; + Message2.EMPTY = "invalid empty value"; + Message2.INVALID_URL = "invalid url"; + Message2.ONLY_NODE_JS = "`string` type is only Node.js"; + })(Message = Validator2.Message || (Validator2.Message = {})); + Validator2.NAME_LENGTH = 32; + Validator2.SYMBOL_LENGTH = 10; + Validator2.URL_LENGTH = 200; + Validator2.ROYALTY_MAX = 100; + Validator2.SELLER_FEE_BASIS_POINTS_MAX = 1e4; + Validator2.ROYALTY_MIN = 0; + Validator2.isRoyalty = (royalty) => { + return Try(() => { + const key = "royalty"; + if (royalty !== 0 && !royalty) { + throw createError(key, Message.EMPTY, royalty); + } + if (royalty < Validator2.ROYALTY_MIN) { + throw createError(key, Message.SMALL_NUMBER, royalty, { + threshold: Validator2.ROYALTY_MIN, + condition: "underMin" + }); + } else if (royalty > Validator2.ROYALTY_MAX) { + throw createError(key, Message.BIG_NUMBER, royalty, { + threshold: Validator2.ROYALTY_MAX, + condition: "overMax" + }); + } + return Message.SUCCESS; + }); + }; + Validator2.isSellerFeeBasisPoints = (royalty) => { + return Try(() => { + const key = "sellerFeeBasisPoints/seller_fee_basis_points"; + if (royalty !== 0 && !royalty) { + throw createError(key, Message.EMPTY, royalty); + } + if (royalty < Validator2.ROYALTY_MIN) { + throw createError(key, Message.SMALL_NUMBER, royalty, { + threshold: Validator2.ROYALTY_MIN, + condition: "underMin" + }); + } else if (royalty > Validator2.ROYALTY_MAX * Converter14.Royalty.THRESHOLD) { + throw createError(key, Message.BIG_NUMBER, royalty, { + threshold: Validator2.SELLER_FEE_BASIS_POINTS_MAX, + condition: "overMax" + }); + } + return Message.SUCCESS; + }); + }; + Validator2.isName = (name) => { + return Try(() => { + const key = "name"; + if (!name) { + throw createError(key, Message.EMPTY, name); + } + if (byteLength(name) > Validator2.NAME_LENGTH) { + throw createError(key, Message.LONG_LENGTH, name, { + threshold: Validator2.NAME_LENGTH, + condition: "overMax" + }); + } + return Message.SUCCESS; + }); + }; + Validator2.isSymbol = (symbol) => { + return Try(() => { + const key = "symbol"; + if (!symbol) { + throw createError(key, Message.EMPTY, symbol); + } + if (byteLength(symbol) > Validator2.SYMBOL_LENGTH) { + throw createError(key, Message.LONG_LENGTH, symbol, { + threshold: Validator2.SYMBOL_LENGTH, + condition: "overMax" + }); + } + return Message.SUCCESS; + }); + }; + Validator2.isImageUrl = (image) => isUriOrImage(image, "image"); + Validator2.checkAll = (metadata) => { + return Try(() => { + const keys = Object.keys(metadata); + const results = []; + keys.map((key) => { + let res; + switch (key) { + case "image": + if (key in metadata && metadata.image) { + res = (0, Validator2.isImageUrl)(metadata.image); + } + break; + case "royalty": + if (key in metadata && metadata.royalty) { + res = (0, Validator2.isRoyalty)(metadata.royalty); + } + break; + case "seller_fee_basis_points": + if (key in metadata && metadata.seller_fee_basis_points) { + res = (0, Validator2.isSellerFeeBasisPoints)(metadata.seller_fee_basis_points); + } + break; + case "sellerFeeBasisPoints": + if (key in metadata) { + res = (0, Validator2.isSellerFeeBasisPoints)(metadata.sellerFeeBasisPoints); + } + break; + case "name": + if (metadata.name) { + res = (0, Validator2.isName)(metadata.name); + } + break; + case "symbol": + if (metadata.symbol) { + res = (0, Validator2.isSymbol)(metadata.symbol); + } + break; + } + if (res && res.isErr) { + results.push(...res.error.details); + } + }); + if (results.length > 0) { + const message = "Caught in the validation errors. see information e.g: err.details"; + throw new ValidatorError(message, results); + } + return Message.SUCCESS; + }); + }; + const byteLength = (value) => { + const text = new TextEncoder(); + return text.encode(value).length; + }; + const createError = (key, message, actual, limit) => { + let error; + if (limit) { + error = new ValidatorError(message, [{ key, message, actual, limit }]); + } else { + error = new ValidatorError(message, [{ key, message, actual }]); + } + return error; + }; + const isUriOrImage = (imageOrUri, key) => { + return Try(() => { + if (!imageOrUri) { + throw createError(key, Message.EMPTY, imageOrUri); + } + if (byteLength(imageOrUri) > Validator2.URL_LENGTH) { + throw createError(key, Message.LONG_LENGTH, imageOrUri, { + threshold: Validator2.URL_LENGTH, + condition: "overMax" + }); + } + if (!/https?:\/\/[-_.!~*\\()a-zA-Z0-9;?:&=+,%#]+/g.test(imageOrUri)) { + throw createError(key, Message.INVALID_URL, imageOrUri); + } + return Message.SUCCESS; + }); + }; +})(Validator || (Validator = {})); +var ValidatorError = class extends Error { + details; + constructor(message, details) { + super(message); + this.details = details; + } +}; +// Annotate the CommonJS export names for ESM import in node: +0 && (module.exports = { + Account, + Constants, + Explorer, + Node, + Result, + Try, + Validator, + ValidatorError, + bufferToArray, + convertTimestampToDateTime, + debugLog, + isBrowser, + isNode, + isPromise, + overwriteObject, + sleep, + unixTimestamp +}); +//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uL3NyYy9jb25zdGFudHMudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvYmF0Y2gudHMiLCAiLi4vLi4vbm9kZS9zcmMvaW5kZXgudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY29tbW9uLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL21pbnQudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvcGFydGlhbC1zaWduLnRzIiw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lcixcbiAgICAgICAgbmV3IEtleXBhaXIuS2V5cGFpcih7IHNlY3JldDogZmVlUGF5ZXIgfSkucHVia2V5LFxuICAgICAgICBhbGxvd093bmVyT2ZmQ3VydmUsXG4gICAgICApO1xuXG4gICAgICBpZiAoIXJlcy5pbnN0KSB7XG4gICAgICAgIHJldHVybiByZXMudG9rZW5BY2NvdW50O1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb248UHVia2V5PihcbiAgICAgICAgW3Jlcy5pbnN0XSxcbiAgICAgICAgW10sXG4gICAgICAgIGZlZVBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICByZXMudG9rZW5BY2NvdW50ISxcbiAgICAgICk7XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIFJldHJ5IGZ1bmN0aW9uIGlmIGNyZWF0ZSBuZXcgdG9rZW4gYWNjb3VpbnRcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBtaW50XG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAgICogQHBhcmFtIHtTZWNyZXR9IGZlZVBheWVyXG4gICAgICogQHJldHVybnMgUHJvbWlzZTxzdHJpbmc+XG4gICAgICovXG4gICAgZXhwb3J0IGNvbnN0IHJldHJ5R2V0T3JDcmVhdGUgPSBhc3luYyAoXG4gICAgICBtaW50OiBQdWJrZXksXG4gICAgICBvd25lcjogUHVia2V5LFxuICAgICAgZmVlUGF5ZXI6IFNlY3JldCxcbiAgICApOiBQcm9taXNlPHN0cmluZz4gPT4ge1xuICAgICAgbGV0IGNvdW50ZXIgPSAxO1xuICAgICAgd2hpbGUgKGNvdW50ZXIgPCBSRVRSWV9PVkVSX0xJTUlUKSB7XG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgY29uc3QgaW5zdCA9IGF3YWl0IGdldChtaW50LCBvd25lciwgZmVlUGF5ZXIsIHRydWUpO1xuXG4gICAgICAgICAgaWYgKGluc3QgJiYgdHlwZW9mIGluc3QgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICBkZWJ1Z0xvZygnIyBhc3NvY2lhdGVkVG9rZW5BY2NvdW50OiAnLCBpbnN0KTtcbiAgICAgICAgICAgIHJldHVybiBpbnN0O1xuICAgICAgICAgIH0gZWxzZSBpZiAoaW5zdCBpbnN0YW5jZW9mIFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb24pIHtcbiAgICAgICAgICAgIChhd2FpdCBpbnN0LnN1Ym1pdCgpKS5tYXAoXG4gICAgICAgICAgICAgIGFzeW5jIChvazogc3RyaW5nKSA9PiB7XG4gICAgICAgICAgICAgICAgYXdhaXQgTm9kZS5jb25maXJtZWRTaWcob2spO1xuICAgICAgICAgICAgICAgIHJldHVybiBpbnN0LmRhdGE7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIChlcnI6IEVycm9yKSA9PiB7XG4gICAgICAgICAgICAgICAgZGVidWdMb2coJyMgRXJyb3Igc3VibWl0IHJldHJ5R2V0T3JDcmVhdGU6ICcsIGVycik7XG4gICAgICAgICAgICAgICAgdGhyb3cgZXJyO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICBkZWJ1Z0xvZyhgIyByZXRyeTogJHtjb3VudGVyfSBjcmVhdGUgdG9rZW4gYWNjb3VudDogYCwgZSk7XG4gICAgICAgICAgZGVidWdMb2coYCMgbWludDogJHttaW50fSwgb3duZXI6ICR7b3duZXJ9LCBmZWVQYXllcjogJHtmZWVQYXllcn1gKTtcbiAgICAgICAgfVxuICAgICAgICBhd2FpdCBzbGVlcChSRVRSWV9TTEVFUF9USU1FKTtcbiAgICAgICAgY291bnRlcisrO1xuICAgICAgfVxuICAgICAgdGhyb3cgRXJyb3IoYHJldHJ5IGFjdGlvbiBpcyBvdmVyIGxpbWl0ICR7UkVUUllfT1ZFUl9MSU1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BY2NvdW50LnRvU3RyaW5nKCkpO1xuXG4gICAgICB0cnkge1xuICAgICAgICAvLyBEb250IHVzZSBSZXN1bHRcbiAgICAgICAgYXdhaXQgZ2V0QWNjb3VudChcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLmNvbW1pdG1lbnQsXG4gICAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICB0b2tlbkFjY291bnQ6IGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSxcbiAgICAgICAgICBpbnN0OiB1bmRlZmluZWQsXG4gICAgICAgIH07XG4gICAgICB9IGNhdGNoIChlcnJvcjogdW5rbm93bikge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuQWNjb3VudE5vdEZvdW5kRXJyb3IpICYmXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuSW52YWxpZEFjY291bnRPd25lckVycm9yKVxuICAgICAgICApIHtcbiAgICAgICAgICB0aHJvdyBFcnJvcignVW5leHBlY3RlZCBlcnJvcicpO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgcGF5ZXIgPSAhZmVlUGF5ZXIgPyBvd25lciA6IGZlZVBheWVyO1xuXG4gICAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVBc3NvY2lhdGVkVG9rZW5BY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgcGF5ZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgIC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BY2NvdW50KSB7XG4gICAgICAgIGNvbnN0IGZvdW5kU291cmNlID0gbWFwcGluZ1Rva2VuQWNjb3VudC5maW5kKFxuICAgICAgICAgIChtKSA9PiBtLmFjY291bnQgPT09IG91dHB1dC5wYXJzZWQuaW5mby5zb3VyY2UsXG4gICAgICAgICk7XG4gICAgICAgIGNvbnN0IGZvdW5kRGVzdCA9IG1hcHBpbmdUb2tlbkFjY291bnQuZmluZChcbiAgICAgICAgICAobSkgPT4gbS5hY2NvdW50ID09PSBvdXRwdXQucGFyc2VkLmluZm8uZGVzdGluYXRpb24sXG4gICAgICAgICk7XG4gICAgICAgIGZvdW5kU291cmNlICYmIChoaXN0b3J5LnNvdXJjZSA9IGZvdW5kU291cmNlLm93bmVyKTtcbiAgICAgICAgZm91bmREZXN0ICYmIChoaXN0b3J5LmRlc3RpbmF0aW9uID0gZm91bmREZXN0Lm93bmVyKTtcbiAgICAgIH1cblxuICAgICAgaGlzdG9yeS50b2tlbkFtb3VudCA9IG91dHB1dC5wYXJzZWQuaW5mby50b2tlbkFtb3VudDtcbiAgICAgIGhpc3RvcnkubWludCA9IG91dHB1dC5wYXJzZWQuaW5mby5taW50O1xuICAgICAgaGlzdG9yeS5tdWx0aXNpZ0F1dGhvcml0eSA9IG91dHB1dC5wYXJzZWQuaW5mby5tdWx0aXNpZ0F1dGhvcml0eTtcbiAgICAgIGhpc3Rvcnkuc2lnbmVycyA9IG91dHB1dC5wYXJzZWQuaW5mby5zaWduZXJzO1xuICAgICAgaGlzdG9yeS50eXBlID0gb3V0cHV0LnByb2dyYW07XG4gICAgICBoaXN0b3J5LmRhdGVUaW1lID0gY29udmVydFRpbWVzdGFtcFRvRGF0ZVRpbWUobWV0YS5ibG9ja1RpbWUgYXMgbnVtYmVyKTtcbiAgICAgIGhpc3Rvcnkuc2lnID0gbWV0YS50cmFuc2FjdGlvbi5zaWduYXR1cmVzWzBdO1xuICAgICAgaGlzdG9yeS5pbm5lckluc3RydWN0aW9uID0gZmFsc2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IGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEucm95YWx0eSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1JveWFsdHkobWV0YWRhdGEucm95YWx0eSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ25hbWUnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLm5hbWUpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNOYW1lKG1ldGFkYXRhLm5hbWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc3ltYm9sJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5zeW1ib2wpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTeW1ib2wobWV0YWRhdGEuc3ltYm9sKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgICAgIGlmIChyZXMgJi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uc2ZlciIsICJDb252ZXJ0ZXIiLCAiVmFsaWRhdG9yIiwgIk1lc3NhZ2UiLCAiQ29udmVydGVyIl0KfQo= \ No newline at end of file diff --git a/packages/suite-utils/dist/index.mjs b/packages/suite-utils/dist/index.mjs new file mode 100644 index 000000000..ee4d690b4 --- /dev/null +++ b/packages/suite-utils/dist/index.mjs @@ -0,0 +1,1554 @@ +// src/constants.ts +import { PublicKey } from "@solana/web3.js"; +import SolanaJsonConfig from "@solana-suite/config/load"; +var Config = SolanaJsonConfig; +var Constants; +((Constants2) => { + let WarnningMessage; + ((WarnningMessage2) => { + const THRESHHOLD = 50; + let isDisplay = false; + WarnningMessage2.NFT_STORAGE_API_KEY = ` + [YOU HAVE TO DO] + -------------------------------------- + You need to update nftStorageApiKey define parameter in solana-suite.json. + Can get api key from https://nft.storage/ + -------------------------------------- + `; + WarnningMessage2.DAS_API_URL = ` + [YOU HAVE TO DO] + -------------------------------------- + You need to update dasApiUrl define parameter in solana-suite.json. + can get api url from https://www.helius.dev/ + -------------------------------------- + `; + WarnningMessage2.ANNOUNCE = ` + [DEPRECATED] + -------------------------------------- + Account, Node, toExplorer, Pubkey, Secret have been moved to + @solana-suite/utils + ------------------------------------- + `; + WarnningMessage2.calculateProbability = () => { + const randomValue = Math.random(); + const probability = 1 / THRESHHOLD; + if (!isDisplay && randomValue < probability) { + isDisplay = true; + return true; + } + return false; + }; + })(WarnningMessage = Constants2.WarnningMessage || (Constants2.WarnningMessage = {})); +})(Constants || (Constants = {})); +((Constants2) => { + Constants2.currentCluster = Config.cluster.type; + Constants2.customClusterUrl = Config.cluster.customClusterUrl; + Constants2.isDebugging = Config.debugging; + Constants2.nftStorageApiKey = Config.nftStorageApiKey; + Constants2.dasApiUrl = Config.dasApiUrl; + let Cluster; + ((Cluster2) => { + Cluster2["prd"] = "mainnet-beta"; + Cluster2["prdMetaplex"] = "mainnet-beta-metaplex"; + Cluster2["dev"] = "devnet"; + Cluster2["test"] = "testnet"; + Cluster2["localhost"] = "localhost-devnet"; + })(Cluster = Constants2.Cluster || (Constants2.Cluster = {})); + let EndPointUrl; + ((EndPointUrl2) => { + EndPointUrl2["prd"] = "https://api.mainnet-beta.solana.com"; + EndPointUrl2["prdMetaplex"] = "https://api.metaplex.solana.com"; + EndPointUrl2["dev"] = "https://api.devnet.solana.com"; + EndPointUrl2["test"] = "https://api.testnet.solana.com"; + EndPointUrl2["localhost"] = "http://api.devnet.solana.com"; + })(EndPointUrl = Constants2.EndPointUrl || (Constants2.EndPointUrl = {})); + let BundlrUrl; + ((BundlrUrl2) => { + BundlrUrl2["prd"] = "https://node1.irys.xyz,https://node2.irys.xyz"; + BundlrUrl2["dev"] = "https://devnet.irys.xyz"; + })(BundlrUrl = Constants2.BundlrUrl || (Constants2.BundlrUrl = {})); + let DasApiUrl; + ((DasApiUrl2) => { + DasApiUrl2["dev"] = "https://devnet.helius-rpc.com/?api-key=15319bf4-5b40-4958-ac8d-6313aa55eb92,https://rpc-devnet.helius.xyz?api-key=9f70a843-3274-4ffd-a0a9-323f8b7c0639"; + })(DasApiUrl = Constants2.DasApiUrl || (Constants2.DasApiUrl = {})); + let NftstorageApiKey; + ((NftstorageApiKey2) => { + NftstorageApiKey2["dev"] = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJkaWQ6ZXRocjoweERGMjcyN2VkODZhRGU1RTMyZDZDZEJlODc0YzRFNDlEODY1OWZmOEMiLCJpc3MiOiJuZnQtc3RvcmFnZSIsImlhdCI6MTYyMDI2NDk0MzcwNiwibmFtZSI6ImRlbW8ifQ.d4J70mikxRB8a5vwNu6SO5HDA8JaueuseAj7Q_ytMCE"; + })(NftstorageApiKey = Constants2.NftstorageApiKey || (Constants2.NftstorageApiKey = {})); + Constants2.loadConfig = async () => { + Config = await import("@solana-suite/config/load"); + }; + Constants2.switchCluster = (param) => { + const { cluster: env, customClusterUrl: customClusterUrl2 } = param; + if (customClusterUrl2 && customClusterUrl2.length > 0) { + const index = Date.now() % customClusterUrl2.length; + return customClusterUrl2[index]; + } + switch (env) { + case "mainnet-beta" /* prd */: + return "https://api.mainnet-beta.solana.com" /* prd */; + case "mainnet-beta-metaplex" /* prdMetaplex */: + return "https://api.metaplex.solana.com" /* prdMetaplex */; + case "testnet" /* test */: + return "https://api.testnet.solana.com" /* test */; + case "devnet" /* dev */: + return "https://api.devnet.solana.com" /* dev */; + default: + return "http://api.devnet.solana.com" /* localhost */; + } + }; + Constants2.switchBundlr = (env) => { + switch (env) { + case "mainnet-beta" /* prd */: { + const urls = "https://node1.irys.xyz,https://node2.irys.xyz" /* prd */.split(","); + const index = Date.now() % urls.length; + return urls[index]; + } + default: { + return "https://devnet.irys.xyz" /* dev */; + } + } + }; + Constants2.switchDasApi = (env) => { + switch (env) { + case "mainnet-beta" /* prd */: { + if (Constants2.dasApiUrl.length < 1) { + throw Error(Constants2.WarnningMessage.DAS_API_URL); + } + const urls = "https://node1.irys.xyz,https://node2.irys.xyz" /* prd */.split(","); + const index = Date.now() % urls.length; + return urls[index]; + } + default: { + const urls = "https://devnet.helius-rpc.com/?api-key=15319bf4-5b40-4958-ac8d-6313aa55eb92,https://rpc-devnet.helius.xyz?api-key=9f70a843-3274-4ffd-a0a9-323f8b7c0639" /* dev */.split(","); + const index = Date.now() % urls.length; + return urls[index]; + } + } + }; + Constants2.switchNftStorage = (env) => { + switch (env) { + case "mainnet-beta" /* prd */: + if (!Constants2.nftStorageApiKey) { + throw Error(Constants2.WarnningMessage.NFT_STORAGE_API_KEY); + } + return Constants2.nftStorageApiKey; + default: { + return "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJkaWQ6ZXRocjoweERGMjcyN2VkODZhRGU1RTMyZDZDZEJlODc0YzRFNDlEODY1OWZmOEMiLCJpc3MiOiJuZnQtc3RvcmFnZSIsImlhdCI6MTYyMDI2NDk0MzcwNiwibmFtZSI6ImRlbW8ifQ.d4J70mikxRB8a5vwNu6SO5HDA8JaueuseAj7Q_ytMCE" /* dev */; + } + } + }; + Constants2.WRAPPED_TOKEN_PROGRAM_ID = new PublicKey( + "So11111111111111111111111111111111111111112" + ); + Constants2.MEMO_PROGRAM_ID = new PublicKey( + "Memo1UhkJRfHyvLMcVucJwxXeuD728EqVDDwQDxFMNo" + ); + Constants2.METAPLEX_PROGRAM_ID = new PublicKey( + "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s" + ); + Constants2.COMMITMENT = "confirmed"; + Constants2.NFT_STORAGE_GATEWAY_URL = "https://ipfs.io/ipfs"; + Constants2.IRYS_GATEWAY_URL = "https://gateway.irys.xyz"; + Constants2.BUNDLR_NETWORK_URL = (0, Constants2.switchBundlr)(Config.cluster.type); + Constants2.DAS_API_URL = (0, Constants2.switchDasApi)(Config.cluster.type); + Constants2.NFT_STORAGE_API_KEY = (0, Constants2.switchNftStorage)(Config.cluster.type); + Constants2.EXPLORER_SOLSCAN_URL = "https://solscan.io"; + Constants2.EXPLORER_SOLANAFM_URL = "https://solana.fm"; + Constants2.EXPLORER_XRAY_URL = "https://xray.helius.xyz"; +})(Constants || (Constants = {})); +console.log(Constants.WarnningMessage.ANNOUNCE); + +// ../transaction-builder/src/batch.ts +import { + sendAndConfirmTransaction as sendAndConfirmTransaction2, + Transaction as Transaction2 +} from "@solana/web3.js"; + +// ../node/src/index.ts +import { Connection } from "@solana/web3.js"; +var Node; +((Node2) => { + const setted = { + clusterUrl: "", + commitment: Constants.COMMITMENT, + customClusterUrl: [] + }; + Node2.getConnection = () => { + if (setted.customClusterUrl.length > 0) { + setted.clusterUrl = Constants.switchCluster({ + customClusterUrl: setted.customClusterUrl + }); + } else if (Constants.customClusterUrl.length > 0) { + setted.clusterUrl = Constants.switchCluster({ + customClusterUrl: Constants.customClusterUrl + }); + } else if (!setted.clusterUrl) { + setted.clusterUrl = Constants.switchCluster({ + cluster: Constants.currentCluster + }); + } + if (!setted.commitment) { + setted.commitment = Constants.COMMITMENT; + } + return new Connection(setted.clusterUrl, setted.commitment); + }; + Node2.changeConnection = (param) => { + setted.clusterUrl = ""; + setted.customClusterUrl = []; + setted.commitment = Constants.COMMITMENT; + const { cluster, commitment, customClusterUrl } = param; + if (commitment) { + setted.commitment = commitment; + debugLog("# Node change commitment: ", setted.commitment); + } + if (cluster) { + setted.clusterUrl = Constants.switchCluster({ cluster }); + debugLog("# Node change clusterUrl: ", setted.clusterUrl); + } + if (customClusterUrl) { + debugLog("# customClusterUrl: ", customClusterUrl); + setted.clusterUrl = Constants.switchCluster({ customClusterUrl }); + setted.customClusterUrl = customClusterUrl; + debugLog( + "# Node change cluster, custom cluster url: ", + setted.clusterUrl + ); + } + }; + Node2.confirmedSig = async (signature, commitment = Constants.COMMITMENT) => { + const connection = Node2.getConnection(); + const latestBlockhash = await connection.getLatestBlockhash(); + return await connection.confirmTransaction( + { + blockhash: latestBlockhash.blockhash, + lastValidBlockHeight: latestBlockhash.lastValidBlockHeight, + signature + }, + commitment + ).then(Result.ok).catch(Result.err); + }; +})(Node || (Node = {})); + +// ../transaction-builder/src/common.ts +import { + sendAndConfirmTransaction, + Transaction +} from "@solana/web3.js"; +var MAX_RETRIES = 3; +var TransactionBuilder; +((TransactionBuilder7) => { + class Common2 { + static MAX_TRANSACTION_SIZE = 1232; + instructions; + signers; + feePayer; + data; + constructor(instructions, signers, feePayer, data) { + this.instructions = instructions; + this.signers = signers; + this.feePayer = feePayer; + this.data = data; + } + submit = async () => { + return Try(async () => { + if (!(this instanceof Common2)) { + throw Error("only Instruction object that can use this"); + } + const transaction = new Transaction(); + const blockhashObj = await Node.getConnection().getLatestBlockhash(); + transaction.lastValidBlockHeight = blockhashObj.lastValidBlockHeight; + transaction.recentBlockhash = blockhashObj.blockhash; + let finalSigners = this.signers; + if (this.feePayer) { + transaction.feePayer = this.feePayer.publicKey; + finalSigners = [this.feePayer, ...this.signers]; + } + this.instructions.forEach((inst) => transaction.add(inst)); + const options = { + maxRetries: MAX_RETRIES + }; + return await sendAndConfirmTransaction( + Node.getConnection(), + transaction, + finalSigners, + options + ); + }); + }; + } + TransactionBuilder7.Common = Common2; +})(TransactionBuilder || (TransactionBuilder = {})); + +// ../transaction-builder/src/batch.ts +var TransactionBuilder2; +((TransactionBuilder7) => { + class Batch { + submit = async (arr) => { + return Try(async () => { + let i = 0; + for (const a of arr) { + if (!a.instructions && !a.signers) { + throw Error( + `only Instruction object that can use batchSubmit(). + Index: ${i}, Set value: ${JSON.stringify(a)}` + ); + } + i++; + } + const instructions = arr.flatMap((a) => a.instructions); + const signers = arr.flatMap((a) => a.signers); + const feePayers = arr.filter((a) => a.feePayer !== void 0); + let feePayer = signers[0]; + if (feePayers.length > 0 && feePayers[0].feePayer) { + feePayer = feePayers[0].feePayer; + } + const transaction = new Transaction2(); + let finalSigners = signers; + if (feePayer) { + transaction.feePayer = feePayer.publicKey; + finalSigners = [feePayer, ...signers]; + } + instructions.map((inst) => transaction.add(inst)); + const options = { + maxRetries: MAX_RETRIES + }; + return await sendAndConfirmTransaction2( + Node.getConnection(), + transaction, + finalSigners, + options + ); + }); + }; + } + TransactionBuilder7.Batch = Batch; +})(TransactionBuilder2 || (TransactionBuilder2 = {})); + +// ../transaction-builder/src/mint.ts +import { + sendAndConfirmTransaction as sendAndConfirmTransaction3, + Transaction as Transaction3 +} from "@solana/web3.js"; +var TransactionBuilder3; +((TransactionBuilder7) => { + class Mint { + instructions; + signers; + feePayer; + data; + constructor(instructions, signers, feePayer, data) { + this.instructions = instructions; + this.signers = signers; + this.data = data; + this.feePayer = feePayer; + } + submit = async () => { + return Try(async () => { + if (!(this instanceof Mint)) { + throw Error("only MintInstruction object that can use this"); + } + const transaction = new Transaction3(); + const blockhashObj = await Node.getConnection().getLatestBlockhash(); + transaction.lastValidBlockHeight = blockhashObj.lastValidBlockHeight; + transaction.recentBlockhash = blockhashObj.blockhash; + let finalSigners = this.signers; + if (this.feePayer) { + transaction.feePayer = this.feePayer.publicKey; + finalSigners = [this.feePayer, ...this.signers]; + } + this.instructions.forEach((inst) => transaction.add(inst)); + const options = { + maxRetries: MAX_RETRIES + }; + if (Node.getConnection().rpcEndpoint === Constants.EndPointUrl.prd) { + debugLog("# Change metaplex cluster on mainnet-beta"); + Node.changeConnection({ cluster: Constants.Cluster.prdMetaplex }); + } + return await sendAndConfirmTransaction3( + Node.getConnection(), + transaction, + finalSigners, + options + ); + }); + }; + } + TransactionBuilder7.Mint = Mint; +})(TransactionBuilder3 || (TransactionBuilder3 = {})); + +// ../transaction-builder/src/partial-sign.ts +import { + Transaction as Transaction4 +} from "@solana/web3.js"; +var TransactionBuilder4; +((TransactionBuilder7) => { + class PartialSign { + hexInstruction; + data; + canSubmit; + constructor(instructions, mint, canSubmit = false) { + this.hexInstruction = instructions; + this.data = mint; + this.canSubmit = canSubmit; + } + submit = async (feePayer) => { + return Try(async () => { + if (!(this instanceof PartialSign)) { + throw Error("only PartialSignInstruction object that can use this"); + } + const decode = Buffer.from(this.hexInstruction, "hex"); + const transactionFromJson = Transaction4.from(decode); + transactionFromJson.partialSign(feePayer.toKeypair()); + const options = { + maxRetries: MAX_RETRIES + }; + const wireTransaction = transactionFromJson.serialize(); + return await Node.getConnection().sendRawTransaction( + wireTransaction, + options + ); + }); + }; + } + TransactionBuilder7.PartialSign = PartialSign; +})(TransactionBuilder4 || (TransactionBuilder4 = {})); + +// ../transaction-builder/src/calculate-txsize.ts +var TransactionBuilder5; +((TransactionBuilder7) => { + const LOW_VALUE = 127; + const HIGH_VALUE = 16383; + const MAX_TRANSACTION_SIZE = 1232; + const compactHeader = (n) => n <= LOW_VALUE ? 1 : n <= HIGH_VALUE ? 2 : 3; + const compactArraySize = (n, size) => compactHeader(n) + n * size; + TransactionBuilder7.calculateTxSize = (transaction, feePayer) => { + const feePayerPk = [feePayer.toBase58()]; + const signers = new Set(feePayerPk); + const accounts = new Set(feePayerPk); + const ixsSize = transaction.instructions.reduce((acc, ix) => { + ix.keys.forEach(({ pubkey, isSigner }) => { + const pk = pubkey.toBase58(); + if (isSigner) + signers.add(pk); + accounts.add(pk); + }); + accounts.add(ix.programId.toBase58()); + const nIndexes = ix.keys.length; + const opaqueData = ix.data.length; + return acc + 1 + // PID index + compactArraySize(nIndexes, 1) + compactArraySize(opaqueData, 1); + }, 0); + return compactArraySize(signers.size, 64) + // signatures + 3 + // header + compactArraySize(accounts.size, 32) + // accounts + 32 + // blockhash + compactHeader(transaction.instructions.length) + // instructions + ixsSize; + }; + TransactionBuilder7.isOverTransactionSize = (transaction, feePayer) => { + return (0, TransactionBuilder7.calculateTxSize)(transaction, feePayer) > MAX_TRANSACTION_SIZE; + }; +})(TransactionBuilder5 || (TransactionBuilder5 = {})); + +// ../types/src/global/index.ts +var Explorer = /* @__PURE__ */ ((Explorer2) => { + Explorer2["Solscan"] = "solscan"; + Explorer2["SolanaFM"] = "solanafm"; + Explorer2["Xray"] = "xray"; + return Explorer2; +})(Explorer || {}); + +// ../global/src/index.ts +import { Keypair as Keypair3, LAMPORTS_PER_SOL, PublicKey as PublicKey4 } from "@solana/web3.js"; + +// ../account/src/associated.ts +import { + ASSOCIATED_TOKEN_PROGRAM_ID, + createAssociatedTokenAccountInstruction, + getAccount, + getAssociatedTokenAddressSync, + TOKEN_PROGRAM_ID, + TokenAccountNotFoundError, + TokenInvalidAccountOwnerError +} from "@solana/spl-token"; + +// ../account/src/keypair.ts +import { Keypair as Original, PublicKey as PublicKey2 } from "@solana/web3.js"; +import bs from "bs58"; +var Account; +((Account5) => { + class Keypair4 { + secret; + pubkey; + constructor(params) { + if (!params.pubkey) { + const keypair = params.secret.toKeypair(); + this.pubkey = keypair.publicKey.toString(); + } else { + this.pubkey = params.pubkey; + } + this.secret = params.secret; + } + toPublicKey() { + return new PublicKey2(this.pubkey); + } + toKeypair() { + const decoded = bs.decode(this.secret); + return Original.fromSecretKey(decoded); + } + static isPubkey = (value) => /^[0-9a-zA-Z]{32,44}$/.test(value); + static isSecret = (value) => /^[0-9a-zA-Z]{87,88}$/.test(value); + static create = () => { + const keypair = Original.generate(); + return new Keypair4({ + pubkey: keypair.publicKey.toString(), + secret: bs.encode(keypair.secretKey) + }); + }; + static toKeyPair = (keypair) => { + return new Keypair4({ + pubkey: keypair.publicKey.toString(), + secret: bs.encode(keypair.secretKey) + }); + }; + } + Account5.Keypair = Keypair4; +})(Account || (Account = {})); + +// ../account/src/associated.ts +var Account2; +((Account5) => { + let Associated; + ((Associated2) => { + const RETRY_OVER_LIMIT = 10; + const RETRY_SLEEP_TIME = 3; + const get = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { + const res = await (0, Associated2.makeOrCreateInstruction)( + mint, + owner, + new Account.Keypair({ secret: feePayer }).pubkey, + allowOwnerOffCurve + ); + if (!res.inst) { + return res.tokenAccount; + } + return new TransactionBuilder6.Common( + [res.inst], + [], + feePayer.toKeypair(), + res.tokenAccount + ); + }; + Associated2.retryGetOrCreate = async (mint, owner, feePayer) => { + let counter = 1; + while (counter < RETRY_OVER_LIMIT) { + try { + const inst = await get(mint, owner, feePayer, true); + if (inst && typeof inst === "string") { + debugLog("# associatedTokenAccount: ", inst); + return inst; + } else if (inst instanceof TransactionBuilder6.Common) { + (await inst.submit()).map( + async (ok) => { + await Node.confirmedSig(ok); + return inst.data; + }, + (err) => { + debugLog("# Error submit retryGetOrCreate: ", err); + throw err; + } + ); + } + } catch (e) { + debugLog(`# retry: ${counter} create token account: `, e); + debugLog(`# mint: ${mint}, owner: ${owner}, feePayer: ${feePayer}`); + } + await sleep(RETRY_SLEEP_TIME); + counter++; + } + throw Error(`retry action is over limit ${RETRY_OVER_LIMIT}`); + }; + Associated2.makeOrCreateInstruction = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { + const associatedTokenAccount = getAssociatedTokenAddressSync( + mint.toPublicKey(), + owner.toPublicKey(), + allowOwnerOffCurve, + TOKEN_PROGRAM_ID, + ASSOCIATED_TOKEN_PROGRAM_ID + ); + debugLog("# associatedTokenAccount: ", associatedTokenAccount.toString()); + try { + await getAccount( + Node.getConnection(), + associatedTokenAccount, + Node.getConnection().commitment, + TOKEN_PROGRAM_ID + ); + return { + tokenAccount: associatedTokenAccount.toString(), + inst: void 0 + }; + } catch (error) { + if (!(error instanceof TokenAccountNotFoundError) && !(error instanceof TokenInvalidAccountOwnerError)) { + throw Error("Unexpected error"); + } + const payer = !feePayer ? owner : feePayer; + const inst = createAssociatedTokenAccountInstruction( + payer.toPublicKey(), + associatedTokenAccount, + owner.toPublicKey(), + mint.toPublicKey(), + TOKEN_PROGRAM_ID, + ASSOCIATED_TOKEN_PROGRAM_ID + ); + return { + tokenAccount: associatedTokenAccount.toString(), + inst + }; + } + }; + })(Associated = Account5.Associated || (Account5.Associated = {})); +})(Account2 || (Account2 = {})); + +// ../account/src/pda.ts +import { PublicKey as PublicKey3 } from "@solana/web3.js"; +import { PROGRAM_ID } from "@metaplex-foundation/mpl-token-metadata"; +import { MPL_BUBBLEGUM_PROGRAM_ID } from "@metaplex-foundation/mpl-bubblegum"; +import BN from "bn.js"; +var Account3; +((Account5) => { + let Pda; + ((Pda2) => { + Pda2.getMetadata = (address) => { + const [publicKey] = PublicKey3.findProgramAddressSync( + [ + Buffer.from("metadata"), + PROGRAM_ID.toBuffer(), + address.toPublicKey().toBuffer() + ], + PROGRAM_ID + ); + return publicKey; + }; + Pda2.getMasterEdition = (address) => { + const [publicKey] = PublicKey3.findProgramAddressSync( + [ + Buffer.from("metadata"), + PROGRAM_ID.toBuffer(), + address.toPublicKey().toBuffer(), + Buffer.from("edition") + ], + PROGRAM_ID + ); + return publicKey; + }; + Pda2.getTreeAuthority = (address) => { + const [publicKey] = PublicKey3.findProgramAddressSync( + [address.toPublicKey().toBuffer()], + MPL_BUBBLEGUM_PROGRAM_ID.toPublicKey() + ); + return publicKey; + }; + Pda2.getBgumSigner = () => { + const [publicKey] = PublicKey3.findProgramAddressSync( + [Buffer.from("collection_cpi", "utf8")], + MPL_BUBBLEGUM_PROGRAM_ID.toPublicKey() + ); + return publicKey; + }; + Pda2.getAssetId = (address, leafIndex) => { + const node = new BN.BN(leafIndex); + const [assetId] = PublicKey3.findProgramAddressSync( + [ + Buffer.from("asset", "utf8"), + address.toPublicKey().toBuffer(), + Uint8Array.from(node.toArray("le", 8)) + ], + MPL_BUBBLEGUM_PROGRAM_ID.toPublicKey() + ); + return assetId.toString(); + }; + })(Pda = Account5.Pda || (Account5.Pda = {})); +})(Account3 || (Account3 = {})); + +// ../account/src/index.ts +var Account4 = { + ...Account2, + ...Account, + ...Account3 +}; + +// ../global/src/index.ts +import { BigNumber } from "bignumber.js"; +import bs2 from "bs58"; +String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, options = {}) { + const endPointUrl = Node.getConnection().rpcEndpoint; + debugLog("# toExplorerUrl rpcEndpoint:", endPointUrl); + let cluster = ""; + if (endPointUrl === Constants.EndPointUrl.prd) { + cluster = Constants.Cluster.prd; + } else if (endPointUrl === Constants.EndPointUrl.test) { + cluster = Constants.Cluster.test; + } else if (endPointUrl === Constants.EndPointUrl.dev) { + cluster = Constants.Cluster.dev; + } else { + cluster = Constants.Cluster.dev; + } + const addressOrSignature = this.toString(); + let url = ""; + if (options.replacePath) { + if (explorer === "solanafm" /* SolanaFM */) { + url = `${Constants.EXPLORER_SOLANAFM_URL}/${options.replacePath}/${addressOrSignature}?cluster=${cluster}`; + } else if (explorer === "xray" /* Xray */) { + url = `${Constants.EXPLORER_XRAY_URL}/${options.replacePath}/${addressOrSignature}?network=${cluster}`; + } else { + url = `${Constants.EXPLORER_SOLSCAN_URL}/${options.replacePath}/${addressOrSignature}?cluster=${cluster}`; + } + return url; + } + if (Account4.Keypair.isPubkey(addressOrSignature)) { + if (explorer === "solanafm" /* SolanaFM */) { + url = `${Constants.EXPLORER_SOLANAFM_URL}/address/${addressOrSignature}?cluster=${cluster}`; + } else if (explorer === "xray" /* Xray */) { + url = `${Constants.EXPLORER_XRAY_URL}/account/${addressOrSignature}?network=${cluster}`; + } else { + url = `${Constants.EXPLORER_SOLSCAN_URL}/account/${addressOrSignature}?cluster=${cluster}`; + } + } else { + if (explorer === "solanafm" /* SolanaFM */) { + url = `${Constants.EXPLORER_SOLANAFM_URL}/tx/${addressOrSignature}?cluster=${cluster}`; + } else if (explorer === "xray" /* Xray */) { + url = `${Constants.EXPLORER_XRAY_URL}/tx/${addressOrSignature}?network=${cluster}`; + } else { + url = `${Constants.EXPLORER_SOLSCAN_URL}/tx/${addressOrSignature}?cluster=${cluster}`; + } + } + return url; +}; +String.prototype.toPublicKey = function() { + if (!Account4.Keypair.isPubkey(this.toString())) { + throw Error(`No match KeyPair.PubKey: ${this.toString()}`); + } + return new PublicKey4(this.toString()); +}; +String.prototype.toKeypair = function() { + if (!Account4.Keypair.isSecret(this.toString())) { + throw Error(`No match KeyPair.Secret: ${this.toString()}`); + } + const decoded = bs2.decode(this.toString()); + return Keypair3.fromSecretKey(decoded); +}; +Number.prototype.toSol = function() { + return BigNumber(this).div(LAMPORTS_PER_SOL).toNumber(); +}; +Number.prototype.toLamports = function() { + return BigNumber(this).times(LAMPORTS_PER_SOL).toNumber(); +}; + +// ../transaction-builder/src/index.ts +var TransactionBuilder6 = { + ...TransactionBuilder2, + ...TransactionBuilder5, + ...TransactionBuilder3, + ...TransactionBuilder, + ...TransactionBuilder4 +}; + +// src/shared.ts +var bufferToArray = (buffer) => { + const nums = []; + for (const byte of buffer) { + nums.push(buffer[byte]); + } + return nums; +}; +var overwriteObject = (object, targets) => { + const that = object; + targets.forEach((target) => { + delete that[target.existsKey]; + that[target.will.key] = target.will.value; + }); + return that; +}; +var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { + if (Constants.isDebugging === "true" || process.env.DEBUG === "true") { + console.log("[DEBUG]", data1, data2, data3, data4); + } +}; +var sleep = async (sec) => { + return new Promise((r) => setTimeout(r, sec * 1e3)); +}; +var isBrowser = () => { + return typeof window !== "undefined" && typeof window.document !== "undefined"; +}; +var isNode = () => { + return typeof process !== "undefined" && process.versions != null && process.versions.node != null; +}; +var isPromise = (obj) => { + return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; +}; +function Try(input, finallyInput) { + try { + const v = input(); + if (isPromise(v)) { + return v.then( + (x) => Result.ok(x), + (err) => Result.err(err) + ); + } else { + return Result.ok(v); + } + } catch (e) { + if (e instanceof Error) { + return Result.err(e); + } + return Result.err(Error(e)); + } finally { + if (finallyInput) { + debugLog("# finally input:", finallyInput); + finallyInput(); + } + } +} +var convertTimestampToDateTime = (created_at) => { + if (created_at) { + return new Date(created_at * 1e3); + } + return; +}; +var unixTimestamp = () => { + return Math.floor((/* @__PURE__ */ new Date()).getTime() / 1e3); +}; + +// src/result.ts +var AbstractResult = class { + unwrap(ok, err) { + const r = this._chain( + (value) => Result.ok(ok ? ok(value) : value), + (error) => err ? Result.ok(err(error)) : Result.err(error) + ); + if (r.isErr) { + throw r.error; + } + return r.value; + } + map(ok, err) { + return this._chain( + (value) => Result.ok(ok(value)), + (error) => Result.err(err ? err(error) : error) + ); + } + chain(ok, err) { + return this._chain(ok, err || ((error) => Result.err(error))); + } + match(ok, err) { + this._chain( + (value) => Result.ok(ok(value)), + (error) => Result.err(err(error)) + ); + } + /// single TransactionBuilder //// + /* eslint-disable @typescript-eslint/no-explicit-any */ + async submit(feePayer) { + const res = this.map( + async (ok) => { + debugLog("# result single submit: ", ok); + if (feePayer) { + const obj = ok; + return await obj.submit(feePayer); + } else { + const obj = ok; + return await obj.submit(); + } + }, + (err) => { + return err; + } + ); + if (res.isErr) { + return Result.err(res.error); + } + return res.value; + } +}; +Array.prototype.submit = async function(feePayer) { + if (feePayer) { + let i = 1; + for await (const obj of this) { + if (obj.isErr) { + return obj; + } else if (obj.value.canSubmit) { + debugLog("# Result batch canSubmit"); + const sig = await obj.submit(feePayer); + if (sig.isErr) { + return sig; + } + await Node.confirmedSig(sig.value); + } else { + debugLog("# Result batch other than canSubmit"); + if (this.length == i) { + return obj.submit(feePayer); + } + obj.submit(feePayer); + } + i++; + } + } else { + const instructions = []; + for (const obj of this) { + if (obj.isErr) { + return obj; + } else if (obj.isOk) { + instructions.push(obj.value); + } else { + return Result.err(Error("Only Array Instruction object")); + } + } + debugLog("# Result batch submit: ", instructions); + return new TransactionBuilder6.Batch().submit(instructions); + } +}; +var InternalOk = class extends AbstractResult { + constructor(value) { + super(); + this.value = value; + } + isOk = true; + isErr = false; + /* eslint-disable @typescript-eslint/no-unused-vars */ + _chain(ok, _err) { + return ok(this.value); + } +}; +var InternalErr = class extends AbstractResult { + constructor(error) { + super(); + this.error = error; + } + isOk = false; + isErr = true; + _chain(_ok, err) { + return err(this.error); + } +}; +var Result; +((Result8) => { + function ok(value) { + return new InternalOk(value); + } + Result8.ok = ok; + function err(error) { + return new InternalErr(error || Error()); + } + Result8.err = err; + function all(obj) { + if (Array.isArray(obj)) { + const resArr = []; + for (const item of obj) { + if (item.isErr) { + return item; + } + resArr.push(item.value); + } + return Result8.ok(resArr); + } + const res = {}; + const keys = Object.keys(obj); + for (const key of keys) { + const item = obj[key]; + if (item.isErr) { + return item; + } + res[key] = item.value; + } + return Result8.ok(res); + } + Result8.all = all; +})(Result || (Result = {})); + +// ../converter/src/collection.ts +var Converter; +((Converter15) => { + let Collection; + ((Collection2) => { + Collection2.intoInfra = (input) => { + if (!input) { + return null; + } + return { + key: input.toPublicKey(), + verified: false + }; + }; + Collection2.intoUser = (output) => { + if (!output) { + return void 0; + } + return { + address: output.key.toString(), + verified: output.verified + }; + }; + })(Collection = Converter15.Collection || (Converter15.Collection = {})); + let CollectionMint; + ((CollectionMint2) => { + CollectionMint2.intoUser = (output) => { + const res = output.find((value) => { + if (value.group_key === "collection") { + return value.group_value; + } + }); + return res ? res.group_value : ""; + }; + })(CollectionMint = Converter15.CollectionMint || (Converter15.CollectionMint = {})); +})(Converter || (Converter = {})); + +// ../converter/src/creators.ts +var Converter2; +((Converter15) => { + let Creators; + ((Creators2) => { + Creators2.intoInfra = (input) => { + if (!input) { + return null; + } + return input.map((data) => { + return { + address: data.address.toPublicKey(), + share: data.share, + verified: false + }; + }); + }; + Creators2.intoCompressedNftInfra = (input) => { + if (!input) { + return []; + } + return input.map((data) => { + return { + address: data.address.toPublicKey(), + share: data.share, + verified: false + }; + }); + }; + Creators2.intoUser = (output) => { + if (!output) { + return void 0; + } + return output.map((data) => { + return { + address: data.address.toString(), + share: data.share, + verified: data.verified + }; + }); + }; + })(Creators = Converter15.Creators || (Converter15.Creators = {})); +})(Converter2 || (Converter2 = {})); + +// ../converter/src/compressed-nft-metadata.ts +import { + TokenProgramVersion, + TokenStandard +} from "mpl-bubblegum-instruction"; +var Converter3; +((Converter15) => { + let CompressedNftMetadata; + ((CompressedNftMetadata2) => { + CompressedNftMetadata2.intoInfra = (input, uri, sellerFeeBasisPoints) => { + return { + name: input.name, + symbol: input.symbol, + uri, + sellerFeeBasisPoints, + creators: Converter2.Creators.intoCompressedNftInfra(input.creators), + collection: Converter.Collection.intoInfra(input.collection), + uses: input.uses || null, + primarySaleHappened: false, + isMutable: input.isMutable ?? false, + editionNonce: 0, + tokenStandard: TokenStandard.NonFungible, + tokenProgramVersion: TokenProgramVersion.Original + }; + }; + })(CompressedNftMetadata = Converter15.CompressedNftMetadata || (Converter15.CompressedNftMetadata = {})); +})(Converter3 || (Converter3 = {})); + +// ../converter/src/royalty.ts +var Converter4; +((Converter15) => { + let Royalty; + ((Royalty2) => { + Royalty2.THRESHOLD = 100; + Royalty2.intoInfra = (percentage) => { + return percentage * Royalty2.THRESHOLD; + }; + Royalty2.intoUser = (percentage) => { + return percentage * Royalty2.THRESHOLD; + }; + })(Royalty = Converter15.Royalty || (Converter15.Royalty = {})); +})(Converter4 || (Converter4 = {})); + +// ../converter/src/nft.ts +var Converter5; +((Converter15) => { + let Nft; + ((Nft2) => { + Nft2.intoUser = (output) => { + return { + mint: output.onchain.id.toString(), + collectionMint: Converter.CollectionMint.intoUser( + output.onchain.grouping + ), + authorities: output.onchain.authorities, + royalty: Converter4.Royalty.intoUser(output.onchain.royalty.percent), + name: output.onchain.content.metadata.name, + symbol: output.onchain.content.metadata.symbol, + uri: output.onchain.content.json_uri, + creators: Converter2.Creators.intoUser(output.onchain.creators), + treeAddress: output.onchain.compression.tree, + isCompressed: output.onchain.compression.compressed, + isMutable: output.onchain.mutable, + isBurn: output.onchain.burnt, + editionNonce: output.onchain.supply.edition_nonce, + primarySaleHappened: output.onchain.royalty.primary_sale_happened, + dateTime: convertTimestampToDateTime(output.offchain.created_at), + offchain: output.offchain + }; + }; + })(Nft = Converter15.Nft || (Converter15.Nft = {})); +})(Converter5 || (Converter5 = {})); + +// ../converter/src/memo.ts +var Converter6; +((Converter15) => { + let Memo; + ((Memo2) => { + Memo2.intoUserSide = (output, meta, outputTransfer, mappingTokenAccount) => { + const history = {}; + if (outputTransfer && outputTransfer.program !== "") { + if (mappingTokenAccount && outputTransfer.program === "spl-token") { + const foundSource = mappingTokenAccount.find( + (m) => m.account === outputTransfer.parsed.info.source + ); + const foundDest = mappingTokenAccount.find( + (m) => m.account === outputTransfer.parsed.info.destination + ); + history.mint = outputTransfer.parsed.info.mint; + foundSource && (history.source = foundSource.owner); + foundDest && (history.destination = foundDest.owner); + } else { + history.source = outputTransfer.parsed.info.source; + history.destination = outputTransfer.parsed.info.destination; + } + } + history.memo = output.parsed; + history.type = output.program; + history.dateTime = convertTimestampToDateTime(meta.blockTime); + history.sig = meta.transaction.signatures[0]; + history.innerInstruction = false; + if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { + history.innerInstruction = true; + } + return history; + }; + })(Memo = Converter15.Memo || (Converter15.Memo = {})); +})(Converter6 || (Converter6 = {})); + +// ../converter/src/mint.ts +var Converter7; +((Converter15) => { + let Mint; + ((Mint2) => { + Mint2.intoUserSide = (output, meta) => { + const history = {}; + history.mint = output.parsed.info.mint; + history.mintAuthority = output.parsed.info.mintAuthority; + history.tokenAmount = output.parsed.info.tokenAmount; + history.account = output.parsed.info.account; + history.type = output.program; + history.dateTime = convertTimestampToDateTime(meta.blockTime); + history.sig = meta.transaction.signatures[0]; + history.innerInstruction = false; + if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { + history.innerInstruction = true; + } + return history; + }; + })(Mint = Converter15.Mint || (Converter15.Mint = {})); +})(Converter7 || (Converter7 = {})); + +// ../converter/src/regular-nft-metadata.ts +var Converter8; +((Converter15) => { + let RegularNftMetadata; + ((RegularNftMetadata2) => { + RegularNftMetadata2.intoInfra = (input, uri, sellerFeeBasisPoints) => { + return { + name: input.name, + symbol: input.symbol, + uri, + sellerFeeBasisPoints, + creators: Converter2.Creators.intoInfra(input.creators), + collection: Converter.Collection.intoInfra(input.collection), + uses: input.uses || null + }; + }; + })(RegularNftMetadata = Converter15.RegularNftMetadata || (Converter15.RegularNftMetadata = {})); +})(Converter8 || (Converter8 = {})); + +// ../converter/src/properties.ts +var Converter9; +((Converter15) => { + let Properties; + ((Properties2) => { + Properties2.intoInfra = async (input, callbackFunc, storageType, feePayer) => { + if (!input || !input.files) { + return {}; + } + const files = await Promise.all( + input.files.map(async (file) => { + if (!file.filePath) { + return {}; + } + const res = await callbackFunc(file.filePath, storageType, feePayer); + if (res.isErr) { + throw Error(res.error.message); + } + return overwriteObject(file, [ + { + existsKey: "filePath", + will: { key: "uri", value: res.value } + } + ]); + }) + ); + return { ...input, files }; + }; + })(Properties = Converter15.Properties || (Converter15.Properties = {})); +})(Converter9 || (Converter9 = {})); + +// ../converter/src/uses.ts +var Converter10; +((Converter15) => { + let Uses; + ((Uses2) => { + Uses2.intoUserSide = (output) => { + if (!output) { + return void 0; + } + return output; + }; + })(Uses = Converter15.Uses || (Converter15.Uses = {})); +})(Converter10 || (Converter10 = {})); + +// ../converter/src/token-metadata.ts +var Converter11; +((Converter15) => { + let TokenMetadata; + ((TokenMetadata2) => { + TokenMetadata2.intoInfra = (input, uri, sellerFeeBasisPoints) => { + return { + name: input.name, + symbol: input.symbol, + uri, + sellerFeeBasisPoints, + creators: Converter2.Creators.intoInfra(input.creators), + collection: null, + uses: input.uses || null + }; + }; + TokenMetadata2.intoUser = (output, tokenAmount) => { + return { + mint: output.onchain.mint.toString(), + royalty: output.onchain.data.sellerFeeBasisPoints, + name: (0, TokenMetadata2.deleteNullStrings)(output.onchain.data.name), + symbol: (0, TokenMetadata2.deleteNullStrings)(output.onchain.data.symbol), + tokenAmount, + uri: (0, TokenMetadata2.deleteNullStrings)(output.onchain.data.uri), + creators: Converter2.Creators.intoUser(output.onchain.data.creators), + uses: Converter10.Uses.intoUserSide(output.onchain.uses), + dateTime: convertTimestampToDateTime(output.offchain.created_at), + offchain: output.offchain + }; + }; + TokenMetadata2.deleteNullStrings = (str) => { + return str.replace(/\0/g, ""); + }; + })(TokenMetadata = Converter15.TokenMetadata || (Converter15.TokenMetadata = {})); +})(Converter11 || (Converter11 = {})); + +// ../converter/src/transfer-checked.ts +var Converter12; +((Converter15) => { + let TransferChecked; + ((TransferChecked2) => { + TransferChecked2.intoUserSide = (output, meta, mappingTokenAccount) => { + const history = {}; + if (mappingTokenAccount) { + const foundSource = mappingTokenAccount.find( + (m) => m.account === output.parsed.info.source + ); + const foundDest = mappingTokenAccount.find( + (m) => m.account === output.parsed.info.destination + ); + foundSource && (history.source = foundSource.owner); + foundDest && (history.destination = foundDest.owner); + } + history.tokenAmount = output.parsed.info.tokenAmount; + history.mint = output.parsed.info.mint; + history.multisigAuthority = output.parsed.info.multisigAuthority; + history.signers = output.parsed.info.signers; + history.type = output.program; + history.dateTime = convertTimestampToDateTime(meta.blockTime); + history.sig = meta.transaction.signatures[0]; + history.innerInstruction = false; + if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { + history.innerInstruction = true; + } + return history; + }; + })(TransferChecked = Converter15.TransferChecked || (Converter15.TransferChecked = {})); +})(Converter12 || (Converter12 = {})); + +// ../converter/src/transfer.ts +var Converter13; +((Converter15) => { + let Transfer; + ((Transfer2) => { + Transfer2.intoUserSide = (output, meta) => { + const history = {}; + if (!output.parsed.info.destination || !output.parsed.info.lamports) { + return; + } + history.source = output.parsed.info.source; + history.destination = output.parsed.info.destination; + history.sol = output.parsed.info.lamports?.toSol().toString(); + history.type = output.program; + history.dateTime = convertTimestampToDateTime(meta.blockTime); + history.sig = meta.transaction.signatures[0]; + history.innerInstruction = false; + if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { + history.innerInstruction = true; + } + return history; + }; + })(Transfer = Converter15.Transfer || (Converter15.Transfer = {})); +})(Converter13 || (Converter13 = {})); + +// ../converter/src/index.ts +var Converter14 = { + ...Converter3, + ...Converter, + ...Converter2, + ...Converter5, + ...Converter6, + ...Converter7, + ...Converter8, + ...Converter9, + ...Converter4, + ...Converter11, + ...Converter12, + ...Converter13, + ...Converter10 +}; + +// ../validator/src/index.ts +var Validator; +((Validator2) => { + let Message; + ((Message2) => { + Message2.SUCCESS = "success"; + Message2.SMALL_NUMBER = "too small"; + Message2.BIG_NUMBER = "too big"; + Message2.LONG_LENGTH = "too long"; + Message2.EMPTY = "invalid empty value"; + Message2.INVALID_URL = "invalid url"; + Message2.ONLY_NODE_JS = "`string` type is only Node.js"; + })(Message = Validator2.Message || (Validator2.Message = {})); + Validator2.NAME_LENGTH = 32; + Validator2.SYMBOL_LENGTH = 10; + Validator2.URL_LENGTH = 200; + Validator2.ROYALTY_MAX = 100; + Validator2.SELLER_FEE_BASIS_POINTS_MAX = 1e4; + Validator2.ROYALTY_MIN = 0; + Validator2.isRoyalty = (royalty) => { + return Try(() => { + const key = "royalty"; + if (royalty !== 0 && !royalty) { + throw createError(key, Message.EMPTY, royalty); + } + if (royalty < Validator2.ROYALTY_MIN) { + throw createError(key, Message.SMALL_NUMBER, royalty, { + threshold: Validator2.ROYALTY_MIN, + condition: "underMin" + }); + } else if (royalty > Validator2.ROYALTY_MAX) { + throw createError(key, Message.BIG_NUMBER, royalty, { + threshold: Validator2.ROYALTY_MAX, + condition: "overMax" + }); + } + return Message.SUCCESS; + }); + }; + Validator2.isSellerFeeBasisPoints = (royalty) => { + return Try(() => { + const key = "sellerFeeBasisPoints/seller_fee_basis_points"; + if (royalty !== 0 && !royalty) { + throw createError(key, Message.EMPTY, royalty); + } + if (royalty < Validator2.ROYALTY_MIN) { + throw createError(key, Message.SMALL_NUMBER, royalty, { + threshold: Validator2.ROYALTY_MIN, + condition: "underMin" + }); + } else if (royalty > Validator2.ROYALTY_MAX * Converter14.Royalty.THRESHOLD) { + throw createError(key, Message.BIG_NUMBER, royalty, { + threshold: Validator2.SELLER_FEE_BASIS_POINTS_MAX, + condition: "overMax" + }); + } + return Message.SUCCESS; + }); + }; + Validator2.isName = (name) => { + return Try(() => { + const key = "name"; + if (!name) { + throw createError(key, Message.EMPTY, name); + } + if (byteLength(name) > Validator2.NAME_LENGTH) { + throw createError(key, Message.LONG_LENGTH, name, { + threshold: Validator2.NAME_LENGTH, + condition: "overMax" + }); + } + return Message.SUCCESS; + }); + }; + Validator2.isSymbol = (symbol) => { + return Try(() => { + const key = "symbol"; + if (!symbol) { + throw createError(key, Message.EMPTY, symbol); + } + if (byteLength(symbol) > Validator2.SYMBOL_LENGTH) { + throw createError(key, Message.LONG_LENGTH, symbol, { + threshold: Validator2.SYMBOL_LENGTH, + condition: "overMax" + }); + } + return Message.SUCCESS; + }); + }; + Validator2.isImageUrl = (image) => isUriOrImage(image, "image"); + Validator2.checkAll = (metadata) => { + return Try(() => { + const keys = Object.keys(metadata); + const results = []; + keys.map((key) => { + let res; + switch (key) { + case "image": + if (key in metadata && metadata.image) { + res = (0, Validator2.isImageUrl)(metadata.image); + } + break; + case "royalty": + if (key in metadata && metadata.royalty) { + res = (0, Validator2.isRoyalty)(metadata.royalty); + } + break; + case "seller_fee_basis_points": + if (key in metadata && metadata.seller_fee_basis_points) { + res = (0, Validator2.isSellerFeeBasisPoints)(metadata.seller_fee_basis_points); + } + break; + case "sellerFeeBasisPoints": + if (key in metadata) { + res = (0, Validator2.isSellerFeeBasisPoints)(metadata.sellerFeeBasisPoints); + } + break; + case "name": + if (metadata.name) { + res = (0, Validator2.isName)(metadata.name); + } + break; + case "symbol": + if (metadata.symbol) { + res = (0, Validator2.isSymbol)(metadata.symbol); + } + break; + } + if (res && res.isErr) { + results.push(...res.error.details); + } + }); + if (results.length > 0) { + const message = "Caught in the validation errors. see information e.g: err.details"; + throw new ValidatorError(message, results); + } + return Message.SUCCESS; + }); + }; + const byteLength = (value) => { + const text = new TextEncoder(); + return text.encode(value).length; + }; + const createError = (key, message, actual, limit) => { + let error; + if (limit) { + error = new ValidatorError(message, [{ key, message, actual, limit }]); + } else { + error = new ValidatorError(message, [{ key, message, actual }]); + } + return error; + }; + const isUriOrImage = (imageOrUri, key) => { + return Try(() => { + if (!imageOrUri) { + throw createError(key, Message.EMPTY, imageOrUri); + } + if (byteLength(imageOrUri) > Validator2.URL_LENGTH) { + throw createError(key, Message.LONG_LENGTH, imageOrUri, { + threshold: Validator2.URL_LENGTH, + condition: "overMax" + }); + } + if (!/https?:\/\/[-_.!~*\\()a-zA-Z0-9;?:&=+,%#]+/g.test(imageOrUri)) { + throw createError(key, Message.INVALID_URL, imageOrUri); + } + return Message.SUCCESS; + }); + }; +})(Validator || (Validator = {})); +var ValidatorError = class extends Error { + details; + constructor(message, details) { + super(message); + this.details = details; + } +}; +export { + Account4 as Account, + Constants, + Explorer, + Node, + Result, + Try, + Validator, + ValidatorError, + bufferToArray, + convertTimestampToDateTime, + debugLog, + isBrowser, + isNode, + isPromise, + overwriteObject, + sleep, + unixTimestamp +}; +//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9iYXRjaC50cyIsICIuLi8uLi9ub2RlL3NyYy9pbmRleC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jb21tb24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvbWludC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9wYXJ0aWFsLXNpZ24ud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QuTWludFtdLFxuICAgICk6IFByb21pc2U8UmVzdWx0PFRyYW5zYWN0aW9uU2lnbmF0dXJlLCBFcnJvcj4+ID0+IHtcbiAgICAgIHJldHVybiBUcnkoYXN5bmMgKCkgPT4ge1xuICAgICAgICBsZXQgaSA9IDA7XG4gICAgICAgIGZvciAoY29uc3QgYSBvZiBhcnIpIHtcbiAgICAgICAgICBpZiAoIWEuaW5zdHJ1Y3Rpb25zICYmICFhLnNpZ25lcnMpIHtcbiAgICAgICAgICAgIHRocm93IEVycm9yKFxuICAgICAgICAgICAgICBgb25seSBJbnN0cnVjdGlvbiBvYmplY3QgdGhhdCBjYW4gdXNlIGJhdGNoU3VibWl0KCkuXG4gICAgICAgICAgICBJbmRleDogJHtpfSwgU2V0IHZhbHVlOiAke0pTT04uc3RyaW5naWZ5KGEpfWAsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICBpKys7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBpbnN0cnVjdGlvbnMgPSBhcnIuZmxhdE1hcCgoYSkgPT4gYS5pbnN0cnVjdGlvbnMpO1xuICAgICAgICBjb25zdCBzaWduZXJzID0gYXJyLmZsYXRNYXAoKGEpID0+IGEuc2lnbmVycyk7XG4gICAgICAgIGNvbnN0IGZlZVBheWVycyA9IGFyci5maWx0ZXIoKGEpID0+IGEuZmVlUGF5ZXIgIT09IHVuZGVmaW5lZCk7XG4gICAgICAgIGxldCBmZWVQYXllciA9IHNpZ25lcnNbMF07XG4gICAgICAgIGlmIChmZWVQYXllcnMubGVuZ3RoID4gMCAmJiBmZWVQYXllcnNbMF0uZmVlUGF5ZXIpIHtcbiAgICAgICAgICBmZWVQYXllciA9IGZlZVBheWVyc1swXS5mZWVQYXllcjtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHRyYW5zYWN0aW9uID0gbmV3IFRyYW5zYWN0aW9uKCk7XG4gICAgICAgIGxldCBmaW5hbFNpZ25lcnMgPSBzaWduZXJzO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U2lnbmVycyA9IHRoaXMuc2lnbmVycztcblxuICAgICAgICBpZiAodGhpcy5mZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gdGhpcy5mZWVQYXllci5wdWJsaWNLZXk7XG4gICAgICAgICAgZmluYWxTaWduZXJzID0gW3RoaXMuZmVlUGF5ZXIsIC4uLnRoaXMuc2lnbmVyc107XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLmluc3RydWN0aW9ucy5mb3JFYWNoKChpbnN0KSA9PiB0cmFuc2FjdGlvbi5hZGQoaW5zdCkpO1xuXG4gICAgICAgIGNvbnN0IG9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IE1BWF9SRVRSSUVTLFxuICAgICAgICB9O1xuXG4gICAgICAgIGlmIChOb2RlLmdldENvbm5lY3Rpb24oKS5ycGNFbmRwb2ludCA9PT0gQ29uc3RhbnRzLkVuZFBvaW50VXJsLnByZCkge1xuICAgICAgICAgIGRlYnVnTG9nKCcjIENoYW5nZSBtZXRhcGxleCBjbHVzdGVyIG9uIG1haW5uZXQtYmV0YScpO1xuICAgICAgICAgIE5vZGUuY2hhbmdlQ29ubmVjdGlvbih7IGNsdXN0ZXI6IENvbnN0YW50cy5DbHVzdGVyLnByZE1ldGFwbGV4IH0pO1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgIG9wdGlvbnMsXG4gICAgICAgICk7XG4gICAgICB9KTtcbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHtcbiAgQ29uZmlybU9wdGlvbnMsXG4gIFRyYW5zYWN0aW9uLFxuICBUcmFuc2FjdGlvblNpZ25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QnVpbGRlci5Db21tb24pIHtcbiAgICAgICAgICAgIChhd2FpdCBpbnN0LnN1Ym1pdCgpKS5tYXAoXG4gICAgICAgICAgICAgIGFzeW5jIChvazogc3RyaW5nKSA9PiB7XG4gICAgICAgICAgICAgICAgYXdhaXQgTm9kZS5jb25maXJtZWRTaWcob2spO1xuICAgICAgICAgICAgICAgIHJldHVybiBpbnN0LmRhdGE7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIChlcnI6IEVycm9yKSA9PiB7XG4gICAgICAgICAgICAgICAgZGVidWdMb2coJyMgRXJyb3Igc3VibWl0IHJldHJ5R2V0T3JDcmVhdGU6ICcsIGVycik7XG4gICAgICAgICAgICAgICAgdGhyb3cgZXJyO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICBkZWJ1Z0xvZyhgIyByZXRyeTogJHtjb3VudGVyfSBjcmVhdGUgdG9rZW4gYWNjb3VudDogYCwgZSk7XG4gICAgICAgICAgZGVidWdMb2coYCMgbWludDogJHttaW50fSwgb3duZXI6ICR7b3duZXJ9LCBmZWVQYXllcjogJHtmZWVQYXllcn1gKTtcbiAgICAgICAgfVxuICAgICAgICBhd2FpdCBzbGVlcChSRVRSWV9TTEVFUF9USU1FKTtcbiAgICAgICAgY291bnRlcisrO1xuICAgICAgfVxuICAgICAgdGhyb3cgRXJyb3IoYHJldHJ5IGFjdGlvbiBpcyBvdmVyIGxpbWl0ICR7UkVUUllfT1ZFUl9MSU1JVH1gKTtcbiAgICB9O1xuXG4gICAgLyoqXG4gICAgICogW01haW4gbG9naWNdR2V0IEFzc29jaWF0ZWQgdG9rZW4gQWNjb3VudC5cbiAgICAgKiBpZiBub3QgY3JlYXRlZCwgY3JlYXRlIG5ldyB0b2tlbiBhY2NvdWludFxuICAgICAqXG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG1pbnRcbiAgICAgKi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uZ2V0Q29ubmVjdGlvbigpLmNvbW1pdG1lbnQsXG4gICAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICB0b2tlbkFjY291bnQ6IGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSxcbiAgICAgICAgICBpbnN0OiB1bmRlZmluZWQsXG4gICAgICAgIH07XG4gICAgICB9IGNhdGNoIChlcnJvcjogdW5rbm93bikge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuQWNjb3VudE5vdEZvdW5kRXJyb3IpICYmXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuSW52YWxpZEFjY291bnRPd25lckVycm9yKVxuICAgICAgICApIHtcbiAgICAgICAgICB0aHJvdyBFcnJvcignVW5leHBlY3RlZCBlcnJvcicpO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgcGF5ZXIgPSAhZmVlUGF5ZXIgPyBvd25lciA6IGZlZVBheWVyO1xuXG4gICAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVBc3NvY2lhdGVkVG9rZW5BY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgcGF5ZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdCxcbiAg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5lZCxcbiAgICApOiBPcHRpb248SW50ZXJuYWxDb2xsZWN0aW9uPiA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBudWxsO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4ge1xuICAgICAgICBrZXk6IGlucHV0LnRvUHVibGljS2V5KCksXG4gICAgICAgIHZlcmlmaWVkOiBmYWxzZSxcbiAgICAgIH07XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlciA9IChcbiAgICAgIG91dHB1dDogT3B0aW9uPEludGVybmFsQ29sbGVjdGlvbj4sXG4gICAgKTogQ29sbGVjdGlvblR5cGUgfCB1bmRlZmluZWQgPT4ge1xuICAgICAgaWYgKCFvdXRwdXQpIHtcbiAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIHtcbiAgICAgICAgYWRkcmVzczogb3V0cHV0LmtleS50b1N0cmluZygpLFxuICAgICAgICB2ZXJpZmllZDogb3V0cHV0LnZlcmlmaWVkLFxuICAgICAgfTtcbiAgICB9O1xuICB9XG5cbiAgZXhwb3J0IG5hbWVzcGFjZSBDb2xsZWN0aW9uTWludCB7XG4gICAgZXhwb3J0IGNvbnN0IGludG9Vc2VyID0gKG91dHB1dDogR3JvdXBpbmdbXSk6IFB1YmtleSA9PiB7XG4gICAgICBjb25zdCByZXMgPSBvdXRwdXQuZmluZCgodmFsdWUpID0+IHtcbiAgICAgICAgaWYgKHZhbHVlLmdyb3VwX2tleSA9PT0gJ2NvbGxlY3Rpb24nKSB7XG4gICAgICAgICAgcmV0dXJuIHZhbHVlLmdyb3VwX3ZhbHVlO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIHJldHVybiByZXMgPyByZXMuZ3JvdXBfdmFsdWUgOiAnJztcbiAgICB9O1xuICB9XG59XG4iLCAiLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLXVudXNl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AgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ25hbWUnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLm5hbWUpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNOYW1lKG1ldGFkYXRhLm5hbWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc3ltYm9sJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5zeW1ib2wpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTeW1ib2wobWV0YWRhdGEuc3ltYm9sKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgICAgIGlmIChyZXMgJiYgcmVzLmlzRXJyKSB7XG4gICAgICAgICAgcmVzdWx0cy5wdXNoKC4uLnJlcy5lcnJvci5kZXRhaWxzKTtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgICBpZiAocmVzdWx0cy5sZW5ndGggPiAwKSB7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPVxuICAgICAgICAgICdDYXVnaHQgaW4gdGhlIHZ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iwgIlZhbGlkYXRvciIsICJNZXNzYWdlIiwgIkNvbnZlcnRlciJdCn0K \ No newline at end of file diff --git a/packages/suite-utils/src/shared.ts b/packages/suite-utils/src/shared.ts index b0f02e477..a6bce7f5f 100644 --- a/packages/suite-utils/src/shared.ts +++ b/packages/suite-utils/src/shared.ts @@ -1,4 +1,4 @@ -import { AnyObject } from '~/types/shared'; +import { AnyObject } from '~/types/utils'; import { Constants } from './constants'; import { Result } from './result'; diff --git a/packages/test-tools/dist/index.js b/packages/test-tools/dist/index.js index 8f766fdbc..82715137e 100644 --- a/packages/test-tools/dist/index.js +++ b/packages/test-tools/dist/index.js @@ -38,7 +38,7 @@ module.exports = __toCommonJS(src_exports); var import_assert = __toESM(require("assert")); var import_fs = __toESM(require("fs")); -// ../shared/src/constants.ts +// ../suite-utils/src/constants.ts var import_web3 = require("@solana/web3.js"); var import_load = __toESM(require("@solana-suite/config/load")); var Config = import_load.default; @@ -314,56 +314,6 @@ var TransactionBuilder; TransactionBuilder7.Common = Common2; })(TransactionBuilder || (TransactionBuilder = {})); -// ../shared/src/shared.ts -var overwriteObject = (object, targets) => { - const that = object; - targets.forEach((target) => { - delete that[target.existsKey]; - that[target.will.key] = target.will.value; - }); - return that; -}; -var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { - if (Constants.isDebugging === "true" || process.env.DEBUG === "true") { - console.log("[DEBUG]", data1, data2, data3, data4); - } -}; -var sleep = async (sec) => { - return new Promise((r) => setTimeout(r, sec * 1e3)); -}; -var isPromise = (obj) => { - return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; -}; -function Try(input, finallyInput) { - try { - const v = input(); - if (isPromise(v)) { - return v.then( - (x) => Result.ok(x), - (err) => Result.err(err) - ); - } else { - return Result.ok(v); - } - } catch (e) { - if (e instanceof Error) { - return Result.err(e); - } - return Result.err(Error(e)); - } finally { - if (finallyInput) { - debugLog("# finally input:", finallyInput); - finallyInput(); - } - } -} -var convertTimestampToDateTime = (created_at) => { - if (created_at) { - return new Date(created_at * 1e3); - } - return; -}; - // ../transaction-builder/src/batch.ts var TransactionBuilder2; ((TransactionBuilder7) => { @@ -818,7 +768,57 @@ var TransactionBuilder6 = { ...TransactionBuilder4 }; -// ../shared/src/result.ts +// ../suite-utils/src/shared.ts +var overwriteObject = (object, targets) => { + const that = object; + targets.forEach((target) => { + delete that[target.existsKey]; + that[target.will.key] = target.will.value; + }); + return that; +}; +var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { + if (Constants.isDebugging === "true" || process.env.DEBUG === "true") { + console.log("[DEBUG]", data1, data2, data3, data4); + } +}; +var sleep = async (sec) => { + return new Promise((r) => setTimeout(r, sec * 1e3)); +}; +var isPromise = (obj) => { + return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; +}; +function Try(input, finallyInput) { + try { + const v = input(); + if (isPromise(v)) { + return v.then( + (x) => Result.ok(x), + (err) => Result.err(err) + ); + } else { + return Result.ok(v); + } + } catch (e) { + if (e instanceof Error) { + return Result.err(e); + } + return Result.err(Error(e)); + } finally { + if (finallyInput) { + debugLog("# finally input:", finallyInput); + finallyInput(); + } + } +} +var convertTimestampToDateTime = (created_at) => { + if (created_at) { + return new Date(created_at * 1e3); + } + return; +}; + +// ../suite-utils/src/result.ts var AbstractResult = class { unwrap(ok, err) { const r = this._chain( @@ -930,15 +930,15 @@ var InternalErr = class extends AbstractResult { } }; var Result; -((Result11) => { +((Result12) => { function ok(value) { return new InternalOk(value); } - Result11.ok = ok; + Result12.ok = ok; function err(error) { return new InternalErr(error || Error()); } - Result11.err = err; + Result12.err = err; function all(obj) { if (Array.isArray(obj)) { const resArr = []; @@ -948,7 +948,7 @@ var Result; } resArr.push(item.value); } - return Result11.ok(resArr); + return Result12.ok(resArr); } const res = {}; const keys = Object.keys(obj); @@ -959,9 +959,9 @@ var Result; } res[key] = item.value; } - return Result11.ok(res); + return Result12.ok(res); } - Result11.all = all; + Result12.all = all; })(Result || (Result = {})); // ../converter/src/collection.ts @@ -1867,4 +1867,4 @@ var requestSol = async (pubkey, sol = 0.1) => { 0 && (module.exports = { requestSol }); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uL3NyYy9yZXF1ZXN0LXNvbC50cyIsICIuLi8uLi9zaGFyZWQvc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9iYXRjaC50cyIsICIuLi8uLi9ub2RlL3NyYy9pbmRleC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jb21tb24udHMiLCAiLi4vLi4vc2hhcmVkL3NyYy9zaGFyZWQudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvbWludC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9wYXJ0aWFsLXNpZ24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY2FsY3VsYXRlLXR4c2l6ZS50cyIsICIuLi8uLi9nbG9iYWwvc3JjL2luZGV4LnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2Fzc29jaWF0ZWQudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMva2V5cGFpci50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9wZGEudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvaW5kZXgudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvaW5kZXgudHMiLCAiLi4vLi4vc2hhcmVkL3NyYy9yZXN1bHQudHMiLCAiLi4vLi4vY29udmVydGVyL3NyYy9jb2xsZWN0aW9uLnRzIiwgIi4uLy4uL2NvbnZlcnRlci9zcmMvY3JlYXRvcnMudHMiLCAiLi4vLi4vY29udmVydGVyL3NyYy9jb21wcmVzc2VkLW5mdC1tZXRhZGF0YS50cyIsICIuLi8uLi9jb252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ZlZVBheWVyLnRvQmFzZTU4KCldO1xuXG4gICAgY29uc3Qgc2lnbmVycyA9IG5ldyBTZXQ8c3RyaW5nPihmZWVQYXllclBrKTtcbiAgICBjb25zdCBhY2NvdW50cyA9IG5ldyBTZXQ8c3RyaW5nPihmZWVQYXllclBrKTtcblxuICAgIGNvbnN0IGl4c1NpemUgPSB0cmFuc2FjdGlvbi5pbnN0cnVjdGlvbnMucmVkdWNlKChhY2MsIGl4KSA9PiB7XG4gICAgICBpeC5rZXlzLmZvckVhY2goKHsgcHVia2V5LCBpc1NpZ25lciB9KSA9PiB7XG4gICAgICAgIGNvbnN0IHBrID0gcHVia2V5LnRvQmFzZTU4KCk7XG4gICAgICAgIGlmIChpc1NpZ25lcikgc2lnbmVycy5hZGQocGspO1xuICAgICAgICBhY2NvdW50cy5hZGQocGspO1xuICAgICAgfSk7XG5cbiAgICAgIGFjY291bnRzLmFkZChpeC5wcm9ncmFtSWQudG9CYXNlNTgoKSk7XG5cbiAgICAgIGNvbnN0IG5JbmRleGVzID0gaXgua2V5cy5sZW5ndGg7XG4gICAgICBjb25zdCBvcGFxdWVEYXRhID0gaXguZGF0YS5sZW5ndGg7XG5cbiAgICAgIHJldHVybiAoXG4gICAgICAgIGFjYyArXG4gICAgICAgIDEgKyAvLyBQSUQgaW5kZXhcbiAgICAgICAgY29tcGFjdEFycmF5U2l6ZShuSW5kZXhlcywgMSkgK1xuICAgICAgICBjb21wYWN0QXJyYXlTaXplKG9wYXF1ZURhdGEsIDEpXG4gICAgICApO1xuICAgIH0sIDApO1xuXG4gICAgcmV0dXJuIChcbiAgICAgIGNvbXBhY3RBcnJheVNpemUoc2lnbmVycy5zaXplLCA2NCkgKyAvLyBzaWduYXR1cmVzXG4gICAgICAzICsgLy8gaGVhZGVyXG4gICAgICBjb21wYWN0QXJyYXlTaXplKGFjY291bnRzLnNpemUsIDMyKSArIC8vIGFjY291bnRzXG4gICAgICAzMiArIC8vIGJsb2NraGFzaFxuICAgICAgY29tcGF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IgfSkucHVia2V5LFxuICAgICAgICBhbGxvd093bmVyT2ZmQ3VydmUsXG4gICAgICApO1xuXG4gICAgICBpZiAoIXJlcy5pbnN0KSB7XG4gICAgICAgIHJldHVybiByZXMudG9rZW5BY2NvdW50O1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb248UHVia2V5PihcbiAgICAgICAgW3Jlcy5pbnN0XSxcbiAgICAgICAgW10sXG4gICAgICAgIGZlZVBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICByZXMudG9rZW5BY2NvdW50ISxcbiAgICAgICk7XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIFJldHJ5IGZ1bmN0aW9uIGlmIGNyZWF0ZSBuZXcgdG9rZW4gYWNjb3VpbnRcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBtaW50XG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAgICogQHBhcmFtIHtTZWNyZXR9IGZlZVBheWVyXG4gICAgICogQHJldHVybnMgUHJvbWlzZTxzdHJpbmc+XG4gICAgICovXG4gICAgZXhwb3J0IGNvbnN0IHJldHJ5R2V0T3JDcmVhdGUgPSBhc3luYyAoXG4gICAgICBtaW50OiBQdWJrZXksXG4gICAgICBvd25lcjogUHVia2V5LFxuICAgICAgZmVlUGF5ZXI6IFNlY3JldCxcbiAgICApOiBQcm9taXNlPHN0cmluZz4gPT4ge1xuICAgICAgbGV0IGNvdW50ZXIgPSAxO1xuICAgICAgd2hpbGUgKGNvdW50ZXIgPCBSRVRSWV9PVkVSX0xJTUlUKSB7XG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgY29uc3QgaW5zdCA9IGF3YWl0IGdldChtaW50LCBvd25lciwgZmVlUGF5ZXIsIHRydWUpO1xuXG4gICAgICAgICAgaWYgKGluc3QgJiYgdHlwZW9mIGluc3QgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICBkZWJ1Z0xvZygnIyBhc3NvY2lhdGVkVG9rZW5BY2NvdW50OiAnLCBpbnN0KTtcbiAgICAgICAgICAgIHJldHVybiBpbnN0O1xuICAgICAgICAgIH0gZWxzZSBpZiAoaW5zdCBpbnN0YW5jZW9mIFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb24pIHtcbiAgICAgICAgICAgIChhd2FpdCBpbnN0LnN1Ym1pdCgpKS5tYXAoXG4gICAgICAgICAgICAgIGFzeW5jIChvazogc3RyaW5nKSA9PiB7XG4gICAgICAgICAgICAgICAgYXdhaXQgTm9kZS5jb25maXJtZWRTaWcob2spO1xuICAgICAgICAgICAgICAgIHJldHVybiBpbnN0LmRhdGE7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIChlcnI6IEVycm9yKSA9PiB7XG4gICAgICAgICAgICAgICAgZGVidWdMb2coJyMgRXJyb3Igc3VibWl0IHJldHJ5R2V0T3JDcmVhdGU6ICcsIGVycik7XG4gICAgICAgICAgICAgICAgdGhyb3cgZXJyO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICBkZWJ1Z0xvZyhgIyByZXRyeTogJHtjb3VudGVyfSBjcmVhdGUgdG9rZW4gYWNjb3VudDogYCwgZSk7XG4gICAgICAgICAgZGVidWdMb2coYCMgbWludDogJHttaW50fSwgb3duZXI6ICR7b3duZXJ9LCBmZWVQYXllcjogJHtmZWVQYXllcn1gKTtcbiAgICAgICAgfVxuICAgICAgICBhd2FpdCBzbGVlcChSRVRSWV9TTEVFUF9USU1FKTtcbiAgICAgICAgY291bnRlcisrO1xuICAgICAgfVxuICAgICAgdGhyb3cgRXJyb3IoYHJldHJ5IGFjdGlvbiBpcyBvdmVyIGxpbWl0ICR7UkVUUllfT1ZFUl9MSU1JVH1gKTtcbiAgICB9O1xuXG4gICAgLyoqXG4gICAgICogW01haW4gbG9naWNdR2V0IEFz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HVzZSBSZXN1bHRcbiAgICAgICAgYXdhaXQgZ2V0QWNjb3VudChcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLmNvbW1pdG1lbnQsXG4gICAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICB0b2tlbkFjY291bnQ6IGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSxcbiAgICAgICAgICBpbnN0OiB1bmRlZmluZWQsXG4gICAgICAgIH07XG4gICAgICB9IGNhdGNoIChlcnJvcjogdW5rbm93bikge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuQWNjb3VudE5vdEZvdW5kRXJyb3IpICYmXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuSW52YWxpZEFjY291bnRPd25lckVycm9yKVxuICAgICAgICApIHtcbiAgICAgICAgICB0aHJvdyBFcnJvcignVW5leHBlY3RlZCBlcnJvcicpO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgcGF5ZXIgPSAhZmVlUGF5ZXIgPyBvd25lciA6IGZlZVBheWVyO1xuXG4gICAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVBc3NvY2lhdGVkVG9rZW5BY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgcGF5ZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdCxcbiAgICAgICAgfTtcbiAgICAgIH1cbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHsgS2V5cGFpciBhcyBPcmlnaW5hbCwgUHVibGljS2V5IH0gZnJvbSAnQHNvbGFuYS93ZWIzLmpzJztcbmltcG9ydCB7IFB1YmtleSwgU2VjcmV0IH0gZnJvbSAnfi90eXBlcy9hY2NvdW50JztcbmltcG9ydCBicyBmcm9tICdiczU4JztcblxuZXhwb3J0IG5hbWVzcGFjZSBBY2NvdW50IHtcbiAgZXhwb3J0IGNsYXNzIEtleXBhaXIge1xuICAgIHNlY3JldDogU2VjcmV0O1xuICAgIHB1YmtleTogUHVia2V5O1xuXG4gICAgY29uc3RydWN0b3IocGFyYW1zOiB7IHB1YmtleT86IFB1YmtleTsgc2VjcmV0OiBTZWNyZXQgfSkge1xuICAgICAgaWYgKCFwYXJhbXMucHVia2V5KSB7XG4gICAgICAgIGNvbnN0IGtleXBhaXIgPSBwYXJhbXMuc2VjcmV0LnRvS2V5cGFpcigpO1xuICAgICAgICB0aGlzLnB1YmtleSA9IGtleXBhaXIucHVibGljS2V5LnRvU3RyaW5nKCk7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICB0aGlzLnB1YmtleSA9IHBhcmFtcy5wdWJrZXk7XG4gICAgICB9XG4gICAgICB0aGlzLnNlY3JldCA9IHBhcmFtcy5zZWNyZXQ7XG4gICAgfVxuXG4gICAgdG9QdWJsaWNLZXkoKTogUHVibGljS2V5IHtcbiAgICAgIHJldHVybiBuZXcgUHVibGljS2V5KHRoaXMucHVia2V5KTtcbiAgICB9XG5cbiAgICB0b0tleXBhaXIoKTogT3JpZ2luYWwge1xuICAgICAgY29uc3QgZGVjb2RlZCA9IG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BpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBudWxsO1xuICAgICAgfVxuICAgICAgcmV0dXJuIGlucHV0Lm1hcCgoZGF0YSkgPT4ge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIGFkZHJlc3M6IGRhdGEuYWRkcmVzcy50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIHNoYXJlOiBkYXRhLnNoYXJlLFxuICAgICAgICAgIHZlcmlmaWVkOiBmYWxzZSxcbiAgICAgICAgfTtcbiAgICAgIH0pO1xuICAgIH07XG5cbiAgICBleHBvcnQgY29uc3QgaW50b0NvbXByZXNzZWROZnRJbmZyYSA9IChcbiAgICAgIGlucHV0OiBPcHRpb248SW5wdXRDcmVhdG9yc1tdPiB8IHVuZGVmaW5lZCxcbiAgICApOiBJbnRlcm5hbENyZWF0b3JzW10gPT4ge1xuICAgICAgaWYgKCFpbnB1dCkge1xuICAgICAgICByZXR1cm4gW107XG4gICAgICB9XG4gICAgICByZXR1cm4gaW5wdXQhLm1hcCgoZGF0YSkgPT4ge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIGFkZHJlc3M6IGRhdGEuYWRkcmVzcy50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIHNoYXJlOiBkYXRhLnNoYXJlLFxuICAgICAgICAgIHZlcmlmaWVkOiBmYWxzZSxcbiAgICAgICAgfTtcbiAgICAgIH0pO1xuICAgIH07XG5cbiAgICBleHBvcnQgY29uc3QgaW50b1VzZXIgPSAoXG4gICAgICBvdXRwdXQ6IE9wdGlvbjxJbnRlcm5hbENyZWF0b3JzW10+LFxuICAgICk6IENyZWF0b3JzW10gfCB1bmRlZmluZWQgPT4ge1xuICAgICAgaWYgKCFvdXRwdXQpIHtcbiAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG91dHB1dC5tYXAoKGRhdGEpID0+IHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICBh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ua2V5cyhtZXRhZGF0YSk7XG4gICAgICBjb25zdCByZXN1bHRzOiBEZXRhaWxzW10gPSBbXTtcbiAgICAgIGtleXMubWFwKChrZXkpID0+IHtcbiAgICAgICAgbGV0IHJlcyE6IFJlc3VsdDxzdHJpbmcsIFZhbGlkYXRvckVycm9yPjtcbiAgICAgICAgc3dpdGNoIChrZXkpIHtcbiAgICAgICAgICBjYXNlICdpbWFnZSc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLmltYWdlKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzSW1hZ2VVcmwobWV0YWRhdGEuaW1hZ2UpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAncm95YWx0eSc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnJveWFsdHkpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNSb3lhbHR5KG1ldGFkYXRhLnJveWFsdHkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEuc3ltYm9sKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU3ltYm9sKG1ldGFkYXRhLnN5bWJvbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAocmVzICYmIHJlcy5pc0Vycikge1xuICAgICAgICAgIHJlc3VsdHMucHVzaCguLi5yZXMuZXJyb3IuZGV0YWlscyk7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgICAgaWYgKHJlc3VsdHMubGVuZ3RoID4gMCkge1xuICAgICAgICBjb25zdCBtZXNzYWdlID1cbiAgICAgICAgICAnQ2F1Z2h0IGluIHRoZSB2YWxpZGF0aW9uIGVycm9ycy4gc2VlIGluZm9ybWF0aW9uIGUuZzogZXJyPFZhbGlkYXRvckVycm9yPi5kZXRhaWxzJztcbiAgICAgICAgdGhyb3cgbmV3IFZhbGlkYXRvckVycm9yKG1lc3NhZ2UsIHJlc3VsdHMpO1xuICAgICAgfVxuICAgICAgcmV0dXJuIE1lc3NhZ2UuU1VDQ0VTUztcbiAgICB9KTtcbiAgfTtcblxuICB0eXBlIFBpY2tOZnRTdG9yYWdlID0gUGljazxcbiAgICBPZmZjaGFpbixcbiAgICAnbmFtZScgfCAnc3ltYm9sJyB8ICdpbWFnZScgfCAnc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMnXG4gID47XG4gIHR5cGUgUGlja05mdFN0b3J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ICAgICAgICAgaW5zdHJ1Y3Rpb24ucHJvZ3JhbSxcbiAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIgPSBpbnN0cnVjdGlvbjtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICApO1xuXG4gICAgICAgICAgICAgICAgLy8gc3BsLXRva2VuIG9yIHN5c3RlbVxuICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIgJiZcbiAgICAgICAgICAgICAgICAgIG1vZHVsZU5hbWUgIT09IGluc3RydWN0aW9uVHJhbnNmZXJbJ3Byb2dyYW0nXVxuICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgZGVidWdMb2coXG4gICAgICAgICAgICAgICAgICAgICcjIEZpbHRlclR5cGUuTWVtbyBicmVhayBpbnN0cnVjdGlvbjogJyxcbiAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlcixcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAvLyBmZXRjaCBtZW1vIG9ubHkgdHJhbnNhY3Rpb25cbiAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLk1lbW8uaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyLFxuICAgICAgICAgICAgICAgICAgcG9zdFRva2VuQWNjb3VudCxcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLk9ubHlNZW1vOiB7XG4gICAgICAgICAgICAgIGlmIChGaWx0ZXJPcHRpb25zLk1lbW8ucHJvZ3JhbS5pbmNsdWRlcyhpbnN0cnVjdGlvbi5wcm9ncmFtKSkge1xuICAgICAgICAgICAgICAgIGxldCBpbnN0cnVjdGlvblRyYW5zZmVyO1xuXG4gICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5NZW1vLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlcixcbiAgICAgICAgICAgICAgICAgIHBvc3RUb2tlbkFjY291bnQsXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5NaW50OiB7XG4gICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLk1pbnQucHJvZ3JhbS5pbmNsdWRlcyhpbnN0cnVjdGlvbi5wcm9ncmFtKSAmJlxuICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuTWludC5hY3Rpb24uaW5jbHVkZXMoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbi5wYXJzZWQudHlwZSBhcyBzdHJpbmcsXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLk1pbnQuaW50b1VzZXJTaWRlKGluc3RydWN0aW9uLCB0eE1ldGEpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLlRyYW5zZmVyOlxuICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgbW9kdWxlTmFtZSA9PT0gaW5zdHJ1Y3Rpb24ucHJvZ3JhbSAmJlxuICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuVHJhbnNmZXIuYWN0aW9uLmluY2x1ZGVzKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24ucGFyc2VkLnR5cGUgYXMgc3RyaW5nLFxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgaWYgKGluc3RydWN0aW9uLnBhcnNlZC50eXBlID09PSAndHJhbnNmZXJDaGVja2VkJykge1xuICAgICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5UcmFuc2ZlckNoZWNrZWQuaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgICBwb3N0VG9rZW5BY2NvdW50LFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5UcmFuc2Zlci5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgICByZXR1cm4gaGlzdG9yeTtcbiAgICB9O1xufVxuIiwgImltcG9ydCB7IFBhcnNlZEFjY291bnREYXRhIH0gZnJvbSAnQHNvbGFuYS93ZWIzLmpzJztcbmltcG9ydCB7IFJlc3VsdCwgVHJ5IH0gZnJvbSAnfi9zaGFyZWQnO1xuaW1wb3J0IHsgTm9kZSB9IGZyb20gJ34vbm9kZSc7XG5pbXBvcnQgeyBPd25lckluZm8sIFB1YmtleSB9IGZyb20gJ34vdHlwZXMvYWNjb3VudCc7XG5pbXBvcnQgeyBUcmFuc2FjdGlvbkZpbHRlciB9IGZyb20gJ34vdHJhbnNhY3Rpb24tZmlsdGVyJztcblxuZXhwb3J0IG5hbWVzcGFjZSBTb2xOYXRpdmUge1xuICAvKipcbiAgICogRmluZCBuZnQgYnkgb3duZXIgYWRkcmVzc1xuICAgKlxuICAgKiBAcGFyYW0ge1B1YmtleX0gb3duZXJcbiAgICogQHJldHVybiBQcm9taXNlPFJlc3VsdDxPd25lckluZm8sIEVycm9yPj5cbiAgICovXG4gIGV4cG9ydCBjb25zdCBmaW5kQnlPd25lciA9IGFzeW5jIChcbiAgICBvd25lcjogUHVia2V5LFxuICApOiBQcm9taXNlPFJlc3VsdDxPd25lckluZm8sIEVycm9yPj4gPT4ge1xuICAgIHJldHVybiBUcnkoYXN5bmMgKCkgPT4ge1xuICAgICAgY29uc3QgcmVzID0gYXdhaXQgTm9kZS5nZXRDb25uZWN0aW9uKCkuZ2V0UGFyc2VkQWNjb3VudEluZm8oXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICApO1xuXG4gICAgICBjb25zdCBpbmZvID0ge1xuICAgICAgICBzb2w6IDAsXG4gICAgICAgIGxhbXBvcnRzOiAwLFxuICAgICAgICBvd25lcjogb3duZXIudG9TdHJpbmcoKSxcbiAgICAgIH07XG5cbiAgICAgIGlmIChUcmFuc2FjdGlvbkZpbHRlci5pc1BhcnNlZEluc3RydWN0aW9uKHJlcy52YWx1ZT8uZGF0YSkpIHtcbiAgICAgICAgY29uc3QgcGFyc2VkQWNjb3VudERhdGEgPSByZXMudmFsdWU/LmRhdGEgYXMgUGFyc2VkQWNjb3VudERhdGE7XG4gICAgICAgIGluZm8ub3duZXIgPSBwYXJzZWRBY2NvdW50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V3JhcHBlZE5hdGl2ZUFjY291bnQoXG4gICAgICAgIGNvbm5lY3Rpb24sXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICBwYXJzZUludChgJHthbW91bnQudG9MYW1wb3J0cygpfWAsIFJBRElYKSxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIHdyYXBwZWQgc29sOiAnLCB3cmFwcGVkLnRvQmFzZTU4KCkpO1xuXG4gICAgICBjb25zdCBpbnN0cnVjdGlvbnMgPSBbXTtcblxuICAgICAgY29uc3QgdG9rZW4gPSBhd2FpdCBjcmVhdGVNaW50KFxuICAgICAgICBjb25uZWN0aW9uLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgMCxcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IHNvdXJjZVRva2VuID0gYXdhaXQgQWNjb3VudC5Bc3NvY2lhdGVkLnJldHJ5R2V0T3JDcmVhdGUoXG4gICAgICAgIHRva2VuLnRvU3RyaW5nKCksXG4gICAgICAgIG93bmVyLFxuICAgICAgICBwYXllcixcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIHNvdXJjZVRva2VuOiAnLCBzb3VyY2VUb2tlbik7XG5cbiAgICAgIGNvbnN0IGRlc3RUb2tlbiA9IGF3YWl0IEFjY291bnQuQXNzb2NpYXRlZC5yZXRyeUdldE9yQ3JlYXRlKFxuICAgICAgICB0b2tlbi50b1N0cmluZygpLFxuICAgICAgICB3cmFwcGVkLnRvU3RyaW5nKCksXG4gICAgICAgIHBheWVyLFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgZGVzdFRva2VuOiAnLCBkZXN0VG9rZW4pO1xuXG4gICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAg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hIG9mIGFycikge1xuICAgICAgICAgIGlmICghYS5pbnN0cnVjdGlvbnMgJiYgIWEuc2lnbmVycykge1xuICAgICAgICAgICAgdGhyb3cgRXJyb3IoXG4gICAgICAgICAgICAgIGBvbmx5IEluc3RydWN0aW9uIG9iamVjdCB0aGF0IGNhbiB1c2UgYmF0Y2hTdWJtaXQoKS5cbiAgICAgICAgICAgIEluZGV4OiAke2l9LCBTZXQgdmFsdWU6ICR7SlNPTi5zdHJpbmdpZnkoYSl9YCxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIGkrKztcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IGluc3RydWN0aW9ucyA9IGFyci5mbGF0TWFwKChhKSA9PiBhLmluc3RydWN0aW9ucyk7XG4gICAgICAgIGNvbnN0IHNpZ25lcnMgPSBhcnIuZmxhdE1hcCgoYSkgPT4gYS5zaWduZXJzKTtcbiAgICAgICAgY29uc3QgZmVlUGF5ZXJzID0gYXJyLmZpbHRlcigoYSkgPT4gYS5mZWVQYXllciAhPT0gdW5kZWZpbmVkKTtcbiAgICAgICAgbGV0IGZlZVBheWVyID0gc2lnbmVyc1swXTtcbiAgICAgICAgaWYgKGZlZVBheWVycy5sZW5ndGggPiAwICYmIGZlZVBheWVyc1swXS5mZWVQYXllcikge1xuICAgICAgICAgIGZlZVBheWVyID0gZmVlUGF5ZXJzWzBdLmZlZVBheWVyO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgdHJhbnNhY3Rpb24gPSBuZXcgVHJhbnNhY3Rpb24oKTtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHNpZ25lcnM7XG4gICAgICAgIGlmIChmZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gZmVlUGF5ZXIucHVibGljS2V5O1xuICAgICAgICAgIGZpbmFsU2lnbmVycyA9IFtmZWVQYXllciwgLi4uc2lnbmVyc107XG4gICAgICAgIH1cbiAg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nQ6ICcsIGluc3QpO1xuICAgICAgICAgICAgcmV0dXJuIGluc3Q7XG4gICAgICAgICAgfSBlbHNlIGlmIChpbnN0IGluc3RhbmNlb2YgVHJhbnNhY3Rpb25CdWlsZGVyLkNvbW1vbikge1xuICAgICAgICAgICAgKGF3YWl0IGluc3Quc3VibWl0KCkpLm1hcChcbiAgICAgICAgICAgICAgYXN5bmMgKG9rOiBzdHJpbmcpID0+IHtcbiAgICAgICAgICAgICAgICBhd2FpdCBOb2RlLmNvbmZpcm1lZFNpZyhvayk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGluc3QuZGF0YTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgKGVycjogRXJyb3IpID0+IHtcbiAgICAgICAgICAgICAgICBkZWJ1Z0xvZygnIyBFcnJvciBzdWJtaXQgcmV0cnlHZXRPckNyZWF0ZTogJywgZXJyKTtcbiAgICAgICAgICAgICAgICB0aHJvdyBlcnI7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgIGRlYnVnTG9nKGAjIHJldHJ5OiAke2NvdW50ZXJ9IGNyZWF0ZSB0b2tlbiBhY2NvdW50OiBgLCBlKTtcbiAgICAgICAgICBkZWJ1Z0xvZyhgIyBtaW50OiAke21pbnR9LCBvd25lcjogJHtvd25lcn0sIGZlZVBheWVyOiAke2ZlZVBheWVyfWApO1xuICAgICAgICB9XG4gICAgICAgIGF3YWl0IHNsZWVwKFJFVFJZX1NMRUVQX1RJTUUpO1xuICAgICAgICBjb3VudGVyKys7XG4gICAgICB9XG4gICAgICB0aHJvdyBFcnJvcihgcmV0cnkgYWN0aW9uIGlzIG92ZXIgbGltaXQgJHtSRVRSWV9PVkVSX0xJTUlUfWApO1xuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiBbTWFpbiBsb2dpY11HZXQgQXNzb2NpYXRlZCB0b2tlbiBBY2NvdW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dW50KFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCkuY29tbWl0bWVudCxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3Q6IHVuZGVmaW5lZCxcbiAgICAgICAgfTtcbiAgICAgIH0gY2F0Y2ggKGVycm9yOiB1bmtub3duKSB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5BY2NvdW50Tm90Rm91bmRFcnJvcikgJiZcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5JbnZhbGlkQWNjb3VudE93bmVyRXJyb3IpXG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9yKCdVbmV4cGVjdGVkIGVycm9yJyk7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBwYXllciA9ICFmZWVQYXllciA/IG93bmVyIDogZmVlUGF5ZXI7XG5cbiAgICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgICBwYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgICBBU1NPQ0lBVEVEX1RPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG5cbiAgICAgICAgcmV0dXJuIH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gIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlcl9mZWVfYmFzaXNfcG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJGZWVCYXNpc1BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0YWRhdGEubmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzeW1ib2wnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLnN5bWJvbCkge1xuICAgICAgICAgICAgICByZXMgPSBpc1N5bWJvbChtZXRhZGF0YS5zeW1ib2wpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHJlcyAmJiByZXMuaXNFcnIpIHtcbiAgICAgICAgICByZXN1bHRzLnB1c2goLi4ucmVzLmVycm9yLmRldGFpbHMpO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIGlmIChyZXN1bHRzLmxlbmd0aCA+IDApIHtcbiAgICAgIC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9ncmFtKSkge1xuICAgICAgICAgICAgICAgIGxldCBpbnN0cnVjdGlvblRyYW5zZmVyO1xuXG4gICAgICAgICAgICAgICAgLy8gZmV0Y2ggIHRyYW5zZmVyIHRyYW5zYWN0aW9uIGZvciByZWxhdGlvbmFsIG1lbW9cbiAgICAgICAgICAgICAgICB0eE1ldGEudHJhbnNhY3Rpb24ubWVzc2FnZS5pbnN0cnVjdGlvbnMuZm9yRWFjaChcbiAgICAgICAgICAgICAgICAgIChpbnN0cnVjdGlvbikgPT4ge1xuICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgaXNQYXJzZWRJbnN0cnVjdGlvbihpbnN0cnVjdGlvbikgJiZcbiAgICAgICAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLlRyYW5zZmVyLnByb2dyYW0uaW5jbHVkZXMoXG4gICAgICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbi5wcm9ncmFtLFxuICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlciA9IGluc3RydWN0aW9uO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICk7XG5cbiAgICAgICAgICAgICAgICAvLyBzcGwtdG9rZW4gb3Igc3lzdGVtXG4gICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlciAmJlxuICAgICAgICAgICAgICAgICAgbW9kdWxlTmFtZSAhPT0gaW5zdHJ1Y3Rpb25UcmFuc2ZlclsncHJvZ3JhbSddXG4gICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICBkZWJ1Z0xvZyhcbiAgICAgICAgICAgICAgICAgICAgJyMgRmlsdGVyVHlwZS5NZW1vIGJyZWFrIGluc3RydWN0aW9uOiAnLFxuICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyLFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vIGZldGNoIG1lbW8gb25seSB0cmFuc2FjdGlvblxuICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuTWVtby5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIsXG4gICAgICAgICAgICAgICAgICBwb3N0VG9rZW5BY2NvdW50LFxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXNlIEZpbHRlclR5cGUuT25seU1lbW86IHtcbiAgICAgICAgICAgICAgaWYgKEZpbHRlck9wdGlvbnMuTWVtby5wcm9ncmFtLmluY2x1ZGVzKGluc3RydWN0aW9uLnByb2dyYW0pKSB7XG4gICAgICAgICAgICAgICAgbGV0IGluc3RydWN0aW9uVHJhbnNmZXI7XG5cbiAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLk1lbW8uaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyLFxuICAgICAgICAgICAgICAgICAgcG9zdFRva2VuQWNjb3VudCxcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLk1pbnQ6IHtcbiAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuTWludC5wcm9ncmFtLmluY2x1ZGVzKGluc3RydWN0aW9uLnByb2dyYW0pICYmXG4gICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5NaW50LmFjdGlvbi5pbmNsdWRlcyhcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLnBhcnNlZC50eXBlIGFzIHN0cmluZyxcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuTWludC5pbnRvVXNlclNpZGUoaW5zdHJ1Y3Rpb24sIHR4TWV0YSk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXNlIEZpbHRlclR5cGUuVHJhbnNmZXI6XG4gICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICBtb2R1bGVOYW1lID09PSBpbnN0cnVjdGlvbi5wcm9ncmFtICYmXG4gICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5UcmFuc2Zlci5hY3Rpb24uaW5jbHVkZXMoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbi5wYXJzZWQudHlwZSBhcyBzdHJpbmcsXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICBpZiAoaW5zdHJ1Y3Rpb24ucGFyc2VkLnR5cGUgPT09ICd0cmFuc2ZlckNoZWNrZWQnKSB7XG4gICAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLlRyYW5zZmVyQ2hlY2tlZC5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICAgIH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ksXG4gICAgICAgIDAsXG4gICAgICApO1xuXG4gICAgICBjb25zdCBzb3VyY2VUb2tlbiA9IGF3YWl0IEFjY291bnQuQXNzb2NpYXRlZC5yZXRyeUdldE9yQ3JlYXRlKFxuICAgICAgICB0b2tlbi50b1N0cmluZygpLFxuICAgICAgICBvd25lcixcbiAgICAgICAgcGF5ZXIsXG4gICAgICApO1xuXG4gICAgICBkZWJ1Z0xvZygnIyBzb3VyY2VUb2tlbjogJywgc291cmNlVG9rZW4pO1xuXG4gICAgICBjb25zdCBkZXN0VG9rZW4gPSBhd2FpdCBBY2NvdW50LkFzc29jaWF0ZWQucmV0cnlHZXRPckNyZWF0ZShcbiAgICAgICAgdG9rZW4udG9TdHJpbmcoKSxcbiAgICAgICAgd3JhcHBlZC50b1N0cmluZygpLFxuICAgICAgICBwYXllcixcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGRlc3RUb2tlbjogJywgZGVzdFRva2VuKTtcblxuICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgIGNyZWF0ZVRyYW5zZmVySW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgc291cmNlVG9rZW4udG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBkZXN0VG9rZW4udG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIHBhcnNlSW50KGAke2Ftb3VudH1gLCBSQURJWCksIC8vIE5vIGxhbXBvcnRzLCBpdHMgc29sXG4gICAgICAgICAga2V5cGFpcnMsXG4gICAgICAgICksXG4gICAgICApO1xuXG4gICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgY3JlYXRlQ2xvc2VBY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgd3JhcHBlZCxcbiAgICAgICAgICBkZXN0LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAg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rZWQiLCAiQ29udmVydGVyIiwgIlRyYW5zZmVyIiwgIkNvbnZlcnRlciIsICJWYWxpZGF0b3IiLCAiTWVzc2FnZSIsICJDb252ZXJ0ZXIiLCAiU2lnbmF0dXJlcyIsICJUcmFuc2FjdGlvbkZpbHRlciIsICJpbnN0cnVjdGlvbiIsICJDb252ZXJ0ZXIiLCAiU29sTmF0aXZlIiwgImltcG9ydF93ZWIzIiwgIlNvbE5hdGl2ZSIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiaW1wb3J0X3dlYjMiLCAiU29sTmF0aXZlIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJpbXBvcnRfc3BsX3Rva2VuIiwgIlNvbE5hdGl2ZSIsICJBY2NvdW50IiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJTb2xOYXRpdmUiLCAiZnMiLCAiU29sTmF0aXZlIiwgImFzc2VydCJdCn0K \ No newline at end of file diff --git a/packages/test-tools/dist/index.mjs b/packages/test-tools/dist/index.mjs index ebe09c2ab..4131bc3f6 100644 --- a/packages/test-tools/dist/index.mjs +++ b/packages/test-tools/dist/index.mjs @@ -2,7 +2,7 @@ import assert from "assert"; import fs from "fs"; -// ../shared/src/constants.ts +// ../suite-utils/src/constants.ts import { PublicKey } from "@solana/web3.js"; import SolanaJsonConfig from "@solana-suite/config/load"; var Config = SolanaJsonConfig; @@ -284,56 +284,6 @@ var TransactionBuilder; TransactionBuilder7.Common = Common2; })(TransactionBuilder || (TransactionBuilder = {})); -// ../shared/src/shared.ts -var overwriteObject = (object, targets) => { - const that = object; - targets.forEach((target) => { - delete that[target.existsKey]; - that[target.will.key] = target.will.value; - }); - return that; -}; -var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { - if (Constants.isDebugging === "true" || process.env.DEBUG === "true") { - console.log("[DEBUG]", data1, data2, data3, data4); - } -}; -var sleep = async (sec) => { - return new Promise((r) => setTimeout(r, sec * 1e3)); -}; -var isPromise = (obj) => { - return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; -}; -function Try(input, finallyInput) { - try { - const v = input(); - if (isPromise(v)) { - return v.then( - (x) => Result.ok(x), - (err) => Result.err(err) - ); - } else { - return Result.ok(v); - } - } catch (e) { - if (e instanceof Error) { - return Result.err(e); - } - return Result.err(Error(e)); - } finally { - if (finallyInput) { - debugLog("# finally input:", finallyInput); - finallyInput(); - } - } -} -var convertTimestampToDateTime = (created_at) => { - if (created_at) { - return new Date(created_at * 1e3); - } - return; -}; - // ../transaction-builder/src/batch.ts var TransactionBuilder2; ((TransactionBuilder7) => { @@ -801,7 +751,57 @@ var TransactionBuilder6 = { ...TransactionBuilder4 }; -// ../shared/src/result.ts +// ../suite-utils/src/shared.ts +var overwriteObject = (object, targets) => { + const that = object; + targets.forEach((target) => { + delete that[target.existsKey]; + that[target.will.key] = target.will.value; + }); + return that; +}; +var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { + if (Constants.isDebugging === "true" || process.env.DEBUG === "true") { + console.log("[DEBUG]", data1, data2, data3, data4); + } +}; +var sleep = async (sec) => { + return new Promise((r) => setTimeout(r, sec * 1e3)); +}; +var isPromise = (obj) => { + return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; +}; +function Try(input, finallyInput) { + try { + const v = input(); + if (isPromise(v)) { + return v.then( + (x) => Result.ok(x), + (err) => Result.err(err) + ); + } else { + return Result.ok(v); + } + } catch (e) { + if (e instanceof Error) { + return Result.err(e); + } + return Result.err(Error(e)); + } finally { + if (finallyInput) { + debugLog("# finally input:", finallyInput); + finallyInput(); + } + } +} +var convertTimestampToDateTime = (created_at) => { + if (created_at) { + return new Date(created_at * 1e3); + } + return; +}; + +// ../suite-utils/src/result.ts var AbstractResult = class { unwrap(ok, err) { const r = this._chain( @@ -913,15 +913,15 @@ var InternalErr = class extends AbstractResult { } }; var Result; -((Result11) => { +((Result12) => { function ok(value) { return new InternalOk(value); } - Result11.ok = ok; + Result12.ok = ok; function err(error) { return new InternalErr(error || Error()); } - Result11.err = err; + Result12.err = err; function all(obj) { if (Array.isArray(obj)) { const resArr = []; @@ -931,7 +931,7 @@ var Result; } resArr.push(item.value); } - return Result11.ok(resArr); + return Result12.ok(resArr); } const res = {}; const keys = Object.keys(obj); @@ -942,9 +942,9 @@ var Result; } res[key] = item.value; } - return Result11.ok(res); + return Result12.ok(res); } - Result11.all = all; + Result12.all = all; })(Result || (Result = {})); // ../converter/src/collection.ts @@ -1857,4 +1857,4 @@ var requestSol = async (pubkey, sol = 0.1) => { export { requestSol }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL3JlcXVlc3Qtc29sLnRzIiwgIi4uLy4uL3NoYXJlZC9zcmMvY29uc3RhbnRzLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2JhdGNoLnRzIiwgIi4uLy4uL25vZGUvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2NvbW1vbi50cyIsICIuLi8uLi9zaGFyZWQvc3JjL3NoYXJlZC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9taW50LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL3BhcnRpYWwtc2lnbi50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jYWxjdWxhdGUtdHhzaXplLnRzIiwgIi4uLy4uL2dsb2JhbC9zcmMvaW5kZXgudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvYXNzb2NpYXRlZC50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9rZXlwYWlyLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL3BkYS50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9pbmRleC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9pbmRleC50cyIsICI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5cbiAgICAgICAgICBpZiAoaW5zdCAmJiB0eXBlb2YgaW5zdCA9PT0gJ3N0cmluZycpIHtcbiAgICAgICAgICAgIGRlYnVnTG9nKCcjIGFzc29jaWF0ZWRUb2tlbkFjY291bnQ6ICcsIGluc3QpO1xuICAgICAgICAgICAgcmV0dXJuIGluc3Q7XG4gICAgICAgICAgfSBlbHNlIGlmIChpbnN0IGluc3RhbmNlb2YgVHJhbnNhY3Rpb25CdWlsZGVyLkNvbW1vbikge1xuICAgICAgICAgICAgKGF3YWl0IGluc3Quc3VibWl0KCkpLm1hcChcbiAgICAgICAgICAgICAgYXN5bmMgKG9rOiBzdHJpbmcpID0+IHtcbiAgICAgICAgICAgICAgICBhd2FpdCBOb2RlLmNvbmZpcm1lZFNpZyhvayk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGluc3QuZGF0YTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgKGVycjogRXJyb3IpID0+IHtcbiAgICAgICAgICAgICAgICBkZWJ1Z0xvZygnIyBFcnJvciBzdWJtaXQgcmV0cnlHZXRPckNyZWF0ZTogJywgZXJyKTtcbiAgICAgICAgICAgICAgICB0aHJvdyBlcnI7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgIGRlYnVnTG9nKGAjIHJldHJ5OiAke2NvdW50ZXJ9IGNyZWF0ZSB0b2tlbiBhY2NvdW50OiBgLCBlKTtcbiAgICAgICAgICBkZWJ1Z0xvZyhgIyBtaW50OiAke21pbnR9LCBvd25lcjogJHtvd25lcn0sIGZlZVBheWVyOiAke2ZlZVBheWVyfWApO1xuICAgICAgICB9XG4gICAgICAgIGF3YWl0IHNsZWVwKFJFVFJZX1NMRUVQX1RJTUUpO1xuICAgICAgICBjb3VudGVyKys7XG4gICAgICB9XG4gICAgICB0aHJvdyBFcnJvcihgcmV0cnkgYWN0aW9uIGlzIG92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c29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSk7XG5cbiAgICAgIHRyeSB7XG4gICAgICAgIC8vIERvbnQgdXNlIFJlc3VsdFxuICAgICAgICBhd2FpdCBnZXRBY2NvdW50KFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCkuY29tbWl0bWVudCxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3Q6IHVuZGVmaW5lZCxcbiAgICAgICAgfTtcbiAgICAgIH0gY2F0Y2ggKGVycm9yOiB1bmtub3duKSB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5BY2NvdW50Tm90Rm91bmRFcnJvcikgJiZcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5JbnZhbGlkQWNjb3VudE93bmVyRXJyb3IpXG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9yKCdVbmV4cGVjdGVkIGVycm9yJyk7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBwYXllciA9ICFmZWVQYXllciA/IG93bmVyIDogZmVlUGF5ZXI7XG5cbiAgICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgICBwYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksX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c3QgaW50b0luZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IE9wdGlvbjxJbnRlcm5hbENyZWF0b3JzW10+ID0+IHtcbiAgICAgIGlmICghaW5wdXQpIHtcbiAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICB9XG4gICAgICByZXR1cm4gaW5wdXQubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvQ29tcHJlc3NlZE5mdEluZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IEludGVybmFsQ3JlYXRvcnNbXSA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBbXTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBpbnB1dCEubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlciA9IChcbiAgICAgIG91dHB1dDogT3B0aW9uPEludGVybmFsQ3JlYXRvcnNbXT4sXG4gICAgKTogQ3JlYXRvcnNbXSB8IHVuZGVmaW5lZCA9PiB7XG4gICAgICBpZiAoIW91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cyA9IE9iamVjdC5rZXlzKG1ldGFkYXRhKTtcbiAgICAgIGNvbnN0IHJlc3VsdHM6IERldGFpbHNbXSA9IFtdO1xuICAgICAga2V5cy5tYXAoKGtleSkgPT4ge1xuICAgICAgICBsZXQgcmVzITogUmVzdWx0PHN0cmluZywgVmFsaWRhdG9yRXJyb3I+O1xuICAgICAgICBzd2l0Y2ggKGtleSkge1xuICAgICAgICAgIGNhc2UgJ2ltYWdlJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuaW1hZ2UpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNJbWFnZVVybChtZXRhZGF0YS5pbWFnZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdyb3lhbHR5JzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEucm95YWx0eSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1JveWFsdHkobWV0YWRhdGEucm95YWx0eSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYX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AgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlciA9IGluc3RydWN0aW9uO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICk7XG5cbiAgICAgICAgICAgICAgICAvLyBzcGwtdG9rZW4gb3Igc3lzdGVtXG4gICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlciAmJlxuICAgICAgICAgICAgICAgICAgbW9kdWxlTmFtZSAhPT0gaW5zdHJ1Y3Rpb25UcmFuc2ZlclsncHJvZ3JhbSddXG4gICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICBkZWJ1Z0xvZyhcbiAgICAgICAgICAgICAgICAgICAgJyMgRmlsdGVyVHlwZS5NZW1vIGJyZWFrIGluc3RydWN0aW9uOiAnLFxuICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyLFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vIGZldGNoIG1lbW8gb25seSB0cmFuc2FjdGlvblxuICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuTWVtby5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIsXG4gICAgICAgICAgICAgICAgICBwb3N0VG9rZW5BY2NvdW50LFxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXNlIEZpbHRlclR5cGUuT25seU1lbW86IHtcbiAgICAgICAgICAgICAgaWYgKEZpbHRlck9wdGlvbnMuTWVtby5wcm9ncmFtLmluY2x1ZGVzKGluc3RydWN0aW9uLnByb2dyYW0pKSB7XG4gICAgICAgICAgICAgICAgbGV0IGluc3RydWN0aW9uVHJhbnNmZXI7XG5cbiAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLk1lbW8uaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyLFxuICAgICAgICAgICAgICAgICAgcG9zdFRva2VuQWNjb3VudCxcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLk1pbnQ6IHtcbiAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuTWludC5wcm9ncmFtLmluY2x1ZGVzKGluc3RydWN0aW9uLnByb2dyYW0pICYmXG4gICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5NaW50LmFjdGlvbi5pbmNsdWRlcyhcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLnBhcnNlZC50eXBlIGFzIHN0cmluZyxcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuTWludC5pbnRvVXNlclNpZGUoaW5zdHJ1Y3Rpb24sIHR4TWV0YSk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXNlIEZpbHRlclR5cGUuVHJhbnNmZXI6XG4gICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICBtb2R1bGVOYW1lID09PSBpbnN0cnVjdGlvbi5wcm9ncmFtICYmXG4gICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5UcmFuc2Zlci5hY3Rpb24uaW5jbHVkZXMoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbi5wYXJzZWQudHlwZSBhcyBzdHJpbmcsXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICBpZiAoaW5zdHJ1Y3Rpb24ucGFyc2VkLnR5cGUgPT09ICd0cmFuc2ZlckNoZWNrZWQnKSB7XG4gICAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLlRyYW5zZmVyQ2hlY2tlZC5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICAgIHBvc3RUb2tlbkFjY291bnQsXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLlRyYW5zZmVyLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIHJldHVybiBoaXN0b3J5O1xuICAgIH07XG59XG4iLCAiaW1wb3J0IHsgUGFyc2VkQWNjb3VudERhdGEgfSBmcm9tICdAc29sYW5hL3dlYjMuanMnO1xuaW1wb3J0IHsgUmVzdWx0LCBUcnkgfSBmcm9tICd+L3NoYXJlZCc7XG5pbXBvcnQgeyBOb2RlIH0gZnJv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XBwZWQgPSBhd2FpdCBjcmVhdGVXcmFwcGVkTmF0aXZlQWNjb3VudChcbiAgICAgICAgY29ubmVjdGlvbixcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIHBhcnNlSW50KGAke2Ftb3VudC50b0xhbXBvcnRzKCl9YCwgUkFESVgpLFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgd3JhcHBlZCBzb2w6ICcsIHdyYXBwZWQudG9CYXNlNTgoKSk7XG5cbiAgICAgIGNvbnN0IGluc3RydWN0aW9ucyA9IFtdO1xuXG4gICAgICBjb25zdCB0b2tlbiA9IGF3YWl0IGNyZWF0ZU1pbnQoXG4gICAgICAgIGNvbm5lY3Rpb24sXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAwLFxuICAgICAgKTtcblxuICAgICAgY29uc3Qgc291cmNlVG9rZW4gPSBhd2FpdCBBY2NvdW50LkFzc29jaWF0ZWQucmV0cnlHZXRPckNyZWF0ZShcbiAgICAgICAgdG9rZW4udG9TdHJpbmcoKSxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIHBheWVyLFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgc291cmNlVG9rZW46ICcsIHNvdXJjZVRva2VuKTtcblxuICAgICAgY29uc3QgZGVzdFRva2VuID0gYXdhaXQgQWNjb3VudC5Bc3NvY2lhdGVkLnJldHJ5R2V0T3JDcmVhdGUoXG4gICAgICAgIHRva2VuLnRvU3RyaW5nKCksXG4gICAgICAgIHdyYXBwZWQudG9TdHJpbmcoKSxcbiAgICAgICAgcGF5ZXIsXG4gICAgICApO1xuXG4gICAgICBkZWJ1Z0xvZygnIyBkZXN0VG9rZW46ICcsIGRlc3RUb2tlbik7XG5cbiAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICBjcmVhdGVUcmFuc2Zlckluc3RydWN0aW9uKFxuICAgICAgICAgIHNvdXJjZVRva2VuLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgZGVzdFRva2VuLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBwYXJzZUludChgJHthbW91bnR9YCwgUkFESVgpLCAvLyBObyBsYW1wb3J0cywgaXRzIHNvbFxuICAgICAgICAgIGtleXBhaXJzLFxuICAgICAgICApLFxuICAgICAgKTtcblxuICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgIGNyZWF0ZUNsb3NlQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHdyYXBwZWQsXG4gICAgICAgICAgZGVzdC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAga2V5cGFpcnMsXG4gICAgICAgICksXG4gICAgICApO1xuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb24oXG4gICAgICAgIGluc3RydWN0aW9ucyxcbiAgICAgICAgbXVsdGlzaWcubWFwKChzKSA9PiBzLnRvS2V5cGFpcigpKSxcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCksXG4gICAgICApO1xuICAgIH0pO1xuICB9O1xufVxuIiwgImltcG9ydCB7IFNvbE5hdGl2ZSBhcyBGaW5kIH0gZnJvbSAnLi9maW5kJztcbmltcG9ydCB7IFNvbE5hdGl2ZSBhcyBHYXNMZXNzIH0gZnJvbSAnLi9nYXMtbGVzcy10cmFuc2Zlcic7XG5pbXBvcnQgeyBTb2xOYXRpdmUgYXMgVHJhbnNmZXIgfSBmcm9tICcuL3RyYW5zZmVyJztcbmltcG9ydCB7IFNvbE5hdGl2ZSBhcyBUcmFuc2ZlcldpdGhNdWx0aXNpZyB9IGZyb20gJy4vdHJ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va2VuIGFjY291aW50XG4gICAgICpcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gbWludFxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBvd25lclxuICAgICAqIEBwYXJhbSB7U2VjcmV0fSBmZWVQYXllclxuICAgICAqIEByZXR1cm5zIFByb21pc2U8c3RyaW5nPlxuICAgICAqL1xuICAgIGV4cG9ydCBjb25zdCByZXRyeUdldE9yQ3JlYXRlID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyOiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxzdHJpbmc+ID0+IHtcbiAgICAgIGxldCBjb3VudGVyID0gMTtcbiAgICAgIHdoaWxlIChjb3VudGVyIDwgUkVUUllfT1ZFUl9MSU1JVCkge1xuICAgICAgICB0cnkge1xuICAgICAgICAgIGNvbnN0IGluc3QgPSBhd2FpdCBnZXQobWludCwgb3duZXIsIGZlZVBheWVyLCB0cnVlKTtcblxuICAgICAgICAgIGlmIChpbnN0ICYmIHR5cGVvZiBpbnN0ID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgaW5zdCk7XG4gICAgICAgICAgICByZXR1cm4gaW5zdDtcbiAgICAgICAgICB9IGVsc2UgaWYgKGluc3QgaW5zdGFuY2VvZiBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uKSB7XG4gICAgICAgICAgICAoYXdhaXQgaW5zdC5zdWJtaXQoKSkubWFwKFxuICAgICAgICAgICAgICBhc3luYyAob2s6IHN0cmluZykgPT4ge1xuICAgICAgICAgICAgICAgIGF3YWl0IE5vZGUuY29uZmlybWVkU2lnKG9rKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gaW5zdC5kYXRhO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAoZXJyOiBFcnJvcikgPT4ge1xuICAgICAgICAgICAgICAgIGRlYnVnTG9nKCcjIEVycm9yIHN1Ym1pdCByZXRyeUdldE9yQ3JlYXRlOiAnLCBlcnIpO1xuICAgICAgICAgICAgICAgIHRocm93IGVycjtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgZGVidWdMb2coYCMgcmV0cnk6ICR7Y291bnRlcn0gY3JlYXRlIHRva2VuIGFjY291bnQ6IGAsIGUpO1xuICAgICAgICAgIGRlYnVnTG9nKGAjIG1pbnQ6ICR7bWludH0sIG93bmVyOiAke293bmVyfSwgZmVlUGF5ZXI6ICR7ZmVlUGF5ZXJ9YCk7XG4gICAgICAgIH1cbiAgICAgICAgYXdhaXQgc2xlZXAoUkVUUllfU0xFRVBfVElNRSk7XG4gICAgICAgIGNvdW50ZXIrKztcbiAgICAgIH1cbiAgICAgIHRocm93IEVycm9yKGByZXRyeSBhY3Rpb24gaXMgb3ZlciBsaW1pdCAke1JFVFJZX09WRVJfTElNSVR9YCk7XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIFtNYWluIGxvZ2ljXUdldCBBc3NvY2lhdGVkIHRva2VuIEFjY291bnQuXG4gICAgICogaWYgbm90IGNyZWF0ZWQsIGNyZWF0ZSBuZXcgdG9rZW4gYWNjb3VpbnRcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBtaW50XG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAgICogQHBhcmFtIHtQdWJrZXl9IGZlZVBheWVyXG4gICAgICogQHJldHVybnMgUHJvbWlzZTxzdHJpbmc+XG4gICAgICovXG4gICAgZXhwb3J0IGNvbnN0IG1ha2VPckNyZWF0ZUluc3RydWN0aW9uID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyPzogUHVia2V5LFxuICAgICAgYWxsb3dPd25lck9mZkN1cnZlID0gZmFsc2UsXG4gICAgKTogUHJvbWlzZTx7XG4gICAgICB0b2tlbkFjY291bnQ6IHN0cmluZztcbiAgICAgIGluc3Q6IFRyYW5zYWN0aW9uSW5zdHJ1Y3Rpb24gfCB1bmRlZmluZWQ7XG4gICAgfT4gPT4ge1xuICAgICAgY29uc3QgYXNzb2NpYXRlZFRva2VuQWNjb3VudCA9IGdldEFzc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jKFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSxcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3QsXG4gICAgICAgIH07XG4gICAgICB9XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IEtleXBhaXIgYXMgT3JpZ2luYWwsIFB1YmxpY0tleSB9IGZyb20gJ0Bzb2xhbmEvd2ViMy5qcyc7XG5pbXBvcnQgeyBQdWJrZXksIFNlY3JldCB9IGZyb20gJ34vdHlwZXMvYWNjb3VudCc7XG5pbXBvcnQgYnMgZnJvbSAnYnM1OCc7XG5cbmV4cG9ydCBuYW1lc3BhY2UgQWNjb3VudCB7XG4gIGV4cG9ydCBjbGFzcyBLZXlwYWlyIHtcbiAg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AgICBleHBvcnQgY29uc3QgaW50b0luZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IE9wdGlvbjxJbnRlcm5hbENyZWF0b3JzW10+ID0+IHtcbiAgICAgIGlmICghaW5wdXQpIHtcbiAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICB9XG4gICAgICByZXR1cm4gaW5wdXQubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvQ29tcHJlc3NlZE5mdEluZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IEludGVybmFsQ3JlYXRvcnNbXSA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBbXTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBpbnB1dCEubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlciA9IChcbiAgICAgIG91dHB1dDogT3B0aW9uPEludGVybmFsQ3JlYXRvcnNbXT4sXG4gICAgKTogQ3JlYXRvcnNbXSB8IHVuZGVmaW5lZCA9PiB7XG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kZWZpbmVkLFxuICAgICAgY2FsbGJhY2tGdW5jOiAoXG4gICAgICAgIGZpbGVQYXRoOiBGaWxlVHlwZSxcbiAgICAgICAgc3RvcmFnZVR5cGU6IFN0b3JhZ2VUeXBlLFxuICAgICAgICBmZWVQYXllcj86IFNlY3JldCxcbiAgICAgICkgPT4gUHJvbWlzZTxSZXN1bHQ8c3RyaW5nLCBFcnJvcj4+LFxuICAgICAgc3RvcmFnZVR5cGU6IFN0b3JhZ2VUeXBlLFxuICAgICAgZmVlUGF5ZXI/OiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxQcm9wZXJ0aWVzPiA9PiB7XG4gICAgICBpZiAoIWlucHV0IHx8ICFpbnB1dC5maWxlcykge1xuICAgICAgICByZXR1cm4ge307XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGZpbGVzID0gYXdhaXQgUHJvbWlzZS5hbGwoXG4gICAgICAgIGlucHV0LmZpbGVzLm1hcChhc3luYyAoZmlsZSkgPT4ge1xuICAgICAgICAgIGlmICghZmlsZS5maWxlUGF0aCkge1xuICAgICAgICAgICAgcmV0dXJuIHt9O1xuICAgICAgICAgIH1cbiAgICAgICAgICBjb25zdCByZXMgPSBhd2FpdCBjYWxsYmFja0Z1bmMoZmlsZS5maWxlUGF0aCwgc3RvcmFnZVR5cGUsIGZlZVBheWVyKTtcbiAgICAgICAgICBpZiAocmVzLmlzRXJyKSB7XG4gICAgICAgICAgICB0aHJvdyBFcnJvcihyZXMuZXJyb3IubWVzc2FnZSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBvdmVyd3JpdGVPYmplY3QoZmlsZSwgW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBleGlzdHNLZXk6ICdmaWxlUGF0aCcsXG4gICAgICAgICAgICAgIHdpbGw6IHsga2V5OiAndXJpJywgdmFsdWU6IHJlcy52YWx1ZSB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICBdKTtcbiAgICAgICAgfSksXG4gICAg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bnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEuc3ltYm9sKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU3ltYm9sKG1ldGFkYXRhLnN5bWJvbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAocmVzICYmIHJlcy5pc0Vycikge1xuICAgICAgICAgIHJlc3VsdHMucHVzaCguLi5yZXMuZXJyb3IuZGV0YWlscyk7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgICAgaWYgKHJlc3VsdHMubGVuZ3RoID4gMCkge1xuICAgICAgICBjb25zdCBtZXNzYWdlID1cbiAgICAgICAgICAnQ2F1Z2h0IGluIHRoZSB2YWxpZGF0aW9uIGVycm9ycy4gc2VlIGluZm9ybWF0aW9uIGUuZzogZXJyPFZhbGlkYXRvckVycm9yPi5kZXRhaWxzJztcbiAgICAgICAgdGhyb3cgbmV3IFZhbGlkYXRvckVycm9yKG1lc3NhZ2UsIHJlc3VsdHMpO1xuICAgICAgfVxuICAgICAgcmV0dXJuIE1lc3NhZ2UuU1VDQ0VTUztcbiAgICB9KTtcbiAgfTtcblxuICB0eXBlIFBpY2tOZnRTdG9yYWdlID0gUGljazxcbiAgICBPZm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GlvbnMuVHJhbnNmZXIucHJvZ3JhbS5pbmNsdWRlcyhcbiAgICAgICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLnByb2dyYW0sXG4gICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyID0gaW5zdHJ1Y3Rpb247XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgKTtcblxuICAgICAgICAgICAgICAgIC8vIHNwbC10b2tlbiBvciBzeXN0ZW1cbiAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyICYmXG4gICAgICAgICAgICAgICAgICBtb2R1bGVOYW1lICE9PSBpbnN0cnVjdGlvblRyYW5zZmVyWydwcm9ncmFtJ11cbiAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgIGRlYnVnTG9nKFxuICAgICAgICAgICAgICAgICAgICAnIyBGaWx0ZXJUeXBlLk1lbW8gYnJlYWsgaW5zdHJ1Y3Rpb246ICcsXG4gICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIsXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgLy8gZmV0Y2ggbWVtbyBvbmx5IHRyYW5zYWN0aW9uXG4gICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5NZW1vLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlcixcbiAgICAgICAgICAgICAgICAgIHBvc3RUb2tlbkFjY291bnQsXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5Pbmx5TWVtbzoge1xuICAgICAgICAgICAgICBpZiAoRmlsdGVyT3B0aW9ucy5NZW1vLnByb2dyYW0uaW5jbHVkZXMoaW5zdHJ1Y3Rpb24ucHJvZ3JhbSkpIHtcbiAgICAgICAgICAgICAgICBsZXQgaW5zdHJ1Y3Rpb25UcmFuc2ZlcjtcblxuICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuTWVtby5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIsXG4gICAgICAgICAgICAgICAgICBwb3N0VG9rZW5BY2NvdW50LFxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXNlIEZpbHRlclR5cGUuTWludDoge1xuICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5NaW50LnByb2dyYW0uaW5jbHVkZXMoaW5zdHJ1Y3Rpb24ucHJvZ3JhbSkgJiZcbiAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLk1pbnQuYWN0aW9uLmluY2x1ZGVzKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24ucGFyc2VkLnR5cGUgYXMgc3RyaW5nLFxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5NaW50LmludG9Vc2VyU2lkZShpbnN0cnVjdGlvbiwgdHhNZXRhKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5UcmFuc2ZlcjpcbiAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgIG1vZHVsZU5hbWUgPT09IGluc3RydWN0aW9uLnByb2dyYW0gJiZcbiAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLlRyYW5zZmVyLmFjdGlvbi5pbmNsdWRlcyhcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLnBhcnNlZC50eXBlIGFzIHN0cmluZyxcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgIGlmIChpbnN0cnVjdGlvbi5wYXJzZWQudHlwZSA9PT0gJ3RyYW5zZmVyQ2hlY2tlZCcpIHtcbiAgICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuVHJhbnNmZXJDaGVja2VkLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgICAgcG9zdFRva2VuQWNjb3VudCxcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuVHJhbnNmZXIuaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgICAgcmV0dXJuIGhpc3Rvcnk7XG4gICAgfTtcbn1cbiIsICJpbXBvcnQgeyBQY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cHRpb25zLmZlZVBheWVyIDogbXVsdGlzaWdbMF07XG4gICAgICBjb25zdCBrZXlwYWlycyA9IG11bHRpc2lnLm1hcCgocykgPT4gcy50b0tleXBhaXIoKSk7XG4gICAgICBjb25zdCB3cmFwcGVkID0gYXdhaXQgY3JlYXRlV3JhcHBlZE5hdGl2ZUFjY291bnQoXG4gICAgICAgIGNvbm5lY3Rpb24sXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICBwYXJzZUludChgJHthbW91bnQudG9MYW1wb3J0cygpfWAsIFJBRElYKSxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIHdyYXBwZWQgc29sOiAnLCB3cmFwcGVkLnRvQmFzZTU4KCkpO1xuXG4gICAgICBjb25zdCBpbnN0cnVjdGlvbnMgPSBbXTtcblxuICAgICAgY29uc3QgdG9rZW4gPSBhd2FpdCBjcmVhdGVNaW50KFxuICAgICAgICBjb25uZWN0aW9uLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgMCxcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IHNvdXJjZVRva2VuID0gYXdhaXQgQWNjb3VudC5Bc3NvY2lhdGVkLnJldHJ5R2V0T3JDcmVhdGUoXG4gICAgICAgIHRva2VuLnRvU3RyaW5nKCksXG4gICAgICAgIG93bmVyLFxuICAgICAgICBwYXllcixcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIHNvdXJjZVRva2VuOiAnLCBzb3VyY2VUb2tlbik7XG5cbiAgICAgIGNvbnN0IGRlc3RUb2tlbiA9IGF3YWl0IEFjY291bnQuQXNzb2NpYXRlZC5yZXRyeUdldE9yQ3JlYXRlKFxuICAgICAgICB0b2tlbi50b1N0cmluZygpLFxuICAgICAgICB3cmFwcGVkLnRvU3RyaW5nKCksXG4gICAgICAgIHBheWVyLFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgZGVzdFRva2VuOiAnLCBkZXN0VG9rZW4pO1xuXG4gICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgY3JlYXRlVHJhbnNmZXJJbnN0cnVjdGlvbihcbiAgICAgICAgICBzb3VyY2VUb2tlbi50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGRlc3RUb2tlbi50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgcGFyc2VJbnQoYCR7YW1vdW50fWAsIFJBRElYKSwgLy8gTm8gbGFtcG9ydHMsIGl0cyBzb2xcbiAgICAgICAgICBrZXlwYWlycyxcbiAgICAgICAgKSxcbiAgICAgICk7XG5cbiAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICBjcmVhdGVDbG9zZUFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgICB3cmFwcGVkLFxuICAgICAgICAgIGRlc3QudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGtleXBhaXJzLFxuICAgICAgICApLFxuICAgICAgKTtcblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uKFxuICAgICAgICBpbnN0cnVjdGlvbnMsXG4gICAgICAgIG11bHRpc2lnLm1hcCgocykgPT4gcy50b0tleXBhaXIoKSksXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgKTtcbiAgICB9KTtcbiAgfTtcbn1cbiIsICJpbXBvcnQgeyBTb2xOYXRpdmUgYXMgRmluZCB9IGZyb20gJy4vZmluZCc7XG5pbXBvcnQgeyBTb2xOYXRpdmUgYXMgR2FzTGVzcyB9IGZyb20gJy4vZ2FzLWxlc3MtdHJhbnNmZXInO1xu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ZlcnRlciIsICJUcmFuc2ZlciIsICJDb252ZXJ0ZXIiLCAiVmFsaWRhdG9yIiwgIk1lc3NhZ2UiLCAiQ29udmVydGVyIiwgIlNpZ25hdHVyZXMiLCAiVHJhbnNhY3Rpb25GaWx0ZXIiLCAiaW5zdHJ1Y3Rpb24iLCAiQ29udmVydGVyIiwgIlNvbE5hdGl2ZSIsICJUcmFuc2FjdGlvbiIsICJTb2xOYXRpdmUiLCAiVHJhbnNhY3Rpb24iLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlN5c3RlbVByb2dyYW0iLCAiU29sTmF0aXZlIiwgIlN5c3RlbVByb2dyYW0iLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlNvbE5hdGl2ZSIsICJBY2NvdW50IiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJTb2xOYXRpdmUiLCAiU29sTmF0aXZlIl0KfQo= \ No newline at end of file diff --git a/packages/test-tools/setup.ts b/packages/test-tools/setup.ts index d792d1e27..2cbf27c3b 100644 --- a/packages/test-tools/setup.ts +++ b/packages/test-tools/setup.ts @@ -2,7 +2,7 @@ import fs from 'node:fs'; import bs from 'bs58'; import { Keypair, LAMPORTS_PER_SOL, PublicKey } from '@solana/web3.js'; import { KeypairAccount } from '~/types/account'; -import { Constants, debugLog, Pubkey, Secret } from '~/shared'; +import { Constants, debugLog, Pubkey, Secret } from '~/suite-utils'; import { Node } from '~/node'; import { Account } from '~/account'; diff --git a/packages/test-tools/tsconfig.json b/packages/test-tools/tsconfig.json index 2b15d6730..783278df8 100644 --- a/packages/test-tools/tsconfig.json +++ b/packages/test-tools/tsconfig.json @@ -6,7 +6,6 @@ "paths": { "~/types/*": ["../types/src/*/index.ts"], "~/*": ["../*/src/index.ts"], - "~/shared/exports": ["../shared/src/exports.ts"] } }, "include": ["src/**/*.ts", "test/**/*.ts"], diff --git a/packages/transaction-builder/dist/index.js b/packages/transaction-builder/dist/index.js index b2fbea3d7..c54fc6f46 100644 --- a/packages/transaction-builder/dist/index.js +++ b/packages/transaction-builder/dist/index.js @@ -37,7 +37,7 @@ module.exports = __toCommonJS(src_exports); // src/batch.ts var import_web37 = require("@solana/web3.js"); -// ../shared/src/constants.ts +// ../suite-utils/src/constants.ts var import_web3 = require("@solana/web3.js"); var import_load = __toESM(require("@solana-suite/config/load")); var Config = import_load.default; @@ -198,7 +198,7 @@ var Constants; })(Constants || (Constants = {})); console.log(Constants.WarnningMessage.ANNOUNCE); -// ../shared/src/shared.ts +// ../suite-utils/src/shared.ts var overwriteObject = (object, targets) => { const that = object; targets.forEach((target) => { @@ -248,7 +248,7 @@ var convertTimestampToDateTime = (created_at) => { return; }; -// ../shared/src/result.ts +// ../suite-utils/src/result.ts var AbstractResult = class { unwrap(ok, err) { const r = this._chain( @@ -360,15 +360,15 @@ var InternalErr = class extends AbstractResult { } }; var Result; -((Result7) => { +((Result8) => { function ok(value) { return new InternalOk(value); } - Result7.ok = ok; + Result8.ok = ok; function err(error) { return new InternalErr(error || Error()); } - Result7.err = err; + Result8.err = err; function all(obj) { if (Array.isArray(obj)) { const resArr = []; @@ -378,7 +378,7 @@ var Result; } resArr.push(item.value); } - return Result7.ok(resArr); + return Result8.ok(resArr); } const res = {}; const keys = Object.keys(obj); @@ -389,9 +389,9 @@ var Result; } res[key] = item.value; } - return Result7.ok(res); + return Result8.ok(res); } - Result7.all = all; + Result8.all = all; })(Result || (Result = {})); // ../account/src/associated.ts @@ -1524,4 +1524,4 @@ var TransactionBuilder = { 0 && (module.exports = { TransactionBuilder }); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uL3NyYy9iYXRjaC50cyIsICIuLi8uLi9zaGFyZWQvc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi9zaGFyZWQvc3JjL3NoYXJlZC50cyIsICIuLi8uLi9zaGFyZWQvc3JjL3Jlc3VsdC50cyIsICIuLi8uLi9hY2Nv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ayk7XG4gICAgICAgIGlmIChmZWVQYXllcikge1xuICAgICAgICAgIGNvbnN0IG9iaiA9IG9rIGFzIFBhcnRpYWxTaWduU3RydWN0dXJlO1xuICAgICAgICAgIHJldHVybiBhd2FpdCBvYmouc3VibWl0KGZlZVBheWVyKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICBjb25zdCBvYmogPSBvayBhcyBDb21tb25TdHJ1Y3R1cmUgfCBNaW50U3RydWN0dXJlO1xuICAgICAgICAgIHJldHVybiBhd2FpdCBvYmouc3VibWl0KCk7XG4gICAgICAgIH1cbiAgICAgIH0sXG4gICAgICAoZXJyKSA9PiB7XG4gICAgICAgIHJldHVybiBlcnI7XG4gICAgICB9LFxuICAgICk7XG4gICAgaWYgKHJlcy5pc0Vycikge1xuICAgICAgcmV0dXJuIFJlc3VsdC5lcnIocmVzLmVycm9yKTtcbiAgICB9XG4gICAgcmV0dXJuIHJlcy52YWx1ZTtcbiAgfVxufVxuXG4vLy8gTXVsdGlwbGUgVHJhbnNhY3Rpb25CdWlsZGVyIC8vLy9cbmRlY2xhcmUgZ2xvYmFsIHtcbiAgLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLXVudXNlZC12YXJzICovXG4gIGludGVyZmFjZSBBcnJheTxUPiB7XG4gICAgc3VibWl0KGZlZVBheWVyPzogU2VjcmV0KTogUHJvbWlzZTxSZXN1bHQ8VHJhbnNhY3Rpb25TaWduYXR1cmUsIEVycm9yPj47XG4gIH1cbn1cblxuQXJyYXkucHJvdG90eXBlLnN1Ym1pdCA9IGFzeW5jIGZ1bmN0aW9uIChmZWVQYXllcj86IFNlY3JldCkge1xuICBpZiAoZmVlUGF5ZXIpIHtcbiAgICBsZXQgaSA9IDE7XG4gICAgZm9yIGF3YWl0IChjb25zdCBvYmogb2YgdGhpcykge1xuICAgICAgaWYgKG9iai5pc0Vycikge1xuICAgICAgICByZXR1cm4gb2JqO1xuICAgICAgfSBlbHNlIGlmICh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vbnN0IFJFVFJZX1NMRUVQX1RJTUUgPSAzO1xuICAgIC8vQGludGVybmFsXG4gICAgY29uc3QgZ2V0ID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyOiBTZWNyZXQsXG4gICAgICBhbGxvd093bmVyT2ZmQ3VydmUgPSBmYWxzZSxcbiAgICApOiBQcm9taXNlPHN0cmluZyB8IENvbW1vblN0cnVjdHVyZTxQdWJrZXk+PiA9PiB7XG4gICAgICBjb25zdCByZXMgPSBhd2FpdCBtYWtlT3JDcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIG5ldyBLZXlwYWlyLktleXBhaXIoeyBzZWNyZXQ6IGZlZVBheWVyIH0pLnB1YmtleSxcbiAgICAgICAgYWxsb3dPd25lck9mZkN1cnZlLFxuICAgICAgKTtcblxuICAgICAgaWYgKCFyZXMuaW5zdCkge1xuICAgICAgICByZXR1cm4gcmVzLnRva2VuQWNjb3VudDtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uPFB1YmtleT4oXG4gICAgICAgIFtyZXMuaW5zdF0sXG4gICAgICAgIFtdLFxuICAgICAgICBmZWVQYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgcmVzLnRva2VuQWNjb3VudCEsXG4gICAgICApO1xuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiBSZXRyeSBmdW5jdGlvbiBpZiBjcmVhdGUgbmV3IHRva2VuIGFjY291aW50XG4gICAgICpcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gbWludFxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBvd25lclxuICAgICAqIEBwYXJhbSB7U2VjcmV0fSBmZWVQYXllclxuICAgICAqIEByZXR1cm5zIFByb21pc2U8c3RyaW5nPlxuICAgICAqL1xuICAgIGV4cG9ydCBjb25zdCByZXRyeUdldE9yQ3JlYXRlID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyOiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxzdHJpbmc+ID0+IHtcbiAgICAgIGxldCBjb3VudGVyID0gMTtcbiAgICAgIHdoaWxlIChjb3VudGVyIDwgUkVUUllfT1ZFUl9MSU1JVCkge1xuICAgICAgICB0cnkge1xuICAgICAgICAgIGNvbnN0IGluc3QgPSBhd2FpdCBnZXQobWludCwgb3duZXIsIGZlZVBheWVyLCB0cnVlKTtcblxuICAgICAgICAgIGlmIChpbnN0ICYmIHR5cGVvZiBpbnN0ID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgaW5zdCk7XG4gICAgICAgICAgICByZXR1cm4gaW5zdDtcbiAgICAgICAgICB9IGVsc2UgaWYgKGluc3QgaW5zdGFuY2VvZiBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uKSB7XG4gICAgICAgICAgICAoYXdhaXQgaW5zdC5zdWJtaXQoKSkubWFwKFxuICAgICAgICAgICAgICBhc3luYyAob2s6IHN0cmluZykgPT4ge1xuICAgICAgICAgICAgICAgIGF3YWl0IE5vZGUuY29uZmlybWVkU2lnKG9rKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gaW5zdC5kYXRhO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAoZXJyOiBFcnJvcikgPT4ge1xuICAgICAgICAgICAgICAgIGRlYnVnTG9nKCcjIEVycm9yIHN1Ym1pdCByZXRyeUdldE9yQ3JlYXRlOiAnLCBlcnIpO1xuICAgICAgICAgICAgICAgIHRocm93IGVycjtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICB9IGNhdGNoIChlKSB7XG4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Nzb2NpYXRlZFRva2VuQWNjb3VudCA9IGdldEFzc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jKFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSxcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3QsXG4gICAgICAgIH07XG4gICAgICB9XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IEtleXBhaXIgYXMgT3JpZ2luYWwsIFB1YmxpY0tleSB9IGZyb20gJ0Bzb2xhbmEvd2ViMy5qcyc7XG5pbXBvcnQgeyBQdWJrZXksIFNlY3JldCB9IGZyb20gJ34vdHlwZXMvYWNjb3VudCc7XG5pbXBvcnQgYnMgZnJvbSAnYnM1OCc7XG5cbmV4cG9ydCBuYW1lc3BhY2UgQWNjb3VudCB7XG4gIGV4cG9ydCBjbGFzcyBLZXlwYWlyIHtcbiAgICBzZWNyZXQ6IFNlY3JldDtcbiAgICBwdWJrZXk6IFB1YmtleTtcblxuICAgIGNvbnN0cnVjdG9yKHBhcmFtczogeyBwdWJrZXk/OiBQdWJrZXk7IHNlY3JldDogU2VjcmV0IH0pIHtcbiAgICAgIGlmICghcGFyYW1zLnB1YmtleSkge1xuICAgICAgICBjb25zdCBrZXlwYWly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xuICAgICAgICAgICAgcmV0dXJuIHt9O1xuICAgICAgICAgIH1cbiAgICAgICAgICBjb25zdCByZXMgPSBhd2FpdCBjYWxsYmFja0Z1bmMoZmlsZS5maWxlUGF0aCwgc3RvcmFnZVR5cGUsIGZlZVBheWVyKTtcbiAgICAgICAgICBpZiAocmVzLmlzRXJyKSB7XG4gICAgICAgICAgICB0aHJvdyBFcnJvcihyZXMuZXJyb3IubWVzc2FnZSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBvdmVyd3JpdGVPYmplY3QoZmlsZSwgW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBleGlzdHNLZXk6ICdmaWxlUGF0aCcsXG4gICAgICAgICAgICAgIHdpbGw6IHsga2V5OiAndXJpJywgdmFsdWU6IHJlcy52YWx1ZSB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICBdKTtcbiAgICAgICAgfSksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHsgLi4uaW5wdXQsIGZpbGVzIH0gYXMgUHJvcGVydGllcztcbiAgICB9O1xuICB9XG59XG4iLCAiLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLXVudXNlZC12YXJzICovXG5pbXBvcnQgeyBPcHRpb24sIFVzZXMgfSBmcm9tICd+L3R5cGVzL3JlZ3VsYXItbmZ0JztcblxuZXhwb3J0IG5hbWVzcGFjZSBDb252ZXJ0ZXIge1xuICBleHBvcnQgbmFtZXNwYWNlIFVzZXMge1xuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlclNpZGUgPSAob3V0cHV0OiBPcHRpb248VXNlcz4pOiBVc2VzIHwgdW5kZWZpbmVkID0+IHtcbiAgICAgIGlmICghb3V0cHV0KSB7XG4gICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgICB9XG4gICAgICByZXR1cm4gb3V0cHV0O1xuICAgIH07XG4gIH1cbn1cbiIsICJpbXBvcnQgeyBDb252ZXJ0ZXIgYXMgX0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JlcyA9IGlzUm95YWx0eShtZXRhZGF0YS5yb3lhbHR5KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlcl9mZWVfYmFzaXNfcG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJGZWVCYXNpc1BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0YWRhdGEubmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzeW1ib2wnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLnN5bWJvbCkge1xuICAgICAgICAgICAgICByZXMgPSBpc1N5bWJvbChtZXRhZGF0YS5zeW1ib2wpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHJlcyAmJiByZXMuaXNFcnIpIHtcbiAgICAgICAgICByZXN1bHRzLnB1c2goLi4ucmVzLmVycm9yLmRldGFpbHMpO1x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hbnNhY3Rpb25CdWlsZGVyIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiXQp9Cg== \ No newline at end of file +//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uL3NyYy9iYXRjaC50cyIsICIuLi8uLi9zdWl0ZS11dGlscy9zcmMvY29uc3RhbnRzLnRzIiwgIi4uLy4uL3N1aXRlLXV0aWxzL3NyYy9zaGFyZWQudHMiLCAiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL3Jlc3VsdC50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9hc3NvY2lhdGVkLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2tleXBhaXIudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvcGRhLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2luZGV4LnRzIiwgIi4uLy4uL2dsb2JhbC9zcmMvaW5kZXgudHMiLCAiLi4vLi4vY29udmVydGVyL3NyYy9jb2xsZWN0aW9uLnRzIiwgIi4uLy4uL2NvbnZlcnRlci9zcmMvY3JlYXRvcnMudHMiLCAiLi4vLi4vY29udmVydGVyL3NyYy9jb21wcmVzc2VkLW5mdC1tZXRhZGF0YS50cyIsICIuLi8uLi9jb252ZXJ0ZXIvc3JjL3JveWFsdHkudHMiLCAiLi4vLi4vY29udmVydGVyL3NyYy9uZnQudHMiLCAiLi4vLi4vY29udmVydGVyL3NyYy9tZW1vLnRzIiwgIi4uLy4uL2NvbnZlcnRlci9zcmMvbWludC50cyIsICIuLi8uLi9jb252ZXJ0ZXIvc3JjL3JlZ3VsYXItbmZ0LW1ldGFkYXRhLnRzIiwgIi4uLy4uL2NvbnZlcnRlci9zcmMvcHJvcGVydGllcy50cyIsICIuLi8uLi9jb252ZXJ0ZXIvc3JjL3VzZXMudHMiLCAiLi4vLi4vY29udmVydGVyL3NyYy90b2tl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YXdhaXQgTm9kZS5jb25maXJtZWRTaWcob2spO1xuICAgICAgICAgICAgICAgIHJldHVybiBpbnN0LmRhdGE7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIChlcnI6IEVycm9yKSA9PiB7XG4gICAgICAgICAgICAgICAgZGVidWdMb2coJyMgRXJyb3Igc3VibWl0IHJldHJ5R2V0T3JDcmVhdGU6ICcsIGVycik7XG4gICAgICAgICAgICAgICAgdGhyb3cgZXJyO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICBkZWJ1Z0xvZyhgIyByZXRyeTogJHtjb3VudGVyfSBjcmVhdGUgdG9rZW4gYWNjb3VudDogYCwgZSk7XG4gICAgICAgICAgZGVidWdMb2coYCMgbWludDogJHttaW50fSwgb3duZXI6ICR7b3duZXJ9LCBmZWVQYXllcjogJHtmZWVQYXllcn1gKTtcbiAgICAgICAgfVxuICAgICAgICBhd2FpdCBzbGVlcChSRVRSWV9TTEVFUF9USU1FKTtcbiAgICAgICAgY291bnRlcisrO1xuICAgICAgfVxuICAgICAgdGhyb3cgRXJyb3IoYHJldHJ5IGFjdGlvbiBpcyBvdmVyIGxpbWl0ICR7UkVUUllfT1ZFUl9MSU1JVH1gKTtcbiAgICB9O1xuXG4gICAgLyoqXG4gICAgICogW01haW4gbG9naWNdR2V0IEFzc29jaWF0ZWQgdG9rZW4gQWNjb3VudC5cbiAgICAgKiBpZiBub3QgY3JlYXRlZCwgY3JlYXRlIG5ldyB0b2tlbiBhY2NvdWludFxuICAgICAqXG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG1pbnRcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gb3duZXJcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gZmVlUGF5ZXJcbiAgICAgKiBAcmV0dXJucyBQcm9taXNlPHN0cmluZz5cbiAgICAgKi9cbiAgICBleHBvcn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nQ6IGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSxcbiAgICAgICAgICBpbnN0OiB1bmRlZmluZWQsXG4gICAgICAgIH07XG4gICAgICB9IGNhdGNoIChlcnJvcjogdW5rbm93bikge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuQWNjb3VudE5vdEZvdW5kRXJyb3IpICYmXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuSW52YWxpZEFjY291bnRPd25lckVycm9yKVxuICAgICAgICApIHtcbiAgICAgICAgICB0aHJvdyBFcnJvcignVW5leHBlY3RlZCBlcnJvcicpO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgcGF5ZXIgPSAhZmVlUGF5ZXIgPyBvd25lciA6IGZlZVBheWVyO1xuXG4gICAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVBc3NvY2lhdGVkVG9rZW5BY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgcGF5ZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdCxcbiAgICAgICAgfTtcbiAgICAgIH1cbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHsgS2V5cGFpciBhcyBPcmlnaW5hbCwgUHVibGljS2V5IH0gZnJvbSAnQHNvbGFuYS93ZWIzLmpzJztcbmltc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NLZXkuZmluZFByb2dyYW1BZGRyZXNzU3luYyhcbiAgICAgICAgW2FkZHJlc3MudG9QdWJsaWNLZXkoKS50b0J1ZmZlcigpXSxcbiAgICAgICAgTVBMX0JVQkJMRUdVTV9QUk9HUkFNX0lELnRvUHVibGljS2V5KCksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGdldEJndW1TaWduZXIgPSAoKTogUHVibGljS2V5ID0+IHtcbiAgICAgIGNvbnN0IFtwdWJsaWNLZXldID0gUHVibGljS2V5LmZpbmRQcm9ncmFtQWRkcmVzc1N5bmMoXG4gICAgICAgIFtCdWZmZXIuZnJvbSgnY29sbGVjdGlvbl9jcGknLCAndXRmOCcpXSxcbiAgICAgICAgTVBMX0JVQkJMRUdVTV9QUk9HUkFNX0lELnRvUHVibGljS2V5KCksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGdldEFzc2V0SWQgPSAoYWRkcmVzczogUHVia2V5LCBsZWFmSW5kZXg6IG51bWJlcik6IFB1YmtleSA9PiB7XG4gICAgICBjb25zdCBub2RlID0gbmV3IEJOLkJOKGxlYWZJbmRleCk7XG4gICAgICBjb25zdCBbYXNzZXRJZF0gPSBQdWJsaWNLZXkuZmluZFByb2dyYW1BZGRyZXNzU3luYyhcbiAgICAgICAgW1xuICAgICAgICAgIEJ1ZmZlci5mcm9tKCdhc3NldCcsICd1dGY4JyksXG4gICAgICAgICAgYWRkcmVzcy50b1B1YmxpY0tleSgpLnRvQnVmZmVyKCksXG4gICAgICAgICAgVWludDhBcnJheS5mcm9tKG5vZGUudG9BcnJheSgnbGUnLCA4KSksXG4gICAgICAgIF0sXG4gICAgICAgIE1QTF9CVUJCTEVHVU1fUFJPR1JBTV9JRC50b1B1YmxpY0tleSgpLFxuICAgICAgKTtcbiAgICAgIHJldHVybiBhc3NldEl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ZXR1cm4gaW5wdXQubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvQ29tcHJlc3NlZE5mdEluZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IEludGVybmFsQ3JlYXRvcnNbXSA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBbXTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBpbnB1dCEubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlciA9IChcbiAgICAgIG91dHB1dDogT3B0aW9uPEludGVybmFsQ3JlYXRvcnNbXT4sXG4gICAgKTogQ3JlYXRvcnNbXSB8IHVuZGVmaW5lZCA9PiB7XG4gICAgICBpZiAoIW91dHB1dCkge1xuICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gb3V0cHV0Lm1hcCgoZGF0YSkgPT4ge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIGFkZHJlc3M6IGRhdGEuYWRkcmVzcy50b1N0cmluZygpLFxuICAgICAgICAgIHNoYXJlOiBkYXRhL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gc3RvcmFnZVR5cGU6IFN0b3JhZ2VUeXBlLFxuICAgICAgZmVlUGF5ZXI/OiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxQcm9wZXJ0aWVzPiA9PiB7XG4gICAgICBpZiAoIWlucHV0IHx8ICFpbnB1dC5maWxlcykge1xuICAgICAgICByZXR1cm4ge307XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGZpbGVzID0gYXdhaXQgUHJvbWlzZS5hbGwoXG4gICAgICAgIGlucHV0LmZpbGVzLm1hcChhc3luYyAoZmlsZSkgPT4ge1xuICAgICAgICAgIGlmICghZmlsZS5maWxlUGF0aCkge1xuICAgICAgICAgICAgcmV0dXJuIHt9O1xuICAgICAgICAgIH1cbiAgICAgICAgICBjb25zdCByZXMgPSBhd2FpdCBjYWxsYmFja0Z1bmMoZmlsZS5maWxlUGF0aCwgc3RvcmFnZVR5cGUsIGZlZVBheWVyKTtcbiAgICAgICAgICBpZiAocmVzLmlzRXJyKSB7XG4gICAgICAgICAgICB0aHJvdyBFcnJvcihyZXMuZXJyb3IubWVzc2FnZSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBvdmVyd3JpdGVPYmplY3QoZmlsZSwgW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBleGlzdHNLZXk6ICdmaWxlUGF0aCcsXG4gICAgICAgICAgICAgIHdpbGw6IHsga2V5OiAndXJpJywgdmFsdWU6IHJlcy52YWx1ZSB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICBdKTtcbiAgICAgICAgfSksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHsgLi4uaW5wdXQsIGZpbGVzIH0gYXMgUHJvcGVydGllcztcbiAgICB9O1xuICB9XG59XG4iLCAiLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLXVudXNlZC12YXJzICovXG5pbXBvcnQgeyBPcHRpb24sIFVzZXMgfSBmcm9tICd+L3R5cGVzL3JlZ3VsYXItbmZ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ICAgICAgbGV0IHJlcyE6IFJlc3VsdDxzdHJpbmcsIFZhbGlkYXRvckVycm9yPjtcbiAgICAgICAgc3dpdGNoIChrZXkpIHtcbiAgICAgICAgICBjYXNlICdpbWFnZSc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLmltYWdlKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzSW1hZ2VVcmwobWV0YWRhdGEuaW1hZ2UpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAncm95YWx0eSc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnJveWFsdHkpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNSb3lhbHR5KG1ldGFkYXRhLnJveWFsdHkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgIC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ZXJ0ZXIiLCAiUHJvcGVydGllcyIsICJDb252ZXJ0ZXIiLCAiVXNlcyIsICJDb252ZXJ0ZXIiLCAiVG9rZW5NZXRhZGF0YSIsICJDb252ZXJ0ZXIiLCAiVHJhbnNmZXJDaGVja2VkIiwgIkNvbnZlcnRlciIsICJUcmFuc2ZlciIsICJDb252ZXJ0ZXIiLCAiVmFsaWRhdG9yIiwgIk1lc3NhZ2UiLCAiQ29udmVydGVyIiwgImltcG9ydF93ZWIzIiwgIk5vZGUiLCAiaW1wb3J0X3dlYjMiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIkNvbW1vbiIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiaW1wb3J0X3dlYjMiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgImltcG9ydF93ZWIzIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIl0KfQo= \ No newline at end of file diff --git a/packages/transaction-builder/dist/index.mjs b/packages/transaction-builder/dist/index.mjs index 1a434ef35..2e82a91c4 100644 --- a/packages/transaction-builder/dist/index.mjs +++ b/packages/transaction-builder/dist/index.mjs @@ -4,7 +4,7 @@ import { Transaction as Transaction2 } from "@solana/web3.js"; -// ../shared/src/constants.ts +// ../suite-utils/src/constants.ts import { PublicKey } from "@solana/web3.js"; import SolanaJsonConfig from "@solana-suite/config/load"; var Config = SolanaJsonConfig; @@ -165,7 +165,7 @@ var Constants; })(Constants || (Constants = {})); console.log(Constants.WarnningMessage.ANNOUNCE); -// ../shared/src/shared.ts +// ../suite-utils/src/shared.ts var overwriteObject = (object, targets) => { const that = object; targets.forEach((target) => { @@ -215,7 +215,7 @@ var convertTimestampToDateTime = (created_at) => { return; }; -// ../shared/src/result.ts +// ../suite-utils/src/result.ts var AbstractResult = class { unwrap(ok, err) { const r = this._chain( @@ -327,15 +327,15 @@ var InternalErr = class extends AbstractResult { } }; var Result; -((Result7) => { +((Result8) => { function ok(value) { return new InternalOk(value); } - Result7.ok = ok; + Result8.ok = ok; function err(error) { return new InternalErr(error || Error()); } - Result7.err = err; + Result8.err = err; function all(obj) { if (Array.isArray(obj)) { const resArr = []; @@ -345,7 +345,7 @@ var Result; } resArr.push(item.value); } - return Result7.ok(resArr); + return Result8.ok(resArr); } const res = {}; const keys = Object.keys(obj); @@ -356,9 +356,9 @@ var Result; } res[key] = item.value; } - return Result7.ok(res); + return Result8.ok(res); } - Result7.all = all; + Result8.all = all; })(Result || (Result = {})); // ../account/src/associated.ts @@ -1509,4 +1509,4 @@ var TransactionBuilder = { export { TransactionBuilder }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2JhdGNoLnRzIiwgIi4uLy4uL3NoYXJlZC9zcmMvY29uc3RhbnRzLnRzIiwgIi4uLy4uL3NoYXJlZC9zcmMvc2hhcmVkLnRzIiwgIi4uLy4uL3NoYXJlZC9zcmMvcmVzdWx0LnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2Fzc29jaWF0ZWQudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMva2V5cGFpci50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9wZGEudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvaW5kZXgudHMiLCAiLi4vLi4vZ2xvYmFsL3NyYy9pbmRleC50cyIsICIuLi8uLi9jb252ZXJ0ZXIvc3JjL2NvbGxlY3Rpb24udHMiLCAiLi4vLi4vY29udmVydGVyL3NyYy9jcmVhdG9ycy50cyIsICIuLi8uLi9jb252ZXJ0ZXIvc3JjL2NvbXByZXNzZWQtbmZ0LW1ldGFkYXRhLnRzIiwgIi4uLy4uL2NvbnZlcnRlci9zcmMvcm95YWx0eS50cyIsICIuLi8uLi9jb252ZXJ0ZXIvc3JjL25mdC50cyIsICIuLi8uLi9jb252ZXJ0ZXIvc3JjL21lbW8udHMiLCAiLi4vL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SxcbiAgICAgIG93bmVyOiBQdWJrZXksXG4gICAgICBmZWVQYXllcjogU2VjcmV0LFxuICAgICk6IFByb21pc2U8c3RyaW5nPiA9PiB7XG4gICAgICBsZXQgY291bnRlciA9IDE7XG4gICAgICB3aGlsZSAoY291bnRlciA8IFJFVFJZX09WRVJfTElNSVQpIHtcbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICBjb25zdCBpbnN0ID0gYXdhaXQgZ2V0KG1pbnQsIG93bmVyLCBmZWVQYXllciwgdHJ1ZSk7XG5cbiAgICAgICAgICBpZiAoaW5zdCAmJiB0eXBlb2YgaW5zdCA9PT0gJ3N0cmluZycpIHtcbiAgICAgICAgICAgIGRlYnVnTG9nKCcjIGFzc29jaWF0ZWRUb2tlbkFjY291bnQ6ICcsIGluc3QpO1xuICAgICAgICAgICAgcmV0dXJuIGluc3Q7XG4gICAgICAgICAgfSBlbHNlIGlmIChpbnN0IGluc3RhbmNlb2YgVHJhbnNhY3Rpb25CdWlsZGVyLkNvbW1vbikge1xuICAgICAgICAgICAgKGF3YWl0IGluc3Quc3VibWl0KCkpLm1hcChcbiAgICAgICAgICAgICAgYXN5bmMgKG9rOiBzdHJpbmcpID0+IHtcbiAgICAgICAgICAgICAgICBhd2FpdCBOb2RlLmNvbmZpcm1lZFNpZyhvayk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGluc3QuZGF0YTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgKGVycjogRXJyb3IpID0+IHtcbiAgICAgICAgICAgICAgICBkZWJ1Z0xvZygnIyBFcnJvciBzdWJtaXQgcmV0cnlHZXRPckNyZWF0ZTogJywgZXJyKTtcbiAgICAgICAgICAgICAgICB0aHJvdyBlcnI7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgIGRlYnVnTG9nKGAjIHJldHJ5OiAke2NvdW50ZXJ9IGNyZW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W5BZGRyZXNzU3luYyhcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICBhbGxvd093bmVyT2ZmQ3VydmUsXG4gICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGFzc29jaWF0ZWRUb2tlbkFjY291bnQ6ICcsIGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSk7XG5cbiAgICAgIHRyeSB7XG4gICAgICAgIC8vIERvbnQgdXNlIFJlc3VsdFxuICAgICAgICBhd2FpdCBnZXRBY2NvdW50KFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCkuY29tbWl0bWVudCxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3Q6IHVuZGVmaW5lZCxcbiAgICAgICAgfTtcbiAgICAgIH0gY2F0Y2ggKGVycm9yOiB1bmtub3duKSB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5BY2NvdW50Tm90Rm91bmRFcnJvcikgJiZcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5JbnZhbGlkQWNjb3VudE93bmVyRXJyb3IpXG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9yKCdVbmV4cGVjdGVkIGVycm9yJyk7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBwYX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AgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ25hbWUnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLm5hbWUpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNOYW1lKG1ldGFkYXRhLm5hbWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc3ltYm9sJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5zeW1ib2wpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTeW1ib2wobWV0YWRhdGEuc3ltYm9sKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgICAgIGlmIChyZXMgJiYgcmVzLmlzRXJyKSB7XG4gICAgICAgICAgcmVzdWx0cy5wdXNoKC4uLnJlcy5lcnJvci5kZXRhaWxzKTtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgICBpZiAocmVzdWx0cy5sZW5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ikge1xuICAgICAgICAgIGlmICghYS5pbnN0cnVjdGlvbnMgJiYgIWEuc2lnbmVycykge1xuICAgICAgICAgICAgdGhyb3cgRXJyb3IoXG4gICAgICAgICAgICAgIGBvbmx5IEluc3RydWN0aW9uIG9iamVjdCB0aGF0IGNhbiB1c2UgYmF0Y2hTdWJtaXQoKS5cbiAgICAgICAgICAgIEluZGV4OiAke2l9LCBTZXQgdmFsdWU6ICR7SlNPTi5zdHJpbmdpZnkoYSl9YCxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIGkrKztcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IGluc3RydWN0aW9ucyA9IGFyci5mbGF0TWFwKChhKSA9PiBhLmluc3RydWN0aW9ucyk7XG4gICAgICAgIGNvbnN0IHNpZ25lcnMgPSBhcnIuZmxhdE1hcCgoYSkgPT4gYS5zaWduZXJzKTtcbiAgICAgICAgY29uc3QgZmVlUGF5ZXJzID0gYXJyLmZpbHRlcigoYSkgPT4gYS5mZWVQYXllciAhPT0gdW5kZWZpbmVkKTtcbiAgICAgICAgbGV0IGZlZVBheWVyID0gc2lnbmVyc1swXTtcbiAgICAgICAgaWYgKGZlZVBheWVycy5sZW5ndGggPiAwICYmIGZlZVBheWVyc1swXS5mZWVQYXllcikge1xuICAgICAgICAgIGZlZVBheWVyID0gZmVlUGF5ZXJzWzBdLmZlZVBheWVyO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgdHJhbnNhY3Rpb24gPSBuZXcgVHJhbnNhY3Rpb24oKTtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHNpZ25lcnM7XG4gICAgICAgIGlmIChmZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gZmVlUGF5ZXIucHVibGljS2V5O1xuICAgICAgICAgIGZpbmFsU2lnbmVycyA9IFtmZWVQYXllciwgLi4uc2lnbmVyc107XG4gICAgICAgIH1cbiAgICAgICAgaW5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nRva2VuQWNjb3VudDtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uPFB1YmtleT4oXG4gICAgICAgIFtyZXMuaW5zdF0sXG4gICAgICAgIFtdLFxuICAgICAgICBmZWVQYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgcmVzLnRva2VuQWNjb3VudCEsXG4gICAgICApO1xuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiBSZXRyeSBmdW5jdGlvbiBpZiBjcmVhdGUgbmV3IHRva2VuIGFjY291aW50XG4gICAgICpcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gbWludFxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBvd25lclxuICAgICAqIEBwYXJhbSB7U2VjcmV0fSBmZWVQYXllclxuICAgICAqIEByZXR1cm5zIFByb21pc2U8c3RyaW5nPlxuICAgICAqL1xuICAgIGV4cG9ydCBjb25zdCByZXRyeUdldE9yQ3JlYXRlID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyOiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxzdHJpbmc+ID0+IHtcbiAgICAgIGxldCBjb3VudGVyID0gMTtcbiAgICAgIHdoaWxlIChjb3VudGVyIDwgUkVUUllfT1ZFUl9MSU1JVCkge1xuICAgICAgICB0cnkge1xuICAgICAgICAgIGNvbnN0IGluc3QgPSBhd2FpdCBnZXQobWludCwgb3duZXIsIGZlZVBheWVyLCB0cnVlKTtcblxuICAgICAgICAgIGlmIChpbnN0ICYmIHR5cGVvZiBpbnN0ID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgaW5zdCk7XG4gICAgICAgICAgICByZXR1cm4gaW5zdDtcbiAgICAgICAgICB9IGVsc2UgaWYgKGluc3QgaW5zdGFuY2VvZiBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uKSB7XG4gICAgICAgICAgICAoYXdhaXQgaW5zdC5zdWJtaXQoKSkubWFwKFxuICAgICAgICAgICAgICBhc3luYyAob2s6IHN0cmluZykgPT4ge1xuICAgICAgICAgICAgICAgIGF3YWl0IE5vZGUuY29uZmlybWVkU2lnKG9rKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gaW5zdC5kYXRhO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAoZXJyOiBFcnJvcikgPT4ge1xuICAgICAgICAgICAgICAgIGRlYnVnTG9nKCcjIEVycm9yIHN1Ym1pdCByZXRyeUdldE9yQ3JlYXRlOiAnLCBlcnIpO1xuICAgICAgICAgICAgICAgIHRocm93IGVycjtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgZGVidWdMb2coYCMgcmV0cnk6ICR7Y291bnRlcn0gY3JlYXRlIHRva2VuIGFjY291bnQ6IGAsIGUpO1xuICAgICAgICAgIGRlYnVnTG9nKGAjIG1pbnQ6ICR7bWludH0sIG93bmVyOiAke293bmVyfSwgZmVlUGF5ZXI6ICR7ZmVlUGF5ZXJ9YCk7XG4gICAgICAgIH1cbiAgICAgICAgYXdhaXQgc2xlZXAoUkVUUllfU0xFRVBfVElNRSk7XG4gICAgICAgIGNvdW50ZXIrKztcbiAgICAgIH1cbiAgICAgIHRocm93IEVycm9yKGByZXRyeSBhY3Rpb24gaXMgb3ZlciBsaW1pdCAke1JFVFJZX09WRVJfTElNSVR9YCk7XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIFtNYWluIGxvZ2ljXUdldCBBc3NvY2lhdGVkIHRva2VuIEFjY291bnQuXG4gICAgICogaWYgbm90IGNyZWF0ZWQsIGNyZWF0ZSBuZXcgdG9rZW4gYWNjb3VpbnRcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBtaW50XG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAgICogQHBhcmFtIHtQdWJrZXl9IGZlZVBheWVyXG4gICAgICogQHJldHVybnMgUHJvbWlzZTxzdHJpbmc+XG4gICAgICovXG4gICAgZXhwb3J0IGNvbnN0IG1ha2VPckNyZWF0ZUluc3RydWN0aW9uID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyPzogUHVia2V5LFxuICAgICAgYWxsb3dPd25lck9mZkN1cnZlID0gZmFsc2UsXG4gICAgKTogUHJvbWlzZTx7XG4gICAgICB0b2tlbkFjY291bnQ6IHN0cmluZztcbiAgICAgIGluc3Q6IFRyYW5zYWN0aW9uSW5zdHJ1Y3Rpb24gfCB1bmRlZmluZWQ7XG4gICAgfT4gPT4ge1xuICAgICAgY29uc3QgYXNzb2NpYXRlZFRva2VuQWNjb3VudCA9IGdldEFzc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jKFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSxcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3QsXG4gICAgICAgIH07XG4gICAg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RnVuYzogKFxuICAgICAgICBmaWxlUGF0aDogRmlsZVR5cGUsXG4gICAgICAgIHN0b3JhZ2VUeXBlOiBTdG9yYWdlVHlwZSxcbiAgICAgICAgZmVlUGF5ZXI/OiBTZWNyZXQsXG4gICAgICApID0+IFByb21pc2U8UmVzdWx0PHN0cmluZywgRXJyb3I+PixcbiAgICAgIHN0b3JhZ2VUeXBlOiBTdG9yYWdlVHlwZSxcbiAgICAgIGZlZVBheWVyPzogU2VjcmV0LFxuICAgICk6IFByb21pc2U8UHJvcGVydGllcz4gPT4ge1xuICAgICAgaWYgKCFpbnB1dCB8fCAhaW5wdXQuZmlsZXMpIHtcbiAgICAgICAgcmV0dXJuIHt9O1xuICAgICAgfVxuXG4gICAgICBjb25zdCBmaWxlcyA9IGF3YWl0IFByb21pc2UuYWxsKFxuICAgICAgICBpbnB1dC5maWxlcy5tYXAoYXN5bmMgKGZpbGUpID0+IHtcbiAgICAgICAgICBpZiAoIWZpbGUuZmlsZVBhdGgpIHtcbiAgICAgICAgICAgIHJldHVybiB7fTtcbiAgICAgICAgICB9XG4gICAgICAgICAgY29uc3QgcmVzID0gYXdhaXQgY2FsbGJhY2tGdW5jKGZpbGUuZmlsZVBhdGgsIHN0b3JhZ2VUeXBlLCBmZWVQYXllcik7XG4gICAgICAgICAgaWYgKHJlcy5pc0Vycikge1xuICAgICAgICAgICAgdGhyb3cgRXJyb3IocmVzLmVycm9yLm1lc3NhZ2UpO1xuICAgICAgICAgIH1cbiAgICAgICAgICByZXR1cm4gb3ZlcndyaXRlT2JqZWN0KGZpbGUsIFtcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgZXhpc3RzS2V5OiAnZmlsZVBhdGgnLFxuICAgICAgICAgICAgICB3aWxsOiB7IGtleTogJ3VyaScsIHZhbHVlOiByZXMudmFsdWUgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgXSk7XG4gICAgICAgIH0pLFxuICAgICAgKTtcbiAgICAgIHJldHVybiB7IC4u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gICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0YWRhdGEubmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzeW1ib2wnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLnN5bWJvbCkge1xuICAgICAgICAgICAgICByZXMgPSBpc1N5bWJvbChtZXRhZGF0YS5zeW1ib2wpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHJlcyAmJiByZXMuaXNFcnIpIHtcbiAgICAgICAgICByZXN1bHRzLnB1c2goLi4ucmVzLmVycm9yLmRldGFpbHMpO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIGlmIChyZXN1bHRzLmxlbmd0aCA+IDApIHtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9XG4gICAgICAgICAgJ0NhdWdodCBpbiB0aGUgdmFsaWRhdGlvbiBlcnJvcnMuIHNlZSBpbmZvcm1hdGlvbiBlLmc6IGVycjxWYWxpZGF0b3JFcnJvcj4uZGV0YWlscyc7XG4gICAgICAgIHRocm93IG5ldyBWYWxpZGF0b3JFcnJvcihtZXNzYWdlLCByZXN1bHRzKTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBNZXNzYWdlLlNVQ0NFU1M7XG4gICAgfSk7XG4gIH07XG5cbiAgdHlwZSBQaWNrTmZ0U3RvcmFnZSA9IFBpY2s8XG4gICAgT2ZmY2hhaW4sXG4gICAgJ25hbWUnIHwgJ3N5bWJvbCcgfCAnaW1hZ2UnIHw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AiTWludCIsICJDb252ZXJ0ZXIiLCAiUmVndWxhck5mdE1ldGFkYXRhIiwgIkNvbnZlcnRlciIsICJQcm9wZXJ0aWVzIiwgIkNvbnZlcnRlciIsICJVc2VzIiwgIkNvbnZlcnRlciIsICJUb2tlbk1ldGFkYXRhIiwgIkNvbnZlcnRlciIsICJUcmFuc2ZlckNoZWNrZWQiLCAiQ29udmVydGVyIiwgIlRyYW5zZmVyIiwgIkNvbnZlcnRlciIsICJWYWxpZGF0b3IiLCAiTWVzc2FnZSIsICJDb252ZXJ0ZXIiLCAiTm9kZSIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiQ29tbW9uIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJUcmFuc2FjdGlvbiIsICJzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uIiwgInNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24iLCAiVHJhbnNhY3Rpb24iLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlRyYW5zYWN0aW9uIiwgInNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24iLCAiVHJhbnNhY3Rpb24iLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlRyYW5zYWN0aW9uIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiXQp9Cg== \ No newline at end of file diff --git a/packages/transaction-builder/src/common.ts b/packages/transaction-builder/src/common.ts index 3afda95cb..240bfd95b 100644 --- a/packages/transaction-builder/src/common.ts +++ b/packages/transaction-builder/src/common.ts @@ -8,7 +8,7 @@ import { } from '@solana/web3.js'; import { Node } from '~/node'; -import { Result, Try } from '~/shared'; +import { Result, Try } from '~/suite-utils'; import { CommonStructure } from '~/types/transaction-builder'; export const MAX_RETRIES = 3; diff --git a/packages/transaction-builder/tsconfig.json b/packages/transaction-builder/tsconfig.json index 0363d29a9..6aa32e89c 100644 --- a/packages/transaction-builder/tsconfig.json +++ b/packages/transaction-builder/tsconfig.json @@ -1,7 +1,6 @@ { "$schema": "https://json.schemastore.org/tsconfig", "extends": "build-configs/tsconfig/base.json", - "display": "transaction-builder", "compilerOptions": { "paths": { @@ -10,10 +9,15 @@ ], "~/*": [ "../*/src/index.ts" - ], - "~/shared/exports": ["../shared/src/exports.ts"] + ] } }, - "include": ["src/**/*.ts", "test/**/*.ts"], - "exclude": ["node_modules", "dist"] + "include": [ + "src/**/*.ts", + "test/**/*.ts" + ], + "exclude": [ + "node_modules", + "dist" + ] } diff --git a/packages/transaction-filter/dist/index.js b/packages/transaction-filter/dist/index.js index bf7660c34..d69f95971 100644 --- a/packages/transaction-filter/dist/index.js +++ b/packages/transaction-filter/dist/index.js @@ -35,7 +35,7 @@ __export(src_exports, { }); module.exports = __toCommonJS(src_exports); -// ../shared/src/constants.ts +// ../suite-utils/src/constants.ts var import_web3 = require("@solana/web3.js"); var import_load = __toESM(require("@solana-suite/config/load")); var Config = import_load.default; @@ -246,56 +246,6 @@ var TransactionBuilder; TransactionBuilder7.Common = Common2; })(TransactionBuilder || (TransactionBuilder = {})); -// ../shared/src/shared.ts -var overwriteObject = (object, targets) => { - const that = object; - targets.forEach((target) => { - delete that[target.existsKey]; - that[target.will.key] = target.will.value; - }); - return that; -}; -var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { - if (Constants.isDebugging === "true" || process.env.DEBUG === "true") { - console.log("[DEBUG]", data1, data2, data3, data4); - } -}; -var sleep = async (sec) => { - return new Promise((r) => setTimeout(r, sec * 1e3)); -}; -var isPromise = (obj) => { - return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; -}; -function Try(input, finallyInput) { - try { - const v = input(); - if (isPromise(v)) { - return v.then( - (x) => Result2.ok(x), - (err) => Result2.err(err) - ); - } else { - return Result2.ok(v); - } - } catch (e) { - if (e instanceof Error) { - return Result2.err(e); - } - return Result2.err(Error(e)); - } finally { - if (finallyInput) { - debugLog("# finally input:", finallyInput); - finallyInput(); - } - } -} -var convertTimestampToDateTime = (created_at) => { - if (created_at) { - return new Date(created_at * 1e3); - } - return; -}; - // ../transaction-builder/src/batch.ts var TransactionBuilder2; ((TransactionBuilder7) => { @@ -750,12 +700,62 @@ var TransactionBuilder6 = { ...TransactionBuilder4 }; -// ../shared/src/result.ts +// ../suite-utils/src/shared.ts +var overwriteObject = (object, targets) => { + const that = object; + targets.forEach((target) => { + delete that[target.existsKey]; + that[target.will.key] = target.will.value; + }); + return that; +}; +var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { + if (Constants.isDebugging === "true" || process.env.DEBUG === "true") { + console.log("[DEBUG]", data1, data2, data3, data4); + } +}; +var sleep = async (sec) => { + return new Promise((r) => setTimeout(r, sec * 1e3)); +}; +var isPromise = (obj) => { + return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; +}; +function Try(input, finallyInput) { + try { + const v = input(); + if (isPromise(v)) { + return v.then( + (x) => Result5.ok(x), + (err) => Result5.err(err) + ); + } else { + return Result5.ok(v); + } + } catch (e) { + if (e instanceof Error) { + return Result5.err(e); + } + return Result5.err(Error(e)); + } finally { + if (finallyInput) { + debugLog("# finally input:", finallyInput); + finallyInput(); + } + } +} +var convertTimestampToDateTime = (created_at) => { + if (created_at) { + return new Date(created_at * 1e3); + } + return; +}; + +// ../suite-utils/src/result.ts var AbstractResult = class { unwrap(ok, err) { const r = this._chain( - (value) => Result2.ok(ok ? ok(value) : value), - (error) => err ? Result2.ok(err(error)) : Result2.err(error) + (value) => Result5.ok(ok ? ok(value) : value), + (error) => err ? Result5.ok(err(error)) : Result5.err(error) ); if (r.isErr) { throw r.error; @@ -764,17 +764,17 @@ var AbstractResult = class { } map(ok, err) { return this._chain( - (value) => Result2.ok(ok(value)), - (error) => Result2.err(err ? err(error) : error) + (value) => Result5.ok(ok(value)), + (error) => Result5.err(err ? err(error) : error) ); } chain(ok, err) { - return this._chain(ok, err || ((error) => Result2.err(error))); + return this._chain(ok, err || ((error) => Result5.err(error))); } match(ok, err) { this._chain( - (value) => Result2.ok(ok(value)), - (error) => Result2.err(err(error)) + (value) => Result5.ok(ok(value)), + (error) => Result5.err(err(error)) ); } /// single TransactionBuilder //// @@ -796,7 +796,7 @@ var AbstractResult = class { } ); if (res.isErr) { - return Result2.err(res.error); + return Result5.err(res.error); } return res.value; } @@ -831,7 +831,7 @@ Array.prototype.submit = async function(feePayer) { } else if (obj.isOk) { instructions.push(obj.value); } else { - return Result2.err(Error("Only Array Instruction object")); + return Result5.err(Error("Only Array Instruction object")); } } debugLog("# Result batch submit: ", instructions); @@ -861,16 +861,16 @@ var InternalErr = class extends AbstractResult { return err(this.error); } }; -var Result2; -((Result7) => { +var Result5; +((Result8) => { function ok(value) { return new InternalOk(value); } - Result7.ok = ok; + Result8.ok = ok; function err(error) { return new InternalErr(error || Error()); } - Result7.err = err; + Result8.err = err; function all(obj) { if (Array.isArray(obj)) { const resArr = []; @@ -880,7 +880,7 @@ var Result2; } resArr.push(item.value); } - return Result7.ok(resArr); + return Result8.ok(resArr); } const res = {}; const keys = Object.keys(obj); @@ -891,10 +891,10 @@ var Result2; } res[key] = item.value; } - return Result7.ok(res); + return Result8.ok(res); } - Result7.all = all; -})(Result2 || (Result2 = {})); + Result8.all = all; +})(Result5 || (Result5 = {})); // ../converter/src/collection.ts var Converter; @@ -1520,7 +1520,7 @@ var Node; signature }, commitment - ).then(Result2.ok).catch(Result2.err); + ).then(Result5.ok).catch(Result5.err); }; })(Node || (Node = {})); @@ -1549,14 +1549,14 @@ var Signatures; const history = parser(signature); if (history) { histories.push(history); - callback(Result2.ok(histories)); + callback(Result5.ok(histories)); } - }).catch((e) => callback(Result2.err(e))); + }).catch((e) => callback(Result5.err(e))); await sleep(options.waitTime); } } catch (e) { if (e instanceof Error) { - callback(Result2.err(e)); + callback(Result5.err(e)); } } }; @@ -1693,4 +1693,4 @@ var TransactionFilter; Signatures, TransactionFilter }); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6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RyaW5nPihmZWVQYXllclBrKTtcbiAgICBjb25zdCBhY2NvdW50cyA9IG5ldyBTZXQ8c3RyaW5nPihmZWVQYXllclBrKTtcblxuICAgIGNvbnN0IGl4c1NpemUgPSB0cmFuc2FjdGlvbi5pbnN0cnVjdGlvbnMucmVkdWNlKChhY2MsIGl4KSA9PiB7XG4gICAgICBpeC5rZXlzLmZvckVhY2goKHsgcHVia2V5LCBpc1NpZ25lciB9KSA9PiB7XG4gICAgICAgIGNvbnN0IHBrID0gcHVia2V5LnRvQmFzZTU4KCk7XG4gICAgICAgIGlmIChpc1NpZ25lcikgc2lnbmVycy5hZGQocGspO1xuICAgICAgICBhY2NvdW50cy5hZGQocGspO1xuICAgICAgfSk7XG5cbiAgICAgIGFjY291bnRzLmFkZChpeC5wcm9ncmFtSWQudG9CYXNlNTgoKSk7XG5cbiAgICAgIGNvbnN0IG5JbmRleGVzID0gaXgua2V5cy5sZW5ndGg7XG4gICAgICBjb25zdCBvcGFxdWVEYXRhID0gaXguZGF0YS5sZW5ndGg7XG5cbiAgICAgIHJldHVybiAoXG4gICAgICAgIGFjYyArXG4gICAgICAgIDEgKyAvLyBQSUQgaW5kZXhcbiAgICAgICAgY29tcGFjdEFycmF5U2l6ZShuSW5kZXhlcywgMSkgK1xuICAgICAgICBjb21wYWN0QXJyYXlTaXplKG9wYXF1ZURhdGEsIDEpXG4gICAgICApO1xuICAgIH0sIDApO1xuXG4gICAgcmV0dXJuIChcbiAgICAgIGNvbXBhY3RBcnJheVNpemUoc2lnbmVycy5zaXplLCA2NCkgKyAvLyBzaWduYXR1cmVzXG4gICAgICAzICsgLy8gaGVhZGVyXG4gICAgICBjb21wYWN0QXJyYXlTaXplKGFjY291bnRzLnNpemUsIDMyKSArIC8vIGFjY291bnRzXG4gICAgICAzMiArIC8vIGJsb2NraGFzaFxuICAgICAgY29tcGFjdEhlYWRlcih0cmFuc2FjdGlvbi5pbnN0cnVjdGlvbnMubGVuZ3RoKSArIC8vIGluc3RydWN0a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pZiAoIXJlcy5pbnN0KSB7XG4gICAgICAgIHJldHVybiByZXMudG9rZW5BY2NvdW50O1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb248UHVia2V5PihcbiAgICAgICAgW3Jlcy5pbnN0XSxcbiAgICAgICAgW10sXG4gICAgICAgIGZlZVBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICByZXMudG9rZW5BY2NvdW50ISxcbiAgICAgICk7XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIFJldHJ5IGZ1bmN0aW9uIGlmIGNyZWF0ZSBuZXcgdG9rZW4gYWNjb3VpbnRcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBtaW50XG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAgICogQHBhcmFtIHtTZWNyZXR9IGZlZVBheWVyXG4gICAgICogQHJldHVybnMgUHJvbWlzZTxzdHJpbmc+XG4gICAgICovXG4gICAgZXhwb3J0IGNvbnN0IHJldHJ5R2V0T3JDcmVhdGUgPSBhc3luYyAoXG4gICAgICBtaW50OiBQdWJrZXksXG4gICAgICBvd25lcjogUHVia2V5LFxuICAgICAgZmVlUGF5ZXI6IFNlY3JldCxcbiAgICApOiBQcm9taXNlPHN0cmluZz4gPT4ge1xuICAgICAgbGV0IGNvdW50ZXIgPSAxO1xuICAgICAgd2hpbGUgKGNvdW50ZXIgPCBSRVRSWV9PVkVSX0xJTUlUKSB7XG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgY29uc3QgaW5zdCA9IGF3YWl0IGdldChtaW50LCBvd25lciwgZmVlUGF5ZXIsIHRydWUpO1xuXG4gICAgICAgICAgaWYgKGluc3QgJiYgdHlwZW9mIGluc3QgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICBkZWJ1Z0xvZygnIyBhc3NvY2lhdGVkVG9rZW5BY2NvdW50OiAnLCBpbnN0KTtcbiAgICAgICAgICAgIHJldHVybiBpbnN0O1xuICAgICAgICAgIH0gZWxzZSBpZiAoaW5zdCBpbnN0YW5jZW9mIFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb24pIHtcbiAgICAgICAgICAgIChhd2FpdCBpbnN0LnN1Ym1pdCgpKS5tYXAoXG4gICAgICAgICAgICAgIGFzeW5jIChvazogc3RyaW5nKSA9PiB7XG4gICAgICAgICAgICAgICAgYXdhaXQgTm9kZS5jb25maXJtZWRTaWcob2spO1xuICAgICAgICAgICAgICAgIHJldHVybiBpbnN0LmRhdGE7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIChlcnI6IEVycm9yKSA9PiB7XG4gICAgICAgICAgICAgICAgZGVidWdMb2coJyMgRXJyb3Igc3VibWl0IHJldHJ5R2V0T3JDcmVhdGU6ICcsIGVycik7XG4gICAgICAgICAgICAgICAgdGhyb3cgZXJyO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICBkZWJ1Z0xvZyhgIyByZXRyeTogJHtjb3VudGVyfSBjcmVhdGUgdG9rZW4gYWNjb3VudDogYCwgZSk7XG4gICAgICAgICAgZGVidWdMb2coYCMgbWludDogJHttaW50fSwgb3duZXI6ICR7b3duZXJ9LCBmZWVQYXllcjogJHtmZWVQYXllcn1gKTtcbiAgICAgICAgfVxuICAgICAgICBhd2FpdCBzbGVlcChSRVRSWV9TTEVFUF9USU1FKTtcbiAgICAgICAgY291bnRlcisrO1xuICAgICAgfVxuICAgICAgdGhyb3cgRXJyb3IoYHJldHJ5IGFjdGlvbiBpcyBvdmVyIGxpbWl0ICR7UkVUUllfT1ZFUl9MSU1JVH1gKTtcbiAgICB9O1xuXG4gICAgLyoqXG4gICAgICogW01haW4gbG9naWNdR2V0IEFzc29jaWF0ZWQgdG9rZW4gQWNjb3VudC5cbiAgICAgKiBpZiBub3QgY3JlYXRlZCwgY3JlYXRlI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vbm5lY3Rpb24oKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLmNvbW1pdG1lbnQsXG4gICAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICB0b2tlbkFjY291bnQ6IGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSxcbiAgICAgICAgICBpbnN0OiB1bmRlZmluZWQsXG4gICAgICAgIH07XG4gICAgICB9IGNhdGNoIChlcnJvcjogdW5rbm93bikge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuQWNjb3VudE5vdEZvdW5kRXJyb3IpICYmXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuSW52YWxpZEFjY291bnRPd25lckVycm9yKVxuICAgICAgICApIHtcbiAgICAgICAgICB0aHJvdyBFcnJvcignVW5leHBlY3RlZCBlcnJvcicpO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgcGF5ZXIgPSAhZmVlUGF5ZXIgPyBvd25lciA6IGZlZVBheWVyO1xuXG4gICAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVBc3NvY2lhdGVkVG9rZW5BY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgcGF5ZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY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gICAgIGtleXMubWFwKChrZXkpID0+IHtcbiAgICAgICAgbGV0IHJlcyE6IFJlc3VsdDxzdHJpbmcsIFZhbGlkYXRvckVycm9yPjtcbiAgICAgICAgc3dpdGNoIChrZXkpIHtcbiAgICAgICAgICBjYXNlICdpbWFnZSc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLmltYWdlKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzSW1hZ2VVcmwobWV0YWRhdGEuaW1hZ2UpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAncm95YWx0eSc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnJveWFsdHkpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNSb3lhbHR5KG1ldGFkYXRhLnJveWFsdHkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiA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GlzUGFyc2VkSW5zdHJ1Y3Rpb24oaW5zdHJ1Y3Rpb24pICYmXG4gICAgICAgICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5UcmFuc2Zlci5wcm9ncmFtLmluY2x1ZGVzKFxuICAgICAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24ucHJvZ3JhbSxcbiAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIgPSBpbnN0cnVjdGlvbjtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICApO1xuXG4gICAgICAgICAgICAgICAgLy8gc3BsLXRva2VuIG9yIHN5c3RlbVxuICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIgJiZcbiAgICAgICAgICAgICAgICAgIG1vZHVsZU5hbWUgIT09IGluc3RydWN0aW9uVHJhbnNmZXJbJ3Byb2dyYW0nXVxuICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgZGVidWdMb2coXG4gICAgICAgICAgICAgICAgICAgICcjIEZpbHRlclR5cGUuTWVtbyBicmVhayBpbnN0cnVjdGlvbjogJyxcbiAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlcixcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAvLyBmZXRjaCBtZW1vIG9ubHkgdHJhbnNhY3Rpb25cbiAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLk1lbW8uaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyLFxuICAgICAgICAgICAgICAgICAgcG9zdFRva2VuQWNjb3VudCxcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLk9ubHlNZW1vOiB7XG4gICAgICAgICAgICAgIGlmIChGaWx0ZXJPcHRpb25zLk1lbW8ucHJvZ3JhbS5pbmNsdWRlcyhpbnN0cnVjdGlvbi5wcm9ncmFtKSkge1xuICAgICAgICAgICAgICAgIGxldCBpbnN0cnVjdGlvblRyYW5zZmVyO1xuXG4gICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5NZW1vLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlcixcbiAgICAgICAgICAgICAgICAgIHBvc3RUb2tlbkFjY291bnQsXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5NaW50OiB7XG4gICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLk1pbnQucHJvZ3JhbS5pbmNsdWRlcyhpbnN0cnVjdGlvbi5wcm9ncmFtKSAmJlxuICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuTWludC5hY3Rpb24uaW5jbHVkZXMoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbi5wYXJzZWQudHlwZSBhcyBzdHJpbmcsXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLk1pbnQuaW50b1VzZXJTaWRlKGluc3RydWN0aW9uLCB0eE1ldGEpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLlRyYW5zZmVyOlxuICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgbW9kdWxlTmFtZSA9PT0gaW5zdHJ1Y3Rpb24ucHJvZ3JhbSAmJlxuICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuVHJhbnNmZXIuYWN0aW9uLmluY2x1ZGVzKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24ucGFyc2VkLnR5cGUgYXMgc3RyaW5nLFxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgaWYgKGluc3RydWN0aW9uLnBhcnNlZC50eXBlID09PSAndHJhbnNmZXJDaGVja2VkJykge1xuICAgICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5UcmFuc2ZlckNoZWNrZWQuaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgICBwb3N0VG9rZW5BY2NvdW50LFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5UcmFuc2Zlci5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfSk7XG4g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MTA7XG4gICAgY29uc3QgUkVUUllfU0xFRVBfVElNRSA9IDM7XG4gICAgLy9AaW50ZXJuYWxcbiAgICBjb25zdCBnZXQgPSBhc3luYyAoXG4gICAgICBtaW50OiBQdWJrZXksXG4gICAgICBvd25lcjogUHVia2V5LFxuICAgICAgZmVlUGF5ZXI6IFNlY3JldCxcbiAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSA9IGZhbHNlLFxuICAgICk6IFByb21pc2U8c3RyaW5nIHwgQ29tbW9uU3RydWN0dXJlPFB1YmtleT4+ID0+IHtcbiAgICAgIGNvbnN0IHJlcyA9IGF3YWl0IG1ha2VPckNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICBtaW50LFxuICAgICAgICBvd25lcixcbiAgICAgICAgbmV3IEtleXBhaXIuS2V5cGFpcih7IHNlY3JldDogZmVlUGF5ZXIgfSkucHVia2V5LFxuICAgICAgICBhbGxvd093bmVyT2ZmQ3VydmUsXG4gICAgICApO1xuXG4gICAgICBpZiAoIXJlcy5pbnN0KSB7XG4gICAgICAgIHJldHVybiByZXMudG9rZW5BY2NvdW50O1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb248UHVia2V5PihcbiAgICAgICAgW3Jlcy5pbnN0XSxcbiAgICAgICAgW10sXG4gICAgICAgIGZlZVBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICByZXMudG9rZW5BY2NvdW50ISxcbiAgICAgICk7XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIFJldHJ5IGZ1bmN0aW9uIGlmIGNyZWF0ZSBuZXcgdG9rZW4gYWNjb3VpbnRcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBtaW50XG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAgICogQHBhcmFtIHtTZWNyZXR9IGZlZVBheWVyXG4gICAgICogQHJldHVybnMgUHJvbWlzZTxzdHJpbmc+XG4gICAgICovXG4gICAgZXhwb3J0IGNvbnN0IHJldHJ5R2V0T3JDcmVhdGUgPSBhc3luYyAoXG4gICAgICBtaW50OiBQdWJrZXksXG4gICAgICBvd25lcjogUHVia2V5LFxuICAgICAgZmVlUGF5ZXI6IFNlY3JldCxcbiAgICApOiBQcm9taXNlPHN0cmluZz4gPT4ge1xuICAgICAgbGV0IGNvdW50ZXIgPSAxO1xuICAgICAgd2hpbGUgKGNvdW50ZXIgPCBSRVRSWV9PVkVSX0xJTUlUKSB7XG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgY29uc3QgaW5zdCA9IGF3YWl0IGdldChtaW50LCBvd25lciwgZmVlUGF5ZXIsIHRydWUpO1xuXG4gICAgICAgICAgaWYgKGluc3QgJiYgdHlwZW9mIGluc3QgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICBkZWJ1Z0xvZygnIyBhc3NvY2lhdGVkVG9rZW5BY2NvdW50OiAnLCBpbnN0KTtcbiAgICAgICAgICAgIHJldHVybiBpbnN0O1xuICAgICAgICAgIH0gZWxzZSBpZiAoaW5zdCBpbnN0YW5jZW9mIFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb24pIHtcbiAgICAgICAgICAgIChhd2FpdCBpbnN0LnN1Ym1pdCgpKS5tYXAoXG4gICAgICAgICAgICAgIGFzeW5jIChvazogc3RyaW5nKSA9PiB7XG4gICAgICAgICAgICAgICAgYXdhaXQgTm9kZS5jb25maXJtZWRTaWcob2spO1xuICAgICAgICAgICAgICAgIHJldHVybiBpbnN0LmRhdGE7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIChlcnI6IEVycm9yKSA9PiB7XG4gICAgICAgICAgICAgICAgZGVidWdMb2coJyMgRXJyb3Igc3VibWl0IHJldHJ5R2V0T3JDcmVhdGU6ICcsIGVycik7XG4gICAgICAgICAgICAgICAgdGhyb3cgZXJyO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4g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iAgICB9PiA9PiB7XG4gICAgICBjb25zdCBhc3NvY2lhdGVkVG9rZW5BY2NvdW50ID0gZ2V0QXNzb2NpYXRlZFRva2VuQWRkcmVzc1N5bmMoXG4gICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgYWxsb3dPd25lck9mZkN1cnZlLFxuICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICBBU1NPQ0lBVEVEX1RPS0VOX1BST0dSQU1fSUQsXG4gICAgICApO1xuXG4gICAgICBkZWJ1Z0xvZygnIyBhc3NvY2lhdGVkVG9rZW5BY2NvdW50OiAnLCBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCkpO1xuXG4gICAgICB0cnkge1xuICAgICAgICAvLyBEb250IHVzZSBSZXN1bHRcbiAgICAgICAgYXdhaXQgZ2V0QWNjb3VudChcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLmNvbW1pdG1lbnQsXG4gICAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICB0b2tlbkFjY291bnQ6IGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSxcbiAgICAgICAgICBpbnN0OiB1bmRlZmluZWQsXG4gICAgICAgIH07XG4gICAgICB9IGNhdGNoIChlcnJvcjogdW5rbm93bikge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuQWNjb3VudE5vdEZvdW5kRXJyb3IpICYmXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuSW52YWxpZEFjY291bnRPd25lckVycm9yKVxuICAgICAgICApIHtcbiAgICAgICAgICB0aHJvdyBFcnJvcignVW5leHBlY3RlZCBlcnJvcicpO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgcGF5ZXIgPSAhZmVlUGF5ZXIgPyBvd25lciA6IGZlZVBheWVyO1xuXG4gICAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVBc3NvY2lhdGVkVG9rZW5BY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgcGF5ZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdCxcbiAgICAgICAgfTtcbiAgICAgIH1cbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHsgS2V5cGFpciBhcyBPcmlnaW5hbCwgUHVibGljS2V5IH0gZnJvbSAnQHNvbGFuYS93ZWIzLmpzJztcbmltcG9ydCB7IFB1YmtleSwgU2VjcmV0IH0gZnJvbSAnfi90eXBlcy9hY2NvdW50JztcbmltcG9ydCBicyBmcm9tICdiczU4JztcblxuZXhwb3J0IG5hbWVzcGFjZSBBY2NvdW50IHtcbiAgZXhwb3J0IGNsYXNzIEtleXBhaXIge1xuICAgIHNlY3JldDogU2VjcmV0O1xuICAgIHB1YmtleTogUHVia2V5O1xuXG4gICAgY29uc3RydWN0b3IocGFyYW1zOiB7IHB1YmtleT86IFB1YmtleTsgc2VjcmV0OiBTZWNyZXQgfSkge1xuICAgICAgaWYgKCF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XG4gICAgICAgICAgYWRkcmVzcy50b1B1YmxpY0tleSgpLnRvQnVmZmVyKCksXG4gICAgICAgIF0sXG4gICAgICAgIFBST0dSQU1fSUQsXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGdldE1hc3RlckVkaXRpb24gPSAoYWRkcmVzczogUHVia2V5KTogUHVibGljS2V5ID0+IHtcbiAgICAgIGNvbnN0IFtwdWJsaWNLZXldID0gUHVibGljS2V5LmZpbmRQcm9ncmFtQWRkcmVzc1N5bmMoXG4gICAgICAgIFtcbiAgICAgICAgICBCdWZmZXIuZnJvbSgnbWV0YWRhdGEnKSxcbiAgICAgICAgICBQUk9HUkFNX0lELnRvQnVmZmVyKCksXG4gICAgICAgICAgYWRkcmVzcy50b1B1YmxpY0tleSgpLnRvQnVmZmVyKCksXG4gICAgICAgICAgQnVmZmVyLmZyb20oJ2VkaXRpb24nKSxcbiAgICAgICAgXSxcbiAgICAgICAgUFJPR1JBTV9JRCxcbiAgICAgICk7XG4gICAgICByZXR1cm4gcHVibGljS2V5O1xuICAgIH07XG5cbiAgICBleHBvcnQgY29uc3QgZ2V0VHJlZUF1dGhvcml0eSA9IChhZGRyZXNzOiBQdWJrZXkpOiBQdWJsaWNLZXkgPT4ge1xuICAgICAgY29uc3QgW3B1YmxpY0tleV0gPSBQdWJsaWNLZXkuZmluZFByb2dyYW1BZGRyZXNzU3luYyhcbiAgICAgICAgW2FkZHJlc3MudG9QdWJsaWNLZXkoKS50b0J1ZmZlcigpXSxcbiAgICAgICAgTVBMX0JVQkJMRUdVTV9QUk9HUkFNX0lELnRvUHVibGljS2V5KCksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGdldEJndW1TaWduZXIgPSAoKTogUHVibGljS2V5ID0+IHtcbiAgICAgIGNvbnN0IFtwdWJsaWNLZXldID0g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uICAgICAgICByZXR1cm4gbnVsbDtcbiAgICAgIH1cbiAgICAgIHJldHVybiBpbnB1dC5tYXAoKGRhdGEpID0+IHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICBhZGRyZXNzOiBkYXRhLmFkZHJlc3MudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBzaGFyZTogZGF0YS5zaGFyZSxcbiAgICAgICAgICB2ZXJpZmllZDogZmFsc2UsXG4gICAgICAgIH07XG4gICAgICB9KTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGludG9Db21wcmVzc2VkTmZ0SW5mcmEgPSAoXG4gICAgICBpbnB1dDogT3B0aW9uPElucHV0Q3JlYXRvcnNbXT4gfCB1bmRlZmluZWQsXG4gICAgKTogSW50ZXJuYWxDcmVhdG9yc1tdID0+IHtcbiAgICAgIGlmICghaW5wdXQpIHtcbiAgICAgICAgcmV0dXJuIFtdO1xuICAgICAgfVxuICAgICAgcmV0dXJuIGlucHV0IS5tYXAoKGRhdGEpID0+IHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICBhZGRyZXNzOiBkYXRhLmFkZHJlc3MudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBzaGFyZTogZGF0YS5zaGFyZSxcbiAgICAgICAgICB2ZXJpZmllZDogZmFsc2UsXG4gICAgICAgIH07XG4gICAgICB9KTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGludG9Vc2VyID0gKFxuICAgICAgb3V0cHV0OiBPcHRpb248SW50ZXJuYWxDcmVhdG9yc1tdPixcbiAgICApOiBDcmVhdG9yc1tdIHwgdW5kZWZpbmVkID0+IHtcbiAgICAgIGlmICghb3V0cHV0KSB7XG4gICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBvdXRwdXQubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5h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IERldGFpbHNbXSA9IFtdO1xuICAgICAga2V5cy5tYXAoKGtleSkgPT4ge1xuICAgICAgICBsZXQgcmVzITogUmVzdWx0PHN0cmluZywgVmFsaWRhdG9yRXJyb3I+O1xuICAgICAgICBzd2l0Y2ggKGtleSkge1xuICAgICAgICAgIGNhc2UgJ2ltYWdlJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuaW1hZ2UpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNJbWFnZVVybChtZXRhZGF0YS5pbWFnZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdyb3lhbHR5JzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEucm95YWx0eSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1JveWFsdHkobWV0YWRhdGEucm95YWx0eSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICA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gICAgICAgICAgICAgICAgICAgaXNQYXJzZWRJbnN0cnVjdGlvbihpbnN0cnVjdGlvbikgJiZcbiAgICAgICAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLlRyYW5zZmVyLnByb2dyYW0uaW5jbHVkZXMoXG4gICAgICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbi5wcm9ncmFtLFxuICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlciA9IGluc3RydWN0aW9uO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICk7XG5cbiAgICAgICAgICAgICAgICAvLyBzcGwtdG9rZW4gb3Igc3lzdGVtXG4gICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlciAmJlxuICAgICAgICAgICAgICAgICAgbW9kdWxlTmFtZSAhPT0gaW5zdHJ1Y3Rpb25UcmFuc2ZlclsncHJvZ3JhbSddXG4gICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICBkZWJ1Z0xvZyhcbiAgICAgICAgICAgICAgICAgICAgJyMgRmlsdGVyVHlwZS5NZW1vIGJyZWFrIGluc3RydWN0aW9uOiAnLFxuICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyLFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vIGZldGNoIG1lbW8gb25seSB0cmFuc2FjdGlvblxuICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuTWVtby5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIsXG4gICAgICAgICAgICAgICAgICBwb3N0VG9rZW5BY2NvdW50LFxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXNlIEZpbHRlclR5cGUuT25seU1lbW86IHtcbiAgICAgICAgICAgICAgaWYgKEZpbHRlck9wdGlvbnMuTWVtby5wcm9ncmFtLmluY2x1ZGVzKGluc3RydWN0aW9uLnByb2dyYW0pKSB7XG4gICAgICAgICAgICAgICAgbGV0IGluc3RydWN0aW9uVHJhbnNmZXI7XG5cbiAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLk1lbW8uaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyLFxuICAgICAgICAgICAgICAgICAgcG9zdFRva2VuQWNjb3VudCxcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLk1pbnQ6IHtcbiAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuTWludC5wcm9ncmFtLmluY2x1ZGVzKGluc3RydWN0aW9uLnByb2dyYW0pICYmXG4gICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5NaW50LmFjdGlvbi5pbmNsdWRlcyhcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLnBhcnNlZC50eXBlIGFzIHN0cmluZyxcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuTWludC5pbnRvVXNlclNpZGUoaW5zdHJ1Y3Rpb24sIHR4TWV0YSk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXNlIEZpbHRlclR5cGUuVHJhbnNmZXI6XG4gICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICBtb2R1bGVOYW1lID09PSBpbnN0cnVjdGlvbi5wcm9ncmFtICYmXG4gICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5UcmFuc2Zlci5hY3Rpb24uaW5jbHVkZXMoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbi5wYXJzZWQudHlwZSBhcyBzdHJpbmcsXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICBpZiAoaW5zdHJ1Y3Rpb24ucGFyc2VkLnR5cGUgPT09ICd0cmFuc2ZlckNoZWNrZWQnKSB7XG4gICAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLlRyYW5zZmVyQ2hlY2tlZC5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICAgIHBvc3RUb2tlbkFjY291bnQsXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLlRyYW5zZmVyLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB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YW5zYWN0aW9uRmlsdGVyIiwgImluc3RydWN0aW9uIiwgIkNvbnZlcnRlciJdCn0K \ No newline at end of file diff --git a/packages/transaction-filter/dist/index.mjs b/packages/transaction-filter/dist/index.mjs index af7c9a39c..167047027 100644 --- a/packages/transaction-filter/dist/index.mjs +++ b/packages/transaction-filter/dist/index.mjs @@ -1,4 +1,4 @@ -// ../shared/src/constants.ts +// ../suite-utils/src/constants.ts import { PublicKey } from "@solana/web3.js"; import SolanaJsonConfig from "@solana-suite/config/load"; var Config = SolanaJsonConfig; @@ -215,56 +215,6 @@ var TransactionBuilder; TransactionBuilder7.Common = Common2; })(TransactionBuilder || (TransactionBuilder = {})); -// ../shared/src/shared.ts -var overwriteObject = (object, targets) => { - const that = object; - targets.forEach((target) => { - delete that[target.existsKey]; - that[target.will.key] = target.will.value; - }); - return that; -}; -var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { - if (Constants.isDebugging === "true" || process.env.DEBUG === "true") { - console.log("[DEBUG]", data1, data2, data3, data4); - } -}; -var sleep = async (sec) => { - return new Promise((r) => setTimeout(r, sec * 1e3)); -}; -var isPromise = (obj) => { - return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; -}; -function Try(input, finallyInput) { - try { - const v = input(); - if (isPromise(v)) { - return v.then( - (x) => Result2.ok(x), - (err) => Result2.err(err) - ); - } else { - return Result2.ok(v); - } - } catch (e) { - if (e instanceof Error) { - return Result2.err(e); - } - return Result2.err(Error(e)); - } finally { - if (finallyInput) { - debugLog("# finally input:", finallyInput); - finallyInput(); - } - } -} -var convertTimestampToDateTime = (created_at) => { - if (created_at) { - return new Date(created_at * 1e3); - } - return; -}; - // ../transaction-builder/src/batch.ts var TransactionBuilder2; ((TransactionBuilder7) => { @@ -732,12 +682,62 @@ var TransactionBuilder6 = { ...TransactionBuilder4 }; -// ../shared/src/result.ts +// ../suite-utils/src/shared.ts +var overwriteObject = (object, targets) => { + const that = object; + targets.forEach((target) => { + delete that[target.existsKey]; + that[target.will.key] = target.will.value; + }); + return that; +}; +var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { + if (Constants.isDebugging === "true" || process.env.DEBUG === "true") { + console.log("[DEBUG]", data1, data2, data3, data4); + } +}; +var sleep = async (sec) => { + return new Promise((r) => setTimeout(r, sec * 1e3)); +}; +var isPromise = (obj) => { + return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; +}; +function Try(input, finallyInput) { + try { + const v = input(); + if (isPromise(v)) { + return v.then( + (x) => Result5.ok(x), + (err) => Result5.err(err) + ); + } else { + return Result5.ok(v); + } + } catch (e) { + if (e instanceof Error) { + return Result5.err(e); + } + return Result5.err(Error(e)); + } finally { + if (finallyInput) { + debugLog("# finally input:", finallyInput); + finallyInput(); + } + } +} +var convertTimestampToDateTime = (created_at) => { + if (created_at) { + return new Date(created_at * 1e3); + } + return; +}; + +// ../suite-utils/src/result.ts var AbstractResult = class { unwrap(ok, err) { const r = this._chain( - (value) => Result2.ok(ok ? ok(value) : value), - (error) => err ? Result2.ok(err(error)) : Result2.err(error) + (value) => Result5.ok(ok ? ok(value) : value), + (error) => err ? Result5.ok(err(error)) : Result5.err(error) ); if (r.isErr) { throw r.error; @@ -746,17 +746,17 @@ var AbstractResult = class { } map(ok, err) { return this._chain( - (value) => Result2.ok(ok(value)), - (error) => Result2.err(err ? err(error) : error) + (value) => Result5.ok(ok(value)), + (error) => Result5.err(err ? err(error) : error) ); } chain(ok, err) { - return this._chain(ok, err || ((error) => Result2.err(error))); + return this._chain(ok, err || ((error) => Result5.err(error))); } match(ok, err) { this._chain( - (value) => Result2.ok(ok(value)), - (error) => Result2.err(err(error)) + (value) => Result5.ok(ok(value)), + (error) => Result5.err(err(error)) ); } /// single TransactionBuilder //// @@ -778,7 +778,7 @@ var AbstractResult = class { } ); if (res.isErr) { - return Result2.err(res.error); + return Result5.err(res.error); } return res.value; } @@ -813,7 +813,7 @@ Array.prototype.submit = async function(feePayer) { } else if (obj.isOk) { instructions.push(obj.value); } else { - return Result2.err(Error("Only Array Instruction object")); + return Result5.err(Error("Only Array Instruction object")); } } debugLog("# Result batch submit: ", instructions); @@ -843,16 +843,16 @@ var InternalErr = class extends AbstractResult { return err(this.error); } }; -var Result2; -((Result7) => { +var Result5; +((Result8) => { function ok(value) { return new InternalOk(value); } - Result7.ok = ok; + Result8.ok = ok; function err(error) { return new InternalErr(error || Error()); } - Result7.err = err; + Result8.err = err; function all(obj) { if (Array.isArray(obj)) { const resArr = []; @@ -862,7 +862,7 @@ var Result2; } resArr.push(item.value); } - return Result7.ok(resArr); + return Result8.ok(resArr); } const res = {}; const keys = Object.keys(obj); @@ -873,10 +873,10 @@ var Result2; } res[key] = item.value; } - return Result7.ok(res); + return Result8.ok(res); } - Result7.all = all; -})(Result2 || (Result2 = {})); + Result8.all = all; +})(Result5 || (Result5 = {})); // ../converter/src/collection.ts var Converter; @@ -1505,7 +1505,7 @@ var Node; signature }, commitment - ).then(Result2.ok).catch(Result2.err); + ).then(Result5.ok).catch(Result5.err); }; })(Node || (Node = {})); @@ -1534,14 +1534,14 @@ var Signatures; const history = parser(signature); if (history) { histories.push(history); - callback(Result2.ok(histories)); + callback(Result5.ok(histories)); } - }).catch((e) => callback(Result2.err(e))); + }).catch((e) => callback(Result5.err(e))); await sleep(options.waitTime); } } catch (e) { if (e instanceof Error) { - callback(Result2.err(e)); + callback(Result5.err(e)); } } }; @@ -1677,4 +1677,4 @@ export { Signatures, TransactionFilter }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vc2hhcmVkL3NyYy9jb25zdGFudHMudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvYmF0Y2gudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY29tbW9uLnRzIiwgIi4uLy4uL3NoYXJlZC9zcmMvc2hhcmVkLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW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rZW4gYWNjb3VpbnRcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBtaW50XG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAgICogQHBhcmFtIHtTZWNyZXR9IGZlZVBheWVyXG4gICAgICogQHJldHVybnMgUHJvbWlzZTxzdHJpbmc+XG4gICAgICovXG4gICAgZXhwb3J0IGNvbnN0IHJldHJ5R2V0T3JDcmVhdGUgPSBhc3luYyAoXG4gICAgICBtaW50OiBQdWJrZXksXG4gICAgICBvd25lcjogUHVia2V5LFxuICAgICAgZmVlUGF5ZXI6IFNlY3JldCxcbiAgICApOiBQcm9taXNlPHN0cmluZz4gPT4ge1xuICAgICAgbGV0IGNvdW50ZXIgPSAxO1xuICAgICAgd2hpbGUgKGNvdW50ZXIgPCBSRVRSWV9PVkVSX0xJTUlUKSB7XG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgY29uc3QgaW5zdCA9IGF3YWl0IGdldChtaW50LCBvd25lciwgZmVlUGF5ZXIsIHRydWUpO1xuXG4gICAgICAgICAgaWYgKGluc3QgJiYgdHlwZW9mIGluc3QgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICBkZWJ1Z0xvZygnIyBhc3NvY2lhdGVkVG9rZW5BY2NvdW50OiAnLCBpbnN0KTtcbiAgICAgICAgICAgIHJldHVybiBpbnN0O1xuICAgICAgICAgIH0gZWxzZSBpZiAoaW5zdCBpbnN0YW5jZW9mIFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb24pIHtcbiAgICAgICAgICAgIChhd2FpdCBpbnN0LnN1Ym1pdCgpKS5tYXAoXG4gICAgICAgICAgICAgIGFzeW5jIChvazogc3RyaW5nKSA9PiB7XG4gICAgICAgICAgICAgICAgYXdhaXQgTm9kZS5jb25maXJtZWRTaWcob2spO1xuICAgICAgICAgICAgICAgIHJldHVybiBpbnN0LmRhdGE7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIChlcnI6IEVycm9yKSA9PiB7XG4gICAgICAgICAgICAgICAgZGVidWdMb2coJyMgRXJyb3Igc3VibWl0IHJldHJ5R2V0T3JDcmVhdGU6ICcsIGVycik7XG4gICAgICAgICAgICAgICAgdGhyb3cgZXJyO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICBkZWJ1Z0xvZyhgIyByZXRyeTogJHtjb3VudGVyfSBjcmVhdGUgdG9rZW4gYWNjb3VudDogYCwgZSk7XG4gICAgICAgICAgZGVidWdMb2coYCMgbWludDogJHttaW50fSwgb3duZXI6ICR7b3duZXJ9LCBmZWVQYXllcjogJHtmZWVQYXllcn1gKTtcbiAgICAgICAgfVxuICAgICAgICBhd2FpdCBzbGVlcChSRVRSWV9TTEVFUF9USU1FKTtcbiAgICAgICAgY291bnRlcisrO1xuICAgICAgfVxuICAgICAgdGhyb3cgRXJyb3IoYHJldHJ5IGFjdGlvbiBpcyBvdmVyIGxpbWl0ICR7UkVUUllfT1ZFUl9MSU1JVH1gKTtcbiAgICB9O1xuXG4gICAgLyoqXG4gICAgICogW01haW4gbG9naWNdR2V0IEFzc29jaWF0ZWQgdG9rZW4gQWNjb3VudC5cbiAgICAgKiBpZiBub3QgY3JlYXRlZCwgY3JlYXRlIG5ldyB0b2tlbiBhY2NvdWludFxuICAgICAqXG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG1pbnRcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gb3duZXJcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gZmVlUGF5ZXJcbiAgICAgKiBAcmV0dXJucyBQcm9taXNlPHN0cmluZz5cbiAgICAgKi9cbiAgICBleHBvcnQgY29uc3QgbWFrZU9yQ3JlYXRlSW5zdHJ1Y3Rpb24gPSBhc3luYyAoXG4gICAgICBtaW50OiBQdWJrZXksXG4gICAgICBvd25lcjogUHVia2V5LFxuICAgICAgZmVlUGF5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jogdW5rbm93bikge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuQWNjb3VudE5vdEZvdW5kRXJyb3IpICYmXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuSW52YWxpZEFjY291bnRPd25lckVycm9yKVxuICAgICAgICApIHtcbiAgICAgICAgICB0aHJvdyBFcnJvcignVW5leHBlY3RlZCBlcnJvcicpO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgcGF5ZXIgPSAhZmVlUGF5ZXIgPyBvd25lciA6IGZlZVBheWVyO1xuXG4gICAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVBc3NvY2lhdGVkVG9rZW5BY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgcGF5ZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdCxcbiAgICAgICAgfTtcbiAgICAgIH1cbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHsgS2V5cGFpciBhcyBPcmlnaW5hbCwgUHVibGljS2V5IH0gZnJvbSAnQHNvbGFuYS93ZWIzLmpzJztcbmltcG9ydCB7IFB1YmtleSwgU2VjcmV0IH0gZnJvbSAnfi90eXBlcy9hY2NvdW50JztcbmltcG9ydCBicyBmcm9tICdiczU4JztcblxuZXhwb3J0IG5hbWVzcGFjZSBBY2NvdW50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QUk9HUkFNX0lELnRvUHVibGljS2V5KCksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGdldEJndW1TaWduZXIgPSAoKTogUHVibGljS2V5ID0+IHtcbiAgICAgIGNvbnN0IFtwdWJsaWNLZXldID0gUHVibGljS2V5LmZpbmRQcm9ncmFtQWRkcmVzc1N5bmMoXG4gICAgICAgIFtCdWZmZXIuZnJvbSgnY29sbGVjdGlvbl9jcGknLCAndXRmOCcpXSxcbiAgICAgICAgTVBMX0JVQkJMRUdVTV9QUk9HUkFNX0lELnRvUHVibGljS2V5KCksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGdldEFzc2V0SWQgPSAoYWRkcmVzczogUHVia2V5LCBsZWFmSW5kZXg6IG51bWJlcik6IFB1YmtleSA9PiB7XG4gICAgICBjb25zdCBub2RlID0gbmV3IEJOLkJOKGxlYWZJbmRleCk7XG4gICAgICBjb25zdCBbYXNzZXRJZF0gPSBQdWJsaWNLZXkuZmluZFByb2dyYW1BZGRyZXNzU3luYyhcbiAgICAgICAgW1xuICAgICAgICAgIEJ1ZmZlci5mcm9tKCdhc3NldCcsICd1dGY4JyksXG4gICAgICAgICAgYWRkcmVzcy50b1B1YmxpY0tleSgpLnRvQnVmZmVyKCksXG4gICAgICAgICAgVWludDhBcnJheS5mcm9tKG5vZGUudG9BcnJheSgnbGUnLCA4KSksXG4gICAgICAgIF0sXG4gICAgICAgIE1QTF9CVUJCTEVHVU1fUFJPR1JBTV9JRC50b1B1YmxpY0tleSgpLFxuICAgICAgKTtcbiAgICAgIHJldHVybiBhc3NldElkLnRvU3RyaW5nKCk7XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IEFjY291bnQgYXMgQXNzb2NpYXRlZCB9IGZyb20gJy4vYXNzb2NpYXRlZCc7XG5pbXBvcn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zZSAncm95YWx0eSc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnJveWFsdHkpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNSb3lhbHR5KG1ldGFkYXRhLnJveWFsdHkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEuc3ltYm9sKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU3ltYm9sKG1ldGFkYXRhLnN5bWJvbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhazt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ICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICApO1xuXG4gICAgICAgICAgICAgICAgLy8gc3BsLXRva2VuIG9yIHN5c3RlbVxuICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIgJiZcbiAgICAgICAgICAgICAgICAgIG1vZHVsZU5hbWUgIT09IGluc3RydWN0aW9uVHJhbnNmZXJbJ3Byb2dyYW0nXVxuICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgZGVidWdMb2coXG4gICAgICAgICAgICAgICAgICAgICcjIEZpbHRlclR5cGUuTWVtbyBicmVhayBpbnN0cnVjdGlvbjogJyxcbiAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlcixcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAvLyBmZXRjaCBtZW1vIG9ubHkgdHJhbnNhY3Rpb25cbiAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLk1lbW8uaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyLFxuICAgICAgICAgICAgICAgICAgcG9zdFRva2VuQWNjb3VudCxcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLk9ubHlNZW1vOiB7XG4gICAgICAgICAgICAgIGlmIChGaWx0ZXJPcHRpb25zLk1lbW8ucHJvZ3JhbS5pbmNsdWRlcyhpbnN0cnVjdGlvbi5wcm9ncmFtKSkge1xuICAgICAgICAgICAgICAgIGxldCBpbnN0cnVjdGlvblRyYW5zZmVyO1xuXG4gICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5NZW1vLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlcixcbiAgICAgICAgICAgICAgICAgIHBvc3RUb2tlbkFjY291bnQsXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5NaW50OiB7XG4gICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLk1pbnQucHJvZ3JhbS5pbmNsdWRlcyhpbnN0cnVjdGlvbi5wcm9ncmFtKSAmJlxuICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuTWludC5hY3Rpb24uaW5jbHVkZXMoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbi5wYXJzZWQudHlwZSBhcyBzdHJpbmcsXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLk1pbnQuaW50b1VzZXJTaWRlKGluc3RydWN0aW9uLCB0eE1ldGEpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLlRyYW5zZmVyOlxuICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgbW9kdWxlTmFtZSA9PT0gaW5zdHJ1Y3Rpb24ucHJvZ3JhbSAmJlxuICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuVHJhbnNmZXIuYWN0aW9uLmluY2x1ZGVzKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24ucGFyc2VkLnR5cGUgYXMgc3RyaW5nLFxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgaWYgKGluc3RydWN0aW9uLnBhcnNlZC50eXBlID09PSAndHJhbnNmZXJDaGVja2VkJykge1xuICAgICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5UcmFuc2ZlckNoZWNrZWQuaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgICBwb3N0VG9rZW5BY2NvdW50LFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5UcmFuc2Zlci5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgICByZXR1cm4gaGlzdG9yeTtcbiAgICB9O1xufVxuIl0sCiAgIm1hcHBpbmdzIjogIjtBQUFBLFNBQXFCLGlCQUFpQjtBQUN0QyxPQUFPLHNCQUFzQjtBQUU3QixJQUFJLFNBQVM7QUFFTixJQUFVO0FBQUEsQ0FBVixDQUFVQSxlQUFWO0FBQ0UsTUFBVTtBQUFWLElBQVVDLHFCQUFWO0FBQ0wsVUFBTSxhQUFhO0FBQ25CLFFBQUksWUFBWTtBQUNULElBQU1BLGlCQUFBLHNCQUFzQjtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQU81QixJQUF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9Cg== \ No newline at end of file +//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9iYXRjaC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jb21tb24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvbWludC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9wYXJ0aWFsLXNpZ24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY2FsY3VsYXRlLXR4c2l6ZS50cyIsICIuLi8uLi9nbG9iYWwvc3JjL2luZGV4LnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2Fzc29jaWF0ZWQudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMva2V5cGFpci50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9wZGEudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvaW5kZXgudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvaW5kZXgudHMiLCAiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL3NoYXJlZC50cyIsICIuLi8uLi9zdWl0ZS11dGlscy9zcmMvcmVzdWx0LnRzIiwgIi4uLy4uL2NvbnZlcnRlci9zcmMvY29sbGVjdGlvbi50cyIsICIuLi8uLi9jb252ZXJ0ZXIvc3JjL2NyZWF0b3JzLnRzIiwgIi4uLy4uL2NvbnZlcnRlci9zcmMvY29tcHJlc3NlZC1uZnQtbWV0YWRhdGEudHMiLCAiLi4vLi4vY29udmVydGVyL3NyYy9yb3lhbHR5LnRzIiwgIi4uLy4uL2NvbnZlcnRlci9zcmMvbmZ0LnRzIiwgIi4uLy4uL2NvbnZlcnRlci9zcmMvbWVtby50cyIsICIuLi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VlUGF5ZXI6IFNlY3JldCxcbiAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSA9IGZhbHNlLFxuICAgICk6IFByb21pc2U8c3RyaW5nIHwgQ29tbW9uU3RydWN0dXJlPFB1YmtleT4+ID0+IHtcbiAgICAgIGNvbnN0IHJlcyA9IGF3YWl0IG1ha2VPckNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICBtaW50LFxuICAgICAgICBvd25lcixcbiAgICAgICAgbmV3IEtleXBhaXIuS2V5cGFpcih7IHNlY3JldDogZmVlUGF5ZXIgfSkucHVia2V5LFxuICAgICAgICBhbGxvd093bmVyT2ZmQ3VydmUsXG4gICAgICApO1xuXG4gICAgICBpZiAoIXJlcy5pbnN0KSB7XG4gICAgICAgIHJldHVybiByZXMudG9rZW5BY2NvdW50O1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb248UHVia2V5PihcbiAgICAgICAgW3Jlcy5pbnN0XSxcbiAgICAgICAgW10sXG4gICAgICAgIGZlZVBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICByZXMudG9rZW5BY2NvdW50ISxcbiAgICAgICk7XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIFJldHJ5IGZ1bmN0aW9uIGlmIGNyZWF0ZSBuZXcgdG9rZW4gYWNjb3VpbnRcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBtaW50XG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAgICogQHBhcmFtIHtTZWNyZXR9IGZlZVBheWVyXG4gICAgICogQHJldHVybnMgUHJvbWlzZTxzdHJpbmc+XG4gICAgICovXG4gICAgZXhwb3J0IGNvbnN0IHJldHJ5R2V0T3JDcmVhdGUgPSBhc3luYyAoXG4gICAgICBtaW50OiBQdWJrZXksXG4gICAgICBvd25lcjogUHVia2V5LFxuICAgICAgZmVlUGF5ZXI6IFNlY3JldCxcbiAgICApOiBQcm9taXNlPHN0cmluZz4gPT4ge1xuICAgICAgbGV0IGNvdW50ZXIgPSAxO1xuICAgICAgd2hpbGUgKGNvdW50ZXIgPCBSRVRSWV9PVkVSX0xJTUlUKSB7XG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgY29uc3QgaW5zdCA9IGF3YWl0IGdldChtaW50LCBvd25lciwgZmVlUGF5ZXIsIHRydWUpO1xuXG4gICAgICAgICAgaWYgKGluc3QgJiYgdHlwZW9mIGluc3QgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICBkZWJ1Z0xvZygnIyBhc3NvY2lhdGVkVG9rZW5BY2NvdW50OiAnLCBpbnN0KTtcbiAgICAgICAgICAgIHJldHVybiBpbnN0O1xuICAgICAgICAgIH0gZWxzZSBpZiAoaW5zdCBpbnN0YW5jZW9mIFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb24pIHtcbiAgICAgICAgICAgIChhd2FpdCBpbnN0LnN1Ym1pdCgpKS5tYXAoXG4gICAgICAgICAgICAgIGFzeW5jIChvazogc3RyaW5nKSA9PiB7XG4gICAgICAgICAgICAgICAgYXdhaXQgTm9kZS5jb25maXJtZWRTaWcob2spO1xuICAgICAgICAgICAgICAgIHJldHVybiBpbnN0LmRhdGE7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIChlcnI6IEVycm9yKSA9PiB7XG4gICAgICAgICAgICAgICAgZGVidWdMb2coJyMgRXJyb3Igc3VibWl0IHJldHJ5R2V0T3JDcmVhdGU6ICcsIGVycik7XG4gICAgICAgICAgICAgICAgdGhyb3cgZXJyO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICBkZWJ1Z0xvZyhgIyByZXRyeTogJHtjb3VudGVyfSBjcmVhdGUgdG9rZW4gYWNjb3VudDogYCwgZSk7XG4gICAgICAgICAgZGVidWdMb2coYCMgbWludDogJHttaW50fSwg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udG9QdWJsaWNLZXkoKSxcbiAgICAgICAgYWxsb3dPd25lck9mZkN1cnZlLFxuICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICBBU1NPQ0lBVEVEX1RPS0VOX1BST0dSQU1fSUQsXG4gICAgICApO1xuXG4gICAgICBkZWJ1Z0xvZygnIyBhc3NvY2lhdGVkVG9rZW5BY2NvdW50OiAnLCBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCkpO1xuXG4gICAgICB0cnkge1xuICAgICAgICAvLyBEb250IHVzZSBSZXN1bHRcbiAgICAgICAgYXdhaXQgZ2V0QWNjb3VudChcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLmNvbW1pdG1lbnQsXG4gICAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICB0b2tlbkFjY291bnQ6IGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSxcbiAgICAgICAgICBpbnN0OiB1bmRlZmluZWQsXG4gICAgICAgIH07XG4gICAgICB9IGNhdGNoIChlcnJvcjogdW5rbm93bikge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuQWNjb3VudE5vdEZvdW5kRXJyb3IpICYmXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuSW52YWxpZEFjY291bnRPd25lckVycm9yKVxuICAgICAgICApIHtcbiAgICAgICAgICB0aHJvdyBFcnJvcignVW5leHBlY3RlZCBlcnJvcicpO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgcGF5ZXIgPSAhZmVlUGF5ZXIgPyBvd25lciA6IGZlZVBheWVyO1xuXG4gICAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVBc3NvY2lhdGVkVG9rZW5BY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgcGF5ZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdCxcbiAgICAgICAgfTtcbiAgICAgIH1cbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHsgS2V5cGFpciBhcyBPcmlnaW5hbCwgUHVibGljS2V5IH0gZnJvbSAnQHNvbGFuYS93ZWIzLmpzJztcbmltcG9ydCB7IFB1YmtleSwgU2VjcmV0IH0gZnJvbSAnfi90eXBlcy9hY2NvdW50JztcbmltcG9ydCBicyBmcm9tICdiczU4JztcblxuZXhwb3J0IG5hbWVzcGFjZSBBY2NvdW50IHtcbiAgZXhwb3J0IGNsYXNzIEtleXBhaXIge1xuICAgIHNlY3JldDogU2VjcmV0O1xuICAgIHB1YmtleTogUHVia2V5O1xuXG4gICAgY29uc3RydWN0b3IocGFyYW1zOiB7IHB1YmtleT86IFB1YmtleTsgc2VjcmV0OiBTZWNyZXQgfSkge1xuICAgICAgaWYgKCFwYXJhbXMucHVia2V5KSB7XG4gICAgICAgIGNvbnN0IGtleXBhaXIgPSBwYXJhbXMuc2VjcmV0LnRvS2V5cGFpcigpO1xuICAgICAgICB0aGlzLnB1YmtleSA9IGtleXBhaXIucHVibGljS2V5LnRvU3RyaW5nKCk7XG4gICAgIC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MgZnVuY3Rpb24gKGZlZVBheWVyPzogU2VjcmV0KSB7XG4gIGlmIChmZWVQYXllcikge1xuICAgIGxldCBpID0gMTtcbiAgICBmb3IgYXdhaXQgKGNvbnN0IG9iaiBvZiB0aGlzKSB7XG4gICAgICBpZiAob2JqLmlzRXJyKSB7XG4gICAgICAgIHJldHVybiBvYmo7XG4gICAgICB9IGVsc2UgaWYgKG9iai52YWx1ZS5jYW5TdWJtaXQpIHtcbiAgICAgICAgZGVidWdMb2coJyMgUmVzdWx0IGJhdGNoIGNhblN1Ym1pdCcpO1xuICAgICAgICBjb25zdCBzaWcgPSBhd2FpdCAob2JqIGFzIFBhcnRpYWxTaWduU3RydWN0dXJlKS5zdWJtaXQoZmVlUGF5ZXIpO1xuICAgICAgICBpZiAoc2lnLmlzRXJyKSB7XG4gICAgICAgICAgcmV0dXJuIHNpZztcbiAgICAgICAgfVxuICAgICAgICBhd2FpdCBOb2RlLmNvbmZpcm1lZFNpZyhzaWcudmFsdWUpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgZGVidWdMb2coJyMgUmVzdWx0IGJhdGNoIG90aGVyIHRoYW4gY2FuU3VibWl0Jyk7XG4gICAgICAgIGlmICh0aGlzLmxlbmd0aCA9PSBpKSB7XG4gICAgICAgICAgLy8gbGFzdCBvYmplY3RcbiAgICAgICAgICByZXR1cm4gb2JqLnN1Ym1pdChmZWVQYXllcik7XG4gICAgICAgIH1cbiAgICAgICAgb2JqLnN1Ym1pdChmZWVQYXllcik7XG4gICAgICB9XG4gICAgICBpKys7XG4gICAgfVxuICB9IGVsc2Uge1xuICAgIGNvbnN0IGluc3RydWN0aW9uczogQ29tbW9uU3RydWN0dXJlIHwgTWludFN0cnVjdHVyZVtdID0gW107XG4gICAgZm9yIChjb25zdCBvYmogb2YgdGhpcykge1xuICAgICAgaWYgKG9iai5pc0Vycikge1xuICAgICAgICByZXR1cm4gb2JqO1xuICAgICAgfSBlbHNlIGlmIChvYmouaXNPaykge1xuICAgICAg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XkoKSxcbiAgICAgICAgICBzaGFyZTogZGF0YS5zaGFyZSxcbiAgICAgICAgICB2ZXJpZmllZDogZmFsc2UsXG4gICAgICAgIH07XG4gICAgICB9KTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGludG9Db21wcmVzc2VkTmZ0SW5mcmEgPSAoXG4gICAgICBpbnB1dDogT3B0aW9uPElucHV0Q3JlYXRvcnNbXT4gfCB1bmRlZmluZWQsXG4gICAgKTogSW50ZXJuYWxDcmVhdG9yc1tdID0+IHtcbiAgICAgIGlmICghaW5wdXQpIHtcbiAgICAgICAgcmV0dXJuIFtdO1xuICAgICAgfVxuICAgICAgcmV0dXJuIGlucHV0IS5tYXAoKGRhdGEpID0+IHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICBhZGRyZXNzOiBkYXRhLmFkZHJlc3MudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBzaGFyZTogZGF0YS5zaGFyZSxcbiAgICAgICAgICB2ZXJpZmllZDogZmFsc2UsXG4gICAgICAgIH07XG4gICAgICB9KTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGludG9Vc2VyID0gKFxuICAgICAgb3V0cHV0OiBPcHRpb248SW50ZXJuYWxDcmVhdG9yc1tdPixcbiAgICApOiBDcmVhdG9yc1tdIHwgdW5kZWZpbmVkID0+IHtcbiAgICAgIGlmICghb3V0cHV0KSB7XG4gICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBvdXRwdXQubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvU3RyaW5nKCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGRhdGEudmVyaWZpZWQsXG4gICAgICAgIH07XG4gICAgICB9KTtcbiAgICB9O1xuICB9XG59XG4iLC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hc2UgJ2ltYWdlJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuaW1hZ2UpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNJbWFnZVVybChtZXRhZGF0YS5pbWFnZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdyb3lhbHR5JzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEucm95YWx0eSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1JveWFsdHkobWV0YWRhdGEucm95YWx0eSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ25hbWUnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLm5hbWUpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNOYW1lKG1ldGFkYXRhLm5hbWUpO1xuICAgICAgICAgICAgfVxuICA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AgICAgICAgICAgICBpbnN0cnVjdGlvbi5wcm9ncmFtLFxuICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlciA9IGluc3RydWN0aW9uO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICk7XG5cbiAgICAgICAgICAgICAgICAvLyBzcGwtdG9rZW4gb3Igc3lzdGVtXG4gICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlciAmJlxuICAgICAgICAgICAgICAgICAgbW9kdWxlTmFtZSAhPT0gaW5zdHJ1Y3Rpb25UcmFuc2ZlclsncHJvZ3JhbSddXG4gICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICBkZWJ1Z0xvZyhcbiAgICAgICAgICAgICAgICAgICAgJyMgRmlsdGVyVHlwZS5NZW1vIGJyZWFrIGluc3RydWN0aW9uOiAnLFxuICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyLFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vIGZldGNoIG1lbW8gb25seSB0cmFuc2FjdGlvblxuICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuTWVtby5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIsXG4gICAgICAgICAgICAgICAgICBwb3N0VG9rZW5BY2NvdW50LFxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXNlIEZpbHRlclR5cGUuT25seU1lbW86IHtcbiAgICAgICAgICAgICAgaWYgKEZpbHRlck9wdGlvbnMuTWVtby5wcm9ncmFtLmluY2x1ZGVzKGluc3RydWN0aW9uLnByb2dyYW0pKSB7XG4gICAgICAgICAgICAgICAgbGV0IGluc3RydWN0aW9uVHJhbnNmZXI7XG5cbiAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLk1lbW8uaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyLFxuICAgICAgICAgICAgICAgICAgcG9zdFRva2VuQWNjb3VudCxcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLk1pbnQ6IHtcbiAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuTWludC5wcm9ncmFtLmluY2x1ZGVzKGluc3RydWN0aW9uLnByb2dyYW0pICYmXG4gICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5NaW50LmFjdGlvbi5pbmNsdWRlcyhcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLnBhcnNlZC50eXBlIGFzIHN0cmluZyxcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuTWludC5pbnRvVXNlclNpZGUoaW5zdHJ1Y3Rpb24sIHR4TWV0YSk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXNlIEZpbHRlclR5cGUuVHJhbnNmZXI6XG4gICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICBtb2R1bGVOYW1lID09PSBpbnN0cnVjdGlvbi5wcm9ncmFtICYmXG4gICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5UcmFuc2Zlci5hY3Rpb24uaW5jbHVkZXMoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbi5wYXJzZWQudHlwZSBhcyBzdHJpbmcsXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICBpZiAoaW5zdHJ1Y3Rpb24ucGFyc2VkLnR5cGUgPT09ICd0cmFuc2ZlckNoZWNrZWQnKSB7XG4gICAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLlRyYW5zZmVyQ2hlY2tlZC5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICAgIHBvc3RUb2tlbkFjY291bnQsXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLlRyYW5zZmVyLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIHJldHVybiBoaXN0b3J5O1xuICAgIH07XG59XG4iXSwKICAibWFwcGluZ3MiOiAiO0FBQUEsU0FBcUIsaUJBQWlCO0FBQ3RDLE9BQU8sc0JBQXNCO0FBRTdCLElBQUksU0FBUztBQUVOLEl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GVja2VkIiwgIkNvbnZlcnRlciIsICJUcmFuc2ZlciIsICJDb252ZXJ0ZXIiLCAiVmFsaWRhdG9yIiwgIk1lc3NhZ2UiLCAiQ29udmVydGVyIiwgIk5vZGUiLCAiUmVzdWx0IiwgIlNpZ25hdHVyZXMiLCAiUmVzdWx0IiwgIlRyYW5zYWN0aW9uRmlsdGVyIiwgImluc3RydWN0aW9uIiwgIkNvbnZlcnRlciJdCn0K \ No newline at end of file diff --git a/packages/types/dist/shared.js b/packages/types/dist/shared.js deleted file mode 100644 index 098072cfc..000000000 --- a/packages/types/dist/shared.js +++ /dev/null @@ -1,19 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/shared/index.ts -var shared_exports = {}; -module.exports = __toCommonJS(shared_exports); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL3NoYXJlZC9pbmRleC50cyJdLAogICJzb3VyY2VzQ29udGVudCI6IFsiaW1wb3J0IHsgRmluZCB9IGZyb20gJy4uL2ZpbmQnO1xuaW1wb3J0IHsgSGlzdG9yeSB9IGZyb20gJy4uL2hpc3RvcnknO1xuXG5leHBvcnQgdHlwZSBBbnlPYmplY3QgPSB7XG4gIFtrZXk6IHN0cmluZ106IHVua25vd247XG59O1xuXG5leHBvcnQgdHlwZSBPdmVyd3JpdGVPYmplY3QgPSB7XG4gIGV4aXN0c0tleTogc3RyaW5nO1xuICB3aWxsOiB7IGtleTogc3RyaW5nOyB2YWx1ZTogdW5rbm93biB9O1xufTtcblxuZXhwb3J0IHR5cGUgT25PazxUIGV4dGVuZHMgSGlzdG9yeSB8IEZpbmQ+ID0gKG9rOiBUW10pID0+IHZvaWQ7XG5leHBvcnQgdHlwZSBPbkVyciA9IChlcnI6IEVycm9yKSA9PiB2b2lkO1xuIl0sCiAgIm1hcHBpbmdzIjogIjs7Ozs7Ozs7Ozs7Ozs7OztBQUFBO0FBQUE7IiwKICAibmFtZXMiOiBbXQp9Cg== \ No newline at end of file diff --git a/packages/types/dist/transaction-builder.js b/packages/types/dist/transaction-builder.js index d0cb1552e..00ab04e7b 100644 --- a/packages/types/dist/transaction-builder.js +++ b/packages/types/dist/transaction-builder.js @@ -16,4 +16,4 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru // src/transaction-builder/index.ts var transaction_builder_exports = {}; module.exports = __toCommonJS(transaction_builder_exports); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL3RyYW5zYWN0aW9uLWJ1aWxkZXIvaW5kZXgudHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImltcG9ydCB7IFB1YmtleSwgU2VjcmV0IH0gZnJvbSAnfi90eXBlcy9hY2NvdW50JztcbmltcG9ydCB7IFJlc3VsdCB9IGZyb20gJ34vc2hhcmVkJztcbmltcG9ydCB7XG4gIEtleXBhaXIsXG4gIFRyYW5zYWN0aW9uSW5zdHJ1Y3Rpb24sXG4gIFRyYW5zYWN0aW9uU2lnbmF0dXJlLFxufSBmcm9tICdAc29sYW5hL3dlYjMuanMnO1xuXG5leHBvcnQgdHlwZSBDb21tb25TdHJ1Y3R1cmU8VCA9IHVuZGVmaW5lZD4gPSB7XG4gIGluc3RydWN0aW9uczogVHJhbnNhY3Rpb25JbnN0cnVjdGlvbltdO1xuICBzaWduZXJzOiBLZXlwYWlyW107XG4gIGZl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Ozs7Ozs7Ozs7Ozs7OztBQUFBO0FBQUE7IiwKICAibmFtZXMiOiBbXQp9Cg== \ No newline at end of file diff --git a/packages/types/dist/shared.d.mts b/packages/types/dist/utils.d.mts similarity index 100% rename from packages/types/dist/shared.d.mts rename to packages/types/dist/utils.d.mts diff --git a/packages/types/dist/shared.d.ts b/packages/types/dist/utils.d.ts similarity index 100% rename from packages/types/dist/shared.d.ts rename to packages/types/dist/utils.d.ts diff --git a/packages/types/dist/utils.js b/packages/types/dist/utils.js new file mode 100644 index 000000000..8977e1561 --- /dev/null +++ b/packages/types/dist/utils.js @@ -0,0 +1,19 @@ +"use strict"; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/utils/index.ts +var utils_exports = {}; +module.exports = __toCommonJS(utils_exports); +//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL3V0aWxzL2luZGV4LnRzIl0sCiAgInNvdXJjZXNDb250ZW50IjogWyJpbXBvcnQgeyBGaW5kIH0gZnJvbSAnLi4vZmluZCc7XG5pbXBvcnQgeyBIaXN0b3J5IH0gZnJvbSAnLi4vaGlzdG9yeSc7XG5cbmV4cG9ydCB0eXBlIEFueU9iamVjdCA9IHtcbiAgW2tleTogc3RyaW5nXTogdW5rbm93bjtcbn07XG5cbmV4cG9ydCB0eXBlIE92ZXJ3cml0ZU9iamVjdCA9IHtcbiAgZXhpc3RzS2V5OiBzdHJpbmc7XG4gIHdpbGw6IHsga2V5OiBzdHJpbmc7IHZhbHVlOiB1bmtub3duIH07XG59O1xuXG5leHBvcnQgdHlwZSBPbk9rPFQgZXh0ZW5kcyBIaXN0b3J5IHwgRmluZD4gPSAob2s6IFRbXSkgPT4gdm9pZDtcbmV4cG9ydCB0eXBlIE9uRXJyID0gKGVycjogRXJyb3IpID0+IHZvaWQ7XG4iXSwKICAibWFwcGluZ3MiOiAiOzs7Ozs7Ozs7Ozs7Ozs7O0FBQUE7QUFBQTsiLAogICJuYW1lcyI6IFtdCn0K \ No newline at end of file diff --git a/packages/types/dist/shared.mjs b/packages/types/dist/utils.mjs similarity index 100% rename from packages/types/dist/shared.mjs rename to packages/types/dist/utils.mjs diff --git a/packages/types/src/transaction-builder/index.ts b/packages/types/src/transaction-builder/index.ts index 78937d8e4..4026229b1 100644 --- a/packages/types/src/transaction-builder/index.ts +++ b/packages/types/src/transaction-builder/index.ts @@ -1,5 +1,5 @@ import { Pubkey, Secret } from '~/types/account'; -import { Result } from '~/shared'; +import { Result } from '~/suite-utils'; import { Keypair, TransactionInstruction, diff --git a/packages/validator/dist/index.js b/packages/validator/dist/index.js index 74c6304e7..ebdd781ce 100644 --- a/packages/validator/dist/index.js +++ b/packages/validator/dist/index.js @@ -35,7 +35,7 @@ __export(src_exports, { }); module.exports = __toCommonJS(src_exports); -// ../shared/src/constants.ts +// ../suite-utils/src/constants.ts var import_web3 = require("@solana/web3.js"); var import_load = __toESM(require("@solana-suite/config/load")); var Config = import_load.default; @@ -311,56 +311,6 @@ var TransactionBuilder; TransactionBuilder7.Common = Common2; })(TransactionBuilder || (TransactionBuilder = {})); -// ../shared/src/shared.ts -var overwriteObject = (object, targets) => { - const that = object; - targets.forEach((target) => { - delete that[target.existsKey]; - that[target.will.key] = target.will.value; - }); - return that; -}; -var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { - if (Constants.isDebugging === "true" || process.env.DEBUG === "true") { - console.log("[DEBUG]", data1, data2, data3, data4); - } -}; -var sleep = async (sec) => { - return new Promise((r) => setTimeout(r, sec * 1e3)); -}; -var isPromise = (obj) => { - return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; -}; -function Try(input, finallyInput) { - try { - const v = input(); - if (isPromise(v)) { - return v.then( - (x) => Result.ok(x), - (err) => Result.err(err) - ); - } else { - return Result.ok(v); - } - } catch (e) { - if (e instanceof Error) { - return Result.err(e); - } - return Result.err(Error(e)); - } finally { - if (finallyInput) { - debugLog("# finally input:", finallyInput); - finallyInput(); - } - } -} -var convertTimestampToDateTime = (created_at) => { - if (created_at) { - return new Date(created_at * 1e3); - } - return; -}; - // ../transaction-builder/src/batch.ts var TransactionBuilder2; ((TransactionBuilder7) => { @@ -815,7 +765,57 @@ var TransactionBuilder6 = { ...TransactionBuilder4 }; -// ../shared/src/result.ts +// ../suite-utils/src/shared.ts +var overwriteObject = (object, targets) => { + const that = object; + targets.forEach((target) => { + delete that[target.existsKey]; + that[target.will.key] = target.will.value; + }); + return that; +}; +var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { + if (Constants.isDebugging === "true" || process.env.DEBUG === "true") { + console.log("[DEBUG]", data1, data2, data3, data4); + } +}; +var sleep = async (sec) => { + return new Promise((r) => setTimeout(r, sec * 1e3)); +}; +var isPromise = (obj) => { + return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; +}; +function Try(input, finallyInput) { + try { + const v = input(); + if (isPromise(v)) { + return v.then( + (x) => Result.ok(x), + (err) => Result.err(err) + ); + } else { + return Result.ok(v); + } + } catch (e) { + if (e instanceof Error) { + return Result.err(e); + } + return Result.err(Error(e)); + } finally { + if (finallyInput) { + debugLog("# finally input:", finallyInput); + finallyInput(); + } + } +} +var convertTimestampToDateTime = (created_at) => { + if (created_at) { + return new Date(created_at * 1e3); + } + return; +}; + +// ../suite-utils/src/result.ts var AbstractResult = class { unwrap(ok, err) { const r = this._chain( @@ -927,15 +927,15 @@ var InternalErr = class extends AbstractResult { } }; var Result; -((Result7) => { +((Result8) => { function ok(value) { return new InternalOk(value); } - Result7.ok = ok; + Result8.ok = ok; function err(error) { return new InternalErr(error || Error()); } - Result7.err = err; + Result8.err = err; function all(obj) { if (Array.isArray(obj)) { const resArr = []; @@ -945,7 +945,7 @@ var Result; } resArr.push(item.value); } - return Result7.ok(resArr); + return Result8.ok(resArr); } const res = {}; const keys = Object.keys(obj); @@ -956,9 +956,9 @@ var Result; } res[key] = item.value; } - return Result7.ok(res); + return Result8.ok(res); } - Result7.all = all; + Result8.all = all; })(Result || (Result = {})); // ../converter/src/collection.ts @@ -1528,4 +1528,4 @@ var ValidatorError = class extends Error { Validator, ValidatorError }); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uLy4uL3NoYXJlZC9zcmMvY29uc3RhbnRzLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2JhdGNoLnRzIiwgIi4uLy4uL25vZGUvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2NvbW1vbi50cyIsICIuLi8uLi9zaGFyZWQvc3JjL3NoYXJlZC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9taW50LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL3BhcnRpYWwtc2lnbi50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jYWxjdWxhdGUtdHhzaXplLnRzIiwgIi4uLy4uL2dsb2JhbC9zcmMvaW5kZXgudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvYXNzb2NpYXRlZC50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9rZXlwYWlyLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL3BkYS50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9pbmRleC50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fYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEuc3ltYm9sKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU3ltYm9sKG1ldGFkYXRhLnN5bWJvbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAocmVzICYmIHJlcy5pc0Vycikge1xuICAgICAgICAgIHJlc3VsdHMucHVzaCguLi5yZXMuZXJyb3IuZGV0YWlscyk7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgICAgaWYgKHJlc3VsdHMubGVuZ3RoID4gMCkge1xuICAgICAgICBjb25zdCBtZXNzYWdlID1cbiAgICAgICAgICAnQ2F1Z2h0IGluIHRoZSB2YWxpZGF0aW9uIGVycm9ycy4gc2VlIGluZm9ybWF0aW9uIGUuZzogZXJyPFZhbGlkYXRvckVycm9yPi5kZXRhaWxzJztcbiAgICAgICAgdGhyb3cgbmV3IFZhbGlkYXRvckVycm9yKG1lc3NhZ2UsIHJlc3VsdHMpO1xuICAgICAgfVxuICA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AgZXhwb3J0IGNsYXNzIEJhdGNoIHtcbiAgICBzdWJtaXQgPSBhc3luYyAoXG4gICAgICBhcnI6IENvbW1vbi5Db21tb25bXSB8IE1pbnQuTWludFtdLFxuICAgICk6IFByb21pc2U8UmVzdWx0PFRyYW5zYWN0aW9uU2lnbmF0dXJlLCBFcnJvcj4+ID0+IHtcbiAgICAgIHJldHVybiBUcnkoYXN5bmMgKCkgPT4ge1xuICAgICAgICBsZXQgaSA9IDA7XG4gICAgICAgIGZvciAoY29uc3QgYSBvZiBhcnIpIHtcbiAgICAgICAgICBpZiAoIWEuaW5zdHJ1Y3Rpb25zICYmICFhLnNpZ25lcnMpIHtcbiAgICAgICAgICAgIHRocm93IEVycm9yKFxuICAgICAgICAgICAgICBgb25seSBJbnN0cnVjdGlvbiBvYmplY3QgdGhhdCBjYW4gdXNlIGJhdGNoU3VibWl0KCkuXG4gICAgICAgICAgICBJbmRleDogJHtpfSwgU2V0IHZhbHVlOiAke0pTT04uc3RyaW5naWZ5KGEpfWAsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICBpKys7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBpbnN0cnVjdGlvbnMgPSBhcnIuZmxhdE1hcCgoYSkgPT4gYS5pbnN0cnVjdGlvbnMpO1xuICAgICAgICBjb25zdCBzaWduZXJzID0gYXJyLmZsYXRNYXAoKGEpID0+IGEuc2lnbmVycyk7XG4gICAgICAgIGNvbnN0IGZlZVBheWVycyA9IGFyci5maWx0ZXIoKGEpID0+IGEuZmVlUGF5ZXIgIT09IHVuZGVmaW5lZCk7XG4gICAgICAgIGxldCBmZWVQYXllciA9IHNpZ25lcnNbMF07XG4gICAgICAgIGlmIChmZWVQYXllcnMubGVuZ3RoID4gMCAmJiBmZWVQYXllcnNbMF0uZmVlUGF5ZXIpIHtcbiAgICAgICAgICBmZWVQYXllciA9IGZlZVBheWVyc1swXS5mZWVQYXllcjtcbiAgICAgICAgfVxuXG4gICAgICA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xvZygnIyBFcnJvciBzdWJtaXQgcmV0cnlHZXRPckNyZWF0ZTogJywgZXJyKTtcbiAgICAgICAgICAgICAgICB0aHJvdyBlcnI7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgIGRlYnVnTG9nKGAjIHJldHJ5OiAke2NvdW50ZXJ9IGNyZWF0ZSB0b2tlbiBhY2NvdW50OiBgLCBlKTtcbiAgICAgICAgICBkZWJ1Z0xvZyhgIyBtaW50OiAke21pbnR9LCBvd25lcjogJHtvd25lcn0sIGZlZVBheWVyOiAke2ZlZVBheWVyfWApO1xuICAgICAgICB9XG4gICAgICAgIGF3YWl0IHNsZWVwKFJFVFJZX1NMRUVQX1RJTUUpO1xuICAgICAgICBjb3VudGVyKys7XG4gICAgICB9XG4gICAgICB0aHJvdyBFcnJvcihgcmV0cnkgYWN0aW9uIGlzIG92ZXIgbGltaXQgJHtSRVRSWV9PVkVSX0xJTUlUfWApO1xuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiBbTWFpbiBsb2dpY11HZXQgQXNzb2NpYXRlZCB0b2tlbiBBY2NvdW50LlxuICAgICAqIGlmIG5vdCBjcmVhdGVkLCBjcmVhdGUgbmV3IHRva2VuIGFjY291aW50XG4gICAgICpcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gbWludFxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBvd25lclxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBmZWVQYXllclxuICAgICAqIEByZXR1cm5zIFByb21pc2U8c3RyaW5nPlxuICAgICAqL1xuICAgIGV4cG9ydCBjb25zdCBtYWtlT3JDcmVhdGVJbnN0cnVjdGlvbiA9IGFzeW5jIChcbiAgICAgIG1pbnQ6IFB1YmtleSxcbiAgICAgIG93bmVyOiBQdWJrZXksXG4gICAgICBmZWVQYXllcj86IFB1YmtleSxcbiAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSA9IGZhbHNlLFxuICAgICk6IFByb21pc2U8e1xuICAgICAgdG9rZW5BY2NvdW50OiBzdHJpbmc7XG4gICAgICBpbnN0OiBUcmFuc2FjdGlvbkluc3RydWN0aW9uIHwgdW5kZWZpbmVkO1xuICAgIH0+ID0+IHtcbiAgICAgIGNvbnN0IGFzc29jaWF0ZWRUb2tlbkFjY291bnQgPSBnZXRBc3NvY2lhdGVkVG9rZW5BZGRyZXNzU3luYyhcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICBhbGxvd093bmVyT2ZmQ3VydmUsXG4gICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGFzc29jaWF0ZWRUb2tlbkFjY291bnQ6ICcsIGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSk7XG5cbiAgICAgIHRyeSB7XG4gICAgICAgIC8vIERvbnQgdXNlIFJlc3VsdFxuICAgICAgICBhd2FpdCBnZXRBY2NvdW50KFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCkuY29tbWl0bWVudCxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3Q6IHVuZGVmaW5lZCxcbiAgICAgICAgfTtcbiAgICAgIH0gY2F0Y2ggKGVycm9yOiB1bmtub3duKSB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5BY2NvdW50Tm90Rm91bmRFcnJvcikgJiZcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5JbnZhbGlkQWNjb3VudE93bmVyRXJyb3IpXG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9yKCdVbmV4cGVjdGVkIGVycm9yJyk7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBwYXllciA9ICFmZWVQYXllciA/IG93bmVyIDogZmVlUGF5ZXI7XG5cbiAgICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgICBwYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgICBBU1NPQ0lBVEVEX1RPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG5cbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICB0b2tlbkFjY291bnQ6IGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSxcbiAgICAgICAgICBpbnN0LFxuICAgICAgICB9O1xuICAgICAgfVxuICAgIH07XG4gIH1cbn1cbiIsICJpbXBvcnQgeyBLZXlwYWlyIGFzIE9yaWdpbmFsLCBQdWJsaWNLZXkgfSBmcm9tICdAc29sYW5hL3dlYjMuanMnO1xuaW1wb3J0IHsgUHVia2V5LCBTZWNyZXQgfSBmcm9tICd+L3R5cGVzL2FjY291bnQnO1xuaW1wb3J0IGJzIGZyb20gJ2JzNTgnO1xuXG5leHBvcnQgbmFtZXNwYWNlIEFjY291bnQge1xuICBleHBvcnQgY2xhc3MgS2V5cGFpciB7XG4gICAgc2VjcmV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ICAgICAgIGlmIChmZWVQYXllcikge1xuICAgICAgICAgIGNvbnN0IG9iaiA9IG9rIGFzIFBhcnRpYWxTaWduU3RydWN0dXJlO1xuICAgICAgICAgIHJldHVybiBhd2FpdCBvYmouc3VibWl0KGZlZVBheWVyKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICBjb25zdCBvYmogPSBvayBhcyBDb21tb25TdHJ1Y3R1cmUgfCBNaW50U3RydWN0dXJlO1xuICAgICAgICAgIHJldHVybiBhd2FpdCBvYmouc3VibWl0KCk7XG4gICAgICAgIH1cbiAgICAgIH0sXG4gICAgICAoZXJyKSA9PiB7XG4gICAgICAgIHJldHVybiBlcnI7XG4gICAgICB9LFxuICAgICk7XG4gICAgaWYgKHJlcy5pc0Vycikge1xuICAgICAgcmV0dXJuIFJlc3VsdC5lcnIocmVzLmVycm9yKTtcbiAgICB9XG4gICAgcmV0dXJuIHJlcy52YWx1ZTtcbiAgfVxufVxuXG4vLy8gTXVsdGlwbGUgVHJhbnNhY3Rpb25CdWlsZGVyIC8vLy9cbmRlY2xhcmUgZ2xvYmFsIHtcbiAgLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLXVudXNlZC12YXJzICovXG4gIGludGVyZmFjZSBBcnJheTxUPiB7XG4gICAgc3VibWl0KGZlZVBheWVyPzogU2VjcmV0KTogUHJvbWlzZTxSZXN1bHQ8VHJhbnNhY3Rpb25TaWduYXR1cmUsIEVycm9yPj47XG4gIH1cbn1cblxuQXJyYXkucHJvdG90eXBlLnN1Ym1pdCA9IGFzeW5jIGZ1bmN0aW9uIChmZWVQYXllcj86IFNlY3JldCkge1xuICBpZiAoZmVlUGF5ZXIpIHtcbiAgICBsZXQgaSA9IDE7XG4gICAgZm9yIGF3YWl0IChjb25zdCBvYmogb2YgdGhpcykge1xuICAgICAgaWYgKG9iai5pc0Vycikge1xuICAgICAgICByZXR1cm4gb2JqO1xuICAgICAgfSBlbHNlIGlmIChvYmoudmF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1aWxkZXIiLCAiaW1wb3J0X3dlYjMiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJpbXBvcnRfd2ViMyIsICJpbXBvcnRfd2ViMyIsICJBY2NvdW50IiwgIktleXBhaXIiLCAiYnMiLCAiT3JpZ2luYWwiLCAiQWNjb3VudCIsICJBc3NvY2lhdGVkIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJpbXBvcnRfd2ViMyIsICJBY2NvdW50IiwgIlBkYSIsICJCTiIsICJBY2NvdW50IiwgImltcG9ydF9iczU4IiwgIkFjY291bnQiLCAiYnMiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJSZXN1bHQiLCAiQ29udmVydGVyIiwgIkNvbGxlY3Rpb24iLCAiQ29sbGVjdGlvbk1pbnQiLCAiQ29udmVydGVyIiwgIkNyZWF0b3JzIiwgIkNvbnZlcnRlciIsICJDb21wcmVzc2VkTmZ0TWV0YWRhdGEiLCAiQ29udmVydGVyIiwgIlJveWFsdHkiLCAiQ29udmVydGVyIiwgIk5mdCIsICJDb252ZXJ0ZXIiLCAiTWVtbyIsICJDb252ZXJ0ZXIiLCAiTWludCIsICJDb252ZXJ0ZXIiLCAiUmVndWxhck5mdE1ldGFkYXRhIiwgIkNvbnZlcnRlciIsICJQcm9wZXJ0aWVzIiwgIkNvbnZlcnRlciIsICJVc2VzIiwgIkNvbnZlcnRlciIsICJUb2tlbk1ldGFkYXRhIiwgIkNvbnZlcnRlciIsICJUcmFuc2ZlckNoZWNrZWQiLCAiQ29udmVydGVyIiwgIlRyYW5zZmVyIiwgIkNvbnZlcnRlciIsICJWYWxpZGF0b3IiLCAiTWVzc2FnZSIsICJDb252ZXJ0ZXIiXQp9Cg== \ No newline at end of file +//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzI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tleSkge1xuICAgICAgICAgIGNhc2UgJ2ltYWdlJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuaW1hZ2UpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNJbWFnZVVybChtZXRhZGF0YS5pbWFnZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdyb3lhbHR5JzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEucm95YWx0eSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1JveWFsdHkobWV0YWRhdGEucm95YWx0eSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ25hbWUnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLm5hbWUpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNOYW1lKG1ldGFkYXRhLm5hbWUpO1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lmIGNyZWF0ZSBuZXcgdG9rZW4gYWNjb3VpbnRcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBtaW50XG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAgICogQHBhcmFtIHtTZWNyZXR9IGZlZVBheWVyXG4gICAgICogQHJldHVybnMgUHJvbWlzZTxzdHJpbmc+XG4gICAgICovXG4gICAgZXhwb3J0IGNvbnN0IHJldHJ5R2V0T3JDcmVhdGUgPSBhc3luYyAoXG4gICAgICBtaW50OiBQdWJrZXksXG4gICAgICBvd25lcjogUHVia2V5LFxuICAgICAgZmVlUGF5ZXI6IFNlY3JldCxcbiAgICApOiBQcm9taXNlPHN0cmluZz4gPT4ge1xuICAgICAgbGV0IGNvdW50ZXIgPSAxO1xuICAgICAgd2hpbGUgKGNvdW50ZXIgPCBSRVRSWV9PVkVSX0xJTUlUKSB7XG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgY29uc3QgaW5zdCA9IGF3YWl0IGdldChtaW50LCBvd25lciwgZmVlUGF5ZXIsIHRydWUpO1xuXG4gICAgICAgICAgaWYgKGluc3QgJiYgdHlwZW9mIGluc3QgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICBkZWJ1Z0xvZygnIyBhc3NvY2lhdGVkVG9rZW5BY2NvdW50OiAnLCBpbnN0KTtcbiAgICAgICAgICAgIHJldHVybiBpbnN0O1xuICAgICAgICAgIH0gZWxzZSBpZiAoaW5zdCBpbnN0YW5jZW9mIFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb24pIHtcbiAgICAgICAgICAgIChhd2FpdCBpbnN0LnN1Ym1pdCgpKS5tYXAoXG4gICAgICAgICAgICAgIGFzeW5jIChvazogc3RyaW5nKSA9PiB7XG4gICAgICAgICAgICAgICAgYXdhaXQgTm9kZS5jb25maXJtZWRTaWcob2spO1xuICAgICAgICAgICAgICAgIHJldHVybiBpbnN0LmRhdGE7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIChlcnI6IEVycm9yKSA9PiB7XG4gICAgICAgICAgICAgICAgZGVidWdMb2coJyMgRXJyb3Igc3VibWl0IHJldHJ5R2V0T3JDcmVhdGU6ICcsIGVycik7XG4gICAgICAgICAgICAgICAgdGhyb3cgZXJyO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICBkZWJ1Z0xvZyhgIyByZXRyeTogJHtjb3VudGVyfSBjcmVhdGUgdG9rZW4gYWNjb3VudDogYCwgZSk7XG4gICAgICAgICAgZGVidWdMb2coYCMgbWludDogJHttaW50fSwgb3duZXI6ICR7b3duZXJ9LCBmZWVQYXllcjogJHtmZWVQYXllcn1gKTtcbiAgICAgICAgfVxuICAgICAgICBhd2FpdCBzbGVlcChSRVRSWV9TTEVFUF9USU1FKTtcbiAgICAgICAgY291bnRlcisrO1xuICAgICAgfVxuICAgICAgdGhyb3cgRXJyb3IoYHJldHJ5IGFjdGlvbiBpcyBvdmVyIGxpbWl0ICR7UkVUUllfT1ZFUl9MSU1JVH1gKTtcbiAgICB9O1xuXG4gICAgLyoqXG4gICAgICogW01haW4gbG9naWNdR2V0IEFzc29jaWF0ZWQgdG9rZW4gQWNjb3VudC5cbiAgICAgKiBpZiBub3QgY3JlYXRlZCwgY3JlYXRlIG5ldyB0b2tlbiBhY2NvdWludFxuICAgICAqXG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG1pbnRcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gb3duZXJcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gZmVlUGF5ZXJcbiAgICAgKiBAcmV0dXJucyBQcm9taXNlPHN0cmluZz5cbiAgICAgKi9cbiAgICBleHBvcnQgY29uc3QgbWFrZU9yQ3JlYXRlSW5zdHJ1Y3Rpb24gPSBhc3luYyAoXG4gICAgICBtaW50OiBQdWJrZXksXG4gICAgICBvd25lcjogUHV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ICAgICB9IGNhdGNoIChlcnJvcjogdW5rbm93bikge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuQWNjb3VudE5vdEZvdW5kRXJyb3IpICYmXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuSW52YWxpZEFjY291bnRPd25lckVycm9yKVxuICAgICAgICApIHtcbiAgICAgICAgICB0aHJvdyBFcnJvcignVW5leHBlY3RlZCBlcnJvcicpO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgcGF5ZXIgPSAhZmVlUGF5ZXIgPyBvd25lciA6IGZlZVBheWVyO1xuXG4gICAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVBc3NvY2lhdGVkVG9rZW5BY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgcGF5ZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdCxcbiAgICAgICAgfTtcbiAgICAgIH1cbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHsgS2V5cGFpciBhcyBPcmlnaW5hbCwgUHVibGljS2V5IH0gZnJvbSAnQHNvbGFuYS93ZWIzLmpzJztcbmltcG9ydCB7IFB1YmtleSwgU2VjcmV0IH0gZnJvbSAnfi90eXBlcy9hY2NvdW50JztcbmltcG9ydCBicyBmcm9tICdiczU4JztcblxuZXhwb3J0I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ICAgTVBMX0JVQkJMRUdVTV9QUk9HUkFNX0lELnRvUHVibGljS2V5KCksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGdldEJndW1TaWduZXIgPSAoKTogUHVibGljS2V5ID0+IHtcbiAgICAgIGNvbnN0IFtwdWJsaWNLZXldID0gUHVibGljS2V5LmZpbmRQcm9ncmFtQWRkcmVzc1N5bmMoXG4gICAgICAgIFtCdWZmZXIuZnJvbSgnY29sbGVjdGlvbl9jcGknLCAndXRmOCcpXSxcbiAgICAgICAgTVBMX0JVQkJMRUdVTV9QUk9HUkFNX0lELnRvUHVibGljS2V5KCksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGdldEFzc2V0SWQgPSAoYWRkcmVzczogUHVia2V5LCBsZWFmSW5kZXg6IG51bWJlcik6IFB1YmtleSA9PiB7XG4gICAgICBjb25zdCBub2RlID0gbmV3IEJOLkJOKGxlYWZJbmRleCk7XG4gICAgICBjb25zdCBbYXNzZXRJZF0gPSBQdWJsaWNLZXkuZmluZFByb2dyYW1BZGRyZXNzU3luYyhcbiAgICAgICAgW1xuICAgICAgICAgIEJ1ZmZlci5mcm9tKCdhc3NldCcsICd1dGY4JyksXG4gICAgICAgICAgYWRkcmVzcy50b1B1YmxpY0tleSgpLnRvQnVmZmVyKCksXG4gICAgICAgICAgVWludDhBcnJheS5mcm9tKG5vZGUudG9BcnJheSgnbGUnLCA4KSksXG4gICAgICAgIF0sXG4gICAgICAgIE1QTF9CVUJCTEVHVU1fUFJPR1JBTV9JRC50b1B1YmxpY0tleSgpLFxuICAgICAgKTtcbiAgICAgIHJldHVybiBhc3NldElkLnRvU3RyaW5nKCk7XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IEFjY291bnQgYXMgQXNzb2NpYXRlZCB9IGZyb20gJy4vYXNz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NvbGxlY3Rpb25NaW50IiwgIkNvbnZlcnRlciIsICJDcmVhdG9ycyIsICJDb252ZXJ0ZXIiLCAiQ29tcHJlc3NlZE5mdE1ldGFkYXRhIiwgIkNvbnZlcnRlciIsICJSb3lhbHR5IiwgIkNvbnZlcnRlciIsICJOZnQiLCAiQ29udmVydGVyIiwgIk1lbW8iLCAiQ29udmVydGVyIiwgIk1pbnQiLCAiQ29udmVydGVyIiwgIlJlZ3VsYXJOZnRNZXRhZGF0YSIsICJDb252ZXJ0ZXIiLCAiUHJvcGVydGllcyIsICJDb252ZXJ0ZXIiLCAiVXNlcyIsICJDb252ZXJ0ZXIiLCAiVG9rZW5NZXRhZGF0YSIsICJDb252ZXJ0ZXIiLCAiVHJhbnNmZXJDaGVja2VkIiwgIkNvbnZlcnRlciIsICJUcmFuc2ZlciIsICJDb252ZXJ0ZXIiLCAiVmFsaWRhdG9yIiwgIk1lc3NhZ2UiLCAiQ29udmVydGVyIl0KfQo= \ No newline at end of file diff --git a/packages/validator/dist/index.mjs b/packages/validator/dist/index.mjs index 18cffc6e7..ca4a01434 100644 --- a/packages/validator/dist/index.mjs +++ b/packages/validator/dist/index.mjs @@ -1,4 +1,4 @@ -// ../shared/src/constants.ts +// ../suite-utils/src/constants.ts import { PublicKey } from "@solana/web3.js"; import SolanaJsonConfig from "@solana-suite/config/load"; var Config = SolanaJsonConfig; @@ -280,56 +280,6 @@ var TransactionBuilder; TransactionBuilder7.Common = Common2; })(TransactionBuilder || (TransactionBuilder = {})); -// ../shared/src/shared.ts -var overwriteObject = (object, targets) => { - const that = object; - targets.forEach((target) => { - delete that[target.existsKey]; - that[target.will.key] = target.will.value; - }); - return that; -}; -var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { - if (Constants.isDebugging === "true" || process.env.DEBUG === "true") { - console.log("[DEBUG]", data1, data2, data3, data4); - } -}; -var sleep = async (sec) => { - return new Promise((r) => setTimeout(r, sec * 1e3)); -}; -var isPromise = (obj) => { - return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; -}; -function Try(input, finallyInput) { - try { - const v = input(); - if (isPromise(v)) { - return v.then( - (x) => Result.ok(x), - (err) => Result.err(err) - ); - } else { - return Result.ok(v); - } - } catch (e) { - if (e instanceof Error) { - return Result.err(e); - } - return Result.err(Error(e)); - } finally { - if (finallyInput) { - debugLog("# finally input:", finallyInput); - finallyInput(); - } - } -} -var convertTimestampToDateTime = (created_at) => { - if (created_at) { - return new Date(created_at * 1e3); - } - return; -}; - // ../transaction-builder/src/batch.ts var TransactionBuilder2; ((TransactionBuilder7) => { @@ -797,7 +747,57 @@ var TransactionBuilder6 = { ...TransactionBuilder4 }; -// ../shared/src/result.ts +// ../suite-utils/src/shared.ts +var overwriteObject = (object, targets) => { + const that = object; + targets.forEach((target) => { + delete that[target.existsKey]; + that[target.will.key] = target.will.value; + }); + return that; +}; +var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { + if (Constants.isDebugging === "true" || process.env.DEBUG === "true") { + console.log("[DEBUG]", data1, data2, data3, data4); + } +}; +var sleep = async (sec) => { + return new Promise((r) => setTimeout(r, sec * 1e3)); +}; +var isPromise = (obj) => { + return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; +}; +function Try(input, finallyInput) { + try { + const v = input(); + if (isPromise(v)) { + return v.then( + (x) => Result.ok(x), + (err) => Result.err(err) + ); + } else { + return Result.ok(v); + } + } catch (e) { + if (e instanceof Error) { + return Result.err(e); + } + return Result.err(Error(e)); + } finally { + if (finallyInput) { + debugLog("# finally input:", finallyInput); + finallyInput(); + } + } +} +var convertTimestampToDateTime = (created_at) => { + if (created_at) { + return new Date(created_at * 1e3); + } + return; +}; + +// ../suite-utils/src/result.ts var AbstractResult = class { unwrap(ok, err) { const r = this._chain( @@ -909,15 +909,15 @@ var InternalErr = class extends AbstractResult { } }; var Result; -((Result7) => { +((Result8) => { function ok(value) { return new InternalOk(value); } - Result7.ok = ok; + Result8.ok = ok; function err(error) { return new InternalErr(error || Error()); } - Result7.err = err; + Result8.err = err; function all(obj) { if (Array.isArray(obj)) { const resArr = []; @@ -927,7 +927,7 @@ var Result; } resArr.push(item.value); } - return Result7.ok(resArr); + return Result8.ok(resArr); } const res = {}; const keys = Object.keys(obj); @@ -938,9 +938,9 @@ var Result; } res[key] = item.value; } - return Result7.ok(res); + return Result8.ok(res); } - Result7.all = all; + Result8.all = all; })(Result || (Result = {})); // ../converter/src/collection.ts @@ -1512,4 +1512,4 @@ export { Validator, ValidatorError }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vc2hhcmVkL3NyYy9jb25zdGFudHMudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvYmF0Y2gudHMiLCAiLi4vLi4vbm9kZS9zcmMvaW5kZXgudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY29tbW9uLnRzIiwgIi4uLy4uL3NoYXJlZC9zcmMvc2hhcmVkLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL21pbnQudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvcGFydGlhbC1zaWduLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2NhbGN1bGF0ZS10eHNpemUudHMiLCAiLi4vLi4vZ2xvYmFsL3NyYy9pbmRleC50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9hc3NvY2lhdGVkLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2tleXBhaXIudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvcGRhLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3NoYXJlZC9zcmMvcmVzdWx0LnRzIiwgIi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pLmdldExhdGVzdEJsb2NraGFzaCgpO1xuICAgICAgICB0cmFuc2FjdGlvbi5sYXN0VmFsaWRCbG9ja0hlaWdodCA9IGJsb2NraGFzaE9iai5sYXN0VmFsaWRCbG9ja0hlaWdodDtcbiAgICAgICAgdHJhbnNhY3Rpb24ucmVjZW50QmxvY2toYXNoID0gYmxvY2toYXNoT2JqLmJsb2NraGFzaDtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHRoaXMuc2lnbmVycztcblxuICAgICAgICBpZiAodGhpcy5mZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gdGhpcy5mZWVQYXllci5wdWJsaWNLZXk7XG4gICAgICAgICAgZmluYWxTaWduZXJzID0gW3RoaXMuZmVlUGF5ZXIsIC4uLnRoaXMuc2lnbmVyc107XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLmluc3RydWN0aW9ucy5mb3JFYWNoKChpbnN0KSA9PiB0cmFuc2FjdGlvbi5hZGQoaW5zdCkpO1xuXG4gICAgICAgIGNvbnN0IG9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IE1BWF9SRVRSSUVTLFxuICAgICAgICB9O1xuXG4gICAgICAgIHJldHVybiBhd2FpdCBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uKFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICBvcHRpb25zLFxuICAgICAgICApO1xuICAgICAgfSk7XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IEFueU9iamVjdCB9IGZyb20gJ34vdHlwZXMvc2hhcmVkJztcbmltcG9ydCB7IENvbnN0YW50cyB9IGZyb20gJy4vY29uc3RhbnRzJztcbmltcG9ydCB7IFJlc3VsdCB9IGZyb20gJy4vcmVzdW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CBtYWtlT3JDcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIG5ldyBLZXlwYWlyLktleXBhaXIoeyBzZWNyZXQ6IGZlZVBheWVyIH0pLnB1YmtleSxcbiAgICAgICAgYWxsb3dPd25lck9mZkN1cnZlLFxuICAgICAgKTtcblxuICAgICAgaWYgKCFyZXMuaW5zdCkge1xuICAgICAgICByZXR1cm4gcmVzLnRva2VuQWNjb3VudDtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uPFB1YmtleT4oXG4gICAgICAgIFtyZXMuaW5zdF0sXG4gICAgICAgIFtdLFxuICAgICAgICBmZWVQYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgcmVzLnRva2VuQWNjb3VudCEsXG4gICAgICApO1xuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiBSZXRyeSBmdW5jdGlvbiBpZiBjcmVhdGUgbmV3IHRva2VuIGFjY291aW50XG4gICAgICpcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gbWludFxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBvd25lclxuICAgICAqIEBwYXJhbSB7U2VjcmV0fSBmZWVQYXllclxuICAgICAqIEByZXR1cm5zIFByb21pc2U8c3RyaW5nPlxuICAgICAqL1xuICAgIGV4cG9ydCBjb25zdCByZXRyeUdldE9yQ3JlYXRlID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyOiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxzdHJpbmc+ID0+IHtcbiAgICAgIGxldCBjb3VudGVyID0gMTtcbiAgICAgIHdoaWxlIChjb3VudGVyIDwgUkVUUllfT1ZFUl9MSU1JVCkge1xuICAgICAgICB0cnkge1xuICAgICAgICAgIGNvbnN0IGluc3QgPSBhd2FpdCBnZXQobWludCwgb3duZXIsIGZlZVBheWVyLCB0cnVlKTtcblxuICAgICAgICAgIGlmIChpbnN0ICYmIHR5cGVvZiBpbnN0ID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgaW5zdCk7XG4gICAgICAgICAgICByZXR1cm4gaW5zdDtcbiAgICAgICAgICB9IGVsc2UgaWYgKGluc3QgaW5zdGFuY2VvZiBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uKSB7XG4gICAgICAgICAgICAoYXdhaXQgaW5zdC5zdWJtaXQoKSkubWFwKFxuICAgICAgICAgICAgICBhc3luYyAob2s6IHN0cmluZykgPT4ge1xuICAgICAgICAgICAgICAgIGF3YWl0IE5vZGUuY29uZmlybWVkU2lnKG9rKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gaW5zdC5kYXRhO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAoZXJyOiBFcnJvcikgPT4ge1xuICAgICAgICAgICAgICAgIGRlYnVnTG9nKCcjIEVycm9yIHN1Ym1pdCByZXRyeUdldE9yQ3JlYXRlOiAnLCBlcnIpO1xuICAgICAgICAgICAgICAgIHRocm93IGVycjtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgZGVidWdMb2coYCMgcmV0cnk6ICR7Y291bnRlcn0gY3JlYXRlIHRva2VuIGFjY291bnQ6IGAsIGUpO1xuICAgICAgICAgIGRlYnVnTG9nKGAjIG1pbnQ6ICR7bWludH0sIG93bmVyOiAke293bmVyfSwgZmVlUGF5ZXI6ICR7ZmVlUGF5ZXJ9YCk7XG4gICAgICAgIH1cbiAgICAgICAgYXdhaXQgc2xlZXAoUkVUUllfU0xFRVBfVElNRSk7XG4gICAgICAgIGNvdW50ZXIrKztcbiAgICAgIH1cbiAgICAgIHRocm93IEVycm9yK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2VuQWNjb3VudDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG1pbnQudG9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dW5kZWZpbmVkLFxuICAgICAgY2FsbGJhY2tGdW5jOiAoXG4gICAgICAgIGZpbGVQYXRoOiBGaWxlVHlwZSxcbiAgICAgICAgc3RvcmFnZVR5cGU6IFN0b3JhZ2VUeXBlLFxuICAgICAgICBmZWVQYXllcj86IFNlY3JldCxcbiAgICAgICkgPT4gUHJvbWlzZTxSZXN1bHQ8c3RyaW5nLCBFcnJvcj4+LFxuICAgICAgc3RvcmFnZVR5cGU6IFN0b3JhZ2VUeXBlLFxuICAgICAgZmVlUGF5ZXI/OiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxQcm9wZXJ0aWVzPiA9PiB7XG4gICAgICBpZiAoIWlucHV0IHx8ICFpbnB1dC5maWxlcykge1xuICAgICAgICByZXR1cm4ge307XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGZpbGVzID0gYXdhaXQgUHJvbWlzZS5hbGwoXG4gICAgICAgIGlucHV0LmZpbGVzLm1hcChhc3luYyAoZmlsZSkgPT4ge1xuICAgICAgICAgIGlmICghZmlsZS5maWxlUGF0aCkge1xuICAgICAgICAgICAgcmV0dXJuIHt9O1xuICAgICAgICAgIH1cbiAgICAgICAgICBjb25zdCByZXMgPSBhd2FpdCBjYWxsYmFja0Z1bmMoZmlsZS5maWxlUGF0aCwgc3RvcmFnZVR5cGUsIGZlZVBheWVyKTtcbiAgICAgICAgICBpZiAocmVzLmlzRXJyKSB7XG4gICAgICAgICAgICB0aHJvdyBFcnJvcihyZXMuZXJyb3IubWVzc2FnZSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBvdmVyd3JpdGVPYmplY3QoZmlsZSwgW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBleGlzdHNLZXk6ICdmaWxlUGF0aCcsXG4gICAgICAgICAgICAgIHdpbGw6IHsga2V5OiAndXJpJywgdmFsdWU6IHJlcy52YWx1ZSB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICBdKTtcbiAgICAgICAgfSksXG4g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TWV0YWRhdGEiLCAiQ29udmVydGVyIiwgIlRyYW5zZmVyQ2hlY2tlZCIsICJDb252ZXJ0ZXIiLCAiVHJhbnNmZXIiLCAiQ29udmVydGVyIiwgIlZhbGlkYXRvciIsICJNZXNzYWdlIiwgIkNvbnZlcnRlciJdCn0K \ No newline at end of file +//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9iYXRjaC50cyIsICIuLi8uLi9ub2RlL3NyYy9pbmRleC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jb21tb24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvbWludC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9wYXJ0aWFsLXNpZ24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY2FsY3VsYXRlLXR4c2l6ZS50cyIsICIuLi8uLi9nbG9iYWwvc3JjL2luZGV4LnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2Fzc29jaWF0ZWQudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMva2V5cGFpci50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9wZGEudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvaW5kZXgudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvaW5kZXgudHMiLCAiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL3NoYXJlZC50cyIsICIuLi8uLi9zdWl0ZS11dGlscy9zcmMvcmVzdWx0LnRzIiwgIi4uLy4uL2NvbnZlcnRlci9zcmMvY29sbGVjdGlvbi50cyIsICIuLi8uLi9jb252ZXJ0ZXIvc3JjL2NyZWF0b3JzLnRzIiwgIi4uLy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cGFjZSBBc3NvY2lhdGVkIHtcbiAgICBjb25zdCBSRVRSWV9PVkVSX0xJTUlUID0gMTA7XG4gICAgY29uc3QgUkVUUllfU0xFRVBfVElNRSA9IDM7XG4gICAgLy9AaW50ZXJuYWxcbiAgICBjb25zdCBnZXQgPSBhc3luYyAoXG4gICAgICBtaW50OiBQdWJrZXksXG4gICAgICBvd25lcjogUHVia2V5LFxuICAgICAgZmVlUGF5ZXI6IFNlY3JldCxcbiAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSA9IGZhbHNlLFxuICAgICk6IFByb21pc2U8c3RyaW5nIHwgQ29tbW9uU3RydWN0dXJlPFB1YmtleT4+ID0+IHtcbiAgICAgIGNvbnN0IHJlcyA9IGF3YWl0IG1ha2VPckNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICBtaW50LFxuICAgICAgICBvd25lcixcbiAgICAgICAgbmV3IEtleXBhaXIuS2V5cGFpcih7IHNlY3JldDogZmVlUGF5ZXIgfSkucHVia2V5LFxuICAgICAgICBhbGxvd093bmVyT2ZmQ3VydmUsXG4gICAgICApO1xuXG4gICAgICBpZiAoIXJlcy5pbnN0KSB7XG4gICAgICAgIHJldHVybiByZXMudG9rZW5BY2NvdW50O1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb248UHVia2V5PihcbiAgICAgICAgW3Jlcy5pbnN0XSxcbiAgICAgICAgW10sXG4gICAgICAgIGZlZVBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICByZXMudG9rZW5BY2NvdW50ISxcbiAgICAgICk7XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIFJldHJ5IGZ1bmN0aW9uIGlmIGNyZWF0ZSBuZXcgdG9rZW4gYWNjb3VpbnRcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBtaW50XG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAgICogQHBhcmFtIHtTZWNyZXR9IGZlZVBheWVyXG4gICAgICogQHJldHVybnMgUHJvbWlzZTxzdHJpbmc+XG4gICAgICovXG4gICAgZXhwb3J0IGNvbnN0IHJldHJ5R2V0T3JDcmVhdGUgPSBhc3luYyAoXG4gICAgICBtaW50OiBQdWJrZXksXG4gICAgICBvd25lcjogUHVia2V5LFxuICAgICAgZmVlUGF5ZXI6IFNlY3JldCxcbiAgICApOiBQcm9taXNlPHN0cmluZz4gPT4ge1xuICAgICAgbGV0IGNvdW50ZXIgPSAxO1xuICAgICAgd2hpbGUgKGNvdW50ZXIgPCBSRVRSWV9PVkVSX0xJTUlUKSB7XG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgY29uc3QgaW5zdCA9IGF3YWl0IGdldChtaW50LCBvd25lciwgZmVlUGF5ZXIsIHRydWUpO1xuXG4gICAgICAgICAgaWYgKGluc3QgJiYgdHlwZW9mIGluc3QgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICBkZWJ1Z0xvZygnIyBhc3NvY2lhdGVkVG9rZW5BY2NvdW50OiAnLCBpbnN0KTtcbiAgICAgICAgICAgIHJldHVybiBpbnN0O1xuICAgICAgICAgIH0gZWxzZSBpZiAoaW5zdCBpbnN0YW5jZW9mIFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb24pIHtcbiAgICAgICAgICAgIChhd2FpdCBpbnN0LnN1Ym1pdCgpKS5tYXAoXG4gICAgICAgICAgICAgIGFzeW5jIChvazogc3RyaW5nKSA9PiB7XG4gICAgICAgICAgICAgICAgYXdhaXQgTm9kZS5jb25maXJtZWRTaWcob2spO1xuICAgICAgICAgICAgICAgIHJldHVybiBpbnN0LmRhdGE7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIChlcnI6IEVycm9yKSA9PiB7XG4gICAgICAgICAgICAgICAgZGVidWdMb2coJyMgRXJyb3Igc3VibWl0IHJldHJ5R2V0T3JDcmVhdGU6ICcsIGVycik7XG4gICAgICAgICAgICAgICAgdGhyb3c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vciBpbnN0YW5jZW9mIFRva2VuSW52YWxpZEFjY291bnRPd25lckVycm9yKVxuICAgICAgICApIHtcbiAgICAgICAgICB0aHJvdyBFcnJvcignVW5leHBlY3RlZCBlcnJvcicpO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgcGF5ZXIgPSAhZmVlUGF5ZXIgPyBvd25lciA6IGZlZVBheWVyO1xuXG4gICAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVBc3NvY2lhdGVkVG9rZW5BY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgcGF5ZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdCxcbiAgICAgICAgfTtcbiAgICAgIH1cbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHsgS2V5cGFpciBhcyBPcmlnaW5hbCwgUHVibGljS2V5IH0gZnJvbSAnQHNvbGFuYS93ZWIzLmpzJztcbmltcG9ydCB7IFB1YmtleSwgU2VjcmV0IH0gZnJvbSAnfi90eXBlcy9hY2NvdW50JztcbmltcG9ydCBicyBmcm9tICdiczU4JztcblxuZXhwb3J0IG5hbWVzcGFjZSBBY2NvdW50IHtcbiAgZXhwb3J0IGNsYXNzIEtleXBhaXIge1xuICAgIHNlY3JldDogU2VjcmV0O1xuICAgIHB1YmtleTogUHVia2V5O1xuXG4gICAgY29uc3RydWN0b3IocGFyYW1zOiB7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JvbSgnbWV0YWRhdGEnKSxcbiAgICAgICAgICBQUk9HUkFNX0lELnRvQnVmZmVyKCksXG4gICAgICAgICAgYWRkcmVzcy50b1B1YmxpY0tleSgpLnRvQnVmZmVyKCksXG4gICAgICAgIF0sXG4gICAgICAgIFBST0dSQU1fSUQsXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGdldE1hc3RlckVkaXRpb24gPSAoYWRkcmVzczogUHVia2V5KTogUHVibGljS2V5ID0+IHtcbiAgICAgIGNvbnN0IFtwdWJsaWNLZXldID0gUHVibGljS2V5LmZpbmRQcm9ncmFtQWRkcmVzc1N5bmMoXG4gICAgICAgIFtcbiAgICAgICAgICBCdWZmZXIuZnJvbSgnbWV0YWRhdGEnKSxcbiAgICAgICAgICBQUk9HUkFNX0lELnRvQnVmZmVyKCksXG4gICAgICAgICAgYWRkcmVzcy50b1B1YmxpY0tleSgpLnRvQnVmZmVyKCksXG4gICAgICAgICAgQnVmZmVyLmZyb20oJ2VkaXRpb24nKSxcbiAgICAgICAgXSxcbiAgICAgICAgUFJPR1JBTV9JRCxcbiAgICAgICk7XG4gICAgICByZXR1cm4gcHVibGljS2V5O1xuICAgIH07XG5cbiAgICBleHBvcnQgY29uc3QgZ2V0VHJlZUF1dGhvcml0eSA9IChhZGRyZXNzOiBQdWJrZXkpOiBQdWJsaWNLZXkgPT4ge1xuICAgICAgY29uc3QgW3B1YmxpY0tleV0gPSBQdWJsaWNLZXkuZmluZFByb2dyYW1BZGRyZXNzU3luYyhcbiAgICAgICAgW2FkZHJlc3MudG9QdWJsaWNLZXkoKS50b0J1ZmZlcigpXSxcbiAgICAgICAgTVBMX0JVQkJMRUdVTV9QUk9HUkFNX0lELnRvUHVibGljS2V5KCksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGdldEJndW1TaWduZ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wZTogU3RvcmFnZVR5cGUsXG4gICAgICAgIGZlZVBheWVyPzogU2VjcmV0LFxuICAgICAgKSA9PiBQcm9taXNlPFJlc3VsdDxzdHJpbmcsIEVycm9yPj4sXG4gICAgICBzdG9yYWdlVHlwZTogU3RvcmFnZVR5cGUsXG4gICAgICBmZWVQYXllcj86IFNlY3JldCxcbiAgICApOiBQcm9taXNlPFByb3BlcnRpZXM+ID0+IHtcbiAgICAgIGlmICghaW5wdXQgfHwgIWlucHV0LmZpbGVzKSB7XG4gICAgICAgIHJldHVybiB7fTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgZmlsZXMgPSBhd2FpdCBQcm9taXNlLmFsbChcbiAgICAgICAgaW5wdXQuZmlsZXMubWFwKGFzeW5jIChmaWxlKSA9PiB7XG4gICAgICAgICAgaWYgKCFmaWxlLmZpbGVQYXRoKSB7XG4gICAgICAgICAgICByZXR1cm4ge307XG4gICAgICAgICAgfVxuICAgICAgICAgIGNvbnN0IHJlcyA9IGF3YWl0IGNhbGxiYWNrRnVuYyhmaWxlLmZpbGVQYXRoLCBzdG9yYWdlVHlwZSwgZmVlUGF5ZXIpO1xuICAgICAgICAgIGlmIChyZXMuaXNFcnIpIHtcbiAgICAgICAgICAgIHRocm93IEVycm9yKHJlcy5lcnJvci5tZXNzYWdlKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgcmV0dXJuIG92ZXJ3cml0ZU9iamVjdChmaWxlLCBbXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGV4aXN0c0tleTogJ2ZpbGVQYXRoJyxcbiAgICAgICAgICAgICAgd2lsbDogeyBrZXk6ICd1cmknLCB2YWx1ZTogcmVzLnZhbHVlIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgIF0pO1xuICAgICAgICB9KSxcbiAgICAgICk7XG4gICAgICByZXR1cm4geyAuLi5pbnB1dCwgZmlsZXMgfSBhcyBQcm9wZXJ0aWVzO1xuICAgIH07XG4gIH1cbn1cbiIsICIvKiBl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yA9IE9iamVjdC5rZXlzKG1ldGFkYXRhKTtcbiAgICAgIGNvbnN0IHJlc3VsdHM6IERldGFpbHNbXSA9IFtdO1xuICAgICAga2V5cy5tYXAoKGtleSkgPT4ge1xuICAgICAgICBsZXQgcmVzITogUmVzdWx0PHN0cmluZywgVmFsaWRhdG9yRXJyb3I+O1xuICAgICAgICBzd2l0Y2ggKGtleSkge1xuICAgICAgICAgIGNhc2UgJ2ltYWdlJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuaW1hZ2UpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNJbWFnZVVybChtZXRhZGF0YS5pbWFnZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdyb3lhbHR5JzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEucm95YWx0eSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1JveWFsdHkobWV0YWRhdGEucm95YWx0eSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXR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cnRlciIsICJWYWxpZGF0b3IiLCAiTWVzc2FnZSIsICJDb252ZXJ0ZXIiXQp9Cg== \ No newline at end of file diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c055dc174..bcf65a2f4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -143,6 +143,9 @@ importers: '@metaplex-foundation/mpl-token-metadata': specifier: ^2.13.0 version: 2.13.0 + '@solana-suite/utils': + specifier: workspace:* + version: link:../suite-utils '@solana/web3.js': specifier: ^1.78.5 version: 1.87.1 @@ -262,40 +265,6 @@ importers: specifier: workspace:* version: link:../build-configs/tsup - packages/shared: - dependencies: - '@solana-suite/config': - specifier: workspace:* - version: link:../suite-config - '@solana/web3.js': - specifier: ^1.78.5 - version: 1.87.1 - commander: - specifier: 9.3.0 - version: 9.3.0 - devDependencies: - '@types/jsdom': - specifier: ^21.1.3 - version: 21.1.3 - build-configs/ava: - specifier: workspace:* - version: link:../build-configs/ava - build-configs/eslint: - specifier: workspace:* - version: link:../build-configs/eslint - build-configs/prettier: - specifier: workspace:* - version: link:../build-configs/prettier - build-configs/tsconfig: - specifier: workspace:* - version: link:../build-configs/tsconfig - build-configs/tsup: - specifier: workspace:* - version: link:../build-configs/tsup - jsdom: - specifier: ^22.1.0 - version: 22.1.0 - packages/storage: dependencies: '@irys/sdk': @@ -329,33 +298,9 @@ importers: packages/suite-airdrop: dependencies: - '@metaplex-foundation/mpl-bubblegum': - specifier: ^3.0.0 - version: 3.0.0(@metaplex-foundation/umi@0.8.10) - '@metaplex-foundation/mpl-token-metadata': - specifier: ^2.13.0 - version: 2.13.0 - '@solana-suite/config': - specifier: workspace:^ - version: link:../suite-config - '@solana/spl-token': - specifier: ^0.3.8 - version: 0.3.8(@solana/web3.js@1.87.1) '@solana/web3.js': specifier: ^1.78.5 version: 1.87.1 - bignumber.js: - specifier: ^9.1.2 - version: 9.1.2 - bn.js: - specifier: ^5.2.1 - version: 5.2.1 - bs58: - specifier: ^4.0.1 - version: 4.0.1 - mpl-bubblegum-instruction: - specifier: github:atonoy/mpl-bubblegum-instructions - version: github.com/atonoy/mpl-bubblegum-instructions/00f20bb7ed5ddc28e74056afd539a23257f04178 devDependencies: build-configs/eslint: specifier: workspace:* @@ -379,7 +324,7 @@ importers: specifier: ^0.0.3 version: 0.0.3(arweave@1.14.4) '@metaplex-foundation/mpl-bubblegum': - specifier: ^3.0.0 + specifier: 3.0.0 version: 3.0.0(@metaplex-foundation/umi@0.8.10) '@metaplex-foundation/mpl-token-metadata': specifier: ^2.13.0 @@ -804,6 +749,37 @@ importers: specifier: workspace:* version: link:../test-tools + packages/suite-utils: + dependencies: + '@solana-suite/config': + specifier: workspace:* + version: link:../suite-config + '@solana/web3.js': + specifier: ^1.78.5 + version: 1.87.6 + devDependencies: + '@types/jsdom': + specifier: ^21.1.3 + version: 21.1.3 + build-configs/ava: + specifier: workspace:* + version: link:../build-configs/ava + build-configs/eslint: + specifier: workspace:* + version: link:../build-configs/eslint + build-configs/prettier: + specifier: workspace:* + version: link:../build-configs/prettier + build-configs/tsconfig: + specifier: workspace:* + version: link:../build-configs/tsconfig + build-configs/tsup: + specifier: workspace:* + version: link:../build-configs/tsup + jsdom: + specifier: ^22.1.0 + version: 22.1.0 + packages/test-tools: dependencies: '@solana/web3.js': @@ -1875,7 +1851,7 @@ packages: resolution: {integrity: sha512-B1L94N3ZGMo53b0uOSoznbuM5GBNJ8LwSeznxBxJ+OThvfHQ4B5oMUqb+0zdLRfkKGS7Q6tpHK9P+QK0j3w2cQ==} dependencies: '@metaplex-foundation/beet': 0.7.1 - '@solana/web3.js': 1.87.1 + '@solana/web3.js': 1.87.6 bs58: 5.0.0 debug: 4.3.4 transitivePeerDependencies: @@ -1916,7 +1892,7 @@ packages: '@metaplex-foundation/mpl-token-metadata': 3.0.0-alpha.27(@metaplex-foundation/umi@0.8.10) '@metaplex-foundation/mpl-toolbox': 0.9.1(@metaplex-foundation/umi@0.8.10) '@metaplex-foundation/umi': 0.8.10 - '@noble/hashes': 1.3.2 + '@noble/hashes': 1.3.3 merkletreejs: 0.3.10 dev: false @@ -2279,7 +2255,7 @@ packages: engines: {node: '>= 10'} dependencies: '@solana/buffer-layout': 4.0.1 - '@solana/web3.js': 1.87.1 + '@solana/web3.js': 1.87.6 bigint-buffer: 1.1.5 bignumber.js: 9.1.2 transitivePeerDependencies: @@ -2340,7 +2316,7 @@ packages: engines: {node: '>= 10'} dependencies: '@babel/runtime': 7.23.2 - '@solana/web3.js': 1.87.1 + '@solana/web3.js': 1.87.6 bn.js: 5.2.1 buffer: 6.0.3 buffer-layout: 1.2.2 @@ -2775,6 +2751,7 @@ packages: /abab@2.0.6: resolution: {integrity: sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==} + deprecated: Use your platform's native atob() and btoa() methods instead dev: true /abort-controller@3.0.0: @@ -3980,6 +3957,7 @@ packages: /domexception@4.0.0: resolution: {integrity: sha512-A2is4PLG+eeSfoTMA95/s4pvAoSo2mKtiM5jlHkAVewmiO8ISFTFKZjH7UAM1Atli/OT/7JHOrJRJiMKUZKYBw==} engines: {node: '>=12'} + deprecated: Use your platform's native DOMException instead dependencies: webidl-conversions: 7.0.0 dev: true @@ -5721,7 +5699,7 @@ packages: whatwg-encoding: 2.0.0 whatwg-mimetype: 3.0.0 whatwg-url: 12.0.1 - ws: 8.14.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) + ws: 8.15.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) xml-name-validator: 4.0.0 transitivePeerDependencies: - bufferutil @@ -7424,7 +7402,7 @@ packages: engines: {node: '>=6'} dependencies: psl: 1.9.0 - punycode: 2.3.0 + punycode: 2.3.1 universalify: 0.2.0 url-parse: 1.5.10 dev: true @@ -7443,7 +7421,7 @@ packages: resolution: {integrity: sha512-2lv/66T7e5yNyhAAC4NaKe5nVavzuGJQVVtRYLyQ2OI8tsJ61PMLlelehb0wi2Hx6+hT/OJUWZcw8MjlSRnxvw==} engines: {node: '>=14'} dependencies: - punycode: 2.3.0 + punycode: 2.3.1 dev: true /tree-kill@1.2.2: @@ -8038,6 +8016,7 @@ packages: dependencies: bufferutil: 4.0.8 utf-8-validate: 5.0.10 + dev: false /ws@8.15.1(bufferutil@4.0.8)(utf-8-validate@5.0.10): resolution: {integrity: sha512-W5OZiCjXEmk0yZ66ZN82beM5Sz7l7coYxpRkzS+p9PP+ToQry8szKh+61eNktr7EA9DOwvFGhfC605jDHbP6QQ==} @@ -8053,7 +8032,6 @@ packages: dependencies: bufferutil: 4.0.8 utf-8-validate: 5.0.10 - dev: false /xml-name-validator@4.0.0: resolution: {integrity: sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==} From 51adb092ac18dab6443461515361e13291297908 Mon Sep 17 00:00:00 2001 From: fukaoi Date: Fri, 2 Feb 2024 22:20:51 +0900 Subject: [PATCH 05/15] wip --- packages/account/dist/index.d.mts | 82 +++++++++++++++++++ packages/account/dist/index.d.ts | 82 +++++++++++++++++++ packages/das-api/dist/index.js | 9 +- packages/das-api/dist/index.mjs | 9 +- packages/das-api/src/find.ts | 7 +- packages/suite-compressed-nft/dist/index.js | 9 +- packages/suite-compressed-nft/dist/index.mjs | 9 +- .../suite-compressed-nft/test/find.test.ts | 2 +- 8 files changed, 194 insertions(+), 15 deletions(-) create mode 100644 packages/account/dist/index.d.mts create mode 100644 packages/account/dist/index.d.ts diff --git a/packages/account/dist/index.d.mts b/packages/account/dist/index.d.mts new file mode 100644 index 000000000..cf7f8126b --- /dev/null +++ b/packages/account/dist/index.d.mts @@ -0,0 +1,82 @@ +import { TransactionInstruction, PublicKey, Keypair } from '@solana/web3.js'; + +declare const pubKeyNominality: unique symbol; +declare const secretNominality: unique symbol; +type Pubkey = (string & { + [pubKeyNominality]: never; +}) | string; +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 + */ +declare namespace Account$3 { + namespace Associated { + /** + * Retry function if create new token accouint + * + * @param {Pubkey} mint + * @param {Pubkey} owner + * @param {Secret} feePayer + * @returns Promise + */ + const retryGetOrCreate: (mint: Pubkey, owner: Pubkey, feePayer: Secret) => Promise; + /** + * [Main logic]Get Associated token Account. + * if not created, create new token accouint + * + * @param {Pubkey} mint + * @param {Pubkey} owner + * @param {Pubkey} feePayer + * @returns Promise + */ + const makeOrCreateInstruction: (mint: Pubkey, owner: Pubkey, feePayer?: Pubkey, allowOwnerOffCurve?: boolean) => Promise<{ + tokenAccount: string; + inst: TransactionInstruction | undefined; + }>; + } +} + +declare namespace Account$2 { + class Keypair { + secret: Secret; + pubkey: Pubkey; + constructor(params: { + pubkey?: Pubkey; + secret: Secret; + }); + toPublicKey(): PublicKey; + toKeypair(): Keypair; + static isPubkey: (value: string) => value is Pubkey; + static isSecret: (value: string) => value is Secret; + static create: () => Keypair; + static toKeyPair: (keypair: Keypair) => Keypair; + } +} + +declare namespace Account$1 { + namespace Pda { + const getMetadata: (address: Pubkey) => PublicKey; + const getMasterEdition: (address: Pubkey) => PublicKey; + const getTreeAuthority: (address: Pubkey) => PublicKey; + const getBgumSigner: () => PublicKey; + const getAssetId: (address: Pubkey, leafIndex: number) => Pubkey; + } +} + +declare const Account: { + Pda: typeof Account$1.Pda; + Keypair: typeof Account$2.Keypair; + Associated: typeof Account$3.Associated; +}; + +export { Account }; diff --git a/packages/account/dist/index.d.ts b/packages/account/dist/index.d.ts new file mode 100644 index 000000000..cf7f8126b --- /dev/null +++ b/packages/account/dist/index.d.ts @@ -0,0 +1,82 @@ +import { TransactionInstruction, PublicKey, Keypair } from '@solana/web3.js'; + +declare const pubKeyNominality: unique symbol; +declare const secretNominality: unique symbol; +type Pubkey = (string & { + [pubKeyNominality]: never; +}) | string; +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 + */ +declare namespace Account$3 { + namespace Associated { + /** + * Retry function if create new token accouint + * + * @param {Pubkey} mint + * @param {Pubkey} owner + * @param {Secret} feePayer + * @returns Promise + */ + const retryGetOrCreate: (mint: Pubkey, owner: Pubkey, feePayer: Secret) => Promise; + /** + * [Main logic]Get Associated token Account. + * if not created, create new token accouint + * + * @param {Pubkey} mint + * @param {Pubkey} owner + * @param {Pubkey} feePayer + * @returns Promise + */ + const makeOrCreateInstruction: (mint: Pubkey, owner: Pubkey, feePayer?: Pubkey, allowOwnerOffCurve?: boolean) => Promise<{ + tokenAccount: string; + inst: TransactionInstruction | undefined; + }>; + } +} + +declare namespace Account$2 { + class Keypair { + secret: Secret; + pubkey: Pubkey; + constructor(params: { + pubkey?: Pubkey; + secret: Secret; + }); + toPublicKey(): PublicKey; + toKeypair(): Keypair; + static isPubkey: (value: string) => value is Pubkey; + static isSecret: (value: string) => value is Secret; + static create: () => Keypair; + static toKeyPair: (keypair: Keypair) => Keypair; + } +} + +declare namespace Account$1 { + namespace Pda { + const getMetadata: (address: Pubkey) => PublicKey; + const getMasterEdition: (address: Pubkey) => PublicKey; + const getTreeAuthority: (address: Pubkey) => PublicKey; + const getBgumSigner: () => PublicKey; + const getAssetId: (address: Pubkey, leafIndex: number) => Pubkey; + } +} + +declare const Account: { + Pda: typeof Account$1.Pda; + Keypair: typeof Account$2.Keypair; + Associated: typeof Account$3.Associated; +}; + +export { Account }; diff --git a/packages/das-api/dist/index.js b/packages/das-api/dist/index.js index f48ddb11d..b4a423ac9 100644 --- a/packages/das-api/dist/index.js +++ b/packages/das-api/dist/index.js @@ -1586,8 +1586,11 @@ var DasApi2; sortDirection: "desc" /* Desc */ }; DasApi4.fetchOffchain = async (uri) => { - const json = await (await fetch(uri)).json(); - return json; + const response = await fetch(uri); + if (response.status !== 200) { + return {}; + } + return await response.json(); }; DasApi4.findByMint = async (mint, isCompressed) => { const asset = await DasApi.getAsset(mint); @@ -1706,4 +1709,4 @@ var DasApi3 = { 0 && (module.exports = { DasApi }); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uLy4uL3N1aXRlLXV0aWxzL3NyYy9jb25zdGFudHMudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvYmF0Y2gudHMiLCAiLi4vLi4vbm9kZS9zcmMvaW5kZXgudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY29tbW9uLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL21pbnQudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvcGFydGlhbC1zaWduLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2NhbGN1bGF0ZS10eHNpemUudHMiLCAiLi4vLi4vZ2xvYmFsL3NyYy9pbmRleC50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9hc3NvY2lhdGVkLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2tleXBhaXIudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvcGRhLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3N1aXRlLXV0aWxzL3NyYy9zaGFyZWQudHMiLCAiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL3Jlc3VsdC50cyIsICIuLi8uLi9jb252ZXJ0ZXIvc3JjL2NvbGxlY3Rpb24udHMiLCAiLi4vLi4vY29udmVydGVyL3Ny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ICAgICAgIHRocm93IEVycm9yKFxuICAgICAgICAgICAgICBgb25seSBJbnN0cnVjdGlvbiBvYmplY3QgdGhhdCBjYW4gdXNlIGJhdGNoU3VibWl0KCkuXG4gICAgICAgICAgICBJbmRleDogJHtpfSwgU2V0IHZhbHVlOiAke0pTT04uc3RyaW5naWZ5KGEpfWAsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICBpKys7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBpbnN0cnVjdGlvbnMgPSBhcnIuZmxhdE1hcCgoYSkgPT4gYS5pbnN0cnVjdGlvbnMpO1xuICAgICAgICBjb25zdCBzaWduZXJzID0gYXJyLmZsYXRNYXAoKGEpID0+IGEuc2lnbmVycyk7XG4gICAgICAgIGNvbnN0IGZlZVBheWVycyA9IGFyci5maWx0ZXIoKGEpID0+IGEuZmVlUGF5ZXIgIT09IHVuZGVmaW5lZCk7XG4gICAgICAgIGxldCBmZWVQYXllciA9IHNpZ25lcnNbMF07XG4gICAgICAgIGlmIChmZWVQYXllcnMubGVuZ3RoID4gMCAmJiBmZWVQYXllcnNbMF0uZmVlUGF5ZXIpIHtcbiAgICAgICAgICBmZWVQYXllciA9IGZlZVBheWVyc1swXS5mZWVQYXllcjtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHRyYW5zYWN0aW9uID0gbmV3IFRyYW5zYWN0aW9uKCk7XG4gICAgICAgIGxldCBmaW5hbFNpZ25lcnMgPSBzaWduZXJzO1xuICAgICAgICBpZiAoZmVlUGF5ZXIpIHtcbiAgICAgICAgICB0cmFuc2FjdGlvbi5mZWVQYXllciA9IGZlZVBheWVyLnB1YmxpY0tleTtcbiAgICAgICAgICBmaW5hbFNpZ25lcnMgPSBbZmVlUGF5ZXIsIC4uLnNpZ25lcnNdO1xuICAgICAgICB9XG4gICAgICAgIGluc3RydWN0aW9ucy5tYXAoKGluc3QpID0+IHRyYW5zYWN0aW9uLmFkZChpbnN0KSk7XG5cbiAg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vazogc3RyaW5nKSA9PiB7XG4gICAgICAgICAgICAgICAgYXdhaXQgTm9kZS5jb25maXJtZWRTaWcob2spO1xuICAgICAgICAgICAgICAgIHJldHVybiBpbnN0LmRhdGE7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIChlcnI6IEVycm9yKSA9PiB7XG4gICAgICAgICAgICAgICAgZGVidWdMb2coJyMgRXJyb3Igc3VibWl0IHJldHJ5R2V0T3JDcmVhdGU6ICcsIGVycik7XG4gICAgICAgICAgICAgICAgdGhyb3cgZXJyO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICBkZWJ1Z0xvZyhgIyByZXRyeTogJHtjb3VudGVyfSBjcmVhdGUgdG9rZW4gYWNjb3VudDogYCwgZSk7XG4gICAgICAgICAgZGVidWdMb2coYCMgbWludDogJHttaW50fSwgb3duZXI6ICR7b3duZXJ9LCBmZWVQYXllcjogJHtmZWVQYXllcn1gKTtcbiAgICAgICAgfVxuICAgICAgICBhd2FpdCBzbGVlcChSRVRSWV9TTEVFUF9USU1FKTtcbiAgICAgICAgY291bnRlcisrO1xuICAgICAgfVxuICAgICAgdGhyb3cgRXJyb3IoYHJldHJ5IGFjdGlvbiBpcyBvdmVyIGxpbWl0ICR7UkVUUllfT1ZFUl9MSU1JVH1gKTtcbiAgICB9O1xuXG4gICAgLyoqXG4gICAgICogW01haW4gbG9naWNdR2V0IEFzc29jaWF0ZWQgdG9rZW4gQWNjb3VudC5cbiAgICAgKiBpZiBub3QgY3JlYXRlZCwgY3JlYXRlIG5ldyB0b2tlbiBhY2NvdWludFxuICAgICAqXG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG1pbnRcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gb3duZXJcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gZmVlUGF5ZXJcbiAgICAgKiBAcmV0dXJucyBQcm9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AgcmV0dXJuIHtcbiAgICAgICAgICB0b2tlbkFjY291bnQ6IGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSxcbiAgICAgICAgICBpbnN0OiB1bmRlZmluZWQsXG4gICAgICAgIH07XG4gICAgICB9IGNhdGNoIChlcnJvcjogdW5rbm93bikge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuQWNjb3VudE5vdEZvdW5kRXJyb3IpICYmXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuSW52YWxpZEFjY291bnRPd25lckVycm9yKVxuICAgICAgICApIHtcbiAgICAgICAgICB0aHJvdyBFcnJvcignVW5leHBlY3RlZCBlcnJvcicpO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgcGF5ZXIgPSAhZmVlUGF5ZXIgPyBvd25lciA6IGZlZVBheWVyO1xuXG4gICAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVBc3NvY2lhdGVkVG9rZW5BY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgcGF5ZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdCxcbiAgICAgICAgfTtcbiAgICAgIH1cbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHsgS2V5cGFpciBhcyBPcmlnaW5hbCwgUHVibGljS2V5I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sICdpbWFnZScpO1xuXG4gIGV4cG9ydCBjb25zdCBjaGVja0FsbCA9IDxcbiAgICBUIGV4dGVuZHMgUGlja05mdFN0b3JhZ2UgfCBQaWNrTmZ0U3RvcmFnZU1ldGFwbGV4IHwgUGlja01ldGFwbGV4LFxuICA+KFxuICAgIG1ldGFkYXRhOiBULFxuICApOiBSZXN1bHQ8c3RyaW5nLCBWYWxpZGF0b3JFcnJvcj4gPT4ge1xuICAgIHJldHVybiBUcnkoKCkgPT4ge1xuICAgICAgY29uc3Qga2V5cyA9IE9iamVjdC5rZXlzKG1ldGFkYXRhKTtcbiAgICAgIGNvbnN0IHJlc3VsdHM6IERldGFpbHNbXSA9IFtdO1xuICAgICAga2V5cy5tYXAoKGtleSkgPT4ge1xuICAgICAgICBsZXQgcmVzITogUmVzdWx0PHN0cmluZywgVmFsaWRhdG9yRXJyb3I+O1xuICAgICAgICBzd2l0Y2ggKGtleSkge1xuICAgICAgICAgIGNhc2UgJ2ltYWdlJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuaW1hZ2UpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNJbWFnZVVybChtZXRhZGF0YS5pbWFnZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdyb3lhbHR5JzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEucm95YWx0eSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1JveWFsdHkobWV0YWRhdGEucm95YWx0eSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgIC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GRlZmF1bHRTb3J0QnksXG4gICAgfTtcbiAgICBjb25zdCB7IGxpbWl0LCBwYWdlLCBzb3J0QnksIGJlZm9yZSwgYWZ0ZXIgfSA9IHtcbiAgICAgIC4uLmRlZmF1bHRPcHRpb25zLFxuICAgICAgLi4ub3B0aW9ucyxcbiAgICB9O1xuXG4gICAgY29uc3QgYXNzZXRzID0gYXdhaXQgQXBpLmdldEFzc2V0c0J5T3duZXIoXG4gICAgICBvd25lcixcbiAgICAgIGxpbWl0LFxuICAgICAgcGFnZSxcbiAgICAgIHNvcnRCeSxcbiAgICAgIGJlZm9yZSxcbiAgICAgIGFmdGVyLFxuICAgICk7XG4gICAgaWYgKGFzc2V0cy5pc0Vycikge1xuICAgICAgdGhyb3cgYXNzZXRzLmVycm9yO1xuICAgIH1cblxuICAgIGNvbnN0IGl0ZW1zID0gYXNzZXRzLnZhbHVlLml0ZW1zO1xuXG4gICAgY29uc3QgbWV0YWRhdGFzID0gYXdhaXQgUHJvbWlzZS5hbGwoXG4gICAgICBpdGVtc1xuICAgICAgICAuZmlsdGVyKChpdGVtKSA9PiBpdGVtLmNvbXByZXNzaW9uLmNvbXByZXNzZWQgPT09IGlzQ29tcHJlc3NlZClcbiAgICAgICAgLm1hcChhc3luYyAoaXRlbSkgPT4ge1xuICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICBjb25zdCBvZmZjaGFpbjogT2ZmY2hhaW4gPSBhd2FpdCBmZXRjaE9mZmNoYWluKFxuICAgICAgICAgICAgICBpdGVtLmNvbnRlbnQuanNvbl91cmksXG4gICAgICAgICAgICApO1xuICAgICAgICAgICAgY29uc3QgbWVyZ2VkID0ge1xuICAgICAgICAgICAgICBvbmNoYWluOiBpdGVtLFxuICAgICAgICAgICAgICBvZmZjaGFpbjogb2ZmY2hhaW4sXG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgcmV0dXJuIENvbnZlcnRlci5OZnQuaW50b1VzZXIobWVyZ2VkKTtcbiAgICAgICAgICB9IGNh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bW9uU3RydWN0dXJlPFB1YmtleT4+ID0+IHtcbiAgICAgIGNvbnN0IHJlcyA9IGF3YWl0IG1ha2VPckNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICBtaW50LFxuICAgICAgICBvd25lcixcbiAgICAgICAgbmV3IEtleXBhaXIuS2V5cGFpcih7IHNlY3JldDogZmVlUGF5ZXIgfSkucHVia2V5LFxuICAgICAgICBhbGxvd093bmVyT2ZmQ3VydmUsXG4gICAgICApO1xuXG4gICAgICBpZiAoIXJlcy5pbnN0KSB7XG4gICAgICAgIHJldHVybiByZXMudG9rZW5BY2NvdW50O1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb248UHVia2V5PihcbiAgICAgICAgW3Jlcy5pbnN0XSxcbiAgICAgICAgW10sXG4gICAgICAgIGZlZVBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICByZXMudG9rZW5BY2NvdW50ISxcbiAgICAgICk7XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIFJldHJ5IGZ1bmN0aW9uIGlmIGNyZWF0ZSBuZXcgdG9rZW4gYWNjb3VpbnRcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBtaW50XG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAgICogQHBhcmFtIHtTZWNyZXR9IGZlZVBheWVyXG4gICAgICogQHJldHVybnMgUHJvbWlzZTxzdHJpbmc+XG4gICAgICovXG4gICAgZXhwb3J0IGNvbnN0IHJldHJ5R2V0T3JDcmVhdGUgPSBhc3luYyAoXG4gICAgICBtaW50OiBQdWJrZXksXG4gICAgICBvd25lcjogUHVia2V5LFxuICAgICAgZmVlUGF5ZXI6IFNlY3JldCxcbiAgICApOiBQcm9taXNlPHN0cmluZz4gPT4ge1xuICAgICAgbGV0IGNvdW50ZXIgPSAxO1xuICAgICAgd2hpbGUgKGNvdW50ZXIgPCBSRVRSWV9PVkVSX0xJTUlUKSB7XG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgY29uc3QgaW5zdCA9IGF3YWl0IGdldChtaW50LCBvd25lciwgZmVlUGF5ZXIsIHRydWUpO1xuXG4gICAgICAgICAgaWYgKGluc3QgJiYgdHlwZW9mIGluc3QgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICBkZWJ1Z0xvZygnIyBhc3NvY2lhdGVkVG9rZW5BY2NvdW50OiAnLCBpbnN0KTtcbiAgICAgICAgICAgIHJldHVybiBpbnN0O1xuICAgICAgICAgIH0gZWxzZSBpZiAoaW5zdCBpbnN0YW5jZW9mIFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb24pIHtcbiAgICAgICAgICAgIChhd2FpdCBpbnN0LnN1Ym1pdCgpKS5tYXAoXG4gICAgICAgICAgICAgIGFzeW5jIChvazogc3RyaW5nKSA9PiB7XG4gICAgICAgICAgICAgICAgYXdhaXQgTm9kZS5jb25maXJtZWRTaWcob2spO1xuICAgICAgICAgICAgICAgIHJldHVybiBpbnN0LmRhdGE7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIChlcnI6IEVycm9yKSA9PiB7XG4gICAgICAgICAgICAgICAgZGVidWdMb2coJyMgRXJyb3Igc3VibWl0IHJldHJ5R2V0T3JDcmVhdGU6ICcsIGVycik7XG4gICAgICAgICAgICAgICAgdGhyb3cgZXJyO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICBkZWJ1Z0xvZyhgIyByZXRyeTogJHtjb3VudGVyfSBjcmVhdGUgdG9rZW4gYWNjb3VudDogYCwgZSk7XG4gICAgICAgICAgZGVidWdMb2coYCMgbWludDogJHttaW50fSwgb3duZXI6ICR7b3duZXJ9LCBmZWVQYXllcjogJHtmZWVQYXllcn1gKTtcbiAgICAgICAgfVxuICAgICAgICBhd2FpdCBzbGVlcChSRVRSWV9TTEV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Q0lBVEVEX1RPS0VOX1BST0dSQU1fSUQsXG4gICAgICApO1xuXG4gICAgICBkZWJ1Z0xvZygnIyBhc3NvY2lhdGVkVG9rZW5BY2NvdW50OiAnLCBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCkpO1xuXG4gICAgICB0cnkge1xuICAgICAgICAvLyBEb250IHVzZSBSZXN1bHRcbiAgICAgICAgYXdhaXQgZ2V0QWNjb3VudChcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLmNvbW1pdG1lbnQsXG4gICAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICB0b2tlbkFjY291bnQ6IGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSxcbiAgICAgICAgICBpbnN0OiB1bmRlZmluZWQsXG4gICAgICAgIH07XG4gICAgICB9IGNhdGNoIChlcnJvcjogdW5rbm93bikge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuQWNjb3VudE5vdEZvdW5kRXJyb3IpICYmXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuSW52YWxpZEFjY291bnRPd25lckVycm9yKVxuICAgICAgICApIHtcbiAgICAgICAgICB0aHJvdyBFcnJvcignVW5leHBlY3RlZCBlcnJvcicpO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgcGF5ZXIgPSAhZmVlUGF5ZXIgPyBvd25lciA6IGZlZVBheWVyO1xuXG4gICAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVBc3NvY2lhdGVkVG9rZW5BY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgcGF5ZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdCxcbiAgICAgICAgfTtcbiAgICAgIH1cbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHsgS2V5cGFpciBhcyBPcmlnaW5hbCwgUHVibGljS2V5IH0gZnJvbSAnQHNvbGFuYS93ZWIzLmpzJztcbmltcG9ydCB7IFB1YmtleSwgU2VjcmV0IH0gZnJvbSAnfi90eXBlcy9hY2NvdW50JztcbmltcG9ydCBicyBmcm9tICdiczU4JztcblxuZXhwb3J0IG5hbWVzcGFjZSBBY2NvdW50IHtcbiAgZXhwb3J0IGNsYXNzIEtleXBhaXIge1xuICAgIHNlY3JldDogU2VjcmV0O1xuICAgIHB1YmtleTogUHVia2V5O1xuXG4gICAgY29uc3RydWN0b3IocGFyYW1zOiB7IHB1YmtleT86IFB1YmtleTsgc2VjcmV0OiBTZWNyZXQgfSkge1xuICAgICAgaWYgKCFwYXJhbXMucHVia2V5KSB7XG4gICAgICAgIGNvbnN0IGtleXBhaXIgPSBwYXJhbXMuc2VjcmV0LnRvS2V5cGFpcigpO1xuICAgICAgICB0aGlzLnB1YmtleSA9IGtleXBhaXIucHVibGljS2V5LnRvU3RyaW5nKCk7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICB0aGlzLnB1YmtleSA9IHBhcmFtcy5wdWJrZXk7XG4gICAgICB9XG4gICAgICB0aGlzLnNlY3JldCA9IHBhcmFt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GNvbnN0IG9iaiBvZiB0aGlzKSB7XG4gICAgICBpZiAob2JqLmlzRXJyKSB7XG4gICAgICAgIHJldHVybiBvYmo7XG4gICAgICB9IGVsc2UgaWYgKG9iai52YWx1ZS5jYW5TdWJtaXQpIHtcbiAgICAgICAgZGVidWdMb2coJyMgUmVzdWx0IGJhdGNoIGNhblN1Ym1pdCcpO1xuICAgICAgICBjb25zdCBzaWcgPSBhd2FpdCAob2JqIGFzIFBhcnRpYWxTaWduU3RydWN0dXJlKS5zdWJtaXQoZmVlUGF5ZXIpO1xuICAgICAgICBpZiAoc2lnLmlzRXJyKSB7XG4gICAgICAgICAgcmV0dXJuIHNpZztcbiAgICAgICAgfVxuICAgICAgICBhd2FpdCBOb2RlLmNvbmZpcm1lZFNpZyhzaWcudmFsdWUpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgZGVidWdMb2coJyMgUmVzdWx0IGJhdGNoIG90aGVyIHRoYW4gY2FuU3VibWl0Jyk7XG4gICAgICAgIGlmICh0aGlzLmxlbmd0aCA9PSBpKSB7XG4gICAgICAgICAgLy8gbGFzdCBvYmplY3RcbiAgICAgICAgICByZXR1cm4gb2JqLnN1Ym1pdChmZWVQYXllcik7XG4gICAgICAgIH1cbiAgICAgICAgb2JqLnN1Ym1pdChmZWVQYXllcik7XG4gICAgICB9XG4gICAgICBpKys7XG4gICAgfVxuICB9IGVsc2Uge1xuICAgIGNvbnN0IGluc3RydWN0aW9uczogQ29tbW9uU3RydWN0dXJlIHwgTWludFN0cnVjdHVyZVtdID0gW107XG4gICAgZm9yIChjb25zdCBvYmogb2YgdGhpcykge1xuICAgICAgaWYgKG9iai5pc0Vycikge1xuICAgICAgICByZXR1cm4gb2JqO1xuICAgICAgfSBlbHNlIGlmIChvYmouaXNPaykge1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChvYmoudmFsdWUpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgcmV0dXJuIFJlc3VsdC5lcnIoRXJyb3IoJ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NvdW50W10sXG4gICAgKTogSGlzdG9yeSB8IHVuZGVmaW5lZCA9PiB7XG4gICAgICBjb25zdCBoaXN0b3J5OiBIaXN0b3J5ID0ge307XG5cbiAgICAgIGlmIChtYXBwaW5nVG9rZW5BY2NvdW50KSB7XG4gICAgICAgIGNvbnN0IGZvdW5kU291cmNlID0gbWFwcGluZ1Rva2VuQWNjb3VudC5maW5kKFxuICAgICAgICAgIChtKSA9PiBtLmFjY291bnQgPT09IG91dHB1dC5wYXJzZWQuaW5mby5zb3VyY2UsXG4gICAgICAgICk7XG4gICAgICAgIGNvbnN0IGZvdW5kRGVzdCA9IG1hcHBpbmdUb2tlbkFjY291bnQuZmluZChcbiAgICAgICAgICAobSkgPT4gbS5hY2NvdW50ID09PSBvdXRwdXQucGFyc2VkLmluZm8uZGVzdGluYXRpb24sXG4gICAgICAgICk7XG4gICAgICAgIGZvdW5kU291cmNlICYmIChoaXN0b3J5LnNvdXJjZSA9IGZvdW5kU291cmNlLm93bmVyKTtcbiAgICAgICAgZm91bmREZXN0ICYmIChoaXN0b3J5LmRlc3RpbmF0aW9uID0gZm91bmREZXN0Lm93bmVyKTtcbiAgICAgIH1cblxuICAgICAgaGlzdG9yeS50b2tlbkFtb3VudCA9IG91dHB1dC5wYXJzZWQuaW5mby50b2tlbkFtb3VudDtcbiAgICAgIGhpc3RvcnkubWludCA9IG91dHB1dC5wYXJzZWQuaW5mby5taW50O1xuICAgICAgaGlzdG9yeS5tdWx0aXNpZ0F1dGhvcml0eSA9IG91dHB1dC5wYXJzZWQuaW5mby5tdWx0aXNpZ0F1dGhvcml0eTtcbiAgICAgIGhpc3Rvcnkuc2lnbmVycyA9IG91dHB1dC5wYXJzZWQuaW5mby5zaWduZXJzO1xuICAgICAgaGlzdG9yeS50eXBlID0gb3V0cHV0LnByb2dyYW07XG4gICAgICBoaXN0b3J5LmRhdGVUaW1lID0gY29udmVydFRpbWVzdGFtcFRvRGF0ZVRpbWUobWV0YS5ibG9ja1RpbWUgYXM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AgcmVzID0gaXNJbWFnZVVybChtZXRhZGF0YS5pbWFnZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdyb3lhbHR5JzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEucm95YWx0eSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1JveWFsdHkobWV0YWRhdGEucm95YWx0eSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ25hbWUnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLm5hbWUpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNOYW1lKG1ldGFkYXRhLm5hbWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc3ltYm9sJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5zeW1ib2wpIHtcbiAgICA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uYWxsKFxuICAgICAgaXRlbXNcbiAgICAgICAgLmZpbHRlcigoaXRlbSkgPT4gaXRlbS5jb21wcmVzc2lvbi5jb21wcmVzc2VkID09PSBpc0NvbXByZXNzZWQpXG4gICAgICAgIC5tYXAoYXN5bmMgKGl0ZW0pID0+IHtcbiAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgY29uc3Qgb2ZmY2hhaW46IE9mZmNoYWluID0gYXdhaXQgZmV0Y2hPZmZjaGFpbihcbiAgICAgICAgICAgICAgaXRlbS5jb250ZW50Lmpzb25fdXJpLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIGNvbnN0IG1lcmdlZCA9IHtcbiAgICAgICAgICAgICAgb25jaGFpbjogaXRlbSxcbiAgICAgICAgICAgICAgb2ZmY2hhaW46IG9mZmNoYWluLFxuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIHJldHVybiBDb252ZXJ0ZXIuTmZ0LmludG9Vc2VyKG1lcmdlZCk7XG4gICAgICAgICAgfSBjYXRjaCAoZXJyKSB7XG4gICAgICAgICAgICBkZWJ1Z0xvZygnIyBGYWlsZWQgZmV0Y2ggb2ZmY2hhaW4gdXJsOiAnLCBpdGVtLmNvbnRlbnQuanNvbl91cmkpO1xuICAgICAgICAgICAgcmV0dXJuIENvbnZlcnRlci5OZnQuaW50b1VzZXIoe1xuICAgICAgICAgICAgICBvbmNoYWluOiBpdGVtLFxuICAgICAgICAgICAgICBvZmZjaGFpbjoge30sXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICB9XG4gICAgICAgIH0pLFxuICAgICk7XG4gICAgcmV0dXJuIHtcbiAgICAgIHBhZ2U6IGFzc2V0cy52YWx1ZS5wYWdlLFxuICAgICAgdG90YWw6IGFzc2V0cy52YWx1ZS50b3RhbCxcbiAgICAgIGxpbWl0OiBhc3NldHMudmFsdWUubGltaXQsXG4gICAgICBtZXRhZGF0YXMsXG4gICAgfTtcbiAgfTtcblxuICAvKipcbiAgICogRmluZCBuZnQgY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EYXNBcGkiLCAiRGFzQXBpIiwgIkNvbnZlcnRlciIsICJEYXNBcGkiXQp9Cg== \ No newline at end of file diff --git a/packages/das-api/dist/index.mjs b/packages/das-api/dist/index.mjs index e0188768c..2561af443 100644 --- a/packages/das-api/dist/index.mjs +++ b/packages/das-api/dist/index.mjs @@ -1572,8 +1572,11 @@ var DasApi2; sortDirection: "desc" /* Desc */ }; DasApi4.fetchOffchain = async (uri) => { - const json = await (await fetch(uri)).json(); - return json; + const response = await fetch(uri); + if (response.status !== 200) { + return {}; + } + return await response.json(); }; DasApi4.findByMint = async (mint, isCompressed) => { const asset = await DasApi.getAsset(mint); @@ -1691,4 +1694,4 @@ var DasApi3 = { export { DasApi3 as DasApi }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9iYXRjaC50cyIsICIuLi8uLi9ub2RlL3NyYy9pbmRleC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jb21tb24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvbWludC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9wYXJ0aWFsLXNpZ24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY2FsY3VsYXRlLXR4c2l6ZS50cyIsICIuLi8uLi9nbG9iYWwvc3JjL2luZGV4LnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2Fzc29jaWF0ZWQudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMva2V5cGFpci50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9wZGEudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvaW5kZXgudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci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cbiAgICAgICAgfVxuICAgICAgICBjb25zdCB0cmFuc2FjdGlvbiA9IG5ldyBUcmFuc2FjdGlvbigpO1xuXG4gICAgICAgIGNvbnN0IGJsb2NraGFzaE9iaiA9IGF3YWl0IE5vZGUuZ2V0Q29ubmVjdGlvbigpLmdldExhdGVzdEJsb2NraGFzaCgpO1xuICAgICAgICB0cmFuc2FjdGlvbi5sYXN0VmFsaWRCbG9ja0hlaWdodCA9IGJsb2NraGFzaE9iai5sYXN0VmFsaWRCbG9ja0hlaWdodDtcbiAgICAgICAgdHJhbnNhY3Rpb24ucmVjZW50QmxvY2toYXNoID0gYmxvY2toYXNoT2JqLmJsb2NraGFzaDtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHRoaXMuc2lnbmVycztcblxuICAgICAgICBpZiAodGhpcy5mZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gdGhpcy5mZWVQYXllci5wdWJsaWNLZXk7XG4gICAgICAgICAgZmluYWxTaWduZXJzID0gW3RoaXMuZmVlUGF5ZXIsIC4uLnRoaXMuc2lnbmVyc107XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLmluc3RydWN0aW9ucy5mb3JFYWNoKChpbnN0KSA9PiB0cmFuc2FjdGlvbi5hZGQoaW5zdCkpO1xuXG4gICAgICAgIGNvbnN0IG9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IE1BWF9SRVRSSUVTLFxuICAgICAgICB9O1xuXG4gICAgICAgIHJldHVybiBhd2FpdCBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uKFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICBvcHRpb25zLFxuICAgICAgICApO1xuICAgICAgfSk7XG4gICAgfTtcbiAgfVxufVxuIi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Gl4KSA9PiB7XG4gICAgICBpeC5rZXlzLmZvckVhY2goKHsgcHVia2V5LCBpc1NpZ25lciB9KSA9PiB7XG4gICAgICAgIGNvbnN0IHBrID0gcHVia2V5LnRvQmFzZTU4KCk7XG4gICAgICAgIGlmIChpc1NpZ25lcikgc2lnbmVycy5hZGQocGspO1xuICAgICAgICBhY2NvdW50cy5hZGQocGspO1xuICAgICAgfSk7XG5cbiAgICAgIGFjY291bnRzLmFkZChpeC5wcm9ncmFtSWQudG9CYXNlNTgoKSk7XG5cbiAgICAgIGNvbnN0IG5JbmRleGVzID0gaXgua2V5cy5sZW5ndGg7XG4gICAgICBjb25zdCBvcGFxdWVEYXRhID0gaXguZGF0YS5sZW5ndGg7XG5cbiAgICAgIHJldHVybiAoXG4gICAgICAgIGFjYyArXG4gICAgICAgIDEgKyAvLyBQSUQgaW5kZXhcbiAgICAgICAgY29tcGFjdEFycmF5U2l6ZShuSW5kZXhlcywgMSkgK1xuICAgICAgICBjb21wYWN0QXJyYXlTaXplKG9wYXF1ZURhdGEsIDEpXG4gICAgICApO1xuICAgIH0sIDApO1xuXG4gICAgcmV0dXJuIChcbiAgICAgIGNvbXBhY3RBcnJheVNpemUoc2lnbmVycy5zaXplLCA2NCkgKyAvLyBzaWduYXR1cmVzXG4gICAgICAzICsgLy8gaGVhZGVyXG4gICAgICBjb21wYWN0QXJyYXlTaXplKGFjY291bnRzLnNpemUsIDMyKSArIC8vIGFjY291bnRzXG4gICAgICAzMiArIC8vIGJsb2NraGFzaFxuICAgICAgY29tcGFjdEhlYWRlcih0cmFuc2FjdGlvbi5pbnN0cnVjdGlvbnMubGVuZ3RoKSArIC8vIGluc3RydWN0aW9uc1xuICAgICAgaXhzU2l6ZVxuICAgICk7XG4gIH07XG5cbiAgLyoqXG4gICAqIElzIG1heCB0cmFuc2FjdGlvbiBzaXplXG4gICAqIEBwYXJhbSB0cmFuc2FjdGlvbiBhIHNvbGFuYSB0cmFuc2FjdGlvblxuICAgKiBAcGFyYW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FxuICAgICAgICBmZWVQYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgcmVzLnRva2VuQWNjb3VudCEsXG4gICAgICApO1xuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiBSZXRyeSBmdW5jdGlvbiBpZiBjcmVhdGUgbmV3IHRva2VuIGFjY291aW50XG4gICAgICpcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gbWludFxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBvd25lclxuICAgICAqIEBwYXJhbSB7U2VjcmV0fSBmZWVQYXllclxuICAgICAqIEByZXR1cm5zIFByb21pc2U8c3RyaW5nPlxuICAgICAqL1xuICAgIGV4cG9ydCBjb25zdCByZXRyeUdldE9yQ3JlYXRlID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyOiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxzdHJpbmc+ID0+IHtcbiAgICAgIGxldCBjb3VudGVyID0gMTtcbiAgICAgIHdoaWxlIChjb3VudGVyIDwgUkVUUllfT1ZFUl9MSU1JVCkge1xuICAgICAgICB0cnkge1xuICAgICAgICAgIGNvbnN0IGluc3QgPSBhd2FpdCBnZXQobWludCwgb3duZXIsIGZlZVBheWVyLCB0cnVlKTtcblxuICAgICAgICAgIGlmIChpbnN0ICYmIHR5cGVvZiBpbnN0ID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgaW5zdCk7XG4gICAgICAgICAgICByZXR1cm4gaW5zdDtcbiAgICAgICAgICB9IGVsc2UgaWYgKGluc3QgaW5zdGFuY2VvZiBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uKSB7XG4gICAgICAgICAgICAoYXdhaXQgaW5zdC5zdWJtaXQoKSkubWFwKFxuICAgICAgICAgICAgICBhc3luYyAob2s6IHN0cmluZykgPT4ge1xuICAgICAgICAgICAgICAgIGF3YWl0IE5vZGUuY29uZmlybWVkU2lnKG9rKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gaW5zdC5kYXRhO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAoZXJyOiBFcnJvcikgPT4ge1xuICAgICAgICAgICAgICAgIGRlYnVnTG9nKCcjIEVycm9yIHN1Ym1pdCByZXRyeUdldE9yQ3JlYXRlOiAnLCBlcnIpO1xuICAgICAgICAgICAgICAgIHRocm93IGVycjtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgZGVidWdMb2coYCMgcmV0cnk6ICR7Y291bnRlcn0gY3JlYXRlIHRva2VuIGFjY291bnQ6IGAsIGUpO1xuICAgICAgICAgIGRlYnVnTG9nKGAjIG1pbnQ6ICR7bWludH0sIG93bmVyOiAke293bmVyfSwgZmVlUGF5ZXI6ICR7ZmVlUGF5ZXJ9YCk7XG4gICAgICAgIH1cbiAgICAgICAgYXdhaXQgc2xlZXAoUkVUUllfU0xFRVBfVElNRSk7XG4gICAgICAgIGNvdW50ZXIrKztcbiAgICAgIH1cbiAgICAgIHRocm93IEVycm9yKGByZXRyeSBhY3Rpb24gaXMgb3ZlciBsaW1pdCAke1JFVFJZX09WRVJfTElNSVR9YCk7XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIFtNYWluIGxvZ2ljXUdldCBBc3NvY2lhdGVkIHRva2VuIEFjY291bnQuXG4gICAgICogaWYgbm90IGNyZWF0ZWQsIGNyZWF0ZSBuZXcgdG9rZW4gYWNjb3VpbnRcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBtaW50XG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAgICogQHBhcmFtIHtQdWJrZXl9IGZlZVBheWVyXG4gICAgICogQHJldHVybnMgUHJvbWlzZTxzdHJpbmc+XG4gICAgICovXG4gICAgZXhwb3J0IGNvbnN0IG1ha2VPckNyZWF0ZUluc3RydWN0aW9uID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyPzogUHVia2V5LFxuICAgICAgYWxsb3dPd25lck9mZkN1cnZlID0gZmFsc2UsXG4gICAgKTogUHJvbWlzZTx7XG4gICAgICB0b2tlbkFjY291bnQ6IHN0cmluZztcbiAgICAgIGluc3Q6IFRyYW5zYWN0aW9uSW5zdHJ1Y3Rpb24gfCB1bmRlZmluZWQ7XG4gICAgfT4gPT4ge1xuICAgICAgY29uc3QgYXNzb2NpYXRlZFRva2VuQWNjb3VudCA9IGdldEFzc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jKFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSxcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3QsXG4gICAgICAgIH07XG4gICAgICB9XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IEtleXBhaXIgYXMgT3JpZ2luYWwsIFB1YmxpY0tleSB9IGZyb20gJ0Bzb2xhbmEvd2ViMy5qcyc7XG5pbXBvcnQgeyBQdWJrZXksI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xuaW1wb3J0IHsgSW50ZXJuYWxDcmVhdG9ycyB9IGZyb20gJ34vdHlwZXMvY29udmVydGVyJztcblxuZXhwb3J0IG5hbWVzcGFjZSBDb252ZXJ0ZXIge1xuICBleHBvcnQgbmFtZXNwYWNlIENyZWF0b3JzIHtcbiAgICBleHBvcnQgY29uc3QgaW50b0luZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IE9wdGlvbjxJbnRlcm5hbENyZWF0b3JzW10+ID0+IHtcbiAgICAgIGlmICghaW5wdXQpIHtcbiAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICB9XG4gICAgICByZXR1cm4gaW5wdXQubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvQ29tcHJlc3NlZE5mdEluZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IEludGVybmFsQ3JlYXRvcnNbXSA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBbXTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBpbnB1dCEubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk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lckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEuc3ltYm9sKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU3ltYm9sKG1ldGFkYXRhLnN5bWJvbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAocmVzICYmIHJlcy5pc0Vycikge1xuICAgICAgICAgIHJlc3VsdHMucHVzaCguLi5yZXMuZXJyb3IuZGV0YWlscyk7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgICAgaWYgKHJlc3VsdHMubGVuZ3RoID4gMCkge1xuICAgICAgICBjb25zdCBtZXNzYWdlID1cbiAgICAgICAgICAnQ2F1Z2h0IGluIHRoZSB2YWxpZGF0aW9uIGVycm9ycy4gc2VlIGluZm9ybWF0aW9uIGUuZzogZXJyPFZhbGlkYXRvckVycm9yPi5kZXRhaWxzJztcbiAgICAgICAgdGhyb3cgbmV3IFZhbGlkYXRv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iRGFzQXBpIiwgIkNvbnZlcnRlciIsICJEYXNBcGkiXQp9Cg== \ No newline at end of file +//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9iYXRjaC50cyIsICIuLi8uLi9ub2RlL3NyYy9pbmRleC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jb21tb24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvbWludC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9wYXJ0aWFsLXNpZ24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY2FsY3VsYXRlLXR4c2l6ZS50cyIsICIuLi8uLi9nbG9iYWwvc3JjL2luZGV4LnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2Fzc29jaWF0ZWQudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMva2V5cGFpci50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9wZGEudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvaW5kZXgudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvaW5kZXgudHMiLCAiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL3NoYXJlZC50cyIsICIuLi8uLi9zdWl0ZS11dGlscy9zcmMvcmVzdWx0LnRzIiwgIi4uLy4uL2NvbnZlcnRlci9zcmMvY29sbGVjdGlvbi50cyIsICIuLi8uLi9jb252ZXJ0ZXIvc3JjL2NyZWF0b3JzLnRzIiwgIi4uLy4uL2NvbnZlcnRlci9zcmMvY29tcHJlc3NlZC1uZnQtbWV0YWRhdGEudHMiLCAiLi4vLi4vY29udmVydGVyL3NyYy9yb3lhbHR5LnRzIiwgIi4uLy4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l9MSU1JVCA9IDEwO1xuICAgIGNvbnN0IFJFVFJZX1NMRUVQX1RJTUUgPSAzO1xuICAgIC8vQGludGVybmFsXG4gICAgY29uc3QgZ2V0ID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyOiBTZWNyZXQsXG4gICAgICBhbGxvd093bmVyT2ZmQ3VydmUgPSBmYWxzZSxcbiAgICApOiBQcm9taXNlPHN0cmluZyB8IENvbW1vblN0cnVjdHVyZTxQdWJrZXk+PiA9PiB7XG4gICAgICBjb25zdCByZXMgPSBhd2FpdCBtYWtlT3JDcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIG5ldyBLZXlwYWlyLktleXBhaXIoeyBzZWNyZXQ6IGZlZVBheWVyIH0pLnB1YmtleSxcbiAgICAgICAgYWxsb3dPd25lck9mZkN1cnZlLFxuICAgICAgKTtcblxuICAgICAgaWYgKCFyZXMuaW5zdCkge1xuICAgICAgICByZXR1cm4gcmVzLnRva2VuQWNjb3VudDtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uPFB1YmtleT4oXG4gICAgICAgIFtyZXMuaW5zdF0sXG4gICAgICAgIFtdLFxuICAgICAgICBmZWVQYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgcmVzLnRva2VuQWNjb3VudCEsXG4gICAgICApO1xuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiBSZXRyeSBmdW5jdGlvbiBpZiBjcmVhdGUgbmV3IHRva2VuIGFjY291aW50XG4gICAgICpcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gbWludFxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBvd25lclxuICAgICAqIEBwYXJhbSB7U2VjcmV0fSBmZWVQYXllclxuICAgICAqIEByZXR1cm5zIFByb21pc2U8c3RyaW5nPlxuICAgICAqL1xuICAgIGV4cG9ydCBjb25zdCByZXRyeUdldE9yQ3JlYXRlID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyOiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxzdHJpbmc+ID0+IHtcbiAgICAgIGxldCBjb3VudGVyID0gMTtcbiAgICAgIHdoaWxlIChjb3VudGVyIDwgUkVUUllfT1ZFUl9MSU1JVCkge1xuICAgICAgICB0cnkge1xuICAgICAgICAgIGNvbnN0IGluc3QgPSBhd2FpdCBnZXQobWludCwgb3duZXIsIGZlZVBheWVyLCB0cnVlKTtcblxuICAgICAgICAgIGlmIChpbnN0ICYmIHR5cGVvZiBpbnN0ID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgaW5zdCk7XG4gICAgICAgICAgICByZXR1cm4gaW5zdDtcbiAgICAgICAgICB9IGVsc2UgaWYgKGluc3QgaW5zdGFuY2VvZiBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uKSB7XG4gICAgICAgICAgICAoYXdhaXQgaW5zdC5zdWJtaXQoKSkubWFwKFxuICAgICAgICAgICAgICBhc3luYyAob2s6IHN0cmluZykgPT4ge1xuICAgICAgICAgICAgICAgIGF3YWl0IE5vZGUuY29uZmlybWVkU2lnKG9rKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gaW5zdC5kYXRhO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAoZXJyOiBFcnJvcikgPT4ge1xuICAgICAgICAgICAgICAgIGRlYnVnTG9nKCcjIEVycm9yIHN1Ym1pdCByZXRyeUdldE9yQ3JlYXRlOiAnLCBlcnIpO1xuICAgICAgICAgICAgICAgIHRocm93IGVycjtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICA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4gPT4ge1xuICAgICAgY29uc3QgYXNzb2NpYXRlZFRva2VuQWNjb3VudCA9IGdldEFzc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jKFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSxcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb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wdXQpIHtcbiAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICB9XG4gICAgICByZXR1cm4gaW5wdXQubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvQ29tcHJlc3NlZE5mdEluZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IEludGVybmFsQ3JlYXRvcnNbXSA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBbXTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBpbnB1dCEubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlciA9IChcbiAgICAgIG91dHB1dDogT3B0aW9uPEludGVybmFsQ3JlYXRvcnNbXT4sXG4gICAgKTogQ3JlYXRvcnNbXSB8IHVuZGVmaW5lZCA9PiB7XG4gICAgICBpZiAoIW91dHB1dCkge1xuICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gb3V0cHV0Lm1hcCgoZGF0YSkgPT4ge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIGFkZHJlc3M6IGRhdG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T4gUHJvbWlzZTxSZXN1bHQ8c3RyaW5nLCBFcnJvcj4+LFxuICAgICAgc3RvcmFnZVR5cGU6IFN0b3JhZ2VUeXBlLFxuICAgICAgZmVlUGF5ZXI/OiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxQcm9wZXJ0aWVzPiA9PiB7XG4gICAgICBpZiAoIWlucHV0IHx8ICFpbnB1dC5maWxlcykge1xuICAgICAgICByZXR1cm4ge307XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGZpbGVzID0gYXdhaXQgUHJvbWlzZS5hbGwoXG4gICAgICAgIGlucHV0LmZpbGVzLm1hcChhc3luYyAoZmlsZSkgPT4ge1xuICAgICAgICAgIGlmICghZmlsZS5maWxlUGF0aCkge1xuICAgICAgICAgICAgcmV0dXJuIHt9O1xuICAgICAgICAgIH1cbiAgICAgICAgICBjb25zdCByZXMgPSBhd2FpdCBjYWxsYmFja0Z1bmMoZmlsZS5maWxlUGF0aCwgc3RvcmFnZVR5cGUsIGZlZVBheWVyKTtcbiAgICAgICAgICBpZiAocmVzLmlzRXJyKSB7XG4gICAgICAgICAgICB0aHJvdyBFcnJvcihyZXMuZXJyb3IubWVzc2FnZSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBvdmVyd3JpdGVPYmplY3QoZmlsZSwgW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBleGlzdHNLZXk6ICdmaWxlUGF0aCcsXG4gICAgICAgICAgICAgIHdpbGw6IHsga2V5OiAndXJpJywgdmFsdWU6IHJlcy52YWx1ZSB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICBdKTtcbiAgICAgICAgfSksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHsgLi4uaW5wdXQsIGZpbGVzIH0gYXMgUHJvcGVydGllcztcbiAgICB9O1xuICB9XG59XG4iLCAiLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLXVudXNlZC12YXJzICovXG5pbXBvcnQg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XRhaWxzW10gPSBbXTtcbiAgICAgIGtleXMubWFwKChrZXkpID0+IHtcbiAgICAgICAgbGV0IHJlcyE6IFJlc3VsdDxzdHJpbmcsIFZhbGlkYXRvckVycm9yPjtcbiAgICAgICAgc3dpdGNoIChrZXkpIHtcbiAgICAgICAgICBjYXNlICdpbWFnZSc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLmltYWdlKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzSW1hZ2VVcmwobWV0YWRhdGEuaW1hZ2UpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAncm95YWx0eSc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnJveWFsdHkpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNSb3lhbHR5KG1ldGFkYXRhLnJveWFsdHkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEuc3ltYm9sKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU3ltYm9sKG1ldGFkYXRhLnN5bWJvbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAocmVzICYmIHJlcy5pc0Vycikge1xuICAgICAgICAgIHJlc3VsdHMucHVzaCguLi5yZXMuZXJyb3IuZGV0YWlscyk7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgICAgaWYgKHJlc3VsdHMubGVuZ3RoID4gMCkge1xuICAgICAgICBjb25zdCBtZXNzYWdlID1cbiAgICAgICAgICAnQ2F1Z2h0IGluIHRoZSB2YWxpZGF0aW9uIGVycm9ycy4gc2VlIGluZm9ybWF0aW9uIGUuZzogZXJyPFZhbGlkYXRvckVycm9yPi5kZXRhaWxzJztcbiAgICAgICAgdGhyb3cgbmV3IFZhbGlkYXRvckVycm9yKG1lc3NhZ2UsIHJlc3VsdHMpO1xuICAgICAgfVxuICAgICAgcmV0dXJuIE1lc3NhZ2UuU1VDQ0VTUztcbiAgICB9KTtcbiAgfTtcblxuICB0eXBlIFBpY2tOZnRTdG9yYWdlID0gUGljazxcbiAgICBPZmZjaGFpbixcbiAgICAnbmFtZScgfCAnc3ltYm9sJyB8ICdpbWFnZScgfCAnc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMnXG4gID47XG4gIHR5cGUgUGlja05mdFN0b3JhZ2VNZXRhcGxleCA9IFBpY2s8XG4gICAgSW5wdXROZnRNZXRhZG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LFxuICAgICAgbGltaXQsXG4gICAgICBwYWdlLFxuICAgICAgc29ydEJ5LFxuICAgICAgYmVmb3JlLFxuICAgICAgYWZ0ZXIsXG4gICAgKTtcbiAgICBpZiAoYXNzZXRzLmlzRXJyKSB7XG4gICAgICB0aHJvdyBhc3NldHMuZXJyb3I7XG4gICAgfVxuXG4gICAgY29uc3QgaXRlbXMgPSBhc3NldHMudmFsdWUuaXRlbXM7XG5cbiAgICBjb25zdCBtZXRhZGF0YXMgPSBhd2FpdCBQcm9taXNlLmFsbChcbiAgICAgIGl0ZW1zXG4gICAgICAgIC5maWx0ZXIoKGl0ZW0pID0+IGl0ZW0uY29tcHJlc3Npb24uY29tcHJlc3NlZCA9PT0gaXNDb21wcmVzc2VkKVxuICAgICAgICAubWFwKGFzeW5jIChpdGVtKSA9PiB7XG4gICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgIGNvbnN0IG9mZmNoYWluOiBPZmZjaGFpbiA9IGF3YWl0IGZldGNoT2ZmY2hhaW4oXG4gICAgICAgICAgICAgIGl0ZW0uY29udGVudC5qc29uX3VyaSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgICBjb25zdCBtZXJnZWQgPSB7XG4gICAgICAgICAgICAgIG9uY2hhaW46IGl0ZW0sXG4gICAgICAgICAgICAgIG9mZmNoYWluOiBvZmZjaGFpbixcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICByZXR1cm4gQ29udmVydGVyLk5mdC5pbnRvVXNlcihtZXJnZWQpO1xuICAgICAgICAgIH0gY2F0Y2ggKGVycikge1xuICAgICAgICAgICAgZGVidWdMb2coJyMgRmFpbGVkIGZldGNoIG9mZmNoYWluIHVybDogJywgaXRlbS5jb250ZW50Lmpzb25fdXJpKTtcbiAgICAgICAgICAgIHJldHVybiBDb252ZXJ0ZXIuTmZ0LmludG9Vc2VyKHtcbiAgICAgICAgICAgICAgb25jaGFpbjogaXRlbSxcbiAgICAgICAgICAgICAgb2ZmY2hhaW46IHt9LFxuIC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iwgIlB1YmxpY0tleSIsICJBY2NvdW50IiwgIktleXBhaXIiLCAiQWNjb3VudCIsICJBc3NvY2lhdGVkIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJQdWJsaWNLZXkiLCAiQWNjb3VudCIsICJQZGEiLCAiQWNjb3VudCIsICJicyIsICJBY2NvdW50IiwgIlB1YmxpY0tleSIsICJLZXlwYWlyIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiUmVzdWx0IiwgIkNvbnZlcnRlciIsICJDb2xsZWN0aW9uIiwgIkNvbGxlY3Rpb25NaW50IiwgIkNvbnZlcnRlciIsICJDcmVhdG9ycyIsICJDb252ZXJ0ZXIiLCAiQ29tcHJlc3NlZE5mdE1ldGFkYXRhIiwgIkNvbnZlcnRlciIsICJSb3lhbHR5IiwgIkNvbnZlcnRlciIsICJOZnQiLCAiQ29udmVydGVyIiwgIk1lbW8iLCAiQ29udmVydGVyIiwgIk1pbnQiLCAiQ29udmVydGVyIiwgIlJlZ3VsYXJOZnRNZXRhZGF0YSIsICJDb252ZXJ0ZXIiLCAiUHJvcGVydGllcyIsICJDb252ZXJ0ZXIiLCAiVXNlcyIsICJDb252ZXJ0ZXIiLCAiVG9rZW5NZXRhZGF0YSIsICJDb252ZXJ0ZXIiLCAiVHJhbnNmZXJDaGVja2VkIiwgIkNvbnZlcnRlciIsICJUcmFuc2ZlciIsICJDb252ZXJ0ZXIiLCAiVmFsaWRhdG9yIiwgIk1lc3NhZ2UiLCAiQ29udmVydGVyIiwgIkRhc0FwaSIsICJEYXNBcGkiLCAiQ29udmVydGVyIiwgIkRhc0FwaSJdCn0K \ No newline at end of file diff --git a/packages/das-api/src/find.ts b/packages/das-api/src/find.ts index 0435b7071..633ca16f7 100644 --- a/packages/das-api/src/find.ts +++ b/packages/das-api/src/find.ts @@ -14,8 +14,11 @@ export namespace DasApi { }; export const fetchOffchain = async (uri: string) => { - const json = await (await fetch(uri)).json(); - return json; + const response = await fetch(uri); + if (response.status !== 200) { + return {}; + } + return await response.json(); }; /** diff --git a/packages/suite-compressed-nft/dist/index.js b/packages/suite-compressed-nft/dist/index.js index 30a7a70d0..1f1280f04 100644 --- a/packages/suite-compressed-nft/dist/index.js +++ b/packages/suite-compressed-nft/dist/index.js @@ -1595,8 +1595,11 @@ var DasApi2; sortDirection: "desc" /* Desc */ }; DasApi4.fetchOffchain = async (uri) => { - const json = await (await fetch(uri)).json(); - return json; + const response = await fetch(uri); + if (response.status !== 200) { + return {}; + } + return await response.json(); }; DasApi4.findByMint = async (mint, isCompressed) => { const asset = await DasApi.getAsset(mint); @@ -3479,4 +3482,4 @@ var CompressedNft9 = { 0 && (module.exports = { CompressedNft }); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uLy4uL3N1aXRlLXV0aWxzL3NyYy9jb25zdGFudHMudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvYmF0Y2gudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY29tbW9uLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL21pbnQudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvcGFydGlhbC1zaWduLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2NhbGN1bGF0ZS10eHNpemUudHMiLCAiLi4vLi4vZ2xvYmFsL3NyYy9pbmRleC50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9hc3NvY2lhdGVkLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2tleXBhaXIudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvcGRhLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uL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tcblxuICBleHBvcnQgY29uc3Qgc3dpdGNoQnVuZGxyID0gKGVudjogc3RyaW5nKTogc3RyaW5nID0+IHtcbiAgICBzd2l0Y2ggKGVudikge1xuICAgICAgY2FzZSBDb25zdGFudHMuQ2x1c3Rlci5wcmQ6IHtcbiAgICAgICAgY29uc3QgdXJscyA9IENvbnN0YW50cy5CdW5kbHJVcmwucHJkLnNwbGl0KCcsJyk7XG4gICAgICAgIGNvbnN0IGluZGV4ID0gRGF0ZS5ub3coKSAlIHVybHMubGVuZ3RoO1xuICAgICAgICByZXR1cm4gdXJsc1tpbmRleF07XG4gICAgICB9XG4gICAgICBkZWZhdWx0OiB7XG4gICAgICAgIHJldHVybiBDb25zdGFudHMuQnVuZGxyVXJsLmRldjtcbiAgICAgIH1cbiAgICB9XG4gIH07XG5cbiAgZXhwb3J0IGNvbnN0IHN3aXRjaERhc0FwaSA9IChlbnY6IHN0cmluZyk6IHN0cmluZyA9PiB7XG4gICAgc3dpdGNoIChlbnYpIHtcbiAgICAgIGNhc2UgQ29uc3RhbnRzLkNsdXN0ZXIucHJkOiB7XG4gICAgICAgIGlmIChkYXNBcGlVcmwubGVuZ3RoIDwgMSkge1xuICAgICAgICAgIHRocm93IEVycm9yKENvbnN0YW50cy5XYXJubmluZ01lc3NhZ2UuREFTX0FQSV9VUkwpO1xuICAgICAgICB9XG4gICAgICAgIGNvbnN0IHVybHMgPSBDb25zdGFudHMuQnVuZGxyVXJsLnByZC5zcGxpdCgnLCcpO1xuICAgICAgICBjb25zdCBpbmRleCA9IERhdGUubm93KCkgJSB1cmxzLmxlbmd0aDtcbiAgICAgICAgcmV0dXJuIHVybHNbaW5kZXhdO1xuICAgICAgfVxuICAgICAgZGVmYXVsdDoge1xuICAgICAgICBjb25zdCB1cmxzID0gQ29uc3RhbnRzLkRhc0FwaVVybC5kZXYuc3BsaXQoJywnKTtcbiAgICAgICAgY29uc3QgaW5kZXggPSBEYXRlLm5vdygpICUgdXJscy5sZW5ndGg7XG4gICA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8IFJFVFJZX09WRVJfTElNSVQpIHtcbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICBjb25zdCBpbnN0ID0gYXdhaXQgZ2V0KG1pbnQsIG93bmVyLCBmZWVQYXllciwgdHJ1ZSk7XG5cbiAgICAgICAgICBpZiAoaW5zdCAmJiB0eXBlb2YgaW5zdCA9PT0gJ3N0cmluZycpIHtcbiAgICAgICAgICAgIGRlYnVnTG9nKCcjIGFzc29jaWF0ZWRUb2tlbkFjY291bnQ6ICcsIGluc3QpO1xuICAgICAgICAgICAgcmV0dXJuIGluc3Q7XG4gICAgICAgICAgfSBlbHNlIGlmIChpbnN0IGluc3RhbmNlb2YgVHJhbnNhY3Rpb25CdWlsZGVyLkNvbW1vbikge1xuICAgICAgICAgICAgKGF3YWl0IGluc3Quc3VibWl0KCkpLm1hcChcbiAgICAgICAgICAgICAgYXN5bmMgKG9rOiBzdHJpbmcpID0+IHtcbiAgICAgICAgICAgICAgICBhd2FpdCBOb2RlLmNvbmZpcm1lZFNpZyhvayk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGluc3QuZGF0YTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgKGVycjogRXJyb3IpID0+IHtcbiAgICAgICAgICAgICAgICBkZWJ1Z0xvZygnIyBFcnJvciBzdWJtaXQgcmV0cnlHZXRPckNyZWF0ZTogJywgZXJyKTtcbiAgICAgICAgICAgICAgICB0aHJvdyBlcnI7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgIGRlYnVnTG9nKGAjIHJldHJ5OiAke2NvdW50ZXJ9IGNyZWF0ZSB0b2tlbiBhY2NvdW50OiBgLCBlKTtcbiAgICAgICAgICBkZWJ1Z0xvZyhgIyBtaW50OiAke21pbnR9LCBvd25lcjogJHtvd25lcn0sIGZlZVBheWVyOiAke2ZlZVBheWVyfWApO1xuICAgICAgICB9XG4g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fSUQsXG4gICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGFzc29jaWF0ZWRUb2tlbkFjY291bnQ6ICcsIGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSk7XG5cbiAgICAgIHRyeSB7XG4gICAgICAgIC8vIERvbnQgdXNlIFJlc3VsdFxuICAgICAgICBhd2FpdCBnZXRBY2NvdW50KFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCkuY29tbWl0bWVudCxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3Q6IHVuZGVmaW5lZCxcbiAgICAgICAgfTtcbiAgICAgIH0gY2F0Y2ggKGVycm9yOiB1bmtub3duKSB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5BY2NvdW50Tm90Rm91bmRFcnJvcikgJiZcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5JbnZhbGlkQWNjb3VudE93bmVyRXJyb3IpXG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9yKCdVbmV4cGVjdGVkIGVycm9yJyk7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBwYXllciA9ICFmZWVQYXllciA/IG93bmVyIDogZmVlUGF5ZXI7XG5cbiAgICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgICBwYXllci50b1B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GFkYXRhLmltYWdlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3JveWFsdHknOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5yb3lhbHR5KSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzUm95YWx0eShtZXRhZGF0YS5yb3lhbHR5KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlcl9mZWVfYmFzaXNfcG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJGZWVCYXNpc1BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0YWRhdGEubmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzeW1ib2wnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLnN5bWJvbCkge1xuICAgICAgICAgICAgICByZXMgPSBpc1N5b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pIHtcbiAgICAgIHRocm93IGFzc2V0cy5lcnJvcjtcbiAgICB9XG5cbiAgICBjb25zdCBpdGVtcyA9IGFzc2V0cy52YWx1ZS5pdGVtcztcblxuICAgIGNvbnN0IG1ldGFkYXRhcyA9IGF3YWl0IFByb21pc2UuYWxsKFxuICAgICAgaXRlbXNcbiAgICAgICAgLmZpbHRlcigoaXRlbSkgPT4gaXRlbS5jb21wcmVzc2lvbi5jb21wcmVzc2VkID09PSBpc0NvbXByZXNzZWQpXG4gICAgICAgIC5tYXAoYXN5bmMgKGl0ZW0pID0+IHtcbiAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgY29uc3Qgb2ZmY2hhaW46IE9mZmNoYWluID0gYXdhaXQgZmV0Y2hPZmZjaGFpbihcbiAgICAgICAgICAgICAgaXRlbS5jb250ZW50Lmpzb25fdXJpLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIGNvbnN0IG1lcmdlZCA9IHtcbiAgICAgICAgICAgICAgb25jaGFpbjogaXRlbSxcbiAgICAgICAgICAgICAgb2ZmY2hhaW46IG9mZmNoYWluLFxuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIHJldHVybiBDb252ZXJ0ZXIuTmZ0LmludG9Vc2VyKG1lcmdlZCk7XG4gICAgICAgICAgfSBjYXRjaCAoZXJyKSB7XG4gICAgICAgICAgICBkZWJ1Z0xvZygnIyBGYWlsZWQgZmV0Y2ggb2ZmY2hhaW4gdXJsOiAnLCBpdGVtLmNvbnRlbnQuanNvbl91cmkpO1xuICAgICAgICAgICAgcmV0dXJuIENvbnZlcnRlci5OZnQuaW50b1VzZXIoe1xuICAgICAgICAgICAgICBvbmNoYWluOiBpdGVtLFxuICAgICAgICAgICAgICBvZmZjaGFpbjoge30sXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICB9XG4gICAgICAgIH0pLFxuICAgICk7XG4gICAgcmV0dXJuIHtcbiAgICAgIHBhZ2U6IGFzc2V0cy52YWx1ZS5wYWdlLFxuICA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LFxuICAgICAgICAgIG5ld0FjY291bnRQdWJrZXk6IHRyZWVPd25lci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgICAgbGFtcG9ydHM6XG4gICAgICAgICAgICBhd2FpdCBOb2RlLmdldENvbm5lY3Rpb24oKS5nZXRNaW5pbXVtQmFsYW5jZUZvclJlbnRFeGVtcHRpb24oc3BhY2UpLFxuICAgICAgICAgIHNwYWNlOiBzcGFjZSxcbiAgICAgICAgICBwcm9ncmFtSWQ6IFNQTF9BQ0NPVU5UX0NPTVBSRVNTSU9OX1BST0dSQU1fSUQsXG4gICAgICAgIH0pLFxuICAgICAgKTtcblxuICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgIGNyZWF0ZUNyZWF0ZVRyZWVJbnN0cnVjdGlvbihcbiAgICAgICAgICB7XG4gICAgICAgICAgICBtZXJrbGVUcmVlOiB0cmVlT3duZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICAgICAgdHJlZUF1dGhvcml0eSxcbiAgICAgICAgICAgIHRyZWVDcmVhdG9yOiBvd25lci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgICAgICBwYXllcjogcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICAgICAgbG9nV3JhcHBlcjogU1BMX05PT1BfUFJPR1JBTV9JRCxcbiAgICAgICAgICAgIGNvbXByZXNzaW9uUHJvZ3JhbTogU1BMX0FDQ09VTlRfQ09NUFJFU1NJT05fUFJPR1JBTV9JRCxcbiAgICAgICAgICB9LFxuICAgICAgICAgIHtcbiAgICAgICAgICAgIG1heEJ1ZmZlclNpemUsXG4gICAgICAgICAgICBtYXhEZXB0aCxcbiAgICAgICAgICAgIHB1YmxpYzogZmFsc2UsXG4gICAgICAgICAgfSxcbiAgICAgICAgICBNUExfQlVCQkxFR1VNX1BST0dSQU1fSUQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgKSxcbiAgICAgICk7X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XG4gICAgICAgICAgICBsb2dXcmFwcGVyOiBTUExfTk9PUF9QUk9HUkFNX0lELFxuICAgICAgICAgICAgY29sbGVjdGlvbkF1dGhvcml0eVJlY29yZFBkYTogQlVCQkxFR1VNX1BST0dSQU1fSUQsXG4gICAgICAgICAgICBjb21wcmVzc2lvblByb2dyYW06IFNQTF9BQ0NPVU5UX0NPTVBSRVNTSU9OX1BST0dSQU1fSUQsXG4gICAgICAgICAgICB0b2tlbk1ldGFkYXRhUHJvZ3JhbTogVE9LRU5fTUVUQURBVEFfUFJPR1JBTV9JRCxcbiAgICAgICAgICB9LFxuICAgICAgICAgIHtcbiAgICAgICAgICAgIG1ldGFkYXRhQXJncyxcbiAgICAgICAgICB9LFxuICAgICAgICApLFxuICAgICAgKTtcblxuICAgICAgaWYgKGlucHV0LmNyZWF0b3JzKSB7XG4gICAgICAgIGNvbnN0IGFzc2V0SWQgPSBhd2FpdCBuZXcgU3BhY2UuU3BhY2UodHJlZU93bmVyKS5nZXRBc3NldElkKCk7XG4gICAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICAgIGF3YWl0IGNyZWF0ZVZlcmlmeUNyZWF0b3IoXG4gICAgICAgICAgICBtZXRhZGF0YUFyZ3MuY3JlYXRvcnMsXG4gICAgICAgICAgICBhc3NldElkLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICB0cmVlT3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIG1ldGFkYXRhQXJncyxcbiAgICAgICAgICAgIHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5NaW50KFxuICAgICAgICBpbnN0cnVjdGlvbnMsXG4gICAgICAgIFtvd25lci50b0tleXBhaXIoKV0sXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICBuZXcgU3BhY2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FJPR1JBTV9JRCxcbiAgICAgICAgfSxcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IGRhdGFzID0gaW5mby52YWx1ZS5tYXAoYXN5bmMgKGQpID0+IHtcbiAgICAgICAgY29uc3QgbWludCA9IGQuYWNjb3VudC5kYXRhLnBhcnNlZC5pbmZvLm1pbnQgYXMgUHVia2V5O1xuICAgICAgICBjb25zdCB0b2tlbkFtb3VudCA9IGQuYWNjb3VudC5kYXRhLnBhcnNlZC5pbmZvLnRva2VuQW1vdW50XG4gICAgICAgICAgLmFtb3VudCBhcyBzdHJpbmc7XG4gICAgICAgIGlmICh0b2tlbkFtb3VudCA9PT0gJzEnKSB7XG4gICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBNZXRhZGF0YS5mcm9tQWNjb3VudEFkZHJlc3MoXG4gICAgICAgICAgY29ubmVjdGlvbixcbiAgICAgICAgICBBY2NvdW50LlBkYS5nZXRNZXRhZGF0YShtaW50KSxcbiAgICAgICAgKVxuICAgICAgICAgIC50aGVuKGFzeW5jIChtZXRhZGF0YSkgPT4ge1xuICAgICAgICAgICAgLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLWV4cGxpY2l0LWFueSAqL1xuICAgICAgICAgICAgcmV0dXJuIGZldGNoUmV0cnkobWV0YWRhdGEuZGF0YS51cmkpLnRoZW4oKGpzb246IGFueSkgPT4ge1xuICAgICAgICAgICAgICByZXR1cm4gY29udmVydGVyKG1ldGFkYXRhLCBqc29uLCB0b2tlbkFtb3VudCk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICB9KVxuICAgICAgICAgIC5jYXRjaCgoZXJyKSA9PiBkZWJ1Z0xvZygnIyBbRmV0Y2ggZXJyb3JdJywgZXJyKSk7XG4gICAgICB9KTtcblxuICAgICAgY29uc3QgZmlsdGVycyA9IChhd2FpdCBQcm9taXNlLmFsbChkYXRhcykpLmZpbHRlcihcbiAgICAgICAgKGR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5BY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgIGZlZVBheWVyLFxuICAgICAgICB0b2tlbkFzc29jaWF0ZWQsXG4gICAgICAgIG93bmVyLFxuICAgICAgICBtaW50LFxuICAgICAgKSxcbiAgICApO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVNaW50VG9DaGVja2VkSW5zdHJ1Y3Rpb24oXG4gICAgICAgIG1pbnQsXG4gICAgICAgIHRva2VuQXNzb2NpYXRlZCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIENhbGN1bGF0ZS5jYWxjdWxhdGVBbW91bnQodG90YWxBbW91bnQsIG1pbnREZWNpbWFsKSxcbiAgICAgICAgbWludERlY2ltYWwsXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUNyZWF0ZU1ldGFkYXRhQWNjb3VudFYzSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHtcbiAgICAgICAgICBtZXRhZGF0YTogbWV0YWRhdGFQZGEsXG4gICAgICAgICAgbWludCxcbiAgICAgICAgICBtaW50QXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBwYXllcjogZmVlUGF5ZXIsXG4gICAgICAgICAgdXBkYXRlQXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgIGNyZWF0ZU1ldGFkYXRhQWNjb3VudEFyZ3NWMzoge1xuICAgICAgICAgICAgZGF0YTogdG9rZW5NZXRhZGF0YSxcbiAgICAgICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICAgICAgIGNvbGxlY3Rpb25EZXRhaWxzOiBudWxsLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICApLFxuICAgICk7XG4gICAgcmV0dXJuIGluc3RydWN0aW9ucztcbiAgfTtcblxuICAvKipcbiAgICogU1BMLVRPS0VOIG1pbnRcbiAgICpcbiAgICogQH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fTtcbiAgICAgICAgY29uc3QgdXBsb2FkZWQgPSBhd2FpdCBTdG9yYWdlLnVwbG9hZERhdGEoXG4gICAgICAgICAgeyAuLi5zdG9yYWdlTWV0YWRhdGEsIC4uLmltYWdlIH0sXG4gICAgICAgICAgc3RvcmFnZVR5cGUsXG4gICAgICAgICAgcGF5ZXIsXG4gICAgICAgICk7XG4gICAgICAgIGlmICh1cGxvYWRlZC5pc0Vycikge1xuICAgICAgICAgIHRocm93IHVwbG9hZGVkO1xuICAgICAgICB9XG4gICAgICAgIHVyaSA9IHVwbG9hZGVkLnZhbHVlO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgdGhyb3cgRXJyb3IoYE11c3Qgc2V0IGZpbGVQYXRoJyBvciAndXJpJ2ApO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBpc011dGFibGUgPSB0cnVlO1xuXG4gICAgICBjb25zdCBkYXRhdjIgPSBDb252ZXJ0ZXIuVG9rZW5NZXRhZGF0YS5pbnRvSW5mcmEoXG4gICAgICAgIGlucHV0LFxuICAgICAgICB1cmksXG4gICAgICAgIHNlbGxlckZlZUJhc2lzUG9pbnRzLFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgZGF0YXYyOiAnLCBkYXRhdjIpO1xuICAgICAgZGVidWdMb2coJyMgdXBsb2FkIGNvbnRlbnQgdXJsOiAnLCB1cmkpO1xuXG4gICAgICBjb25zdCBtaW50ID0gQWNjb3VudC5LZXlwYWlyLmNyZWF0ZSgpO1xuICAgICAgY29uc3QgaW5zdHMgPSBhd2FpdCBjcmVhdGVNaW50KFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICB0b3RhbEFtb3VudCxcbiAgICAgICAgbWludERlY2ltYWwsXG4gICAgICAgIGRhdGF2MixcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICBpc011dGFibGUsXG4gICAgICApO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LCBFcnJvcj4+ID0+IHtcbiAgICByZXR1cm4gVHJ5KGFzeW5jICgpID0+IHtcbiAgICAgIGNvbnN0IHBheWVyID0gb3B0aW9ucy5mZWVQYXllciA/IG9wdGlvbnMuZmVlUGF5ZXIgOiBvd25lck9yTXVsdGlzaWdbMF07XG4gICAgICBjb25zdCBrZXlwYWlycyA9IG93bmVyT3JNdWx0aXNpZy5tYXAoKHMpID0+IHMudG9LZXlwYWlyKCkpO1xuXG4gICAgICBjb25zdCBzb3VyY2VUb2tlbiA9IGF3YWl0IEFjY291bnQuQXNzb2NpYXRlZC5yZXRyeUdldE9yQ3JlYXRlKFxuICAgICAgICBtaW50LFxuICAgICAgICBvd25lcixcbiAgICAgICAgcGF5ZXIsXG4gICAgICApO1xuXG4gICAgICBjb25zdCBkZXN0VG9rZW4gPSBhd2FpdCBBY2NvdW50LkFzc29jaWF0ZWQucmV0cnlHZXRPckNyZWF0ZShcbiAgICAgICAgbWludCxcbiAgICAgICAgZGVzdCxcbiAgICAgICAgcGF5ZXIsXG4gICAgICApO1xuXG4gICAgICBjb25zdCBpbnN0ID0gY3JlYXRlVHJhbnNmZXJDaGVja2VkSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHNvdXJjZVRva2VuLnRvUHVibGljS2V5KCksXG4gICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgZGVzdFRva2VuLnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIENhbGN1bGF0b3IuY2FsY3VsYXRlQW1vdW50KGFtb3VudCwgbWludERlY2ltYWwpLFxuICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICAga2V5cGFpcnMsXG4gICAgICApO1xuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb24oW2luc3RdLCBrZXlwYWlycywgcGF5ZXIudG9LZXlwYWlyKCkpO1xuICAgIH0pO1xuICB9O1xufVxuIiwg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FxuICAgICAgfSksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKGNyZWF0ZUluaXRpYWxpemVNaW50SW5zdHJ1Y3Rpb24obWludCwgMCwgb3duZXIsIG93bmVyKSk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihmZWVQYXllciwgYXRhLCBvd25lciwgbWludCksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKGNyZWF0ZU1pbnRUb0NoZWNrZWRJbnN0cnVjdGlvbihtaW50LCBhdGEsIG93bmVyLCAxLCAwKSk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUNyZWF0ZU1ldGFkYXRhQWNjb3VudFYzSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHtcbiAgICAgICAgICBtZXRhZGF0YTogdG9rZW5NZXRhZGF0YVB1YmtleSxcbiAgICAgICAgICBtaW50LFxuICAgICAgICAgIG1pbnRBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICAgIHBheWVyOiBmZWVQYXllcixcbiAgICAgICAgICB1cGRhdGVBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICB9LFxuICAgICAgICB7XG4gICAgICAgICAgY3JlYXRlTWV0YWRhdGFBY2NvdW50QXJnc1YzOiB7XG4gICAgICAgICAgICBkYXRhOiBuZnRNZXRhZGF0YSxcbiAgICAgICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICAgICAgIGNvbGxlY3Rpb25EZXRhaWxzOiBudWxsLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUNyZWF0ZU1hc3RlckVkaXRpb25WM0luc3RydWN0aW9uKFxuICAgICAgICB7XG4gICAgICAgICAgZWRpdGlvbjogbWFzdGVyRWRpdGlvblB1YmtleSxcbiAgICAgICAgICBtaW50LFxuICAgICAgICAgIHVwZGF0ZUF1dGhvcml0eTogb3duZXIsXG4gICAgICAgICAgbWludEF1dGhvcml0eTogb3duZXIsXG4gICAgICAgICAgcGF5ZXI6IGZlZVBheWVyLFxuICAgICAgICAgIG1ldGFkYXRhOiB0b2tlbk1ldGFkYXRhUHVia2V5LFxuICAgICAgICB9LFxuICAgICAgICB7XG4gICAgICAgICAgY3JlYXRlTWFzdGVyRWRpdGlvbkFyZ3M6IHtcbiAgICAgICAgICAgIG1heFN1cHBseTogMCxcbiAgICAgICAgICB9LFxuICAgICAgICB9LFxuICAgICAgKSxcbiAgICApO1xuICAgIHJldHVybiBpbnN0cnVjdGlvbnM7XG4gIH07XG5cbiAgLyoqXG4gICAqIFVwbG9hZCBjb250ZW50IGFuZCBORlQgbWludFxuICAgKlxuICAgKiBAcGFyYW0ge1NlY3JldH0gb3duZXIgICAgICAgICAvLyBvd25lcidzIFNlY3JldFxuICAgKiBAcGFyYW0ge0lucHV0TmZ0TWV0YWRhdGF9IGlucHV0XG4gICAqIHtcbiAgICogICBuYW1lOiBzdHJpbmcgICAgICAgICAgICAgICAvLyBuZnQgY29udGVudCBuYW1lXG4gICAqICAgc3ltYm9sOiBzdHJpbmcgICAgICAgICAgICAgLy8gbmZ0IHRpY2tlciBzeW1ib2xcbiAgICogICBmaWxlUGF0aDogc3RyaW5nIHwgRmlsZSAgICAvLyBuZnQgdGlja2VyIHN5bWJvbFxuICAgKiAgIHJveWFsdHk6IG51bWJlciAgICAgICAgICAgIC8vIHJveWFsdHkgcGVyY2VudGFnZVxuICAgKiAgIHN0b3JhZ2VUeXBlOiAnYXJ3ZWF2ZSd8J25mdFN0b3JhZ2UnIC8vIERlY2VudHJhbGl6ZWQgc3RvcmFnZVxuICAgKiAgIGRlc2NyaXB0aW9uPzogc3RyaW5nICAgICAgIC8vIG5mdCBjb250ZW50IGRlc2NyaXB0aW9uXG4gICAqICAgZXh0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gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgKTtcblxuICAgICAgLy8gZnJlZXplQXV0aG9yaXR5XG4gICAgICBpZiAoZnJlZXplQXV0aG9yaXR5KSB7XG4gICAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICAgIGNyZWF0ZURlbGVhZ2F0ZShcbiAgICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICAgICAgZnJlZXplQXV0aG9yaXR5LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgLy8gY29sbGVjdGlvbiAtLS1cbiAgICAgIGlmIChpbnB1dC5jb2xsZWN0aW9uKSB7XG4gICAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICAgIGNyZWF0ZVZlcmlmeVNpemVkQ29sbGVjdGlvbihcbiAgICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIGlucHV0LmNvbGxlY3Rpb24udG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBrZXlwYWlycyA9IFtvd25lci50b0tleXBhaXIoKSwgbWludC50b0tleXBhaXIoKV07XG5cbiAgICAgIC8vIGNyZWF0b3IgLS0tXG4gICAgICBpZiAoaW5wdXQuY3JlYXRvcnMpIHtcbiAgICAgICAgaW5wdXQuY3JlYXRvcnMuZm9yRWFjaCgoY3JlYXRvcikgPT4ge1xuICAgICAgICAgIGlmIChBY2NvdW50LktleXBhaXIuaXNTZWNyZXQoY3JlYXRvci5zZWNyZXQpKSB7XG4gICAgICAgICAgICBjb25zdCBjcmVhdG9yUHVia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gaW5wdXQpO1xuICAgICAgZGVidWdMb2coJyMgZGF0YXYyOiAnLCBkYXRhdjIpO1xuXG4gICAgICBjb25zdCBjb2xsZWN0aW9uTWludCA9IEFjY291bnQuS2V5cGFpci5jcmVhdGUoKTtcbiAgICAgIGNvbnN0IGNvbGxlY3Rpb25NZXRhZGF0YUFjY291bnQgPSBBY2NvdW50LlBkYS5nZXRNZXRhZGF0YShcbiAgICAgICAgY29sbGVjdGlvbk1pbnQucHVia2V5LFxuICAgICAgKTtcblxuICAgICAgY29uc3QgaW5zdHJ1Y3Rpb25zID0gYXdhaXQgTWludC5jcmVhdGVNaW50KFxuICAgICAgICBjb2xsZWN0aW9uTWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgZGF0YXYyLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICk7XG5cbiAgICAgIC8vIGZyZWV6ZUF1dGhvcml0eVxuICAgICAgaWYgKGZyZWV6ZUF1dGhvcml0eSkge1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgICBNaW50LmNyZWF0ZURlbGVhZ2F0ZShcbiAgICAgICAgICAgIGNvbGxlY3Rpb25NaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgICAgIGZyZWV6ZUF1dGhvcml0eS50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGNvbGxlY3Rpb25zID0ge1xuICAgICAgICBjb2xsZWN0aW9uTWV0YWRhdGE6IGNvbGxlY3Rpb25NZXRhZGF0YUFjY291bnQsXG4gICAgICAgIGNvbGxlY3Rpb25BdXRob3JpdHk6IG93bmVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgY29sbGVjdGlvbk1pb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yIiwgImltcG9ydF9zcGxfdG9rZW4iLCAiU3BsVG9rZW4iLCAiQWNjb3VudCIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiU3BsVG9rZW4iLCAiUmVndWxhck5mdCIsICJTcGxUb2tlbiIsICJSZWd1bGFyTmZ0IiwgIkRhc0FwaSIsICJpbXBvcnRfc3BsX3Rva2VuIiwgImltcG9ydF9tcGxfdG9rZW5fbWV0YWRhdGEiLCAiUmVndWxhck5mdCIsICJBY2NvdW50IiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJpbXBvcnRfd2ViMyIsICJpbXBvcnRfc3BsX3Rva2VuIiwgImltcG9ydF9tcGxfdG9rZW5fbWV0YWRhdGEiLCAiUmVndWxhck5mdCIsICJtaW50IiwgIkFjY291bnQiLCAiQ29udmVydGVyIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJpbXBvcnRfd2ViMyIsICJSZWd1bGFyTmZ0IiwgIkNvbnZlcnRlciIsICJBY2NvdW50IiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJSZWd1bGFyTmZ0IiwgIlNwbFRva2VuIiwgImltcG9ydF9tcGxfdG9rZW5fbWV0YWRhdGEiLCAiUmVndWxhck5mdCIsICJDb252ZXJ0ZXIiLCAiQWNjb3VudCIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiaW1wb3J0X3NwbF90b2tlbiIsICJpbXBvcnRfbXBsX3Rva2VuX21ldGFkYXRhIiwgIlJlZ3VsYXJOZnQiLCAiQWNjb3VudCIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiUmVndWxhck5mdCIsICJTcGxUb2tlbiIsICJSZWd1bGFyTmZ0IiwgIkNvbXByZXNzZWROZnQiLCAiUmVndWxhck5mdCIsICJDb21wcmVzc2VkTmZ0Il0KfQo= \ No newline at end of file +//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgI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pbmcpID0+IHtcbiAgICAgICAgICAgICAgICBhd2FpdCBOb2RlLmNvbmZpcm1lZFNpZyhvayk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGluc3QuZGF0YTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgKGVycjogRXJyb3IpID0+IHtcbiAgICAgICAgICAgICAgICBkZWJ1Z0xvZygnIyBFcnJvciBzdWJtaXQgcmV0cnlHZXRPckNyZWF0ZTogJywgZXJyKTtcbiAgICAgICAgICAgICAgICB0aHJvdyBlcnI7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgIGRlYnVnTG9nKGAjIHJldHJ5OiAke2NvdW50ZXJ9IGNyZWF0ZSB0b2tlbiBhY2NvdW50OiBgLCBlKTtcbiAgICAgICAgICBkZWJ1Z0xvZyhgIyBtaW50OiAke21pbnR9LCBvd25lcjogJHtvd25lcn0sIGZlZVBheWVyOiAke2ZlZVBheWVyfWApO1xuICAgICAgICB9XG4gICAgICAgIGF3YWl0IHNsZWVwKFJFVFJZX1NMRUVQX1RJTUUpO1xuICAgICAgICBjb3VudGVyKys7XG4gICAgICB9XG4gICAgICB0aHJvdyBFcnJvcihgcmV0cnkgYWN0aW9uIGlzIG92ZXIgbGltaXQgJHtSRVRSWV9PVkVSX0xJTUlUfWApO1xuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiBbTWFpbiBsb2dpY11HZXQgQXNzb2NpYXRlZCB0b2tlbiBBY2NvdW50LlxuICAgICAqIGlmIG5vdCBjcmVhdGVkLCBjcmVhdGUgbmV3IHRva2VuIGFjY291aW50XG4gICAgICpcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gbWludFxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBvd25lclxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBmZWVQYXllclxuICAgICAqIEByZXR1cm5zIFByb21pc2U8c3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ICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3Q6IHVuZGVmaW5lZCxcbiAgICAgICAgfTtcbiAgICAgIH0gY2F0Y2ggKGVycm9yOiB1bmtub3duKSB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5BY2NvdW50Tm90Rm91bmRFcnJvcikgJiZcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5JbnZhbGlkQWNjb3VudE93bmVyRXJyb3IpXG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9yKCdVbmV4cGVjdGVkIGVycm9yJyk7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBwYXllciA9ICFmZWVQYXllciA/IG93bmVyIDogZmVlUGF5ZXI7XG5cbiAgICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgICBwYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgICBBU1NPQ0lBVEVEX1RPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG5cbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICB0b2tlbkFjY291bnQ6IGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSxcbiAgICAgICAgICBpbnN0LFxuICAgICAgICB9O1xuICAgICAgfVxuICAgIH07XG4gIH1cbn1cbiIsICJpbXBvcnQgeyBLZXlwYWlyIGFzIE9yaWdpbmFsLCBQdWJsaWNLZXkgfSBmcm9tICdAc29sYW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ZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJGZWVCYXNpc1BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0YWRhdGEubmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzeW1ib2wnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLnN5bWJvbCkge1xuICAgICAgICAgICAgICByZXMgPSBpc1N5bWJvbChtZXRhZGF0YS5zeW1ib2wpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHJlcyAmJiByZXMuaXNFcnIpIHtcbiAgICAgICAgICByZXN1bHRzLnB1c2goLi4ucmVzLmVycm9yLmRldGFpbHMpO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIGlmIChyZXN1bHRzLmxlbmd0aCA+IDApIHtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9XG4gICAgICAgICAgJ0NhdWdodCBpbiB0aGUgdmFsaWRhdGlvbiBlcnJvcnMuIHNlZSBpbmZvcm1hdGlvbiBlLmc6IGVycjxWYWxpZGF0b3JFcnJvcj4uZGV0YWlscyc7XG4gICAgICAgIHRocm93IG5ldyBWYWxpZGF0b3JFcnJvcihtZXNzYWdlLCByZXN1bHRzKTtcbi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oT2ZmY2hhaW4oXG4gICAgICAgICAgICAgIGl0ZW0uY29udGVudC5qc29uX3VyaSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgICBjb25zdCBtZXJnZWQgPSB7XG4gICAgICAgICAgICAgIG9uY2hhaW46IGl0ZW0sXG4gICAgICAgICAgICAgIG9mZmNoYWluOiBvZmZjaGFpbixcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICByZXR1cm4gQ29udmVydGVyLk5mdC5pbnRvVXNlcihtZXJnZWQpO1xuICAgICAgICAgIH0gY2F0Y2ggKGVycikge1xuICAgICAgICAgICAgZGVidWdMb2coJyMgRmFpbGVkIGZldGNoIG9mZmNoYWluIHVybDogJywgaXRlbS5jb250ZW50Lmpzb25fdXJpKTtcbiAgICAgICAgICAgIHJldHVybiBDb252ZXJ0ZXIuTmZ0LmludG9Vc2VyKHtcbiAgICAgICAgICAgICAgb25jaGFpbjogaXRlbSxcbiAgICAgICAgICAgICAgb2ZmY2hhaW46IHt9LFxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfVxuICAgICAgICB9KSxcbiAgICApO1xuICAgIHJldHVybiB7XG4gICAgICBwYWdlOiBhc3NldHMudmFsdWUucGFnZSxcbiAgICAgIHRvdGFsOiBhc3NldHMudmFsdWUudG90YWwsXG4gICAgICBsaW1pdDogYXNzZXRzLnZhbHVlLmxpbWl0LFxuICAgICAgbWV0YWRhdGFzLFxuICAgIH07XG4gIH07XG5cbiAgLyoqXG4gICAqIEZpbmQgbmZ0IGJ5IGNvbGxlY3Rpb24gbWludFxuICAgKlxuICAgKiBAcGFyYW0ge1B1YmtleX0gY29sbGVjdGlvbk1pbnRcbiAgICogQHBhcmFtIHtib29sZWFufSBpc0NvbXByZXNzZWQsXG4gICAqIEBwYXJhbSB7UGFydGlhbDxGaW5kT3B0aW9ucz59IG9wdGlvbnNcbiAgICogQHJldHVybiBQcm9taXNlPFJlc3VsdDxDb21wcmVzc2VkTmZ0TWV0YWRhdGEsIEVycm9yP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ldFByb29mLnByb29mXG4gICAgICAubWFwKChub2RlOiBzdHJpbmcpID0+ICh7XG4gICAgICAgIHB1YmtleTogbm9kZS50b1B1YmxpY0tleSgpLFxuICAgICAgICBpc1NpZ25lcjogZmFsc2UsXG4gICAgICAgIGlzV3JpdGFibGU6IGZhbHNlLFxuICAgICAgfSkpXG4gICAgICAuc2xpY2UoMCwgYXNzZXRQcm9vZi5wcm9vZi5sZW5ndGggLSAoY2Fub3B5RGVwdGggPyBjYW5vcHlEZXB0aCA6IDApKTtcblxuICAgIHJldHVybiBjcmVhdGVEZWxlZ2F0ZUluc3RydWN0aW9uKFxuICAgICAge1xuICAgICAgICB0cmVlQXV0aG9yaXR5LFxuICAgICAgICBsZWFmT3duZXI6IG93bmVyc2hpcC5vd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICBwcmV2aW91c0xlYWZEZWxlZ2F0ZSxcbiAgICAgICAgbmV3TGVhZkRlbGVnYXRlLFxuICAgICAgICBtZXJrbGVUcmVlOiBhc3NldFByb29mLnRyZWVfaWQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgbG9nV3JhcHBlcjogU1BMX05PT1BfUFJPR1JBTV9JRCxcbiAgICAgICAgY29tcHJlc3Npb25Qcm9ncmFtOiBTUExfQUNDT1VOVF9DT01QUkVTU0lPTl9QUk9HUkFNX0lELFxuICAgICAgICBhbmNob3JSZW1haW5pbmdBY2NvdW50czogc2xpY2VkUHJvb2YsXG4gICAgICB9LFxuICAgICAge1xuICAgICAgICByb290OiBbLi4uYXNzZXRQcm9vZi5yb290LnRyaW0oKS50b1B1YmxpY0tleSgpLnRvQnl0ZXMoKV0sXG4gICAgICAgIGRhdGFIYXNoOiBbLi4uY29tcHJlc3Npb24uZGF0YV9oYXNoLnRyaW0oKS50b1B1YmxpY0tleSgpLnRvQnl0ZXMoKV0sXG4gICAgICAgIGNyZWF0b3JIYXNoOiBbXG4gICAgICAgICAgLi4uY29tcHJlc3Npb24uY3JlYXRvcl9oYXNoLnRy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gICAge1xuICAgICAgICAgICAgbWVya2xlVHJlZTogdHJlZU93bmVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgICAgIHRyZWVBdXRob3JpdHksXG4gICAgICAgICAgICB0cmVlQ3JlYXRvcjogb3duZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICAgICAgcGF5ZXI6IHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgICAgIGxvZ1dyYXBwZXI6IFNQTF9OT09QX1BST0dSQU1fSUQsXG4gICAgICAgICAgICBjb21wcmVzc2lvblByb2dyYW06IFNQTF9BQ0NPVU5UX0NPTVBSRVNTSU9OX1BST0dSQU1fSUQsXG4gICAgICAgICAgfSxcbiAgICAgICAgICB7XG4gICAgICAgICAgICBtYXhCdWZmZXJTaXplLFxuICAgICAgICAgICAgbWF4RGVwdGgsXG4gICAgICAgICAgICBwdWJsaWM6IGZhbHNlLFxuICAgICAgICAgIH0sXG4gICAgICAgICAgTVBMX0JVQkJMRUdVTV9QUk9HUkFNX0lELnRvUHVibGljS2V5KCksXG4gICAgICAgICksXG4gICAgICApO1xuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5NaW50KFxuICAgICAgICBpbnN0cnVjdGlvbnMsXG4gICAgICAgIFt0cmVlT3duZXIudG9LZXlwYWlyKCksIG93bmVyLnRvS2V5cGFpcigpXSxcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCksXG4gICAgICAgIHRyZWVPd25lci5wdWJrZXksXG4gICAgICApO1xuICAgIH0pO1xuICB9O1xuXG4gIC8qKlxuICAgKiBjcmVhdGUgYSBuZXcgbmZ0IHNwYWNlXG4gICAqIFRoaXMgZnVuY3Rpb24gbmVlZHMgb25seSAxIGNhbGxcbiAgICpcbiAgICogQHBhcmFtIHtTZWNyZXR9IG93bmVyXG4gICAqIEBwYXJhbSB7U3BhY2VOdW1iZXJ9IHNwYWNlU2l6ZVxu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AgICAgICAgICBtZXJrbGVUcmVlOiB0cmVlT3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIHRyZWVBdXRob3JpdHksXG4gICAgICAgICAgICB0cmVlRGVsZWdhdGU6IG93bmVyUHVibGljS2V5LFxuICAgICAgICAgICAgcGF5ZXI6IHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgICAgIGxlYWZPd25lcjogbGVhZk93bmVyLCAvLyByZWNlaXZlclxuICAgICAgICAgICAgbGVhZkRlbGVnYXRlOiBsZWFmRGVsZWdhdGUudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIGNvbGxlY3Rpb25BdXRob3JpdHk6IG93bmVyUHVibGljS2V5LFxuICAgICAgICAgICAgY29sbGVjdGlvbk1pbnQ6IGNvbGxlY3Rpb25NaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBjb2xsZWN0aW9uTWV0YWRhdGEsXG4gICAgICAgICAgICBlZGl0aW9uQWNjb3VudDogY29sbGVjdGlvbk1hc3RlckVkaXRpb25BY2NvdW50LFxuICAgICAgICAgICAgYnViYmxlZ3VtU2lnbmVyLFxuICAgICAgICAgICAgbG9nV3JhcHBlcjogU1BMX05PT1BfUFJPR1JBTV9JRCxcbiAgICAgICAgICAgIGNvbGxlY3Rpb25BdXRob3JpdHlSZWNvcmRQZGE6IEJVQkJMRUdVTV9QUk9HUkFNX0lELFxuICAgICAgICAgICAgY29tcHJlc3Npb25Qcm9ncmFtOiBTUExfQUNDT1VOVF9DT01QUkVTU0lPTl9QUk9HUkFNX0lELFxuICAgICAgICAgICAgdG9rZW5NZXRhZGF0YVByb2dyYW06IFRPS0VOX01FVEFEQVRBX1BST0dSQU1fSUQsXG4gICAgICAgICAgfSxcbiAgICAgICAgICB7XG4gICAgICAgICAgICBtZXRhZGF0YUFyZ3MsXG4gICAgICAgICAgfSxcbiAgICAgICAgKSxcbiAgICAgICk7XG5cbiAgICAgIGlmIChpbnB1dC5j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VQYXllciA/IG9wdGlvbnMuZmVlUGF5ZXIgOiBvd25lck9yTXVsdGlzaWdbMF07XG4gICAgICBjb25zdCBrZXlwYWlycyA9IG93bmVyT3JNdWx0aXNpZy5tYXAoKHMpID0+IHMudG9LZXlwYWlyKCkpO1xuXG4gICAgICBjb25zdCB0b2tlbkFzc29jaWF0ZWQgPSBhd2FpdCBBY2NvdW50LkFzc29jaWF0ZWQucmV0cnlHZXRPckNyZWF0ZShcbiAgICAgICAgdG9rZW4sXG4gICAgICAgIG93bmVyLFxuICAgICAgICBwYXllcixcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVNaW50VG9DaGVja2VkSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHRva2VuLnRvUHVibGljS2V5KCksXG4gICAgICAgIHRva2VuQXNzb2NpYXRlZC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICBDYWxjdWxhdGUuY2FsY3VsYXRlQW1vdW50KHRvdGFsQW1vdW50LCBtaW50RGVjaW1hbCksXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICBrZXlwYWlycyxcbiAgICAgICk7XG5cbiAgICAgIHJldHVybiBuZXcgVHJhbnNhY3Rpb25CdWlsZGVyLkNvbW1vbjxQdWJrZXk+KFxuICAgICAgICBbaW5zdF0sXG4gICAgICAgIGtleXBhaXJzLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgdG9rZW4sXG4gICAgICApO1xuICAgIH0pO1xuICB9O1xufVxuIiwgIi8vQGludGVybmFsXG5leHBvcnQgbmFtZXNwYWNlIFNwbFRva2VuIHtcbiAgZXhwb3J0IGNvbnN0IGNhbGN1bGF0ZUFtb3VudCA9IChcbiAgICBhbW91bnQ6IG51bWJlcixcbiAgICBtaW50RGVjaW1hbDogbnVtYmVyLFxuICApOiBudW1iZXIgPT4ge1xuICAgIHJldHVybiBhbW91bnQgKiAxMC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F9SRVRSSUVTfSlgKTtcbiAgICAgIH1cbiAgICB9XG4gIH07XG5cbiAgLyoqXG4gICAqIEZldGNoIG1pbnRlZCBtZXRhZGF0YSBieSBvd25lciBQdWJrZXlcbiAgICpcbiAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAqIEByZXR1cm4ge1Byb21pc2U8UmVzdWx0PFRva2VuTWV0YWRhdGFbXXwgRXJyb3I+Pn1cbiAgICovXG4gIGV4cG9ydCBjb25zdCBmaW5kQnlPd25lciA9IGFzeW5jIChcbiAgICBvd25lcjogUHVia2V5LFxuICApOiBQcm9taXNlPFJlc3VsdDxUb2tlbk1ldGFkYXRhW10sIEVycm9yPj4gPT4ge1xuICAgIHJldHVybiBUcnkoYXN5bmMgKCkgPT4ge1xuICAgICAgY29uc3QgY29ubmVjdGlvbiA9IE5vZGUuZ2V0Q29ubmVjdGlvbigpO1xuICAgICAgY29uc3QgaW5mbyA9IGF3YWl0IGNvbm5lY3Rpb24uZ2V0UGFyc2VkVG9rZW5BY2NvdW50c0J5T3duZXIoXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIHtcbiAgICAgICAgICBwcm9ncmFtSWQ6IFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgIH0sXG4gICAgICApO1xuXG4gICAgICBjb25zdCBkYXRhcyA9IGluZm8udmFsdWUubWFwKGFzeW5jIChkKSA9PiB7XG4gICAgICAgIGNvbnN0IG1pbnQgPSBkLmFjY291bnQuZGF0YS5wYXJzZWQuaW5mby5taW50IGFzIFB1YmtleTtcbiAgICAgICAgY29uc3QgdG9rZW5BbW91bnQgPSBkLmFjY291bnQuZGF0YS5wYXJzZWQuaW5mby50b2tlbkFtb3VudFxuICAgICAgICAgIC5hbW91bnQgYXMgc3RyaW5nO1xuICAgICAgICBpZiAodG9rZW5BbW91bnQgPT09ICcxJykge1xuICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gTWV0Y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GZlZVBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICB9KTtcblxuICAgICAgLy8gcmV0dXJuIGFzc29jaWF0ZWQgdG9rZW4gYWNjb3VudFxuICAgICAgaWYgKCFkZXN0VG9rZW4uaW5zdCkge1xuICAgICAgICBpbnN0MiA9IGNyZWF0ZVRyYW5zZmVyQ2hlY2tlZEluc3RydWN0aW9uKFxuICAgICAgICAgIHNvdXJjZVRva2VuLnRva2VuQWNjb3VudC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBkZXN0VG9rZW4udG9rZW5BY2NvdW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgICAgQ2FsY3VsYXRvci5jYWxjdWxhdGVBbW91bnQoYW1vdW50LCBtaW50RGVjaW1hbCksXG4gICAgICAgICAgbWludERlY2ltYWwsXG4gICAgICAgICAgW293bmVyLnRvS2V5cGFpcigpXSxcbiAgICAgICAgKTtcbiAgICAgICAgdHguYWRkKGluc3QyKTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIC8vIHJldHVybiBpbnN0cnVjdGlvbiBhbmQgdW5kZWNpZGVkIGFzc29jaWF0ZWQgdG9rZW4gYWNjb3VudFxuICAgICAgICBpbnN0MiA9IGNyZWF0ZVRyYW5zZmVyQ2hlY2tlZEluc3RydWN0aW9uKFxuICAgICAgICAgIHNvdXJjZVRva2VuLnRva2VuQWNjb3VudC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBkZXN0VG9rZW4udG9rZW5BY2NvdW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgICAgQ2FsY3VsYXRvci5jYWxjdWxhdGVBbW91bnQoYW1vdW50LCBtaW50RGVjaW1hbCksXG4gICAgICAgICAgbWludERlY2ltYWwsXG4gICA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c29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jKG1pbnQsIG93bmVyKTtcbiAgICBjb25zdCBpbnN0cnVjdGlvbnMgPSBbXTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgU3lzdGVtUHJvZ3JhbS5jcmVhdGVBY2NvdW50KHtcbiAgICAgICAgZnJvbVB1YmtleTogZmVlUGF5ZXIsXG4gICAgICAgIG5ld0FjY291bnRQdWJrZXk6IG1pbnQsXG4gICAgICAgIHNwYWNlOiBNSU5UX1NJWkUsXG4gICAgICAgIGxhbXBvcnRzOiBsYW1wb3J0cyxcbiAgICAgICAgcHJvZ3JhbUlkOiBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgfSksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlSW5pdGlhbGl6ZU1pbnRJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgbWludERlY2ltYWwsXG4gICAgICAgIG93bmVyLFxuICAgICAgICBvd25lcixcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICBmZWVQYXllcixcbiAgICAgICAgdG9rZW5Bc3NvY2lhdGVkLFxuICAgICAgICBvd25lcixcbiAgICAgICAgbWludCxcbiAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlTWludFRvQ2hlY2tlZEluc3RydWN0aW9uKFxuICAgICAgICBtaW50LFxuICAgICAgICB0b2tlbkFzc29jaWF0ZWQsXG4gICAgICAgIG93bmVyLFxuICAgICAgICBDYWxjdWxhdGUuY2FsY3VsYXRlQW1vdW50KHRvdGFsQW1vdW50LCBtaW50RGVjaW1hbCksXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgKSxcbiAgICApO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVDcmVhdGVNZXRhZGF0YUFjY291bnRWM0luc3RydWN0aW9uKFxuICAgICAgICB7XG4gICAgICAgICAgbWV0YWRhdGE6IG1ldGFkYXRhUGRhLFxuICAgICAgICAgIG1pbnQsXG4gICAgICAgICAgbWludEF1dGhvcml0eTogb3duZXIsXG4gICAgICAgICAgcGF5ZXI6IGZlZVBheWVyLFxuICAgICAgICAgIHVwZGF0ZUF1dGhvcml0eTogb3duZXIsXG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICBjcmVhdGVNZXRhZGF0YUFjY291bnRBcmdzVjM6IHtcbiAgICAgICAgICAgIGRhdGE6IHRva2VuTWV0YWRhdGEsXG4gICAgICAgICAgICBpc011dGFibGUsXG4gICAgICAgICAgICBjb2xsZWN0aW9uRGV0YWlsczogbnVsbCxcbiAgICAgICAgICB9LFxuICAgICAgICB9LFxuICAgICAgKSxcbiAgICApO1xuICAgIHJldHVybiBpbnN0cnVjdGlvbnM7XG4gIH07XG5cbiAgLyoqXG4gICAqIFNQTC1UT0tFTiBtaW50XG4gICAqXG4gICAqIEBwYXJhbSB7U2VjcmV0fSBvd25lciAgICAgIC8vIHRva2VuIG93bmVyIFNlY3JldFxuICAgKiBAcGFyYW0ge251bWJlcn0gdG90YWxBbW91bnQgLy8gdG90YWwgbnVtYmVyXG4gICAqIEBwYXJhbSB7bnVtYmVyfSBtaW50RGVjaW1hbCAvLyB0b2tlbiBkZWNpbWFsXG4gICAqIEBwYXJhbSB7SW5wdXRUb2tlbk1ldGFkYXRhfSBpbnB1dCAgICAgICAvLyB0b2tlbiBtZXRhZGF0YVxuICAgKiBAcGFyYW0ge1BhcnRpYWw8TWludE9wdGlvbnM+fSBvcHRpb25zICAgLy8gb3B0aW9uc1xuICAgKiBAcmV0dXJuIFByb21pc2U8UmVzdWx0PE1pbnRJb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yaSdgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgaXNNdXRhYmxlID0gdHJ1ZTtcblxuICAgICAgY29uc3QgZGF0YXYyID0gQ29udmVydGVyLlRva2VuTWV0YWRhdGEuaW50b0luZnJhKFxuICAgICAgICBpbnB1dCxcbiAgICAgICAgdXJpLFxuICAgICAgICBzZWxsZXJGZWVCYXNpc1BvaW50cyxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGRhdGF2MjogJywgZGF0YXYyKTtcbiAgICAgIGRlYnVnTG9nKCcjIHVwbG9hZCBjb250ZW50IHVybDogJywgdXJpKTtcblxuICAgICAgY29uc3QgbWludCA9IEFjY291bnQuS2V5cGFpci5jcmVhdGUoKTtcbiAgICAgIGNvbnN0IGluc3RzID0gYXdhaXQgY3JlYXRlTWludChcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgdG90YWxBbW91bnQsXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICBkYXRhdjIsXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgKTtcblxuICAgICAgLy8gZnJlZXplQXV0aG9yaXR5XG4gICAgICBpZiAoZnJlZXplQXV0aG9yaXR5KSB7XG4gICAgICAgIGluc3RzLnB1c2goXG4gICAgICAgICAgY3JlYXRlRnJlZXplQXV0aG9yaXR5KFxuICAgICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgICAgICBmcmVlemVBdXRob3JpdHkudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5NaW50KFxuICAgICAgICBpbnN0cyxcbiAgICAgICAgW293bmVyLnRvS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vd25lciwgMSwgMCkpO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVDcmVhdGVNZXRhZGF0YUFjY291bnRWM0luc3RydWN0aW9uKFxuICAgICAgICB7XG4gICAgICAgICAgbWV0YWRhdGE6IHRva2VuTWV0YWRhdGFQdWJrZXksXG4gICAgICAgICAgbWludCxcbiAgICAgICAgICBtaW50QXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBwYXllcjogZmVlUGF5ZXIsXG4gICAgICAgICAgdXBkYXRlQXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgIGNyZWF0ZU1ldGFkYXRhQWNjb3VudEFyZ3NWMzoge1xuICAgICAgICAgICAgZGF0YTogbmZ0TWV0YWRhdGEsXG4gICAgICAgICAgICBpc011dGFibGUsXG4gICAgICAgICAgICBjb2xsZWN0aW9uRGV0YWlsczogbnVsbCxcbiAgICAgICAgICB9LFxuICAgICAgICB9LFxuICAgICAgKSxcbiAgICApO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVDcmVhdGVNYXN0ZXJFZGl0aW9uVjNJbnN0cnVjdGlvbihcbiAgICAgICAge1xuICAgICAgICAgIGVkaXRpb246IG1hc3RlckVkaXRpb25QdWJrZXksXG4gICAgICAgICAgbWludCxcbiAgICAgICAgICB1cGRhdGVBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICAgIG1pbnRBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICAgIHBheWVyOiBmZWVQYXllcixcbiAgICAgICAgICBtZXRhZGF0YTogdG9rZW5NZXRhZGF0YVB1YmtleSxcbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgIGNyZWF0ZU1hc3RlckVkaXRpb25BcmdzOiB7XG4gICAgICAgICAgICBtYXhTdXBwbHk6IDAsXG4gICAgICAgICAgfSxcbiAgICAgICAgfSxcbiAgICAgICksXG4gICA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ZWQudmFsdWU7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICB0aHJvdyBFcnJvcihgTXVzdCBzZXQgZmlsZVBhdGgnIG9yICd1cmknYCk7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGRhdGF2MiA9IENvbnZlcnRlci5SZWd1bGFyTmZ0TWV0YWRhdGEuaW50b0luZnJhKFxuICAgICAgICBpbnB1dCxcbiAgICAgICAgdXJpLFxuICAgICAgICBzZWxsZXJGZWVCYXNpc1BvaW50cyxcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IGlzTXV0YWJsZSA9IGlucHV0LmlzTXV0YWJsZSA9PT0gdW5kZWZpbmVkID8gdHJ1ZSA6IGlucHV0LmlzTXV0YWJsZTtcblxuICAgICAgZGVidWdMb2coJyMgaW5wdXQ6ICcsIGlucHV0KTtcbiAgICAgIGRlYnVnTG9nKCcjIGRhdGF2MjogJywgZGF0YXYyKTtcblxuICAgICAgY29uc3QgbWludCA9IEFjY291bnQuS2V5cGFpci5jcmVhdGUoKTtcblxuICAgICAgY29uc3QgaW5zdHJ1Y3Rpb25zID0gYXdhaXQgY3JlYXRlTWludChcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgZGF0YXYyLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICk7XG5cbiAgICAgIC8vIGZyZWV6ZUF1dGhvcml0eVxuICAgICAgaWYgKGZyZWV6ZUF1dGhvcml0eSkge1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgICBjcmVhdGVEZWxlYWdhdGUoXG4gICAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgICAgIGZyZWV6ZUF1dGhvcml0eS50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIC8vIGNvbGxlY3Rpb24gLS0tXG4gICAgICBpZiAoaW5wdXQuY29sbGVjdGlvbikge1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgICBjcmVhdGVWZXJpZnlTaXplZENvbGxlY3Rpb24oXG4gICAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBpbnB1dC5jb2xsZWN0aW9uLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3Qga2V5cGFpcnMgPSBbb3duZXIudG9LZXlwYWlyKCksIG1pbnQudG9LZXlwYWlyKCldO1xuXG4gICAgICAvLyBjcmVhdG9yIC0tLVxuICAgICAgaWYgKGlucHV0LmNyZWF0b3JzKSB7XG4gICAgICAgIGlucHV0LmNyZWF0b3JzLmZvckVhY2goKGNyZWF0b3IpID0+IHtcbiAgICAgICAgICBpZiAoQWNjb3VudC5LZXlwYWlyLmlzU2VjcmV0KGNyZWF0b3Iuc2VjcmV0KSkge1xuICAgICAgICAgICAgY29uc3QgY3JlYXRvclB1YmtleSA9IGNyZWF0b3IuYWRkcmVzcy50b1B1YmxpY0tleSgpO1xuICAgICAgICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZVZlcmlmeUNyZWF0b3IobWludC50b1B1YmxpY0tleSgpLCBjcmVhdG9yUHVia2V5KTtcbiAgICAgICAgICAgIGluc3RydWN0aW9ucy5wdXNoKGluc3QpO1xuICAgICAgICAgICAga2V5cGFpcnMucHVzaChjcmVhdG9yLnNlY3JldC50b0tleXBhaXIoKSk7XG4gICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuTWludChcbiAgICAgICAgaW5zdH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tLS0gY29sbGVjdGlvbiAtLS1cblxuICAgICAgY29uc3QgaXNNdXRhYmxlID0gaW5wdXQuaXNNdXRhYmxlID09PSB1bmRlZmluZWQgPyB0cnVlIDogaW5wdXQuaXNNdXRhYmxlO1xuXG4gICAgICBkZWJ1Z0xvZygnIyBpbnB1dDogJywgaW5wdXQpO1xuICAgICAgZGVidWdMb2coJyMgc2VsbGVyRmVlQmFzaXNQb2ludHM6ICcsIHNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgIGRlYnVnTG9nKCcjIGRhdGF2MjogJywgZGF0YXYyKTtcblxuICAgICAgY29uc3QgbWludCA9IEFjY291bnQuS2V5cGFpci5jcmVhdGUoKTtcbiAgICAgIGNvbnN0IGluc3RzID0gYXdhaXQgTWludC5jcmVhdGVNaW50KFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyUHVibGlja2V5LFxuICAgICAgICBkYXRhdjIsXG4gICAgICAgIGZlZVBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICk7XG5cbiAgICAgIC8vIGZyZWV6ZUF1dGhvcml0eVxuICAgICAgaWYgKG9wdGlvbnMuZnJlZXplQXV0aG9yaXR5KSB7XG4gICAgICAgIGluc3RzLnB1c2goXG4gICAgICAgICAgTWludC5jcmVhdGVEZWxlYWdhdGUoXG4gICAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBvd25lclB1YmxpY2tleSxcbiAgICAgICAgICAgIG9wdGlvbnMuZnJlZXplQXV0aG9yaXR5LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgYmxvY2toYXNoT2JqID0gYXdhaXQgTm9kZS5nZXRDb25uZWN0aW9uKCkuZ2V0TGF0ZXN0QmxvY2toYXNoKCk7XG4gICAgICBjb25zdCB0eCA9IG5ldyBUcmFuc2FjdGl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saWNLZXkoKSxcbiAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgIGRhdGF2MixcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICBpc011dGFibGUsXG4gICAgICApO1xuXG4gICAgICAvLyBmcmVlemVBdXRob3JpdHlcbiAgICAgIGlmIChmcmVlemVBdXRob3JpdHkpIHtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgICAgTWludC5jcmVhdGVEZWxlYWdhdGUoXG4gICAgICAgICAgICBjb2xsZWN0aW9uTWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgICAgICBmcmVlemVBdXRob3JpdHkudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBjb2xsZWN0aW9ucyA9IHtcbiAgICAgICAgY29sbGVjdGlvbk1ldGFkYXRhOiBjb2xsZWN0aW9uTWV0YWRhdGFBY2NvdW50LFxuICAgICAgICBjb2xsZWN0aW9uQXV0aG9yaXR5OiBvd25lci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgIGNvbGxlY3Rpb25NaW50OiBjb2xsZWN0aW9uTWludC50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICB9O1xuXG4gICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgY3JlYXRlU2V0Q29sbGVjdGlvblNpemVJbnN0cnVjdGlvbihjb2xsZWN0aW9ucywge1xuICAgICAgICAgIHNldENvbGxlY3Rpb25TaXplQXJnczoge1xuICAgICAgICAgICAgc2l6ZTogY29sbGVjdGlvblNpemUgfHwgREVGQVVMVF9DT0xMRUNUSU9OX1NJWkUsXG4gICAgICAgICAgfSxcbiAgICAgICAgfSksXG4gICAgICApO1xuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpb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hZGF0YSIsICJSZWd1bGFyTmZ0IiwgIkFjY291bnQiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgImltcG9ydF93ZWIzIiwgImltcG9ydF9zcGxfdG9rZW4iLCAiaW1wb3J0X21wbF90b2tlbl9tZXRhZGF0YSIsICJSZWd1bGFyTmZ0IiwgIm1pbnQiLCAiQWNjb3VudCIsICJDb252ZXJ0ZXIiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgImltcG9ydF93ZWIzIiwgIlJlZ3VsYXJOZnQiLCAiQ29udmVydGVyIiwgIkFjY291bnQiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlJlZ3VsYXJOZnQiLCAiU3BsVG9rZW4iLCAiaW1wb3J0X21wbF90b2tlbl9tZXRhZGF0YSIsICJSZWd1bGFyTmZ0IiwgIkNvbnZlcnRlciIsICJBY2NvdW50IiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJpbXBvcnRfc3BsX3Rva2VuIiwgImltcG9ydF9tcGxfdG9rZW5fbWV0YWRhdGEiLCAiUmVndWxhck5mdCIsICJBY2NvdW50IiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJSZWd1bGFyTmZ0IiwgIlNwbFRva2VuIiwgIlJlZ3VsYXJOZnQiLCAiQ29tcHJlc3NlZE5mdCIsICJSZWd1bGFyTmZ0IiwgIkNvbXByZXNzZWROZnQiXQp9Cg== \ No newline at end of file diff --git a/packages/suite-compressed-nft/dist/index.mjs b/packages/suite-compressed-nft/dist/index.mjs index 64ffb734d..06386f13f 100644 --- a/packages/suite-compressed-nft/dist/index.mjs +++ b/packages/suite-compressed-nft/dist/index.mjs @@ -1581,8 +1581,11 @@ var DasApi2; sortDirection: "desc" /* Desc */ }; DasApi4.fetchOffchain = async (uri) => { - const json = await (await fetch(uri)).json(); - return json; + const response = await fetch(uri); + if (response.status !== 200) { + return {}; + } + return await response.json(); }; DasApi4.findByMint = async (mint, isCompressed) => { const asset = await DasApi.getAsset(mint); @@ -3527,4 +3530,4 @@ var CompressedNft9 = { export { CompressedNft9 as CompressedNft }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9iYXRjaC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jb21tb24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvbWludC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9wYXJ0aWFsLXNpZ24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY2FsY3VsYXRlLXR4c2l6ZS50cyIsICIuLi8uLi9nbG9iYWwvc3JjL2luZGV4LnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2Fzc29jaWF0ZWQudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMva2V5cGFpci50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9wZGEudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvaW5kZXgudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvaW5kZXgudHMiLCAiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL3NoYXJlZC50cyIsICIuLi8uLi9zdWl0ZS11dGlscy9zcmMvcmVzdWx0LnRzIiwgIi4uLy4uL2NvbnZlcnRlci9zcmMvY29sbGVjdGlvbi50cyIsICIuLi8uLi9jb252ZXJ0ZXIvc3JjL2NyZWF0b3JzLnRzIiwgIi4uLy4uL2NvbnZlcnRlci9zcmMvY29tcHJlc3NlZC1uZnQtbWV0YWRhdGEudHMiLCAiLi4vLi4vY29udmVydGVyL3NyYy9yb3lhbHR5LnRzIiwgIi4uLy4uL2NvbnZlcnRlci9zcmMvbmZ0LnRzIiwgIi4uLy4uL2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AgICk6IFByb21pc2U8UmVzdWx0PFRyYW5zYWN0aW9uU2lnbmF0dXJlLCBFcnJvcj4+ID0+IHtcbiAgICAgIHJldHVybiBUcnkoYXN5bmMgKCkgPT4ge1xuICAgICAgICBsZXQgaSA9IDA7XG4gICAgICAgIGZvciAoY29uc3QgYSBvZiBhcnIpIHtcbiAgICAgICAgICBpZiAoIWEuaW5zdHJ1Y3Rpb25zICYmICFhLnNpZ25lcnMpIHtcbiAgICAgICAgICAgIHRocm93IEVycm9yKFxuICAgICAgICAgICAgICBgb25seSBJbnN0cnVjdGlvbiBvYmplY3QgdGhhdCBjYW4gdXNlIGJhdGNoU3VibWl0KCkuXG4gICAgICAgICAgICBJbmRleDogJHtpfSwgU2V0IHZhbHVlOiAke0pTT04uc3RyaW5naWZ5KGEpfWAsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICBpKys7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBpbnN0cnVjdGlvbnMgPSBhcnIuZmxhdE1hcCgoYSkgPT4gYS5pbnN0cnVjdGlvbnMpO1xuICAgICAgICBjb25zdCBzaWduZXJzID0gYXJyLmZsYXRNYXAoKGEpID0+IGEuc2lnbmVycyk7XG4gICAgICAgIGNvbnN0IGZlZVBheWVycyA9IGFyci5maWx0ZXIoKGEpID0+IGEuZmVlUGF5ZXIgIT09IHVuZGVmaW5lZCk7XG4gICAgICAgIGxldCBmZWVQYXllciA9IHNpZ25lcnNbMF07XG4gICAgICAgIGlmIChmZWVQYXllcnMubGVuZ3RoID4gMCAmJiBmZWVQYXllcnNbMF0uZmVlUGF5ZXIpIHtcbiAgICAgICAgICBmZWVQYXllciA9IGZlZVBheWVyc1swXS5mZWVQYXllcjtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHRyYW5zYWN0aW9uID0gbmV3IFRyYW5zYWN0aW9uKCk7XG4gICAgICAgIGxldCBmaW5hbFNpZ25lcnMgPSBzaWduZXJzO1xuICAgICAgICBpZ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lvbnMucmVkdWNlKChhY2MsIGl4KSA9PiB7XG4gICAgICBpeC5rZXlzLmZvckVhY2goKHsgcHVia2V5LCBpc1NpZ25lciB9KSA9PiB7XG4gICAgICAgIGNvbnN0IHBrID0gcHVia2V5LnRvQmFzZTU4KCk7XG4gICAgICAgIGlmIChpc1NpZ25lcikgc2lnbmVycy5hZGQocGspO1xuICAgICAgICBhY2NvdW50cy5hZGQocGspO1xuICAgICAgfSk7XG5cbiAgICAgIGFjY291bnRzLmFkZChpeC5wcm9ncmFtSWQudG9CYXNlNTgoKSk7XG5cbiAgICAgIGNvbnN0IG5JbmRleGVzID0gaXgua2V5cy5sZW5ndGg7XG4gICAgICBjb25zdCBvcGFxdWVEYXRhID0gaXguZGF0YS5sZW5ndGg7XG5cbiAgICAgIHJldHVybiAoXG4gICAgICAgIGFjYyArXG4gICAgICAgIDEgKyAvLyBQSUQgaW5kZXhcbiAgICAgICAgY29tcGFjdEFycmF5U2l6ZShuSW5kZXhlcywgMSkgK1xuICAgICAgICBjb21wYWN0QXJyYXlTaXplKG9wYXF1ZURhdGEsIDEpXG4gICAgICApO1xuICAgIH0sIDApO1xuXG4gICAgcmV0dXJuIChcbiAgICAgIGNvbXBhY3RBcnJheVNpemUoc2lnbmVycy5zaXplLCA2NCkgKyAvLyBzaWduYXR1cmVzXG4gICAgICAzICsgLy8gaGVhZGVyXG4gICAgICBjb21wYWN0QXJyYXlTaXplKGFjY291bnRzLnNpemUsIDMyKSArIC8vIGFjY291bnRzXG4gICAgICAzMiArIC8vIGJsb2NraGFzaFxuICAgICAgY29tcGFjdEhlYWRlcih0cmFuc2FjdGlvbi5pbnN0cnVjdGlvbnMubGVuZ3RoKSArIC8vIGluc3RydWN0aW9uc1xuICAgICAgaXhzU2l6ZVxuICAgICk7XG4gIH07XG5cbiAgLyoqXG4gICAqIElzIG1heCB0cmFuc2FjdGlvbiBzaXplXG4gICAqIEBwYXJhbSB0cmFuc2FjdGlvbiBhIHNvbGFuYSB0cmFuc2F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5zdF0sXG4gICAgICAgIFtdLFxuICAgICAgICBmZWVQYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgcmVzLnRva2VuQWNjb3VudCEsXG4gICAgICApO1xuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiBSZXRyeSBmdW5jdGlvbiBpZiBjcmVhdGUgbmV3IHRva2VuIGFjY291aW50XG4gICAgICpcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gbWludFxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBvd25lclxuICAgICAqIEBwYXJhbSB7U2VjcmV0fSBmZWVQYXllclxuICAgICAqIEByZXR1cm5zIFByb21pc2U8c3RyaW5nPlxuICAgICAqL1xuICAgIGV4cG9ydCBjb25zdCByZXRyeUdldE9yQ3JlYXRlID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyOiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxzdHJpbmc+ID0+IHtcbiAgICAgIGxldCBjb3VudGVyID0gMTtcbiAgICAgIHdoaWxlIChjb3VudGVyIDwgUkVUUllfT1ZFUl9MSU1JVCkge1xuICAgICAgICB0cnkge1xuICAgICAgICAgIGNvbnN0IGluc3QgPSBhd2FpdCBnZXQobWludCwgb3duZXIsIGZlZVBheWVyLCB0cnVlKTtcblxuICAgICAgICAgIGlmIChpbnN0ICYmIHR5cGVvZiBpbnN0ID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgaW5zdCk7XG4gICAgICAgICAgICByZXR1cm4gaW5zdDtcbiAgICAgICAgICB9IGVsc2UgaWYgKGluc3QgaW5zdGFuY2VvZiBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uKSB7XG4gICAgICAgICAgICAoYXdhaXQgaW5zdC5zdWJtaXQoKSkubWFwKFxuICAgICAgICAgICAgICBhc3luYyAob2s6IHN0cmluZykgPT4ge1xuICAgICAgICAgICAgICAgIGF3YWl0IE5vZGUuY29uZmlybWVkU2lnKG9rKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gaW5zdC5kYXRhO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAoZXJyOiBFcnJvcikgPT4ge1xuICAgICAgICAgICAgICAgIGRlYnVnTG9nKCcjIEVycm9yIHN1Ym1pdCByZXRyeUdldE9yQ3JlYXRlOiAnLCBlcnIpO1xuICAgICAgICAgICAgICAgIHRocm93IGVycjtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgZGVidWdMb2coYCMgcmV0cnk6ICR7Y291bnRlcn0gY3JlYXRlIHRva2VuIGFjY291bnQ6IGAsIGUpO1xuICAgICAgICAgIGRlYnVnTG9nKGAjIG1pbnQ6ICR7bWludH0sIG93bmVyOiAke293bmVyfSwgZmVlUGF5ZXI6ICR7ZmVlUGF5ZXJ9YCk7XG4gICAgICAgIH1cbiAgICAgICAgYXdhaXQgc2xlZXAoUkVUUllfU0xFRVBfVElNRSk7XG4gICAgICAgIGNvdW50ZXIrKztcbiAgICAgIH1cbiAgICAgIHRocm93IEVycm9yKGByZXRyeSBhY3Rpb24gaXMgb3ZlciBsaW1pdCAke1JFVFJZX09WRVJfTElNSVR9YCk7XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIFtNYWluIGxvZ2ljXUdldCBBc3NvY2lhdGVkIHRva2VuIEFjY291bnQuXG4gICAgICogaWYgbm90IGNyZWF0ZWQsIGNyZWF0ZSBuZXcgdG9rZW4gYWNjb3VpbnRcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBtaW50XG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAgICogQHBhcmFtIHtQdWJrZXl9IGZlZVBheWVyXG4gICAgICogQHJldHVybnMgUHJvbWlzZTxzdHJpbmc+XG4gICAgICovXG4gICAgZXhwb3J0IGNvbnN0IG1ha2VPckNyZWF0ZUluc3RydWN0aW9uID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyPzogUHVia2V5LFxuICAgICAgYWxsb3dPd25lck9mZkN1cnZlID0gZmFsc2UsXG4gICAgKTogUHJvbWlzZTx7XG4gICAgICB0b2tlbkFjY291bnQ6IHN0cmluZztcbiAgICAgIGluc3Q6IFRyYW5zYWN0aW9uSW5zdHJ1Y3Rpb24gfCB1bmRlZmluZWQ7XG4gICAgfT4gPT4ge1xuICAgICAgY29uc3QgYXNzb2NpYXRlZFRva2VuQWNjb3VudCA9IGdldEFzc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jKFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSxcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3QsXG4gICAgICAgIH07XG4gICAgICB9XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IEtleXBhaXIgYXMgT3JpZ2luYWwsIFB1YmxpY0tleSB9IGZyb20gJ0Bzb2xhbmEvd2ViMy5qcyc7XG5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wZXMvcmVndWxhci1uZnQnO1xuaW1wb3J0IHsgSW50ZXJuYWxDcmVhdG9ycyB9IGZyb20gJ34vdHlwZXMvY29udmVydGVyJztcblxuZXhwb3J0IG5hbWVzcGFjZSBDb252ZXJ0ZXIge1xuICBleHBvcnQgbmFtZXNwYWNlIENyZWF0b3JzIHtcbiAgICBleHBvcnQgY29uc3QgaW50b0luZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IE9wdGlvbjxJbnRlcm5hbENyZWF0b3JzW10+ID0+IHtcbiAgICAgIGlmICghaW5wdXQpIHtcbiAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICB9XG4gICAgICByZXR1cm4gaW5wdXQubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvQ29tcHJlc3NlZE5mdEluZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IEludGVybmFsQ3JlYXRvcnNbXSA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBbXTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBpbnB1dCEubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuIC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gICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEuc3ltYm9sKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU3ltYm9sKG1ldGFkYXRhLnN5bWJvbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAocmVzICYmIHJlcy5pc0Vycikge1xuICAgICAgICAgIHJlc3VsdHMucHVzaCguLi5yZXMuZXJyb3IuZGV0YWlscyk7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgICAgaWYgKHJlc3VsdHMubGVuZ3RoID4gMCkge1xuICAgICAgICBjb25zdCBtZXNzYWdlID1cbiAgICAgICAgICAnQ2F1Z2h0IGluIHRoZSB2YWxpZGF0aW9uIGVycm9ycy4gc2VlIGluZm9ybWF0aW9uIGUuZzogZXJyPFZhbGlkYXRvckVycm9yPi5kZXRhaWxzJztcbiAgICAgICAgdGh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ZVRyZWU6IHRyZWVPd25lci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgICAgICB0cmVlQXV0aG9yaXR5LFxuICAgICAgICAgICAgdHJlZUNyZWF0b3I6IG93bmVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgICAgIHBheWVyOiBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgICAgICBsb2dXcmFwcGVyOiBTUExfTk9PUF9QUk9HUkFNX0lELFxuICAgICAgICAgICAgY29tcHJlc3Npb25Qcm9ncmFtOiBTUExfQUNDT1VOVF9DT01QUkVTU0lPTl9QUk9HUkFNX0lELFxuICAgICAgICAgIH0sXG4gICAgICAgICAge1xuICAgICAgICAgICAgbWF4QnVmZmVyU2l6ZSxcbiAgICAgICAgICAgIG1heERlcHRoLFxuICAgICAgICAgICAgcHVibGljOiBmYWxzZSxcbiAgICAgICAgICB9LFxuICAgICAgICAgIE1QTF9CVUJCTEVHVU1fUFJPR1JBTV9JRC50b1B1YmxpY0tleSgpLFxuICAgICAgICApLFxuICAgICAgKTtcblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuTWludChcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLFxuICAgICAgICBbdHJlZU93bmVyLnRvS2V5cGFpcigpLCBvd25lci50b0tleXBhaXIoKV0sXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICB0cmVlT3duZXIucHVia2V5LFxuICAgICAgKTtcbiAgICB9KTtcbiAgfTtcblxuICAvKipcbiAgICogY3JlYXRlIGEgbmV3IG5mdCBzcGFjZVxuICAgKiBUaGlzIGZ1bmN0aW9uIG5lZWRzIG9ubHkgMSBjYWxsXG4gICAqXG4gICAqIEBwYXJhbSB7U2VjcmV0fSBvd25lclxuICAgKiBAcGFyYW0ge1NwYWNlTnVtYmVyfSBzcGFjZVNpemVcbiAgICogQHBhcmFtIHtQYXJ0aWFsPFNwY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UFjY291bnRBZGRyZXNzKFxuICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICB0cmVlT3duZXIsXG4gICAgKTtcbiAgICBjb25zdCBjYW5vcHlEZXB0aCA9IHRyZWVBY2NvdW50LmdldENhbm9weURlcHRoKCk7XG4gICAgY29uc3Qgc2xpY2VkUHJvb2Y6IEFjY291bnRNZXRhW10gPSBhc3NldFByb29mLnByb29mXG4gICAgICAubWFwKChub2RlOiBzdHJpbmcpID0+ICh7XG4gICAgICAgIHB1YmtleTogbm9kZS50b1B1YmxpY0tleSgpLFxuICAgICAgICBpc1NpZ25lcjogZmFsc2UsXG4gICAgICAgIGlzV3JpdGFibGU6IGZhbHNlLFxuICAgICAgfSkpXG4gICAgICAuc2xpY2UoMCwgYXNzZXRQcm9vZi5wcm9vZi5sZW5ndGggLSAoY2Fub3B5RGVwdGggPyBjYW5vcHlEZXB0aCA6IDApKTtcblxuICAgIHJldHVybiBjcmVhdGVWZXJpZnlDcmVhdG9ySW5zdHJ1Y3Rpb24oXG4gICAgICB7XG4gICAgICAgIHRyZWVBdXRob3JpdHk6IHRyZWVPd25lcixcbiAgICAgICAgbGVhZk93bmVyOiBvd25lcnNoaXAub3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgbGVhZkRlbGVnYXRlOiAob3duZXJzaGlwLmRlbGVnYXRlIHx8IG93bmVyc2hpcC5vd25lcikudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgbWVya2xlVHJlZTogYXNzZXRQcm9vZi50cmVlX2lkLnRvUHVibGljS2V5KCksXG4gICAgICAgIHBheWVyOiBmZWVQYXllcixcblxuICAgICAgICBsb2dXcmFwcGVyOiBTUExfTk9PUF9QUk9HUkFNX0lELFxuICAgICAgICBjb21wcmVzc2lvblByb2dyYW06IFNQTF9BQ0NPVU5UX0NPTVBSRVNTSU9OX1BST0dSQU1fSUQsXG4gICAgICAgIGNyZWF0b3I6IGZlZVBheWVyLFxuXG4gICAgICAgIC8vIHBy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uS2V5cGFpcih7IHNlY3JldDogcGF5ZXIhIH0pLnB1YmtleTtcblxuICAgICAgY29uc3QgdHJlZUF1dGhvcml0eSA9IEFjY291bnQuUGRhLmdldFRyZWVBdXRob3JpdHkoXG4gICAgICAgIHRyZWVPd25lci50b1B1YmxpY0tleSgpLnRvU3RyaW5nKCksXG4gICAgICApO1xuICAgICAgY29uc3QgY29sbGVjdGlvbk1ldGFkYXRhID0gQWNjb3VudC5QZGEuZ2V0TWV0YWRhdGEoXG4gICAgICAgIGNvbGxlY3Rpb25NaW50LnRvU3RyaW5nKCksXG4gICAgICApO1xuICAgICAgY29uc3QgY29sbGVjdGlvbk1hc3RlckVkaXRpb25BY2NvdW50ID0gQWNjb3VudC5QZGEuZ2V0TWFzdGVyRWRpdGlvbihcbiAgICAgICAgY29sbGVjdGlvbk1pbnQudG9TdHJpbmcoKSxcbiAgICAgICk7XG4gICAgICBjb25zdCBidWJibGVndW1TaWduZXIgPSBBY2NvdW50LlBkYS5nZXRCZ3VtU2lnbmVyKCk7XG5cbiAgICAgIC8vIHBvcnBlcnRpZXMsIFVwbG9hZCBjb250ZW50XG4gICAgICBsZXQgcHJvcGVydGllcztcbiAgICAgIGlmIChpbnB1dC5wcm9wZXJ0aWVzKSB7XG4gICAgICAgIHByb3BlcnRpZXMgPSBhd2FpdCBDb252ZXJ0ZXIuUHJvcGVydGllcy5pbnRvSW5mcmEoXG4gICAgICAgICAgaW5wdXQucHJvcGVydGllcyxcbiAgICAgICAgICBTdG9yYWdlLnVwbG9hZEZpbGUsXG4gICAgICAgICAgc3RvcmFnZVR5cGUsXG4gICAgICAgICAgcGF5ZXIsXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIGlucHV0ID0ge1xuICAgICAgICAuLi5pbnB1dCxcbiAgICAgICAgcHJvcGVydGllcyxcbiAgICAgICAgc3RvcmFnZVR5cGUsXG4gICAgICB9O1xuXG4gICAgICBjb25zdCByb3lhbHR5ID0gaW5wdXQucm95YWx0eSA/I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cmFnZS51cGxvYWREYXRhKFxuICAgICAgICAgIHsgLi4uc3RvcmFnZU1ldGFkYXRhLCAuLi5pbWFnZSB9LFxuICAgICAgICAgIHN0b3JhZ2VUeXBlLFxuICAgICAgICAgIHBheWVyLFxuICAgICAgICApO1xuICAgICAgICBpZiAodXBsb2FkZWQuaXNFcnIpIHtcbiAgICAgICAgICB0aHJvdyB1cGxvYWRlZDtcbiAgICAgICAgfVxuICAgICAgICB1cmkgPSB1cGxvYWRlZC52YWx1ZTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHRocm93IEVycm9yKGBNdXN0IHNldCBmaWxlUGF0aCcgb3IgJ3VyaSdgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgY29udmVydGVkID0gQ29udmVydGVyLkNvbXByZXNzZWROZnRNZXRhZGF0YS5pbnRvSW5mcmEoXG4gICAgICAgIGlucHV0LFxuICAgICAgICB1cmksXG4gICAgICAgIHNlbGxlckZlZUJhc2lzUG9pbnRzLFxuICAgICAgKTtcblxuICAgICAgY29uc3QgbWV0YWRhdGFBcmdzOiBNZXRhZGF0YUFyZ3MgPSB7XG4gICAgICAgIC4uLmNvbnZlcnRlZCxcbiAgICAgICAgY29sbGVjdGlvbjogeyBrZXk6IGNvbGxlY3Rpb25NaW50LnRvUHVibGljS2V5KCksIHZlcmlmaWVkOiBmYWxzZSB9LFxuICAgICAgfTtcblxuICAgICAgZGVidWdMb2coJyMgaW5wdXQ6ICcsIGlucHV0KTtcbiAgICAgIGRlYnVnTG9nKCcjIG1ldGFkYXRhQXJnczogJywgbWV0YWRhdGFBcmdzKTtcblxuICAgICAgY29uc3QgaW5zdHJ1Y3Rpb25zID0gW107XG4gICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgY3JlYXRlTWludFRvQ29sbGVjdGlvblYxSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAge1xuICAgICAgICAgICAgbWVya2xlVHJlZTogdHJlZU93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICB0cmVlQXV0aG9yaXR5LFxuICAgICAgICAgICAgdHJlZURlbGVnYXRlOiBvd25lclB1YmxpY0tleSxcbiAgICAgICAgICAgIHBheWVyOiBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgICAgICBsZWFmT3duZXI6IGxlYWZPd25lciwgLy8gcmVjZWl2ZXJcbiAgICAgICAgICAgIGxlYWZEZWxlZ2F0ZTogbGVhZkRlbGVnYXRlLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBjb2xsZWN0aW9uQXV0aG9yaXR5OiBvd25lclB1YmxpY0tleSxcbiAgICAgICAgICAgIGNvbGxlY3Rpb25NaW50OiBjb2xsZWN0aW9uTWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgY29sbGVjdGlvbk1ldGFkYXRhLFxuICAgICAgICAgICAgZWRpdGlvbkFjY291bnQ6IGNvbGxlY3Rpb25NYXN0ZXJFZGl0aW9uQWNjb3VudCxcbiAgICAgICAgICAgIGJ1YmJsZWd1bVNpZ25lcixcbiAgICAgICAgICAgIGxvZ1dyYXBwZXI6IFNQTF9OT09QX1BST0dSQU1fSUQsXG4gICAgICAgICAgICBjb2xsZWN0aW9uQXV0aG9yaXR5UmVjb3JkUGRhOiBCVUJCTEVHVU1fUFJPR1JBTV9JRCxcbiAgICAgICAgICAgIGNvbXByZXNzaW9uUHJvZ3JhbTogU1BMX0FDQ09VTlRfQ09NUFJFU1NJT05fUFJPR1JBTV9JRCxcbiAgICAgICAgICAgIHRva2VuTWV0YWRhdGFQcm9ncmFtOiBUT0tFTl9NRVRBREFUQV9QUk9HUkFNX0lELFxuICAgICAgICAgIH0sXG4gICAgICAgICAge1xuICAgICAgICAgICAgbWV0YWRhdGFBcmdzLFxuICAgICAgICAgIH0sXG4gICAgICAgICksXG4gICAgICApO1xuXG4gICAgICBpZiAoaW5wdXQuY3JlYXRvcnMpIHtcbiAgICAgICAgY29uc3QgYXNzZXRJZCA9IGF3Y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duZXJPck11bHRpc2lnWzBdO1xuICAgICAgY29uc3Qga2V5cGFpcnMgPSBvd25lck9yTXVsdGlzaWcubWFwKChzKSA9PiBzLnRvS2V5cGFpcigpKTtcblxuICAgICAgY29uc3QgdG9rZW5Bc3NvY2lhdGVkID0gYXdhaXQgQWNjb3VudC5Bc3NvY2lhdGVkLnJldHJ5R2V0T3JDcmVhdGUoXG4gICAgICAgIHRva2VuLFxuICAgICAgICBvd25lcixcbiAgICAgICAgcGF5ZXIsXG4gICAgICApO1xuXG4gICAgICBjb25zdCBpbnN0ID0gY3JlYXRlTWludFRvQ2hlY2tlZEluc3RydWN0aW9uKFxuICAgICAgICB0b2tlbi50b1B1YmxpY0tleSgpLFxuICAgICAgICB0b2tlbkFzc29jaWF0ZWQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgQ2FsY3VsYXRlLmNhbGN1bGF0ZUFtb3VudCh0b3RhbEFtb3VudCwgbWludERlY2ltYWwpLFxuICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICAga2V5cGFpcnMsXG4gICAgICApO1xuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb248UHVia2V5PihcbiAgICAgICAgW2luc3RdLFxuICAgICAgICBrZXlwYWlycyxcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCksXG4gICAgICAgIHRva2VuLFxuICAgICAgKTtcbiAgICB9KTtcbiAgfTtcbn1cbiIsICIvL0BpbnRlcm5hbFxuZXhwb3J0IG5hbWVzcGFjZSBTcGxUb2tlbiB7XG4gIGV4cG9ydCBjb25zdCBjYWxjdWxhdGVBbW91bnQgPSAoXG4gICAgYW1vdW50OiBudW1iZXIsXG4gICAgbWludERlY2ltYWw6IG51bWJlcixcbiAgKTogbnVtYmVyID0+IHtcbiAgICByZXR1cm4gYW1vdW50ICogMTAgKiogbWludERlY2ltYWw7XG4gIH07XG59XG4iLCAi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ICAgKiBGZXRjaCBtaW50ZWQgbWV0YWRhdGEgYnkgb3duZXIgUHVia2V5XG4gICAqXG4gICAqIEBwYXJhbSB7UHVia2V5fSBvd25lclxuICAgKiBAcmV0dXJuIHtQcm9taXNlPFJlc3VsdDxUb2tlbk1ldGFkYXRhW118IEVycm9yPj59XG4gICAqL1xuICBleHBvcnQgY29uc3QgZmluZEJ5T3duZXIgPSBhc3luYyAoXG4gICAgb3duZXI6IFB1YmtleSxcbiAgKTogUHJvbWlzZTxSZXN1bHQ8VG9rZW5NZXRhZGF0YVtdLCBFcnJvcj4+ID0+IHtcbiAgICByZXR1cm4gVHJ5KGFzeW5jICgpID0+IHtcbiAgICAgIGNvbnN0IGNvbm5lY3Rpb24gPSBOb2RlLmdldENvbm5lY3Rpb24oKTtcbiAgICAgIGNvbnN0IGluZm8gPSBhd2FpdCBjb25uZWN0aW9uLmdldFBhcnNlZFRva2VuQWNjb3VudHNCeU93bmVyKFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICB7XG4gICAgICAgICAgcHJvZ3JhbUlkOiBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICB9LFxuICAgICAgKTtcblxuICAgICAgY29uc3QgZGF0YXMgPSBpbmZvLnZhbHVlLm1hcChhc3luYyAoZCkgPT4ge1xuICAgICAgICBjb25zdCBtaW50ID0gZC5hY2NvdW50LmRhdGEucGFyc2VkLmluZm8ubWludCBhcyBQdWJrZXk7XG4gICAgICAgIGNvbnN0IHRva2VuQW1vdW50ID0gZC5hY2NvdW50LmRhdGEucGFyc2VkLmluZm8udG9rZW5BbW91bnRcbiAgICAgICAgICAuYW1vdW50IGFzIHN0cmluZztcbiAgICAgICAgaWYgKHRva2VuQW1vdW50ID09PSAnMScpIHtcbiAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIE1ldGFkYXRhLmZyb21BY2NvdW50QWRkcmVzcyhcbiAgICAgICAgICBjb25uZWN0aW9uLF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N0OiBQdWJrZXksXG4gICAgYW1vdW50OiBudW1iZXIsXG4gICAgbWludERlY2ltYWw6IG51bWJlcixcbiAgICBmZWVQYXllcjogUHVia2V5LFxuICApOiBQcm9taXNlPFJlc3VsdDxQYXJ0aWFsU2lnblN0cnVjdHVyZSwgRXJyb3I+PiA9PiB7XG4gICAgcmV0dXJuIFRyeShhc3luYyAoKSA9PiB7XG4gICAgICBjb25zdCBvd25lclB1YmxpY0tleSA9IG93bmVyLnRvS2V5cGFpcigpLnB1YmxpY0tleTtcbiAgICAgIGNvbnN0IHNvdXJjZVRva2VuID0gYXdhaXQgQWNjb3VudC5Bc3NvY2lhdGVkLm1ha2VPckNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICBtaW50LFxuICAgICAgICBvd25lclB1YmxpY0tleS50b1N0cmluZygpLFxuICAgICAgICBmZWVQYXllcixcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IGRlc3RUb2tlbiA9IGF3YWl0IEFjY291bnQuQXNzb2NpYXRlZC5tYWtlT3JDcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgZGVzdCxcbiAgICAgICAgZmVlUGF5ZXIsXG4gICAgICApO1xuXG4gICAgICBsZXQgaW5zdDI7XG4gICAgICBjb25zdCBibG9ja2hhc2hPYmogPSBhd2FpdCBOb2RlLmdldENvbm5lY3Rpb24oKS5nZXRMYXRlc3RCbG9ja2hhc2goKTtcblxuICAgICAgY29uc3QgdHggPSBuZXcgVHJhbnNhY3Rpb24oe1xuICAgICAgICBsYXN0VmFsaWRCbG9ja0hlaWdodDogYmxvY2toYXNoT2JqLmxhc3RWYWxpZEJsb2NrSGVpZ2h0LFxuICAgICAgICBibG9ja2hhc2g6IGJsb2NraGFzaE9iai5ibG9ja2hhc2gsXG4gICAgICAgIGZlZVBheWVyOiBmZWVQYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgfSk7XG5cbiAgICAgIC8vIHJldHVybiBhc3NvY2lhdGVkIHRva2VuIGFjY291bnRcbiAgICAgIGlmICghZGVzdFRva2VuLmluc3QpIHtcbiAgICAgICAgaW5zdDIgPSBjcmVhdGVUcmFuc2ZlckNoZWNrZWRJbnN0cnVjdGlvbihcbiAgICAgICAgICBzb3VyY2VUb2tlbi50b2tlbkFjY291bnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgZGVzdFRva2VuLnRva2VuQWNjb3VudC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICAgIENhbGN1bGF0b3IuY2FsY3VsYXRlQW1vdW50KGFtb3VudCwgbWludERlY2ltYWwpLFxuICAgICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICAgIFtvd25lci50b0tleXBhaXIoKV0sXG4gICAgICAgICk7XG4gICAgICAgIHR4LmFkZChpbnN0Mik7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICAvLyByZXR1cm4gaW5zdHJ1Y3Rpb24gYW5kIHVuZGVjaWRlZCBhc3NvY2lhdGVkIHRva2VuIGFjY291bnRcbiAgICAgICAgaW5zdDIgPSBjcmVhdGVUcmFuc2ZlckNoZWNrZWRJbnN0cnVjdGlvbihcbiAgICAgICAgICBzb3VyY2VUb2tlbi50b2tlbkFjY291bnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgZGVzdFRva2VuLnRva2VuQWNjb3VudC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICAgIENhbGN1bGF0b3IuY2FsY3VsYXRlQW1vdW50KGFtb3VudCwgbWludERlY2ltYWwpLFxuICAgICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICAgIFtvd25lci50b0tleXBhaXIoKV0sXG4gICAgICAgICk7XG4gICAgICAgIHR4LmFkZChkZXN0VG9rZW4uaW5zdCkuYWRkK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107XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIFN5c3RlbVByb2dyYW0uY3JlYXRlQWNjb3VudCh7XG4gICAgICAgIGZyb21QdWJrZXk6IGZlZVBheWVyLFxuICAgICAgICBuZXdBY2NvdW50UHVia2V5OiBtaW50LFxuICAgICAgICBzcGFjZTogTUlOVF9TSVpFLFxuICAgICAgICBsYW1wb3J0czogbGFtcG9ydHMsXG4gICAgICAgIHByb2dyYW1JZDogVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgIH0pLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUluaXRpYWxpemVNaW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgIG1pbnQsXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICBvd25lcixcbiAgICAgICAgb3duZXIsXG4gICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgZmVlUGF5ZXIsXG4gICAgICAgIHRva2VuQXNzb2NpYXRlZCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIG1pbnQsXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZU1pbnRUb0NoZWNrZWRJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgdG9rZW5Bc3NvY2lhdGVkLFxuICAgICAgICBvd25lcixcbiAgICAgICAgQ2FsY3VsYXRlLmNhbGN1bGF0ZUFtb3VudCh0b3RhbEFtb3VudCwgbWludERlY2ltYWwpLFxuICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlY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0IGRhdGF2MiA9IENvbnZlcnRlci5Ub2tlbk1ldGFkYXRhLmludG9JbmZyYShcbiAgICAgICAgaW5wdXQsXG4gICAgICAgIHVyaSxcbiAgICAgICAgc2VsbGVyRmVlQmFzaXNQb2ludHMsXG4gICAgICApO1xuXG4gICAgICBkZWJ1Z0xvZygnIyBkYXRhdjI6ICcsIGRhdGF2Mik7XG4gICAgICBkZWJ1Z0xvZygnIyB1cGxvYWQgY29udGVudCB1cmw6ICcsIHVyaSk7XG5cbiAgICAgIGNvbnN0IG1pbnQgPSBBY2NvdW50LktleXBhaXIuY3JlYXRlKCk7XG4gICAgICBjb25zdCBpbnN0cyA9IGF3YWl0IGNyZWF0ZU1pbnQoXG4gICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgIHRvdGFsQW1vdW50LFxuICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICAgZGF0YXYyLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICk7XG5cbiAgICAgIC8vIGZyZWV6ZUF1dGhvcml0eVxuICAgICAgaWYgKGZyZWV6ZUF1dGhvcml0eSkge1xuICAgICAgICBpbnN0cy5wdXNoKFxuICAgICAgICAgIGNyZWF0ZUZyZWV6ZUF1dGhvcml0eShcbiAgICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICAgICAgZnJlZXplQXV0aG9yaXR5LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuTWludChcbiAgICAgICAgaW5zdHMsXG4gICAgICAgIFtvd25lci50b0tleXBhaXIoKSwgbWludC50b0tleXBhaXIoKV0sXG4gICAgICAgI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gY3JlYXRlQ3JlYXRlTWV0YWRhdGFBY2NvdW50VjNJbnN0cnVjdGlvbihcbiAgICAgICAge1xuICAgICAgICAgIG1ldGFkYXRhOiB0b2tlbk1ldGFkYXRhUHVia2V5LFxuICAgICAgICAgIG1pbnQsXG4gICAgICAgICAgbWludEF1dGhvcml0eTogb3duZXIsXG4gICAgICAgICAgcGF5ZXI6IGZlZVBheWVyLFxuICAgICAgICAgIHVwZGF0ZUF1dGhvcml0eTogb3duZXIsXG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICBjcmVhdGVNZXRhZGF0YUFjY291bnRBcmdzVjM6IHtcbiAgICAgICAgICAgIGRhdGE6IG5mdE1ldGFkYXRhLFxuICAgICAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgICAgICAgY29sbGVjdGlvbkRldGFpbHM6IG51bGwsXG4gICAgICAgICAgfSxcbiAgICAgICAgfSxcbiAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlQ3JlYXRlTWFzdGVyRWRpdGlvblYzSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHtcbiAgICAgICAgICBlZGl0aW9uOiBtYXN0ZXJFZGl0aW9uUHVia2V5LFxuICAgICAgICAgIG1pbnQsXG4gICAgICAgICAgdXBkYXRlQXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBtaW50QXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBwYXllcjogZmVlUGF5ZXIsXG4gICAgICAgICAgbWV0YWRhdGE6IHRva2VuTWV0YWRhdGFQdWJrZXksXG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICBjcmVhdGVNYXN0ZXJFZGl0aW9uQXJnczoge1xuICAgICAgICAgICAgbWF4U3VwcGx5OiAwLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICApLFxuICAgICk7XG4gICAgcmV0dXJuIGluc3RydWN0aW9ucztcbiAgfTtc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RXJyb3IoYE11c3Qgc2V0IGZpbGVQYXRoJyBvciAndXJpJ2ApO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBkYXRhdjIgPSBDb252ZXJ0ZXIuUmVndWxhck5mdE1ldGFkYXRhLmludG9JbmZyYShcbiAgICAgICAgaW5wdXQsXG4gICAgICAgIHVyaSxcbiAgICAgICAgc2VsbGVyRmVlQmFzaXNQb2ludHMsXG4gICAgICApO1xuXG4gICAgICBjb25zdCBpc011dGFibGUgPSBpbnB1dC5pc011dGFibGUgPT09IHVuZGVmaW5lZCA/IHRydWUgOiBpbnB1dC5pc011dGFibGU7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGlucHV0OiAnLCBpbnB1dCk7XG4gICAgICBkZWJ1Z0xvZygnIyBkYXRhdjI6ICcsIGRhdGF2Mik7XG5cbiAgICAgIGNvbnN0IG1pbnQgPSBBY2NvdW50LktleXBhaXIuY3JlYXRlKCk7XG5cbiAgICAgIGNvbnN0IGluc3RydWN0aW9ucyA9IGF3YWl0IGNyZWF0ZU1pbnQoXG4gICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgIGRhdGF2MixcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICBpc011dGFibGUsXG4gICAgICApO1xuXG4gICAgICAvLyBmcmVlemVBdXRob3JpdHlcbiAgICAgIGlmIChmcmVlemVBdXRob3JpdHkpIHtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgICAgY3JlYXRlRGVsZWFnYXRlKFxuICAgICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgICAgICBmcmVlemVBdXRob3JpdHkudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICAvLyBjb2xsZWN0aW9uIC0tLVxuICAgICAgaWYgKGlucHV0LmNvbGxlY3Rpb24pIHtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgICAgY3JlYXRlVmVyaWZ5U2l6ZWRDb2xsZWN0aW9uKFxuICAgICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgaW5wdXQuY29sbGVjdGlvbi50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGtleXBhaXJzID0gW293bmVyLnRvS2V5cGFpcigpLCBtaW50LnRvS2V5cGFpcigpXTtcblxuICAgICAgLy8gY3JlYXRvciAtLS1cbiAgICAgIGlmIChpbnB1dC5jcmVhdG9ycykge1xuICAgICAgICBpbnB1dC5jcmVhdG9ycy5mb3JFYWNoKChjcmVhdG9yKSA9PiB7XG4gICAgICAgICAgaWYgKEFjY291bnQuS2V5cGFpci5pc1NlY3JldChjcmVhdG9yLnNlY3JldCkpIHtcbiAgICAgICAgICAgIGNvbnN0IGNyZWF0b3JQdWJrZXkgPSBjcmVhdG9yLmFkZHJlc3MudG9QdWJsaWNLZXkoKTtcbiAgICAgICAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVWZXJpZnlDcmVhdG9yKG1pbnQudG9QdWJsaWNLZXkoKSwgY3JlYXRvclB1YmtleSk7XG4gICAgICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChpbnN0KTtcbiAgICAgICAgICAgIGtleXBhaXJzLnB1c2goY3JlYXRvci5zZWNyZXQudG9LZXlwYWlyKCkpO1xuICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBuZXcgVHJhbnNhY3Rpb25CdWlsZGVyLk1pbnQoXG4gICAgICAgIGluc3RydWN0aW9ucyxcbiAgICAgICAga2V5cGFpcnM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gIGNvbnN0IGlzTXV0YWJsZSA9IGlucHV0LmlzTXV0YWJsZSA9PT0gdW5kZWZpbmVkID8gdHJ1ZSA6IGlucHV0LmlzTXV0YWJsZTtcblxuICAgICAgZGVidWdMb2coJyMgaW5wdXQ6ICcsIGlucHV0KTtcbiAgICAgIGRlYnVnTG9nKCcjIHNlbGxlckZlZUJhc2lzUG9pbnRzOiAnLCBzZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICBkZWJ1Z0xvZygnIyBkYXRhdjI6ICcsIGRhdGF2Mik7XG5cbiAgICAgIGNvbnN0IG1pbnQgPSBBY2NvdW50LktleXBhaXIuY3JlYXRlKCk7XG4gICAgICBjb25zdCBpbnN0cyA9IGF3YWl0IE1pbnQuY3JlYXRlTWludChcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lclB1YmxpY2tleSxcbiAgICAgICAgZGF0YXYyLFxuICAgICAgICBmZWVQYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgICBpc011dGFibGUsXG4gICAgICApO1xuXG4gICAgICAvLyBmcmVlemVBdXRob3JpdHlcbiAgICAgIGlmIChvcHRpb25zLmZyZWV6ZUF1dGhvcml0eSkge1xuICAgICAgICBpbnN0cy5wdXNoKFxuICAgICAgICAgIE1pbnQuY3JlYXRlRGVsZWFnYXRlKFxuICAgICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgb3duZXJQdWJsaWNrZXksXG4gICAgICAgICAgICBvcHRpb25zLmZyZWV6ZUF1dGhvcml0eS50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGJsb2NraGFzaE9iaiA9IGF3YWl0IE5vZGUuZ2V0Q29ubmVjdGlvbigpLmdldExhdGVzdEJsb2NraGFzaCgpO1xuICAgICAgY29uc3QgdHggPSBuZXcgVHJhbnNhY3Rpb24oe1xuICAgICAgICBsYXN0VmFsaW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heWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgKTtcblxuICAgICAgLy8gZnJlZXplQXV0aG9yaXR5XG4gICAgICBpZiAoZnJlZXplQXV0aG9yaXR5KSB7XG4gICAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICAgIE1pbnQuY3JlYXRlRGVsZWFnYXRlKFxuICAgICAgICAgICAgY29sbGVjdGlvbk1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICAgICAgZnJlZXplQXV0aG9yaXR5LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgY29sbGVjdGlvbnMgPSB7XG4gICAgICAgIGNvbGxlY3Rpb25NZXRhZGF0YTogY29sbGVjdGlvbk1ldGFkYXRhQWNjb3VudCxcbiAgICAgICAgY29sbGVjdGlvbkF1dGhvcml0eTogb3duZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICBjb2xsZWN0aW9uTWludDogY29sbGVjdGlvbk1pbnQudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgfTtcblxuICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgIGNyZWF0ZVNldENvbGxlY3Rpb25TaXplSW5zdHJ1Y3Rpb24oY29sbGVjdGlvbnMsIHtcbiAgICAgICAgICBzZXRDb2xsZWN0aW9uU2l6ZUFyZ3M6IHtcbiAgICAgICAgICAgIHNpemU6IGNvbGxlY3Rpb25TaXplIHx8IERFRkFVTFRfQ09MTEVDVElPTl9TSVpFLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0pLFxuICAgICAgKTtcblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuTWludChcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLFxuICAgICAgICBbb3du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CAiZ2V0QXNzb2NpYXRlZFRva2VuQWRkcmVzc1N5bmMiLCAiZ2V0TWluaW11bUJhbGFuY2VGb3JSZW50RXhlbXB0TWludCIsICJNSU5UX1NJWkUiLCAiVE9LRU5fUFJPR1JBTV9JRCIsICJjcmVhdGVDcmVhdGVNZXRhZGF0YUFjY291bnRWM0luc3RydWN0aW9uIiwgIlJlZ3VsYXJOZnQiLCAibWludCIsICJBY2NvdW50IiwgImdldEFzc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jIiwgIlN5c3RlbVByb2dyYW0iLCAiZ2V0TWluaW11bUJhbGFuY2VGb3JSZW50RXhlbXB0TWludCIsICJNSU5UX1NJWkUiLCAiVE9LRU5fUFJPR1JBTV9JRCIsICJjcmVhdGVJbml0aWFsaXplTWludEluc3RydWN0aW9uIiwgImNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbiIsICJjcmVhdGVNaW50VG9DaGVja2VkSW5zdHJ1Y3Rpb24iLCAiQ29udmVydGVyIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJUcmFuc2FjdGlvbiIsICJSZWd1bGFyTmZ0IiwgIkNvbnZlcnRlciIsICJBY2NvdW50IiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJSZWd1bGFyTmZ0IiwgIlNwbFRva2VuIiwgIlJlZ3VsYXJOZnQiLCAiQ29udmVydGVyIiwgIkFjY291bnQiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgImdldEFzc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jIiwgIlJlZ3VsYXJOZnQiLCAiQWNjb3VudCIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiUmVndWxhck5mdCIsICJTcGxUb2tlbiIsICJSZWd1bGFyTmZ0IiwgIkNvbXByZXNzZWROZnQiLCAiUmVndWxhck5mdCIsICJDb21wcmVzc2VkTmZ0Il0KfQo= \ No newline at end of file +//# sourceMappingURL=data:application/json;base64,ewogICJ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iAgICAgIHJldHVybiBUcnkoYXN5bmMgKCkgPT4ge1xuICAgICAgICBsZXQgaSA9IDA7XG4gICAgICAgIGZvciAoY29uc3QgYSBvZiBhcnIpIHtcbiAgICAgICAgICBpZiAoIWEuaW5zdHJ1Y3Rpb25zICYmICFhLnNpZ25lcnMpIHtcbiAgICAgICAgICAgIHRocm93IEVycm9yKFxuICAgICAgICAgICAgICBgb25seSBJbnN0cnVjdGlvbiBvYmplY3QgdGhhdCBjYW4gdXNlIGJhdGNoU3VibWl0KCkuXG4gICAgICAgICAgICBJbmRleDogJHtpfSwgU2V0IHZhbHVlOiAke0pTT04uc3RyaW5naWZ5KGEpfWAsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICBpKys7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBpbnN0cnVjdGlvbnMgPSBhcnIuZmxhdE1hcCgoYSkgPT4gYS5pbnN0cnVjdGlvbnMpO1xuICAgICAgICBjb25zdCBzaWduZXJzID0gYXJyLmZsYXRNYXAoKGEpID0+IGEuc2lnbmVycyk7XG4gICAgICAgIGNvbnN0IGZlZVBheWVycyA9IGFyci5maWx0ZXIoKGEpID0+IGEuZmVlUGF5ZXIgIT09IHVuZGVmaW5lZCk7XG4gICAgICAgIGxldCBmZWVQYXllciA9IHNpZ25lcnNbMF07XG4gICAgICAgIGlmIChmZWVQYXllcnMubGVuZ3RoID4gMCAmJiBmZWVQYXllcnNbMF0uZmVlUGF5ZXIpIHtcbiAgICAgICAgICBmZWVQYXllciA9IGZlZVBheWVyc1swXS5mZWVQYXllcjtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHRyYW5zYWN0aW9uID0gbmV3IFRyYW5zYWN0aW9uKCk7XG4gICAgICAgIGxldCBmaW5hbFNpZ25lcnMgPSBzaWduZXJzO1xuICAgICAgICBpZiAoZmVlUGF5ZXIpIHtcbiAgICAgICAgICB0cmFuc2FjdGlvbi5mZWVQYXllciA9IGZlZVBheWVyLn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ldyBUcmFuc2FjdGlvbigpO1xuXG4gICAgICAgIGNvbnN0IGJsb2NraGFzaE9iaiA9IGF3YWl0IE5vZGUuZ2V0Q29ubmVjdGlvbigpLmdldExhdGVzdEJsb2NraGFzaCgpO1xuICAgICAgICB0cmFuc2FjdGlvbi5sYXN0VmFsaWRCbG9ja0hlaWdodCA9IGJsb2NraGFzaE9iai5sYXN0VmFsaWRCbG9ja0hlaWdodDtcbiAgICAgICAgdHJhbnNhY3Rpb24ucmVjZW50QmxvY2toYXNoID0gYmxvY2toYXNoT2JqLmJsb2NraGFzaDtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHRoaXMuc2lnbmVycztcblxuICAgICAgICBpZiAodGhpcy5mZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gdGhpcy5mZWVQYXllci5wdWJsaWNLZXk7XG4gICAgICAgICAgZmluYWxTaWduZXJzID0gW3RoaXMuZmVlUGF5ZXIsIC4uLnRoaXMuc2lnbmVyc107XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLmluc3RydWN0aW9ucy5mb3JFYWNoKChpbnN0KSA9PiB0cmFuc2FjdGlvbi5hZGQoaW5zdCkpO1xuXG4gICAgICAgIGNvbnN0IG9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IE1BWF9SRVRSSUVTLFxuICAgICAgICB9O1xuXG4gICAgICAgIHJldHVybiBhd2FpdCBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uKFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICBvcHRpb25zLFxuICAgICAgICApO1xuICAgICAgfSk7XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7XG4gIENvbmZpcm1PcHRpb25zLFxuICBLZXlwYWlyLF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nRva2VuQWNjb3VudCEsXG4gICAgICApO1xuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiBSZXRyeSBmdW5jdGlvbiBpZiBjcmVhdGUgbmV3IHRva2VuIGFjY291aW50XG4gICAgICpcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gbWludFxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBvd25lclxuICAgICAqIEBwYXJhbSB7U2VjcmV0fSBmZWVQYXllclxuICAgICAqIEByZXR1cm5zIFByb21pc2U8c3RyaW5nPlxuICAgICAqL1xuICAgIGV4cG9ydCBjb25zdCByZXRyeUdldE9yQ3JlYXRlID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyOiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxzdHJpbmc+ID0+IHtcbiAgICAgIGxldCBjb3VudGVyID0gMTtcbiAgICAgIHdoaWxlIChjb3VudGVyIDwgUkVUUllfT1ZFUl9MSU1JVCkge1xuICAgICAgICB0cnkge1xuICAgICAgICAgIGNvbnN0IGluc3QgPSBhd2FpdCBnZXQobWludCwgb3duZXIsIGZlZVBheWVyLCB0cnVlKTtcblxuICAgICAgICAgIGlmIChpbnN0ICYmIHR5cGVvZiBpbnN0ID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgaW5zdCk7XG4gICAgICAgICAgICByZXR1cm4gaW5zdDtcbiAgICAgICAgICB9IGVsc2UgaWYgKGluc3QgaW5zdGFuY2VvZiBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uKSB7XG4gICAgICAgICAgICAoYXdhaXQgaW5zdC5zdWJtaXQoKSkubWFwKFxuICAgICAgICAgICAgICBhc3luYyAob2s6IHN0cmluZykgPT4ge1xuICAgICAgICAgICAgICAgIGF3YWl0IE5vZGUuY29uZmlybWVkU2lnKG9rKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gaW5zdC5kYXRhO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAoZXJyOiBFcnJvcikgPT4ge1xuICAgICAgICAgICAgICAgIGRlYnVnTG9nKCcjIEVycm9yIHN1Ym1pdCByZXRyeUdldE9yQ3JlYXRlOiAnLCBlcnIpO1xuICAgICAgICAgICAgICAgIHRocm93IGVycjtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgZGVidWdMb2coYCMgcmV0cnk6ICR7Y291bnRlcn0gY3JlYXRlIHRva2VuIGFjY291bnQ6IGAsIGUpO1xuICAgICAgICAgIGRlYnVnTG9nKGAjIG1pbnQ6ICR7bWludH0sIG93bmVyOiAke293bmVyfSwgZmVlUGF5ZXI6ICR7ZmVlUGF5ZXJ9YCk7XG4gICAgICAgIH1cbiAgICAgICAgYXdhaXQgc2xlZXAoUkVUUllfU0xFRVBfVElNRSk7XG4gICAgICAgIGNvdW50ZXIrKztcbiAgICAgIH1cbiAgICAgIHRocm93IEVycm9yKGByZXRyeSBhY3Rpb24gaXMgb3ZlciBsaW1pdCAke1JFVFJZX09WRVJfTElNSVR9YCk7XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIFtNYWluIGxvZ2ljXUdldCBBc3NvY2lhdGVkIHRva2VuIEFjY291bnQuXG4gICAgICogaWYgbm90IGNyZWF0ZWQsIGNyZWF0ZSBuZXcgdG9rZW4gYWNjb3VpbnRcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBtaW50XG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAgICogQHBhcmFtIHtQdWJrZXl9IGZlZVBheWVyXG4gICAgICogQHJldHVybnMgUHJvbWlzZTxzdHJpbmc+XG4gICAgICovXG4gICAgZXhwb3J0IGNvbnN0IG1ha2VPckNyZWF0ZUluc3RydWN0aW9uID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyPzogUHVia2V5LFxuICAgICAgYWxsb3dPd25lck9mZkN1cnZlID0gZmFsc2UsXG4gICAgKTogUHJvbWlzZTx7XG4gICAgICB0b2tlbkFjY291bnQ6IHN0cmluZztcbiAgICAgIGluc3Q6IFRyYW5zYWN0aW9uSW5zdHJ1Y3Rpb24gfCB1bmRlZmluZWQ7XG4gICAgfT4gPT4ge1xuICAgICAgY29uc3QgYXNzb2NpYXRlZFRva2VuQWNjb3VudCA9IGdldEFzc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jKFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSxcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3QsXG4gICAgICAgIH07XG4gICAgICB9XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IEtleXBhaXIgYXMgT3JpZ2luYWwsIFB1YmxpY0tleSB9IGZyb20gJ0Bzb2xhbmEvd2ViMy5qcyc7XG5pbXBvcnQgeyBQdWJrZXksIFNlY3JldCB9IGZyb20gJ34vdHlwZXMvYWNjb3VudCc7XG5pbXBvcnQ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k7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvQ29tcHJlc3NlZE5mdEluZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IEludGVybmFsQ3JlYXRvcnNbXSA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBbXTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBpbnB1dCEubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlciA9IChcbiAgICAgIG91dHB1dDogT3B0aW9uPEludGVybmFsQ3JlYXRvcnNbXT4sXG4gICAgKTogQ3JlYXRvcnNbXSB8IHVuZGVmaW5lZCA9PiB7XG4gICAgICBpZiAoIW91dHB1dCkge1xuICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gb3V0cHV0Lm1hcCgoZGF0YSkgPT4ge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIGFkZHJlc3M6IGRhdGEuYWRkcmVzcy50b1N0cmluZygpLFxuICAgICAgICAgIHNoYXJlOiBkYXRhLnNoYXJlLFxuICAgICAgICAgIHZlcmlmaWVkOiBkYXRhLnZlcmlmaWVkLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IENvbnZlcnRlciBhcyBDb2xsZWN0aW9uIH0gZnJvbSAnLi9jb2xsZWN0aW9uJztcbmltcG9ydCB7IENvbnZlcnRlciBhcyBDc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GZpbGVzID0gYXdhaXQgUHJvbWlzZS5hbGwoXG4gICAgICAgIGlucHV0LmZpbGVzLm1hcChhc3luYyAoZmlsZSkgPT4ge1xuICAgICAgICAgIGlmICghZmlsZS5maWxlUGF0aCkge1xuICAgICAgICAgICAgcmV0dXJuIHt9O1xuICAgICAgICAgIH1cbiAgICAgICAgICBjb25zdCByZXMgPSBhd2FpdCBjYWxsYmFja0Z1bmMoZmlsZS5maWxlUGF0aCwgc3RvcmFnZVR5cGUsIGZlZVBheWVyKTtcbiAgICAgICAgICBpZiAocmVzLmlzRXJyKSB7XG4gICAgICAgICAgICB0aHJvdyBFcnJvcihyZXMuZXJyb3IubWVzc2FnZSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBvdmVyd3JpdGVPYmplY3QoZmlsZSwgW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBleGlzdHNLZXk6ICdmaWxlUGF0aCcsXG4gICAgICAgICAgICAgIHdpbGw6IHsga2V5OiAndXJpJywgdmFsdWU6IHJlcy52YWx1ZSB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICBdKTtcbiAgICAgICAgfSksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHsgLi4uaW5wdXQsIGZpbGVzIH0gYXMgUHJvcGVydGllcztcbiAgICB9O1xuICB9XG59XG4iLCAiLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLXVudXNlZC12YXJzICovXG5pbXBvcnQgeyBPcHRpb24sIFVzZXMgfSBmcm9tICd+L3R5cGVzL3JlZ3VsYXItbmZ0JztcblxuZXhwb3J0IG5hbWVzcGFjZSBDb252ZXJ0ZXIge1xuICBleHBvcnQgbmFtZXNwYWNlIFVzZXMge1xuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlclNpZGUgPSAob3V0cHV0OiBPcHRpb248VXNlcz4pOiBVc2VzIHwgdW5kZWZpbmVkID0+IHtcbiAgICAgIGlmICghb3V0cHV0KSB7XG4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IGlzSW1hZ2VVcmwobWV0YWRhdGEuaW1hZ2UpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAncm95YWx0eSc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnJveWFsdHkpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNSb3lhbHR5KG1ldGFkYXRhLnJveWFsdHkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEuc3ltYm9sKSB7XG4g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iAgICApO1xuICAgIGlmIChhc3NldHMuaXNFcnIpIHtcbiAgICAgIHRocm93IGFzc2V0cy5lcnJvcjtcbiAgICB9XG5cbiAgICBjb25zdCBpdGVtcyA9IGFzc2V0cy52YWx1ZS5pdGVtcztcblxuICAgIGNvbnN0IG1ldGFkYXRhcyA9IGF3YWl0IFByb21pc2UuYWxsKFxuICAgICAgaXRlbXNcbiAgICAgICAgLmZpbHRlcigoaXRlbSkgPT4gaXRlbS5jb21wcmVzc2lvbi5jb21wcmVzc2VkID09PSBpc0NvbXByZXNzZWQpXG4gICAgICAgIC5tYXAoYXN5bmMgKGl0ZW0pID0+IHtcbiAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgY29uc3Qgb2ZmY2hhaW46IE9mZmNoYWluID0gYXdhaXQgZmV0Y2hPZmZjaGFpbihcbiAgICAgICAgICAgICAgaXRlbS5jb250ZW50Lmpzb25fdXJpLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIGNvbnN0IG1lcmdlZCA9IHtcbiAgICAgICAgICAgICAgb25jaGFpbjogaXRlbSxcbiAgICAgICAgICAgICAgb2ZmY2hhaW46IG9mZmNoYWluLFxuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIHJldHVybiBDb252ZXJ0ZXIuTmZ0LmludG9Vc2VyKG1lcmdlZCk7XG4gICAgICAgICAgfSBjYXRjaCAoZXJyKSB7XG4gICAgICAgICAgICBkZWJ1Z0xvZygnIyBGYWlsZWQgZmV0Y2ggb2ZmY2hhaW4gdXJsOiAnLCBpdGVtLmNvbnRlbnQuanNvbl91cmkpO1xuICAgICAgICAgICAgcmV0dXJuIENvbnZlcnRlci5OZnQuaW50b1VzZXIoe1xuICAgICAgICAgICAgICBvbmNoYWluOiBpdGVtLFxuICAgICAgICAgICAgICBvZmZjaGFpbjoge30sXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICB9XG4gICAgICAgIH0pLFxuICAgICk7XG4gICAgcmV0dXJuIHtcbiAgICAgIHBhZ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cGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICAgIG5ld0FjY291bnRQdWJrZXk6IHRyZWVPd25lci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgICAgbGFtcG9ydHM6XG4gICAgICAgICAgICBhd2FpdCBOb2RlLmdldENvbm5lY3Rpb24oKS5nZXRNaW5pbXVtQmFsYW5jZUZvclJlbnRFeGVtcHRpb24oc3BhY2UpLFxuICAgICAgICAgIHNwYWNlOiBzcGFjZSxcbiAgICAgICAgICBwcm9ncmFtSWQ6IFNQTF9BQ0NPVU5UX0NPTVBSRVNTSU9OX1BST0dSQU1fSUQsXG4gICAgICAgIH0pLFxuICAgICAgKTtcblxuICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgIGNyZWF0ZUNyZWF0ZVRyZWVJbnN0cnVjdGlvbihcbiAgICAgICAgICB7XG4gICAgICAgICAgICBtZXJrbGVUcmVlOiB0cmVlT3duZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICAgICAgdHJlZUF1dGhvcml0eSxcbiAgICAgICAgICAgIHRyZWVDcmVhdG9yOiBvd25lci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgICAgICBwYXllcjogcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICAgICAgbG9nV3JhcHBlcjogU1BMX05PT1BfUFJPR1JBTV9JRCxcbiAgICAgICAgICAgIGNvbXByZXNzaW9uUHJvZ3JhbTogU1BMX0FDQ09VTlRfQ09NUFJFU1NJT05fUFJPR1JBTV9JRCxcbiAgICAgICAgICB9LFxuICAgICAgICAgIHtcbiAgICAgICAgICAgIG1heEJ1ZmZlclNpemUsXG4gICAgICAgICAgICBtYXhEZXB0aCxcbiAgICAgICAgICAgIHB1YmxpYzogZmFsc2UsXG4gICAgICAgICAgfSxcbiAgICAgICAgICBNUExfQlVCQkxFR1VNX1BST0dSQU1fSUQudG9QdWJsaWNL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sXG4gICAgICAgICAgICBidWJibGVndW1TaWduZXIsXG4gICAgICAgICAgICBsb2dXcmFwcGVyOiBTUExfTk9PUF9QUk9HUkFNX0lELFxuICAgICAgICAgICAgY29sbGVjdGlvbkF1dGhvcml0eVJlY29yZFBkYTogQlVCQkxFR1VNX1BST0dSQU1fSUQsXG4gICAgICAgICAgICBjb21wcmVzc2lvblByb2dyYW06IFNQTF9BQ0NPVU5UX0NPTVBSRVNTSU9OX1BST0dSQU1fSUQsXG4gICAgICAgICAgICB0b2tlbk1ldGFkYXRhUHJvZ3JhbTogVE9LRU5fTUVUQURBVEFfUFJPR1JBTV9JRCxcbiAgICAgICAgICB9LFxuICAgICAgICAgIHtcbiAgICAgICAgICAgIG1ldGFkYXRhQXJncyxcbiAgICAgICAgICB9LFxuICAgICAgICApLFxuICAgICAgKTtcblxuICAgICAgaWYgKGlucHV0LmNyZWF0b3JzKSB7XG4gICAgICAgIGNvbnN0IGFzc2V0SWQgPSBhd2FpdCBuZXcgU3BhY2UuU3BhY2UodHJlZU93bmVyKS5nZXRBc3NldElkKCk7XG4gICAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICAgIGF3YWl0IGNyZWF0ZVZlcmlmeUNyZWF0b3IoXG4gICAgICAgICAgICBtZXRhZGF0YUFyZ3MuY3JlYXRvcnMsXG4gICAgICAgICAgICBhc3NldElkLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICB0cmVlT3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIG1ldGFkYXRhQXJncyxcbiAgICAgICAgICAgIHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5NaW50KFxuICAgICAgICBpbnN0cnVjdGlvbnMsXG4gICAgICAgIFtvd25lci50b0tleXBhaXIoKV0sXG4gICAgICAgIHBheWVyLnRvS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uICAgICAgICAgIHByb2dyYW1JZDogVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgfSxcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IGRhdGFzID0gaW5mby52YWx1ZS5tYXAoYXN5bmMgKGQpID0+IHtcbiAgICAgICAgY29uc3QgbWludCA9IGQuYWNjb3VudC5kYXRhLnBhcnNlZC5pbmZvLm1pbnQgYXMgUHVia2V5O1xuICAgICAgICBjb25zdCB0b2tlbkFtb3VudCA9IGQuYWNjb3VudC5kYXRhLnBhcnNlZC5pbmZvLnRva2VuQW1vdW50XG4gICAgICAgICAgLmFtb3VudCBhcyBzdHJpbmc7XG4gICAgICAgIGlmICh0b2tlbkFtb3VudCA9PT0gJzEnKSB7XG4gICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBNZXRhZGF0YS5mcm9tQWNjb3VudEFkZHJlc3MoXG4gICAgICAgICAgY29ubmVjdGlvbixcbiAgICAgICAgICBBY2NvdW50LlBkYS5nZXRNZXRhZGF0YShtaW50KSxcbiAgICAgICAgKVxuICAgICAgICAgIC50aGVuKGFzeW5jIChtZXRhZGF0YSkgPT4ge1xuICAgICAgICAgICAgLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLWV4cGxpY2l0LWFueSAqL1xuICAgICAgICAgICAgcmV0dXJuIGZldGNoUmV0cnkobWV0YWRhdGEuZGF0YS51cmkpLnRoZW4oKGpzb246IGFueSkgPT4ge1xuICAgICAgICAgICAgICByZXR1cm4gY29udmVydGVyKG1ldGFkYXRhLCBqc29uLCB0b2tlbkFtb3VudCk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICB9KVxuICAgICAgICAgIC5jYXRjaCgoZXJyKSA9PiBkZWJ1Z0xvZygnIyBbRmV0Y2ggZXJyb3JdJywgZXJyKSk7XG4gICAgICB9KTtcblxuICAgICAgY29uc3QgZmlsdGVycyA9IChhd2FpdCBQcm9taXNlLmFsb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gICAgICBjcmVhdGVBc3NvY2lhdGVkVG9rZW5BY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgIGZlZVBheWVyLFxuICAgICAgICB0b2tlbkFzc29jaWF0ZWQsXG4gICAgICAgIG93bmVyLFxuICAgICAgICBtaW50LFxuICAgICAgKSxcbiAgICApO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVNaW50VG9DaGVja2VkSW5zdHJ1Y3Rpb24oXG4gICAgICAgIG1pbnQsXG4gICAgICAgIHRva2VuQXNzb2NpYXRlZCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIENhbGN1bGF0ZS5jYWxjdWxhdGVBbW91bnQodG90YWxBbW91bnQsIG1pbnREZWNpbWFsKSxcbiAgICAgICAgbWludERlY2ltYWwsXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUNyZWF0ZU1ldGFkYXRhQWNjb3VudFYzSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHtcbiAgICAgICAgICBtZXRhZGF0YTogbWV0YWRhdGFQZGEsXG4gICAgICAgICAgbWludCxcbiAgICAgICAgICBtaW50QXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBwYXllcjogZmVlUGF5ZXIsXG4gICAgICAgICAgdXBkYXRlQXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgIGNyZWF0ZU1ldGFkYXRhQWNjb3VudEFyZ3NWMzoge1xuICAgICAgICAgICAgZGF0YTogdG9rZW5NZXRhZGF0YSxcbiAgICAgICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICAgICAgIGNvbGxlY3Rpb25EZXRhaWxzOiBudWxsLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICApLFxuICAgICk7XG4gICAgcmV0dXJuIGluc3RydWN0aW9ucztcbiAgfTtcblxuICAvKipcbiAgICogU1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1hZ2UgPSB7IGltYWdlOiBpbnB1dC51cmkgfTtcbiAgICAgICAgY29uc3QgdXBsb2FkZWQgPSBhd2FpdCBTdG9yYWdlLnVwbG9hZERhdGEoXG4gICAgICAgICAgeyAuLi5zdG9yYWdlTWV0YWRhdGEsIC4uLmltYWdlIH0sXG4gICAgICAgICAgc3RvcmFnZVR5cGUsXG4gICAgICAgICAgcGF5ZXIsXG4gICAgICAgICk7XG4gICAgICAgIGlmICh1cGxvYWRlZC5pc0Vycikge1xuICAgICAgICAgIHRocm93IHVwbG9hZGVkO1xuICAgICAgICB9XG4gICAgICAgIHVyaSA9IHVwbG9hZGVkLnZhbHVlO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgdGhyb3cgRXJyb3IoYE11c3Qgc2V0IGZpbGVQYXRoJyBvciAndXJpJ2ApO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBpc011dGFibGUgPSB0cnVlO1xuXG4gICAgICBjb25zdCBkYXRhdjIgPSBDb252ZXJ0ZXIuVG9rZW5NZXRhZGF0YS5pbnRvSW5mcmEoXG4gICAgICAgIGlucHV0LFxuICAgICAgICB1cmksXG4gICAgICAgIHNlbGxlckZlZUJhc2lzUG9pbnRzLFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgZGF0YXYyOiAnLCBkYXRhdjIpO1xuICAgICAgZGVidWdMb2coJyMgdXBsb2FkIGNvbnRlbnQgdXJsOiAnLCB1cmkpO1xuXG4gICAgICBjb25zdCBtaW50ID0gQWNjb3VudC5LZXlwYWlyLmNyZWF0ZSgpO1xuICAgICAgY29uc3QgaW5zdHMgPSBhd2FpdCBjcmVhdGVNaW50KFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICB0b3RhbEFtb3VudCxcbiAgICAgICAgbWludERlY2ltYWwsXG4gICAgICAgIGRhdGF2MixcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICBpc011dGFibGUsXG4gICAgICApO1xuXG4gICAgICAvLyBmcmVlemVBdXRob3JpdHlcbiAgICAgIGlmIChmcmVlemVBdXRob3JpdHkpIHtcbiAgICAgICAgaW5zdHMucHVzaChcbiAgICAgICAgICBjcmVhdGVGcmVlemVBdXRob3JpdHkoXG4gICAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgICAgIGZyZWV6ZUF1dGhvcml0eS50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBuZXcgVHJhbnNhY3Rpb25CdWlsZGVyLk1pbnQoXG4gICAgICAgIGluc3RzLFxuICAgICAgICBbb3duZXIudG9LZXlwYWlyKCksIG1pbnQudG9LZXlwYWlyKCldLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgbWludC5wdWJrZXksXG4gICAgICApO1xuICAgIH0pO1xuICB9O1xufVxuIiwgImltcG9ydCB7IFJlc3VsdCwgVHJ5IH0gZnJvbSAnfi9zdWl0ZS11dGlscyc7XG5pbXBvcnQgeyBUcmFuc2FjdGlvbkJ1aWxkZXIgfSBmcm9tICd+L3RyYW5zYWN0aW9uLWJ1aWxkZXInO1xuaW1wb3J0IHsgUHVia2V5LCBTZWNyZXQgfSBmcm9tICd+L3R5cGVzL2FjY291bnQnO1xuaW1wb3J0IHsgQWNjb3VudCB9IGZyb20gJ34vYWNjb3VudCc7XG5pbXBvcnQge1xuICBjcmVhdGVUaGF3QWNjb3VudEluc3RydWN0aW9uLFxuICBnZXRBc3NvY2lhdGVkVG9rZW5BZGRyZXNzU3luYyxcbn0gZnJvbSAnQHNvbGFuYS9zcGwtdG9rZW4nO1xuaW1wb3J0IHsgVGhhd09wdGlvbnMgfSBmcm9tICd+L3R5cGVzL3NwbC10b2tlbic7XG5pbXBvcnQgeyBDb21tb25TdHJ1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ICB7XG4gICAgICAgICAgZWRpdGlvbjogbWFzdGVyRWRpdGlvblB1YmtleSxcbiAgICAgICAgICBtaW50LFxuICAgICAgICAgIHVwZGF0ZUF1dGhvcml0eTogb3duZXIsXG4gICAgICAgICAgbWludEF1dGhvcml0eTogb3duZXIsXG4gICAgICAgICAgcGF5ZXI6IGZlZVBheWVyLFxuICAgICAgICAgIG1ldGFkYXRhOiB0b2tlbk1ldGFkYXRhUHVia2V5LFxuICAgICAgICB9LFxuICAgICAgICB7XG4gICAgICAgICAgY3JlYXRlTWFzdGVyRWRpdGlvbkFyZ3M6IHtcbiAgICAgICAgICAgIG1heFN1cHBseTogMCxcbiAgICAgICAgICB9LFxuICAgICAgICB9LFxuICAgICAgKSxcbiAgICApO1xuICAgIHJldHVybiBpbnN0cnVjdGlvbnM7XG4gIH07XG5cbiAgLyoqXG4gICAqIFVwbG9hZCBjb250ZW50IGFuZCBORlQgbWludFxuICAgKlxuICAgKiBAcGFyYW0ge1NlY3JldH0gb3duZXIgICAgICAgICAvLyBvd25lcidzIFNlY3JldFxuICAgKiBAcGFyYW0ge0lucHV0TmZ0TWV0YWRhdGF9IGlucHV0XG4gICAqIHtcbiAgICogICBuYW1lOiBzdHJpbmcgICAgICAgICAgICAgICAvLyBuZnQgY29udGVudCBuYW1lXG4gICAqICAgc3ltYm9sOiBzdHJpbmcgICAgICAgICAgICAgLy8gbmZ0IHRpY2tlciBzeW1ib2xcbiAgICogICBmaWxlUGF0aDogc3RyaW5nIHwgRmlsZSAgICAvLyBuZnQgdGlja2VyIHN5bWJvbFxuICAgKiAgIHJveWFsdHk6IG51bWJlciAgICAgICAgICAgIC8vIHJveWFsdHkgcGVyY2VudGFnZVxuICAgKiAgIHN0b3JhZ2VUeXBlOiAnYXJ3ZWF2ZSd8J25mdFN0b3JhZ2UnIC8vIERlY2VudHJhbGl6ZWQgc3RvcmFnZVxuICAgKiAgIGRlc2NyaXB0aW9uPzogc3RyaW5nICAgICAgIC8vIG5mdCBjb250Z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HVibGljS2V5LFxuICAgICAgICBkYXRhdjIsXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgKTtcblxuICAgICAgLy8gZnJlZXplQXV0aG9yaXR5XG4gICAgICBpZiAoZnJlZXplQXV0aG9yaXR5KSB7XG4gICAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICAgIGNyZWF0ZURlbGVhZ2F0ZShcbiAgICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICAgICAgZnJlZXplQXV0aG9yaXR5LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgLy8gY29sbGVjdGlvbiAtLS1cbiAgICAgIGlmIChpbnB1dC5jb2xsZWN0aW9uKSB7XG4gICAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICAgIGNyZWF0ZVZlcmlmeVNpemVkQ29sbGVjdGlvbihcbiAgICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIGlucHV0LmNvbGxlY3Rpb24udG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBrZXlwYWlycyA9IFtvd25lci50b0tleXBhaXIoKSwgbWludC50b0tleXBhaXIoKV07XG5cbiAgICAgIC8vIGNyZWF0b3IgLS0tXG4gICAgICBpZiAoaW5wdXQuY3JlYXRvcnMpIHtcbiAgICAgICAgaW5wdXQuY3JlYXRvcnMuZm9yRWFjaCgoY3JlYXRvcikgPT4ge1xuICAgICAgICAgIGlmIChBY2NvdW50LktleXBhaXIuaXNTZWNyZXQoY3JlYXRvci5zZWNyZXQpKSB7XG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gICAgICBkZWJ1Z0xvZygnIyBpbnB1dDogJywgaW5wdXQpO1xuICAgICAgZGVidWdMb2coJyMgZGF0YXYyOiAnLCBkYXRhdjIpO1xuXG4gICAgICBjb25zdCBjb2xsZWN0aW9uTWludCA9IEFjY291bnQuS2V5cGFpci5jcmVhdGUoKTtcbiAgICAgIGNvbnN0IGNvbGxlY3Rpb25NZXRhZGF0YUFjY291bnQgPSBBY2NvdW50LlBkYS5nZXRNZXRhZGF0YShcbiAgICAgICAgY29sbGVjdGlvbk1pbnQucHVia2V5LFxuICAgICAgKTtcblxuICAgICAgY29uc3QgaW5zdHJ1Y3Rpb25zID0gYXdhaXQgTWludC5jcmVhdGVNaW50KFxuICAgICAgICBjb2xsZWN0aW9uTWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgZGF0YXYyLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICk7XG5cbiAgICAgIC8vIGZyZWV6ZUF1dGhvcml0eVxuICAgICAgaWYgKGZyZWV6ZUF1dGhvcml0eSkge1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgICBNaW50LmNyZWF0ZURlbGVhZ2F0ZShcbiAgICAgICAgICAgIGNvbGxlY3Rpb25NaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgICAgIGZyZWV6ZUF1dGhvcml0eS50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGNvbGxlY3Rpb25zID0ge1xuICAgICAgICBjb2xsZWN0aW9uTWV0YWRhdGE6IGNvbGxlY3Rpb25NZXRhZGF0YUFjY291bnQsXG4gICAgICAgIGNvbGxlY3Rpb25BdXRob3JpdHk6IG93bmVyLnRvS2V5cGFpcigpLnB1Ymxp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ZXJ0ZXIiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlRyYW5zYWN0aW9uIiwgIlJlZ3VsYXJOZnQiLCAiQ29udmVydGVyIiwgIkFjY291bnQiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlJlZ3VsYXJOZnQiLCAiU3BsVG9rZW4iLCAiUmVndWxhck5mdCIsICJDb252ZXJ0ZXIiLCAiQWNjb3VudCIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiZ2V0QXNzb2NpYXRlZFRva2VuQWRkcmVzc1N5bmMiLCAiUmVndWxhck5mdCIsICJBY2NvdW50IiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJSZWd1bGFyTmZ0IiwgIlNwbFRva2VuIiwgIlJlZ3VsYXJOZnQiLCAiQ29tcHJlc3NlZE5mdCIsICJSZWd1bGFyTmZ0IiwgIkNvbXByZXNzZWROZnQiXQp9Cg== \ No newline at end of file diff --git a/packages/suite-compressed-nft/test/find.test.ts b/packages/suite-compressed-nft/test/find.test.ts index 6e98aaa1a..6c046343f 100644 --- a/packages/suite-compressed-nft/test/find.test.ts +++ b/packages/suite-compressed-nft/test/find.test.ts @@ -46,7 +46,7 @@ test('Find metadata by mint', async (t) => { ); }); -test('Find metadatas by collectionMint', async (t) => { +test.only('Find metadatas by collectionMint', async (t) => { const res = await CompressedNft.findByCollection(collectionMint); res.match( (ok) => { From ba67f5786888cde79772a706bf05af87723ce73d Mon Sep 17 00:00:00 2001 From: fukaoi Date: Sat, 3 Feb 2024 02:07:06 +0900 Subject: [PATCH 06/15] updated --- packages/account/test/associated.test.ts | 18 +++++++++++++----- packages/suite-spl-token/test/transfer.test.ts | 4 +++- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/packages/account/test/associated.test.ts b/packages/account/test/associated.test.ts index 33f03be66..5e90728ee 100644 --- a/packages/account/test/associated.test.ts +++ b/packages/account/test/associated.test.ts @@ -1,4 +1,5 @@ import test from 'ava'; +import { Node } from '~/node'; import { SplToken } from '~/suite-spl-token'; import { Setup } from 'test-tools/setup'; import { RandomAsset } from 'test-tools/setupAsset'; @@ -6,6 +7,7 @@ import { Account } from '../src'; import { KeypairAccount } from '~/types/account'; let source: KeypairAccount; +let feePayer: KeypairAccount; const TOKEN_METADATA = { name: 'solana-suite-token', symbol: 'SST', @@ -16,14 +18,20 @@ const TOKEN_METADATA = { test.before(async () => { const obj = await Setup.generateKeyPair(); source = obj.source; + feePayer = obj.feePayer; }); test('Retry getOrCreate', async (t) => { - const mintInst = await SplToken.mint(source.secret, 10000, 1, TOKEN_METADATA); - - await mintInst.submit(); - - t.true(mintInst.isOk); + const mintInst = await SplToken.mint( + source.secret, + 10000, + 1, + TOKEN_METADATA, + { feePayer: feePayer.secret }, + ); + const mintRes = await mintInst.submit(); + t.true(mintRes.isOk); + await Node.confirmedSig(mintRes.unwrap()); const mint = mintInst.unwrap().data!; const res = await Account.Associated.retryGetOrCreate( mint, diff --git a/packages/suite-spl-token/test/transfer.test.ts b/packages/suite-spl-token/test/transfer.test.ts index 12f799745..1eaa82ac1 100644 --- a/packages/suite-spl-token/test/transfer.test.ts +++ b/packages/suite-spl-token/test/transfer.test.ts @@ -3,6 +3,7 @@ import { Setup } from 'test-tools/setup'; import { RandomAsset } from 'test-tools/setupAsset'; import { SplToken } from '../src/'; import { KeypairAccount } from '~/types/account'; +import { Account } from '../../suite-utils/src/exports'; let source: KeypairAccount; let dest: KeypairAccount; @@ -21,7 +22,8 @@ const TOKEN_METADATA = { test.before(async () => { const obj = await Setup.generateKeyPair(); source = obj.source; - dest = obj.dest; + // dest = obj.dest; + dest = Account.Keypair.create(); feePayer = obj.feePayer; }); From 572786a670bd5252e0cba17d8ccc258463adde07 Mon Sep 17 00:00:00 2001 From: fukaoi Date: Sat, 3 Feb 2024 12:43:19 +0900 Subject: [PATCH 07/15] fix --- packages/account/src/associated.ts | 1 - packages/account/test/associated.test.ts | 2 +- packages/suite-spl-token/test/gas-less-transfer.test.ts | 8 +++++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/packages/account/src/associated.ts b/packages/account/src/associated.ts index 700848ab0..6038bb0a2 100644 --- a/packages/account/src/associated.ts +++ b/packages/account/src/associated.ts @@ -76,7 +76,6 @@ export namespace Account { const inst = await get(mint, owner, feePayer, true); if (inst && typeof inst === 'string') { - debugLog('# associatedTokenAccount: ', inst); return inst; } else if (inst instanceof TransactionBuilder.Common) { (await inst.submit()).map( diff --git a/packages/account/test/associated.test.ts b/packages/account/test/associated.test.ts index 5e90728ee..0bb3b26ad 100644 --- a/packages/account/test/associated.test.ts +++ b/packages/account/test/associated.test.ts @@ -36,7 +36,7 @@ test('Retry getOrCreate', async (t) => { const res = await Account.Associated.retryGetOrCreate( mint, source.pubkey, - source.secret, + feePayer.secret, ); t.log('# associated token account: ', res); diff --git a/packages/suite-spl-token/test/gas-less-transfer.test.ts b/packages/suite-spl-token/test/gas-less-transfer.test.ts index f857e5968..448e36461 100644 --- a/packages/suite-spl-token/test/gas-less-transfer.test.ts +++ b/packages/suite-spl-token/test/gas-less-transfer.test.ts @@ -4,6 +4,7 @@ import { RandomAsset } from 'test-tools/setupAsset'; import { SplToken } from '../src/'; import { KeypairAccount, Pubkey } from '~/types/account'; import { Account } from '~/account'; +import { Node } from '~/suite-utils'; let source: KeypairAccount; let feePayer: KeypairAccount; @@ -41,7 +42,8 @@ test('transfer feePayerPartialSign', async (t) => { ); t.true(inst1.isOk, `${inst1.unwrap()}`); - await inst1.submit(); + const resMint = await inst1.submit(); + await Node.confirmedSig(resMint.unwrap()); const token = inst1.unwrap().data as Pubkey; t.log('# mint: ', token); @@ -51,13 +53,13 @@ test('transfer feePayerPartialSign', async (t) => { receipt.pubkey, 100, MINT_DECIMAL, - source.pubkey, + feePayer.pubkey, ); t.true(serialized.isOk, `${serialized.unwrap()}`); if (serialized.isOk) { - const res = await serialized.value.submit(source.secret); + const res = await serialized.value.submit(feePayer.secret); t.true(res.isOk, `${res.unwrap()}`); t.log('# tx signature: ', res.unwrap()); } From e2665d59686a011cf7a9a5e3817ab4e79d6b6137 Mon Sep 17 00:00:00 2001 From: fukaoi Date: Sat, 3 Feb 2024 13:16:38 +0900 Subject: [PATCH 08/15] updated --- .../suite-spl-token/src/gas-less-transfer.ts | 28 +++++++------------ packages/suite-spl-token/src/transfer.ts | 24 ++++++++++------ .../suite-spl-token/test/transfer.test.ts | 15 +--------- 3 files changed, 26 insertions(+), 41 deletions(-) diff --git a/packages/suite-spl-token/src/gas-less-transfer.ts b/packages/suite-spl-token/src/gas-less-transfer.ts index 17c5b31cc..f5db67a4a 100644 --- a/packages/suite-spl-token/src/gas-less-transfer.ts +++ b/packages/suite-spl-token/src/gas-less-transfer.ts @@ -51,29 +51,21 @@ export namespace SplToken { feePayer: feePayer.toPublicKey(), }); + inst2 = createTransferCheckedInstruction( + sourceToken.tokenAccount.toPublicKey(), + mint.toPublicKey(), + destToken.tokenAccount.toPublicKey(), + ownerPublicKey, + Calculator.calculateAmount(amount, mintDecimal), + mintDecimal, + [owner.toKeypair()], + ); + // return associated token account if (!destToken.inst) { - inst2 = createTransferCheckedInstruction( - sourceToken.tokenAccount.toPublicKey(), - mint.toPublicKey(), - destToken.tokenAccount.toPublicKey(), - ownerPublicKey, - Calculator.calculateAmount(amount, mintDecimal), - mintDecimal, - [owner.toKeypair()], - ); tx.add(inst2); } else { // return instruction and undecided associated token account - inst2 = createTransferCheckedInstruction( - sourceToken.tokenAccount.toPublicKey(), - mint.toPublicKey(), - destToken.tokenAccount.toPublicKey(), - ownerPublicKey, - Calculator.calculateAmount(amount, mintDecimal), - mintDecimal, - [owner.toKeypair()], - ); tx.add(destToken.inst).add(inst2); } diff --git a/packages/suite-spl-token/src/transfer.ts b/packages/suite-spl-token/src/transfer.ts index 047ab865f..c2e7e21df 100644 --- a/packages/suite-spl-token/src/transfer.ts +++ b/packages/suite-spl-token/src/transfer.ts @@ -31,31 +31,37 @@ export namespace SplToken { ): Promise> => { return Try(async () => { const payer = options.feePayer ? options.feePayer : ownerOrMultisig[0]; + const payerPubkey = new Account.Keypair({ secret: payer }); const keypairs = ownerOrMultisig.map((s) => s.toKeypair()); - - const sourceToken = await Account.Associated.retryGetOrCreate( + const sourceToken = await Account.Associated.makeOrCreateInstruction( mint, - owner, - payer, + owner.toString(), + payerPubkey.pubkey, ); - const destToken = await Account.Associated.retryGetOrCreate( + const destToken = await Account.Associated.makeOrCreateInstruction( mint, dest, - payer, + payerPubkey.pubkey, ); const inst = createTransferCheckedInstruction( - sourceToken.toPublicKey(), + sourceToken.tokenAccount.toPublicKey(), mint.toPublicKey(), - destToken.toPublicKey(), + destToken.tokenAccount.toPublicKey(), owner.toPublicKey(), Calculator.calculateAmount(amount, mintDecimal), mintDecimal, keypairs, ); - return new TransactionBuilder.Common([inst], keypairs, payer.toKeypair()); + const instructions = destToken.inst ? [destToken.inst, inst] : [inst]; + + return new TransactionBuilder.Common( + instructions, + keypairs, + payer.toKeypair(), + ); }); }; } diff --git a/packages/suite-spl-token/test/transfer.test.ts b/packages/suite-spl-token/test/transfer.test.ts index 1eaa82ac1..d3caff7c1 100644 --- a/packages/suite-spl-token/test/transfer.test.ts +++ b/packages/suite-spl-token/test/transfer.test.ts @@ -22,7 +22,6 @@ const TOKEN_METADATA = { test.before(async () => { const obj = await Setup.generateKeyPair(); source = obj.source; - // dest = obj.dest; dest = Account.Keypair.create(); feePayer = obj.feePayer; }); @@ -62,19 +61,7 @@ test('Create token, batch transfer', async (t) => { }, ); - const inst3 = await SplToken.transfer( - token, - source.pubkey, - dest.pubkey, - [source.secret], - 1, - MINT_DECIMAL, - { - feePayer: feePayer.secret, - }, - ); - - (await [inst2, inst3].submit()).match( + (await [inst2].submit()).match( (ok) => { t.log('# transfer signature: ', ok); }, From fd7ab0e6415384eb4b1fc2f3df08fd2805bcfc2e Mon Sep 17 00:00:00 2001 From: fukaoi Date: Sat, 3 Feb 2024 13:19:14 +0900 Subject: [PATCH 09/15] No need function --- packages/account/src/associated.ts | 168 ----------------------- packages/account/src/index.ts | 2 - packages/account/test/associated.test.ts | 44 ------ 3 files changed, 214 deletions(-) delete mode 100644 packages/account/src/associated.ts delete mode 100644 packages/account/test/associated.test.ts diff --git a/packages/account/src/associated.ts b/packages/account/src/associated.ts deleted file mode 100644 index 6038bb0a2..000000000 --- a/packages/account/src/associated.ts +++ /dev/null @@ -1,168 +0,0 @@ -import { TransactionInstruction } from '@solana/web3.js'; -import { debugLog, sleep } from '~/suite-utils'; -import { Node } from '~/node'; -import { TransactionBuilder } from '~/transaction-builder'; -import { CommonStructure } from '~/types/transaction-builder'; -import { Pubkey, Secret } from '~/types/account'; - -import { - ASSOCIATED_TOKEN_PROGRAM_ID, - createAssociatedTokenAccountInstruction, - getAccount, - getAssociatedTokenAddressSync, - TOKEN_PROGRAM_ID, - TokenAccountNotFoundError, - TokenInvalidAccountOwnerError, -} from '@solana/spl-token'; - -import { Account as Keypair } from './keypair'; - -/** - * 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 - */ -export namespace Account { - export namespace Associated { - const RETRY_OVER_LIMIT = 10; - const RETRY_SLEEP_TIME = 3; - //@internal - const get = async ( - mint: Pubkey, - owner: Pubkey, - feePayer: Secret, - allowOwnerOffCurve = false, - ): Promise> => { - const res = await makeOrCreateInstruction( - mint, - owner, - new Keypair.Keypair({ secret: feePayer }).pubkey, - allowOwnerOffCurve, - ); - - if (!res.inst) { - return res.tokenAccount; - } - - return new TransactionBuilder.Common( - [res.inst], - [], - feePayer.toKeypair(), - res.tokenAccount!, - ); - }; - - /** - * Retry function if create new token accouint - * - * @param {Pubkey} mint - * @param {Pubkey} owner - * @param {Secret} feePayer - * @returns Promise - */ - export const retryGetOrCreate = async ( - mint: Pubkey, - owner: Pubkey, - feePayer: Secret, - ): Promise => { - let counter = 1; - while (counter < RETRY_OVER_LIMIT) { - try { - const inst = await get(mint, owner, feePayer, true); - - if (inst && typeof inst === 'string') { - return inst; - } else if (inst instanceof TransactionBuilder.Common) { - (await inst.submit()).map( - async (ok: string) => { - await Node.confirmedSig(ok); - return inst.data; - }, - (err: Error) => { - debugLog('# Error submit retryGetOrCreate: ', err); - throw err; - }, - ); - } - } catch (e) { - debugLog(`# retry: ${counter} create token account: `, e); - debugLog(`# mint: ${mint}, owner: ${owner}, feePayer: ${feePayer}`); - } - await sleep(RETRY_SLEEP_TIME); - counter++; - } - throw Error(`retry action is over limit ${RETRY_OVER_LIMIT}`); - }; - - /** - * [Main logic]Get Associated token Account. - * if not created, create new token accouint - * - * @param {Pubkey} mint - * @param {Pubkey} owner - * @param {Pubkey} feePayer - * @returns Promise - */ - export const makeOrCreateInstruction = async ( - mint: Pubkey, - owner: Pubkey, - feePayer?: Pubkey, - allowOwnerOffCurve = false, - ): Promise<{ - tokenAccount: string; - inst: TransactionInstruction | undefined; - }> => { - const associatedTokenAccount = getAssociatedTokenAddressSync( - mint.toPublicKey(), - owner.toPublicKey(), - allowOwnerOffCurve, - TOKEN_PROGRAM_ID, - ASSOCIATED_TOKEN_PROGRAM_ID, - ); - - debugLog('# associatedTokenAccount: ', associatedTokenAccount.toString()); - - try { - // Dont use Result - await getAccount( - Node.getConnection(), - associatedTokenAccount, - Node.getConnection().commitment, - TOKEN_PROGRAM_ID, - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst: undefined, - }; - } catch (error: unknown) { - if ( - !(error instanceof TokenAccountNotFoundError) && - !(error instanceof TokenInvalidAccountOwnerError) - ) { - throw Error('Unexpected error'); - } - - const payer = !feePayer ? owner : feePayer; - - const inst = createAssociatedTokenAccountInstruction( - payer.toPublicKey(), - associatedTokenAccount, - owner.toPublicKey(), - mint.toPublicKey(), - TOKEN_PROGRAM_ID, - ASSOCIATED_TOKEN_PROGRAM_ID, - ); - - return { - tokenAccount: associatedTokenAccount.toString(), - inst, - }; - } - }; - } -} diff --git a/packages/account/src/index.ts b/packages/account/src/index.ts index e434b8cb2..e5d4fbbfd 100644 --- a/packages/account/src/index.ts +++ b/packages/account/src/index.ts @@ -1,9 +1,7 @@ -import { Account as Associated } from './associated'; import { Account as Keypair } from './keypair'; import { Account as Pda } from './pda'; export const Account = { - ...Associated, ...Keypair, ...Pda, }; diff --git a/packages/account/test/associated.test.ts b/packages/account/test/associated.test.ts deleted file mode 100644 index 0bb3b26ad..000000000 --- a/packages/account/test/associated.test.ts +++ /dev/null @@ -1,44 +0,0 @@ -import test from 'ava'; -import { Node } from '~/node'; -import { SplToken } from '~/suite-spl-token'; -import { Setup } from 'test-tools/setup'; -import { RandomAsset } from 'test-tools/setupAsset'; -import { Account } from '../src'; -import { KeypairAccount } from '~/types/account'; - -let source: KeypairAccount; -let feePayer: KeypairAccount; -const TOKEN_METADATA = { - name: 'solana-suite-token', - symbol: 'SST', - royalty: 50, - filePath: RandomAsset.get().filePath as string, -}; - -test.before(async () => { - const obj = await Setup.generateKeyPair(); - source = obj.source; - feePayer = obj.feePayer; -}); - -test('Retry getOrCreate', async (t) => { - const mintInst = await SplToken.mint( - source.secret, - 10000, - 1, - TOKEN_METADATA, - { feePayer: feePayer.secret }, - ); - const mintRes = await mintInst.submit(); - t.true(mintRes.isOk); - await Node.confirmedSig(mintRes.unwrap()); - const mint = mintInst.unwrap().data!; - const res = await Account.Associated.retryGetOrCreate( - mint, - source.pubkey, - feePayer.secret, - ); - - t.log('# associated token account: ', res); - t.is(typeof res, 'string'); -}); From cc7980b819af83d2005a955b03bcdc42240d5c93 Mon Sep 17 00:00:00 2001 From: fukaoi Date: Sat, 3 Feb 2024 13:26:35 +0900 Subject: [PATCH 10/15] upgrade turbo --- package.json | 2 +- pnpm-lock.yaml | 44 ++++++++++++++++++++++---------------------- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/package.json b/package.json index 480d59aa0..9438422a9 100644 --- a/package.json +++ b/package.json @@ -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": "git@github.com:atonoy/solana-suite.git", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index bcf65a2f4..396fe5726 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -43,8 +43,8 @@ importers: specifier: ^3.14.0 version: 3.14.0 turbo: - specifier: ^1.11.2 - version: 1.11.2 + specifier: ^1.12.2 + version: 1.12.2 typedoc: specifier: ^0.25.4 version: 0.25.4(typescript@5.3.3) @@ -7554,64 +7554,64 @@ packages: fsevents: 2.3.3 dev: true - /turbo-darwin-64@1.11.2: - resolution: {integrity: sha512-toFmRG/adriZY3hOps7nYCfqHAS+Ci6xqgX3fbo82kkLpC6OBzcXnleSwuPqjHVAaRNhVoB83L5njcE9Qwi2og==} + /turbo-darwin-64@1.12.2: + resolution: {integrity: sha512-Aq/ePQ5KNx6XGwlZWTVTqpQYfysm1vkwkI6kAYgrX5DjMWn+tUXrSgNx4YNte0F+V4DQ7PtuWX+jRG0h0ZNg0A==} cpu: [x64] os: [darwin] requiresBuild: true dev: true optional: true - /turbo-darwin-arm64@1.11.2: - resolution: {integrity: sha512-FCsEDZ8BUSFYEOSC3rrARQrj7x2VOrmVcfrMUIhexTxproRh4QyMxLfr6LALk4ymx6jbDCxWa6Szal8ckldFbA==} + /turbo-darwin-arm64@1.12.2: + resolution: {integrity: sha512-wTr+dqkwJo/eXE+4SPTSeNBKyyfQJhI6I9sKVlCSBmtaNEqoGNgdVzgMUdqrg9AIFzLIiKO+zhfskNaSWpVFow==} cpu: [arm64] os: [darwin] requiresBuild: true dev: true optional: true - /turbo-linux-64@1.11.2: - resolution: {integrity: sha512-Vzda/o/QyEske5CxLf0wcu7UUS+7zB90GgHZV4tyN+WZtoouTvbwuvZ3V6b5Wgd3OJ/JwWR0CXDK7Sf4VEMr7A==} + /turbo-linux-64@1.12.2: + resolution: {integrity: sha512-BggBKrLojGarDaa2zBo+kUR3fmjpd6bLA8Unm3Aa2oJw0UvEi3Brd+w9lNsPZHXXQYBUzNUY2gCdxf3RteWb0g==} cpu: [x64] os: [linux] requiresBuild: true dev: true optional: true - /turbo-linux-arm64@1.11.2: - resolution: {integrity: sha512-bRLwovQRz0yxDZrM4tQEAYV0fBHEaTzUF0JZ8RG1UmZt/CqtpnUrJpYb1VK8hj1z46z9YehARpYCwQ2K0qU4yw==} + /turbo-linux-arm64@1.12.2: + resolution: {integrity: sha512-v/apSRvVuwYjq1D9MJFsHv2EpGd1S4VoSdZvVfW6FaM06L8CFZa92urNR1svdGYN28YVKwK9Ikc9qudC6t/d5A==} cpu: [arm64] os: [linux] requiresBuild: true dev: true optional: true - /turbo-windows-64@1.11.2: - resolution: {integrity: sha512-LgTWqkHAKgyVuLYcEPxZVGPInTjjeCnN5KQMdJ4uQZ+xMDROvMFS2rM93iQl4ieDJgidwHCxxCxaU9u8c3d/Kg==} + /turbo-windows-64@1.12.2: + resolution: {integrity: sha512-3uDdwXcRGkgopYFdPDpxQiuQjfQ12Fxq0fhj+iGymav0eWA4W4wzYwSdlUp6rT22qOBIzaEsrIspRwx1DsMkNg==} cpu: [x64] os: [win32] requiresBuild: true dev: true optional: true - /turbo-windows-arm64@1.11.2: - resolution: {integrity: sha512-829aVBU7IX0c/B4G7g1VI8KniAGutHhIupkYMgF6xPkYVev2G3MYe6DMS/vsLt9GGM9ulDtdWxWrH5P2ngK8IQ==} + /turbo-windows-arm64@1.12.2: + resolution: {integrity: sha512-zNIHnwtQfJSjFi7movwhPQh2rfrcKZ7Xv609EN1yX0gEp9GxooCUi2yNnBQ8wTqFjioA2M5hZtGJQ0RrKaEm/Q==} cpu: [arm64] os: [win32] requiresBuild: true dev: true optional: true - /turbo@1.11.2: - resolution: {integrity: sha512-jPC7LVQJzebs5gWf8FmEvsvXGNyKbN+O9qpvv98xpNaM59aS0/Irhd0H0KbcqnXfsz7ETlzOC3R+xFWthC4Z8A==} + /turbo@1.12.2: + resolution: {integrity: sha512-BcoQjBZ+LJCMdjzWhzQflOinUjek28rWXj07aaaAQ8T3Ehs0JFSjIsXOm4qIbo52G4xk3gFVcUtJhh/QRADl7g==} hasBin: true optionalDependencies: - turbo-darwin-64: 1.11.2 - turbo-darwin-arm64: 1.11.2 - turbo-linux-64: 1.11.2 - turbo-linux-arm64: 1.11.2 - turbo-windows-64: 1.11.2 - turbo-windows-arm64: 1.11.2 + turbo-darwin-64: 1.12.2 + turbo-darwin-arm64: 1.12.2 + turbo-linux-64: 1.12.2 + turbo-linux-arm64: 1.12.2 + turbo-windows-64: 1.12.2 + turbo-windows-arm64: 1.12.2 dev: true /tweetnacl@1.0.3: From f0085766e2eb68a0a725c3c3e92013cc0cfa1037 Mon Sep 17 00:00:00 2001 From: fukaoi Date: Sat, 3 Feb 2024 14:34:10 +0900 Subject: [PATCH 11/15] updated --- packages/account/dist/index.d.mts | 69 +- packages/account/dist/index.d.ts | 69 +- packages/account/dist/index.js | 636 ++++++++---------- packages/account/dist/index.mjs | 622 +++++++---------- packages/account/src/index.ts | 3 + packages/converter/dist/index.d.mts | 615 ----------------- packages/converter/dist/index.d.ts | 615 ----------------- packages/converter/dist/index.js | 126 +--- packages/converter/dist/index.mjs | 134 +--- packages/das-api/dist/index.js | 126 +--- packages/das-api/dist/index.mjs | 134 +--- packages/global/dist/index.js | 126 +--- packages/global/dist/index.mjs | 134 +--- packages/node/dist/index.js | 126 +--- packages/node/dist/index.mjs | 134 +--- packages/storage/dist/index.js | 126 +--- packages/storage/dist/index.mjs | 134 +--- packages/suite-airdrop/dist/index.js | 126 +--- packages/suite-airdrop/dist/index.mjs | 134 +--- .../suite-compressed-nft/dist/index.d.mts | 483 ------------- packages/suite-compressed-nft/dist/index.d.ts | 483 ------------- packages/suite-compressed-nft/dist/index.js | 320 +++------ packages/suite-compressed-nft/dist/index.mjs | 298 +++----- packages/suite-memo/dist/index.js | 123 +--- packages/suite-memo/dist/index.mjs | 131 +--- packages/suite-multisig/dist/index.js | 136 +--- packages/suite-multisig/dist/index.mjs | 144 +--- packages/suite-phantom/dist/index.mjs | 295 +++----- packages/suite-regular-nft/dist/index.js | 309 +++------ packages/suite-regular-nft/dist/index.mjs | 287 +++----- packages/suite-sol-native/dist/index.js | 137 +--- packages/suite-sol-native/dist/index.mjs | 135 +--- packages/suite-spl-token/dist/index.js | 244 ++----- packages/suite-spl-token/dist/index.mjs | 228 ++----- ...ts-8dfab8bf.d.ts => exports-248b9ab6.d.ts} | 40 +- packages/suite-utils/dist/exports.d.mts | 2 +- packages/suite-utils/dist/exports.d.ts | 2 +- packages/suite-utils/dist/exports.js | 157 +---- packages/suite-utils/dist/exports.mjs | 165 +---- packages/suite-utils/dist/index.d.mts | 2 +- packages/suite-utils/dist/index.d.ts | 2 +- packages/suite-utils/dist/index.js | 125 +--- packages/suite-utils/dist/index.mjs | 133 +--- packages/test-tools/dist/index.js | 137 +--- packages/test-tools/dist/index.mjs | 135 +--- packages/transaction-builder/dist/index.js | 126 +--- packages/transaction-builder/dist/index.mjs | 134 +--- packages/transaction-filter/dist/index.js | 123 +--- packages/transaction-filter/dist/index.mjs | 131 +--- packages/types/dist/account.d.mts | 19 - packages/types/dist/account.d.ts | 19 - packages/types/dist/airdrop.d.mts | 5 - packages/types/dist/airdrop.d.ts | 5 - packages/types/dist/compressed-nft.d.mts | 23 - packages/types/dist/compressed-nft.d.ts | 23 - packages/types/dist/converter.d.mts | 13 - packages/types/dist/converter.d.ts | 13 - packages/types/dist/das-api.d.mts | 76 --- packages/types/dist/das-api.d.ts | 76 --- packages/types/dist/find.d.mts | 41 -- packages/types/dist/find.d.ts | 41 -- packages/types/dist/global.d.mts | 32 - packages/types/dist/global.d.ts | 32 - packages/types/dist/history.d.mts | 25 - packages/types/dist/history.d.ts | 25 - packages/types/dist/memo.d.mts | 7 - packages/types/dist/memo.d.ts | 7 - packages/types/dist/mint-08f26d69.d.ts | 55 -- packages/types/dist/mint-74b505a0.d.ts | 55 -- packages/types/dist/nft.d.mts | 43 -- packages/types/dist/nft.d.ts | 43 -- packages/types/dist/phantom-e9a40784.d.ts | 16 - packages/types/dist/phantom.d.mts | 9 - packages/types/dist/phantom.d.ts | 9 - packages/types/dist/regular-nft.d.mts | 41 -- packages/types/dist/regular-nft.d.ts | 41 -- packages/types/dist/sol-native.d.mts | 7 - packages/types/dist/sol-native.d.ts | 7 - packages/types/dist/spl-token.d.mts | 55 -- packages/types/dist/spl-token.d.ts | 55 -- packages/types/dist/storage.d.mts | 68 -- packages/types/dist/storage.d.ts | 68 -- packages/types/dist/transaction-builder.d.mts | 237 ------- packages/types/dist/transaction-builder.d.ts | 237 ------- packages/types/dist/transaction-filter.d.mts | 83 --- packages/types/dist/transaction-filter.d.ts | 83 --- packages/types/dist/utils.d.mts | 18 - packages/types/dist/utils.d.ts | 18 - packages/types/dist/validator.d.mts | 13 - packages/types/dist/validator.d.ts | 13 - packages/validator/dist/index.js | 126 +--- packages/validator/dist/index.mjs | 134 +--- 92 files changed, 1639 insertions(+), 9733 deletions(-) delete mode 100644 packages/converter/dist/index.d.mts delete mode 100644 packages/converter/dist/index.d.ts delete mode 100644 packages/suite-compressed-nft/dist/index.d.mts delete mode 100644 packages/suite-compressed-nft/dist/index.d.ts rename packages/suite-utils/dist/{exports-8dfab8bf.d.ts => exports-248b9ab6.d.ts} (92%) delete mode 100644 packages/types/dist/account.d.mts delete mode 100644 packages/types/dist/account.d.ts delete mode 100644 packages/types/dist/airdrop.d.mts delete mode 100644 packages/types/dist/airdrop.d.ts delete mode 100644 packages/types/dist/compressed-nft.d.mts delete mode 100644 packages/types/dist/compressed-nft.d.ts delete mode 100644 packages/types/dist/converter.d.mts delete mode 100644 packages/types/dist/converter.d.ts delete mode 100644 packages/types/dist/das-api.d.mts delete mode 100644 packages/types/dist/das-api.d.ts delete mode 100644 packages/types/dist/find.d.mts delete mode 100644 packages/types/dist/find.d.ts delete mode 100644 packages/types/dist/global.d.mts delete mode 100644 packages/types/dist/global.d.ts delete mode 100644 packages/types/dist/history.d.mts delete mode 100644 packages/types/dist/history.d.ts delete mode 100644 packages/types/dist/memo.d.mts delete mode 100644 packages/types/dist/memo.d.ts delete mode 100644 packages/types/dist/mint-08f26d69.d.ts delete mode 100644 packages/types/dist/mint-74b505a0.d.ts delete mode 100644 packages/types/dist/nft.d.mts delete mode 100644 packages/types/dist/nft.d.ts delete mode 100644 packages/types/dist/phantom-e9a40784.d.ts delete mode 100644 packages/types/dist/phantom.d.mts delete mode 100644 packages/types/dist/phantom.d.ts delete mode 100644 packages/types/dist/regular-nft.d.mts delete mode 100644 packages/types/dist/regular-nft.d.ts delete mode 100644 packages/types/dist/sol-native.d.mts delete mode 100644 packages/types/dist/sol-native.d.ts delete mode 100644 packages/types/dist/spl-token.d.mts delete mode 100644 packages/types/dist/spl-token.d.ts delete mode 100644 packages/types/dist/storage.d.mts delete mode 100644 packages/types/dist/storage.d.ts delete mode 100644 packages/types/dist/transaction-builder.d.mts delete mode 100644 packages/types/dist/transaction-builder.d.ts delete mode 100644 packages/types/dist/transaction-filter.d.mts delete mode 100644 packages/types/dist/transaction-filter.d.ts delete mode 100644 packages/types/dist/utils.d.mts delete mode 100644 packages/types/dist/utils.d.ts delete mode 100644 packages/types/dist/validator.d.mts delete mode 100644 packages/types/dist/validator.d.ts diff --git a/packages/account/dist/index.d.mts b/packages/account/dist/index.d.mts index cf7f8126b..2ffea09e8 100644 --- a/packages/account/dist/index.d.mts +++ b/packages/account/dist/index.d.mts @@ -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; @@ -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 - */ -declare namespace Account$3 { - namespace Associated { - /** - * Retry function if create new token accouint - * - * @param {Pubkey} mint - * @param {Pubkey} owner - * @param {Secret} feePayer - * @returns Promise - */ - const retryGetOrCreate: (mint: Pubkey, owner: Pubkey, feePayer: Secret) => Promise; - /** - * [Main logic]Get Associated token Account. - * if not created, create new token accouint - * - * @param {Pubkey} mint - * @param {Pubkey} owner - * @param {Pubkey} feePayer - * @returns Promise - */ - const makeOrCreateInstruction: (mint: Pubkey, owner: Pubkey, feePayer?: Pubkey, allowOwnerOffCurve?: boolean) => Promise<{ - tokenAccount: string; - inst: TransactionInstruction | undefined; - }>; - } -} - declare namespace Account$2 { class Keypair { secret: Secret; @@ -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 }; diff --git a/packages/account/dist/index.d.ts b/packages/account/dist/index.d.ts index cf7f8126b..2ffea09e8 100644 --- a/packages/account/dist/index.d.ts +++ b/packages/account/dist/index.d.ts @@ -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; @@ -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 - */ -declare namespace Account$3 { - namespace Associated { - /** - * Retry function if create new token accouint - * - * @param {Pubkey} mint - * @param {Pubkey} owner - * @param {Secret} feePayer - * @returns Promise - */ - const retryGetOrCreate: (mint: Pubkey, owner: Pubkey, feePayer: Secret) => Promise; - /** - * [Main logic]Get Associated token Account. - * if not created, create new token accouint - * - * @param {Pubkey} mint - * @param {Pubkey} owner - * @param {Pubkey} feePayer - * @returns Promise - */ - const makeOrCreateInstruction: (mint: Pubkey, owner: Pubkey, feePayer?: Pubkey, allowOwnerOffCurve?: boolean) => Promise<{ - tokenAccount: string; - inst: TransactionInstruction | undefined; - }>; - } -} - declare namespace Account$2 { class Keypair { secret: Secret; @@ -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 }; diff --git a/packages/account/dist/index.js b/packages/account/dist/index.js index a26667213..3b427126d 100644 --- a/packages/account/dist/index.js +++ b/packages/account/dist/index.js @@ -30,12 +30,119 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru // src/index.ts var src_exports = {}; __export(src_exports, { - Account: () => Account + Account: () => Account3 }); module.exports = __toCommonJS(src_exports); -// ../suite-utils/src/constants.ts +// src/keypair.ts var import_web3 = require("@solana/web3.js"); +var import_bs58 = __toESM(require("bs58")); +var Account; +((Account4) => { + class Keypair4 { + secret; + pubkey; + constructor(params) { + if (!params.pubkey) { + const keypair = params.secret.toKeypair(); + this.pubkey = keypair.publicKey.toString(); + } else { + this.pubkey = params.pubkey; + } + this.secret = params.secret; + } + toPublicKey() { + return new import_web3.PublicKey(this.pubkey); + } + toKeypair() { + const decoded = import_bs58.default.decode(this.secret); + return import_web3.Keypair.fromSecretKey(decoded); + } + static isPubkey = (value) => /^[0-9a-zA-Z]{32,44}$/.test(value); + static isSecret = (value) => /^[0-9a-zA-Z]{87,88}$/.test(value); + static create = () => { + const keypair = import_web3.Keypair.generate(); + return new Keypair4({ + pubkey: keypair.publicKey.toString(), + secret: import_bs58.default.encode(keypair.secretKey) + }); + }; + static toKeyPair = (keypair) => { + return new Keypair4({ + pubkey: keypair.publicKey.toString(), + secret: import_bs58.default.encode(keypair.secretKey) + }); + }; + } + Account4.Keypair = Keypair4; +})(Account || (Account = {})); + +// src/pda.ts +var import_web32 = require("@solana/web3.js"); +var import_mpl_token_metadata = require("@metaplex-foundation/mpl-token-metadata"); +var import_mpl_bubblegum = require("@metaplex-foundation/mpl-bubblegum"); +var import_bn = __toESM(require("bn.js")); +var Account2; +((Account4) => { + let Pda; + ((Pda2) => { + Pda2.getMetadata = (address) => { + const [publicKey] = import_web32.PublicKey.findProgramAddressSync( + [ + Buffer.from("metadata"), + import_mpl_token_metadata.PROGRAM_ID.toBuffer(), + address.toPublicKey().toBuffer() + ], + import_mpl_token_metadata.PROGRAM_ID + ); + return publicKey; + }; + Pda2.getMasterEdition = (address) => { + const [publicKey] = import_web32.PublicKey.findProgramAddressSync( + [ + Buffer.from("metadata"), + import_mpl_token_metadata.PROGRAM_ID.toBuffer(), + address.toPublicKey().toBuffer(), + Buffer.from("edition") + ], + import_mpl_token_metadata.PROGRAM_ID + ); + return publicKey; + }; + Pda2.getTreeAuthority = (address) => { + const [publicKey] = import_web32.PublicKey.findProgramAddressSync( + [address.toPublicKey().toBuffer()], + import_mpl_bubblegum.MPL_BUBBLEGUM_PROGRAM_ID.toPublicKey() + ); + return publicKey; + }; + Pda2.getBgumSigner = () => { + const [publicKey] = import_web32.PublicKey.findProgramAddressSync( + [Buffer.from("collection_cpi", "utf8")], + import_mpl_bubblegum.MPL_BUBBLEGUM_PROGRAM_ID.toPublicKey() + ); + return publicKey; + }; + Pda2.getAssetId = (address, leafIndex) => { + const node = new import_bn.default.BN(leafIndex); + const [assetId] = import_web32.PublicKey.findProgramAddressSync( + [ + Buffer.from("asset", "utf8"), + address.toPublicKey().toBuffer(), + Uint8Array.from(node.toArray("le", 8)) + ], + import_mpl_bubblegum.MPL_BUBBLEGUM_PROGRAM_ID.toPublicKey() + ); + return assetId.toString(); + }; + })(Pda = Account4.Pda || (Account4.Pda = {})); +})(Account2 || (Account2 = {})); + +// ../global/src/index.ts +var import_web39 = require("@solana/web3.js"); + +// ../suite-utils/src/constants.ts +var import_web33 = require("@solana/web3.js"); var import_load = __toESM(require("@solana-suite/config/load")); var Config = import_load.default; var Constants; @@ -174,13 +281,13 @@ var Constants; } } }; - Constants2.WRAPPED_TOKEN_PROGRAM_ID = new import_web3.PublicKey( + Constants2.WRAPPED_TOKEN_PROGRAM_ID = new import_web33.PublicKey( "So11111111111111111111111111111111111111112" ); - Constants2.MEMO_PROGRAM_ID = new import_web3.PublicKey( + Constants2.MEMO_PROGRAM_ID = new import_web33.PublicKey( "Memo1UhkJRfHyvLMcVucJwxXeuD728EqVDDwQDxFMNo" ); - Constants2.METAPLEX_PROGRAM_ID = new import_web3.PublicKey( + Constants2.METAPLEX_PROGRAM_ID = new import_web33.PublicKey( "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s" ); Constants2.COMMITMENT = "confirmed"; @@ -196,75 +303,10 @@ var Constants; console.log(Constants.WarnningMessage.ANNOUNCE); // ../transaction-builder/src/batch.ts -var import_web34 = require("@solana/web3.js"); - -// ../node/src/index.ts -var import_web32 = require("@solana/web3.js"); -var Node; -((Node2) => { - const setted = { - clusterUrl: "", - commitment: Constants.COMMITMENT, - customClusterUrl: [] - }; - Node2.getConnection = () => { - if (setted.customClusterUrl.length > 0) { - setted.clusterUrl = Constants.switchCluster({ - customClusterUrl: setted.customClusterUrl - }); - } else if (Constants.customClusterUrl.length > 0) { - setted.clusterUrl = Constants.switchCluster({ - customClusterUrl: Constants.customClusterUrl - }); - } else if (!setted.clusterUrl) { - setted.clusterUrl = Constants.switchCluster({ - cluster: Constants.currentCluster - }); - } - if (!setted.commitment) { - setted.commitment = Constants.COMMITMENT; - } - return new import_web32.Connection(setted.clusterUrl, setted.commitment); - }; - Node2.changeConnection = (param) => { - setted.clusterUrl = ""; - setted.customClusterUrl = []; - setted.commitment = Constants.COMMITMENT; - const { cluster, commitment, customClusterUrl } = param; - if (commitment) { - setted.commitment = commitment; - debugLog("# Node change commitment: ", setted.commitment); - } - if (cluster) { - setted.clusterUrl = Constants.switchCluster({ cluster }); - debugLog("# Node change clusterUrl: ", setted.clusterUrl); - } - if (customClusterUrl) { - debugLog("# customClusterUrl: ", customClusterUrl); - setted.clusterUrl = Constants.switchCluster({ customClusterUrl }); - setted.customClusterUrl = customClusterUrl; - debugLog( - "# Node change cluster, custom cluster url: ", - setted.clusterUrl - ); - } - }; - Node2.confirmedSig = async (signature, commitment = Constants.COMMITMENT) => { - const connection = Node2.getConnection(); - const latestBlockhash = await connection.getLatestBlockhash(); - return await connection.confirmTransaction( - { - blockhash: latestBlockhash.blockhash, - lastValidBlockHeight: latestBlockhash.lastValidBlockHeight, - signature - }, - commitment - ).then(Result.ok).catch(Result.err); - }; -})(Node || (Node = {})); +var import_web35 = require("@solana/web3.js"); // ../transaction-builder/src/common.ts -var import_web33 = require("@solana/web3.js"); +var import_web34 = require("@solana/web3.js"); var MAX_RETRIES = 3; var TransactionBuilder; ((TransactionBuilder7) => { @@ -285,7 +327,7 @@ var TransactionBuilder; if (!(this instanceof Common2)) { throw Error("only Instruction object that can use this"); } - const transaction = new import_web33.Transaction(); + const transaction = new import_web34.Transaction(); const blockhashObj = await Node.getConnection().getLatestBlockhash(); transaction.lastValidBlockHeight = blockhashObj.lastValidBlockHeight; transaction.recentBlockhash = blockhashObj.blockhash; @@ -298,7 +340,7 @@ var TransactionBuilder; const options = { maxRetries: MAX_RETRIES }; - return await (0, import_web33.sendAndConfirmTransaction)( + return await (0, import_web34.sendAndConfirmTransaction)( Node.getConnection(), transaction, finalSigners, @@ -333,7 +375,7 @@ var TransactionBuilder2; if (feePayers.length > 0 && feePayers[0].feePayer) { feePayer = feePayers[0].feePayer; } - const transaction = new import_web34.Transaction(); + const transaction = new import_web35.Transaction(); let finalSigners = signers; if (feePayer) { transaction.feePayer = feePayer.publicKey; @@ -343,7 +385,7 @@ var TransactionBuilder2; const options = { maxRetries: MAX_RETRIES }; - return await (0, import_web34.sendAndConfirmTransaction)( + return await (0, import_web35.sendAndConfirmTransaction)( Node.getConnection(), transaction, finalSigners, @@ -356,7 +398,7 @@ var TransactionBuilder2; })(TransactionBuilder2 || (TransactionBuilder2 = {})); // ../transaction-builder/src/mint.ts -var import_web35 = require("@solana/web3.js"); +var import_web36 = require("@solana/web3.js"); var TransactionBuilder3; ((TransactionBuilder7) => { class Mint { @@ -375,7 +417,7 @@ var TransactionBuilder3; if (!(this instanceof Mint)) { throw Error("only MintInstruction object that can use this"); } - const transaction = new import_web35.Transaction(); + const transaction = new import_web36.Transaction(); const blockhashObj = await Node.getConnection().getLatestBlockhash(); transaction.lastValidBlockHeight = blockhashObj.lastValidBlockHeight; transaction.recentBlockhash = blockhashObj.blockhash; @@ -392,7 +434,7 @@ var TransactionBuilder3; debugLog("# Change metaplex cluster on mainnet-beta"); Node.changeConnection({ cluster: Constants.Cluster.prdMetaplex }); } - return await (0, import_web35.sendAndConfirmTransaction)( + return await (0, import_web36.sendAndConfirmTransaction)( Node.getConnection(), transaction, finalSigners, @@ -405,7 +447,7 @@ var TransactionBuilder3; })(TransactionBuilder3 || (TransactionBuilder3 = {})); // ../transaction-builder/src/partial-sign.ts -var import_web36 = require("@solana/web3.js"); +var import_web37 = require("@solana/web3.js"); var TransactionBuilder4; ((TransactionBuilder7) => { class PartialSign { @@ -423,7 +465,7 @@ var TransactionBuilder4; throw Error("only PartialSignInstruction object that can use this"); } const decode = Buffer.from(this.hexInstruction, "hex"); - const transactionFromJson = import_web36.Transaction.from(decode); + const transactionFromJson = import_web37.Transaction.from(decode); transactionFromJson.partialSign(feePayer.toKeypair()); const options = { maxRetries: MAX_RETRIES @@ -476,74 +518,6 @@ var TransactionBuilder5; }; })(TransactionBuilder5 || (TransactionBuilder5 = {})); -// ../global/src/index.ts -var import_web37 = require("@solana/web3.js"); -var import_bignumber = require("bignumber.js"); -var import_bs58 = __toESM(require("bs58")); -String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, options = {}) { - const endPointUrl = Node.getConnection().rpcEndpoint; - debugLog("# toExplorerUrl rpcEndpoint:", endPointUrl); - let cluster = ""; - if (endPointUrl === Constants.EndPointUrl.prd) { - cluster = Constants.Cluster.prd; - } else if (endPointUrl === Constants.EndPointUrl.test) { - cluster = Constants.Cluster.test; - } else if (endPointUrl === Constants.EndPointUrl.dev) { - cluster = Constants.Cluster.dev; - } else { - cluster = Constants.Cluster.dev; - } - const addressOrSignature = this.toString(); - let url = ""; - if (options.replacePath) { - if (explorer === "solanafm" /* SolanaFM */) { - url = `${Constants.EXPLORER_SOLANAFM_URL}/${options.replacePath}/${addressOrSignature}?cluster=${cluster}`; - } else if (explorer === "xray" /* Xray */) { - url = `${Constants.EXPLORER_XRAY_URL}/${options.replacePath}/${addressOrSignature}?network=${cluster}`; - } else { - url = `${Constants.EXPLORER_SOLSCAN_URL}/${options.replacePath}/${addressOrSignature}?cluster=${cluster}`; - } - return url; - } - if (Account.Keypair.isPubkey(addressOrSignature)) { - if (explorer === "solanafm" /* SolanaFM */) { - url = `${Constants.EXPLORER_SOLANAFM_URL}/address/${addressOrSignature}?cluster=${cluster}`; - } else if (explorer === "xray" /* Xray */) { - url = `${Constants.EXPLORER_XRAY_URL}/account/${addressOrSignature}?network=${cluster}`; - } else { - url = `${Constants.EXPLORER_SOLSCAN_URL}/account/${addressOrSignature}?cluster=${cluster}`; - } - } else { - if (explorer === "solanafm" /* SolanaFM */) { - url = `${Constants.EXPLORER_SOLANAFM_URL}/tx/${addressOrSignature}?cluster=${cluster}`; - } else if (explorer === "xray" /* Xray */) { - url = `${Constants.EXPLORER_XRAY_URL}/tx/${addressOrSignature}?network=${cluster}`; - } else { - url = `${Constants.EXPLORER_SOLSCAN_URL}/tx/${addressOrSignature}?cluster=${cluster}`; - } - } - return url; -}; -String.prototype.toPublicKey = function() { - if (!Account.Keypair.isPubkey(this.toString())) { - throw Error(`No match KeyPair.PubKey: ${this.toString()}`); - } - return new import_web37.PublicKey(this.toString()); -}; -String.prototype.toKeypair = function() { - if (!Account.Keypair.isSecret(this.toString())) { - throw Error(`No match KeyPair.Secret: ${this.toString()}`); - } - const decoded = import_bs58.default.decode(this.toString()); - return import_web37.Keypair.fromSecretKey(decoded); -}; -Number.prototype.toSol = function() { - return (0, import_bignumber.BigNumber)(this).div(import_web37.LAMPORTS_PER_SOL).toNumber(); -}; -Number.prototype.toLamports = function() { - return (0, import_bignumber.BigNumber)(this).times(import_web37.LAMPORTS_PER_SOL).toNumber(); -}; - // ../transaction-builder/src/index.ts var TransactionBuilder6 = { ...TransactionBuilder2, @@ -567,9 +541,6 @@ var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { console.log("[DEBUG]", data1, data2, data3, data4); } }; -var sleep = async (sec) => { - return new Promise((r) => setTimeout(r, sec * 1e3)); -}; var isPromise = (obj) => { return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; }; @@ -578,17 +549,17 @@ function Try(input, finallyInput) { const v = input(); if (isPromise(v)) { return v.then( - (x) => Result.ok(x), - (err) => Result.err(err) + (x) => Result5.ok(x), + (err) => Result5.err(err) ); } else { - return Result.ok(v); + return Result5.ok(v); } } catch (e) { if (e instanceof Error) { - return Result.err(e); + return Result5.err(e); } - return Result.err(Error(e)); + return Result5.err(Error(e)); } finally { if (finallyInput) { debugLog("# finally input:", finallyInput); @@ -607,8 +578,8 @@ var convertTimestampToDateTime = (created_at) => { var AbstractResult = class { unwrap(ok, err) { const r = this._chain( - (value) => Result.ok(ok ? ok(value) : value), - (error) => err ? Result.ok(err(error)) : Result.err(error) + (value) => Result5.ok(ok ? ok(value) : value), + (error) => err ? Result5.ok(err(error)) : Result5.err(error) ); if (r.isErr) { throw r.error; @@ -617,17 +588,17 @@ var AbstractResult = class { } map(ok, err) { return this._chain( - (value) => Result.ok(ok(value)), - (error) => Result.err(err ? err(error) : error) + (value) => Result5.ok(ok(value)), + (error) => Result5.err(err ? err(error) : error) ); } chain(ok, err) { - return this._chain(ok, err || ((error) => Result.err(error))); + return this._chain(ok, err || ((error) => Result5.err(error))); } match(ok, err) { this._chain( - (value) => Result.ok(ok(value)), - (error) => Result.err(err(error)) + (value) => Result5.ok(ok(value)), + (error) => Result5.err(err(error)) ); } /// single TransactionBuilder //// @@ -649,7 +620,7 @@ var AbstractResult = class { } ); if (res.isErr) { - return Result.err(res.error); + return Result5.err(res.error); } return res.value; } @@ -684,7 +655,7 @@ Array.prototype.submit = async function(feePayer) { } else if (obj.isOk) { instructions.push(obj.value); } else { - return Result.err(Error("Only Array Instruction object")); + return Result5.err(Error("Only Array Instruction object")); } } debugLog("# Result batch submit: ", instructions); @@ -714,7 +685,7 @@ var InternalErr = class extends AbstractResult { return err(this.error); } }; -var Result; +var Result5; ((Result8) => { function ok(value) { return new InternalOk(value); @@ -747,7 +718,7 @@ var Result; return Result8.ok(res); } Result8.all = all; -})(Result || (Result = {})); +})(Result5 || (Result5 = {})); // ../converter/src/collection.ts var Converter; @@ -1312,216 +1283,145 @@ var ValidatorError = class extends Error { } }; -// src/associated.ts -var import_spl_token = require("@solana/spl-token"); - -// src/keypair.ts +// ../node/src/index.ts var import_web38 = require("@solana/web3.js"); -var import_bs582 = __toESM(require("bs58")); -var Account2; -((Account5) => { - class Keypair4 { - secret; - pubkey; - constructor(params) { - if (!params.pubkey) { - const keypair = params.secret.toKeypair(); - this.pubkey = keypair.publicKey.toString(); - } else { - this.pubkey = params.pubkey; - } - this.secret = params.secret; +var Node; +((Node2) => { + const setted = { + clusterUrl: "", + commitment: Constants.COMMITMENT, + customClusterUrl: [] + }; + Node2.getConnection = () => { + if (setted.customClusterUrl.length > 0) { + setted.clusterUrl = Constants.switchCluster({ + customClusterUrl: setted.customClusterUrl + }); + } else if (Constants.customClusterUrl.length > 0) { + setted.clusterUrl = Constants.switchCluster({ + customClusterUrl: Constants.customClusterUrl + }); + } else if (!setted.clusterUrl) { + setted.clusterUrl = Constants.switchCluster({ + cluster: Constants.currentCluster + }); } - toPublicKey() { - return new import_web38.PublicKey(this.pubkey); + if (!setted.commitment) { + setted.commitment = Constants.COMMITMENT; } - toKeypair() { - const decoded = import_bs582.default.decode(this.secret); - return import_web38.Keypair.fromSecretKey(decoded); + return new import_web38.Connection(setted.clusterUrl, setted.commitment); + }; + Node2.changeConnection = (param) => { + setted.clusterUrl = ""; + setted.customClusterUrl = []; + setted.commitment = Constants.COMMITMENT; + const { cluster, commitment, customClusterUrl } = param; + if (commitment) { + setted.commitment = commitment; + debugLog("# Node change commitment: ", setted.commitment); } - static isPubkey = (value) => /^[0-9a-zA-Z]{32,44}$/.test(value); - static isSecret = (value) => /^[0-9a-zA-Z]{87,88}$/.test(value); - static create = () => { - const keypair = import_web38.Keypair.generate(); - return new Keypair4({ - pubkey: keypair.publicKey.toString(), - secret: import_bs582.default.encode(keypair.secretKey) - }); - }; - static toKeyPair = (keypair) => { - return new Keypair4({ - pubkey: keypair.publicKey.toString(), - secret: import_bs582.default.encode(keypair.secretKey) - }); - }; - } - Account5.Keypair = Keypair4; -})(Account2 || (Account2 = {})); - -// src/associated.ts -var Account3; -((Account5) => { - let Associated; - ((Associated2) => { - const RETRY_OVER_LIMIT = 10; - const RETRY_SLEEP_TIME = 3; - const get = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const res = await (0, Associated2.makeOrCreateInstruction)( - mint, - owner, - new Account2.Keypair({ secret: feePayer }).pubkey, - allowOwnerOffCurve - ); - if (!res.inst) { - return res.tokenAccount; - } - return new TransactionBuilder6.Common( - [res.inst], - [], - feePayer.toKeypair(), - res.tokenAccount - ); - }; - Associated2.retryGetOrCreate = async (mint, owner, feePayer) => { - let counter = 1; - while (counter < RETRY_OVER_LIMIT) { - try { - const inst = await get(mint, owner, feePayer, true); - if (inst && typeof inst === "string") { - debugLog("# associatedTokenAccount: ", inst); - return inst; - } else if (inst instanceof TransactionBuilder6.Common) { - (await inst.submit()).map( - async (ok) => { - await Node.confirmedSig(ok); - return inst.data; - }, - (err) => { - debugLog("# Error submit retryGetOrCreate: ", err); - throw err; - } - ); - } - } catch (e) { - debugLog(`# retry: ${counter} create token account: `, e); - debugLog(`# mint: ${mint}, owner: ${owner}, feePayer: ${feePayer}`); - } - await sleep(RETRY_SLEEP_TIME); - counter++; - } - throw Error(`retry action is over limit ${RETRY_OVER_LIMIT}`); - }; - Associated2.makeOrCreateInstruction = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const associatedTokenAccount = (0, import_spl_token.getAssociatedTokenAddressSync)( - mint.toPublicKey(), - owner.toPublicKey(), - allowOwnerOffCurve, - import_spl_token.TOKEN_PROGRAM_ID, - import_spl_token.ASSOCIATED_TOKEN_PROGRAM_ID + if (cluster) { + setted.clusterUrl = Constants.switchCluster({ cluster }); + debugLog("# Node change clusterUrl: ", setted.clusterUrl); + } + if (customClusterUrl) { + debugLog("# customClusterUrl: ", customClusterUrl); + setted.clusterUrl = Constants.switchCluster({ customClusterUrl }); + setted.customClusterUrl = customClusterUrl; + debugLog( + "# Node change cluster, custom cluster url: ", + setted.clusterUrl ); - debugLog("# associatedTokenAccount: ", associatedTokenAccount.toString()); - try { - await (0, import_spl_token.getAccount)( - Node.getConnection(), - associatedTokenAccount, - Node.getConnection().commitment, - import_spl_token.TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst: void 0 - }; - } catch (error) { - if (!(error instanceof import_spl_token.TokenAccountNotFoundError) && !(error instanceof import_spl_token.TokenInvalidAccountOwnerError)) { - throw Error("Unexpected error"); - } - const payer = !feePayer ? owner : feePayer; - const inst = (0, import_spl_token.createAssociatedTokenAccountInstruction)( - payer.toPublicKey(), - associatedTokenAccount, - owner.toPublicKey(), - mint.toPublicKey(), - import_spl_token.TOKEN_PROGRAM_ID, - import_spl_token.ASSOCIATED_TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst - }; - } - }; - })(Associated = Account5.Associated || (Account5.Associated = {})); -})(Account3 || (Account3 = {})); + } + }; + Node2.confirmedSig = async (signature, commitment = Constants.COMMITMENT) => { + const connection = Node2.getConnection(); + const latestBlockhash = await connection.getLatestBlockhash(); + return await connection.confirmTransaction( + { + blockhash: latestBlockhash.blockhash, + lastValidBlockHeight: latestBlockhash.lastValidBlockHeight, + signature + }, + commitment + ).then(Result5.ok).catch(Result5.err); + }; +})(Node || (Node = {})); -// src/pda.ts -var import_web39 = require("@solana/web3.js"); -var import_mpl_token_metadata = require("@metaplex-foundation/mpl-token-metadata"); -var import_mpl_bubblegum = require("@metaplex-foundation/mpl-bubblegum"); -var import_bn = __toESM(require("bn.js")); -var Account4; -((Account5) => { - let Pda; - ((Pda2) => { - Pda2.getMetadata = (address) => { - const [publicKey] = import_web39.PublicKey.findProgramAddressSync( - [ - Buffer.from("metadata"), - import_mpl_token_metadata.PROGRAM_ID.toBuffer(), - address.toPublicKey().toBuffer() - ], - import_mpl_token_metadata.PROGRAM_ID - ); - return publicKey; - }; - Pda2.getMasterEdition = (address) => { - const [publicKey] = import_web39.PublicKey.findProgramAddressSync( - [ - Buffer.from("metadata"), - import_mpl_token_metadata.PROGRAM_ID.toBuffer(), - address.toPublicKey().toBuffer(), - Buffer.from("edition") - ], - import_mpl_token_metadata.PROGRAM_ID - ); - return publicKey; - }; - Pda2.getTreeAuthority = (address) => { - const [publicKey] = import_web39.PublicKey.findProgramAddressSync( - [address.toPublicKey().toBuffer()], - import_mpl_bubblegum.MPL_BUBBLEGUM_PROGRAM_ID.toPublicKey() - ); - return publicKey; - }; - Pda2.getBgumSigner = () => { - const [publicKey] = import_web39.PublicKey.findProgramAddressSync( - [Buffer.from("collection_cpi", "utf8")], - import_mpl_bubblegum.MPL_BUBBLEGUM_PROGRAM_ID.toPublicKey() - ); - return publicKey; - }; - Pda2.getAssetId = (address, leafIndex) => { - const node = new import_bn.default.BN(leafIndex); - const [assetId] = import_web39.PublicKey.findProgramAddressSync( - [ - Buffer.from("asset", "utf8"), - address.toPublicKey().toBuffer(), - Uint8Array.from(node.toArray("le", 8)) - ], - import_mpl_bubblegum.MPL_BUBBLEGUM_PROGRAM_ID.toPublicKey() - ); - return assetId.toString(); - }; - })(Pda = Account5.Pda || (Account5.Pda = {})); -})(Account4 || (Account4 = {})); +// ../global/src/index.ts +var import_bignumber = require("bignumber.js"); +var import_bs582 = __toESM(require("bs58")); +String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, options = {}) { + const endPointUrl = Node.getConnection().rpcEndpoint; + debugLog("# toExplorerUrl rpcEndpoint:", endPointUrl); + let cluster = ""; + if (endPointUrl === Constants.EndPointUrl.prd) { + cluster = Constants.Cluster.prd; + } else if (endPointUrl === Constants.EndPointUrl.test) { + cluster = Constants.Cluster.test; + } else if (endPointUrl === Constants.EndPointUrl.dev) { + cluster = Constants.Cluster.dev; + } else { + cluster = Constants.Cluster.dev; + } + const addressOrSignature = this.toString(); + let url = ""; + if (options.replacePath) { + if (explorer === "solanafm" /* SolanaFM */) { + url = `${Constants.EXPLORER_SOLANAFM_URL}/${options.replacePath}/${addressOrSignature}?cluster=${cluster}`; + } else if (explorer === "xray" /* Xray */) { + url = `${Constants.EXPLORER_XRAY_URL}/${options.replacePath}/${addressOrSignature}?network=${cluster}`; + } else { + url = `${Constants.EXPLORER_SOLSCAN_URL}/${options.replacePath}/${addressOrSignature}?cluster=${cluster}`; + } + return url; + } + if (Account3.Keypair.isPubkey(addressOrSignature)) { + if (explorer === "solanafm" /* SolanaFM */) { + url = `${Constants.EXPLORER_SOLANAFM_URL}/address/${addressOrSignature}?cluster=${cluster}`; + } else if (explorer === "xray" /* Xray */) { + url = `${Constants.EXPLORER_XRAY_URL}/account/${addressOrSignature}?network=${cluster}`; + } else { + url = `${Constants.EXPLORER_SOLSCAN_URL}/account/${addressOrSignature}?cluster=${cluster}`; + } + } else { + if (explorer === "solanafm" /* SolanaFM */) { + url = `${Constants.EXPLORER_SOLANAFM_URL}/tx/${addressOrSignature}?cluster=${cluster}`; + } else if (explorer === "xray" /* Xray */) { + url = `${Constants.EXPLORER_XRAY_URL}/tx/${addressOrSignature}?network=${cluster}`; + } else { + url = `${Constants.EXPLORER_SOLSCAN_URL}/tx/${addressOrSignature}?cluster=${cluster}`; + } + } + return url; +}; +String.prototype.toPublicKey = function() { + if (!Account3.Keypair.isPubkey(this.toString())) { + throw Error(`No match KeyPair.PubKey: ${this.toString()}`); + } + return new import_web39.PublicKey(this.toString()); +}; +String.prototype.toKeypair = function() { + if (!Account3.Keypair.isSecret(this.toString())) { + throw Error(`No match KeyPair.Secret: ${this.toString()}`); + } + const decoded = import_bs582.default.decode(this.toString()); + return import_web39.Keypair.fromSecretKey(decoded); +}; +Number.prototype.toSol = function() { + return (0, import_bignumber.BigNumber)(this).div(import_web39.LAMPORTS_PER_SOL).toNumber(); +}; +Number.prototype.toLamports = function() { + return (0, import_bignumber.BigNumber)(this).times(import_web39.LAMPORTS_PER_SOL).toNumber(); +}; // src/index.ts -var Account = { - ...Account3, - ...Account2, - ...Account4 +var Account3 = { + ...Account, + ...Account2 }; // Annotate the CommonJS export names for ESM import in node: 0 && (module.exports = { Account }); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uLy4uL3N1aXRlLXV0aWxzL3NyYy9jb25zdGFudHMudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvYmF0Y2gudHMiLCAiLi4vLi4vbm9kZS9zcmMvaW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ICAgY29uc3QgZmVlUGF5ZXJzID0gYXJyLmZpbHRlcigoYSkgPT4gYS5mZWVQYXllciAhPT0gdW5kZWZpbmVkKTtcbiAgICAgICAgbGV0IGZlZVBheWVyID0gc2lnbmVyc1swXTtcbiAgICAgICAgaWYgKGZlZVBheWVycy5sZW5ndGggPiAwICYmIGZlZVBheWVyc1swXS5mZWVQYXllcikge1xuICAgICAgICAgIGZlZVBheWVyID0gZmVlUGF5ZXJzWzBdLmZlZVBheWVyO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgdHJhbnNhY3Rpb24gPSBuZXcgVHJhbnNhY3Rpb24oKTtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHNpZ25lcnM7XG4gICAgICAgIGlmIChmZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gZmVlUGF5ZXIucHVibGljS2V5O1xuICAgICAgICAgIGZpbmFsU2lnbmVycyA9IFtmZWVQYXllciwgLi4uc2lnbmVyc107XG4gICAgICAgIH1cbiAgICAgICAgaW5zdHJ1Y3Rpb25zLm1hcCgoaW5zdCkgPT4gdHJhbnNhY3Rpb24uYWRkKGluc3QpKTtcblxuICAgICAgICAvLyBDYWxjdWxhdGVUeHNpemUuaXNNYXhUcmFuc2FjdGlvblNpemUodHJhbnNhY3Rpb24sIGZlZVBheWVyLnB1YmxpY0tleSk7XG5cbiAgICAgICAgY29uc3Qgb3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogTUFYX1JFVFJJRVMsXG4gICAgICAgIH07XG5cbiAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgIG9wdGlvbnMsXG4gICAgICAgIC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ByZXMgPSBpc0ltYWdlVXJsKG1ldGFkYXRhLmltYWdlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3JveWFsdHknOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5yb3lhbHR5KSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzUm95YWx0eShtZXRhZGF0YS5yb3lhbHR5KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlcl9mZWVfYmFzaXNfcG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJGZWVCYXNpc1BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0YWRhdGEubmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzeW1ib2wnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLnN5bWJvbCkge1xuIC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aW5nPiA9PiB7XG4gICAgICBsZXQgY291bnRlciA9IDE7XG4gICAgICB3aGlsZSAoY291bnRlciA8IFJFVFJZX09WRVJfTElNSVQpIHtcbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICBjb25zdCBpbnN0ID0gYXdhaXQgZ2V0KG1pbnQsIG93bmVyLCBmZWVQYXllciwgdHJ1ZSk7XG5cbiAgICAgICAgICBpZiAoaW5zdCAmJiB0eXBlb2YgaW5zdCA9PT0gJ3N0cmluZycpIHtcbiAgICAgICAgICAgIGRlYnVnTG9nKCcjIGFzc29jaWF0ZWRUb2tlbkFjY291bnQ6ICcsIGluc3QpO1xuICAgICAgICAgICAgcmV0dXJuIGluc3Q7XG4gICAgICAgICAgfSBlbHNlIGlmIChpbnN0IGluc3RhbmNlb2YgVHJhbnNhY3Rpb25CdWlsZGVyLkNvbW1vbikge1xuICAgICAgICAgICAgKGF3YWl0IGluc3Quc3VibWl0KCkpLm1hcChcbiAgICAgICAgICAgICAgYXN5bmMgKG9rOiBzdHJpbmcpID0+IHtcbiAgICAgICAgICAgICAgICBhd2FpdCBOb2RlLmNvbmZpcm1lZFNpZyhvayk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGluc3QuZGF0YTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgKGVycjogRXJyb3IpID0+IHtcbiAgICAgICAgICAgICAgICBkZWJ1Z0xvZygnIyBFcnJvciBzdWJtaXQgcmV0cnlHZXRPckNyZWF0ZTogJywgZXJyKTtcbiAgICAgICAgICAgICAgICB0aHJvdyBlcnI7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgIGRlYnVnTG9nKGAjIHJldHJ5OiAke2NvdW50ZXJ9IGNyZWF0ZSB0b2tlbiBhY2NvdW50OiBgLCBlKTtcbiAgICAgICAgICBkZWJ1Z0xvZyhgIyBtaW50OiAke21pbnR9LC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pLFxuICAgICAgICBhbGxvd093bmVyT2ZmQ3VydmUsXG4gICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGFzc29jaWF0ZWRUb2tlbkFjY291bnQ6ICcsIGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSk7XG5cbiAgICAgIHRyeSB7XG4gICAgICAgIC8vIERvbnQgdXNlIFJlc3VsdFxuICAgICAgICBhd2FpdCBnZXRBY2NvdW50KFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCkuY29tbWl0bWVudCxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3Q6IHVuZGVmaW5lZCxcbiAgICAgICAgfTtcbiAgICAgIH0gY2F0Y2ggKGVycm9yOiB1bmtub3duKSB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5BY2NvdW50Tm90Rm91bmRFcnJvcikgJiZcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5JbnZhbGlkQWNjb3VudE93bmVyRXJyb3IpXG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9yKCdVbmV4cGVjdGVkIGVycm9yJyk7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBwYXllciA9ICFmZWVQYXllciA/IG93bmVyIDogZmVlUGF5ZXI7XG5cbiAgICAgICAgY29uc3QgaW5zdCA9IGNyZWF0Z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gPT4ge1xuICAgICAgcmV0dXJuIFRyeShhc3luYyAoKSA9PiB7XG4gICAgICAgIGxldCBpID0gMDtcbiAgICAgICAgZm9yIChjb25zdCBhIG9mIGFycikge1xuICAgICAgICAgIGlmICghYS5pbnN0cnVjdGlvbnMgJiYgIWEuc2lnbmVycykge1xuICAgICAgICAgICAgdGhyb3cgRXJyb3IoXG4gICAgICAgICAgICAgIGBvbmx5IEluc3RydWN0aW9uIG9iamVjdCB0aGF0IGNhbiB1c2UgYmF0Y2hTdWJtaXQoKS5cbiAgICAgICAgICAgIEluZGV4OiAke2l9LCBTZXQgdmFsdWU6ICR7SlNPTi5zdHJpbmdpZnkoYSl9YCxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIGkrKztcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IGluc3RydWN0aW9ucyA9IGFyci5mbGF0TWFwKChhKSA9PiBhLmluc3RydWN0aW9ucyk7XG4gICAgICAgIGNvbnN0IHNpZ25lcnMgPSBhcnIuZmxhdE1hcCgoYSkgPT4gYS5zaWduZXJzKTtcbiAgICAgICAgY29uc3QgZmVlUGF5ZXJzID0gYXJyLmZpbHRlcigoYSkgPT4gYS5mZWVQYXllciAhPT0gdW5kZWZpbmVkKTtcbiAgICAgICAgbGV0IGZlZVBheWVyID0gc2lnbmVyc1swXTtcbiAgICAgICAgaWYgKGZlZVBheWVycy5sZW5ndGggPiAwICYmIGZlZVBheWVyc1swXS5mZWVQYXllcikge1xuICAgICAgICAgIGZlZVBheWVyID0gZmVlUGF5ZXJzWzBdLmZlZVBheWVyO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgdHJhbnNhY3Rpb24gPSBuZXcgVHJhbnNhY3Rpb24oKTtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHNpZ25lcnM7XG4gICAgICAgIGlmIChmZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gZmVlUGF5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ZGVyIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJSZXN1bHQiLCAiUmVzdWx0IiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJDb252ZXJ0ZXIiLCAiQ29sbGVjdGlvbiIsICJDb2xsZWN0aW9uTWludCIsICJDb252ZXJ0ZXIiLCAiQ3JlYXRvcnMiLCAiQ29udmVydGVyIiwgIkNvbXByZXNzZWROZnRNZXRhZGF0YSIsICJDb252ZXJ0ZXIiLCAiUm95YWx0eSIsICJDb252ZXJ0ZXIiLCAiTmZ0IiwgIkNvbnZlcnRlciIsICJNZW1vIiwgIkNvbnZlcnRlciIsICJNaW50IiwgIkNvbnZlcnRlciIsICJSZWd1bGFyTmZ0TWV0YWRhdGEiLCAiQ29udmVydGVyIiwgIlByb3BlcnRpZXMiLCAiQ29udmVydGVyIiwgIlVzZXMiLCAiQ29udmVydGVyIiwgIlRva2VuTWV0YWRhdGEiLCAiQ29udmVydGVyIiwgIlRyYW5zZmVyQ2hlY2tlZCIsICJDb252ZXJ0ZXIiLCAiVHJhbnNmZXIiLCAiQ29udmVydGVyIiwgIlZhbGlkYXRvciIsICJNZXNzYWdlIiwgIkNvbnZlcnRlciIsICJpbXBvcnRfd2ViMyIsICJOb2RlIiwgIlJlc3VsdCIsICJpbXBvcnRfYnM1OCIsICJBY2NvdW50IiwgImJzIiwgIkFjY291bnQiXQp9Cg== \ No newline at end of file diff --git a/packages/account/dist/index.mjs b/packages/account/dist/index.mjs index 3fae4a295..8a4fab0ce 100644 --- a/packages/account/dist/index.mjs +++ b/packages/account/dist/index.mjs @@ -1,5 +1,112 @@ +// src/keypair.ts +import { Keypair as Original, PublicKey } from "@solana/web3.js"; +import bs from "bs58"; +var Account; +((Account4) => { + class Keypair4 { + secret; + pubkey; + constructor(params) { + if (!params.pubkey) { + const keypair = params.secret.toKeypair(); + this.pubkey = keypair.publicKey.toString(); + } else { + this.pubkey = params.pubkey; + } + this.secret = params.secret; + } + toPublicKey() { + return new PublicKey(this.pubkey); + } + toKeypair() { + const decoded = bs.decode(this.secret); + return Original.fromSecretKey(decoded); + } + static isPubkey = (value) => /^[0-9a-zA-Z]{32,44}$/.test(value); + static isSecret = (value) => /^[0-9a-zA-Z]{87,88}$/.test(value); + static create = () => { + const keypair = Original.generate(); + return new Keypair4({ + pubkey: keypair.publicKey.toString(), + secret: bs.encode(keypair.secretKey) + }); + }; + static toKeyPair = (keypair) => { + return new Keypair4({ + pubkey: keypair.publicKey.toString(), + secret: bs.encode(keypair.secretKey) + }); + }; + } + Account4.Keypair = Keypair4; +})(Account || (Account = {})); + +// src/pda.ts +import { PublicKey as PublicKey2 } from "@solana/web3.js"; +import { PROGRAM_ID } from "@metaplex-foundation/mpl-token-metadata"; +import { MPL_BUBBLEGUM_PROGRAM_ID } from "@metaplex-foundation/mpl-bubblegum"; +import BN from "bn.js"; +var Account2; +((Account4) => { + let Pda; + ((Pda2) => { + Pda2.getMetadata = (address) => { + const [publicKey] = PublicKey2.findProgramAddressSync( + [ + Buffer.from("metadata"), + PROGRAM_ID.toBuffer(), + address.toPublicKey().toBuffer() + ], + PROGRAM_ID + ); + return publicKey; + }; + Pda2.getMasterEdition = (address) => { + const [publicKey] = PublicKey2.findProgramAddressSync( + [ + Buffer.from("metadata"), + PROGRAM_ID.toBuffer(), + address.toPublicKey().toBuffer(), + Buffer.from("edition") + ], + PROGRAM_ID + ); + return publicKey; + }; + Pda2.getTreeAuthority = (address) => { + const [publicKey] = PublicKey2.findProgramAddressSync( + [address.toPublicKey().toBuffer()], + MPL_BUBBLEGUM_PROGRAM_ID.toPublicKey() + ); + return publicKey; + }; + Pda2.getBgumSigner = () => { + const [publicKey] = PublicKey2.findProgramAddressSync( + [Buffer.from("collection_cpi", "utf8")], + MPL_BUBBLEGUM_PROGRAM_ID.toPublicKey() + ); + return publicKey; + }; + Pda2.getAssetId = (address, leafIndex) => { + const node = new BN.BN(leafIndex); + const [assetId] = PublicKey2.findProgramAddressSync( + [ + Buffer.from("asset", "utf8"), + address.toPublicKey().toBuffer(), + Uint8Array.from(node.toArray("le", 8)) + ], + MPL_BUBBLEGUM_PROGRAM_ID.toPublicKey() + ); + return assetId.toString(); + }; + })(Pda = Account4.Pda || (Account4.Pda = {})); +})(Account2 || (Account2 = {})); + +// ../global/src/index.ts +import { Keypair as Keypair3, LAMPORTS_PER_SOL, PublicKey as PublicKey4 } from "@solana/web3.js"; + // ../suite-utils/src/constants.ts -import { PublicKey } from "@solana/web3.js"; +import { PublicKey as PublicKey3 } from "@solana/web3.js"; import SolanaJsonConfig from "@solana-suite/config/load"; var Config = SolanaJsonConfig; var Constants; @@ -138,13 +245,13 @@ var Constants; } } }; - Constants2.WRAPPED_TOKEN_PROGRAM_ID = new PublicKey( + Constants2.WRAPPED_TOKEN_PROGRAM_ID = new PublicKey3( "So11111111111111111111111111111111111111112" ); - Constants2.MEMO_PROGRAM_ID = new PublicKey( + Constants2.MEMO_PROGRAM_ID = new PublicKey3( "Memo1UhkJRfHyvLMcVucJwxXeuD728EqVDDwQDxFMNo" ); - Constants2.METAPLEX_PROGRAM_ID = new PublicKey( + Constants2.METAPLEX_PROGRAM_ID = new PublicKey3( "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s" ); Constants2.COMMITMENT = "confirmed"; @@ -165,71 +272,6 @@ import { Transaction as Transaction2 } from "@solana/web3.js"; -// ../node/src/index.ts -import { Connection } from "@solana/web3.js"; -var Node; -((Node2) => { - const setted = { - clusterUrl: "", - commitment: Constants.COMMITMENT, - customClusterUrl: [] - }; - Node2.getConnection = () => { - if (setted.customClusterUrl.length > 0) { - setted.clusterUrl = Constants.switchCluster({ - customClusterUrl: setted.customClusterUrl - }); - } else if (Constants.customClusterUrl.length > 0) { - setted.clusterUrl = Constants.switchCluster({ - customClusterUrl: Constants.customClusterUrl - }); - } else if (!setted.clusterUrl) { - setted.clusterUrl = Constants.switchCluster({ - cluster: Constants.currentCluster - }); - } - if (!setted.commitment) { - setted.commitment = Constants.COMMITMENT; - } - return new Connection(setted.clusterUrl, setted.commitment); - }; - Node2.changeConnection = (param) => { - setted.clusterUrl = ""; - setted.customClusterUrl = []; - setted.commitment = Constants.COMMITMENT; - const { cluster, commitment, customClusterUrl } = param; - if (commitment) { - setted.commitment = commitment; - debugLog("# Node change commitment: ", setted.commitment); - } - if (cluster) { - setted.clusterUrl = Constants.switchCluster({ cluster }); - debugLog("# Node change clusterUrl: ", setted.clusterUrl); - } - if (customClusterUrl) { - debugLog("# customClusterUrl: ", customClusterUrl); - setted.clusterUrl = Constants.switchCluster({ customClusterUrl }); - setted.customClusterUrl = customClusterUrl; - debugLog( - "# Node change cluster, custom cluster url: ", - setted.clusterUrl - ); - } - }; - Node2.confirmedSig = async (signature, commitment = Constants.COMMITMENT) => { - const connection = Node2.getConnection(); - const latestBlockhash = await connection.getLatestBlockhash(); - return await connection.confirmTransaction( - { - blockhash: latestBlockhash.blockhash, - lastValidBlockHeight: latestBlockhash.lastValidBlockHeight, - signature - }, - commitment - ).then(Result.ok).catch(Result.err); - }; -})(Node || (Node = {})); - // ../transaction-builder/src/common.ts import { sendAndConfirmTransaction, @@ -451,74 +493,6 @@ var TransactionBuilder5; }; })(TransactionBuilder5 || (TransactionBuilder5 = {})); -// ../global/src/index.ts -import { Keypair as Keypair3, LAMPORTS_PER_SOL, PublicKey as PublicKey2 } from "@solana/web3.js"; -import { BigNumber } from "bignumber.js"; -import bs from "bs58"; -String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, options = {}) { - const endPointUrl = Node.getConnection().rpcEndpoint; - debugLog("# toExplorerUrl rpcEndpoint:", endPointUrl); - let cluster = ""; - if (endPointUrl === Constants.EndPointUrl.prd) { - cluster = Constants.Cluster.prd; - } else if (endPointUrl === Constants.EndPointUrl.test) { - cluster = Constants.Cluster.test; - } else if (endPointUrl === Constants.EndPointUrl.dev) { - cluster = Constants.Cluster.dev; - } else { - cluster = Constants.Cluster.dev; - } - const addressOrSignature = this.toString(); - let url = ""; - if (options.replacePath) { - if (explorer === "solanafm" /* SolanaFM */) { - url = `${Constants.EXPLORER_SOLANAFM_URL}/${options.replacePath}/${addressOrSignature}?cluster=${cluster}`; - } else if (explorer === "xray" /* Xray */) { - url = `${Constants.EXPLORER_XRAY_URL}/${options.replacePath}/${addressOrSignature}?network=${cluster}`; - } else { - url = `${Constants.EXPLORER_SOLSCAN_URL}/${options.replacePath}/${addressOrSignature}?cluster=${cluster}`; - } - return url; - } - if (Account.Keypair.isPubkey(addressOrSignature)) { - if (explorer === "solanafm" /* SolanaFM */) { - url = `${Constants.EXPLORER_SOLANAFM_URL}/address/${addressOrSignature}?cluster=${cluster}`; - } else if (explorer === "xray" /* Xray */) { - url = `${Constants.EXPLORER_XRAY_URL}/account/${addressOrSignature}?network=${cluster}`; - } else { - url = `${Constants.EXPLORER_SOLSCAN_URL}/account/${addressOrSignature}?cluster=${cluster}`; - } - } else { - if (explorer === "solanafm" /* SolanaFM */) { - url = `${Constants.EXPLORER_SOLANAFM_URL}/tx/${addressOrSignature}?cluster=${cluster}`; - } else if (explorer === "xray" /* Xray */) { - url = `${Constants.EXPLORER_XRAY_URL}/tx/${addressOrSignature}?network=${cluster}`; - } else { - url = `${Constants.EXPLORER_SOLSCAN_URL}/tx/${addressOrSignature}?cluster=${cluster}`; - } - } - return url; -}; -String.prototype.toPublicKey = function() { - if (!Account.Keypair.isPubkey(this.toString())) { - throw Error(`No match KeyPair.PubKey: ${this.toString()}`); - } - return new PublicKey2(this.toString()); -}; -String.prototype.toKeypair = function() { - if (!Account.Keypair.isSecret(this.toString())) { - throw Error(`No match KeyPair.Secret: ${this.toString()}`); - } - const decoded = bs.decode(this.toString()); - return Keypair3.fromSecretKey(decoded); -}; -Number.prototype.toSol = function() { - return BigNumber(this).div(LAMPORTS_PER_SOL).toNumber(); -}; -Number.prototype.toLamports = function() { - return BigNumber(this).times(LAMPORTS_PER_SOL).toNumber(); -}; - // ../transaction-builder/src/index.ts var TransactionBuilder6 = { ...TransactionBuilder2, @@ -542,9 +516,6 @@ var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { console.log("[DEBUG]", data1, data2, data3, data4); } }; -var sleep = async (sec) => { - return new Promise((r) => setTimeout(r, sec * 1e3)); -}; var isPromise = (obj) => { return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; }; @@ -553,17 +524,17 @@ function Try(input, finallyInput) { const v = input(); if (isPromise(v)) { return v.then( - (x) => Result.ok(x), - (err) => Result.err(err) + (x) => Result5.ok(x), + (err) => Result5.err(err) ); } else { - return Result.ok(v); + return Result5.ok(v); } } catch (e) { if (e instanceof Error) { - return Result.err(e); + return Result5.err(e); } - return Result.err(Error(e)); + return Result5.err(Error(e)); } finally { if (finallyInput) { debugLog("# finally input:", finallyInput); @@ -582,8 +553,8 @@ var convertTimestampToDateTime = (created_at) => { var AbstractResult = class { unwrap(ok, err) { const r = this._chain( - (value) => Result.ok(ok ? ok(value) : value), - (error) => err ? Result.ok(err(error)) : Result.err(error) + (value) => Result5.ok(ok ? ok(value) : value), + (error) => err ? Result5.ok(err(error)) : Result5.err(error) ); if (r.isErr) { throw r.error; @@ -592,17 +563,17 @@ var AbstractResult = class { } map(ok, err) { return this._chain( - (value) => Result.ok(ok(value)), - (error) => Result.err(err ? err(error) : error) + (value) => Result5.ok(ok(value)), + (error) => Result5.err(err ? err(error) : error) ); } chain(ok, err) { - return this._chain(ok, err || ((error) => Result.err(error))); + return this._chain(ok, err || ((error) => Result5.err(error))); } match(ok, err) { this._chain( - (value) => Result.ok(ok(value)), - (error) => Result.err(err(error)) + (value) => Result5.ok(ok(value)), + (error) => Result5.err(err(error)) ); } /// single TransactionBuilder //// @@ -624,7 +595,7 @@ var AbstractResult = class { } ); if (res.isErr) { - return Result.err(res.error); + return Result5.err(res.error); } return res.value; } @@ -659,7 +630,7 @@ Array.prototype.submit = async function(feePayer) { } else if (obj.isOk) { instructions.push(obj.value); } else { - return Result.err(Error("Only Array Instruction object")); + return Result5.err(Error("Only Array Instruction object")); } } debugLog("# Result batch submit: ", instructions); @@ -689,7 +660,7 @@ var InternalErr = class extends AbstractResult { return err(this.error); } }; -var Result; +var Result5; ((Result8) => { function ok(value) { return new InternalOk(value); @@ -722,7 +693,7 @@ var Result; return Result8.ok(res); } Result8.all = all; -})(Result || (Result = {})); +})(Result5 || (Result5 = {})); // ../converter/src/collection.ts var Converter; @@ -1290,223 +1261,144 @@ var ValidatorError = class extends Error { } }; -// src/associated.ts -import { - ASSOCIATED_TOKEN_PROGRAM_ID, - createAssociatedTokenAccountInstruction, - getAccount, - getAssociatedTokenAddressSync, - TOKEN_PROGRAM_ID, - TokenAccountNotFoundError, - TokenInvalidAccountOwnerError -} from "@solana/spl-token"; +// ../node/src/index.ts +import { Connection } from "@solana/web3.js"; +var Node; +((Node2) => { + const setted = { + clusterUrl: "", + commitment: Constants.COMMITMENT, + customClusterUrl: [] + }; + Node2.getConnection = () => { + if (setted.customClusterUrl.length > 0) { + setted.clusterUrl = Constants.switchCluster({ + customClusterUrl: setted.customClusterUrl + }); + } else if (Constants.customClusterUrl.length > 0) { + setted.clusterUrl = Constants.switchCluster({ + customClusterUrl: Constants.customClusterUrl + }); + } else if (!setted.clusterUrl) { + setted.clusterUrl = Constants.switchCluster({ + cluster: Constants.currentCluster + }); + } + if (!setted.commitment) { + setted.commitment = Constants.COMMITMENT; + } + return new Connection(setted.clusterUrl, setted.commitment); + }; + Node2.changeConnection = (param) => { + setted.clusterUrl = ""; + setted.customClusterUrl = []; + setted.commitment = Constants.COMMITMENT; + const { cluster, commitment, customClusterUrl } = param; + if (commitment) { + setted.commitment = commitment; + debugLog("# Node change commitment: ", setted.commitment); + } + if (cluster) { + setted.clusterUrl = Constants.switchCluster({ cluster }); + debugLog("# Node change clusterUrl: ", setted.clusterUrl); + } + if (customClusterUrl) { + debugLog("# customClusterUrl: ", customClusterUrl); + setted.clusterUrl = Constants.switchCluster({ customClusterUrl }); + setted.customClusterUrl = customClusterUrl; + debugLog( + "# Node change cluster, custom cluster url: ", + setted.clusterUrl + ); + } + }; + Node2.confirmedSig = async (signature, commitment = Constants.COMMITMENT) => { + const connection = Node2.getConnection(); + const latestBlockhash = await connection.getLatestBlockhash(); + return await connection.confirmTransaction( + { + blockhash: latestBlockhash.blockhash, + lastValidBlockHeight: latestBlockhash.lastValidBlockHeight, + signature + }, + commitment + ).then(Result5.ok).catch(Result5.err); + }; +})(Node || (Node = {})); -// src/keypair.ts -import { Keypair as Original, PublicKey as PublicKey3 } from "@solana/web3.js"; +// ../global/src/index.ts +import { BigNumber } from "bignumber.js"; import bs2 from "bs58"; -var Account2; -((Account5) => { - class Keypair4 { - secret; - pubkey; - constructor(params) { - if (!params.pubkey) { - const keypair = params.secret.toKeypair(); - this.pubkey = keypair.publicKey.toString(); - } else { - this.pubkey = params.pubkey; - } - this.secret = params.secret; +String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, options = {}) { + const endPointUrl = Node.getConnection().rpcEndpoint; + debugLog("# toExplorerUrl rpcEndpoint:", endPointUrl); + let cluster = ""; + if (endPointUrl === Constants.EndPointUrl.prd) { + cluster = Constants.Cluster.prd; + } else if (endPointUrl === Constants.EndPointUrl.test) { + cluster = Constants.Cluster.test; + } else if (endPointUrl === Constants.EndPointUrl.dev) { + cluster = Constants.Cluster.dev; + } else { + cluster = Constants.Cluster.dev; + } + const addressOrSignature = this.toString(); + let url = ""; + if (options.replacePath) { + if (explorer === "solanafm" /* SolanaFM */) { + url = `${Constants.EXPLORER_SOLANAFM_URL}/${options.replacePath}/${addressOrSignature}?cluster=${cluster}`; + } else if (explorer === "xray" /* Xray */) { + url = `${Constants.EXPLORER_XRAY_URL}/${options.replacePath}/${addressOrSignature}?network=${cluster}`; + } else { + url = `${Constants.EXPLORER_SOLSCAN_URL}/${options.replacePath}/${addressOrSignature}?cluster=${cluster}`; } - toPublicKey() { - return new PublicKey3(this.pubkey); + return url; + } + if (Account3.Keypair.isPubkey(addressOrSignature)) { + if (explorer === "solanafm" /* SolanaFM */) { + url = `${Constants.EXPLORER_SOLANAFM_URL}/address/${addressOrSignature}?cluster=${cluster}`; + } else if (explorer === "xray" /* Xray */) { + url = `${Constants.EXPLORER_XRAY_URL}/account/${addressOrSignature}?network=${cluster}`; + } else { + url = `${Constants.EXPLORER_SOLSCAN_URL}/account/${addressOrSignature}?cluster=${cluster}`; } - toKeypair() { - const decoded = bs2.decode(this.secret); - return Original.fromSecretKey(decoded); + } else { + if (explorer === "solanafm" /* SolanaFM */) { + url = `${Constants.EXPLORER_SOLANAFM_URL}/tx/${addressOrSignature}?cluster=${cluster}`; + } else if (explorer === "xray" /* Xray */) { + url = `${Constants.EXPLORER_XRAY_URL}/tx/${addressOrSignature}?network=${cluster}`; + } else { + url = `${Constants.EXPLORER_SOLSCAN_URL}/tx/${addressOrSignature}?cluster=${cluster}`; } - static isPubkey = (value) => /^[0-9a-zA-Z]{32,44}$/.test(value); - static isSecret = (value) => /^[0-9a-zA-Z]{87,88}$/.test(value); - static create = () => { - const keypair = Original.generate(); - return new Keypair4({ - pubkey: keypair.publicKey.toString(), - secret: bs2.encode(keypair.secretKey) - }); - }; - static toKeyPair = (keypair) => { - return new Keypair4({ - pubkey: keypair.publicKey.toString(), - secret: bs2.encode(keypair.secretKey) - }); - }; } - Account5.Keypair = Keypair4; -})(Account2 || (Account2 = {})); - -// src/associated.ts -var Account3; -((Account5) => { - let Associated; - ((Associated2) => { - const RETRY_OVER_LIMIT = 10; - const RETRY_SLEEP_TIME = 3; - const get = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const res = await (0, Associated2.makeOrCreateInstruction)( - mint, - owner, - new Account2.Keypair({ secret: feePayer }).pubkey, - allowOwnerOffCurve - ); - if (!res.inst) { - return res.tokenAccount; - } - return new TransactionBuilder6.Common( - [res.inst], - [], - feePayer.toKeypair(), - res.tokenAccount - ); - }; - Associated2.retryGetOrCreate = async (mint, owner, feePayer) => { - let counter = 1; - while (counter < RETRY_OVER_LIMIT) { - try { - const inst = await get(mint, owner, feePayer, true); - if (inst && typeof inst === "string") { - debugLog("# associatedTokenAccount: ", inst); - return inst; - } else if (inst instanceof TransactionBuilder6.Common) { - (await inst.submit()).map( - async (ok) => { - await Node.confirmedSig(ok); - return inst.data; - }, - (err) => { - debugLog("# Error submit retryGetOrCreate: ", err); - throw err; - } - ); - } - } catch (e) { - debugLog(`# retry: ${counter} create token account: `, e); - debugLog(`# mint: ${mint}, owner: ${owner}, feePayer: ${feePayer}`); - } - await sleep(RETRY_SLEEP_TIME); - counter++; - } - throw Error(`retry action is over limit ${RETRY_OVER_LIMIT}`); - }; - Associated2.makeOrCreateInstruction = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const associatedTokenAccount = getAssociatedTokenAddressSync( - mint.toPublicKey(), - owner.toPublicKey(), - allowOwnerOffCurve, - TOKEN_PROGRAM_ID, - ASSOCIATED_TOKEN_PROGRAM_ID - ); - debugLog("# associatedTokenAccount: ", associatedTokenAccount.toString()); - try { - await getAccount( - Node.getConnection(), - associatedTokenAccount, - Node.getConnection().commitment, - TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst: void 0 - }; - } catch (error) { - if (!(error instanceof TokenAccountNotFoundError) && !(error instanceof TokenInvalidAccountOwnerError)) { - throw Error("Unexpected error"); - } - const payer = !feePayer ? owner : feePayer; - const inst = createAssociatedTokenAccountInstruction( - payer.toPublicKey(), - associatedTokenAccount, - owner.toPublicKey(), - mint.toPublicKey(), - TOKEN_PROGRAM_ID, - ASSOCIATED_TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst - }; - } - }; - })(Associated = Account5.Associated || (Account5.Associated = {})); -})(Account3 || (Account3 = {})); - -// src/pda.ts -import { PublicKey as PublicKey4 } from "@solana/web3.js"; -import { PROGRAM_ID } from "@metaplex-foundation/mpl-token-metadata"; -import { MPL_BUBBLEGUM_PROGRAM_ID } from "@metaplex-foundation/mpl-bubblegum"; -import BN from "bn.js"; -var Account4; -((Account5) => { - let Pda; - ((Pda2) => { - Pda2.getMetadata = (address) => { - const [publicKey] = PublicKey4.findProgramAddressSync( - [ - Buffer.from("metadata"), - PROGRAM_ID.toBuffer(), - address.toPublicKey().toBuffer() - ], - PROGRAM_ID - ); - return publicKey; - }; - Pda2.getMasterEdition = (address) => { - const [publicKey] = PublicKey4.findProgramAddressSync( - [ - Buffer.from("metadata"), - PROGRAM_ID.toBuffer(), - address.toPublicKey().toBuffer(), - Buffer.from("edition") - ], - PROGRAM_ID - ); - return publicKey; - }; - Pda2.getTreeAuthority = (address) => { - const [publicKey] = PublicKey4.findProgramAddressSync( - [address.toPublicKey().toBuffer()], - MPL_BUBBLEGUM_PROGRAM_ID.toPublicKey() - ); - return publicKey; - }; - Pda2.getBgumSigner = () => { - const [publicKey] = PublicKey4.findProgramAddressSync( - [Buffer.from("collection_cpi", "utf8")], - MPL_BUBBLEGUM_PROGRAM_ID.toPublicKey() - ); - return publicKey; - }; - Pda2.getAssetId = (address, leafIndex) => { - const node = new BN.BN(leafIndex); - const [assetId] = PublicKey4.findProgramAddressSync( - [ - Buffer.from("asset", "utf8"), - address.toPublicKey().toBuffer(), - Uint8Array.from(node.toArray("le", 8)) - ], - MPL_BUBBLEGUM_PROGRAM_ID.toPublicKey() - ); - return assetId.toString(); - }; - })(Pda = Account5.Pda || (Account5.Pda = {})); -})(Account4 || (Account4 = {})); + return url; +}; +String.prototype.toPublicKey = function() { + if (!Account3.Keypair.isPubkey(this.toString())) { + throw Error(`No match KeyPair.PubKey: ${this.toString()}`); + } + return new PublicKey4(this.toString()); +}; +String.prototype.toKeypair = function() { + if (!Account3.Keypair.isSecret(this.toString())) { + throw Error(`No match KeyPair.Secret: ${this.toString()}`); + } + const decoded = bs2.decode(this.toString()); + return Keypair3.fromSecretKey(decoded); +}; +Number.prototype.toSol = function() { + return BigNumber(this).div(LAMPORTS_PER_SOL).toNumber(); +}; +Number.prototype.toLamports = function() { + return BigNumber(this).times(LAMPORTS_PER_SOL).toNumber(); +}; // src/index.ts -var Account = { - ...Account3, - ...Account2, - ...Account4 +var Account3 = { + ...Account, + ...Account2 }; export { - Account + Account3 as Account }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9iYXRjaC50cyIsICIuLi8uLi9ub2RlL3NyYy9pbmRleC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jb21tb24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvbWludC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9wYXJ0aWFsLXNpZ24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY2FsY3VsYXRlLXR4c2l6ZS50cyIsICIuLi8uLi9nbG9iYWwvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3N1aXRlLXV0aWxzL3NyYy9zaGFyZWQudHMiLCAiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL3Jlc3VsdC50cyIsICIuLi8uLi9jb252ZXJ0ZXIvc3JjL2NvbGxlY3Rpb24udHMiLCAiLi4vLi4vY29udmVydGVyL3NyYy9jcmVhdG9ycy50cyIsICIuLi8uLi9jb252ZXJ0ZXIvc3JjL2NvbXByZXNzZWQtbmZ0LW1ldGFkYXRhLnRzIiwgIi4uLy4uL2NvbnZlcnRlci9zcmMvcm95YWx0eS50cyIsICIuLi8uLi9jb252ZXJ0ZXIvc3JjL25mdC50cyIsICIuLi8uLi9jb252ZXJ0ZXIvc3JjL21lbW8udHMiLCAiLi4vLi4vY29udmVydGVyL3NyYy9taW50LnRzIiwgIi4uLy4uL2NvbnZlcnRlci9zcmMvcmVndWxhci1u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lUGF5ZXJzID0gYXJyLmZpbHRlcigoYSkgPT4gYS5mZWVQYXllciAhPT0gdW5kZWZpbmVkKTtcbiAgICAgICAgbGV0IGZlZVBheWVyID0gc2lnbmVyc1swXTtcbiAgICAgICAgaWYgKGZlZVBheWVycy5sZW5ndGggPiAwICYmIGZlZVBheWVyc1swXS5mZWVQYXllcikge1xuICAgICAgICAgIGZlZVBheWVyID0gZmVlUGF5ZXJzWzBdLmZlZVBheWVyO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgdHJhbnNhY3Rpb24gPSBuZXcgVHJhbnNhY3Rpb24oKTtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHNpZ25lcnM7XG4gICAgICAgIGlmIChmZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gZmVlUGF5ZXIucHVibGljS2V5O1xuICAgICAgICAgIGZpbmFsU2lnbmVycyA9IFtmZWVQYXllciwgLi4uc2lnbmVyc107XG4gICAgICAgIH1cbiAgICAgICAgaW5zdHJ1Y3Rpb25zLm1hcCgoaW5zdCkgPT4gdHJhbnNhY3Rpb24uYWRkKGluc3QpKTtcblxuICAgICAgICAvLyBDYWxjdWxhdGVUeHNpemUuaXNNYXhUcmFuc2FjdGlvblNpemUodHJhbnNhY3Rpb24sIGZlZVBheWVyLnB1YmxpY0tleSk7XG5cbiAgICAgICAgY29uc3Qgb3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogTUFYX1JFVFJJRVMsXG4gICAgICAgIH07XG5cbiAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgIG9wdGlvbnMsXG4gICAgICAgICk7XG4gICAgICB9K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YWdlVXJsKG1ldGFkYXRhLmltYWdlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3JveWFsdHknOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5yb3lhbHR5KSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzUm95YWx0eShtZXRhZGF0YS5yb3lhbHR5KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlcl9mZWVfYmFzaXNfcG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJGZWVCYXNpc1BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0YWRhdGEubmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzeW1ib2wnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLnN5bWJvbCkge1xuICAgICAgICAgICAgICBy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G4gICAgICBsZXQgY291bnRlciA9IDE7XG4gICAgICB3aGlsZSAoY291bnRlciA8IFJFVFJZX09WRVJfTElNSVQpIHtcbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICBjb25zdCBpbnN0ID0gYXdhaXQgZ2V0KG1pbnQsIG93bmVyLCBmZWVQYXllciwgdHJ1ZSk7XG5cbiAgICAgICAgICBpZiAoaW5zdCAmJiB0eXBlb2YgaW5zdCA9PT0gJ3N0cmluZycpIHtcbiAgICAgICAgICAgIGRlYnVnTG9nKCcjIGFzc29jaWF0ZWRUb2tlbkFjY291bnQ6ICcsIGluc3QpO1xuICAgICAgICAgICAgcmV0dXJuIGluc3Q7XG4gICAgICAgICAgfSBlbHNlIGlmIChpbnN0IGluc3RhbmNlb2YgVHJhbnNhY3Rpb25CdWlsZGVyLkNvbW1vbikge1xuICAgICAgICAgICAgKGF3YWl0IGluc3Quc3VibWl0KCkpLm1hcChcbiAgICAgICAgICAgICAgYXN5bmMgKG9rOiBzdHJpbmcpID0+IHtcbiAgICAgICAgICAgICAgICBhd2FpdCBOb2RlLmNvbmZpcm1lZFNpZyhvayk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGluc3QuZGF0YTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgKGVycjogRXJyb3IpID0+IHtcbiAgICAgICAgICAgICAgICBkZWJ1Z0xvZygnIyBFcnJvciBzdWJtaXQgcmV0cnlHZXRPckNyZWF0ZTogJywgZXJyKTtcbiAgICAgICAgICAgICAgICB0aHJvdyBlcnI7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgIGRlYnVnTG9nKGAjIHJldHJ5OiAke2NvdW50ZXJ9IGNyZWF0ZSB0b2tlbiBhY2NvdW50OiBgLCBlKTtcbiAgICAgICAgICBkZWJ1Z0xvZyhgIyBtaW50OiAke21pbnR9LCBvd25lcjogJHtvd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hbGxvd093bmVyT2ZmQ3VydmUsXG4gICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGFzc29jaWF0ZWRUb2tlbkFjY291bnQ6ICcsIGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSk7XG5cbiAgICAgIHRyeSB7XG4gICAgICAgIC8vIERvbnQgdXNlIFJlc3VsdFxuICAgICAgICBhd2FpdCBnZXRBY2NvdW50KFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCkuY29tbWl0bWVudCxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3Q6IHVuZGVmaW5lZCxcbiAgICAgICAgfTtcbiAgICAgIH0gY2F0Y2ggKGVycm9yOiB1bmtub3duKSB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5BY2NvdW50Tm90Rm91bmRFcnJvcikgJiZcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5JbnZhbGlkQWNjb3VudE93bmVyRXJyb3IpXG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9yKCdVbmV4cGVjdGVkIGVycm9yJyk7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBwYXllciA9ICFmZWVQYXllciA/IG93bmVyIDogZmVlUGF5ZXI7XG5cbiAgICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZUFzc29jaWF0ZW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ZWVQYXllclBrID0gW2ZlZVBheWVyLnRvQmFzZTU4KCldO1xuXG4gICAgY29uc3Qgc2lnbmVycyA9IG5ldyBTZXQ8c3RyaW5nPihmZWVQYXllclBrKTtcbiAgICBjb25zdCBhY2NvdW50cyA9IG5ldyBTZXQ8c3RyaW5nPihmZWVQYXllclBrKTtcblxuICAgIGNvbnN0IGl4c1NpemUgPSB0cmFuc2FjdGlvbi5pbnN0cnVjdGlvbnMucmVkdWNlKChhY2MsIGl4KSA9PiB7XG4gICAgICBpeC5rZXlzLmZvckVhY2goKHsgcHVia2V5LCBpc1NpZ25lciB9KSA9PiB7XG4gICAgICAgIGNvbnN0IHBrID0gcHVia2V5LnRvQmFzZTU4KCk7XG4gICAgICAgIGlmIChpc1NpZ25lcikgc2lnbmVycy5hZGQocGspO1xuICAgICAgICBhY2NvdW50cy5hZGQocGspO1xuICAgICAgfSk7XG5cbiAgICAgIGFjY291bnRzLmFkZChpeC5wcm9ncmFtSWQudG9CYXNlNTgoKSk7XG5cbiAgICAgIGNvbnN0IG5JbmRleGVzID0gaXgua2V5cy5sZW5ndGg7XG4gICAgICBjb25zdCBvcGFxdWVEYXRhID0gaXguZGF0YS5sZW5ndGg7XG5cbiAgICAgIHJldHVybiAoXG4gICAgICAgIGFjYyArXG4gICAgICAgIDEgKyAvLyBQSUQgaW5kZXhcbiAgICAgICAgY29tcGFjdEFycmF5U2l6ZShuSW5kZXhlcywgMSkgK1xuICAgICAgICBjb21wYWN0QXJyYXlTaXplKG9wYXF1ZURhdGEsIDEpXG4gICAgICApO1xuICAgIH0sIDApO1xuXG4gICAgcmV0dXJuIChcbiAgICAgIGNvbXBhY3RBcnJheVNpemUoc2lnbmVycy5zaXplLCA2NCkgKyAvLyBzaWduYXR1cmVzXG4gICAgICAzICsgLy8gaGVhZGVyXG4gICAgICBjb21wYWN0QXJyYXlTaXplKGFjY291bnRzLnNpemUsIDMyKSArIC8vIGFjY291bnRzXG4gICAgICAzMiArIC8vIGJsb2NraGFza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gICAgICAgICAgcmVzID0gaXNSb3lhbHR5KG1ldGFkYXRhLnJveWFsdHkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEuc3ltYm9sKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU3ltYm9sKG1ldGFkYXRhLnN5bWJvbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAocmVzICYmIHJlcy5pc0Vycikge1xuICAgICAgICAgIHJlc3VsdHMucHVzaCguLi5yZXMuZXJ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ZXIiLCAiTWVtbyIsICJDb252ZXJ0ZXIiLCAiTWludCIsICJDb252ZXJ0ZXIiLCAiUmVndWxhck5mdE1ldGFkYXRhIiwgIkNvbnZlcnRlciIsICJQcm9wZXJ0aWVzIiwgIkNvbnZlcnRlciIsICJVc2VzIiwgIkNvbnZlcnRlciIsICJUb2tlbk1ldGFkYXRhIiwgIkNvbnZlcnRlciIsICJUcmFuc2ZlckNoZWNrZWQiLCAiQ29udmVydGVyIiwgIlRyYW5zZmVyIiwgIkNvbnZlcnRlciIsICJWYWxpZGF0b3IiLCAiTWVzc2FnZSIsICJDb252ZXJ0ZXIiLCAiTm9kZSIsICJSZXN1bHQiLCAiYnMiLCAiQWNjb3VudCIsICJQdWJsaWNLZXkiLCAiS2V5cGFpciIsICJBY2NvdW50Il0KfQo= \ No newline at end of file diff --git a/packages/account/src/index.ts b/packages/account/src/index.ts index e5d4fbbfd..31fc9969e 100644 --- a/packages/account/src/index.ts +++ b/packages/account/src/index.ts @@ -1,6 +1,9 @@ import { Account as Keypair } from './keypair'; import { Account as Pda } from './pda'; +import '~/types/global'; +import '~/global'; + export const Account = { ...Keypair, ...Pda, diff --git a/packages/converter/dist/index.d.mts b/packages/converter/dist/index.d.mts deleted file mode 100644 index b9bcdf6f8..000000000 --- a/packages/converter/dist/index.d.mts +++ /dev/null @@ -1,615 +0,0 @@ -import { PublicKey, ParsedTransactionWithMeta, TransactionSignature, Keypair } from '@solana/web3.js'; -import { Metadata as Metadata$2, DataV2 } from '@metaplex-foundation/mpl-token-metadata'; -import BN from 'bn.js'; -import { MetadataArgs } from 'mpl-bubblegum-instruction'; - -declare const pubKeyNominality: unique symbol; -declare const secretNominality: unique symbol; -type Pubkey$1 = (string & { - [pubKeyNominality]: never; -}) | string; -type Secret = (string & { - [secretNominality]: never; -}) | string; - -type bignum = number | BN; -type Option = T | null; -declare enum UseMethod { - Burn = 0, - Multiple = 1, - Single = 2 -} -type Uses = { - useMethod: UseMethod; - remaining: bignum; - total: bignum; -}; -type InputCreators = { - address: Pubkey$1; - secret: Secret; - share: number; -}; - -type FileType = string | File; - -type InternalCollection = { - key: PublicKey; - verified: boolean; -}; -type InternalCreators = { - address: PublicKey; - verified: boolean; - share: number; -}; - -type Metadata$1 = { - name: string; - symbol: string; - token_standard: string; -}; -type Grouping = { - group_key: string; - group_value: string; -}; -type Asset = { - interface: string; - id: Pubkey$1; - content: { - json_uri: string; - files: string[]; - metadata: Metadata$1; - links: string[]; - }; - authorities: { - address: Pubkey$1; - scopes: string[]; - }[]; - compression: { - eligible: boolean; - compressed: boolean; - data_hash: Pubkey$1; - creator_hash: Pubkey$1; - asset_hash: Pubkey$1; - tree: Pubkey$1; - seq: number; - leaf_id: number; - }; - grouping: Grouping[]; - royalty: { - royalty_model: 'creators' | 'fanout' | 'single'; - target: null; - percent: number; - basis_points: number; - primary_sale_happened: boolean; - locked: boolean; - }; - creators: InternalCreators[]; - ownership: { - frozen: boolean; - delegated: boolean; - delegate: Pubkey$1; - ownership_model: 'single' | 'token'; - owner: Pubkey$1; - }; - supply: { - print_max_supply: number; - print_current_supply: number; - edition_nonce: number; - }; - mutable: boolean; - burnt: boolean; -}; - -type StorageType = 'nftStorage' | 'arweave' | string; -type MetadataAndOffchain = { - onchain: Metadata$2; - offchain: Offchain; -}; -type AssetAndOffchain = { - onchain: Asset; - offchain: Offchain; -}; -type Offchain = { - name?: string; - symbol?: string; - description?: string; - seller_fee_basis_points?: number; - image?: string; - external_url?: string; - attributes?: Attribute[]; - properties?: Properties; - collection?: { - name?: string; - family?: string; - [key: string]: unknown; - }; - collectionDetails?: { - kind: string; - size: number; - }; - created_at?: number; -}; -type Properties = { - creators?: { - address?: string; - share?: number; - [key: string]: unknown; - }[]; - files?: { - type?: string; - filePath?: FileType; - [key: string]: unknown; - }[]; - [key: string]: unknown; -}; -type Attribute = { - trait_type?: string; - value?: string; - [key: string]: unknown; -}; - -type InputCollection = Pubkey$1; -type Options = { - [key: string]: unknown; -}; -type InputNftMetadata = { - name: string; - symbol: string; - royalty?: number; - storageType?: StorageType; - filePath?: FileType; - uri?: string; - isMutable?: boolean; - description?: string; - external_url?: string; - attributes?: Attribute[]; - properties?: Properties; - maxSupply?: bignum; - creators?: InputCreators[]; - uses?: Uses; - collection?: InputCollection; - options?: Options; -}; - -type Collection = { - address: Pubkey$1; - verified: boolean; -}; - -declare namespace Converter$d { - namespace CompressedNftMetadata { - const intoInfra: (input: InputNftMetadata, uri: string, sellerFeeBasisPoints: number) => MetadataArgs; - } -} - -declare namespace Converter$c { - namespace Collection { - const intoInfra: (input: Option | undefined) => Option; - const intoUser: (output: Option) => Collection | undefined; - } - namespace CollectionMint { - const intoUser: (output: Grouping[]) => Pubkey; - } -} - -declare namespace Converter$b { - namespace Creators { - const intoInfra: (input: Option | undefined) => Option; - const intoCompressedNftInfra: (input: Option | undefined) => InternalCreators[]; - const intoUser: (output: Option) => Creators[] | undefined; - } -} - -type Authority = { - address: Pubkey$1; - scopes: string[]; -}; -type Creators = { - address: Pubkey$1; - share: number; - verified: boolean; -}[]; -type Metadata = { - mint: Pubkey$1; - collectionMint: Pubkey$1; - authorities: Authority[]; - royalty: number; - name: string; - symbol: string; - uri: string; - creators: Creators; - treeAddress: Pubkey$1; - isCompressed: boolean; - isMutable: boolean; - isBurn: boolean; - editionNonce: number; - primarySaleHappened: boolean; - dateTime: Date; - offchain: Offchain; -}; - -declare namespace Converter$a { - namespace Nft { - const intoUser: (output: AssetAndOffchain) => Metadata; - } -} - -type PostTokenAccount = { - account: string; - owner: string; -}; -type MintTo = { - parsed: { - info: { - account: Pubkey$1; - mint: Pubkey$1; - mintAuthority: Pubkey$1; - tokenAmount: string; - }; - type: string; - }; - program: string; - programId?: PublicKey; -}; -type TransferChecked = { - parsed: { - info: { - destination: Pubkey$1; - mint: Pubkey$1; - multisigAuthority: Pubkey$1; - signers: Pubkey$1[]; - source: Pubkey$1; - tokenAmount: string; - }; - type: string; - }; - program: string; - programId?: PublicKey; -}; - -type History = { - sol?: string; - account?: string; - destination?: Pubkey$1; - source?: Pubkey$1; - authority?: Pubkey$1; - multisigAuthority?: Pubkey$1; - signers?: Pubkey$1[]; - mint?: Pubkey$1; - mintAuthority?: Pubkey$1; - tokenAmount?: string; - memo?: string; - dateTime?: Date; - type?: string; - sig?: string; - innerInstruction?: boolean; -}; - -declare namespace Converter$9 { - namespace Memo { - const intoUserSide: (output: Memo, meta: ParsedTransactionWithMeta, outputTransfer?: TransferChecked, mappingTokenAccount?: PostTokenAccount[]) => History | undefined; - } -} - -declare namespace Converter$8 { - namespace Mint { - const intoUserSide: (output: MintTo, meta: ParsedTransactionWithMeta) => History | undefined; - } -} - -declare namespace Converter$7 { - namespace RegularNftMetadata { - const intoInfra: (input: InputNftMetadata, uri: string, sellerFeeBasisPoints: number) => DataV2; - } -} - -declare abstract class AbstractResult { - protected abstract _chain(ok: (value: T) => Result, err: (error: E) => Result): Result; - unwrap(): T; - unwrap(ok: (value: T) => U): U; - unwrap(ok: (value: T) => U, err: (error: E) => V): U | V; - unwrap(ok: (value: T) => U, err: (error: E) => U): U; - map(ok: (value: T) => U): Result; - map(ok: (value: T) => U, err: (error: E) => F): Result; - chain(ok: (value: T) => Result): Result; - chain(ok: (value: T) => Result): Result; - chain(ok: (value: T) => Result, err: (error: E) => Result): Result; - match(ok: (value: T) => U, err: (error: E) => F): void | Promise; - submit(feePayer?: Secret): Promise>; -} -declare global { - interface Array { - submit(feePayer?: Secret): Promise>; - } -} -declare class InternalOk extends AbstractResult { - readonly value: T; - readonly isOk = true; - readonly isErr = false; - constructor(value: T); - protected _chain(ok: (value: T) => Result, _err: (error: E) => Result): Result; -} -declare class InternalErr extends AbstractResult { - readonly error: E; - readonly isOk = false; - readonly isErr = true; - constructor(error: E); - protected _chain(_ok: (value: T) => Result, err: (error: E) => Result): Result; -} -declare namespace Result { - export type Ok = InternalOk; - export type Err = InternalErr; - export function ok(value: T): Result; - export function err(error?: E): Result; - type U = Result; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3]): Result<[ - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2]): Result<[OkType, OkType, OkType], ErrType>; - export function all(obj: [R0, R1]): Result<[OkType, OkType], ErrType>; - export function all(obj: [R0]): Result<[OkType], ErrType>; - export function all(obj: []): Result<[]>; - export function all>(obj: T): Result<{ - [K in keyof T]: T[K] extends Result ? I : never; - }, { - [K in keyof T]: T[K] extends Result ? E : never; - }[keyof T]>; - export {}; -} -type Result = Result.Ok | Result.Err; -type OkType> = R extends Result ? O : never; -type ErrType> = R extends Result ? E : never; - -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 namespace Converter$6 { - namespace Properties { - const intoInfra: (input: Properties | undefined, callbackFunc: (filePath: FileType, storageType: StorageType, feePayer?: Secret) => Promise>, storageType: StorageType, feePayer?: Secret) => Promise; - } -} - -declare namespace Converter$5 { - namespace Royalty { - const THRESHOLD = 100; - const intoInfra: (percentage: number) => number; - const intoUser: (percentage: number) => number; - } -} - -type InputTokenMetadata = { - name: string; - symbol: string; - filePath?: FileType; - uri?: string; - storageType?: StorageType; - description?: string; - royalty?: number; - uses?: Uses; - creators?: InputCreators[]; - attributes?: Attribute[]; - options?: Options; -}; - -declare namespace Converter$4 { - namespace TokenMetadata { - const intoInfra: (input: InputTokenMetadata, uri: string, sellerFeeBasisPoints: number) => DataV2; - const intoUser: (output: MetadataAndOffchain, tokenAmount: string) => TokenMetadata; - const deleteNullStrings: (str: string) => string; - } -} - -declare namespace Converter$3 { - namespace TransferChecked { - const intoUserSide: (output: TransferChecked, meta: ParsedTransactionWithMeta, mappingTokenAccount?: PostTokenAccount[]) => History | undefined; - } -} - -declare namespace Converter$2 { - namespace Transfer { - const intoUserSide: (output: Transfer, meta: ParsedTransactionWithMeta) => History | undefined; - } -} - -declare namespace Converter$1 { - namespace Uses { - const intoUserSide: (output: Option) => Uses | undefined; - } -} - -declare const Converter: { - Uses: typeof Converter$1.Uses; - Transfer: typeof Converter$2.Transfer; - TransferChecked: typeof Converter$3.TransferChecked; - TokenMetadata: typeof Converter$4.TokenMetadata; - Royalty: typeof Converter$5.Royalty; - Properties: typeof Converter$6.Properties; - RegularNftMetadata: typeof Converter$7.RegularNftMetadata; - Mint: typeof Converter$8.Mint; - Memo: typeof Converter$9.Memo; - Nft: typeof Converter$a.Nft; - Creators: typeof Converter$b.Creators; - Collection: typeof Converter$c.Collection; - CollectionMint: typeof Converter$c.CollectionMint; - CompressedNftMetadata: typeof Converter$d.CompressedNftMetadata; -}; - -export { Converter }; diff --git a/packages/converter/dist/index.d.ts b/packages/converter/dist/index.d.ts deleted file mode 100644 index b9bcdf6f8..000000000 --- a/packages/converter/dist/index.d.ts +++ /dev/null @@ -1,615 +0,0 @@ -import { PublicKey, ParsedTransactionWithMeta, TransactionSignature, Keypair } from '@solana/web3.js'; -import { Metadata as Metadata$2, DataV2 } from '@metaplex-foundation/mpl-token-metadata'; -import BN from 'bn.js'; -import { MetadataArgs } from 'mpl-bubblegum-instruction'; - -declare const pubKeyNominality: unique symbol; -declare const secretNominality: unique symbol; -type Pubkey$1 = (string & { - [pubKeyNominality]: never; -}) | string; -type Secret = (string & { - [secretNominality]: never; -}) | string; - -type bignum = number | BN; -type Option = T | null; -declare enum UseMethod { - Burn = 0, - Multiple = 1, - Single = 2 -} -type Uses = { - useMethod: UseMethod; - remaining: bignum; - total: bignum; -}; -type InputCreators = { - address: Pubkey$1; - secret: Secret; - share: number; -}; - -type FileType = string | File; - -type InternalCollection = { - key: PublicKey; - verified: boolean; -}; -type InternalCreators = { - address: PublicKey; - verified: boolean; - share: number; -}; - -type Metadata$1 = { - name: string; - symbol: string; - token_standard: string; -}; -type Grouping = { - group_key: string; - group_value: string; -}; -type Asset = { - interface: string; - id: Pubkey$1; - content: { - json_uri: string; - files: string[]; - metadata: Metadata$1; - links: string[]; - }; - authorities: { - address: Pubkey$1; - scopes: string[]; - }[]; - compression: { - eligible: boolean; - compressed: boolean; - data_hash: Pubkey$1; - creator_hash: Pubkey$1; - asset_hash: Pubkey$1; - tree: Pubkey$1; - seq: number; - leaf_id: number; - }; - grouping: Grouping[]; - royalty: { - royalty_model: 'creators' | 'fanout' | 'single'; - target: null; - percent: number; - basis_points: number; - primary_sale_happened: boolean; - locked: boolean; - }; - creators: InternalCreators[]; - ownership: { - frozen: boolean; - delegated: boolean; - delegate: Pubkey$1; - ownership_model: 'single' | 'token'; - owner: Pubkey$1; - }; - supply: { - print_max_supply: number; - print_current_supply: number; - edition_nonce: number; - }; - mutable: boolean; - burnt: boolean; -}; - -type StorageType = 'nftStorage' | 'arweave' | string; -type MetadataAndOffchain = { - onchain: Metadata$2; - offchain: Offchain; -}; -type AssetAndOffchain = { - onchain: Asset; - offchain: Offchain; -}; -type Offchain = { - name?: string; - symbol?: string; - description?: string; - seller_fee_basis_points?: number; - image?: string; - external_url?: string; - attributes?: Attribute[]; - properties?: Properties; - collection?: { - name?: string; - family?: string; - [key: string]: unknown; - }; - collectionDetails?: { - kind: string; - size: number; - }; - created_at?: number; -}; -type Properties = { - creators?: { - address?: string; - share?: number; - [key: string]: unknown; - }[]; - files?: { - type?: string; - filePath?: FileType; - [key: string]: unknown; - }[]; - [key: string]: unknown; -}; -type Attribute = { - trait_type?: string; - value?: string; - [key: string]: unknown; -}; - -type InputCollection = Pubkey$1; -type Options = { - [key: string]: unknown; -}; -type InputNftMetadata = { - name: string; - symbol: string; - royalty?: number; - storageType?: StorageType; - filePath?: FileType; - uri?: string; - isMutable?: boolean; - description?: string; - external_url?: string; - attributes?: Attribute[]; - properties?: Properties; - maxSupply?: bignum; - creators?: InputCreators[]; - uses?: Uses; - collection?: InputCollection; - options?: Options; -}; - -type Collection = { - address: Pubkey$1; - verified: boolean; -}; - -declare namespace Converter$d { - namespace CompressedNftMetadata { - const intoInfra: (input: InputNftMetadata, uri: string, sellerFeeBasisPoints: number) => MetadataArgs; - } -} - -declare namespace Converter$c { - namespace Collection { - const intoInfra: (input: Option | undefined) => Option; - const intoUser: (output: Option) => Collection | undefined; - } - namespace CollectionMint { - const intoUser: (output: Grouping[]) => Pubkey; - } -} - -declare namespace Converter$b { - namespace Creators { - const intoInfra: (input: Option | undefined) => Option; - const intoCompressedNftInfra: (input: Option | undefined) => InternalCreators[]; - const intoUser: (output: Option) => Creators[] | undefined; - } -} - -type Authority = { - address: Pubkey$1; - scopes: string[]; -}; -type Creators = { - address: Pubkey$1; - share: number; - verified: boolean; -}[]; -type Metadata = { - mint: Pubkey$1; - collectionMint: Pubkey$1; - authorities: Authority[]; - royalty: number; - name: string; - symbol: string; - uri: string; - creators: Creators; - treeAddress: Pubkey$1; - isCompressed: boolean; - isMutable: boolean; - isBurn: boolean; - editionNonce: number; - primarySaleHappened: boolean; - dateTime: Date; - offchain: Offchain; -}; - -declare namespace Converter$a { - namespace Nft { - const intoUser: (output: AssetAndOffchain) => Metadata; - } -} - -type PostTokenAccount = { - account: string; - owner: string; -}; -type MintTo = { - parsed: { - info: { - account: Pubkey$1; - mint: Pubkey$1; - mintAuthority: Pubkey$1; - tokenAmount: string; - }; - type: string; - }; - program: string; - programId?: PublicKey; -}; -type TransferChecked = { - parsed: { - info: { - destination: Pubkey$1; - mint: Pubkey$1; - multisigAuthority: Pubkey$1; - signers: Pubkey$1[]; - source: Pubkey$1; - tokenAmount: string; - }; - type: string; - }; - program: string; - programId?: PublicKey; -}; - -type History = { - sol?: string; - account?: string; - destination?: Pubkey$1; - source?: Pubkey$1; - authority?: Pubkey$1; - multisigAuthority?: Pubkey$1; - signers?: Pubkey$1[]; - mint?: Pubkey$1; - mintAuthority?: Pubkey$1; - tokenAmount?: string; - memo?: string; - dateTime?: Date; - type?: string; - sig?: string; - innerInstruction?: boolean; -}; - -declare namespace Converter$9 { - namespace Memo { - const intoUserSide: (output: Memo, meta: ParsedTransactionWithMeta, outputTransfer?: TransferChecked, mappingTokenAccount?: PostTokenAccount[]) => History | undefined; - } -} - -declare namespace Converter$8 { - namespace Mint { - const intoUserSide: (output: MintTo, meta: ParsedTransactionWithMeta) => History | undefined; - } -} - -declare namespace Converter$7 { - namespace RegularNftMetadata { - const intoInfra: (input: InputNftMetadata, uri: string, sellerFeeBasisPoints: number) => DataV2; - } -} - -declare abstract class AbstractResult { - protected abstract _chain(ok: (value: T) => Result, err: (error: E) => Result): Result; - unwrap(): T; - unwrap(ok: (value: T) => U): U; - unwrap(ok: (value: T) => U, err: (error: E) => V): U | V; - unwrap(ok: (value: T) => U, err: (error: E) => U): U; - map(ok: (value: T) => U): Result; - map(ok: (value: T) => U, err: (error: E) => F): Result; - chain(ok: (value: T) => Result): Result; - chain(ok: (value: T) => Result): Result; - chain(ok: (value: T) => Result, err: (error: E) => Result): Result; - match(ok: (value: T) => U, err: (error: E) => F): void | Promise; - submit(feePayer?: Secret): Promise>; -} -declare global { - interface Array { - submit(feePayer?: Secret): Promise>; - } -} -declare class InternalOk extends AbstractResult { - readonly value: T; - readonly isOk = true; - readonly isErr = false; - constructor(value: T); - protected _chain(ok: (value: T) => Result, _err: (error: E) => Result): Result; -} -declare class InternalErr extends AbstractResult { - readonly error: E; - readonly isOk = false; - readonly isErr = true; - constructor(error: E); - protected _chain(_ok: (value: T) => Result, err: (error: E) => Result): Result; -} -declare namespace Result { - export type Ok = InternalOk; - export type Err = InternalErr; - export function ok(value: T): Result; - export function err(error?: E): Result; - type U = Result; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3]): Result<[ - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2]): Result<[OkType, OkType, OkType], ErrType>; - export function all(obj: [R0, R1]): Result<[OkType, OkType], ErrType>; - export function all(obj: [R0]): Result<[OkType], ErrType>; - export function all(obj: []): Result<[]>; - export function all>(obj: T): Result<{ - [K in keyof T]: T[K] extends Result ? I : never; - }, { - [K in keyof T]: T[K] extends Result ? E : never; - }[keyof T]>; - export {}; -} -type Result = Result.Ok | Result.Err; -type OkType> = R extends Result ? O : never; -type ErrType> = R extends Result ? E : never; - -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 namespace Converter$6 { - namespace Properties { - const intoInfra: (input: Properties | undefined, callbackFunc: (filePath: FileType, storageType: StorageType, feePayer?: Secret) => Promise>, storageType: StorageType, feePayer?: Secret) => Promise; - } -} - -declare namespace Converter$5 { - namespace Royalty { - const THRESHOLD = 100; - const intoInfra: (percentage: number) => number; - const intoUser: (percentage: number) => number; - } -} - -type InputTokenMetadata = { - name: string; - symbol: string; - filePath?: FileType; - uri?: string; - storageType?: StorageType; - description?: string; - royalty?: number; - uses?: Uses; - creators?: InputCreators[]; - attributes?: Attribute[]; - options?: Options; -}; - -declare namespace Converter$4 { - namespace TokenMetadata { - const intoInfra: (input: InputTokenMetadata, uri: string, sellerFeeBasisPoints: number) => DataV2; - const intoUser: (output: MetadataAndOffchain, tokenAmount: string) => TokenMetadata; - const deleteNullStrings: (str: string) => string; - } -} - -declare namespace Converter$3 { - namespace TransferChecked { - const intoUserSide: (output: TransferChecked, meta: ParsedTransactionWithMeta, mappingTokenAccount?: PostTokenAccount[]) => History | undefined; - } -} - -declare namespace Converter$2 { - namespace Transfer { - const intoUserSide: (output: Transfer, meta: ParsedTransactionWithMeta) => History | undefined; - } -} - -declare namespace Converter$1 { - namespace Uses { - const intoUserSide: (output: Option) => Uses | undefined; - } -} - -declare const Converter: { - Uses: typeof Converter$1.Uses; - Transfer: typeof Converter$2.Transfer; - TransferChecked: typeof Converter$3.TransferChecked; - TokenMetadata: typeof Converter$4.TokenMetadata; - Royalty: typeof Converter$5.Royalty; - Properties: typeof Converter$6.Properties; - RegularNftMetadata: typeof Converter$7.RegularNftMetadata; - Mint: typeof Converter$8.Mint; - Memo: typeof Converter$9.Memo; - Nft: typeof Converter$a.Nft; - Creators: typeof Converter$b.Creators; - Collection: typeof Converter$c.Collection; - CollectionMint: typeof Converter$c.CollectionMint; - CompressedNftMetadata: typeof Converter$d.CompressedNftMetadata; -}; - -export { Converter }; diff --git a/packages/converter/dist/index.js b/packages/converter/dist/index.js index e5e74e693..51b874e20 100644 --- a/packages/converter/dist/index.js +++ b/packages/converter/dist/index.js @@ -600,14 +600,11 @@ var TransactionBuilder5; // ../global/src/index.ts var import_web39 = require("@solana/web3.js"); -// ../account/src/associated.ts -var import_spl_token = require("@solana/spl-token"); - // ../account/src/keypair.ts var import_web37 = require("@solana/web3.js"); var import_bs58 = __toESM(require("bs58")); var Account; -((Account5) => { +((Account4) => { class Keypair4 { secret; pubkey; @@ -643,111 +640,16 @@ var Account; }); }; } - Account5.Keypair = Keypair4; + Account4.Keypair = Keypair4; })(Account || (Account = {})); -// ../account/src/associated.ts -var Account2; -((Account5) => { - let Associated; - ((Associated2) => { - const RETRY_OVER_LIMIT = 10; - const RETRY_SLEEP_TIME = 3; - const get = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const res = await (0, Associated2.makeOrCreateInstruction)( - mint, - owner, - new Account.Keypair({ secret: feePayer }).pubkey, - allowOwnerOffCurve - ); - if (!res.inst) { - return res.tokenAccount; - } - return new TransactionBuilder6.Common( - [res.inst], - [], - feePayer.toKeypair(), - res.tokenAccount - ); - }; - Associated2.retryGetOrCreate = async (mint, owner, feePayer) => { - let counter = 1; - while (counter < RETRY_OVER_LIMIT) { - try { - const inst = await get(mint, owner, feePayer, true); - if (inst && typeof inst === "string") { - debugLog("# associatedTokenAccount: ", inst); - return inst; - } else if (inst instanceof TransactionBuilder6.Common) { - (await inst.submit()).map( - async (ok) => { - await Node.confirmedSig(ok); - return inst.data; - }, - (err) => { - debugLog("# Error submit retryGetOrCreate: ", err); - throw err; - } - ); - } - } catch (e) { - debugLog(`# retry: ${counter} create token account: `, e); - debugLog(`# mint: ${mint}, owner: ${owner}, feePayer: ${feePayer}`); - } - await sleep(RETRY_SLEEP_TIME); - counter++; - } - throw Error(`retry action is over limit ${RETRY_OVER_LIMIT}`); - }; - Associated2.makeOrCreateInstruction = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const associatedTokenAccount = (0, import_spl_token.getAssociatedTokenAddressSync)( - mint.toPublicKey(), - owner.toPublicKey(), - allowOwnerOffCurve, - import_spl_token.TOKEN_PROGRAM_ID, - import_spl_token.ASSOCIATED_TOKEN_PROGRAM_ID - ); - debugLog("# associatedTokenAccount: ", associatedTokenAccount.toString()); - try { - await (0, import_spl_token.getAccount)( - Node.getConnection(), - associatedTokenAccount, - Node.getConnection().commitment, - import_spl_token.TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst: void 0 - }; - } catch (error) { - if (!(error instanceof import_spl_token.TokenAccountNotFoundError) && !(error instanceof import_spl_token.TokenInvalidAccountOwnerError)) { - throw Error("Unexpected error"); - } - const payer = !feePayer ? owner : feePayer; - const inst = (0, import_spl_token.createAssociatedTokenAccountInstruction)( - payer.toPublicKey(), - associatedTokenAccount, - owner.toPublicKey(), - mint.toPublicKey(), - import_spl_token.TOKEN_PROGRAM_ID, - import_spl_token.ASSOCIATED_TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst - }; - } - }; - })(Associated = Account5.Associated || (Account5.Associated = {})); -})(Account2 || (Account2 = {})); - // ../account/src/pda.ts var import_web38 = require("@solana/web3.js"); var import_mpl_token_metadata = require("@metaplex-foundation/mpl-token-metadata"); var import_mpl_bubblegum = require("@metaplex-foundation/mpl-bubblegum"); var import_bn = __toESM(require("bn.js")); -var Account3; -((Account5) => { +var Account2; +((Account4) => { let Pda; ((Pda2) => { Pda2.getMetadata = (address) => { @@ -799,14 +701,13 @@ var Account3; ); return assetId.toString(); }; - })(Pda = Account5.Pda || (Account5.Pda = {})); -})(Account3 || (Account3 = {})); + })(Pda = Account4.Pda || (Account4.Pda = {})); +})(Account2 || (Account2 = {})); // ../account/src/index.ts -var Account4 = { - ...Account2, +var Account3 = { ...Account, - ...Account3 + ...Account2 }; // ../global/src/index.ts @@ -837,7 +738,7 @@ String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, op } return url; } - if (Account4.Keypair.isPubkey(addressOrSignature)) { + if (Account3.Keypair.isPubkey(addressOrSignature)) { if (explorer === "solanafm" /* SolanaFM */) { url = `${Constants.EXPLORER_SOLANAFM_URL}/address/${addressOrSignature}?cluster=${cluster}`; } else if (explorer === "xray" /* Xray */) { @@ -857,13 +758,13 @@ String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, op return url; }; String.prototype.toPublicKey = function() { - if (!Account4.Keypair.isPubkey(this.toString())) { + if (!Account3.Keypair.isPubkey(this.toString())) { throw Error(`No match KeyPair.PubKey: ${this.toString()}`); } return new import_web39.PublicKey(this.toString()); }; String.prototype.toKeypair = function() { - if (!Account4.Keypair.isSecret(this.toString())) { + if (!Account3.Keypair.isSecret(this.toString())) { throw Error(`No match KeyPair.Secret: ${this.toString()}`); } const decoded = import_bs582.default.decode(this.toString()); @@ -899,9 +800,6 @@ var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { console.log("[DEBUG]", data1, data2, data3, data4); } }; -var sleep = async (sec) => { - return new Promise((r) => setTimeout(r, sec * 1e3)); -}; var isPromise = (obj) => { return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; }; @@ -1526,4 +1424,4 @@ var Converter5 = { 0 && (module.exports = { Converter }); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uL3NyYy9jb2xsZWN0aW9uLnRzIiwgIi4uL3NyYy9jcmVhdG9ycy50cyIsICIuLi9zcmMvY29tcHJlc3NlZC1uZnQtbWV0YWRhdGEudHMiLCAiLi4vc3JjL3JveWFsdHkudHMiLCAiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9iYXRjaC50cyIsICIuLi8uLi9ub2RlL3NyYy9pbmRleC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jb21tb24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvbWludC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9wYXJ0aWFsLXNpZ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pLFxuICAgICAgICAgIHNoYXJlOiBkYXRhLnNoYXJlLFxuICAgICAgICAgIHZlcmlmaWVkOiBmYWxzZSxcbiAgICAgICAgfTtcbiAgICAgIH0pO1xuICAgIH07XG5cbiAgICBleHBvcnQgY29uc3QgaW50b0NvbXByZXNzZWROZnRJbmZyYSA9IChcbiAgICAgIGlucHV0OiBPcHRpb248SW5wdXRDcmVhdG9yc1tdPiB8IHVuZGVmaW5lZCxcbiAgICApOiBJbnRlcm5hbENyZWF0b3JzW10gPT4ge1xuICAgICAgaWYgKCFpbnB1dCkge1xuICAgICAgICByZXR1cm4gW107XG4gICAgICB9XG4gICAgICByZXR1cm4gaW5wdXQhLm1hcCgoZGF0YSkgPT4ge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIGFkZHJlc3M6IGRhdGEuYWRkcmVzcy50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIHNoYXJlOiBkYXRhLnNoYXJlLFxuICAgICAgICAgIHZlcmlmaWVkOiBmYWxzZSxcbiAgICAgICAgfTtcbiAgICAgIH0pO1xuICAgIH07XG5cbiAgICBleHBvcnQgY29uc3QgaW50b1VzZXIgPSAoXG4gICAgICBvdXRwdXQ6IE9wdGlvbjxJbnRlcm5hbENyZWF0b3JzW10+LFxuICAgICk6IENyZWF0b3JzW10gfCB1bmRlZmluZWQgPT4ge1xuICAgICAgaWYgKCFvdXRwdXQpIHtcbiAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG91dHB1dC5tYXAoKGRhdGEpID0+IHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICBhZGRyZXNzOiBkYXRhLmFkZHJlc3MudG9TdHJpbmcoKSxcbiAgICAgICAgICBzaGFyZTogZGF0YS5zaGFyZSxcbiAgICAgICAgICB2ZXJpZmllZDogZGF0YS52ZXJpZmllZCxcbiAgICAgICAgfTtcbiAgICAgIH0pO1xuICAgIH07XG4gIH1cbn1cbiIsIC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lxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBtaW50XG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAgICogQHBhcmFtIHtTZWNyZXR9IGZlZVBheWVyXG4gICAgICogQHJldHVybnMgUHJvbWlzZTxzdHJpbmc+XG4gICAgICovXG4gICAgZXhwb3J0IGNvbnN0IHJldHJ5R2V0T3JDcmVhdGUgPSBhc3luYyAoXG4gICAgICBtaW50OiBQdWJrZXksXG4gICAgICBvd25lcjogUHVia2V5LFxuICAgICAgZmVlUGF5ZXI6IFNlY3JldCxcbiAgICApOiBQcm9taXNlPHN0cmluZz4gPT4ge1xuICAgICAgbGV0IGNvdW50ZXIgPSAxO1xuICAgICAgd2hpbGUgKGNvdW50ZXIgPCBSRVRSWV9PVkVSX0xJTUlUKSB7XG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgY29uc3QgaW5zdCA9IGF3YWl0IGdldChtaW50LCBvd25lciwgZmVlUGF5ZXIsIHRydWUpO1xuXG4gICAgICAgICAgaWYgKGluc3QgJiYgdHlwZW9mIGluc3QgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICBkZWJ1Z0xvZygnIyBhc3NvY2lhdGVkVG9rZW5BY2NvdW50OiAnLCBpbnN0KTtcbiAgICAgICAgICAgIHJldHVybiBpbnN0O1xuICAgICAgICAgIH0gZWxzZSBpZiAoaW5zdCBpbnN0YW5jZW9mIFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb24pIHtcbiAgICAgICAgICAgIChhd2FpdCBpbnN0LnN1Ym1pdCgpKS5tYXAoXG4gICAgICAgICAgICAgIGFzeW5jIChvazogc3RyaW5nKSA9PiB7XG4gICAgICAgICAgICAgICAgYXdhaXQgTm9kZS5jb25maXJtZWRTaWcob2spO1xuICAgICAgICAgICAgICAgIHJldHVybiBpbnN0LmRhdGE7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIChlcnI6IEVycm9yKSA9PiB7XG4gICAgICAgICAgIC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iAoXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuQWNjb3VudE5vdEZvdW5kRXJyb3IpICYmXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuSW52YWxpZEFjY291bnRPd25lckVycm9yKVxuICAgICAgICApIHtcbiAgICAgICAgICB0aHJvdyBFcnJvcignVW5leHBlY3RlZCBlcnJvcicpO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgcGF5ZXIgPSAhZmVlUGF5ZXIgPyBvd25lciA6IGZlZVBheWVyO1xuXG4gICAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVBc3NvY2lhdGVkVG9rZW5BY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgcGF5ZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdCxcbiAgICAgICAgfTtcbiAgICAgIH1cbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHsgS2V5cGFpciBhcyBPcmlnaW5hbCwgUHVibGljS2V5IH0gZnJvbSAnQHNvbGFuYS93ZWIzLmpzJztcbmltcG9ydCB7IFB1YmtleSwgU2VjcmV0IH0gZnJvbSAnfi90eXBlcy9hY2NvdW50JztcbmltcG9ydCBicyBmcm9tICdiczU4JztcblxuZXhwb3J0IG5hbWVzcGFjZSBBY2NvdW50IHtcbiAgZXhwb3J0IGNsYXNzI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YSAmJiBtZXRhZGF0YS5pbWFnZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc0ltYWdlVXJsKG1ldGFkYXRhLmltYWdlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3JveWFsdHknOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5yb3lhbHR5KSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzUm95YWx0eShtZXRhZGF0YS5yb3lhbHR5KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlcl9mZWVfYmFzaXNfcG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJGZWVCYXNpc1BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0YWRhdGEubmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzeW1ib2wnOlxu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UHJvbWlzZTxQcm9wZXJ0aWVzPiA9PiB7XG4gICAgICBpZiAoIWlucHV0IHx8ICFpbnB1dC5maWxlcykge1xuICAgICAgICByZXR1cm4ge307XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGZpbGVzID0gYXdhaXQgUHJvbWlzZS5hbGwoXG4gICAgICAgIGlucHV0LmZpbGVzLm1hcChhc3luYyAoZmlsZSkgPT4ge1xuICAgICAgICAgIGlmICghZmlsZS5maWxlUGF0aCkge1xuICAgICAgICAgICAgcmV0dXJuIHt9O1xuICAgICAgICAgIH1cbiAgICAgICAgICBjb25zdCByZXMgPSBhd2FpdCBjYWxsYmFja0Z1bmMoZmlsZS5maWxlUGF0aCwgc3RvcmFnZVR5cGUsIGZlZVBheWVyKTtcbiAgICAgICAgICBpZiAocmVzLmlzRXJyKSB7XG4gICAgICAgICAgICB0aHJvdyBFcnJvcihyZXMuZXJyb3IubWVzc2FnZSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBvdmVyd3JpdGVPYmplY3QoZmlsZSwgW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBleGlzdHNLZXk6ICdmaWxlUGF0aCcsXG4gICAgICAgICAgICAgIHdpbGw6IHsga2V5OiAndXJpJywgdmFsdWU6IHJlcy52YWx1ZSB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICBdKTtcbiAgICAgICAgfSksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHsgLi4uaW5wdXQsIGZpbGVzIH0gYXMgUHJvcGVydGllcztcbiAgICB9O1xuICB9XG59XG4iLCAiLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLXVudXNlZC12YXJzICovXG5pbXBvcnQgeyBPcHRpb24sIFVzZXMgfSBmcm9tICd+L3R5cGVzL3JlZ3VsYXItbmZ0JztcblxuZXhwb3J0IG5hbWVzcGFjZSBDb252ZXJ0ZXIge1xuICBleHBvcnQgbmFtZXNwYWNlIFVzZXMge1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heWVyLnRvQmFzZTU4KCldO1xuXG4gICAgY29uc3Qgc2lnbmVycyA9IG5ldyBTZXQ8c3RyaW5nPihmZWVQYXllclBrKTtcbiAgICBjb25zdCBhY2NvdW50cyA9IG5ldyBTZXQ8c3RyaW5nPihmZWVQYXllclBrKTtcblxuICAgIGNvbnN0IGl4c1NpemUgPSB0cmFuc2FjdGlvbi5pbnN0cnVjdGlvbnMucmVkdWNlKChhY2MsIGl4KSA9PiB7XG4gICAgICBpeC5rZXlzLmZvckVhY2goKHsgcHVia2V5LCBpc1NpZ25lciB9KSA9PiB7XG4gICAgICAgIGNvbnN0IHBrID0gcHVia2V5LnRvQmFzZTU4KCk7XG4gICAgICAgIGlmIChpc1NpZ25lcikgc2lnbmVycy5hZGQocGspO1xuICAgICAgICBhY2NvdW50cy5hZGQocGspO1xuICAgICAgfSk7XG5cbiAgICAgIGFjY291bnRzLmFkZChpeC5wcm9ncmFtSWQudG9CYXNlNTgoKSk7XG5cbiAgICAgIGNvbnN0IG5JbmRleGVzID0gaXgua2V5cy5sZW5ndGg7XG4gICAgICBjb25zdCBvcGFxdWVEYXRhID0gaXguZGF0YS5sZW5ndGg7XG5cbiAgICAgIHJldHVybiAoXG4gICAgICAgIGFjYyArXG4gICAgICAgIDEgKyAvLyBQSUQgaW5kZXhcbiAgICAgICAgY29tcGFjdEFycmF5U2l6ZShuSW5kZXhlcywgMSkgK1xuICAgICAgICBjb21wYWN0QXJyYXlTaXplKG9wYXF1ZURhdGEsIDEpXG4gICAgICApO1xuICAgIH0sIDApO1xuXG4gICAgcmV0dXJuIChcbiAgICAgIGNvbXBhY3RBcnJheVNpemUoc2lnbmVycy5zaXplLCA2NCkgKyAvLyBzaWduYXR1cmVzXG4gICAgICAzICsgLy8gaGVhZGVyXG4gICAgICBjb21wYWN0QXJyYXlTaXplKGFjY291bnRzLnNpemUsIDMyKSArIC8vIGFjY291bnRzXG4gICAgICAzMiArIC8vIGJsb2NraGFzaFxuICAgICAgY29tcGFjdEhlY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ibWl0OiAnLCBvayk7XG4gICAgICAgIGlmIChmZWVQYXllcikge1xuICAgICAgICAgIGNvbnN0IG9iaiA9IG9rIGFzIFBhcnRpYWxTaWduU3RydWN0dXJlO1xuICAgICAgICAgIHJldHVybiBhd2FpdCBvYmouc3VibWl0KGZlZVBheWVyKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICBjb25zdCBvYmogPSBvayBhcyBDb21tb25TdHJ1Y3R1cmUgfCBNaW50U3RydWN0dXJlO1xuICAgICAgICAgIHJldHVybiBhd2FpdCBvYmouc3VibWl0KCk7XG4gICAgICAgIH1cbiAgICAgIH0sXG4gICAgICAoZXJyKSA9PiB7XG4gICAgICAgIHJldHVybiBlcnI7XG4gICAgICB9LFxuICAgICk7XG4gICAgaWYgKHJlcy5pc0Vycikge1xuICAgICAgcmV0dXJuIFJlc3VsdC5lcnIocmVzLmVycm9yKTtcbiAgICB9XG4gICAgcmV0dXJuIHJlcy52YWx1ZTtcbiAgfVxufVxuXG4vLy8gTXVsdGlwbGUgVHJhbnNhY3Rpb25CdWlsZGVyIC8vLy9cbmRlY2xhcmUgZ2xvYmFsIHtcbiAgLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLXVudXNlZC12YXJzICovXG4gIGludGVyZmFjZSBBcnJheTxUPiB7XG4gICAgc3VibWl0KGZlZVBheWVyPzogU2VjcmV0KTogUHJvbWlzZTxSZXN1bHQ8VHJhbnNhY3Rpb25TaWduYXR1cmUsIEVycm9yPj47XG4gIH1cbn1cblxuQXJyYXkucHJvdG90eXBlLnN1Ym1pdCA9IGFzeW5jIGZ1bmN0aW9uIChmZWVQYXllcj86IFNlY3JldCkge1xuICBpZiAoZmVlUGF5ZXIpIHtcbiAgICBsZXQgaSA9IDE7XG4gICAgZm9yIGF3YWl0IChjb25zdCBvYmogb2YgdGhpcykge1xuICAgICAgaWYgKG9iai5pc0Vycikge1xuICAgICAgICByZXR1cm4gb2JqO1xuICAgICAgfS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mFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ25hbWUnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLm5hbWUpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNOYW1lKG1ldGFkYXRhLm5hbWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc3ltYm9sJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5zeW1ib2wpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTeW1ib2wobWV0YWRhdGEuc3ltYm9sKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgICAgIGlmIChyZXMgJiYgcmVzLmlzRXJyKSB7XG4gICAgICAgICAgcmVzdWx0cy5wdXNoKC4uLnJlcy5lcnJvci5kZXRhaWxzKTtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgICBpZiAocmVzdWx0cy5sZW5ndGggPiAwKSB7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPVxuICAgICAgICAgICdDYXVnaHQgaW4gdGhlIHZhbGlkYXRpb24gZXJyb3JzLiBzZWUgaW5mb3JtYXRpb24gZS5nOiBlcnI8VmFsaWRhdG9yRXJyb3I+LmRldGFpbHMnO1xuICAgICAgICB0aHJvdyBuZXcgVmFsaWRhdG9y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JpbXBvcnRfd2ViMyIsICJOb2RlIiwgImltcG9ydF93ZWIzIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJDb21tb24iLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgImltcG9ydF93ZWIzIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJpbXBvcnRfd2ViMyIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgImltcG9ydF93ZWIzIiwgImltcG9ydF93ZWIzIiwgIkFjY291bnQiLCAiS2V5cGFpciIsICJicyIsICJPcmlnaW5hbCIsICJpbXBvcnRfd2ViMyIsICJBY2NvdW50IiwgIlBkYSIsICJCTiIsICJBY2NvdW50IiwgImltcG9ydF9iczU4IiwgIkFjY291bnQiLCAiYnMiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJSZXN1bHQiLCAiVmFsaWRhdG9yIiwgIk1lc3NhZ2UiLCAiQ29udmVydGVyIiwgIkNvbnZlcnRlciIsICJOZnQiLCAiQ29udmVydGVyIiwgIk1lbW8iLCAiQ29udmVydGVyIiwgIk1pbnQiLCAiQ29udmVydGVyIiwgIlJlZ3VsYXJOZnRNZXRhZGF0YSIsICJDb252ZXJ0ZXIiLCAiUHJvcGVydGllcyIsICJDb252ZXJ0ZXIiLCAiVXNlcyIsICJDb252ZXJ0ZXIiLCAiVG9rZW5NZXRhZGF0YSIsICJDb252ZXJ0ZXIiLCAiVHJhbnNmZXJDaGVja2VkIiwgIkNvbnZlcnRlciIsICJUcmFuc2ZlciIsICJDb252ZXJ0ZXIiXQp9Cg== \ No newline at end of file diff --git a/packages/converter/dist/index.mjs b/packages/converter/dist/index.mjs index 905b4985a..19015e079 100644 --- a/packages/converter/dist/index.mjs +++ b/packages/converter/dist/index.mjs @@ -578,22 +578,11 @@ var TransactionBuilder5; // ../global/src/index.ts import { Keypair as Keypair3, LAMPORTS_PER_SOL, PublicKey as PublicKey4 } from "@solana/web3.js"; -// ../account/src/associated.ts -import { - ASSOCIATED_TOKEN_PROGRAM_ID, - createAssociatedTokenAccountInstruction, - getAccount, - getAssociatedTokenAddressSync, - TOKEN_PROGRAM_ID, - TokenAccountNotFoundError, - TokenInvalidAccountOwnerError -} from "@solana/spl-token"; - // ../account/src/keypair.ts import { Keypair as Original, PublicKey as PublicKey2 } from "@solana/web3.js"; import bs from "bs58"; var Account; -((Account5) => { +((Account4) => { class Keypair4 { secret; pubkey; @@ -629,111 +618,16 @@ var Account; }); }; } - Account5.Keypair = Keypair4; + Account4.Keypair = Keypair4; })(Account || (Account = {})); -// ../account/src/associated.ts -var Account2; -((Account5) => { - let Associated; - ((Associated2) => { - const RETRY_OVER_LIMIT = 10; - const RETRY_SLEEP_TIME = 3; - const get = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const res = await (0, Associated2.makeOrCreateInstruction)( - mint, - owner, - new Account.Keypair({ secret: feePayer }).pubkey, - allowOwnerOffCurve - ); - if (!res.inst) { - return res.tokenAccount; - } - return new TransactionBuilder6.Common( - [res.inst], - [], - feePayer.toKeypair(), - res.tokenAccount - ); - }; - Associated2.retryGetOrCreate = async (mint, owner, feePayer) => { - let counter = 1; - while (counter < RETRY_OVER_LIMIT) { - try { - const inst = await get(mint, owner, feePayer, true); - if (inst && typeof inst === "string") { - debugLog("# associatedTokenAccount: ", inst); - return inst; - } else if (inst instanceof TransactionBuilder6.Common) { - (await inst.submit()).map( - async (ok) => { - await Node.confirmedSig(ok); - return inst.data; - }, - (err) => { - debugLog("# Error submit retryGetOrCreate: ", err); - throw err; - } - ); - } - } catch (e) { - debugLog(`# retry: ${counter} create token account: `, e); - debugLog(`# mint: ${mint}, owner: ${owner}, feePayer: ${feePayer}`); - } - await sleep(RETRY_SLEEP_TIME); - counter++; - } - throw Error(`retry action is over limit ${RETRY_OVER_LIMIT}`); - }; - Associated2.makeOrCreateInstruction = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const associatedTokenAccount = getAssociatedTokenAddressSync( - mint.toPublicKey(), - owner.toPublicKey(), - allowOwnerOffCurve, - TOKEN_PROGRAM_ID, - ASSOCIATED_TOKEN_PROGRAM_ID - ); - debugLog("# associatedTokenAccount: ", associatedTokenAccount.toString()); - try { - await getAccount( - Node.getConnection(), - associatedTokenAccount, - Node.getConnection().commitment, - TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst: void 0 - }; - } catch (error) { - if (!(error instanceof TokenAccountNotFoundError) && !(error instanceof TokenInvalidAccountOwnerError)) { - throw Error("Unexpected error"); - } - const payer = !feePayer ? owner : feePayer; - const inst = createAssociatedTokenAccountInstruction( - payer.toPublicKey(), - associatedTokenAccount, - owner.toPublicKey(), - mint.toPublicKey(), - TOKEN_PROGRAM_ID, - ASSOCIATED_TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst - }; - } - }; - })(Associated = Account5.Associated || (Account5.Associated = {})); -})(Account2 || (Account2 = {})); - // ../account/src/pda.ts import { PublicKey as PublicKey3 } from "@solana/web3.js"; import { PROGRAM_ID } from "@metaplex-foundation/mpl-token-metadata"; import { MPL_BUBBLEGUM_PROGRAM_ID } from "@metaplex-foundation/mpl-bubblegum"; import BN from "bn.js"; -var Account3; -((Account5) => { +var Account2; +((Account4) => { let Pda; ((Pda2) => { Pda2.getMetadata = (address) => { @@ -785,14 +679,13 @@ var Account3; ); return assetId.toString(); }; - })(Pda = Account5.Pda || (Account5.Pda = {})); -})(Account3 || (Account3 = {})); + })(Pda = Account4.Pda || (Account4.Pda = {})); +})(Account2 || (Account2 = {})); // ../account/src/index.ts -var Account4 = { - ...Account2, +var Account3 = { ...Account, - ...Account3 + ...Account2 }; // ../global/src/index.ts @@ -823,7 +716,7 @@ String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, op } return url; } - if (Account4.Keypair.isPubkey(addressOrSignature)) { + if (Account3.Keypair.isPubkey(addressOrSignature)) { if (explorer === "solanafm" /* SolanaFM */) { url = `${Constants.EXPLORER_SOLANAFM_URL}/address/${addressOrSignature}?cluster=${cluster}`; } else if (explorer === "xray" /* Xray */) { @@ -843,13 +736,13 @@ String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, op return url; }; String.prototype.toPublicKey = function() { - if (!Account4.Keypair.isPubkey(this.toString())) { + if (!Account3.Keypair.isPubkey(this.toString())) { throw Error(`No match KeyPair.PubKey: ${this.toString()}`); } return new PublicKey4(this.toString()); }; String.prototype.toKeypair = function() { - if (!Account4.Keypair.isSecret(this.toString())) { + if (!Account3.Keypair.isSecret(this.toString())) { throw Error(`No match KeyPair.Secret: ${this.toString()}`); } const decoded = bs2.decode(this.toString()); @@ -885,9 +778,6 @@ var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { console.log("[DEBUG]", data1, data2, data3, data4); } }; -var sleep = async (sec) => { - return new Promise((r) => setTimeout(r, sec * 1e3)); -}; var isPromise = (obj) => { return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; }; @@ -1511,4 +1401,4 @@ var Converter5 = { export { Converter5 as Converter }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2NvbGxlY3Rpb24udHMiLCAiLi4vc3JjL2NyZWF0b3JzLnRzIiwgIi4uL3NyYy9jb21wcmVzc2VkLW5mdC1tZXRhZGF0YS50cyIsICIuLi9zcmMvcm95YWx0eS50cyIsICIuLi8uLi9zdWl0ZS11dGlscy9zcmMvY29uc3RhbnRzLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2JhdGNoLnRzIiwgIi4uLy4uL25vZGUvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2NvbW1vbi50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9taW50LnRzIiwgIi4u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sLmRldjtcbiAgICAgIGRlZmF1bHQ6XG4gICAgICAgIHJldHVybiBDb25zdGFudHMuRW5kUG9pbnRVcmwubG9jYWxob3N0O1xuICAgIH1cbiAgfTtcblxuICBleHBvcnQgY29uc3Qgc3dpdGNoQnVuZGxyID0gKGVudjogc3RyaW5nKTogc3RyaW5nID0+IHtcbiAgICBzd2l0Y2ggKGVudikge1xuICAgICAgY2FzZSBDb25zdGFudHMuQ2x1c3Rlci5wcmQ6IHtcbiAgICAgICAgY29uc3QgdXJscyA9IENvbnN0YW50cy5CdW5kbHJVcmwucHJkLnNwbGl0KCcsJyk7XG4gICAgICAgIGNvbnN0IGluZGV4ID0gRGF0ZS5ub3coKSAlIHVybHMubGVuZ3RoO1xuICAgICAgICByZXR1cm4gdXJsc1tpbmRleF07XG4gICAgICB9XG4gICAgICBkZWZhdWx0OiB7XG4gICAgICAgIHJldHVybiBDb25zdGFudHMuQnVuZGxyVXJsLmRldjtcbiAgICAgIH1cbiAgICB9XG4gIH07XG5cbiAgZXhwb3J0IGNvbnN0IHN3aXRjaERhc0FwaSA9IChlbnY6IHN0cmluZyk6IHN0cmluZyA9PiB7XG4gICAgc3dpdGNoIChlbnYpIHtcbiAgICAgIGNhc2UgQ29uc3RhbnRzLkNsdXN0ZXIucHJkOiB7XG4gICAgICAgIGlmIChkYXNBcGlVcmwubGVuZ3RoIDwgMSkge1xuICAgICAgICAgIHRocm93IEVycm9yKENvbnN0YW50cy5XYXJubmluZ01lc3NhZ2UuREFTX0FQSV9VUkwpO1xuICAgICAgICB9XG4gICAgICAgIGNvbnN0IHVybHMgPSBDb25zdGFudHMuQnVuZGxyVXJsLnByZC5zcGxpdCgnLCcpO1xuICAgICAgICBjb25zdCBpbmRleCA9IERhdGUubm93KCkgJSB1cmxzLmxlbmd0aDtcbiAgICAgICAgcmV0dXJuIHVybHNbaW5kZXhdO1xuICAgICAgfVxuICAgICAgZGVmYXVsdDoge1xuICAgICAgICBjb25zdCB1cmxzID0gQ29uc3Rh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gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyOiBTZWNyZXQsXG4gICAgICBhbGxvd093bmVyT2ZmQ3VydmUgPSBmYWxzZSxcbiAgICApOiBQcm9taXNlPHN0cmluZyB8IENvbW1vblN0cnVjdHVyZTxQdWJrZXk+PiA9PiB7XG4gICAgICBjb25zdCByZXMgPSBhd2FpdCBtYWtlT3JDcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIG5ldyBLZXlwYWlyLktleXBhaXIoeyBzZWNyZXQ6IGZlZVBheWVyIH0pLnB1YmtleSxcbiAgICAgICAgYWxsb3dPd25lck9mZkN1cnZlLFxuICAgICAgKTtcblxuICAgICAgaWYgKCFyZXMuaW5zdCkge1xuICAgICAgICByZXR1cm4gcmVzLnRva2VuQWNjb3VudDtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uPFB1YmtleT4oXG4gICAgICAgIFtyZXMuaW5zdF0sXG4gICAgICAgIFtdLFxuICAgICAgICBmZWVQYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgcmVzLnRva2VuQWNjb3VudCEsXG4gICAgICApO1xuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiBSZXRyeSBmdW5jdGlvbiBpZiBjcmVhdGUgbmV3IHRva2VuIGFjY291aW50XG4gICAgICpcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gbWludFxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBvd25lclxuICAgICAqIEBwYXJhbSB7U2VjcmV0fSBmZWVQYXllclxuICAgICAqIEByZXR1cm5zIFByb21pc2U8c3RyaW5nPlxuICAgICAqL1xuICAgIGV4cG9ydCBjb25zdCByZXRyeUdldE9yQ3JlYXRlID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyOiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxzdHJpbmc+ID0+IHtcbiAgICAgIGxldCBjb3VudGVyID0gMTtcbiAgICAgIHdoaWxlIChjb3VudGVyIDwgUkVUUllfT1ZFUl9MSU1JVCkge1xuICAgICAgICB0cnkge1xuICAgICAgICAgIGNvbnN0IGluc3QgPSBhd2FpdCBnZXQobWludCwgb3duZXIsIGZlZVBheWVyLCB0cnVlKTtcblxuICAgICAgICAgIGlmIChpbnN0ICYmIHR5cGVvZiBpbnN0ID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgaW5zdCk7XG4gICAgICAgICAgICByZXR1cm4gaW5zdDtcbiAgICAgICAgICB9IGVsc2UgaWYgKGluc3QgaW5zdGFuY2VvZiBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uKSB7XG4gICAgICAgICAgICAoYXdhaXQgaW5zdC5zdWJtaXQoKSkubWFwKFxuICAgICAgICAgICAgICBhc3luYyAob2s6IHN0cmluZykgPT4ge1xuICAgICAgICAgICAgICAgIGF3YWl0IE5vZGUuY29uZmlybWVkU2lnKG9rKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gaW5zdC5kYXRhO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAoZXJyOiBFcnJvcikgPT4ge1xuICAgICAgICAgICAgICAgIGRlYnVnTG9nKCcjIEVycm9yIHN1Ym1pdCByZXRyeUdldE9yQ3JlYXRlOiAnLCBlcnIpO1xuICAgICAgICAgICAgICAgIHRocm93IGVycjtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgZGVidWdMb2coYCMgcmV0cnk6ICR7Y291bnRlcn0gY3JlYXRlIHRva2VuIGFjY291bnQ6IG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AgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSxcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3QsXG4gICAgICAgIH07XG4gICAgICB9XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IEtleXBhaXIgYXMgT3JpZ2luYWwsIFB1YmxpY0tleSB9IGZyb20gJ0Bzb2xhbmEvd2ViMy5qcyc7XG5pbXBvcnQgeyBQdWJrZXksIFNlY3JldCB9IGZyb20gJ34vdHlwZXMvYWNjb3VudCc7XG5pbXBvcnQgYnMgZnJvbSAnYnM1OCc7XG5cbmV4cG9ydCBuYW1lc3BhY2UgQWNjb3VudCB7XG4gIGV4cG9ydCBjbGFzcyBLZXlwYWlyIHtcbiAgICBzZWNyZXQ6IFNlY3JldDtcbiAgICBwdWJrZXk6IFB1YmtleTtcblxuICAgIGNvbnN0cnVjdG9yKHBhcmFtczogeyBwdWJrZXk/OiBQdWJrZXk7IHNlY3JldDogU2VjcmV0IH0pIHtcbiAgICAgIGlmICghcGFyYW1zLnB1YmtleSkge1xuICAgICAgICBjb25zdCBrZXlwYWlyID0gcGFyYW1zLnNlY3JldC50b0tleXBhaXIoKTtcbiAgICAgICAgdGhpcy5wdWJrZXkgPSBrZXlwYWlyL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PSBpc1JveWFsdHkobWV0YWRhdGEucm95YWx0eSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ25hbWUnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLm5hbWUpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNOYW1lKG1ldGFkYXRhLm5hbWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc3ltYm9sJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5zeW1ib2wpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTeW1ib2wobWV0YWRhdGEuc3ltYm9sKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgICAgIGlmIChyZXMgJiYgcmVzLmlzRXJyKSB7XG4gICAgICAgICAgcmVzdWx0cy5wdXNoKC4uLnJlcy5lcnJvci5kZXRhaWxz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wZXMvcmVndWxhci1uZnQnO1xuaW1wb3J0IHsgSW50ZXJuYWxDcmVhdG9ycyB9IGZyb20gJ34vdHlwZXMvY29udmVydGVyJztcblxuZXhwb3J0IG5hbWVzcGFjZSBDb252ZXJ0ZXIge1xuICBleHBvcnQgbmFtZXNwYWNlIENyZWF0b3JzIHtcbiAgICBleHBvcnQgY29uc3QgaW50b0luZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IE9wdGlvbjxJbnRlcm5hbENyZWF0b3JzW10+ID0+IHtcbiAgICAgIGlmICghaW5wdXQpIHtcbiAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICB9XG4gICAgICByZXR1cm4gaW5wdXQubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvQ29tcHJlc3NlZE5mdEluZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IEludGVybmFsQ3JlYXRvcnNbXSA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBbXTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBpbnB1dCEubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuIC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W1vbltdIHwgTWludC5NaW50W10sXG4gICAgKTogUHJvbWlzZTxSZXN1bHQ8VHJhbnNhY3Rpb25TaWduYXR1cmUsIEVycm9yPj4gPT4ge1xuICAgICAgcmV0dXJuIFRyeShhc3luYyAoKSA9PiB7XG4gICAgICAgIGxldCBpID0gMDtcbiAgICAgICAgZm9yIChjb25zdCBhIG9mIGFycikge1xuICAgICAgICAgIGlmICghYS5pbnN0cnVjdGlvbnMgJiYgIWEuc2lnbmVycykge1xuICAgICAgICAgICAgdGhyb3cgRXJyb3IoXG4gICAgICAgICAgICAgIGBvbmx5IEluc3RydWN0aW9uIG9iamVjdCB0aGF0IGNhbiB1c2UgYmF0Y2hTdWJtaXQoKS5cbiAgICAgICAgICAgIEluZGV4OiAke2l9LCBTZXQgdmFsdWU6ICR7SlNPTi5zdHJpbmdpZnkoYSl9YCxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIGkrKztcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IGluc3RydWN0aW9ucyA9IGFyci5mbGF0TWFwKChhKSA9PiBhLmluc3RydWN0aW9ucyk7XG4gICAgICAgIGNvbnN0IHNpZ25lcnMgPSBhcnIuZmxhdE1hcCgoYSkgPT4gYS5zaWduZXJzKTtcbiAgICAgICAgY29uc3QgZmVlUGF5ZXJzID0gYXJyLmZpbHRlcigoYSkgPT4gYS5mZWVQYXllciAhPT0gdW5kZWZpbmVkKTtcbiAgICAgICAgbGV0IGZlZVBheWVyID0gc2lnbmVyc1swXTtcbiAgICAgICAgaWYgKGZlZVBheWVycy5sZW5ndGggPiAwICYmIGZlZVBheWVyc1swXS5mZWVQYXllcikge1xuICAgICAgICAgIGZlZVBheWVyID0gZmVlUGF5ZXJzWzBdLmZlZVBheWVyO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgdHJhbnNhY3Rpb24gPSBuZXcgVHJhbnNhY3Rpb24oKTtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA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lX2Jhc2lzX3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEuc3ltYm9sKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU3ltYm9sKG1ldGFkYXRhLnN5bWJvbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAocmVzICYmIHJlcy5pc0Vycikge1xuICAgICAgICAgIHJlc3VsdHMucHVzaCguLi5yZXMuZXJyb3IuZGV0YWlscyk7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgICAgaWYgKHJlc3VsdHMubGVuZ3RoID4gMCkge1xuICAgICAgICBjb25zdCBtZXNzYWdlID1cbiAgICAgICAgICAnQ2F1Z2h0IGluIHRoZSB2YWxpZGF0aW9uIGVycm9ycy4gc2VlIGluZm9ybWF0aW9uIGUuZzogZXJyPFZhbGlkYXRvckVyc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ICJBY2NvdW50IiwgIlB1YmxpY0tleSIsICJLZXlwYWlyIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiUmVzdWx0IiwgIlZhbGlkYXRvciIsICJNZXNzYWdlIiwgIkNvbnZlcnRlciIsICJDb252ZXJ0ZXIiLCAiTmZ0IiwgIkNvbnZlcnRlciIsICJNZW1vIiwgIkNvbnZlcnRlciIsICJNaW50IiwgIkNvbnZlcnRlciIsICJSZWd1bGFyTmZ0TWV0YWRhdGEiLCAiQ29udmVydGVyIiwgIlByb3BlcnRpZXMiLCAiQ29udmVydGVyIiwgIlVzZXMiLCAiQ29udmVydGVyIiwgIlRva2VuTWV0YWRhdGEiLCAiQ29udmVydGVyIiwgIlRyYW5zZmVyQ2hlY2tlZCIsICJDb252ZXJ0ZXIiLCAiVHJhbnNmZXIiLCAiQ29udmVydGVyIl0KfQo= \ No newline at end of file diff --git a/packages/das-api/dist/index.js b/packages/das-api/dist/index.js index b4a423ac9..131c3b918 100644 --- a/packages/das-api/dist/index.js +++ b/packages/das-api/dist/index.js @@ -479,14 +479,11 @@ var TransactionBuilder5; // ../global/src/index.ts var import_web39 = require("@solana/web3.js"); -// ../account/src/associated.ts -var import_spl_token = require("@solana/spl-token"); - // ../account/src/keypair.ts var import_web37 = require("@solana/web3.js"); var import_bs58 = __toESM(require("bs58")); var Account; -((Account5) => { +((Account4) => { class Keypair4 { secret; pubkey; @@ -522,111 +519,16 @@ var Account; }); }; } - Account5.Keypair = Keypair4; + Account4.Keypair = Keypair4; })(Account || (Account = {})); -// ../account/src/associated.ts -var Account2; -((Account5) => { - let Associated; - ((Associated2) => { - const RETRY_OVER_LIMIT = 10; - const RETRY_SLEEP_TIME = 3; - const get = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const res = await (0, Associated2.makeOrCreateInstruction)( - mint, - owner, - new Account.Keypair({ secret: feePayer }).pubkey, - allowOwnerOffCurve - ); - if (!res.inst) { - return res.tokenAccount; - } - return new TransactionBuilder6.Common( - [res.inst], - [], - feePayer.toKeypair(), - res.tokenAccount - ); - }; - Associated2.retryGetOrCreate = async (mint, owner, feePayer) => { - let counter = 1; - while (counter < RETRY_OVER_LIMIT) { - try { - const inst = await get(mint, owner, feePayer, true); - if (inst && typeof inst === "string") { - debugLog("# associatedTokenAccount: ", inst); - return inst; - } else if (inst instanceof TransactionBuilder6.Common) { - (await inst.submit()).map( - async (ok) => { - await Node.confirmedSig(ok); - return inst.data; - }, - (err) => { - debugLog("# Error submit retryGetOrCreate: ", err); - throw err; - } - ); - } - } catch (e) { - debugLog(`# retry: ${counter} create token account: `, e); - debugLog(`# mint: ${mint}, owner: ${owner}, feePayer: ${feePayer}`); - } - await sleep(RETRY_SLEEP_TIME); - counter++; - } - throw Error(`retry action is over limit ${RETRY_OVER_LIMIT}`); - }; - Associated2.makeOrCreateInstruction = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const associatedTokenAccount = (0, import_spl_token.getAssociatedTokenAddressSync)( - mint.toPublicKey(), - owner.toPublicKey(), - allowOwnerOffCurve, - import_spl_token.TOKEN_PROGRAM_ID, - import_spl_token.ASSOCIATED_TOKEN_PROGRAM_ID - ); - debugLog("# associatedTokenAccount: ", associatedTokenAccount.toString()); - try { - await (0, import_spl_token.getAccount)( - Node.getConnection(), - associatedTokenAccount, - Node.getConnection().commitment, - import_spl_token.TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst: void 0 - }; - } catch (error) { - if (!(error instanceof import_spl_token.TokenAccountNotFoundError) && !(error instanceof import_spl_token.TokenInvalidAccountOwnerError)) { - throw Error("Unexpected error"); - } - const payer = !feePayer ? owner : feePayer; - const inst = (0, import_spl_token.createAssociatedTokenAccountInstruction)( - payer.toPublicKey(), - associatedTokenAccount, - owner.toPublicKey(), - mint.toPublicKey(), - import_spl_token.TOKEN_PROGRAM_ID, - import_spl_token.ASSOCIATED_TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst - }; - } - }; - })(Associated = Account5.Associated || (Account5.Associated = {})); -})(Account2 || (Account2 = {})); - // ../account/src/pda.ts var import_web38 = require("@solana/web3.js"); var import_mpl_token_metadata = require("@metaplex-foundation/mpl-token-metadata"); var import_mpl_bubblegum = require("@metaplex-foundation/mpl-bubblegum"); var import_bn = __toESM(require("bn.js")); -var Account3; -((Account5) => { +var Account2; +((Account4) => { let Pda; ((Pda2) => { Pda2.getMetadata = (address) => { @@ -678,14 +580,13 @@ var Account3; ); return assetId.toString(); }; - })(Pda = Account5.Pda || (Account5.Pda = {})); -})(Account3 || (Account3 = {})); + })(Pda = Account4.Pda || (Account4.Pda = {})); +})(Account2 || (Account2 = {})); // ../account/src/index.ts -var Account4 = { - ...Account2, +var Account3 = { ...Account, - ...Account3 + ...Account2 }; // ../global/src/index.ts @@ -716,7 +617,7 @@ String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, op } return url; } - if (Account4.Keypair.isPubkey(addressOrSignature)) { + if (Account3.Keypair.isPubkey(addressOrSignature)) { if (explorer === "solanafm" /* SolanaFM */) { url = `${Constants.EXPLORER_SOLANAFM_URL}/address/${addressOrSignature}?cluster=${cluster}`; } else if (explorer === "xray" /* Xray */) { @@ -736,13 +637,13 @@ String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, op return url; }; String.prototype.toPublicKey = function() { - if (!Account4.Keypair.isPubkey(this.toString())) { + if (!Account3.Keypair.isPubkey(this.toString())) { throw Error(`No match KeyPair.PubKey: ${this.toString()}`); } return new import_web39.PublicKey(this.toString()); }; String.prototype.toKeypair = function() { - if (!Account4.Keypair.isSecret(this.toString())) { + if (!Account3.Keypair.isSecret(this.toString())) { throw Error(`No match KeyPair.Secret: ${this.toString()}`); } const decoded = import_bs582.default.decode(this.toString()); @@ -778,9 +679,6 @@ var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { console.log("[DEBUG]", data1, data2, data3, data4); } }; -var sleep = async (sec) => { - return new Promise((r) => setTimeout(r, sec * 1e3)); -}; var isPromise = (obj) => { return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; }; @@ -1709,4 +1607,4 @@ var DasApi3 = { 0 && (module.exports = { DasApi }); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uLy4uL3N1aXRlLXV0aWxzL3NyYy9jb25zdGFudHMudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvYmF0Y2gudHMiLCAiLi4vLi4vbm9kZS9zcmMvaW5kZXgudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY29tbW9uLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL21pbnQudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvcGFydGlhbC1zaWduLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2NhbGN1bGF0ZS10eHNpemUudHMiLCAiLi4vLi4vZ2xvYmFsL3NyYy9pbmRleC50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9hc3NvY2lhdGVkLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2tleXBhaXIudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvcGRhLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3N1aXRlLXV0aWxzL3NyYy9zaGFyZWQudHMiLCAiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL3Jlc3VsdC50cyIsICIuLi8uLi9jb252ZXJ0ZXIvc3JjL2NvbGxlY3Rpb24udHMiLCAiLi4vLi4vY29udmVydGVyL3NyYy9jcmVhdG9ycy50cyIsIC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G4gICAgICAgICAgICAgICAgYXdhaXQgTm9kZS5jb25maXJtZWRTaWcob2spO1xuICAgICAgICAgICAgICAgIHJldHVybiBpbnN0LmRhdGE7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIChlcnI6IEVycm9yKSA9PiB7XG4gICAgICAgICAgICAgICAgZGVidWdMb2coJyMgRXJyb3Igc3VibWl0IHJldHJ5R2V0T3JDcmVhdGU6ICcsIGVycik7XG4gICAgICAgICAgICAgICAgdGhyb3cgZXJyO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICBkZWJ1Z0xvZyhgIyByZXRyeTogJHtjb3VudGVyfSBjcmVhdGUgdG9rZW4gYWNjb3VudDogYCwgZSk7XG4gICAgICAgICAgZGVidWdMb2coYCMgbWludDogJHttaW50fSwgb3duZXI6ICR7b3duZXJ9LCBmZWVQYXllcjogJHtmZWVQYXllcn1gKTtcbiAgICAgICAgfVxuICAgICAgICBhd2FpdCBzbGVlcChSRVRSWV9TTEVFUF9USU1FKTtcbiAgICAgICAgY291bnRlcisrO1xuICAgICAgfVxuICAgICAgdGhyb3cgRXJyb3IoYHJldHJ5IGFjdGlvbiBpcyBvdmVyIGxpbWl0ICR7UkVUUllfT1ZFUl9MSU1JVH1gKTtcbiAgICB9O1xuXG4gICAgLyoqXG4gICAgICogW01haW4gbG9naWNdR2V0IEFzc29jaWF0ZWQgdG9rZW4gQWNjb3VudC5cbiAgICAgKiBpZiBub3QgY3JlYXRlZCwgY3JlYXRlIG5ldyB0b2tlbiBhY2NvdWludFxuICAgICAqXG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG1pbnRcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gb3duZXJcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gZmVlUGF5ZXJcbiAgICAgKiBAcmV0dXJucyBQcm9taXNlPHN0cmluZz5cbiAgIC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gICAgICB0b2tlbkFjY291bnQ6IGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSxcbiAgICAgICAgICBpbnN0OiB1bmRlZmluZWQsXG4gICAgICAgIH07XG4gICAgICB9IGNhdGNoIChlcnJvcjogdW5rbm93bikge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuQWNjb3VudE5vdEZvdW5kRXJyb3IpICYmXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuSW52YWxpZEFjY291bnRPd25lckVycm9yKVxuICAgICAgICApIHtcbiAgICAgICAgICB0aHJvdyBFcnJvcignVW5leHBlY3RlZCBlcnJvcicpO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgcGF5ZXIgPSAhZmVlUGF5ZXIgPyBvd25lciA6IGZlZVBheWVyO1xuXG4gICAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVBc3NvY2lhdGVkVG9rZW5BY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgcGF5ZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdCxcbiAgICAgICAgfTtcbiAgICAgIH1cbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHsgS2V5cGFpciBhcyBPcmlnaW5hbCwgUHVibGljS2V5IH0gZnJvbSAnQHNvbGFuY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VyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ25hbWUnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLm5hbWUpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNOYW1lKG1ldGFkYXRhLm5hbWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc3ltYm9sJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5zeW1ib2wpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTeW1ib2wobWV0YWRhdGEuc3ltYm9sKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgICAgIGlmIChyZXMgJiYgcmVzLmlzRXJyKSB7XG4gICAgICAgICAgcmVzdWx0cy5wdXNoKC4uLnJlcy5lcnJvci5kZXRhaWxzKTtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgICBpZiAocmVzdWx0cy5sZW5ndGggPiAwKSB7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPVxuICAgICAgICAgICdDYXVnaHQgaW4gdGhlIHZhbGlkYXRpb24gZXJyb3JzLiBzZWUgaW5mb3JtYXRpb24gZS5nOiBlcnI8VmFsaWRhdG9yRXJyb3I+LmRldGFpbHMnO1xuICAgICAgICB0aHJvdyBuZXcgVmFsa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2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvQ29tcHJlc3NlZE5mdEluZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IEludGVybmFsQ3JlYXRvcnNbXSA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBbXTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBpbnB1dCEubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlciA9IChcbiAgICAgIG91dHB1dDogT3B0aW9uPEludGVybmFsQ3JlYXRvcnNbXT4sXG4gICAgKTogQ3JlYXRvcnNbXSB8IHVuZGVmaW5lZCA9PiB7XG4gICAgICBpZiAoIW91dHB1dCkge1xuICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gb3V0cHV0Lm1hcCgoZGF0YSkgPT4ge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIGFkZHJlc3M6IGRhdGEuYWRkcmVzcy50b1N0cmluZygpLFxuICAgICAgICAgIHNoYXJlOiBkYXRhLnNoYXJlLFxuICAgICAgICAgIHZlcmlmaWVkOiBkYXRhLnZlcmlmaWVkLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IENvbnZlcn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AoIWlucHV0IHx8ICFpbnB1dC5maWxlcykge1xuICAgICAgICByZXR1cm4ge307XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGZpbGVzID0gYXdhaXQgUHJvbWlzZS5hbGwoXG4gICAgICAgIGlucHV0LmZpbGVzLm1hcChhc3luYyAoZmlsZSkgPT4ge1xuICAgICAgICAgIGlmICghZmlsZS5maWxlUGF0aCkge1xuICAgICAgICAgICAgcmV0dXJuIHt9O1xuICAgICAgICAgIH1cbiAgICAgICAgICBjb25zdCByZXMgPSBhd2FpdCBjYWxsYmFja0Z1bmMoZmlsZS5maWxlUGF0aCwgc3RvcmFnZVR5cGUsIGZlZVBheWVyKTtcbiAgICAgICAgICBpZiAocmVzLmlzRXJyKSB7XG4gICAgICAgICAgICB0aHJvdyBFcnJvcihyZXMuZXJyb3IubWVzc2FnZSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBvdmVyd3JpdGVPYmplY3QoZmlsZSwgW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBleGlzdHNLZXk6ICdmaWxlUGF0aCcsXG4gICAgICAgICAgICAgIHdpbGw6IHsga2V5OiAndXJpJywgdmFsdWU6IHJlcy52YWx1ZSB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICBdKTtcbiAgICAgICAgfSksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHsgLi4uaW5wdXQsIGZpbGVzIH0gYXMgUHJvcGVydGllcztcbiAgICB9O1xuICB9XG59XG4iLCAiLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLXVudXNlZC12YXJzICovXG5pbXBvcnQgeyBPcHRpb24sIFVzZXMgfSBmcm9tICd+L3R5cGVzL3JlZ3VsYXItbmZ0JztcblxuZXhwb3J0IG5hbWVzcGFjZSBDb252ZXJ0ZXIge1xuICBleHBvcnQgbmFtZXNwYWNlIFVzZXMge1xuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlclNpZGUgPSAob3V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ICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLmltYWdlKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzSW1hZ2VVcmwobWV0YWRhdGEuaW1hZ2UpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAncm95YWx0eSc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnJveWFsdHkpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNSb3lhbHR5KG1ldGFkYXRhLnJveWFsdHkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWF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ICAgY29uc3QgaXRlbXMgPSBhc3NldHMudmFsdWUuaXRlbXM7XG5cbiAgICBjb25zdCBtZXRhZGF0YXMgPSBhd2FpdCBQcm9taXNlLmFsbChcbiAgICAgIGl0ZW1zXG4gICAgICAgIC5maWx0ZXIoKGl0ZW0pID0+IGl0ZW0uY29tcHJlc3Npb24uY29tcHJlc3NlZCA9PT0gaXNDb21wcmVzc2VkKVxuICAgICAgICAubWFwKGFzeW5jIChpdGVtKSA9PiB7XG4gICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgIGNvbnN0IG9mZmNoYWluOiBPZmZjaGFpbiA9IGF3YWl0IGZldGNoT2ZmY2hhaW4oXG4gICAgICAgICAgICAgIGl0ZW0uY29udGVudC5qc29uX3VyaSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgICBjb25zdCBtZXJnZWQgPSB7XG4gICAgICAgICAgICAgIG9uY2hhaW46IGl0ZW0sXG4gICAgICAgICAgICAgIG9mZmNoYWluOiBvZmZjaGFpbixcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICByZXR1cm4gQ29udmVydGVyLk5mdC5pbnRvVXNlcihtZXJnZWQpO1xuICAgICAgICAgIH0gY2F0Y2ggKGVycikge1xuICAgICAgICAgICAgZGVidWdMb2coJyMgRmFpbGVkIGZldGNoIG9mZmNoYWluIHVybDogJywgaXRlbS5jb250ZW50Lmpzb25fdXJpKTtcbiAgICAgICAgICAgIHJldHVybiBDb252ZXJ0ZXIuTmZ0LmludG9Vc2VyKHtcbiAgICAgICAgICAgICAgb25jaGFpbjogaXRlbSxcbiAgICAgICAgICAgICAgb2ZmY2hhaW46IHt9LFxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfVxuICAgICAgICB9KSxcbiAgICApO1xuICAgIHJldHVybiB7XG4gICAgICBwYWdlOiBhc3NldHMudmFsdWUucGFnZSxcbiAgICAgIHRvdGFsOiBhc3NldHMudmFsdWUudG90YWwsXG4gICAgICBsaW1pdDogYXNzZXRzLnZhbH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ImJzIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiUmVzdWx0IiwgIkNvbnZlcnRlciIsICJDb2xsZWN0aW9uIiwgIkNvbGxlY3Rpb25NaW50IiwgIkNvbnZlcnRlciIsICJDcmVhdG9ycyIsICJDb252ZXJ0ZXIiLCAiQ29tcHJlc3NlZE5mdE1ldGFkYXRhIiwgIkNvbnZlcnRlciIsICJSb3lhbHR5IiwgIkNvbnZlcnRlciIsICJOZnQiLCAiQ29udmVydGVyIiwgIk1lbW8iLCAiQ29udmVydGVyIiwgIk1pbnQiLCAiQ29udmVydGVyIiwgIlJlZ3VsYXJOZnRNZXRhZGF0YSIsICJDb252ZXJ0ZXIiLCAiUHJvcGVydGllcyIsICJDb252ZXJ0ZXIiLCAiVXNlcyIsICJDb252ZXJ0ZXIiLCAiVG9rZW5NZXRhZGF0YSIsICJDb252ZXJ0ZXIiLCAiVHJhbnNmZXJDaGVja2VkIiwgIkNvbnZlcnRlciIsICJUcmFuc2ZlciIsICJDb252ZXJ0ZXIiLCAiVmFsaWRhdG9yIiwgIk1lc3NhZ2UiLCAiQ29udmVydGVyIiwgIkRhc0FwaSIsICJEYXNBcGkiLCAiQ29udmVydGVyIiwgIkRhc0FwaSJdCn0K \ No newline at end of file diff --git a/packages/das-api/dist/index.mjs b/packages/das-api/dist/index.mjs index 2561af443..ad68faaeb 100644 --- a/packages/das-api/dist/index.mjs +++ b/packages/das-api/dist/index.mjs @@ -454,22 +454,11 @@ var TransactionBuilder5; // ../global/src/index.ts import { Keypair as Keypair3, LAMPORTS_PER_SOL, PublicKey as PublicKey4 } from "@solana/web3.js"; -// ../account/src/associated.ts -import { - ASSOCIATED_TOKEN_PROGRAM_ID, - createAssociatedTokenAccountInstruction, - getAccount, - getAssociatedTokenAddressSync, - TOKEN_PROGRAM_ID, - TokenAccountNotFoundError, - TokenInvalidAccountOwnerError -} from "@solana/spl-token"; - // ../account/src/keypair.ts import { Keypair as Original, PublicKey as PublicKey2 } from "@solana/web3.js"; import bs from "bs58"; var Account; -((Account5) => { +((Account4) => { class Keypair4 { secret; pubkey; @@ -505,111 +494,16 @@ var Account; }); }; } - Account5.Keypair = Keypair4; + Account4.Keypair = Keypair4; })(Account || (Account = {})); -// ../account/src/associated.ts -var Account2; -((Account5) => { - let Associated; - ((Associated2) => { - const RETRY_OVER_LIMIT = 10; - const RETRY_SLEEP_TIME = 3; - const get = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const res = await (0, Associated2.makeOrCreateInstruction)( - mint, - owner, - new Account.Keypair({ secret: feePayer }).pubkey, - allowOwnerOffCurve - ); - if (!res.inst) { - return res.tokenAccount; - } - return new TransactionBuilder6.Common( - [res.inst], - [], - feePayer.toKeypair(), - res.tokenAccount - ); - }; - Associated2.retryGetOrCreate = async (mint, owner, feePayer) => { - let counter = 1; - while (counter < RETRY_OVER_LIMIT) { - try { - const inst = await get(mint, owner, feePayer, true); - if (inst && typeof inst === "string") { - debugLog("# associatedTokenAccount: ", inst); - return inst; - } else if (inst instanceof TransactionBuilder6.Common) { - (await inst.submit()).map( - async (ok) => { - await Node.confirmedSig(ok); - return inst.data; - }, - (err) => { - debugLog("# Error submit retryGetOrCreate: ", err); - throw err; - } - ); - } - } catch (e) { - debugLog(`# retry: ${counter} create token account: `, e); - debugLog(`# mint: ${mint}, owner: ${owner}, feePayer: ${feePayer}`); - } - await sleep(RETRY_SLEEP_TIME); - counter++; - } - throw Error(`retry action is over limit ${RETRY_OVER_LIMIT}`); - }; - Associated2.makeOrCreateInstruction = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const associatedTokenAccount = getAssociatedTokenAddressSync( - mint.toPublicKey(), - owner.toPublicKey(), - allowOwnerOffCurve, - TOKEN_PROGRAM_ID, - ASSOCIATED_TOKEN_PROGRAM_ID - ); - debugLog("# associatedTokenAccount: ", associatedTokenAccount.toString()); - try { - await getAccount( - Node.getConnection(), - associatedTokenAccount, - Node.getConnection().commitment, - TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst: void 0 - }; - } catch (error) { - if (!(error instanceof TokenAccountNotFoundError) && !(error instanceof TokenInvalidAccountOwnerError)) { - throw Error("Unexpected error"); - } - const payer = !feePayer ? owner : feePayer; - const inst = createAssociatedTokenAccountInstruction( - payer.toPublicKey(), - associatedTokenAccount, - owner.toPublicKey(), - mint.toPublicKey(), - TOKEN_PROGRAM_ID, - ASSOCIATED_TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst - }; - } - }; - })(Associated = Account5.Associated || (Account5.Associated = {})); -})(Account2 || (Account2 = {})); - // ../account/src/pda.ts import { PublicKey as PublicKey3 } from "@solana/web3.js"; import { PROGRAM_ID } from "@metaplex-foundation/mpl-token-metadata"; import { MPL_BUBBLEGUM_PROGRAM_ID } from "@metaplex-foundation/mpl-bubblegum"; import BN from "bn.js"; -var Account3; -((Account5) => { +var Account2; +((Account4) => { let Pda; ((Pda2) => { Pda2.getMetadata = (address) => { @@ -661,14 +555,13 @@ var Account3; ); return assetId.toString(); }; - })(Pda = Account5.Pda || (Account5.Pda = {})); -})(Account3 || (Account3 = {})); + })(Pda = Account4.Pda || (Account4.Pda = {})); +})(Account2 || (Account2 = {})); // ../account/src/index.ts -var Account4 = { - ...Account2, +var Account3 = { ...Account, - ...Account3 + ...Account2 }; // ../global/src/index.ts @@ -699,7 +592,7 @@ String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, op } return url; } - if (Account4.Keypair.isPubkey(addressOrSignature)) { + if (Account3.Keypair.isPubkey(addressOrSignature)) { if (explorer === "solanafm" /* SolanaFM */) { url = `${Constants.EXPLORER_SOLANAFM_URL}/address/${addressOrSignature}?cluster=${cluster}`; } else if (explorer === "xray" /* Xray */) { @@ -719,13 +612,13 @@ String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, op return url; }; String.prototype.toPublicKey = function() { - if (!Account4.Keypair.isPubkey(this.toString())) { + if (!Account3.Keypair.isPubkey(this.toString())) { throw Error(`No match KeyPair.PubKey: ${this.toString()}`); } return new PublicKey4(this.toString()); }; String.prototype.toKeypair = function() { - if (!Account4.Keypair.isSecret(this.toString())) { + if (!Account3.Keypair.isSecret(this.toString())) { throw Error(`No match KeyPair.Secret: ${this.toString()}`); } const decoded = bs2.decode(this.toString()); @@ -761,9 +654,6 @@ var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { console.log("[DEBUG]", data1, data2, data3, data4); } }; -var sleep = async (sec) => { - return new Promise((r) => setTimeout(r, sec * 1e3)); -}; var isPromise = (obj) => { return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; }; @@ -1694,4 +1584,4 @@ var DasApi3 = { export { DasApi3 as DasApi }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9iYXRjaC50cyIsICIuLi8uLi9ub2RlL3NyYy9pbmRleC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jb21tb24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvbWludC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9wYXJ0aWFsLXNpZ24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY2FsY3VsYXRlLXR4c2l6ZS50cyIsICIuLi8uLi9nbG9iYWwvc3JjL2luZGV4LnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2Fzc29jaWF0ZWQudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMva2V5cGFpci50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9wZGEudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvaW5kZXgudHMiLCAiLi4v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N0cnVjdGlvbnMucmVkdWNlKChhY2MsIGl4KSA9PiB7XG4gICAgICBpeC5rZXlzLmZvckVhY2goKHsgcHVia2V5LCBpc1NpZ25lciB9KSA9PiB7XG4gICAgICAgIGNvbnN0IHBrID0gcHVia2V5LnRvQmFzZTU4KCk7XG4gICAgICAgIGlmIChpc1NpZ25lcikgc2lnbmVycy5hZGQocGspO1xuICAgICAgICBhY2NvdW50cy5hZGQocGspO1xuICAgICAgfSk7XG5cbiAgICAgIGFjY291bnRzLmFkZChpeC5wcm9ncmFtSWQudG9CYXNlNTgoKSk7XG5cbiAgICAgIGNvbnN0IG5JbmRleGVzID0gaXgua2V5cy5sZW5ndGg7XG4gICAgICBjb25zdCBvcGFxdWVEYXRhID0gaXguZGF0YS5sZW5ndGg7XG5cbiAgICAgIHJldHVybiAoXG4gICAgICAgIGFjYyArXG4gICAgICAgIDEgKyAvLyBQSUQgaW5kZXhcbiAgICAgICAgY29tcGFjdEFycmF5U2l6ZShuSW5kZXhlcywgMSkgK1xuICAgICAgICBjb21wYWN0QXJyYXlTaXplKG9wYXF1ZURhdGEsIDEpXG4gICAgICApO1xuICAgIH0sIDApO1xuXG4gICAgcmV0dXJuIChcbiAgICAgIGNvbXBhY3RBcnJheVNpemUoc2lnbmVycy5zaXplLCA2NCkgKyAvLyBzaWduYXR1cmVzXG4gICAgICAzICsgLy8gaGVhZGVyXG4gICAgICBjb21wYWN0QXJyYXlTaXplKGFjY291bnRzLnNpemUsIDMyKSArIC8vIGFjY291bnRzXG4gICAgICAzMiArIC8vIGJsb2NraGFzaFxuICAgICAgY29tcGFjdEhlYWRlcih0cmFuc2FjdGlvbi5pbnN0cnVjdGlvbnMubGVuZ3RoKSArIC8vIGluc3RydWN0aW9uc1xuICAgICAgaXhzU2l6ZVxuICAgICk7XG4gIH07XG5cbiAgLyoqXG4gICAqIElzIG1heCB0cmFuc2FjdGlvbiBzaXplXG4gICAqIEBwYXJhbSB0cmFuc2FjdGlvbiBhIHNvbGFuYSB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tyZXMuaW5zdF0sXG4gICAgICAgIFtdLFxuICAgICAgICBmZWVQYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgcmVzLnRva2VuQWNjb3VudCEsXG4gICAgICApO1xuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiBSZXRyeSBmdW5jdGlvbiBpZiBjcmVhdGUgbmV3IHRva2VuIGFjY291aW50XG4gICAgICpcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gbWludFxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBvd25lclxuICAgICAqIEBwYXJhbSB7U2VjcmV0fSBmZWVQYXllclxuICAgICAqIEByZXR1cm5zIFByb21pc2U8c3RyaW5nPlxuICAgICAqL1xuICAgIGV4cG9ydCBjb25zdCByZXRyeUdldE9yQ3JlYXRlID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyOiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxzdHJpbmc+ID0+IHtcbiAgICAgIGxldCBjb3VudGVyID0gMTtcbiAgICAgIHdoaWxlIChjb3VudGVyIDwgUkVUUllfT1ZFUl9MSU1JVCkge1xuICAgICAgICB0cnkge1xuICAgICAgICAgIGNvbnN0IGluc3QgPSBhd2FpdCBnZXQobWludCwgb3duZXIsIGZlZVBheWVyLCB0cnVlKTtcblxuICAgICAgICAgIGlmIChpbnN0ICYmIHR5cGVvZiBpbnN0ID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgaW5zdCk7XG4gICAgICAgICAgICByZXR1cm4gaW5zdDtcbiAgICAgICAgICB9IGVsc2UgaWYgKGluc3QgaW5zdGFuY2VvZiBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uKSB7XG4gICAgICAgICAgICAoYXdhaXQgaW5zdC5zdWJtaXQoKSkubWFwKFxuICAgICAgICAgICAgICBhc3luYyAob2s6IHN0cmluZykgPT4ge1xuICAgICAgICAgICAgICAgIGF3YWl0IE5vZGUuY29uZmlybWVkU2lnKG9rKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gaW5zdC5kYXRhO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAoZXJyOiBFcnJvcikgPT4ge1xuICAgICAgICAgICAgICAgIGRlYnVnTG9nKCcjIEVycm9yIHN1Ym1pdCByZXRyeUdldE9yQ3JlYXRlOiAnLCBlcnIpO1xuICAgICAgICAgICAgICAgIHRocm93IGVycjtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgZGVidWdMb2coYCMgcmV0cnk6ICR7Y291bnRlcn0gY3JlYXRlIHRva2VuIGFjY291bnQ6IGAsIGUpO1xuICAgICAgICAgIGRlYnVnTG9nKGAjIG1pbnQ6ICR7bWludH0sIG93bmVyOiAke293bmVyfSwgZmVlUGF5ZXI6ICR7ZmVlUGF5ZXJ9YCk7XG4gICAgICAgIH1cbiAgICAgICAgYXdhaXQgc2xlZXAoUkVUUllfU0xFRVBfVElNRSk7XG4gICAgICAgIGNvdW50ZXIrKztcbiAgICAgIH1cbiAgICAgIHRocm93IEVycm9yKGByZXRyeSBhY3Rpb24gaXMgb3ZlciBsaW1pdCAke1JFVFJZX09WRVJfTElNSVR9YCk7XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIFtNYWluIGxvZ2ljXUdldCBBc3NvY2lhdGVkIHRva2VuIEFjY291bnQuXG4gICAgICogaWYgbm90IGNyZWF0ZWQsIGNyZWF0ZSBuZXcgdG9rZW4gYWNjb3VpbnRcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBtaW50XG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAgICogQHBhcmFtIHtQdWJrZXl9IGZlZVBheWVyXG4gICAgICogQHJldHVybnMgUHJvbWlzZTxzdHJpbmc+XG4gICAgICovXG4gICAgZXhwb3J0IGNvbnN0IG1ha2VPckNyZWF0ZUluc3RydWN0aW9uID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyPzogUHVia2V5LFxuICAgICAgYWxsb3dPd25lck9mZkN1cnZlID0gZmFsc2UsXG4gICAgKTogUHJvbWlzZTx7XG4gICAgICB0b2tlbkFjY291bnQ6IHN0cmluZztcbiAgICAgIGluc3Q6IFRyYW5zYWN0aW9uSW5zdHJ1Y3Rpb24gfCB1bmRlZmluZWQ7XG4gICAgfT4gPT4ge1xuICAgICAgY29uc3QgYXNzb2NpYXRlZFRva2VuQWNjb3VudCA9IGdldEFzc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jKFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSxcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3QsXG4gICAgICAgIH07XG4gICAgICB9XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IEtleXBhaXIgYXMgT3JpZ2luYWwsIFB1YmxpY0tleSB9IGZyb20gJ0Bzb2xhbmEvd2ViMy5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ICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEuc3ltYm9sKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU3ltYm9sKG1ldGFkYXRhLnN5bWJvbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAocmVzICYmIHJlcy5pc0Vycikge1xuICAgICAgICAgIHJlc3VsdHMucHVzaCguLi5yZXMuZXJyb3IuZGV0YWlscyk7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgICAgaWYgKHJlc3VsdHMubGVuZ3RoID4gMCkge1xuICAgICAgICBjb25zdCBtZXNzYWdlID1cbiAgICAgICAgICAnQ2F1Z2h0IGluIHRoZSB2YWxpZGF0aW9uIGVycm9ycy4gc2VlIGluZm9ybWF0aW9uIGUuZzogZXJyPFZhbGlkYXRvckVycm9yPi5kZXRhaWxzJztcbiAgIC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luOiBvZmZjaGFpbixcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICByZXR1cm4gQ29udmVydGVyLk5mdC5pbnRvVXNlcihtZXJnZWQpO1xuICAgICAgICAgIH0gY2F0Y2ggKGVycikge1xuICAgICAgICAgICAgZGVidWdMb2coJyMgRmFpbGVkIGZldGNoIG9mZmNoYWluIHVybDogJywgaXRlbS5jb250ZW50Lmpzb25fdXJpKTtcbiAgICAgICAgICAgIHJldHVybiBDb252ZXJ0ZXIuTmZ0LmludG9Vc2VyKHtcbiAgICAgICAgICAgICAgb25jaGFpbjogaXRlbSxcbiAgICAgICAgICAgICAgb2ZmY2hhaW46IHt9LFxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfVxuICAgICAgICB9KSxcbiAgICApO1xuICAgIHJldHVybiB7XG4gICAgICBwYWdlOiBhc3NldHMudmFsdWUucGFnZSxcbiAgICAgIHRvdGFsOiBhc3NldHMudmFsdWUudG90YWwsXG4gICAgICBsaW1pdDogYXNzZXRzLnZhbHVlLmxpbWl0LFxuICAgICAgbWV0YWRhdGFzLFxuICAgIH07XG4gIH07XG5cbiAgLyoqXG4gICAqIEZpbmQgbmZ0IGJ5IGNvbGxlY3Rpb24gbWludFxuICAgKlxuICAgKiBAcGFyYW0ge1B1YmtleX0gY29sbGVjdGlvbk1pbnRcbiAgICogQHBhcmFtIHtib29sZWFufSBpc0NvbXByZXNzZWQsXG4gICAqIEBwYXJhbSB7UGFydGlhbDxGaW5kT3B0aW9ucz59IG9wdGlvbnNcbiAgICogQHJldHVybiBQcm9taXNlPFJlc3VsdDxDb21wcmVzc2VkTmZ0TWV0YWRhdGEsIEVycm9yPj5cbiAgICovXG4gIGV4cG9ydCBjb25zdCBmaW5kQnlDb2xsZWN0aW9uID0gYXN5bmMgKFxuICAgIGNvbGxlY3Rpb25NaW50OiBQdWJrZXksXG4gICAgaXNDb21wcmVzc2VkOiBib29sZWFuLFxuICAgIG9wdGlvbnM6IFBhcnRpYWw8RmluZE9wdG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ZXIiLCAiVHJhbnNmZXJDaGVja2VkIiwgIkNvbnZlcnRlciIsICJUcmFuc2ZlciIsICJDb252ZXJ0ZXIiLCAiVmFsaWRhdG9yIiwgIk1lc3NhZ2UiLCAiQ29udmVydGVyIiwgIkRhc0FwaSIsICJEYXNBcGkiLCAiQ29udmVydGVyIiwgIkRhc0FwaSJdCn0K \ No newline at end of file +//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9iYXRjaC50cyIsICIuLi8uLi9ub2RlL3NyYy9pbmRleC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jb21tb24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvbWludC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9wYXJ0aWFsLXNpZ24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY2FsY3VsYXRlLXR4c2l6ZS50cyIsICIuLi8uLi9nbG9iYWwvc3JjL2luZGV4LnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2tleXBhaXIudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvcGRhLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3N1aXRlLXV0aWxzL3NyYy9zaGFyZWQudHMiLCAiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL3Jlc3VsdC50cyIsICIuLi8uLi9jb252ZXJ0ZXIvc3JjL2NvbGxlY3Rpb24udHMiLCAiLi4vLi4vY29udmVydGVyL3NyYy9jcmVhdG9ycy50cyIsICIuLi8uLi9jb252ZXJ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JfZmVlX2Jhc2lzX3BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJGZWVCYXNpc1BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0YWRhdGEubmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzeW1ib2wnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLnN5bWJvbCkge1xuICAgICAgICAgICAgICByZXMgPSBpc1N5bWJvbChtZXRhZGF0YS5zeW1ib2wpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHJlcyAmJiByZXMuaXNFcnIpIHtcbiAgICAgICAgICByZXN1bHRzLnB1c2goLi4ucmVzLmVycm9yLmRldGFpbHMpO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIGlmIChyZXN1bHRzLmxlbmd0aCA+IDApIHtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9XG4gICAgICAgICAgJ0NhdWdodCBpbiB0aGUgdmFsaWRhdGlvbiBlcnJvcnMuIHNlZSBpbmZvcm1hdGlvbiBlLmc6IGVycjxWYWxpZGF0b3JFcnJvcj4uZGV0YWlscyc7XG4gICAgICAgIHRocm93IG5ldyBWYWxpZGF0b3JFcnJvcihtZXNzYWdlLCByZXN1bHRzKTtcbiAgICAgIH1cbiAgICAgIH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0ZXIiLCAiQ3JlYXRvcnMiLCAiQ29udmVydGVyIiwgIkNvbXByZXNzZWROZnRNZXRhZGF0YSIsICJDb252ZXJ0ZXIiLCAiUm95YWx0eSIsICJDb252ZXJ0ZXIiLCAiTmZ0IiwgIkNvbnZlcnRlciIsICJNZW1vIiwgIkNvbnZlcnRlciIsICJNaW50IiwgIkNvbnZlcnRlciIsICJSZWd1bGFyTmZ0TWV0YWRhdGEiLCAiQ29udmVydGVyIiwgIlByb3BlcnRpZXMiLCAiQ29udmVydGVyIiwgIlVzZXMiLCAiQ29udmVydGVyIiwgIlRva2VuTWV0YWRhdGEiLCAiQ29udmVydGVyIiwgIlRyYW5zZmVyQ2hlY2tlZCIsICJDb252ZXJ0ZXIiLCAiVHJhbnNmZXIiLCAiQ29udmVydGVyIiwgIlZhbGlkYXRvciIsICJNZXNzYWdlIiwgIkNvbnZlcnRlciIsICJEYXNBcGkiLCAiRGFzQXBpIiwgIkNvbnZlcnRlciIsICJEYXNBcGkiXQp9Cg== \ No newline at end of file diff --git a/packages/global/dist/index.js b/packages/global/dist/index.js index 89d705cda..f0aeb840f 100644 --- a/packages/global/dist/index.js +++ b/packages/global/dist/index.js @@ -425,9 +425,6 @@ var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { console.log("[DEBUG]", data1, data2, data3, data4); } }; -var sleep = async (sec) => { - return new Promise((r) => setTimeout(r, sec * 1e3)); -}; var isPromise = (obj) => { return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; }; @@ -607,14 +604,11 @@ var Result5; Result8.all = all; })(Result5 || (Result5 = {})); -// ../account/src/associated.ts -var import_spl_token = require("@solana/spl-token"); - // ../account/src/keypair.ts var import_web36 = require("@solana/web3.js"); var import_bs58 = __toESM(require("bs58")); var Account; -((Account5) => { +((Account4) => { class Keypair4 { secret; pubkey; @@ -650,111 +644,16 @@ var Account; }); }; } - Account5.Keypair = Keypair4; + Account4.Keypair = Keypair4; })(Account || (Account = {})); -// ../account/src/associated.ts -var Account2; -((Account5) => { - let Associated; - ((Associated2) => { - const RETRY_OVER_LIMIT = 10; - const RETRY_SLEEP_TIME = 3; - const get = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const res = await (0, Associated2.makeOrCreateInstruction)( - mint, - owner, - new Account.Keypair({ secret: feePayer }).pubkey, - allowOwnerOffCurve - ); - if (!res.inst) { - return res.tokenAccount; - } - return new TransactionBuilder6.Common( - [res.inst], - [], - feePayer.toKeypair(), - res.tokenAccount - ); - }; - Associated2.retryGetOrCreate = async (mint, owner, feePayer) => { - let counter = 1; - while (counter < RETRY_OVER_LIMIT) { - try { - const inst = await get(mint, owner, feePayer, true); - if (inst && typeof inst === "string") { - debugLog("# associatedTokenAccount: ", inst); - return inst; - } else if (inst instanceof TransactionBuilder6.Common) { - (await inst.submit()).map( - async (ok) => { - await Node.confirmedSig(ok); - return inst.data; - }, - (err) => { - debugLog("# Error submit retryGetOrCreate: ", err); - throw err; - } - ); - } - } catch (e) { - debugLog(`# retry: ${counter} create token account: `, e); - debugLog(`# mint: ${mint}, owner: ${owner}, feePayer: ${feePayer}`); - } - await sleep(RETRY_SLEEP_TIME); - counter++; - } - throw Error(`retry action is over limit ${RETRY_OVER_LIMIT}`); - }; - Associated2.makeOrCreateInstruction = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const associatedTokenAccount = (0, import_spl_token.getAssociatedTokenAddressSync)( - mint.toPublicKey(), - owner.toPublicKey(), - allowOwnerOffCurve, - import_spl_token.TOKEN_PROGRAM_ID, - import_spl_token.ASSOCIATED_TOKEN_PROGRAM_ID - ); - debugLog("# associatedTokenAccount: ", associatedTokenAccount.toString()); - try { - await (0, import_spl_token.getAccount)( - Node.getConnection(), - associatedTokenAccount, - Node.getConnection().commitment, - import_spl_token.TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst: void 0 - }; - } catch (error) { - if (!(error instanceof import_spl_token.TokenAccountNotFoundError) && !(error instanceof import_spl_token.TokenInvalidAccountOwnerError)) { - throw Error("Unexpected error"); - } - const payer = !feePayer ? owner : feePayer; - const inst = (0, import_spl_token.createAssociatedTokenAccountInstruction)( - payer.toPublicKey(), - associatedTokenAccount, - owner.toPublicKey(), - mint.toPublicKey(), - import_spl_token.TOKEN_PROGRAM_ID, - import_spl_token.ASSOCIATED_TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst - }; - } - }; - })(Associated = Account5.Associated || (Account5.Associated = {})); -})(Account2 || (Account2 = {})); - // ../account/src/pda.ts var import_web37 = require("@solana/web3.js"); var import_mpl_token_metadata = require("@metaplex-foundation/mpl-token-metadata"); var import_mpl_bubblegum = require("@metaplex-foundation/mpl-bubblegum"); var import_bn = __toESM(require("bn.js")); -var Account3; -((Account5) => { +var Account2; +((Account4) => { let Pda; ((Pda2) => { Pda2.getMetadata = (address) => { @@ -806,14 +705,13 @@ var Account3; ); return assetId.toString(); }; - })(Pda = Account5.Pda || (Account5.Pda = {})); -})(Account3 || (Account3 = {})); + })(Pda = Account4.Pda || (Account4.Pda = {})); +})(Account2 || (Account2 = {})); // ../account/src/index.ts -var Account4 = { - ...Account2, +var Account3 = { ...Account, - ...Account3 + ...Account2 }; // ../converter/src/collection.ts @@ -1472,7 +1370,7 @@ String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, op } return url; } - if (Account4.Keypair.isPubkey(addressOrSignature)) { + if (Account3.Keypair.isPubkey(addressOrSignature)) { if (explorer === "solanafm" /* SolanaFM */) { url = `${Constants.EXPLORER_SOLANAFM_URL}/address/${addressOrSignature}?cluster=${cluster}`; } else if (explorer === "xray" /* Xray */) { @@ -1492,13 +1390,13 @@ String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, op return url; }; String.prototype.toPublicKey = function() { - if (!Account4.Keypair.isPubkey(this.toString())) { + if (!Account3.Keypair.isPubkey(this.toString())) { throw Error(`No match KeyPair.PubKey: ${this.toString()}`); } return new import_web39.PublicKey(this.toString()); }; String.prototype.toKeypair = function() { - if (!Account4.Keypair.isSecret(this.toString())) { + if (!Account3.Keypair.isSecret(this.toString())) { throw Error(`No match KeyPair.Secret: ${this.toString()}`); } const decoded = import_bs582.default.decode(this.toString()); @@ -1510,4 +1408,4 @@ Number.prototype.toSol = function() { Number.prototype.toLamports = function() { return (0, import_bignumber.BigNumber)(this).times(import_web39.LAMPORTS_PER_SOL).toNumber(); }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uLy4uL3N1aXRlLXV0aWxzL3NyYy9jb25zdGFudHMudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvYmF0Y2gudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY29tbW9uLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL21pbnQudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvcGFydGlhbC1zaWduLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2NhbGN1bGF0ZS10eHNpemUudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvaW5kZXgudHMiLCAiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL3NoYXJlZC50cyIsICIuLi8uLi9zdWl0ZS11dGlscy9zcmMvcmVzdWx0LnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2Fzc29jaWF0ZWQudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMva2V5cGFpci50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9wZGEudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvaW5kZXgudHMiLCAiLi4vLi4vY29udmVydGVyL3NyYy9jb2xsZWN0aW9uLnRzIiwgIi4uLy4uL2NvbnZlcnRlci9zcmMvY3JlYXRvcnM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2lhdGVkIHtcbiAgICBjb25zdCBSRVRSWV9PVkVSX0xJTUlUID0gMTA7XG4gICAgY29uc3QgUkVUUllfU0xFRVBfVElNRSA9IDM7XG4gICAgLy9AaW50ZXJuYWxcbiAgICBjb25zdCBnZXQgPSBhc3luYyAoXG4gICAgICBtaW50OiBQdWJrZXksXG4gICAgICBvd25lcjogUHVia2V5LFxuICAgICAgZmVlUGF5ZXI6IFNlY3JldCxcbiAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSA9IGZhbHNlLFxuICAgICk6IFByb21pc2U8c3RyaW5nIHwgQ29tbW9uU3RydWN0dXJlPFB1YmtleT4+ID0+IHtcbiAgICAgIGNvbnN0IHJlcyA9IGF3YWl0IG1ha2VPckNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICBtaW50LFxuICAgICAgICBvd25lcixcbiAgICAgICAgbmV3IEtleXBhaXIuS2V5cGFpcih7IHNlY3JldDogZmVlUGF5ZXIgfSkucHVia2V5LFxuICAgICAgICBhbGxvd093bmVyT2ZmQ3VydmUsXG4gICAgICApO1xuXG4gICAgICBpZiAoIXJlcy5pbnN0KSB7XG4gICAgICAgIHJldHVybiByZXMudG9rZW5BY2NvdW50O1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb248UHVia2V5PihcbiAgICAgICAgW3Jlcy5pbnN0XSxcbiAgICAgICAgW10sXG4gICAgICAgIGZlZVBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICByZXMudG9rZW5BY2NvdW50ISxcbiAgICAgICk7XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIFJldHJ5IGZ1bmN0aW9uIGlmIGNyZWF0ZSBuZXcgdG9rZW4gYWNjb3VpbnRcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBtaW50XG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAgICogQHBhcmFtIHtTZWNyZXR9IGZlZVBheWVyXG4gICAgICogQHJldHVybnMgUHJvbWlzZTxzdHJpbmc+XG4gICAgICovXG4gICAgZXhwb3J0IGNvbnN0IHJldHJ5R2V0T3JDcmVhdGUgPSBhc3luYyAoXG4gICAgICBtaW50OiBQdWJrZXksXG4gICAgICBvd25lcjogUHVia2V5LFxuICAgICAgZmVlUGF5ZXI6IFNlY3JldCxcbiAgICApOiBQcm9taXNlPHN0cmluZz4gPT4ge1xuICAgICAgbGV0IGNvdW50ZXIgPSAxO1xuICAgICAgd2hpbGUgKGNvdW50ZXIgPCBSRVRSWV9PVkVSX0xJTUlUKSB7XG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgY29uc3QgaW5zdCA9IGF3YWl0IGdldChtaW50LCBvd25lciwgZmVlUGF5ZXIsIHRydWUpO1xuXG4gICAgICAgICAgaWYgKGluc3QgJiYgdHlwZW9mIGluc3QgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICBkZWJ1Z0xvZygnIyBhc3NvY2lhdGVkVG9rZW5BY2NvdW50OiAnLCBpbnN0KTtcbiAgICAgICAgICAgIHJldHVybiBpbnN0O1xuICAgICAgICAgIH0gZWxzZSBpZiAoaW5zdCBpbnN0YW5jZW9mIFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb24pIHtcbiAgICAgICAgICAgIChhd2FpdCBpbnN0LnN1Ym1pdCgpKS5tYXAoXG4gICAgICAgICAgICAgIGFzeW5jIChvazogc3RyaW5nKSA9PiB7XG4gICAgICAgICAgICAgICAgYXdhaXQgTm9kZS5jb25maXJtZWRTaWcob2spO1xuICAgICAgICAgICAgICAgIHJldHVybiBpbnN0LmRhdGE7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIChlcnI6IEVycm9yKSA9PiB7XG4gICAgICAgICAgICAgICAgZGVidWdMb2coJyMgRXJyb3Igc3VibWl0IHJldHJ5R2V0T3JDcmVhdGU6ICcsIGVycik7XG4gICAgICAgICAgICAgICAgdGhyb3cgZXJyO1xuICAgIC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W9mIFRva2VuSW52YWxpZEFjY291bnRPd25lckVycm9yKVxuICAgICAgICApIHtcbiAgICAgICAgICB0aHJvdyBFcnJvcignVW5leHBlY3RlZCBlcnJvcicpO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgcGF5ZXIgPSAhZmVlUGF5ZXIgPyBvd25lciA6IGZlZVBheWVyO1xuXG4gICAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVBc3NvY2lhdGVkVG9rZW5BY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgcGF5ZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdCxcbiAgICAgICAgfTtcbiAgICAgIH1cbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHsgS2V5cGFpciBhcyBPcmlnaW5hbCwgUHVibGljS2V5IH0gZnJvbSAnQHNvbGFuYS93ZWIzLmpzJztcbmltcG9ydCB7IFB1YmtleSwgU2VjcmV0IH0gZnJvbSAnfi90eXBlcy9hY2NvdW50JztcbmltcG9ydCBicyBmcm9tICdiczU4JztcblxuZXhwb3J0IG5hbWVzcGFjZSBBY2NvdW50IHtcbiAgZXhwb3J0IGNsYXNzIEtleXBhaXIge1xuICAgIHNlY3JldDogU2VjcmV0O1xuICAgIHB1YmtleTogUHVia2V5O1xuXG4gICAgY29uc3RydWN0b3IocGFyYW1zOiB7IHB1YmtleT86IFB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hdGEnKSxcbiAgICAgICAgICBQUk9HUkFNX0lELnRvQnVmZmVyKCksXG4gICAgICAgICAgYWRkcmVzcy50b1B1YmxpY0tleSgpLnRvQnVmZmVyKCksXG4gICAgICAgIF0sXG4gICAgICAgIFBST0dSQU1fSUQsXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGdldE1hc3RlckVkaXRpb24gPSAoYWRkcmVzczogUHVia2V5KTogUHVibGljS2V5ID0+IHtcbiAgICAgIGNvbnN0IFtwdWJsaWNLZXldID0gUHVibGljS2V5LmZpbmRQcm9ncmFtQWRkcmVzc1N5bmMoXG4gICAgICAgIFtcbiAgICAgICAgICBCdWZmZXIuZnJvbSgnbWV0YWRhdGEnKSxcbiAgICAgICAgICBQUk9HUkFNX0lELnRvQnVmZmVyKCksXG4gICAgICAgICAgYWRkcmVzcy50b1B1YmxpY0tleSgpLnRvQnVmZmVyKCksXG4gICAgICAgICAgQnVmZmVyLmZyb20oJ2VkaXRpb24nKSxcbiAgICAgICAgXSxcbiAgICAgICAgUFJPR1JBTV9JRCxcbiAgICAgICk7XG4gICAgICByZXR1cm4gcHVibGljS2V5O1xuICAgIH07XG5cbiAgICBleHBvcnQgY29uc3QgZ2V0VHJlZUF1dGhvcml0eSA9IChhZGRyZXNzOiBQdWJrZXkpOiBQdWJsaWNLZXkgPT4ge1xuICAgICAgY29uc3QgW3B1YmxpY0tleV0gPSBQdWJsaWNLZXkuZmluZFByb2dyYW1BZGRyZXNzU3luYyhcbiAgICAgICAgW2FkZHJlc3MudG9QdWJsaWNLZXkoKS50b0J1ZmZlcigpXSxcbiAgICAgICAgTVBMX0JVQkJMRUdVTV9QUk9HUkFNX0lELnRvUHVibGljS2V5KCksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGdldEJndW1TaWduZXIgPSAoKTogUHV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7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvQ29tcHJlc3NlZE5mdEluZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IEludGVybmFsQ3JlYXRvcnNbXSA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBbXTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBpbnB1dCEubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlciA9IChcbiAgICAgIG91dHB1dDogT3B0aW9uPEludGVybmFsQ3JlYXRvcnNbXT4sXG4gICAgKTogQ3JlYXRvcnNbXSB8IHVuZGVmaW5lZCA9PiB7XG4gICAgICBpZiAoIW91dHB1dCkge1xuICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gb3V0cHV0Lm1hcCgoZGF0YSkgPT4ge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIGFkZHJlc3M6IGRhdGEuYWRkcmVzcy50b1N0cmluZygpLFxuICAgICAgICAgIHNoYXJlOiBkYXRhLnNoYXJlLFxuICAgICAgICAgIHZlcmlmaWVkO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lLFxuICAgICAgZmVlUGF5ZXI/OiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxQcm9wZXJ0aWVzPiA9PiB7XG4gICAgICBpZiAoIWlucHV0IHx8ICFpbnB1dC5maWxlcykge1xuICAgICAgICByZXR1cm4ge307XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGZpbGVzID0gYXdhaXQgUHJvbWlzZS5hbGwoXG4gICAgICAgIGlucHV0LmZpbGVzLm1hcChhc3luYyAoZmlsZSkgPT4ge1xuICAgICAgICAgIGlmICghZmlsZS5maWxlUGF0aCkge1xuICAgICAgICAgICAgcmV0dXJuIHt9O1xuICAgICAgICAgIH1cbiAgICAgICAgICBjb25zdCByZXMgPSBhd2FpdCBjYWxsYmFja0Z1bmMoZmlsZS5maWxlUGF0aCwgc3RvcmFnZVR5cGUsIGZlZVBheWVyKTtcbiAgICAgICAgICBpZiAocmVzLmlzRXJyKSB7XG4gICAgICAgICAgICB0aHJvdyBFcnJvcihyZXMuZXJyb3IubWVzc2FnZSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBvdmVyd3JpdGVPYmplY3QoZmlsZSwgW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBleGlzdHNLZXk6ICdmaWxlUGF0aCcsXG4gICAgICAgICAgICAgIHdpbGw6IHsga2V5OiAndXJpJywgdmFsdWU6IHJlcy52YWx1ZSB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICBdKTtcbiAgICAgICAgfSksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHsgLi4uaW5wdXQsIGZpbGVzIH0gYXMgUHJvcGVydGllcztcbiAgICB9O1xuICB9XG59XG4iLCAiLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLXVudXNlZC12YXJzICovXG5pbXBvcnQgeyBPcHRpb24sIFVzZXMgfSBmcm9tICd+L3R5cGVzL3JlZ3VsYXItbmZ0JztcblxuZXhwb3J0IG5hbWVzcGFjZSBDb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05VTUJFUiwgcm95YWx0eSwge1xuICAgICAgICAgIHRocmVzaG9sZDogUk9ZQUxUWV9NSU4sXG4gICAgICAgICAgY29uZGl0aW9uOiAndW5kZXJNaW4nLFxuICAgICAgICB9KTtcbiAgICAgIH0gZWxzZSBpZiAocm95YWx0eSA+IFJPWUFMVFlfTUFYKSB7XG4gICAgICAgIHRocm93IGNyZWF0ZUVycm9yKGtleSwgTWVzc2FnZS5CSUdfTlVNQkVSLCByb3lhbHR5LCB7XG4gICAgICAgICAgdGhyZXNob2xkOiBST1lBTFRZX01BWCxcbiAgICAgICAgICBjb25kaXRpb246ICdvdmVyTWF4JyxcbiAgICAgICAgfSk7XG4gICAgICB9XG4gICAgICByZXR1cm4gTWVzc2FnZS5TVUNDRVNTO1xuICAgIH0pO1xuICB9O1xuXG4gIGV4cG9ydCBjb25zdCBpc1NlbGxlckZlZUJhc2lzUG9pbnRzID0gKFxuICAgIHJveWFsdHk6IG51bWJlcixcbiAgKTogUmVzdWx0PHN0cmluZywgVmFsaWRhdG9yRXJyb3I+ID0+IHtcbiAgICByZXR1cm4gVHJ5KCgpID0+IHtcbiAgICAgIGNvbnN0IGtleSA9ICdzZWxsZXJGZWVCYXNpc1BvaW50cy9zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyc7XG4gICAgICBpZiAocm95YWx0eSAhPT0gMCAmJiAhcm95YWx0eSkge1xuICAgICAgICB0aHJvdyBjcmVhdGVFcnJvcihrZXksIE1lc3NhZ2UuRU1QVFksIHJveWFsdHkpO1xuICAgICAgfVxuICAgICAgaWYgKHJveWFsdHkgPCBST1lBTFRZX01JTikge1xuICAgICAgICB0aHJvdyBjcmVhdGVFcnJvcihrZXksIE1lc3NhZ2UuU01BTExfTlVNQkVSLCByb3lhbHR5LCB7XG4gICAgICAgICAgdGhyZXNob2xkOiBST1lBTFRZX01JTixcbiAgICAgICAgICBjb25kaXRpb246ICd1bmRlck1pbicsXG4gICAgICAgIH0pO1xuICAgICAgfSBlbHNlIGlm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pbmcsIFZhbGlkYXRvckVycm9yPjtcbiAgICAgICAgc3dpdGNoIChrZXkpIHtcbiAgICAgICAgICBjYXNlICdpbWFnZSc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLmltYWdlKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzSW1hZ2VVcmwobWV0YWRhdGEuaW1hZ2UpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAncm95YWx0eSc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnJveWFsdHkpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNSb3lhbHR5KG1ldGFkYXRhLnJveWFsdHkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7X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ZXRhZGF0YSAmJiBtZXRhZGF0YS5yb3lhbHR5KSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzUm95YWx0eShtZXRhZGF0YS5yb3lhbHR5KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlcl9mZWVfYmFzaXNfcG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJGZWVCYXNpc1BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0YWRhdGEubmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzeW1ib2wnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLnN5bWJvbCkge1xuICAgICAgICAgICAgICByZXMgPSBpc1N5bWJvbChtZXRhZGF0YS5zeW1ib2wpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHJlcyAmJiByZXMuaXNFcnIpIH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IsICJSZXN1bHQiLCAiaW1wb3J0X2JzNTgiLCAiQWNjb3VudCIsICJicyJdCn0K \ No newline at end of file diff --git a/packages/global/dist/index.mjs b/packages/global/dist/index.mjs index 11d0d1e03..3f7e246e1 100644 --- a/packages/global/dist/index.mjs +++ b/packages/global/dist/index.mjs @@ -412,9 +412,6 @@ var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { console.log("[DEBUG]", data1, data2, data3, data4); } }; -var sleep = async (sec) => { - return new Promise((r) => setTimeout(r, sec * 1e3)); -}; var isPromise = (obj) => { return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; }; @@ -594,22 +591,11 @@ var Result5; Result8.all = all; })(Result5 || (Result5 = {})); -// ../account/src/associated.ts -import { - ASSOCIATED_TOKEN_PROGRAM_ID, - createAssociatedTokenAccountInstruction, - getAccount, - getAssociatedTokenAddressSync, - TOKEN_PROGRAM_ID, - TokenAccountNotFoundError, - TokenInvalidAccountOwnerError -} from "@solana/spl-token"; - // ../account/src/keypair.ts import { Keypair as Original, PublicKey as PublicKey2 } from "@solana/web3.js"; import bs from "bs58"; var Account; -((Account5) => { +((Account4) => { class Keypair4 { secret; pubkey; @@ -645,111 +631,16 @@ var Account; }); }; } - Account5.Keypair = Keypair4; + Account4.Keypair = Keypair4; })(Account || (Account = {})); -// ../account/src/associated.ts -var Account2; -((Account5) => { - let Associated; - ((Associated2) => { - const RETRY_OVER_LIMIT = 10; - const RETRY_SLEEP_TIME = 3; - const get = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const res = await (0, Associated2.makeOrCreateInstruction)( - mint, - owner, - new Account.Keypair({ secret: feePayer }).pubkey, - allowOwnerOffCurve - ); - if (!res.inst) { - return res.tokenAccount; - } - return new TransactionBuilder6.Common( - [res.inst], - [], - feePayer.toKeypair(), - res.tokenAccount - ); - }; - Associated2.retryGetOrCreate = async (mint, owner, feePayer) => { - let counter = 1; - while (counter < RETRY_OVER_LIMIT) { - try { - const inst = await get(mint, owner, feePayer, true); - if (inst && typeof inst === "string") { - debugLog("# associatedTokenAccount: ", inst); - return inst; - } else if (inst instanceof TransactionBuilder6.Common) { - (await inst.submit()).map( - async (ok) => { - await Node.confirmedSig(ok); - return inst.data; - }, - (err) => { - debugLog("# Error submit retryGetOrCreate: ", err); - throw err; - } - ); - } - } catch (e) { - debugLog(`# retry: ${counter} create token account: `, e); - debugLog(`# mint: ${mint}, owner: ${owner}, feePayer: ${feePayer}`); - } - await sleep(RETRY_SLEEP_TIME); - counter++; - } - throw Error(`retry action is over limit ${RETRY_OVER_LIMIT}`); - }; - Associated2.makeOrCreateInstruction = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const associatedTokenAccount = getAssociatedTokenAddressSync( - mint.toPublicKey(), - owner.toPublicKey(), - allowOwnerOffCurve, - TOKEN_PROGRAM_ID, - ASSOCIATED_TOKEN_PROGRAM_ID - ); - debugLog("# associatedTokenAccount: ", associatedTokenAccount.toString()); - try { - await getAccount( - Node.getConnection(), - associatedTokenAccount, - Node.getConnection().commitment, - TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst: void 0 - }; - } catch (error) { - if (!(error instanceof TokenAccountNotFoundError) && !(error instanceof TokenInvalidAccountOwnerError)) { - throw Error("Unexpected error"); - } - const payer = !feePayer ? owner : feePayer; - const inst = createAssociatedTokenAccountInstruction( - payer.toPublicKey(), - associatedTokenAccount, - owner.toPublicKey(), - mint.toPublicKey(), - TOKEN_PROGRAM_ID, - ASSOCIATED_TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst - }; - } - }; - })(Associated = Account5.Associated || (Account5.Associated = {})); -})(Account2 || (Account2 = {})); - // ../account/src/pda.ts import { PublicKey as PublicKey3 } from "@solana/web3.js"; import { PROGRAM_ID } from "@metaplex-foundation/mpl-token-metadata"; import { MPL_BUBBLEGUM_PROGRAM_ID } from "@metaplex-foundation/mpl-bubblegum"; import BN from "bn.js"; -var Account3; -((Account5) => { +var Account2; +((Account4) => { let Pda; ((Pda2) => { Pda2.getMetadata = (address) => { @@ -801,14 +692,13 @@ var Account3; ); return assetId.toString(); }; - })(Pda = Account5.Pda || (Account5.Pda = {})); -})(Account3 || (Account3 = {})); + })(Pda = Account4.Pda || (Account4.Pda = {})); +})(Account2 || (Account2 = {})); // ../account/src/index.ts -var Account4 = { - ...Account2, +var Account3 = { ...Account, - ...Account3 + ...Account2 }; // ../converter/src/collection.ts @@ -1470,7 +1360,7 @@ String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, op } return url; } - if (Account4.Keypair.isPubkey(addressOrSignature)) { + if (Account3.Keypair.isPubkey(addressOrSignature)) { if (explorer === "solanafm" /* SolanaFM */) { url = `${Constants.EXPLORER_SOLANAFM_URL}/address/${addressOrSignature}?cluster=${cluster}`; } else if (explorer === "xray" /* Xray */) { @@ -1490,13 +1380,13 @@ String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, op return url; }; String.prototype.toPublicKey = function() { - if (!Account4.Keypair.isPubkey(this.toString())) { + if (!Account3.Keypair.isPubkey(this.toString())) { throw Error(`No match KeyPair.PubKey: ${this.toString()}`); } return new PublicKey4(this.toString()); }; String.prototype.toKeypair = function() { - if (!Account4.Keypair.isSecret(this.toString())) { + if (!Account3.Keypair.isSecret(this.toString())) { throw Error(`No match KeyPair.Secret: ${this.toString()}`); } const decoded = bs2.decode(this.toString()); @@ -1508,4 +1398,4 @@ Number.prototype.toSol = function() { Number.prototype.toLamports = function() { return BigNumber(this).times(LAMPORTS_PER_SOL).toNumber(); }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uLy4uL3N1aXRlLXV0aWxzL3NyYy9jb25zdGFudHMudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvYmF0Y2gudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpb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AgIHJldHVybiBUcnkoYXN5bmMgKCkgPT4ge1xuICAgICAgICBsZXQgaSA9IDA7XG4gICAgICAgIGZvciAoY29uc3QgYSBvZiBhcnIpIHtcbiAgICAgICAgICBpZiAoIWEuaW5zdHJ1Y3Rpb25zICYmICFhLnNpZ25lcnMpIHtcbiAgICAgICAgICAgIHRocm93IEVycm9yKFxuICAgICAgICAgICAgICBgb25seSBJbnN0cnVjdGlvbiBvYmplY3QgdGhhdCBjYW4gdXNlIGJhdGNoU3VibWl0KCkuXG4gICAgICAgICAgICBJbmRleDogJHtpfSwgU2V0IHZhbHVlOiAke0pTT04uc3RyaW5naWZ5KGEpfWAsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICBpKys7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBpbnN0cnVjdGlvbnMgPSBhcnIuZmxhdE1hcCgoYSkgPT4gYS5pbnN0cnVjdGlvbnMpO1xuICAgICAgICBjb25zdCBzaWduZXJzID0gYXJyLmZsYXRNYXAoKGEpID0+IGEuc2lnbmVycyk7XG4gICAgICAgIGNvbnN0IGZlZVBheWVycyA9IGFyci5maWx0ZXIoKGEpID0+IGEuZmVlUGF5ZXIgIT09IHVuZGVmaW5lZCk7XG4gICAgICAgIGxldCBmZWVQYXllciA9IHNpZ25lcnNbMF07XG4gICAgICAgIGlmIChmZWVQYXllcnMubGVuZ3RoID4gMCAmJiBmZWVQYXllcnNbMF0uZmVlUGF5ZXIpIHtcbiAgICAgICAgICBmZWVQYXllciA9IGZlZVBheWVyc1swXS5mZWVQYXllcjtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHRyYW5zYWN0aW9uID0gbmV3IFRyYW5zYWN0aW9uKCk7XG4gICAgICAgIGxldCBmaW5hbFNpZ25lcnMgPSBzaWduZXJzO1xuICAgICAgICBpZiAoZmVlUGF5ZXIpIHtcbiAgICAgICAgICB0cmFuc2FjdGlvbi5mZWVQYXllciA9IGZlZVBheWVyLnB1Ym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cmFuc2FjdGlvbigpO1xuXG4gICAgICAgIGNvbnN0IGJsb2NraGFzaE9iaiA9IGF3YWl0IE5vZGUuZ2V0Q29ubmVjdGlvbigpLmdldExhdGVzdEJsb2NraGFzaCgpO1xuICAgICAgICB0cmFuc2FjdGlvbi5sYXN0VmFsaWRCbG9ja0hlaWdodCA9IGJsb2NraGFzaE9iai5sYXN0VmFsaWRCbG9ja0hlaWdodDtcbiAgICAgICAgdHJhbnNhY3Rpb24ucmVjZW50QmxvY2toYXNoID0gYmxvY2toYXNoT2JqLmJsb2NraGFzaDtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHRoaXMuc2lnbmVycztcblxuICAgICAgICBpZiAodGhpcy5mZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gdGhpcy5mZWVQYXllci5wdWJsaWNLZXk7XG4gICAgICAgICAgZmluYWxTaWduZXJzID0gW3RoaXMuZmVlUGF5ZXIsIC4uLnRoaXMuc2lnbmVyc107XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLmluc3RydWN0aW9ucy5mb3JFYWNoKChpbnN0KSA9PiB0cmFuc2FjdGlvbi5hZGQoaW5zdCkpO1xuXG4gICAgICAgIGNvbnN0IG9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IE1BWF9SRVRSSUVTLFxuICAgICAgICB9O1xuXG4gICAgICAgIHJldHVybiBhd2FpdCBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uKFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICBvcHRpb25zLFxuICAgICAgICApO1xuICAgICAgfSk7XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7XG4gIENvbmZpcm1PcHRpb25zLFxuICBLZXlwYWlyLFxuICB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25lcixcbiAgICAgICAgbmV3IEtleXBhaXIuS2V5cGFpcih7IHNlY3JldDogZmVlUGF5ZXIgfSkucHVia2V5LFxuICAgICAgICBhbGxvd093bmVyT2ZmQ3VydmUsXG4gICAgICApO1xuXG4gICAgICBpZiAoIXJlcy5pbnN0KSB7XG4gICAgICAgIHJldHVybiByZXMudG9rZW5BY2NvdW50O1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb248UHVia2V5PihcbiAgICAgICAgW3Jlcy5pbnN0XSxcbiAgICAgICAgW10sXG4gICAgICAgIGZlZVBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICByZXMudG9rZW5BY2NvdW50ISxcbiAgICAgICk7XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIFJldHJ5IGZ1bmN0aW9uIGlmIGNyZWF0ZSBuZXcgdG9rZW4gYWNjb3VpbnRcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBtaW50XG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAgICogQHBhcmFtIHtTZWNyZXR9IGZlZVBheWVyXG4gICAgICogQHJldHVybnMgUHJvbWlzZTxzdHJpbmc+XG4gICAgICovXG4gICAgZXhwb3J0IGNvbnN0IHJldHJ5R2V0T3JDcmVhdGUgPSBhc3luYyAoXG4gICAgICBtaW50OiBQdWJrZXksXG4gICAgICBvd25lcjogUHVia2V5LFxuICAgICAgZmVlUGF5ZXI6IFNlY3JldCxcbiAgICApOiBQcm9taXNlPHN0cmluZz4gPT4ge1xuICAgICAgbGV0IGNvdW50ZXIgPSAxO1xuICAgICAgd2hpbGUgKGNvdW50ZXIgPCBSRVRSWV9PVkVSX0xJTUlUKSB7XG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgY29uc3QgaW5zdCA9IGF3YWl0IGdldChtaW50LCBvd25lciwgZmVlUGF5ZXIsIHRydWUpO1xuXG4gICAgICAgICAgaWYgKGluc3QgJiYgdHlwZW9mIGluc3QgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICBkZWJ1Z0xvZygnIyBhc3NvY2lhdGVkVG9rZW5BY2NvdW50OiAnLCBpbnN0KTtcbiAgICAgICAgICAgIHJldHVybiBpbnN0O1xuICAgICAgICAgIH0gZWxzZSBpZiAoaW5zdCBpbnN0YW5jZW9mIFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb24pIHtcbiAgICAgICAgICAgIChhd2FpdCBpbnN0LnN1Ym1pdCgpKS5tYXAoXG4gICAgICAgICAgICAgIGFzeW5jIChvazogc3RyaW5nKSA9PiB7XG4gICAgICAgICAgICAgICAgYXdhaXQgTm9kZS5jb25maXJtZWRTaWcob2spO1xuICAgICAgICAgICAgICAgIHJldHVybiBpbnN0LmRhdGE7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIChlcnI6IEVycm9yKSA9PiB7XG4gICAgICAgICAgICAgICAgZGVidWdMb2coJyMgRXJyb3Igc3VibWl0IHJldHJ5R2V0T3JDcmVhdGU6ICcsIGVycik7XG4gICAgICAgICAgICAgICAgdGhyb3cgZXJyO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICBkZWJ1Z0xvZyhgIyByZXRyeTogJHtjb3VudGVyfSBjcmVhdGUgdG9rZW4gYWNjb3VudDogYCwgZSk7XG4gICAgICAgICAgZGVidWdMb2coYCMgbWludDogJHttaW50fSwgb3duZXI6ICR7b3duZXJ9LCBmZWVQYXllcjogJHtmZWVQYXllcn1gKTtcbiAgICAgICAgfVxuICAgICAgICBhd2FpdCBzbGVlcChSRVRSWV9TTEVFUF9USU1FKTtcbiAgICAgICAgY291bnRlcisrO1xuICAgICAgfVxuICAgICAgdGhyb3cgRXJyb3IoYHJldHJ5IGFjdGlvbiBpcyBvdmVyIGxpbWl0ICR7UkVUUllfT1ZFUl9MSU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5BY2NvdW50LnRvU3RyaW5nKCkpO1xuXG4gICAgICB0cnkge1xuICAgICAgICAvLyBEb250IHVzZSBSZXN1bHRcbiAgICAgICAgYXdhaXQgZ2V0QWNjb3VudChcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLmNvbW1pdG1lbnQsXG4gICAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICB0b2tlbkFjY291bnQ6IGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSxcbiAgICAgICAgICBpbnN0OiB1bmRlZmluZWQsXG4gICAgICAgIH07XG4gICAgICB9IGNhdGNoIChlcnJvcjogdW5rbm93bikge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuQWNjb3VudE5vdEZvdW5kRXJyb3IpICYmXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuSW52YWxpZEFjY291bnRPd25lckVycm9yKVxuICAgICAgICApIHtcbiAgICAgICAgICB0aHJvdyBFcnJvcignVW5leHBlY3RlZCBlcnJvcicpO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgcGF5ZXIgPSAhZmVlUGF5ZXIgPyBvd25lciA6IGZlZVBheWVyO1xuXG4gICAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVBc3NvY2lhdGVkVG9rZW5BY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgcGF5ZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAg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AgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEuc3ltYm9sKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU3ltYm9sKG1ldGFkYXRhLnN5bWJvbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAocmVzICYmIHJlcy5pc0Vycikge1xuICAgICAgICAgIHJlc3VsdHMucHVzaCguLi5yZXMuZXJyb3IuZGV0YWlscyk7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgICAgaWYgKHJlc3VsdHMubGVuZ3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rpb25CdWlsZGVyIiwgIlB1YmxpY0tleSIsICJBY2NvdW50IiwgIktleXBhaXIiLCAiQWNjb3VudCIsICJBc3NvY2lhdGVkIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJQdWJsaWNLZXkiLCAiQWNjb3VudCIsICJQZGEiLCAiQWNjb3VudCIsICJDb252ZXJ0ZXIiLCAiQ29sbGVjdGlvbiIsICJDb2xsZWN0aW9uTWludCIsICJDb252ZXJ0ZXIiLCAiQ3JlYXRvcnMiLCAiQ29udmVydGVyIiwgIkNvbXByZXNzZWROZnRNZXRhZGF0YSIsICJDb252ZXJ0ZXIiLCAiUm95YWx0eSIsICJDb252ZXJ0ZXIiLCAiTmZ0IiwgIkNvbnZlcnRlciIsICJNZW1vIiwgIkNvbnZlcnRlciIsICJNaW50IiwgIkNvbnZlcnRlciIsICJSZWd1bGFyTmZ0TWV0YWRhdGEiLCAiQ29udmVydGVyIiwgIlByb3BlcnRpZXMiLCAiQ29udmVydGVyIiwgIlVzZXMiLCAiQ29udmVydGVyIiwgIlRva2VuTWV0YWRhdGEiLCAiQ29udmVydGVyIiwgIlRyYW5zZmVyQ2hlY2tlZCIsICJDb252ZXJ0ZXIiLCAiVHJhbnNmZXIiLCAiQ29udmVydGVyIiwgIlZhbGlkYXRvciIsICJNZXNzYWdlIiwgIkNvbnZlcnRlciIsICJOb2RlIiwgIlJlc3VsdCIsICJicyIsICJBY2NvdW50IiwgIlB1YmxpY0tleSIsICJLZXlwYWlyIl0KfQo= \ No newline at end of file +//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uLy4uL3N1aXRlLXV0aWxzL3NyYy9jb25zdGFudHMudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvYmF0Y2gudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY29tbW9uLnRzIiwgIi4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ge1xuICAgICAgY29uc3QgW3B1YmxpY0tleV0gPSBQdWJsaWNLZXkuZmluZFByb2dyYW1BZGRyZXNzU3luYyhcbiAgICAgICAgW1xuICAgICAgICAgIEJ1ZmZlci5mcm9tKCdtZXRhZGF0YScpLFxuICAgICAgICAgIFBST0dSQU1fSUQudG9CdWZmZXIoKSxcbiAgICAgICAgICBhZGRyZXNzLnRvUHVibGljS2V5KCkudG9CdWZmZXIoKSxcbiAgICAgICAgICBCdWZmZXIuZnJvbSgnZWRpdGlvbicpLFxuICAgICAgICBdLFxuICAgICAgICBQUk9HUkFNX0lELFxuICAgICAgKTtcbiAgICAgIHJldHVybiBwdWJsaWNLZXk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBnZXRUcmVlQXV0aG9yaXR5ID0gKGFkZHJlc3M6IFB1YmtleSk6IFB1YmxpY0tleSA9PiB7XG4gICAgICBjb25zdCBbcHVibGljS2V5XSA9IFB1YmxpY0tleS5maW5kUHJvZ3JhbUFkZHJlc3NTeW5jKFxuICAgICAgICBbYWRkcmVzcy50b1B1YmxpY0tleSgpLnRvQnVmZmVyKCldLFxuICAgICAgICBNUExfQlVCQkxFR1VNX1BST0dSQU1fSUQudG9QdWJsaWNLZXkoKSxcbiAgICAgICk7XG4gICAgICByZXR1cm4gcHVibGljS2V5O1xuICAgIH07XG5cbiAgICBleHBvcnQgY29uc3QgZ2V0Qmd1bVNpZ25lciA9ICgpOiBQdWJsaWNLZXkgPT4ge1xuICAgICAgY29uc3QgW3B1YmxpY0tleV0gPSBQdWJsaWNLZXkuZmluZFByb2dyYW1BZGRyZXNzU3luYyhcbiAgICAgICAgW0J1ZmZlci5mcm9tKCdjb2xsZWN0aW9uX2NwaScsICd1dGY4JyldLFxuICAgICAgICBNUExfQlVCQkxFR1VNX1BST0dSQU1fSUQudG9QdWJsaWNLZXkoKSxcbiAgICAgICk7XG4gICAgICByZXR1cm4gcHVibGljS2V5O1xuICAgIH07XG5cbiAgICBleHBvcnQgY29u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SB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzUm95YWx0eShtZXRhZGF0YS5yb3lhbHR5KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlcl9mZWVfYmFzaXNfcG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJGZWVCYXNpc1BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0YWRhdGEubmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzeW1ib2wnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLnN5bWJvbCkge1xuICAgICAgICAgICAgICByZXMgPSBpc1N5bWJvbChtZXRhZGF0YS5zeW1ib2wpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHJlcyAmJiByZXMuaXNFcnIpIHtcbiAgICAgICAgICByZXN1bHRzLnB1c2goLi4ucmVz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bnZlcnRlciIsICJVc2VzIiwgIkNvbnZlcnRlciIsICJUb2tlbk1ldGFkYXRhIiwgIkNvbnZlcnRlciIsICJUcmFuc2ZlckNoZWNrZWQiLCAiQ29udmVydGVyIiwgIlRyYW5zZmVyIiwgIkNvbnZlcnRlciIsICJWYWxpZGF0b3IiLCAiTWVzc2FnZSIsICJDb252ZXJ0ZXIiLCAiTm9kZSIsICJSZXN1bHQiLCAiYnMiLCAiQWNjb3VudCIsICJQdWJsaWNLZXkiLCAiS2V5cGFpciJdCn0K \ No newline at end of file diff --git a/packages/node/dist/index.js b/packages/node/dist/index.js index 7a82cd568..83d701cdd 100644 --- a/packages/node/dist/index.js +++ b/packages/node/dist/index.js @@ -414,14 +414,11 @@ var TransactionBuilder5; // ../global/src/index.ts var import_web38 = require("@solana/web3.js"); -// ../account/src/associated.ts -var import_spl_token = require("@solana/spl-token"); - // ../account/src/keypair.ts var import_web36 = require("@solana/web3.js"); var import_bs58 = __toESM(require("bs58")); var Account; -((Account5) => { +((Account4) => { class Keypair4 { secret; pubkey; @@ -457,111 +454,16 @@ var Account; }); }; } - Account5.Keypair = Keypair4; + Account4.Keypair = Keypair4; })(Account || (Account = {})); -// ../account/src/associated.ts -var Account2; -((Account5) => { - let Associated; - ((Associated2) => { - const RETRY_OVER_LIMIT = 10; - const RETRY_SLEEP_TIME = 3; - const get = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const res = await (0, Associated2.makeOrCreateInstruction)( - mint, - owner, - new Account.Keypair({ secret: feePayer }).pubkey, - allowOwnerOffCurve - ); - if (!res.inst) { - return res.tokenAccount; - } - return new TransactionBuilder6.Common( - [res.inst], - [], - feePayer.toKeypair(), - res.tokenAccount - ); - }; - Associated2.retryGetOrCreate = async (mint, owner, feePayer) => { - let counter = 1; - while (counter < RETRY_OVER_LIMIT) { - try { - const inst = await get(mint, owner, feePayer, true); - if (inst && typeof inst === "string") { - debugLog("# associatedTokenAccount: ", inst); - return inst; - } else if (inst instanceof TransactionBuilder6.Common) { - (await inst.submit()).map( - async (ok) => { - await Node.confirmedSig(ok); - return inst.data; - }, - (err) => { - debugLog("# Error submit retryGetOrCreate: ", err); - throw err; - } - ); - } - } catch (e) { - debugLog(`# retry: ${counter} create token account: `, e); - debugLog(`# mint: ${mint}, owner: ${owner}, feePayer: ${feePayer}`); - } - await sleep(RETRY_SLEEP_TIME); - counter++; - } - throw Error(`retry action is over limit ${RETRY_OVER_LIMIT}`); - }; - Associated2.makeOrCreateInstruction = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const associatedTokenAccount = (0, import_spl_token.getAssociatedTokenAddressSync)( - mint.toPublicKey(), - owner.toPublicKey(), - allowOwnerOffCurve, - import_spl_token.TOKEN_PROGRAM_ID, - import_spl_token.ASSOCIATED_TOKEN_PROGRAM_ID - ); - debugLog("# associatedTokenAccount: ", associatedTokenAccount.toString()); - try { - await (0, import_spl_token.getAccount)( - Node.getConnection(), - associatedTokenAccount, - Node.getConnection().commitment, - import_spl_token.TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst: void 0 - }; - } catch (error) { - if (!(error instanceof import_spl_token.TokenAccountNotFoundError) && !(error instanceof import_spl_token.TokenInvalidAccountOwnerError)) { - throw Error("Unexpected error"); - } - const payer = !feePayer ? owner : feePayer; - const inst = (0, import_spl_token.createAssociatedTokenAccountInstruction)( - payer.toPublicKey(), - associatedTokenAccount, - owner.toPublicKey(), - mint.toPublicKey(), - import_spl_token.TOKEN_PROGRAM_ID, - import_spl_token.ASSOCIATED_TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst - }; - } - }; - })(Associated = Account5.Associated || (Account5.Associated = {})); -})(Account2 || (Account2 = {})); - // ../account/src/pda.ts var import_web37 = require("@solana/web3.js"); var import_mpl_token_metadata = require("@metaplex-foundation/mpl-token-metadata"); var import_mpl_bubblegum = require("@metaplex-foundation/mpl-bubblegum"); var import_bn = __toESM(require("bn.js")); -var Account3; -((Account5) => { +var Account2; +((Account4) => { let Pda; ((Pda2) => { Pda2.getMetadata = (address) => { @@ -613,14 +515,13 @@ var Account3; ); return assetId.toString(); }; - })(Pda = Account5.Pda || (Account5.Pda = {})); -})(Account3 || (Account3 = {})); + })(Pda = Account4.Pda || (Account4.Pda = {})); +})(Account2 || (Account2 = {})); // ../account/src/index.ts -var Account4 = { - ...Account2, +var Account3 = { ...Account, - ...Account3 + ...Account2 }; // ../global/src/index.ts @@ -651,7 +552,7 @@ String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, op } return url; } - if (Account4.Keypair.isPubkey(addressOrSignature)) { + if (Account3.Keypair.isPubkey(addressOrSignature)) { if (explorer === "solanafm" /* SolanaFM */) { url = `${Constants.EXPLORER_SOLANAFM_URL}/address/${addressOrSignature}?cluster=${cluster}`; } else if (explorer === "xray" /* Xray */) { @@ -671,13 +572,13 @@ String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, op return url; }; String.prototype.toPublicKey = function() { - if (!Account4.Keypair.isPubkey(this.toString())) { + if (!Account3.Keypair.isPubkey(this.toString())) { throw Error(`No match KeyPair.PubKey: ${this.toString()}`); } return new import_web38.PublicKey(this.toString()); }; String.prototype.toKeypair = function() { - if (!Account4.Keypair.isSecret(this.toString())) { + if (!Account3.Keypair.isSecret(this.toString())) { throw Error(`No match KeyPair.Secret: ${this.toString()}`); } const decoded = import_bs582.default.decode(this.toString()); @@ -713,9 +614,6 @@ var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { console.log("[DEBUG]", data1, data2, data3, data4); } }; -var sleep = async (sec) => { - return new Promise((r) => setTimeout(r, sec * 1e3)); -}; var isPromise = (obj) => { return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; }; @@ -1526,4 +1424,4 @@ var Node; 0 && (module.exports = { Node }); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4u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i9cbiAgICBleHBvcnQgY29uc3QgcmV0cnlHZXRPckNyZWF0ZSA9IGFzeW5jIChcbiAgICAgIG1pbnQ6IFB1YmtleSxcbiAgICAgIG93bmVyOiBQdWJrZXksXG4gICAgICBmZWVQYXllcjogU2VjcmV0LFxuICAgICk6IFByb21pc2U8c3RyaW5nPiA9PiB7XG4gICAgICBsZXQgY291bnRlciA9IDE7XG4gICAgICB3aGlsZSAoY291bnRlciA8IFJFVFJZX09WRVJfTElNSVQpIHtcbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICBjb25zdCBpbnN0ID0gYXdhaXQgZ2V0KG1pbnQsIG93bmVyLCBmZWVQYXllciwgdHJ1ZSk7XG5cbiAgICAgICAgICBpZiAoaW5zdCAmJiB0eXBlb2YgaW5zdCA9PT0gJ3N0cmluZycpIHtcbiAgICAgICAgICAgIGRlYnVnTG9nKCcjIGFzc29jaWF0ZWRUb2tlbkFjY291bnQ6ICcsIGluc3QpO1xuICAgICAgICAgICAgcmV0dXJuIGluc3Q7XG4gICAgICAgICAgfSBlbHNlIGlmIChpbnN0IGluc3RhbmNlb2YgVHJhbnNhY3Rpb25CdWlsZGVyLkNvbW1vbikge1xuICAgICAgICAgICAgKGF3YWl0IGluc3Quc3VibWl0KCkpLm1hcChcbiAgICAgICAgICAgICAgYXN5bmMgKG9rOiBzdHJpbmcpID0+IHtcbiAgICAgICAgICAgICAgICBhd2FpdCBOb2RlLmNvbmZpcm1lZFNpZyhvayk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGluc3QuZGF0YTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgKGVycjogRXJyb3IpID0+IHtcbiAgICAgICAgICAgICAgICBkZWJ1Z0xvZygnIyBFcnJvciBzdWJtaXQgcmV0cnlHZXRPckNyZWF0ZTogJywgZXJyKTtcbiAgICAgICAgICAgICAgICB0aHJvdyBlcnI7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cb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gIH0+ID0+IHtcbiAgICAgIGNvbnN0IGFzc29jaWF0ZWRUb2tlbkFjY291bnQgPSBnZXRBc3NvY2lhdGVkVG9rZW5BZGRyZXNzU3luYyhcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICBhbGxvd093bmVyT2ZmQ3VydmUsXG4gICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGFzc29jaWF0ZWRUb2tlbkFjY291bnQ6ICcsIGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSk7XG5cbiAgICAgIHRyeSB7XG4gICAgICAgIC8vIERvbnQgdXNlIFJlc3VsdFxuICAgICAgICBhd2FpdCBnZXRBY2NvdW50KFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCkuY29tbWl0bWVudCxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3Q6IHVuZGVmaW5lZCxcbiAgICAgICAgfTtcbiAgICAgIH0gY2F0Y2ggKGVycm9yOiB1bmtub3duKSB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5BY2NvdW50Tm90Rm91bmRFcnJvcikgJiZcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5JbnZhbGlkQWNjb3VudE93bmVyRXJyb3IpXG4gICAgICAgICkge1xuIC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bmFsU2lnbmVycyA9IHRoaXMuc2lnbmVycztcblxuICAgICAgICBpZiAodGhpcy5mZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gdGhpcy5mZWVQYXllci5wdWJsaWNLZXk7XG4gICAgICAgICAgZmluYWxTaWduZXJzID0gW3RoaXMuZmVlUGF5ZXIsIC4uLnRoaXMuc2lnbmVyc107XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLmluc3RydWN0aW9ucy5mb3JFYWNoKChpbnN0KSA9PiB0cmFuc2FjdGlvbi5hZGQoaW5zdCkpO1xuXG4gICAgICAgIGNvbnN0IG9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IE1BWF9SRVRSSUVTLFxuICAgICAgICB9O1xuXG4gICAgICAgIGlmIChOb2RlLmdldENvbm5lY3Rpb24oKS5ycGNFbmRwb2ludCA9PT0gQ29uc3RhbnRzLkVuZFBvaW50VXJsLnByZCkge1xuICAgICAgICAgIGRlYnVnTG9nKCcjIENoYW5nZSBtZXRhcGxleCBjbHVzdGVyIG9uIG1haW5uZXQtYmV0YScpO1xuICAgICAgICAgIE5vZGUuY2hhbmdlQ29ubmVjdGlvbih7IGNsdXN0ZXI6IENvbnN0YW50cy5DbHVzdGVyLnByZE1ldGFwbGV4IH0pO1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgIG9wdGlvbnMsXG4gICAgICAgICk7XG4gICAgICB9KTtcbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHtcbiAgQ29uZmlybU9wdGlvbnMsXG4gIFRyYW5zYWN0aW9uLFxuICBUcmFuc2FjdGlvblN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pZiAob2JqLmlzRXJyKSB7XG4gICAgICAgIHJldHVybiBvYmo7XG4gICAgICB9IGVsc2UgaWYgKG9iai52YWx1ZS5jYW5TdWJtaXQpIHtcbiAgICAgICAgZGVidWdMb2coJyMgUmVzdWx0IGJhdGNoIGNhblN1Ym1pdCcpO1xuICAgICAgICBjb25zdCBzaWcgPSBhd2FpdCAob2JqIGFzIFBhcnRpYWxTaWduU3RydWN0dXJlKS5zdWJtaXQoZmVlUGF5ZXIpO1xuICAgICAgICBpZiAoc2lnLmlzRXJyKSB7XG4gICAgICAgICAgcmV0dXJuIHNpZztcbiAgICAgICAgfVxuICAgICAgICBhd2FpdCBOb2RlLmNvbmZpcm1lZFNpZyhzaWcudmFsdWUpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgZGVidWdMb2coJyMgUmVzdWx0IGJhdGNoIG90aGVyIHRoYW4gY2FuU3VibWl0Jyk7XG4gICAgICAgIGlmICh0aGlzLmxlbmd0aCA9PSBpKSB7XG4gICAgICAgICAgLy8gbGFzdCBvYmplY3RcbiAgICAgICAgICByZXR1cm4gb2JqLnN1Ym1pdChmZWVQYXllcik7XG4gICAgICAgIH1cbiAgICAgICAgb2JqLnN1Ym1pdChmZWVQYXllcik7XG4gICAgICB9XG4gICAgICBpKys7XG4gICAgfVxuICB9IGVsc2Uge1xuICAgIGNvbnN0IGluc3RydWN0aW9uczogQ29tbW9uU3RydWN0dXJlIHwgTWludFN0cnVjdHVyZVtdID0gW107XG4gICAgZm9yIChjb25zdCBvYmogb2YgdGhpcykge1xuICAgICAgaWYgKG9iai5pc0Vycikge1xuICAgICAgICByZXR1cm4gb2JqO1xuICAgICAgfSBlbHNlIGlmIChvYmouaXNPaykge1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChvYmoudmFsdWUpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgcmV0dXJuIFJlc3VsdC5lcnIoRXJyb3IoJ09ubHkgQXJyYXkgSW5zdHJ1Y3Rpb24gb2J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WFnZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdyb3lhbHR5JzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEucm95YWx0eSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1JveWFsdHkobWV0YWRhdGEucm95YWx0eSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ25hbWUnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLm5hbWUpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNOYW1lKG1ldGFkYXRhLm5hbWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc3ltYm9sJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5zeW1ib2wpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTeW1ib2wobWV0YWRh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sZGVyIiwgImltcG9ydF93ZWIzIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiaW1wb3J0X3dlYjMiLCAiaW1wb3J0X3dlYjMiLCAiQWNjb3VudCIsICJLZXlwYWlyIiwgImJzIiwgIk9yaWdpbmFsIiwgImltcG9ydF93ZWIzIiwgIkFjY291bnQiLCAiUGRhIiwgIkJOIiwgIkFjY291bnQiLCAiaW1wb3J0X2JzNTgiLCAiQWNjb3VudCIsICJicyIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiUmVzdWx0IiwgIlJlc3VsdCIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiQ29udmVydGVyIiwgIkNvbGxlY3Rpb24iLCAiQ29sbGVjdGlvbk1pbnQiLCAiQ29udmVydGVyIiwgIkNyZWF0b3JzIiwgIkNvbnZlcnRlciIsICJDb21wcmVzc2VkTmZ0TWV0YWRhdGEiLCAiQ29udmVydGVyIiwgIlJveWFsdHkiLCAiQ29udmVydGVyIiwgIk5mdCIsICJDb252ZXJ0ZXIiLCAiTWVtbyIsICJDb252ZXJ0ZXIiLCAiTWludCIsICJDb252ZXJ0ZXIiLCAiUmVndWxhck5mdE1ldGFkYXRhIiwgIkNvbnZlcnRlciIsICJQcm9wZXJ0aWVzIiwgIkNvbnZlcnRlciIsICJVc2VzIiwgIkNvbnZlcnRlciIsICJUb2tlbk1ldGFkYXRhIiwgIkNvbnZlcnRlciIsICJUcmFuc2ZlckNoZWNrZWQiLCAiQ29udmVydGVyIiwgIlRyYW5zZmVyIiwgIkNvbnZlcnRlciIsICJWYWxpZGF0b3IiLCAiTWVzc2FnZSIsICJDb252ZXJ0ZXIiLCAiaW1wb3J0X3dlYjMiLCAiTm9kZSIsICJSZXN1bHQiXQp9Cg== \ No newline at end of file diff --git a/packages/node/dist/index.mjs b/packages/node/dist/index.mjs index 46999ffb1..31328fa59 100644 --- a/packages/node/dist/index.mjs +++ b/packages/node/dist/index.mjs @@ -389,22 +389,11 @@ var TransactionBuilder5; // ../global/src/index.ts import { Keypair as Keypair3, LAMPORTS_PER_SOL, PublicKey as PublicKey4 } from "@solana/web3.js"; -// ../account/src/associated.ts -import { - ASSOCIATED_TOKEN_PROGRAM_ID, - createAssociatedTokenAccountInstruction, - getAccount, - getAssociatedTokenAddressSync, - TOKEN_PROGRAM_ID, - TokenAccountNotFoundError, - TokenInvalidAccountOwnerError -} from "@solana/spl-token"; - // ../account/src/keypair.ts import { Keypair as Original, PublicKey as PublicKey2 } from "@solana/web3.js"; import bs from "bs58"; var Account; -((Account5) => { +((Account4) => { class Keypair4 { secret; pubkey; @@ -440,111 +429,16 @@ var Account; }); }; } - Account5.Keypair = Keypair4; + Account4.Keypair = Keypair4; })(Account || (Account = {})); -// ../account/src/associated.ts -var Account2; -((Account5) => { - let Associated; - ((Associated2) => { - const RETRY_OVER_LIMIT = 10; - const RETRY_SLEEP_TIME = 3; - const get = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const res = await (0, Associated2.makeOrCreateInstruction)( - mint, - owner, - new Account.Keypair({ secret: feePayer }).pubkey, - allowOwnerOffCurve - ); - if (!res.inst) { - return res.tokenAccount; - } - return new TransactionBuilder6.Common( - [res.inst], - [], - feePayer.toKeypair(), - res.tokenAccount - ); - }; - Associated2.retryGetOrCreate = async (mint, owner, feePayer) => { - let counter = 1; - while (counter < RETRY_OVER_LIMIT) { - try { - const inst = await get(mint, owner, feePayer, true); - if (inst && typeof inst === "string") { - debugLog("# associatedTokenAccount: ", inst); - return inst; - } else if (inst instanceof TransactionBuilder6.Common) { - (await inst.submit()).map( - async (ok) => { - await Node.confirmedSig(ok); - return inst.data; - }, - (err) => { - debugLog("# Error submit retryGetOrCreate: ", err); - throw err; - } - ); - } - } catch (e) { - debugLog(`# retry: ${counter} create token account: `, e); - debugLog(`# mint: ${mint}, owner: ${owner}, feePayer: ${feePayer}`); - } - await sleep(RETRY_SLEEP_TIME); - counter++; - } - throw Error(`retry action is over limit ${RETRY_OVER_LIMIT}`); - }; - Associated2.makeOrCreateInstruction = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const associatedTokenAccount = getAssociatedTokenAddressSync( - mint.toPublicKey(), - owner.toPublicKey(), - allowOwnerOffCurve, - TOKEN_PROGRAM_ID, - ASSOCIATED_TOKEN_PROGRAM_ID - ); - debugLog("# associatedTokenAccount: ", associatedTokenAccount.toString()); - try { - await getAccount( - Node.getConnection(), - associatedTokenAccount, - Node.getConnection().commitment, - TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst: void 0 - }; - } catch (error) { - if (!(error instanceof TokenAccountNotFoundError) && !(error instanceof TokenInvalidAccountOwnerError)) { - throw Error("Unexpected error"); - } - const payer = !feePayer ? owner : feePayer; - const inst = createAssociatedTokenAccountInstruction( - payer.toPublicKey(), - associatedTokenAccount, - owner.toPublicKey(), - mint.toPublicKey(), - TOKEN_PROGRAM_ID, - ASSOCIATED_TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst - }; - } - }; - })(Associated = Account5.Associated || (Account5.Associated = {})); -})(Account2 || (Account2 = {})); - // ../account/src/pda.ts import { PublicKey as PublicKey3 } from "@solana/web3.js"; import { PROGRAM_ID } from "@metaplex-foundation/mpl-token-metadata"; import { MPL_BUBBLEGUM_PROGRAM_ID } from "@metaplex-foundation/mpl-bubblegum"; import BN from "bn.js"; -var Account3; -((Account5) => { +var Account2; +((Account4) => { let Pda; ((Pda2) => { Pda2.getMetadata = (address) => { @@ -596,14 +490,13 @@ var Account3; ); return assetId.toString(); }; - })(Pda = Account5.Pda || (Account5.Pda = {})); -})(Account3 || (Account3 = {})); + })(Pda = Account4.Pda || (Account4.Pda = {})); +})(Account2 || (Account2 = {})); // ../account/src/index.ts -var Account4 = { - ...Account2, +var Account3 = { ...Account, - ...Account3 + ...Account2 }; // ../global/src/index.ts @@ -634,7 +527,7 @@ String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, op } return url; } - if (Account4.Keypair.isPubkey(addressOrSignature)) { + if (Account3.Keypair.isPubkey(addressOrSignature)) { if (explorer === "solanafm" /* SolanaFM */) { url = `${Constants.EXPLORER_SOLANAFM_URL}/address/${addressOrSignature}?cluster=${cluster}`; } else if (explorer === "xray" /* Xray */) { @@ -654,13 +547,13 @@ String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, op return url; }; String.prototype.toPublicKey = function() { - if (!Account4.Keypair.isPubkey(this.toString())) { + if (!Account3.Keypair.isPubkey(this.toString())) { throw Error(`No match KeyPair.PubKey: ${this.toString()}`); } return new PublicKey4(this.toString()); }; String.prototype.toKeypair = function() { - if (!Account4.Keypair.isSecret(this.toString())) { + if (!Account3.Keypair.isSecret(this.toString())) { throw Error(`No match KeyPair.Secret: ${this.toString()}`); } const decoded = bs2.decode(this.toString()); @@ -696,9 +589,6 @@ var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { console.log("[DEBUG]", data1, data2, data3, data4); } }; -var sleep = async (sec) => { - return new Promise((r) => setTimeout(r, sec * 1e3)); -}; var isPromise = (obj) => { return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; }; @@ -1511,4 +1401,4 @@ var Node; export { Node }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9iYXRjaC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jb21tb24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvbWludC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9wYXJ0aWFsLXNpZ24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY2FsY3VsYXRlLX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bnNhY3Rpb25TaWduYXR1cmUsIEVycm9yPj4gPT4ge1xuICAgICAgcmV0dXJuIFRyeShhc3luYyAoKSA9PiB7XG4gICAgICAgIGxldCBpID0gMDtcbiAgICAgICAgZm9yIChjb25zdCBhIG9mIGFycikge1xuICAgICAgICAgIGlmICghYS5pbnN0cnVjdGlvbnMgJiYgIWEuc2lnbmVycykge1xuICAgICAgICAgICAgdGhyb3cgRXJyb3IoXG4gICAgICAgICAgICAgIGBvbmx5IEluc3RydWN0aW9uIG9iamVjdCB0aGF0IGNhbiB1c2UgYmF0Y2hTdWJtaXQoKS5cbiAgICAgICAgICAgIEluZGV4OiAke2l9LCBTZXQgdmFsdWU6ICR7SlNPTi5zdHJpbmdpZnkoYSl9YCxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIGkrKztcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IGluc3RydWN0aW9ucyA9IGFyci5mbGF0TWFwKChhKSA9PiBhLmluc3RydWN0aW9ucyk7XG4gICAgICAgIGNvbnN0IHNpZ25lcnMgPSBhcnIuZmxhdE1hcCgoYSkgPT4gYS5zaWduZXJzKTtcbiAgICAgICAgY29uc3QgZmVlUGF5ZXJzID0gYXJyLmZpbHRlcigoYSkgPT4gYS5mZWVQYXllciAhPT0gdW5kZWZpbmVkKTtcbiAgICAgICAgbGV0IGZlZVBheWVyID0gc2lnbmVyc1swXTtcbiAgICAgICAgaWYgKGZlZVBheWVycy5sZW5ndGggPiAwICYmIGZlZVBheWVyc1swXS5mZWVQYXllcikge1xuICAgICAgICAgIGZlZVBheWVyID0gZmVlUGF5ZXJzWzBdLmZlZVBheWVyO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgdHJhbnNhY3Rpb24gPSBuZXcgVHJhbnNhY3Rpb24oKTtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHNpZ25lcnM7XG4gICAgICAgIGlmIChmZWVQYXllcikge1xuICAgICAgICAgIHRyY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c3RyaW5nKSA9PiB7XG4gICAgICAgICAgICAgICAgYXdhaXQgTm9kZS5jb25maXJtZWRTaWcob2spO1xuICAgICAgICAgICAgICAgIHJldHVybiBpbnN0LmRhdGE7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIChlcnI6IEVycm9yKSA9PiB7XG4gICAgICAgICAgICAgICAgZGVidWdMb2coJyMgRXJyb3Igc3VibWl0IHJldHJ5R2V0T3JDcmVhdGU6ICcsIGVycik7XG4gICAgICAgICAgICAgICAgdGhyb3cgZXJyO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICBkZWJ1Z0xvZyhgIyByZXRyeTogJHtjb3VudGVyfSBjcmVhdGUgdG9rZW4gYWNjb3VudDogYCwgZSk7XG4gICAgICAgICAgZGVidWdMb2coYCMgbWludDogJHttaW50fSwgb3duZXI6ICR7b3duZXJ9LCBmZWVQYXllcjogJHtmZWVQYXllcn1gKTtcbiAgICAgICAgfVxuICAgICAgICBhd2FpdCBzbGVlcChSRVRSWV9TTEVFUF9USU1FKTtcbiAgICAgICAgY291bnRlcisrO1xuICAgICAgfVxuICAgICAgdGhyb3cgRXJyb3IoYHJldHJ5IGFjdGlvbiBpcyBvdmVyIGxpbWl0ICR7UkVUUllfT1ZFUl9MSU1JVH1gKTtcbiAgICB9O1xuXG4gICAgLyoqXG4gICAgICogW01haW4gbG9naWNdR2V0IEFzc29jaWF0ZWQgdG9rZW4gQWNjb3VudC5cbiAgICAgKiBpZiBub3QgY3JlYXRlZCwgY3JlYXRlIG5ldyB0b2tlbiBhY2NvdWludFxuICAgICAqXG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG1pbnRcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gb3duZXJcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gZmVlUGF5ZXJcbiAgICAgKiBAcmV0dXJucyBQcm9taXN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mV0dXJuIHtcbiAgICAgICAgICB0b2tlbkFjY291bnQ6IGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSxcbiAgICAgICAgICBpbnN0OiB1bmRlZmluZWQsXG4gICAgICAgIH07XG4gICAgICB9IGNhdGNoIChlcnJvcjogdW5rbm93bikge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuQWNjb3VudE5vdEZvdW5kRXJyb3IpICYmXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuSW52YWxpZEFjY291bnRPd25lckVycm9yKVxuICAgICAgICApIHtcbiAgICAgICAgICB0aHJvdyBFcnJvcignVW5leHBlY3RlZCBlcnJvcicpO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgcGF5ZXIgPSAhZmVlUGF5ZXIgPyBvd25lciA6IGZlZVBheWVyO1xuXG4gICAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVBc3NvY2lhdGVkVG9rZW5BY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgcGF5ZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdCxcbiAgICAgICAgfTtcbiAgICAgIH1cbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHsgS2V5cGFpciBhcyBPcmlnaW5hbCwgUHVibGljS2V5IH0g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HJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ25hbWUnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLm5hbWUpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNOYW1lKG1ldGFkYXRhLm5hbWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc3ltYm9sJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5zeW1ib2wpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTeW1ib2wobWV0YWRhdGEuc3ltYm9sKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgICAgIGlmIChyZXMgJiYgcmVzLmlzRXJyKSB7XG4gICAgICAgICAgcmVzdWx0cy5wdXNoKC4uLnJlcy5lcnJvci5kZXRhaWxzKTtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgICBpZiAocmVzdWx0cy5sZW5ndGggPiAwKSB7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPVxuICAgICAgICAgICdDYXVnaHQgaW4gdGhlIHZhbGlkYXRpb24gZXJyb3JzLiBzZWUgaW5mb3JtYXRpb24gZS5nOiBlcnI8VmFsaWRhdG9yRXJyb3I+LmRldGFpbHMnO1xuICAgICAgICB0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mVzdWx0IiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJDb252ZXJ0ZXIiLCAiQ29sbGVjdGlvbiIsICJDb2xsZWN0aW9uTWludCIsICJDb252ZXJ0ZXIiLCAiQ3JlYXRvcnMiLCAiQ29udmVydGVyIiwgIkNvbXByZXNzZWROZnRNZXRhZGF0YSIsICJDb252ZXJ0ZXIiLCAiUm95YWx0eSIsICJDb252ZXJ0ZXIiLCAiTmZ0IiwgIkNvbnZlcnRlciIsICJNZW1vIiwgIkNvbnZlcnRlciIsICJNaW50IiwgIkNvbnZlcnRlciIsICJSZWd1bGFyTmZ0TWV0YWRhdGEiLCAiQ29udmVydGVyIiwgIlByb3BlcnRpZXMiLCAiQ29udmVydGVyIiwgIlVzZXMiLCAiQ29udmVydGVyIiwgIlRva2VuTWV0YWRhdGEiLCAiQ29udmVydGVyIiwgIlRyYW5zZmVyQ2hlY2tlZCIsICJDb252ZXJ0ZXIiLCAiVHJhbnNmZXIiLCAiQ29udmVydGVyIiwgIlZhbGlkYXRvciIsICJNZXNzYWdlIiwgIkNvbnZlcnRlciIsICJOb2RlIiwgIlJlc3VsdCJdCn0K \ No newline at end of file +//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9iYXRjaC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jb21tb24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvbWludC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9wYXJ0aWFsLXNpZ24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY2FsY3VsYXRlLXR4c2l6ZS50cyIsICIuLi8uLi9nbG9iYWwvc3JjL2luZGV4LnR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4ge1xuICAgICAgICBsZXQgaSA9IDA7XG4gICAgICAgIGZvciAoY29uc3QgYSBvZiBhcnIpIHtcbiAgICAgICAgICBpZiAoIWEuaW5zdHJ1Y3Rpb25zICYmICFhLnNpZ25lcnMpIHtcbiAgICAgICAgICAgIHRocm93IEVycm9yKFxuICAgICAgICAgICAgICBgb25seSBJbnN0cnVjdGlvbiBvYmplY3QgdGhhdCBjYW4gdXNlIGJhdGNoU3VibWl0KCkuXG4gICAgICAgICAgICBJbmRleDogJHtpfSwgU2V0IHZhbHVlOiAke0pTT04uc3RyaW5naWZ5KGEpfWAsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICBpKys7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBpbnN0cnVjdGlvbnMgPSBhcnIuZmxhdE1hcCgoYSkgPT4gYS5pbnN0cnVjdGlvbnMpO1xuICAgICAgICBjb25zdCBzaWduZXJzID0gYXJyLmZsYXRNYXAoKGEpID0+IGEuc2lnbmVycyk7XG4gICAgICAgIGNvbnN0IGZlZVBheWVycyA9IGFyci5maWx0ZXIoKGEpID0+IGEuZmVlUGF5ZXIgIT09IHVuZGVmaW5lZCk7XG4gICAgICAgIGxldCBmZWVQYXllciA9IHNpZ25lcnNbMF07XG4gICAgICAgIGlmIChmZWVQYXllcnMubGVuZ3RoID4gMCAmJiBmZWVQYXllcnNbMF0uZmVlUGF5ZXIpIHtcbiAgICAgICAgICBmZWVQYXllciA9IGZlZVBheWVyc1swXS5mZWVQYXllcjtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHRyYW5zYWN0aW9uID0gbmV3IFRyYW5zYWN0aW9uKCk7XG4gICAgICAgIGxldCBmaW5hbFNpZ25lcnMgPSBzaWduZXJzO1xuICAgICAgICBpZiAoZmVlUGF5ZXIpIHtcbiAgICAgICAgICB0cmFuc2FjdGlvbi5mZWVQYXllciA9IGZlZVBheWVyLnB1YmxpY0tleTtcbiAgICAgICAgICBmaW5hbFNp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vbiB9IGZyb20gJ34vdHlwZXMvcmVndWxhci1uZnQnO1xuaW1wb3J0IHsgSW50ZXJuYWxDcmVhdG9ycyB9IGZyb20gJ34vdHlwZXMvY29udmVydGVyJztcblxuZXhwb3J0IG5hbWVzcGFjZSBDb252ZXJ0ZXIge1xuICBleHBvcnQgbmFtZXNwYWNlIENyZWF0b3JzIHtcbiAgICBleHBvcnQgY29uc3QgaW50b0luZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IE9wdGlvbjxJbnRlcm5hbENyZWF0b3JzW10+ID0+IHtcbiAgICAgIGlmICghaW5wdXQpIHtcbiAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICB9XG4gICAgICByZXR1cm4gaW5wdXQubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvQ29tcHJlc3NlZE5mdEluZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IEludGVybmFsQ3JlYXRvcnNbXSA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBbXTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBpbnB1dCEubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZ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BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEuc3ltYm9sKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU3ltYm9sKG1ldGFkYXRhLnN5bWJvbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAocmVzICYmIHJlcy5pc0Vycikge1xuICAgICAgICAgIHJlc3VsdHMucHVzaCguLi5yZXMuZXJyb3IuZGV0YWlscyk7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgICAgaWYgKHJlc3VsdHMubGVuZ3RoID4gMCkge1xuICAgICAgICBjb25zdCBtZXNzYWdlID1cbiAgICAgICAgICAnQ2F1Z2h0IGluIHRoZSB2YWxpZGF0aW9uIGVycm9ycy4gc2VlIGluZm9ybWF0aW9uIGUuZzogZXJyPFZhbGlkYXRvckVycm9yPi5kZXRha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WxkZXIiLCAiVHJhbnNhY3Rpb24iLCAic2VuZEFuZENvbmZpcm1UcmFuc2FjdGlvbiIsICJUcmFuc2FjdGlvbiIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiVHJhbnNhY3Rpb24iLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIktleXBhaXIiLCAiUHVibGljS2V5IiwgIlB1YmxpY0tleSIsICJBY2NvdW50IiwgIktleXBhaXIiLCAiUHVibGljS2V5IiwgIkFjY291bnQiLCAiUGRhIiwgIkFjY291bnQiLCAiYnMiLCAiQWNjb3VudCIsICJQdWJsaWNLZXkiLCAiS2V5cGFpciIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiUmVzdWx0IiwgIlJlc3VsdCIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiQ29udmVydGVyIiwgIkNvbGxlY3Rpb24iLCAiQ29sbGVjdGlvbk1pbnQiLCAiQ29udmVydGVyIiwgIkNyZWF0b3JzIiwgIkNvbnZlcnRlciIsICJDb21wcmVzc2VkTmZ0TWV0YWRhdGEiLCAiQ29udmVydGVyIiwgIlJveWFsdHkiLCAiQ29udmVydGVyIiwgIk5mdCIsICJDb252ZXJ0ZXIiLCAiTWVtbyIsICJDb252ZXJ0ZXIiLCAiTWludCIsICJDb252ZXJ0ZXIiLCAiUmVndWxhck5mdE1ldGFkYXRhIiwgIkNvbnZlcnRlciIsICJQcm9wZXJ0aWVzIiwgIkNvbnZlcnRlciIsICJVc2VzIiwgIkNvbnZlcnRlciIsICJUb2tlbk1ldGFkYXRhIiwgIkNvbnZlcnRlciIsICJUcmFuc2ZlckNoZWNrZWQiLCAiQ29udmVydGVyIiwgIlRyYW5zZmVyIiwgIkNvbnZlcnRlciIsICJWYWxpZGF0b3IiLCAiTWVzc2FnZSIsICJDb252ZXJ0ZXIiLCAiTm9kZSIsICJSZXN1bHQiXQp9Cg== \ No newline at end of file diff --git a/packages/storage/dist/index.js b/packages/storage/dist/index.js index fc1fd979c..f45eaad40 100644 --- a/packages/storage/dist/index.js +++ b/packages/storage/dist/index.js @@ -482,14 +482,11 @@ var TransactionBuilder5; // ../global/src/index.ts var import_web39 = require("@solana/web3.js"); -// ../account/src/associated.ts -var import_spl_token = require("@solana/spl-token"); - // ../account/src/keypair.ts var import_web37 = require("@solana/web3.js"); var import_bs58 = __toESM(require("bs58")); var Account; -((Account5) => { +((Account4) => { class Keypair4 { secret; pubkey; @@ -525,111 +522,16 @@ var Account; }); }; } - Account5.Keypair = Keypair4; + Account4.Keypair = Keypair4; })(Account || (Account = {})); -// ../account/src/associated.ts -var Account2; -((Account5) => { - let Associated; - ((Associated2) => { - const RETRY_OVER_LIMIT = 10; - const RETRY_SLEEP_TIME = 3; - const get = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const res = await (0, Associated2.makeOrCreateInstruction)( - mint, - owner, - new Account.Keypair({ secret: feePayer }).pubkey, - allowOwnerOffCurve - ); - if (!res.inst) { - return res.tokenAccount; - } - return new TransactionBuilder6.Common( - [res.inst], - [], - feePayer.toKeypair(), - res.tokenAccount - ); - }; - Associated2.retryGetOrCreate = async (mint, owner, feePayer) => { - let counter = 1; - while (counter < RETRY_OVER_LIMIT) { - try { - const inst = await get(mint, owner, feePayer, true); - if (inst && typeof inst === "string") { - debugLog("# associatedTokenAccount: ", inst); - return inst; - } else if (inst instanceof TransactionBuilder6.Common) { - (await inst.submit()).map( - async (ok) => { - await Node.confirmedSig(ok); - return inst.data; - }, - (err) => { - debugLog("# Error submit retryGetOrCreate: ", err); - throw err; - } - ); - } - } catch (e) { - debugLog(`# retry: ${counter} create token account: `, e); - debugLog(`# mint: ${mint}, owner: ${owner}, feePayer: ${feePayer}`); - } - await sleep(RETRY_SLEEP_TIME); - counter++; - } - throw Error(`retry action is over limit ${RETRY_OVER_LIMIT}`); - }; - Associated2.makeOrCreateInstruction = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const associatedTokenAccount = (0, import_spl_token.getAssociatedTokenAddressSync)( - mint.toPublicKey(), - owner.toPublicKey(), - allowOwnerOffCurve, - import_spl_token.TOKEN_PROGRAM_ID, - import_spl_token.ASSOCIATED_TOKEN_PROGRAM_ID - ); - debugLog("# associatedTokenAccount: ", associatedTokenAccount.toString()); - try { - await (0, import_spl_token.getAccount)( - Node.getConnection(), - associatedTokenAccount, - Node.getConnection().commitment, - import_spl_token.TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst: void 0 - }; - } catch (error) { - if (!(error instanceof import_spl_token.TokenAccountNotFoundError) && !(error instanceof import_spl_token.TokenInvalidAccountOwnerError)) { - throw Error("Unexpected error"); - } - const payer = !feePayer ? owner : feePayer; - const inst = (0, import_spl_token.createAssociatedTokenAccountInstruction)( - payer.toPublicKey(), - associatedTokenAccount, - owner.toPublicKey(), - mint.toPublicKey(), - import_spl_token.TOKEN_PROGRAM_ID, - import_spl_token.ASSOCIATED_TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst - }; - } - }; - })(Associated = Account5.Associated || (Account5.Associated = {})); -})(Account2 || (Account2 = {})); - // ../account/src/pda.ts var import_web38 = require("@solana/web3.js"); var import_mpl_token_metadata = require("@metaplex-foundation/mpl-token-metadata"); var import_mpl_bubblegum = require("@metaplex-foundation/mpl-bubblegum"); var import_bn = __toESM(require("bn.js")); -var Account3; -((Account5) => { +var Account2; +((Account4) => { let Pda; ((Pda2) => { Pda2.getMetadata = (address) => { @@ -681,14 +583,13 @@ var Account3; ); return assetId.toString(); }; - })(Pda = Account5.Pda || (Account5.Pda = {})); -})(Account3 || (Account3 = {})); + })(Pda = Account4.Pda || (Account4.Pda = {})); +})(Account2 || (Account2 = {})); // ../account/src/index.ts -var Account4 = { - ...Account2, +var Account3 = { ...Account, - ...Account3 + ...Account2 }; // ../global/src/index.ts @@ -719,7 +620,7 @@ String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, op } return url; } - if (Account4.Keypair.isPubkey(addressOrSignature)) { + if (Account3.Keypair.isPubkey(addressOrSignature)) { if (explorer === "solanafm" /* SolanaFM */) { url = `${Constants.EXPLORER_SOLANAFM_URL}/address/${addressOrSignature}?cluster=${cluster}`; } else if (explorer === "xray" /* Xray */) { @@ -739,13 +640,13 @@ String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, op return url; }; String.prototype.toPublicKey = function() { - if (!Account4.Keypair.isPubkey(this.toString())) { + if (!Account3.Keypair.isPubkey(this.toString())) { throw Error(`No match KeyPair.PubKey: ${this.toString()}`); } return new import_web39.PublicKey(this.toString()); }; String.prototype.toKeypair = function() { - if (!Account4.Keypair.isSecret(this.toString())) { + if (!Account3.Keypair.isSecret(this.toString())) { throw Error(`No match KeyPair.Secret: ${this.toString()}`); } const decoded = import_bs582.default.decode(this.toString()); @@ -781,9 +682,6 @@ var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { console.log("[DEBUG]", data1, data2, data3, data4); } }; -var sleep = async (sec) => { - return new Promise((r) => setTimeout(r, sec * 1e3)); -}; var isBrowser = () => { return typeof window !== "undefined" && typeof window.document !== "undefined"; }; @@ -1758,4 +1656,4 @@ var Storage; ProvenanceLayer, Storage }); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uLy4uL3N1aXRlLXV0aWxzL3NyYy9jb25zdGFudHMudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvYmF0Y2gudHMiLCAiLi4vLi4vbm9kZS9zcmMvaW5kZXgudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY29tbW9uLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL21pbnQudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvcGFydGlhbC1zaWduLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ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GF5ZXI6IFNlY3JldCxcbiAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSA9IGZhbHNlLFxuICAgICk6IFByb21pc2U8c3RyaW5nIHwgQ29tbW9uU3RydWN0dXJlPFB1YmtleT4+ID0+IHtcbiAgICAgIGNvbnN0IHJlcyA9IGF3YWl0IG1ha2VPckNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICBtaW50LFxuICAgICAgICBvd25lcixcbiAgICAgICAgbmV3IEtleXBhaXIuS2V5cGFpcih7IHNlY3JldDogZmVlUGF5ZXIgfSkucHVia2V5LFxuICAgICAgICBhbGxvd093bmVyT2ZmQ3VydmUsXG4gICAgICApO1xuXG4gICAgICBpZiAoIXJlcy5pbnN0KSB7XG4gICAgICAgIHJldHVybiByZXMudG9rZW5BY2NvdW50O1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb248UHVia2V5PihcbiAgICAgICAgW3Jlcy5pbnN0XSxcbiAgICAgICAgW10sXG4gICAgICAgIGZlZVBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICByZXMudG9rZW5BY2NvdW50ISxcbiAgICAgICk7XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIFJldHJ5IGZ1bmN0aW9uIGlmIGNyZWF0ZSBuZXcgdG9rZW4gYWNjb3VpbnRcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBtaW50XG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAgICogQHBhcmFtIHtTZWNyZXR9IGZlZVBheWVyXG4gICAgICogQHJldHVybnMgUHJvbWlzZTxzdHJpbmc+XG4gICAgICovXG4gICAgZXhwb3J0IGNvbnN0IHJldHJ5R2V0T3JDcmVhdGUgPSBhc3luYyAoXG4gICAgICBtaW50OiBQdWJrZXksXG4gICAgICBvd25lcjogUHVia2V5LFxuICAgICAgZmVlUGF5ZXI6IFNlY3JldCxcbiAgICApOiBQcm9taXNlPHN0cmluZz4gPT4ge1xuICAgICAgbGV0IGNvdW50ZXIgPSAxO1xuICAgICAgd2hpbGUgKGNvdW50ZXIgPCBSRVRSWV9PVkVSX0xJTUlUKSB7XG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgY29uc3QgaW5zdCA9IGF3YWl0IGdldChtaW50LCBvd25lciwgZmVlUGF5ZXIsIHRydWUpO1xuXG4gICAgICAgICAgaWYgKGluc3QgJiYgdHlwZW9mIGluc3QgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICBkZWJ1Z0xvZygnIyBhc3NvY2lhdGVkVG9rZW5BY2NvdW50OiAnLCBpbnN0KTtcbiAgICAgICAgICAgIHJldHVybiBpbnN0O1xuICAgICAgICAgIH0gZWxzZSBpZiAoaW5zdCBpbnN0YW5jZW9mIFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb24pIHtcbiAgICAgICAgICAgIChhd2FpdCBpbnN0LnN1Ym1pdCgpKS5tYXAoXG4gICAgICAgICAgICAgIGFzeW5jIChvazogc3RyaW5nKSA9PiB7XG4gICAgICAgICAgICAgICAgYXdhaXQgTm9kZS5jb25maXJtZWRTaWcob2spO1xuICAgICAgICAgICAgICAgIHJldHVybiBpbnN0LmRhdGE7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIChlcnI6IEVycm9yKSA9PiB7XG4gICAgICAgICAgICAgICAgZGVidWdMb2coJyMgRXJyb3Igc3VibWl0IHJldHJ5R2V0T3JDcmVhdGU6ICcsIGVycik7XG4gICAgICAgICAgICAgICAgdGhyb3cgZXJyO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICBkZWJ1Z0xvZyhgIyByZXRyeTogJHtjb3VudGVyfSBjcmVhdGUgdG9rZW4gYWNjb3VudDogYCwgZSk7XG4gICAgICAgICAgZGVidWdMb2coYCMgbWludDogJHttaW50fSwgb3du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QdWJsaWNLZXkoKSxcbiAgICAgICAgYWxsb3dPd25lck9mZkN1cnZlLFxuICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICBBU1NPQ0lBVEVEX1RPS0VOX1BST0dSQU1fSUQsXG4gICAgICApO1xuXG4gICAgICBkZWJ1Z0xvZygnIyBhc3NvY2lhdGVkVG9rZW5BY2NvdW50OiAnLCBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCkpO1xuXG4gICAgICB0cnkge1xuICAgICAgICAvLyBEb250IHVzZSBSZXN1bHRcbiAgICAgICAgYXdhaXQgZ2V0QWNjb3VudChcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLmNvbW1pdG1lbnQsXG4gICAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICB0b2tlbkFjY291bnQ6IGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSxcbiAgICAgICAgICBpbnN0OiB1bmRlZmluZWQsXG4gICAgICAgIH07XG4gICAgICB9IGNhdGNoIChlcnJvcjogdW5rbm93bikge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuQWNjb3VudE5vdEZvdW5kRXJyb3IpICYmXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuSW52YWxpZEFjY291bnRPd25lckVycm9yKVxuICAgICAgICApIHtcbiAgICAgICAgICB0aHJvdyBFcnJvcignVW5leHBlY3RlZCBlcnJvcicpO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgcGF5ZXIgPSAhZmVlUGF5ZXIgPyBvd25lciA6IGZlZVBheWVyO1xuXG4gICAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVBc3NvY2lhdGVkVG9rZW5BY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgcGF5ZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdCxcbiAgICAgICAgfTtcbiAgICAgIH1cbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHsgS2V5cGFpciBhcyBPcmlnaW5hbCwgUHVibGljS2V5IH0gZnJvbSAnQHNvbGFuYS93ZWIzLmpzJztcbmltcG9ydCB7IFB1YmtleSwgU2VjcmV0IH0gZnJvbSAnfi90eXBlcy9hY2NvdW50JztcbmltcG9ydCBicyBmcm9tICdiczU4JztcblxuZXhwb3J0IG5hbWVzcGFjZSBBY2NvdW50IHtcbiAgZXhwb3J0IGNsYXNzIEtleXBhaXIge1xuICAgIHNlY3JldDogU2VjcmV0O1xuICAgIHB1YmtleTogUHVia2V5O1xuXG4gICAgY29uc3RydWN0b3IocGFyYW1zOiB7IHB1YmtleT86IFB1YmtleTsgc2VjcmV0OiBTZWNyZXQgfSkge1xuICAgICAgaWYgKCFwYXJhbXMucHVia2V5KSB7XG4gICAgICAgIGNvbnN0IGtleXBhaXIgPSBwYXJhbXMuc2VjcmV0LnRvS2V5cGFpcigpO1xuICAgICAgICB0aGlzLnB1YmtleSA9IGtleXBhaXIucHVibGljS2V5LnRvU3RyaW5nKCk7XG4gICAgICB9I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nVuY3Rpb24gKGZlZVBheWVyPzogU2VjcmV0KSB7XG4gIGlmIChmZWVQYXllcikge1xuICAgIGxldCBpID0gMTtcbiAgICBmb3IgYXdhaXQgKGNvbnN0IG9iaiBvZiB0aGlzKSB7XG4gICAgICBpZiAob2JqLmlzRXJyKSB7XG4gICAgICAgIHJldHVybiBvYmo7XG4gICAgICB9IGVsc2UgaWYgKG9iai52YWx1ZS5jYW5TdWJtaXQpIHtcbiAgICAgICAgZGVidWdMb2coJyMgUmVzdWx0IGJhdGNoIGNhblN1Ym1pdCcpO1xuICAgICAgICBjb25zdCBzaWcgPSBhd2FpdCAob2JqIGFzIFBhcnRpYWxTaWduU3RydWN0dXJlKS5zdWJtaXQoZmVlUGF5ZXIpO1xuICAgICAgICBpZiAoc2lnLmlzRXJyKSB7XG4gICAgICAgICAgcmV0dXJuIHNpZztcbiAgICAgICAgfVxuICAgICAgICBhd2FpdCBOb2RlLmNvbmZpcm1lZFNpZyhzaWcudmFsdWUpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgZGVidWdMb2coJyMgUmVzdWx0IGJhdGNoIG90aGVyIHRoYW4gY2FuU3VibWl0Jyk7XG4gICAgICAgIGlmICh0aGlzLmxlbmd0aCA9PSBpKSB7XG4gICAgICAgICAgLy8gbGFzdCBvYmplY3RcbiAgICAgICAgICByZXR1cm4gb2JqLnN1Ym1pdChmZWVQYXllcik7XG4gICAgICAgIH1cbiAgICAgICAgb2JqLnN1Ym1pdChmZWVQYXllcik7XG4gICAgICB9XG4gICAgICBpKys7XG4gICAgfVxuICB9IGVsc2Uge1xuICAgIGNvbnN0IGluc3RydWN0aW9uczogQ29tbW9uU3RydWN0dXJlIHwgTWludFN0cnVjdHVyZVtdID0gW107XG4gICAgZm9yIChjb25zdCBvYmogb2YgdGhpcykge1xuICAgICAgaWYgKG9iai5pc0Vycikge1xuICAgICAgICByZXR1cm4gb2JqO1xuICAgICAgfSBlbHNlIGlmIChvYmouaXNPaykge1xuICAgICAgICBp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KSxcbiAgICAgICAgICBzaGFyZTogZGF0YS5zaGFyZSxcbiAgICAgICAgICB2ZXJpZmllZDogZmFsc2UsXG4gICAgICAgIH07XG4gICAgICB9KTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGludG9Db21wcmVzc2VkTmZ0SW5mcmEgPSAoXG4gICAgICBpbnB1dDogT3B0aW9uPElucHV0Q3JlYXRvcnNbXT4gfCB1bmRlZmluZWQsXG4gICAgKTogSW50ZXJuYWxDcmVhdG9yc1tdID0+IHtcbiAgICAgIGlmICghaW5wdXQpIHtcbiAgICAgICAgcmV0dXJuIFtdO1xuICAgICAgfVxuICAgICAgcmV0dXJuIGlucHV0IS5tYXAoKGRhdGEpID0+IHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICBhZGRyZXNzOiBkYXRhLmFkZHJlc3MudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBzaGFyZTogZGF0YS5zaGFyZSxcbiAgICAgICAgICB2ZXJpZmllZDogZmFsc2UsXG4gICAgICAgIH07XG4gICAgICB9KTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGludG9Vc2VyID0gKFxuICAgICAgb3V0cHV0OiBPcHRpb248SW50ZXJuYWxDcmVhdG9yc1tdPixcbiAgICApOiBDcmVhdG9yc1tdIHwgdW5kZWZpbmVkID0+IHtcbiAgICAgIGlmICghb3V0cHV0KSB7XG4gICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBvdXRwdXQubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvU3RyaW5nKCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGRhdGEudmVyaWZpZWQsXG4gICAgICAgIH07XG4gICAgICB9KTtcbiAgICB9O1xuICB9XG59XG4iLCAia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UgJ2ltYWdlJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuaW1hZ2UpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNJbWFnZVVybChtZXRhZGF0YS5pbWFnZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdyb3lhbHR5JzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEucm95YWx0eSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1JveWFsdHkobWV0YWRhdGEucm95YWx0eSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ25hbWUnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLm5hbWUpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNOYW1lKG1ldGFkYXRhLm5hbWUpO1xuICAgICAgICAgICAgfVxuICAgICA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ICBleHBvcnQgY29uc3Qgc3dpdGNoQnVuZGxyID0gKGVudjogc3RyaW5nKTogc3RyaW5nID0+IHtcbiAgICBzd2l0Y2ggKGVudikge1xuICAgICAgY2FzZSBDb25zdGFudHMuQ2x1c3Rlci5wcmQ6IHtcbiAgICAgICAgY29uc3QgdXJscyA9IENvbnN0YW50cy5CdW5kbHJVcmwucHJkLnNwbGl0KCcsJyk7XG4gICAgICAgIGNvbnN0IGluZGV4ID0gRGF0ZS5ub3coKSAlIHVybHMubGVuZ3RoO1xuICAgICAgICByZXR1cm4gdXJsc1tpbmRleF07XG4gICAgICB9XG4gICAgICBkZWZhdWx0OiB7XG4gICAgICAgIHJldHVybiBDb25zdGFudHMuQnVuZGxyVXJsLmRldjtcbiAgICAgIH1cbiAgICB9XG4gIH07XG5cbiAgZXhwb3J0IGNvbnN0IHN3aXRjaERhc0FwaSA9IChlbnY6IHN0cmluZyk6IHN0cmluZyA9PiB7XG4gICAgc3dpdGNoIChlbnYpIHtcbiAgICAgIGNhc2UgQ29uc3RhbnRzLkNsdXN0ZXIucHJkOiB7XG4gICAgICAgIGlmIChkYXNBcGlVcmwubGVuZ3RoIDwgMSkge1xuICAgICAgICAgIHRocm93IEVycm9yKENvbnN0YW50cy5XYXJubmluZ01lc3NhZ2UuREFTX0FQSV9VUkwpO1xuICAgICAgICB9XG4gICAgICAgIGNvbnN0IHVybHMgPSBDb25zdGFudHMuQnVuZGxyVXJsLnByZC5zcGxpdCgnLCcpO1xuICAgICAgICBjb25zdCBpbmRleCA9IERhdGUubm93KCkgJSB1cmxzLmxlbmd0aDtcbiAgICAgICAgcmV0dXJuIHVybHNbaW5kZXhdO1xuICAgICAgfVxuICAgICAgZGVmYXVsdDoge1xuICAgICAgICBjb25zdCB1cmxzID0gQ29uc3RhbnRzLkRhc0FwaVVybC5kZXYuc3BsaXQoJywnKTtcbiAgICAgICAgY29uc3QgaW5kZXggPSBEYXRlLm5vdygpICUgdXJscy5sZW5ndGg7XG4gICAgICAgI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A9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvQ29tcHJlc3NlZE5mdEluZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IEludGVybmFsQ3JlYXRvcnNbXSA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBbXTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBpbnB1dCEubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlciA9IChcbiAgICAgIG91dHB1dDogT3B0aW9uPEludGVybmFsQ3JlYXRvcnNbXT4sXG4gICAgKTogQ3JlYXRvcnNbXSB8IHVuZGVmaW5lZCA9PiB7XG4gICAgICBpZiAoIW91dHB1dCkge1xuICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gb3V0cHV0Lm1hcCgoZGF0YSkgPT4ge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIGFkZHJlc3M6IGRhdGEuYWRkcmVzcy50b1N0cmluZygpLFxuICAgICAgICAgIHNoYXJlOiBkYXRhLnNoYXJlLFxuICAgICAgICAgIHZlcmlm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VUeXBlLFxuICAgICAgZmVlUGF5ZXI/OiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxQcm9wZXJ0aWVzPiA9PiB7XG4gICAgICBpZiAoIWlucHV0IHx8ICFpbnB1dC5maWxlcykge1xuICAgICAgICByZXR1cm4ge307XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGZpbGVzID0gYXdhaXQgUHJvbWlzZS5hbGwoXG4gICAgICAgIGlucHV0LmZpbGVzLm1hcChhc3luYyAoZmlsZSkgPT4ge1xuICAgICAgICAgIGlmICghZmlsZS5maWxlUGF0aCkge1xuICAgICAgICAgICAgcmV0dXJuIHt9O1xuICAgICAgICAgIH1cbiAgICAgICAgICBjb25zdCByZXMgPSBhd2FpdCBjYWxsYmFja0Z1bmMoZmlsZS5maWxlUGF0aCwgc3RvcmFnZVR5cGUsIGZlZVBheWVyKTtcbiAgICAgICAgICBpZiAocmVzLmlzRXJyKSB7XG4gICAgICAgICAgICB0aHJvdyBFcnJvcihyZXMuZXJyb3IubWVzc2FnZSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBvdmVyd3JpdGVPYmplY3QoZmlsZSwgW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBleGlzdHNLZXk6ICdmaWxlUGF0aCcsXG4gICAgICAgICAgICAgIHdpbGw6IHsga2V5OiAndXJpJywgdmFsdWU6IHJlcy52YWx1ZSB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICBdKTtcbiAgICAgICAgfSksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHsgLi4uaW5wdXQsIGZpbGVzIH0gYXMgUHJvcGVydGllcztcbiAgICB9O1xuICB9XG59XG4iLCAiLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLXVudXNlZC12YXJzICovXG5pbXBvcnQgeyBPcHRpb24sIFVzZXMgfSBmcm9tICd+L3R5cGVzL3JlZ3VsYXItbmZ0JztcblxuZXhwb3J0IG5hbWVzcGFj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QUxMX05VTUJFUiwgcm95YWx0eSwge1xuICAgICAgICAgIHRocmVzaG9sZDogUk9ZQUxUWV9NSU4sXG4gICAgICAgICAgY29uZGl0aW9uOiAndW5kZXJNaW4nLFxuICAgICAgICB9KTtcbiAgICAgIH0gZWxzZSBpZiAocm95YWx0eSA+IFJPWUFMVFlfTUFYKSB7XG4gICAgICAgIHRocm93IGNyZWF0ZUVycm9yKGtleSwgTWVzc2FnZS5CSUdfTlVNQkVSLCByb3lhbHR5LCB7XG4gICAgICAgICAgdGhyZXNob2xkOiBST1lBTFRZX01BWCxcbiAgICAgICAgICBjb25kaXRpb246ICdvdmVyTWF4JyxcbiAgICAgICAgfSk7XG4gICAgICB9XG4gICAgICByZXR1cm4gTWVzc2FnZS5TVUNDRVNTO1xuICAgIH0pO1xuICB9O1xuXG4gIGV4cG9ydCBjb25zdCBpc1NlbGxlckZlZUJhc2lzUG9pbnRzID0gKFxuICAgIHJveWFsdHk6IG51bWJlcixcbiAgKTogUmVzdWx0PHN0cmluZywgVmFsaWRhdG9yRXJyb3I+ID0+IHtcbiAgICByZXR1cm4gVHJ5KCgpID0+IHtcbiAgICAgIGNvbnN0IGtleSA9ICdzZWxsZXJGZWVCYXNpc1BvaW50cy9zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyc7XG4gICAgICBpZiAocm95YWx0eSAhPT0gMCAmJiAhcm95YWx0eSkge1xuICAgICAgICB0aHJvdyBjcmVhdGVFcnJvcihrZXksIE1lc3NhZ2UuRU1QVFksIHJveWFsdHkpO1xuICAgICAgfVxuICAgICAgaWYgKHJveWFsdHkgPCBST1lBTFRZX01JTikge1xuICAgICAgICB0aHJvdyBjcmVhdGVFcnJvcihrZXksIE1lc3NhZ2UuU01BTExfTlVNQkVSLCByb3lhbHR5LCB7XG4gICAgICAgICAgdGhyZXNob2xkOiBST1lBTFRZX01JTixcbiAgICAgICAgICBjb25kaXRpb246ICd1bmRlck1pbicsXG4gICAgICAgIH0pO1xuICAgICAgfSBlbHN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xzdHJpbmcsIFZhbGlkYXRvckVycm9yPjtcbiAgICAgICAgc3dpdGNoIChrZXkpIHtcbiAgICAgICAgICBjYXNlICdpbWFnZSc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLmltYWdlKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzSW1hZ2VVcmwobWV0YWRhdGEuaW1hZ2UpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAncm95YWx0eSc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnJveWFsdHkpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNSb3lhbHR5KG1ldGFkYXRhLnJveWFsdHkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1l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ZGF0YSIsICJDb252ZXJ0ZXIiLCAiVHJhbnNmZXJDaGVja2VkIiwgIkNvbnZlcnRlciIsICJUcmFuc2ZlciIsICJDb252ZXJ0ZXIiLCAiVmFsaWRhdG9yIiwgIk1lc3NhZ2UiLCAiQ29udmVydGVyIiwgIlByb3ZlbmFuY2VMYXllciIsICJ1cGxvYWRGaWxlIiwgIklyeXMiLCAiQXJ3ZWF2ZSIsICJpbXBvcnRfbmZ0IiwgIk5mdFN0b3JhZ2UiLCAiU3RvcmFnZSJdCn0K \ No newline at end of file diff --git a/packages/storage/dist/index.mjs b/packages/storage/dist/index.mjs index c6b3c0481..5ad45dea9 100644 --- a/packages/storage/dist/index.mjs +++ b/packages/storage/dist/index.mjs @@ -454,22 +454,11 @@ var TransactionBuilder5; // ../global/src/index.ts import { Keypair as Keypair3, LAMPORTS_PER_SOL, PublicKey as PublicKey4 } from "@solana/web3.js"; -// ../account/src/associated.ts -import { - ASSOCIATED_TOKEN_PROGRAM_ID, - createAssociatedTokenAccountInstruction, - getAccount, - getAssociatedTokenAddressSync, - TOKEN_PROGRAM_ID, - TokenAccountNotFoundError, - TokenInvalidAccountOwnerError -} from "@solana/spl-token"; - // ../account/src/keypair.ts import { Keypair as Original, PublicKey as PublicKey2 } from "@solana/web3.js"; import bs from "bs58"; var Account; -((Account5) => { +((Account4) => { class Keypair4 { secret; pubkey; @@ -505,111 +494,16 @@ var Account; }); }; } - Account5.Keypair = Keypair4; + Account4.Keypair = Keypair4; })(Account || (Account = {})); -// ../account/src/associated.ts -var Account2; -((Account5) => { - let Associated; - ((Associated2) => { - const RETRY_OVER_LIMIT = 10; - const RETRY_SLEEP_TIME = 3; - const get = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const res = await (0, Associated2.makeOrCreateInstruction)( - mint, - owner, - new Account.Keypair({ secret: feePayer }).pubkey, - allowOwnerOffCurve - ); - if (!res.inst) { - return res.tokenAccount; - } - return new TransactionBuilder6.Common( - [res.inst], - [], - feePayer.toKeypair(), - res.tokenAccount - ); - }; - Associated2.retryGetOrCreate = async (mint, owner, feePayer) => { - let counter = 1; - while (counter < RETRY_OVER_LIMIT) { - try { - const inst = await get(mint, owner, feePayer, true); - if (inst && typeof inst === "string") { - debugLog("# associatedTokenAccount: ", inst); - return inst; - } else if (inst instanceof TransactionBuilder6.Common) { - (await inst.submit()).map( - async (ok) => { - await Node.confirmedSig(ok); - return inst.data; - }, - (err) => { - debugLog("# Error submit retryGetOrCreate: ", err); - throw err; - } - ); - } - } catch (e) { - debugLog(`# retry: ${counter} create token account: `, e); - debugLog(`# mint: ${mint}, owner: ${owner}, feePayer: ${feePayer}`); - } - await sleep(RETRY_SLEEP_TIME); - counter++; - } - throw Error(`retry action is over limit ${RETRY_OVER_LIMIT}`); - }; - Associated2.makeOrCreateInstruction = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const associatedTokenAccount = getAssociatedTokenAddressSync( - mint.toPublicKey(), - owner.toPublicKey(), - allowOwnerOffCurve, - TOKEN_PROGRAM_ID, - ASSOCIATED_TOKEN_PROGRAM_ID - ); - debugLog("# associatedTokenAccount: ", associatedTokenAccount.toString()); - try { - await getAccount( - Node.getConnection(), - associatedTokenAccount, - Node.getConnection().commitment, - TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst: void 0 - }; - } catch (error) { - if (!(error instanceof TokenAccountNotFoundError) && !(error instanceof TokenInvalidAccountOwnerError)) { - throw Error("Unexpected error"); - } - const payer = !feePayer ? owner : feePayer; - const inst = createAssociatedTokenAccountInstruction( - payer.toPublicKey(), - associatedTokenAccount, - owner.toPublicKey(), - mint.toPublicKey(), - TOKEN_PROGRAM_ID, - ASSOCIATED_TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst - }; - } - }; - })(Associated = Account5.Associated || (Account5.Associated = {})); -})(Account2 || (Account2 = {})); - // ../account/src/pda.ts import { PublicKey as PublicKey3 } from "@solana/web3.js"; import { PROGRAM_ID } from "@metaplex-foundation/mpl-token-metadata"; import { MPL_BUBBLEGUM_PROGRAM_ID } from "@metaplex-foundation/mpl-bubblegum"; import BN from "bn.js"; -var Account3; -((Account5) => { +var Account2; +((Account4) => { let Pda; ((Pda2) => { Pda2.getMetadata = (address) => { @@ -661,14 +555,13 @@ var Account3; ); return assetId.toString(); }; - })(Pda = Account5.Pda || (Account5.Pda = {})); -})(Account3 || (Account3 = {})); + })(Pda = Account4.Pda || (Account4.Pda = {})); +})(Account2 || (Account2 = {})); // ../account/src/index.ts -var Account4 = { - ...Account2, +var Account3 = { ...Account, - ...Account3 + ...Account2 }; // ../global/src/index.ts @@ -699,7 +592,7 @@ String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, op } return url; } - if (Account4.Keypair.isPubkey(addressOrSignature)) { + if (Account3.Keypair.isPubkey(addressOrSignature)) { if (explorer === "solanafm" /* SolanaFM */) { url = `${Constants.EXPLORER_SOLANAFM_URL}/address/${addressOrSignature}?cluster=${cluster}`; } else if (explorer === "xray" /* Xray */) { @@ -719,13 +612,13 @@ String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, op return url; }; String.prototype.toPublicKey = function() { - if (!Account4.Keypair.isPubkey(this.toString())) { + if (!Account3.Keypair.isPubkey(this.toString())) { throw Error(`No match KeyPair.PubKey: ${this.toString()}`); } return new PublicKey4(this.toString()); }; String.prototype.toKeypair = function() { - if (!Account4.Keypair.isSecret(this.toString())) { + if (!Account3.Keypair.isSecret(this.toString())) { throw Error(`No match KeyPair.Secret: ${this.toString()}`); } const decoded = bs2.decode(this.toString()); @@ -761,9 +654,6 @@ var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { console.log("[DEBUG]", data1, data2, data3, data4); } }; -var sleep = async (sec) => { - return new Promise((r) => setTimeout(r, sec * 1e3)); -}; var isBrowser = () => { return typeof window !== "undefined" && typeof window.document !== "undefined"; }; @@ -1740,4 +1630,4 @@ export { ProvenanceLayer, Storage }; -//# sourceMappingURL=data:application/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xvZygnIyBFcnJvciBzdWJtaXQgcmV0cnlHZXRPckNyZWF0ZTogJywgZXJyKTtcbiAgICAgICAgICAgICAgICB0aHJvdyBlcnI7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgIGRlYnVnTG9nKGAjIHJldHJ5OiAke2NvdW50ZXJ9IGNyZWF0ZSB0b2tlbiBhY2NvdW50OiBgLCBlKTtcbiAgICAgICAgICBkZWJ1Z0xvZyhgIyBtaW50OiAke21pbnR9LCBvd25lcjogJHtvd25lcn0sIGZlZVBheWVyOiAke2ZlZVBheWVyfWApO1xuICAgICAgICB9XG4gICAgICAgIGF3YWl0IHNsZWVwKFJFVFJZX1NMRUVQX1RJTUUpO1xuICAgICAgICBjb3VudGVyKys7XG4gICAgICB9XG4gICAgICB0aHJvdyBFcnJvcihgcmV0cnkgYWN0aW9uIGlzIG92ZXIgbGltaXQgJHtSRVRSWV9PVkVSX0xJTUlUfWApO1xuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiBbTWFpbiBsb2dpY11HZXQgQXNzb2NpYXRlZCB0b2tlbiBBY2NvdW50LlxuICAgICAqIGlmIG5vdCBjcmVhdGVkLCBjcmVhdGUgbmV3IHRva2VuIGFjY291aW50XG4gICAgICpcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gbWludFxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBvd25lclxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBmZWVQYXllclxuICAgICAqIEByZXR1cm5zIFByb21pc2U8c3RyaW5nPlxuICAgICAqL1xuICAgIGV4cG9ydCBjb25zdCBtYWtlT3JDcmVhdGVJbnN0cnVjdGlvbiA9IGFzeW5jIChcbiAgICAgIG1pbnQ6IFB1YmtleSxcbiAgICAgIG93bmVyOiBQdWJrZXksXG4gICAgICBmZWVQYXllcj86IFB1YmtleSxcbiAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSA9IGZhbHNlLFxuICAgICk6IFByb21pc2U8e1xuICAgICAgdG9rZW5BY2NvdW50OiBzdHJpbmc7XG4gICAgICBpbnN0OiBUcmFuc2FjdGlvbkluc3RydWN0aW9uIHwgdW5kZWZpbmVkO1xuICAgIH0+ID0+IHtcbiAgICAgIGNvbnN0IGFzc29jaWF0ZWRUb2tlbkFjY291bnQgPSBnZXRBc3NvY2lhdGVkVG9rZW5BZGRyZXNzU3luYyhcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICBhbGxvd093bmVyT2ZmQ3VydmUsXG4gICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGFzc29jaWF0ZWRUb2tlbkFjY291bnQ6ICcsIGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSk7XG5cbiAgICAgIHRyeSB7XG4gICAgICAgIC8vIERvbnQgdXNlIFJlc3VsdFxuICAgICAgICBhd2FpdCBnZXRBY2NvdW50KFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCkuY29tbWl0bWVudCxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3Q6IHVuZGVmaW5lZCxcbiAgICAgICAgfTtcbiAgICAgIH0gY2F0Y2ggKGVycm9yOiB1bmtub3duKSB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5BY2NvdW50Tm90Rm91bmRFcnJvcikgJiZcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5JbnZhbGlkQWNjb3VudE93bmVyRXJyb3IpXG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9yKCdVbmV4cGVjdGVkIGVycm9yJyk7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBwYXllciA9ICFmZWVQYXllciA/IG93bmVyIDogZmVlUGF5ZXI7XG5cbiAgICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgICBwYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgICBBU1NPQ0lBVEVEX1RPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG5cbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICB0b2tlbkFjY291bnQ6IGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSxcbiAgICAgICAgICBpbnN0LFxuICAgICAgICB9O1xuICAgICAgfVxuICAgIH07XG4gIH1cbn1cbiIsICJpbXBvcnQgeyBLZXlwYWlyIGFzIE9yaWdpbmFsLCBQdWJsaWNLZXkgfSBmcm9tICdAc29sYW5hL3dlYjMuanMnO1xuaW1wb3J0IHsgUHVia2V5LCBTZWNyZXQgfSBmcm9tICd+L3R5cGVzL2FjY291bnQnO1xuaW1wb3J0IGJzIGZyb20gJ2JzNTgnO1xuXG5leHBvcnQgbmFtZXNwYWNlIEFjY291bnQge1xuICBleHBvcnQgY2xhc3MgS2V5cGFpciB7XG4gICAgc2VjcmV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tdPiB8IHVuZGVmaW5lZCxcbiAgICApOiBPcHRpb248SW50ZXJuYWxDcmVhdG9yc1tdPiA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBudWxsO1xuICAgICAgfVxuICAgICAgcmV0dXJuIGlucHV0Lm1hcCgoZGF0YSkgPT4ge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIGFkZHJlc3M6IGRhdGEuYWRkcmVzcy50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIHNoYXJlOiBkYXRhLnNoYXJlLFxuICAgICAgICAgIHZlcmlmaWVkOiBmYWxzZSxcbiAgICAgICAgfTtcbiAgICAgIH0pO1xuICAgIH07XG5cbiAgICBleHBvcnQgY29uc3QgaW50b0NvbXByZXNzZWROZnRJbmZyYSA9IChcbiAgICAgIGlucHV0OiBPcHRpb248SW5wdXRDcmVhdG9yc1tdPiB8IHVuZGVmaW5lZCxcbiAgICApOiBJbnRlcm5hbENyZWF0b3JzW10gPT4ge1xuICAgICAgaWYgKCFpbnB1dCkge1xuICAgICAgICByZXR1cm4gW107XG4gICAgICB9XG4gICAgICByZXR1cm4gaW5wdXQhLm1hcCgoZGF0YSkgPT4ge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIGFkZHJlc3M6IGRhdGEuYWRkcmVzcy50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIHNoYXJlOiBkYXRhLnNoYXJlLFxuICAgICAgICAgIHZlcmlmaWVkOiBmYWxzZSxcbiAgICAgICAgfTtcbiAgICAgIH0pO1xuICAgIH07XG5cbiAgICBleHBvcnQgY29uc3QgaW50b1VzZXIgPSAoXG4gICAgICBvdXRwdXQ6IE9wdGlvbjxJbnRlcm5hbENyZWF0b3JzW10+LFxuICAgICk6IENyZWF0b3JzW10gfCB1bmRlZmluZWQgPT4ge1xuICAgICAgaWYgKCFvdXRwdXQpIHtcbiAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICAgIH1cblxuIC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ICAgICBmaWxlUGF0aDogRmlsZVR5cGUsXG4gICAgICAgIHN0b3JhZ2VUeXBlOiBTdG9yYWdlVHlwZSxcbiAgICAgICAgZmVlUGF5ZXI/OiBTZWNyZXQsXG4gICAgICApID0+IFByb21pc2U8UmVzdWx0PHN0cmluZywgRXJyb3I+PixcbiAgICAgIHN0b3JhZ2VUeXBlOiBTdG9yYWdlVHlwZSxcbiAgICAgIGZlZVBheWVyPzogU2VjcmV0LFxuICAgICk6IFByb21pc2U8UHJvcGVydGllcz4gPT4ge1xuICAgICAgaWYgKCFpbnB1dCB8fCAhaW5wdXQuZmlsZXMpIHtcbiAgICAgICAgcmV0dXJuIHt9O1xuICAgICAgfVxuXG4gICAgICBjb25zdCBmaWxlcyA9IGF3YWl0IFByb21pc2UuYWxsKFxuICAgICAgICBpbnB1dC5maWxlcy5tYXAoYXN5bmMgKGZpbGUpID0+IHtcbiAgICAgICAgICBpZiAoIWZpbGUuZmlsZVBhdGgpIHtcbiAgICAgICAgICAgIHJldHVybiB7fTtcbiAgICAgICAgICB9XG4gICAgICAgICAgY29uc3QgcmVzID0gYXdhaXQgY2FsbGJhY2tGdW5jKGZpbGUuZmlsZVBhdGgsIHN0b3JhZ2VUeXBlLCBmZWVQYXllcik7XG4gICAgICAgICAgaWYgKHJlcy5pc0Vycikge1xuICAgICAgICAgICAgdGhyb3cgRXJyb3IocmVzLmVycm9yLm1lc3NhZ2UpO1xuICAgICAgICAgIH1cbiAgICAgICAgICByZXR1cm4gb3ZlcndyaXRlT2JqZWN0KGZpbGUsIFtcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgZXhpc3RzS2V5OiAnZmlsZVBhdGgnLFxuICAgICAgICAgICAgICB3aWxsOiB7IGtleTogJ3VyaScsIHZhbHVlOiByZXMudmFsdWUgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgXSk7XG4gICAgICAgIH0pLFxuICAgICAgKTtcbiAgICAgIHJldHVybiB7IC4uLmlucHV0LCBmaWx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iB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBudWxsO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4ge1xuICAgICAgICBrZXk6IGlucHV0LnRvUHVibGljS2V5KCksXG4gICAgICAgIHZlcmlmaWVkOiBmYWxzZSxcbiAgICAgIH07XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlciA9IChcbiAgICAgIG91dHB1dDogT3B0aW9uPEludGVybmFsQ29sbGVjdGlvbj4sXG4gICAgKTogQ29sbGVjdGlvblR5cGUgfCB1bmRlZmluZWQgPT4ge1xuICAgICAgaWYgKCFvdXRwdXQpIHtcbiAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIHtcbiAgICAgICAgYWRkcmVzczogb3V0cHV0LmtleS50b1N0cmluZygpLFxuICAgICAgICB2ZXJpZmllZDogb3V0cHV0LnZlcmlmaWVkLFxuICAgICAgfTtcbiAgICB9O1xuICB9XG5cbiAgZXhwb3J0IG5hbWVzcGFjZSBDb2xsZWN0aW9uTWludCB7XG4gICAgZXhwb3J0IGNvbnN0IGludG9Vc2VyID0gKG91dHB1dDogR3JvdXBpbmdbXSk6IFB1YmtleSA9PiB7XG4gICAgICBjb25zdCByZXMgPSBvdXRwdXQuZmluZCgodmFsdWUpID0+IHtcbiAgICAgICAgaWYgKHZhbHVlLmdyb3VwX2tleSA9PT0gJ2NvbGxlY3Rpb24nKSB7XG4gICAgICAgICAgcmV0dXJuIHZhbHVlLmdyb3VwX3ZhbHVlO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIHJldHVybiByZXMgPyByZXMuZ3JvdXBfdmFsdWUgOiAnJztcbiAgICB9O1xuICB9XG59XG4iLCAiLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLXVudXNlZC12YXJzICovXG5pbXBvcnQgeyBDcmVhdG9ycywgSW5wdXRDcmVhdG9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Gxlcl9mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ25hbWUnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLm5hbWUpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNOYW1lKG1ldGFkYXRhLm5hbWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc3ltYm9sJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5zeW1ib2wpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTeW1ib2wobWV0YWRhdGEuc3ltYm9sKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgICAgIGlmIChyZXMgJiYgcmVzLmlzRXJyKSB7XG4gICAgICAgICAgcmVzdWx0cy5wdXNoKC4uLnJlcy5lcnJvci5kZXRhaWxzKTtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgICBpZiAocmVzdWx0cy5sZW5ndGggPiAwKSB7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPVxuICAgICAgICAgICdDYXVnaHQgaW4gdGhlIHZhbGlkYXRpb24gZXJyb3JzLiBzZWUgaW5mb3JtYXRpb24gZS5nOiBl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W5zYWN0aW9uQnVpbGRlciIsICJUcmFuc2FjdGlvbiIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiS2V5cGFpciIsICJQdWJsaWNLZXkiLCAiUHVibGljS2V5IiwgIkFjY291bnQiLCAiS2V5cGFpciIsICJQdWJsaWNLZXkiLCAiQWNjb3VudCIsICJQZGEiLCAiQWNjb3VudCIsICJicyIsICJBY2NvdW50IiwgIlB1YmxpY0tleSIsICJLZXlwYWlyIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiUmVzdWx0IiwgIkNvbnZlcnRlciIsICJDb2xsZWN0aW9uIiwgIkNvbGxlY3Rpb25NaW50IiwgIkNvbnZlcnRlciIsICJDcmVhdG9ycyIsICJDb252ZXJ0ZXIiLCAiQ29tcHJlc3NlZE5mdE1ldGFkYXRhIiwgIkNvbnZlcnRlciIsICJSb3lhbHR5IiwgIkNvbnZlcnRlciIsICJOZnQiLCAiQ29udmVydGVyIiwgIk1lbW8iLCAiQ29udmVydGVyIiwgIk1pbnQiLCAiQ29udmVydGVyIiwgIlJlZ3VsYXJOZnRNZXRhZGF0YSIsICJDb252ZXJ0ZXIiLCAiUHJvcGVydGllcyIsICJDb252ZXJ0ZXIiLCAiVXNlcyIsICJDb252ZXJ0ZXIiLCAiVG9rZW5NZXRhZGF0YSIsICJDb252ZXJ0ZXIiLCAiVHJhbnNmZXJDaGVja2VkIiwgIkNvbnZlcnRlciIsICJUcmFuc2ZlciIsICJDb252ZXJ0ZXIiLCAiVmFsaWRhdG9yIiwgIk1lc3NhZ2UiLCAiQ29udmVydGVyIiwgIlByb3ZlbmFuY2VMYXllciIsICJ1cGxvYWRGaWxlIiwgIkFyd2VhdmUiLCAiTmZ0U3RvcmFnZSIsICJTdG9yYWdlIl0KfQo= \ No newline at end of file diff --git a/packages/suite-airdrop/dist/index.js b/packages/suite-airdrop/dist/index.js index 7cb7783a0..c5a756576 100644 --- a/packages/suite-airdrop/dist/index.js +++ b/packages/suite-airdrop/dist/index.js @@ -479,14 +479,11 @@ var TransactionBuilder5; // ../global/src/index.ts var import_web39 = require("@solana/web3.js"); -// ../account/src/associated.ts -var import_spl_token = require("@solana/spl-token"); - // ../account/src/keypair.ts var import_web37 = require("@solana/web3.js"); var import_bs58 = __toESM(require("bs58")); var Account; -((Account5) => { +((Account4) => { class Keypair4 { secret; pubkey; @@ -522,111 +519,16 @@ var Account; }); }; } - Account5.Keypair = Keypair4; + Account4.Keypair = Keypair4; })(Account || (Account = {})); -// ../account/src/associated.ts -var Account2; -((Account5) => { - let Associated; - ((Associated2) => { - const RETRY_OVER_LIMIT = 10; - const RETRY_SLEEP_TIME = 3; - const get = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const res = await (0, Associated2.makeOrCreateInstruction)( - mint, - owner, - new Account.Keypair({ secret: feePayer }).pubkey, - allowOwnerOffCurve - ); - if (!res.inst) { - return res.tokenAccount; - } - return new TransactionBuilder6.Common( - [res.inst], - [], - feePayer.toKeypair(), - res.tokenAccount - ); - }; - Associated2.retryGetOrCreate = async (mint, owner, feePayer) => { - let counter = 1; - while (counter < RETRY_OVER_LIMIT) { - try { - const inst = await get(mint, owner, feePayer, true); - if (inst && typeof inst === "string") { - debugLog("# associatedTokenAccount: ", inst); - return inst; - } else if (inst instanceof TransactionBuilder6.Common) { - (await inst.submit()).map( - async (ok) => { - await Node.confirmedSig(ok); - return inst.data; - }, - (err) => { - debugLog("# Error submit retryGetOrCreate: ", err); - throw err; - } - ); - } - } catch (e) { - debugLog(`# retry: ${counter} create token account: `, e); - debugLog(`# mint: ${mint}, owner: ${owner}, feePayer: ${feePayer}`); - } - await sleep(RETRY_SLEEP_TIME); - counter++; - } - throw Error(`retry action is over limit ${RETRY_OVER_LIMIT}`); - }; - Associated2.makeOrCreateInstruction = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const associatedTokenAccount = (0, import_spl_token.getAssociatedTokenAddressSync)( - mint.toPublicKey(), - owner.toPublicKey(), - allowOwnerOffCurve, - import_spl_token.TOKEN_PROGRAM_ID, - import_spl_token.ASSOCIATED_TOKEN_PROGRAM_ID - ); - debugLog("# associatedTokenAccount: ", associatedTokenAccount.toString()); - try { - await (0, import_spl_token.getAccount)( - Node.getConnection(), - associatedTokenAccount, - Node.getConnection().commitment, - import_spl_token.TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst: void 0 - }; - } catch (error) { - if (!(error instanceof import_spl_token.TokenAccountNotFoundError) && !(error instanceof import_spl_token.TokenInvalidAccountOwnerError)) { - throw Error("Unexpected error"); - } - const payer = !feePayer ? owner : feePayer; - const inst = (0, import_spl_token.createAssociatedTokenAccountInstruction)( - payer.toPublicKey(), - associatedTokenAccount, - owner.toPublicKey(), - mint.toPublicKey(), - import_spl_token.TOKEN_PROGRAM_ID, - import_spl_token.ASSOCIATED_TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst - }; - } - }; - })(Associated = Account5.Associated || (Account5.Associated = {})); -})(Account2 || (Account2 = {})); - // ../account/src/pda.ts var import_web38 = require("@solana/web3.js"); var import_mpl_token_metadata = require("@metaplex-foundation/mpl-token-metadata"); var import_mpl_bubblegum = require("@metaplex-foundation/mpl-bubblegum"); var import_bn = __toESM(require("bn.js")); -var Account3; -((Account5) => { +var Account2; +((Account4) => { let Pda; ((Pda2) => { Pda2.getMetadata = (address) => { @@ -678,14 +580,13 @@ var Account3; ); return assetId.toString(); }; - })(Pda = Account5.Pda || (Account5.Pda = {})); -})(Account3 || (Account3 = {})); + })(Pda = Account4.Pda || (Account4.Pda = {})); +})(Account2 || (Account2 = {})); // ../account/src/index.ts -var Account4 = { - ...Account2, +var Account3 = { ...Account, - ...Account3 + ...Account2 }; // ../global/src/index.ts @@ -716,7 +617,7 @@ String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, op } return url; } - if (Account4.Keypair.isPubkey(addressOrSignature)) { + if (Account3.Keypair.isPubkey(addressOrSignature)) { if (explorer === "solanafm" /* SolanaFM */) { url = `${Constants.EXPLORER_SOLANAFM_URL}/address/${addressOrSignature}?cluster=${cluster}`; } else if (explorer === "xray" /* Xray */) { @@ -736,13 +637,13 @@ String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, op return url; }; String.prototype.toPublicKey = function() { - if (!Account4.Keypair.isPubkey(this.toString())) { + if (!Account3.Keypair.isPubkey(this.toString())) { throw Error(`No match KeyPair.PubKey: ${this.toString()}`); } return new import_web39.PublicKey(this.toString()); }; String.prototype.toKeypair = function() { - if (!Account4.Keypair.isSecret(this.toString())) { + if (!Account3.Keypair.isSecret(this.toString())) { throw Error(`No match KeyPair.Secret: ${this.toString()}`); } const decoded = import_bs582.default.decode(this.toString()); @@ -778,9 +679,6 @@ var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { console.log("[DEBUG]", data1, data2, data3, data4); } }; -var sleep = async (sec) => { - return new Promise((r) => setTimeout(r, sec * 1e3)); -}; var isPromise = (obj) => { return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; }; @@ -1550,4 +1448,4 @@ var Airdrop; 0 && (module.exports = { Airdrop }); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uLy4uL3N1aXRlLXV0aWxzL3NyYy9jb25zdGFudHMudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvYmF0Y2gudHMiLCAiLi4vLi4vbm9kZS9zcmMvaW5kZXgudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY29tbW9uLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL21pbnQudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvcGFydGlhbC1zaWduLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW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IDEwO1xuICAgIGNvbnN0IFJFVFJZX1NMRUVQX1RJTUUgPSAzO1xuICAgIC8vQGludGVybmFsXG4gICAgY29uc3QgZ2V0ID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyOiBTZWNyZXQsXG4gICAgICBhbGxvd093bmVyT2ZmQ3VydmUgPSBmYWxzZSxcbiAgICApOiBQcm9taXNlPHN0cmluZyB8IENvbW1vblN0cnVjdHVyZTxQdWJrZXk+PiA9PiB7XG4gICAgICBjb25zdCByZXMgPSBhd2FpdCBtYWtlT3JDcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIG5ldyBLZXlwYWlyLktleXBhaXIoeyBzZWNyZXQ6IGZlZVBheWVyIH0pLnB1YmtleSxcbiAgICAgICAgYWxsb3dPd25lck9mZkN1cnZlLFxuICAgICAgKTtcblxuICAgICAgaWYgKCFyZXMuaW5zdCkge1xuICAgICAgICByZXR1cm4gcmVzLnRva2VuQWNjb3VudDtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uPFB1YmtleT4oXG4gICAgICAgIFtyZXMuaW5zdF0sXG4gICAgICAgIFtdLFxuICAgICAgICBmZWVQYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgcmVzLnRva2VuQWNjb3VudCEsXG4gICAgICApO1xuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiBSZXRyeSBmdW5jdGlvbiBpZiBjcmVhdGUgbmV3IHRva2VuIGFjY291aW50XG4gICAgICpcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gbWludFxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBvd25lclxuICAgICAqIEBwYXJhbSB7U2VjcmV0fSBmZWVQYXllclxuICAgICAqIEByZXR1cm5zIFByb21pc2U8c3RyaW5nPlxuICAgICAqL1xuICAgIGV4cG9ydCBjb25zdCByZXRyeUdldE9yQ3JlYXRlID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyOiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxzdHJpbmc+ID0+IHtcbiAgICAgIGxldCBjb3VudGVyID0gMTtcbiAgICAgIHdoaWxlIChjb3VudGVyIDwgUkVUUllfT1ZFUl9MSU1JVCkge1xuICAgICAgICB0cnkge1xuICAgICAgICAgIGNvbnN0IGluc3QgPSBhd2FpdCBnZXQobWludCwgb3duZXIsIGZlZVBheWVyLCB0cnVlKTtcblxuICAgICAgICAgIGlmIChpbnN0ICYmIHR5cGVvZiBpbnN0ID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgaW5zdCk7XG4gICAgICAgICAgICByZXR1cm4gaW5zdDtcbiAgICAgICAgICB9IGVsc2UgaWYgKGluc3QgaW5zdGFuY2VvZiBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uKSB7XG4gICAgICAgICAgICAoYXdhaXQgaW5zdC5zdWJtaXQoKSkubWFwKFxuICAgICAgICAgICAgICBhc3luYyAob2s6IHN0cmluZykgPT4ge1xuICAgICAgICAgICAgICAgIGF3YWl0IE5vZGUuY29uZmlybWVkU2lnKG9rKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gaW5zdC5kYXRhO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAoZXJyOiBFcnJvcikgPT4ge1xuICAgICAgICAgICAgICAgIGRlYnVnTG9nKCcjIEVycm9yIHN1Ym1pdCByZXRyeUdldE9yQ3JlYXRlOiAnLCBlcnIpO1xuICAgICAgICAgICAgICAgIHRocm93IGVycjtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICB9IGNh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AgICAgY29uc3QgYXNzb2NpYXRlZFRva2VuQWNjb3VudCA9IGdldEFzc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jKFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSxcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3QsXG4gICAgICAgIH07XG4gICAgICB9XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IEtleXBhaXIgYXMgT3JpZ2luYWwsIFB1YmxpY0tleSB9IGZyb20gJ0Bzb2xhbmEvd2ViMy5qcyc7XG5pbXBvcnQgeyBQdWJrZXksIFNlY3JldCB9IGZyb20gJ34vdHlwZXMvYWNjb3VudCc7XG5pbXBvcnQgYnMgZnJvbSAnYnM1OCc7XG5cbmV4cG9ydCBuYW1lc3BhY2UgQWNjb3VudCB7XG4gIGV4cG9ydCBjbGFzcyBLZXlwYWlyIHtcbiAgICBzZWNyZXQ6IFNlY3JldDtcbiAgICBwdWJrZXk6IFB1YmtleTtcblxuICAgIGNvbnN0cnVjdG9yKHBhcmFtczogeyBwdWJrZXk/OiBQdWJrZXk7IHNlY3JldDogU2VjcmV0IH0pIHtcbiAgICAgIGlmICghcGFyYW1zLnB1YmtleSkge1xuICAgICAgICBjb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AgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICB9XG4gICAgICByZXR1cm4gaW5wdXQubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvQ29tcHJlc3NlZE5mdEluZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IEludGVybmFsQ3JlYXRvcnNbXSA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBbXTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBpbnB1dCEubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlciA9IChcbiAgICAgIG91dHB1dDogT3B0aW9uPEludGVybmFsQ3JlYXRvcnNbXT4sXG4gICAgKTogQ3JlYXRvcnNbXSB8IHVuZGVmaW5lZCA9PiB7XG4gICAgICBpZiAoIW91dHB1dCkge1xuICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gb3V0cHV0Lm1hcCgoZGF0YSkgPT4ge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIGFkZHJlc3M6IGRhdGEuYWRkcmVzc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ZTxSZXN1bHQ8c3RyaW5nLCBFcnJvcj4+LFxuICAgICAgc3RvcmFnZVR5cGU6IFN0b3JhZ2VUeXBlLFxuICAgICAgZmVlUGF5ZXI/OiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxQcm9wZXJ0aWVzPiA9PiB7XG4gICAgICBpZiAoIWlucHV0IHx8ICFpbnB1dC5maWxlcykge1xuICAgICAgICByZXR1cm4ge307XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGZpbGVzID0gYXdhaXQgUHJvbWlzZS5hbGwoXG4gICAgICAgIGlucHV0LmZpbGVzLm1hcChhc3luYyAoZmlsZSkgPT4ge1xuICAgICAgICAgIGlmICghZmlsZS5maWxlUGF0aCkge1xuICAgICAgICAgICAgcmV0dXJuIHt9O1xuICAgICAgICAgIH1cbiAgICAgICAgICBjb25zdCByZXMgPSBhd2FpdCBjYWxsYmFja0Z1bmMoZmlsZS5maWxlUGF0aCwgc3RvcmFnZVR5cGUsIGZlZVBheWVyKTtcbiAgICAgICAgICBpZiAocmVzLmlzRXJyKSB7XG4gICAgICAgICAgICB0aHJvdyBFcnJvcihyZXMuZXJyb3IubWVzc2FnZSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBvdmVyd3JpdGVPYmplY3QoZmlsZSwgW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBleGlzdHNLZXk6ICdmaWxlUGF0aCcsXG4gICAgICAgICAgICAgIHdpbGw6IHsga2V5OiAndXJpJywgdmFsdWU6IHJlcy52YWx1ZSB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICBdKTtcbiAgICAgICAgfSksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHsgLi4uaW5wdXQsIGZpbGVzIH0gYXMgUHJvcGVydGllcztcbiAgICB9O1xuICB9XG59XG4iLCAiLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLXVudXNlZC12YXJzICovXG5pbXBvcnQgeyBPcHRpb24s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SBbXTtcbiAgICAgIGtleXMubWFwKChrZXkpID0+IHtcbiAgICAgICAgbGV0IHJlcyE6IFJlc3VsdDxzdHJpbmcsIFZhbGlkYXRvckVycm9yPjtcbiAgICAgICAgc3dpdGNoIChrZXkpIHtcbiAgICAgICAgICBjYXNlICdpbWFnZSc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLmltYWdlKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzSW1hZ2VVcmwobWV0YWRhdGEuaW1hZ2UpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAncm95YWx0eSc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnJveWFsdHkpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNSb3lhbHR5KG1ldGFkYXRhLnJveWFsdHkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEuc3ltYm9sKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU3ltYm9sKG1ldGFkYXRhLnN5bWJvbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAocmVzICYmIHJlcy5pc0Vycikge1xuICAgICAgICAgIHJlc3VsdHMucHVzaCguLi5yZXMuZXJyb3IuZGV0YWlscyk7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgICAgaWYgKHJlc3VsdHMubGVuZ3RoID4gMCkge1xuICAgICAgICBjb25zdCBtZXNzYWdlID1cbiAgICAgICAgICAnQ2F1Z2h0IGluIHRoZSB2YWxpZGF0aW9uIGVycm9ycy4gc2VlIGluZm9ybWF0aW9uIGUuZzogZXJyPFZhbGlkYXRvckVycm9yPi5kZXRhaWxzJztcbiAgICAgICAgdGhyb3cgbmV3IFZhbGlkYXRvckVycm9yKG1lc3NhZ2UsIHJlc3VsdHMpO1xuICAgICAgfVxuICAgICAgcmV0dXJuIE1lc3NhZ2UuU1VDQ0VTUztcbiAgICB9KTtcbiAgfTtcblxuICB0eXBlIFBpY2tOZnRTdG9yYWdlID0gUGljazxcbiAgICBPZmZjaGFpbixcbiAgICAnbmFtZScgfCAnc3ltYm9sJyB8ICdpbWFnZScgfCAnc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMnXG4gID47XG4gIHR5cGUgUGlja05mdFN0b3JhZ2VNZXRhcGxleCA9IFBpY2s8XG4gICAgSW5wdXROZnRNZXRhZGF0YSxcbiAgIC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Gxlcl9mZWVfYmFzaXNfcG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJGZWVCYXNpc1BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0YWRhdGEubmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzeW1ib2wnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLnN5bWJvbCkge1xuICAgICAgICAgICAgICByZXMgPSBpc1N5bWJvbChtZXRhZGF0YS5zeW1ib2wpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHJlcyAmJiByZXMuaXNFcnIpIHtcbiAgICAgICAgICByZXN1bHRzLnB1c2goLi4ucmVzLmVycm9yLmRldGFpbHMpO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIGlmIChyZXN1bHRzLmxlbmd0aCA+IDApIHtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9XG4gICAgICAgICAgJ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iwgIkNvbnZlcnRlciIsICJUb2tlbk1ldGFkYXRhIiwgIkNvbnZlcnRlciIsICJUcmFuc2ZlckNoZWNrZWQiLCAiQ29udmVydGVyIiwgIlRyYW5zZmVyIiwgIkNvbnZlcnRlciIsICJWYWxpZGF0b3IiLCAiTWVzc2FnZSIsICJDb252ZXJ0ZXIiLCAiQWlyZHJvcCJdCn0K \ No newline at end of file diff --git a/packages/suite-airdrop/dist/index.mjs b/packages/suite-airdrop/dist/index.mjs index 1c657a31e..c4c138e0b 100644 --- a/packages/suite-airdrop/dist/index.mjs +++ b/packages/suite-airdrop/dist/index.mjs @@ -454,22 +454,11 @@ var TransactionBuilder5; // ../global/src/index.ts import { Keypair as Keypair3, LAMPORTS_PER_SOL, PublicKey as PublicKey4 } from "@solana/web3.js"; -// ../account/src/associated.ts -import { - ASSOCIATED_TOKEN_PROGRAM_ID, - createAssociatedTokenAccountInstruction, - getAccount, - getAssociatedTokenAddressSync, - TOKEN_PROGRAM_ID, - TokenAccountNotFoundError, - TokenInvalidAccountOwnerError -} from "@solana/spl-token"; - // ../account/src/keypair.ts import { Keypair as Original, PublicKey as PublicKey2 } from "@solana/web3.js"; import bs from "bs58"; var Account; -((Account5) => { +((Account4) => { class Keypair4 { secret; pubkey; @@ -505,111 +494,16 @@ var Account; }); }; } - Account5.Keypair = Keypair4; + Account4.Keypair = Keypair4; })(Account || (Account = {})); -// ../account/src/associated.ts -var Account2; -((Account5) => { - let Associated; - ((Associated2) => { - const RETRY_OVER_LIMIT = 10; - const RETRY_SLEEP_TIME = 3; - const get = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const res = await (0, Associated2.makeOrCreateInstruction)( - mint, - owner, - new Account.Keypair({ secret: feePayer }).pubkey, - allowOwnerOffCurve - ); - if (!res.inst) { - return res.tokenAccount; - } - return new TransactionBuilder6.Common( - [res.inst], - [], - feePayer.toKeypair(), - res.tokenAccount - ); - }; - Associated2.retryGetOrCreate = async (mint, owner, feePayer) => { - let counter = 1; - while (counter < RETRY_OVER_LIMIT) { - try { - const inst = await get(mint, owner, feePayer, true); - if (inst && typeof inst === "string") { - debugLog("# associatedTokenAccount: ", inst); - return inst; - } else if (inst instanceof TransactionBuilder6.Common) { - (await inst.submit()).map( - async (ok) => { - await Node.confirmedSig(ok); - return inst.data; - }, - (err) => { - debugLog("# Error submit retryGetOrCreate: ", err); - throw err; - } - ); - } - } catch (e) { - debugLog(`# retry: ${counter} create token account: `, e); - debugLog(`# mint: ${mint}, owner: ${owner}, feePayer: ${feePayer}`); - } - await sleep(RETRY_SLEEP_TIME); - counter++; - } - throw Error(`retry action is over limit ${RETRY_OVER_LIMIT}`); - }; - Associated2.makeOrCreateInstruction = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const associatedTokenAccount = getAssociatedTokenAddressSync( - mint.toPublicKey(), - owner.toPublicKey(), - allowOwnerOffCurve, - TOKEN_PROGRAM_ID, - ASSOCIATED_TOKEN_PROGRAM_ID - ); - debugLog("# associatedTokenAccount: ", associatedTokenAccount.toString()); - try { - await getAccount( - Node.getConnection(), - associatedTokenAccount, - Node.getConnection().commitment, - TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst: void 0 - }; - } catch (error) { - if (!(error instanceof TokenAccountNotFoundError) && !(error instanceof TokenInvalidAccountOwnerError)) { - throw Error("Unexpected error"); - } - const payer = !feePayer ? owner : feePayer; - const inst = createAssociatedTokenAccountInstruction( - payer.toPublicKey(), - associatedTokenAccount, - owner.toPublicKey(), - mint.toPublicKey(), - TOKEN_PROGRAM_ID, - ASSOCIATED_TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst - }; - } - }; - })(Associated = Account5.Associated || (Account5.Associated = {})); -})(Account2 || (Account2 = {})); - // ../account/src/pda.ts import { PublicKey as PublicKey3 } from "@solana/web3.js"; import { PROGRAM_ID } from "@metaplex-foundation/mpl-token-metadata"; import { MPL_BUBBLEGUM_PROGRAM_ID } from "@metaplex-foundation/mpl-bubblegum"; import BN from "bn.js"; -var Account3; -((Account5) => { +var Account2; +((Account4) => { let Pda; ((Pda2) => { Pda2.getMetadata = (address) => { @@ -661,14 +555,13 @@ var Account3; ); return assetId.toString(); }; - })(Pda = Account5.Pda || (Account5.Pda = {})); -})(Account3 || (Account3 = {})); + })(Pda = Account4.Pda || (Account4.Pda = {})); +})(Account2 || (Account2 = {})); // ../account/src/index.ts -var Account4 = { - ...Account2, +var Account3 = { ...Account, - ...Account3 + ...Account2 }; // ../global/src/index.ts @@ -699,7 +592,7 @@ String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, op } return url; } - if (Account4.Keypair.isPubkey(addressOrSignature)) { + if (Account3.Keypair.isPubkey(addressOrSignature)) { if (explorer === "solanafm" /* SolanaFM */) { url = `${Constants.EXPLORER_SOLANAFM_URL}/address/${addressOrSignature}?cluster=${cluster}`; } else if (explorer === "xray" /* Xray */) { @@ -719,13 +612,13 @@ String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, op return url; }; String.prototype.toPublicKey = function() { - if (!Account4.Keypair.isPubkey(this.toString())) { + if (!Account3.Keypair.isPubkey(this.toString())) { throw Error(`No match KeyPair.PubKey: ${this.toString()}`); } return new PublicKey4(this.toString()); }; String.prototype.toKeypair = function() { - if (!Account4.Keypair.isSecret(this.toString())) { + if (!Account3.Keypair.isSecret(this.toString())) { throw Error(`No match KeyPair.Secret: ${this.toString()}`); } const decoded = bs2.decode(this.toString()); @@ -761,9 +654,6 @@ var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { console.log("[DEBUG]", data1, data2, data3, data4); } }; -var sleep = async (sec) => { - return new Promise((r) => setTimeout(r, sec * 1e3)); -}; var isPromise = (obj) => { return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; }; @@ -1535,4 +1425,4 @@ var Airdrop; export { Airdrop }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi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W5kZWZpbmVkKTtcbiAgICAgICAgbGV0IGZlZVBheWVyID0gc2lnbmVyc1swXTtcbiAgICAgICAgaWYgKGZlZVBheWVycy5sZW5ndGggPiAwICYmIGZlZVBheWVyc1swXS5mZWVQYXllcikge1xuICAgICAgICAgIGZlZVBheWVyID0gZmVlUGF5ZXJzWzBdLmZlZVBheWVyO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgdHJhbnNhY3Rpb24gPSBuZXcgVHJhbnNhY3Rpb24oKTtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHNpZ25lcnM7XG4gICAgICAgIGlmIChmZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gZmVlUGF5ZXIucHVibGljS2V5O1xuICAgICAgICAgIGZpbmFsU2lnbmVycyA9IFtmZWVQYXllciwgLi4uc2lnbmVyc107XG4gICAgICAgIH1cbiAgICAgICAgaW5zdHJ1Y3Rpb25zLm1hcCgoaW5zdCkgPT4gdHJhbnNhY3Rpb24uYWRkKGluc3QpKTtcblxuICAgICAgICAvLyBDYWxjdWxhdGVUeHNpemUuaXNNYXhUcmFuc2FjdGlvblNpemUodHJhbnNhY3Rpb24sIGZlZVBheWVyLnB1YmxpY0tleSk7XG5cbiAgICAgICAgY29uc3Qgb3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogTUFYX1JFVFJJRVMsXG4gICAgICAgIH07XG5cbiAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgIG9wdGlvbnMsXG4gICAgICAgICk7XG4gICAgICB9KTtcbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHsgQ29uc3RhbnRzLCB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iAgICBleHBvcnQgY29uc3QgcmV0cnlHZXRPckNyZWF0ZSA9IGFzeW5jIChcbiAgICAgIG1pbnQ6IFB1YmtleSxcbiAgICAgIG93bmVyOiBQdWJrZXksXG4gICAgICBmZWVQYXllcjogU2VjcmV0LFxuICAgICk6IFByb21pc2U8c3RyaW5nPiA9PiB7XG4gICAgICBsZXQgY291bnRlciA9IDE7XG4gICAgICB3aGlsZSAoY291bnRlciA8IFJFVFJZX09WRVJfTElNSVQpIHtcbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICBjb25zdCBpbnN0ID0gYXdhaXQgZ2V0KG1pbnQsIG93bmVyLCBmZWVQYXllciwgdHJ1ZSk7XG5cbiAgICAgICAgICBpZiAoaW5zdCAmJiB0eXBlb2YgaW5zdCA9PT0gJ3N0cmluZycpIHtcbiAgICAgICAgICAgIGRlYnVnTG9nKCcjIGFzc29jaWF0ZWRUb2tlbkFjY291bnQ6ICcsIGluc3QpO1xuICAgICAgICAgICAgcmV0dXJuIGluc3Q7XG4gICAgICAgICAgfSBlbHNlIGlmIChpbnN0IGluc3RhbmNlb2YgVHJhbnNhY3Rpb25CdWlsZGVyLkNvbW1vbikge1xuICAgICAgICAgICAgKGF3YWl0IGluc3Quc3VibWl0KCkpLm1hcChcbiAgICAgICAgICAgICAgYXN5bmMgKG9rOiBzdHJpbmcpID0+IHtcbiAgICAgICAgICAgICAgICBhd2FpdCBOb2RlLmNvbmZpcm1lZFNpZyhvayk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGluc3QuZGF0YTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgKGVycjogRXJyb3IpID0+IHtcbiAgICAgICAgICAgICAgICBkZWJ1Z0xvZygnIyBFcnJvciBzdWJtaXQgcmV0cnlHZXRPckNyZWF0ZTogJywgZXJyKTtcbiAgICAgICAgICAgICAgICB0aHJvdyBlcnI7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgIC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+ID0+IHtcbiAgICAgIGNvbnN0IGFzc29jaWF0ZWRUb2tlbkFjY291bnQgPSBnZXRBc3NvY2lhdGVkVG9rZW5BZGRyZXNzU3luYyhcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICBhbGxvd093bmVyT2ZmQ3VydmUsXG4gICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGFzc29jaWF0ZWRUb2tlbkFjY291bnQ6ICcsIGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSk7XG5cbiAgICAgIHRyeSB7XG4gICAgICAgIC8vIERvbnQgdXNlIFJlc3VsdFxuICAgICAgICBhd2FpdCBnZXRBY2NvdW50KFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCkuY29tbWl0bWVudCxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3Q6IHVuZGVmaW5lZCxcbiAgICAgICAgfTtcbiAgICAgIH0gY2F0Y2ggKGVycm9yOiB1bmtub3duKSB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5BY2NvdW50Tm90Rm91bmRFcnJvcikgJiZcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5JbnZhbGlkQWNjb3VudE93bmVyRXJyb3IpXG4gICAgICAgICkge1xuICAgICA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IiLCAiVHJhbnNmZXIiLCAiQ29udmVydGVyIiwgIlZhbGlkYXRvciIsICJNZXNzYWdlIiwgIkNvbnZlcnRlciIsICJBaXJkcm9wIl0KfQo= \ No newline at end of file +//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9iYXRjaC50cyIsICIuLi8uLi9ub2RlL3NyYy9pbmRleC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jb21tb24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvbWludC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9wYXJ0aWFsLXNpZ24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY2FsY3VsYXRlLXR4c2l6ZS50cyIsICIuLi8uLi9nbG9iYWwvc3JjL2luZGV4LnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2tleXBhaXIudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvcGRhLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3N1aXRlLXV0aWxzL3NyYy9zaGFyZWQudHMiLCAiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL3Jlc3VsdC50cyIsICIuLi8uLi9jb252ZXJ0ZXIvc3JjL2NvbGxlY3Rpb24udHMiLCAiLi4vLi4vY29udmVydGVyL3NyYy9jcmVhdG9ycy50cyIsICIuLi8uLi9jb252ZXJ0ZXIvc3JjL2NvbXByZXNzZWQtbmZ0LW1ldGFkYXRhLnRzIiwgIi4uLy4uL2NvbnZlcnRlci9zcmMvcm95YWx0e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WQsXG4gICAgICBjYWxsYmFja0Z1bmM6IChcbiAgICAgICAgZmlsZVBhdGg6IEZpbGVUeXBlLFxuICAgICAgICBzdG9yYWdlVHlwZTogU3RvcmFnZVR5cGUsXG4gICAgICAgIGZlZVBheWVyPzogU2VjcmV0LFxuICAgICAgKSA9PiBQcm9taXNlPFJlc3VsdDxzdHJpbmcsIEVycm9yPj4sXG4gICAgICBzdG9yYWdlVHlwZTogU3RvcmFnZVR5cGUsXG4gICAgICBmZWVQYXllcj86IFNlY3JldCxcbiAgICApOiBQcm9taXNlPFByb3BlcnRpZXM+ID0+IHtcbiAgICAgIGlmICghaW5wdXQgfHwgIWlucHV0LmZpbGVzKSB7XG4gICAgICAgIHJldHVybiB7fTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgZmlsZXMgPSBhd2FpdCBQcm9taXNlLmFsbChcbiAgICAgICAgaW5wdXQuZmlsZXMubWFwKGFzeW5jIChmaWxlKSA9PiB7XG4gICAgICAgICAgaWYgKCFmaWxlLmZpbGVQYXRoKSB7XG4gICAgICAgICAgICByZXR1cm4ge307XG4gICAgICAgICAgfVxuICAgICAgICAgIGNvbnN0IHJlcyA9IGF3YWl0IGNhbGxiYWNrRnVuYyhmaWxlLmZpbGVQYXRoLCBzdG9yYWdlVHlwZSwgZmVlUGF5ZXIpO1xuICAgICAgICAgIGlmIChyZXMuaXNFcnIpIHtcbiAgICAgICAgICAgIHRocm93IEVycm9yKHJlcy5lcnJvci5tZXNzYWdlKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgcmV0dXJuIG92ZXJ3cml0ZU9iamVjdChmaWxlLCBbXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGV4aXN0c0tleTogJ2ZpbGVQYXRoJyxcbiAgICAgICAgICAgICAgd2lsbDogeyBrZXk6ICd1cmknLCB2YWx1ZTogcmVzLnZhbHVlIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgIF0pO1xuICAgICAgICB9KSxcbiAgICAgICk7XG4g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Q8c3RyaW5nLCBWYWxpZGF0b3JFcnJvcj4gPT4ge1xuICAgIHJldHVybiBUcnkoKCkgPT4ge1xuICAgICAgY29uc3Qga2V5cyA9IE9iamVjdC5rZXlzKG1ldGFkYXRhKTtcbiAgICAgIGNvbnN0IHJlc3VsdHM6IERldGFpbHNbXSA9IFtdO1xuICAgICAga2V5cy5tYXAoKGtleSkgPT4ge1xuICAgICAgICBsZXQgcmVzITogUmVzdWx0PHN0cmluZywgVmFsaWRhdG9yRXJyb3I+O1xuICAgICAgICBzd2l0Y2ggKGtleSkge1xuICAgICAgICAgIGNhc2UgJ2ltYWdlJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuaW1hZ2UpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNJbWFnZVVybChtZXRhZGF0YS5pbWFnZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdyb3lhbHR5JzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEucm95YWx0eSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1JveWFsdHkobWV0YWRhdGEucm95YWx0eSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOlxuICAgICAgICAgICAg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XBhaXIiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJSZXN1bHQiLCAiQ29udmVydGVyIiwgIkNvbGxlY3Rpb24iLCAiQ29sbGVjdGlvbk1pbnQiLCAiQ29udmVydGVyIiwgIkNyZWF0b3JzIiwgIkNvbnZlcnRlciIsICJDb21wcmVzc2VkTmZ0TWV0YWRhdGEiLCAiQ29udmVydGVyIiwgIlJveWFsdHkiLCAiQ29udmVydGVyIiwgIk5mdCIsICJDb252ZXJ0ZXIiLCAiTWVtbyIsICJDb252ZXJ0ZXIiLCAiTWludCIsICJDb252ZXJ0ZXIiLCAiUmVndWxhck5mdE1ldGFkYXRhIiwgIkNvbnZlcnRlciIsICJQcm9wZXJ0aWVzIiwgIkNvbnZlcnRlciIsICJVc2VzIiwgIkNvbnZlcnRlciIsICJUb2tlbk1ldGFkYXRhIiwgIkNvbnZlcnRlciIsICJUcmFuc2ZlckNoZWNrZWQiLCAiQ29udmVydGVyIiwgIlRyYW5zZmVyIiwgIkNvbnZlcnRlciIsICJWYWxpZGF0b3IiLCAiTWVzc2FnZSIsICJDb252ZXJ0ZXIiLCAiQWlyZHJvcCJdCn0K \ No newline at end of file diff --git a/packages/suite-compressed-nft/dist/index.d.mts b/packages/suite-compressed-nft/dist/index.d.mts deleted file mode 100644 index 4a39b8aa5..000000000 --- a/packages/suite-compressed-nft/dist/index.d.mts +++ /dev/null @@ -1,483 +0,0 @@ -import * as mpl_bubblegum_instruction from 'mpl-bubblegum-instruction'; -import BN from 'bn.js'; -import * as _solana_web3_js from '@solana/web3.js'; -import { TransactionSignature, PublicKey, Keypair, TransactionInstruction } from '@solana/web3.js'; - -declare const pubKeyNominality: unique symbol; -declare const secretNominality: unique symbol; -type Pubkey = (string & { - [pubKeyNominality]: never; -}) | string; -type Secret$1 = (string & { - [secretNominality]: never; -}) | string; - -type FileType = string | File; - -type StorageType = 'nftStorage' | 'arweave' | string; -type Offchain = { - name?: string; - symbol?: string; - description?: string; - seller_fee_basis_points?: number; - image?: string; - external_url?: string; - attributes?: Attribute[]; - properties?: Properties; - collection?: { - name?: string; - family?: string; - [key: string]: unknown; - }; - collectionDetails?: { - kind: string; - size: number; - }; - created_at?: number; -}; -type Properties = { - creators?: { - address?: string; - share?: number; - [key: string]: unknown; - }[]; - files?: { - type?: string; - filePath?: FileType; - [key: string]: unknown; - }[]; - [key: string]: unknown; -}; -type Attribute = { - trait_type?: string; - value?: string; - [key: string]: unknown; -}; - -type Authority = { - address: Pubkey; - scopes: string[]; -}; -type Creators = { - address: Pubkey; - share: number; - verified: boolean; -}[]; -type Metadata = { - mint: Pubkey; - collectionMint: Pubkey; - authorities: Authority[]; - royalty: number; - name: string; - symbol: string; - uri: string; - creators: Creators; - treeAddress: Pubkey; - isCompressed: boolean; - isMutable: boolean; - isBurn: boolean; - editionNonce: number; - primarySaleHappened: boolean; - dateTime: Date; - offchain: Offchain; -}; -type NftMetadata = { - page: number; - total: number; - limit: number; - metadatas: Metadata[]; -}; - -declare enum SortDirection { - Asc = "asc", - Desc = "desc" -} -declare enum SortBy { - Created = "created", - Updated = "updated", - Recent = "recent_action" -} -type Sortable = { - sortBy: SortBy; - sortDirection: SortDirection; -}; -type FindOptions = { - limit: number; - page: number; - sortBy: Sortable; - before: string; - after: string; -}; - -type DelegateOptions = { - delegate: Pubkey; -}; - -type MintOptions = { - receiver: Pubkey; - delegate: Pubkey; - feePayer: Secret$1; -}; - -type MintCollectionOptions = { - freezeAuthority: Pubkey; - feePayer: Secret$1; -}; - -type SpaceOptions = { - feePayer: Secret$1; -}; -type SpaceNumber = 8 | 16000 | 100000 | 16700000 | 67000000 | 1000000000; - -type bignum = number | BN; -declare enum UseMethod { - Burn = 0, - Multiple = 1, - Single = 2 -} -type Uses = { - useMethod: UseMethod; - remaining: bignum; - total: bignum; -}; -type InputCreators = { - address: Pubkey; - secret: Secret$1; - share: number; -}; - -type InputCollection = Pubkey; -type Options = { - [key: string]: unknown; -}; -type InputNftMetadata = { - name: string; - symbol: string; - royalty?: number; - storageType?: StorageType; - filePath?: FileType; - uri?: string; - isMutable?: boolean; - description?: string; - external_url?: string; - attributes?: Attribute[]; - properties?: Properties; - maxSupply?: bignum; - creators?: InputCreators[]; - uses?: Uses; - collection?: InputCollection; - options?: Options; -}; - -declare abstract class AbstractResult { - protected abstract _chain(ok: (value: T) => Result, err: (error: E) => Result): Result; - unwrap(): T; - unwrap(ok: (value: T) => U): U; - unwrap(ok: (value: T) => U, err: (error: E) => V): U | V; - unwrap(ok: (value: T) => U, err: (error: E) => U): U; - map(ok: (value: T) => U): Result; - map(ok: (value: T) => U, err: (error: E) => F): Result; - chain(ok: (value: T) => Result): Result; - chain(ok: (value: T) => Result): Result; - chain(ok: (value: T) => Result, err: (error: E) => Result): Result; - match(ok: (value: T) => U, err: (error: E) => F): void | Promise; - submit(feePayer?: Secret$1): Promise>; -} -declare global { - interface Array { - submit(feePayer?: Secret$1): Promise>; - } -} -declare class InternalOk extends AbstractResult { - readonly value: T; - readonly isOk = true; - readonly isErr = false; - constructor(value: T); - protected _chain(ok: (value: T) => Result, _err: (error: E) => Result): Result; -} -declare class InternalErr extends AbstractResult { - readonly error: E; - readonly isOk = false; - readonly isErr = true; - constructor(error: E); - protected _chain(_ok: (value: T) => Result, err: (error: E) => Result): Result; -} -declare namespace Result { - export type Ok = InternalOk; - export type Err = InternalErr; - export function ok(value: T): Result; - export function err(error?: E): Result; - type U = Result; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3]): Result<[ - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2]): Result<[OkType, OkType, OkType], ErrType>; - export function all(obj: [R0, R1]): Result<[OkType, OkType], ErrType>; - export function all(obj: [R0]): Result<[OkType], ErrType>; - export function all(obj: []): Result<[]>; - export function all>(obj: T): Result<{ - [K in keyof T]: T[K] extends Result ? I : never; - }, { - [K in keyof T]: T[K] extends Result ? E : never; - }[keyof T]>; - export {}; -} -type Result = Result.Ok | Result.Err; -type OkType> = R extends Result ? O : never; -type ErrType> = R extends Result ? E : never; - -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; -}; - -type CommonStructure = { - instructions: TransactionInstruction[]; - signers: Keypair[]; - feePayer?: Keypair; - canSubmit?: boolean; - data?: T; - submit: () => Promise>; -}; -type MintStructure = { - instructions: TransactionInstruction[]; - signers: Keypair[]; - data: T; - feePayer: Keypair; - canSubmit?: boolean; - submit: () => Promise>; -}; -type PartialSignStructure = { - hexInstruction: string; - canSubmit?: boolean; - data?: T; - submit: (feePayer: Secret$1) => Promise>; -}; - -declare namespace CompressedNft$1 { - class Space { - spaceOwner: Pubkey; - constructor(spaceOwner: Pubkey); - getAssetId: () => Promise; - } - /** - * create a new nft space - * This function needs only 1 call - * - * @param {Secret} owner - * @param {SpaceNumber} spaceSize - * @param {Partial} options - * - * @return Promise> - */ - const createSpace: (owner: Secret, spaceSize: SpaceNumber, options?: Partial) => Promise>; - /** - * Calculate space cost - * - * @param {number} spaceSize - * @return Promise<{sol: number}> - */ - const calculateSpaceCost: (spaceSize: number) => Promise<{ - sol: number; - }>; -} - -/** @namespace */ -declare const CompressedNft: { - createTransfer: (assetId: Pubkey, assetIdOwner: Pubkey, dest: Pubkey, delegate?: Pubkey | undefined) => Promise<_solana_web3_js.TransactionInstruction>; - transfer: (mint: Pubkey, owner: Pubkey, dest: Pubkey, ownerOrMultisig: Secret[]) => Promise>; - mintCollection: (owner: Secret$1, input: InputNftMetadata, options?: Partial) => Promise>; - Space: typeof CompressedNft$1.Space; - initSpace: (owner: Secret, maxDepth: number, maxBufferSize: number, canopyDepth: number, options?: Partial) => Promise>; - createSpace: (owner: Secret, spaceSize: SpaceNumber, options?: Partial) => Promise>; - calculateSpaceCost: (spaceSize: number) => Promise<{ - sol: number; - }>; - createVerifyCreator: (creators: mpl_bubblegum_instruction.Creator[], assetId: _solana_web3_js.PublicKey, treeOwner: _solana_web3_js.PublicKey, metadata: mpl_bubblegum_instruction.MetadataArgs, feePayer: _solana_web3_js.PublicKey) => Promise<_solana_web3_js.TransactionInstruction>; - mint: (owner: Secret$1, input: InputNftMetadata, treeOwner: Pubkey, collectionMint: Pubkey, options?: Partial) => Promise, Error>>; - gasLessTransfer: (mint: Pubkey, owner: Secret$1, dest: Pubkey, feePayer: Pubkey) => Promise[]>; - gasLessDelegate: (mint: Pubkey, owner: Secret$1, newDelegate: Pubkey) => Promise>; - findByOwner: (owner: Pubkey, options?: Partial) => Promise>; - findByMint: (mint: Pubkey) => Promise, Error>>; - findByCollection: (collectionMint: Pubkey, options?: Partial) => Promise>; - createDeleagate: (assetId: _solana_web3_js.PublicKey, newDelegate: _solana_web3_js.PublicKey | null) => Promise<_solana_web3_js.TransactionInstruction>; - setDelegate: (mint: Pubkey, owner: Secret$1, options?: Partial) => Promise>; -}; - -export { CompressedNft }; diff --git a/packages/suite-compressed-nft/dist/index.d.ts b/packages/suite-compressed-nft/dist/index.d.ts deleted file mode 100644 index 4a39b8aa5..000000000 --- a/packages/suite-compressed-nft/dist/index.d.ts +++ /dev/null @@ -1,483 +0,0 @@ -import * as mpl_bubblegum_instruction from 'mpl-bubblegum-instruction'; -import BN from 'bn.js'; -import * as _solana_web3_js from '@solana/web3.js'; -import { TransactionSignature, PublicKey, Keypair, TransactionInstruction } from '@solana/web3.js'; - -declare const pubKeyNominality: unique symbol; -declare const secretNominality: unique symbol; -type Pubkey = (string & { - [pubKeyNominality]: never; -}) | string; -type Secret$1 = (string & { - [secretNominality]: never; -}) | string; - -type FileType = string | File; - -type StorageType = 'nftStorage' | 'arweave' | string; -type Offchain = { - name?: string; - symbol?: string; - description?: string; - seller_fee_basis_points?: number; - image?: string; - external_url?: string; - attributes?: Attribute[]; - properties?: Properties; - collection?: { - name?: string; - family?: string; - [key: string]: unknown; - }; - collectionDetails?: { - kind: string; - size: number; - }; - created_at?: number; -}; -type Properties = { - creators?: { - address?: string; - share?: number; - [key: string]: unknown; - }[]; - files?: { - type?: string; - filePath?: FileType; - [key: string]: unknown; - }[]; - [key: string]: unknown; -}; -type Attribute = { - trait_type?: string; - value?: string; - [key: string]: unknown; -}; - -type Authority = { - address: Pubkey; - scopes: string[]; -}; -type Creators = { - address: Pubkey; - share: number; - verified: boolean; -}[]; -type Metadata = { - mint: Pubkey; - collectionMint: Pubkey; - authorities: Authority[]; - royalty: number; - name: string; - symbol: string; - uri: string; - creators: Creators; - treeAddress: Pubkey; - isCompressed: boolean; - isMutable: boolean; - isBurn: boolean; - editionNonce: number; - primarySaleHappened: boolean; - dateTime: Date; - offchain: Offchain; -}; -type NftMetadata = { - page: number; - total: number; - limit: number; - metadatas: Metadata[]; -}; - -declare enum SortDirection { - Asc = "asc", - Desc = "desc" -} -declare enum SortBy { - Created = "created", - Updated = "updated", - Recent = "recent_action" -} -type Sortable = { - sortBy: SortBy; - sortDirection: SortDirection; -}; -type FindOptions = { - limit: number; - page: number; - sortBy: Sortable; - before: string; - after: string; -}; - -type DelegateOptions = { - delegate: Pubkey; -}; - -type MintOptions = { - receiver: Pubkey; - delegate: Pubkey; - feePayer: Secret$1; -}; - -type MintCollectionOptions = { - freezeAuthority: Pubkey; - feePayer: Secret$1; -}; - -type SpaceOptions = { - feePayer: Secret$1; -}; -type SpaceNumber = 8 | 16000 | 100000 | 16700000 | 67000000 | 1000000000; - -type bignum = number | BN; -declare enum UseMethod { - Burn = 0, - Multiple = 1, - Single = 2 -} -type Uses = { - useMethod: UseMethod; - remaining: bignum; - total: bignum; -}; -type InputCreators = { - address: Pubkey; - secret: Secret$1; - share: number; -}; - -type InputCollection = Pubkey; -type Options = { - [key: string]: unknown; -}; -type InputNftMetadata = { - name: string; - symbol: string; - royalty?: number; - storageType?: StorageType; - filePath?: FileType; - uri?: string; - isMutable?: boolean; - description?: string; - external_url?: string; - attributes?: Attribute[]; - properties?: Properties; - maxSupply?: bignum; - creators?: InputCreators[]; - uses?: Uses; - collection?: InputCollection; - options?: Options; -}; - -declare abstract class AbstractResult { - protected abstract _chain(ok: (value: T) => Result, err: (error: E) => Result): Result; - unwrap(): T; - unwrap(ok: (value: T) => U): U; - unwrap(ok: (value: T) => U, err: (error: E) => V): U | V; - unwrap(ok: (value: T) => U, err: (error: E) => U): U; - map(ok: (value: T) => U): Result; - map(ok: (value: T) => U, err: (error: E) => F): Result; - chain(ok: (value: T) => Result): Result; - chain(ok: (value: T) => Result): Result; - chain(ok: (value: T) => Result, err: (error: E) => Result): Result; - match(ok: (value: T) => U, err: (error: E) => F): void | Promise; - submit(feePayer?: Secret$1): Promise>; -} -declare global { - interface Array { - submit(feePayer?: Secret$1): Promise>; - } -} -declare class InternalOk extends AbstractResult { - readonly value: T; - readonly isOk = true; - readonly isErr = false; - constructor(value: T); - protected _chain(ok: (value: T) => Result, _err: (error: E) => Result): Result; -} -declare class InternalErr extends AbstractResult { - readonly error: E; - readonly isOk = false; - readonly isErr = true; - constructor(error: E); - protected _chain(_ok: (value: T) => Result, err: (error: E) => Result): Result; -} -declare namespace Result { - export type Ok = InternalOk; - export type Err = InternalErr; - export function ok(value: T): Result; - export function err(error?: E): Result; - type U = Result; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3]): Result<[ - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2]): Result<[OkType, OkType, OkType], ErrType>; - export function all(obj: [R0, R1]): Result<[OkType, OkType], ErrType>; - export function all(obj: [R0]): Result<[OkType], ErrType>; - export function all(obj: []): Result<[]>; - export function all>(obj: T): Result<{ - [K in keyof T]: T[K] extends Result ? I : never; - }, { - [K in keyof T]: T[K] extends Result ? E : never; - }[keyof T]>; - export {}; -} -type Result = Result.Ok | Result.Err; -type OkType> = R extends Result ? O : never; -type ErrType> = R extends Result ? E : never; - -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; -}; - -type CommonStructure = { - instructions: TransactionInstruction[]; - signers: Keypair[]; - feePayer?: Keypair; - canSubmit?: boolean; - data?: T; - submit: () => Promise>; -}; -type MintStructure = { - instructions: TransactionInstruction[]; - signers: Keypair[]; - data: T; - feePayer: Keypair; - canSubmit?: boolean; - submit: () => Promise>; -}; -type PartialSignStructure = { - hexInstruction: string; - canSubmit?: boolean; - data?: T; - submit: (feePayer: Secret$1) => Promise>; -}; - -declare namespace CompressedNft$1 { - class Space { - spaceOwner: Pubkey; - constructor(spaceOwner: Pubkey); - getAssetId: () => Promise; - } - /** - * create a new nft space - * This function needs only 1 call - * - * @param {Secret} owner - * @param {SpaceNumber} spaceSize - * @param {Partial} options - * - * @return Promise> - */ - const createSpace: (owner: Secret, spaceSize: SpaceNumber, options?: Partial) => Promise>; - /** - * Calculate space cost - * - * @param {number} spaceSize - * @return Promise<{sol: number}> - */ - const calculateSpaceCost: (spaceSize: number) => Promise<{ - sol: number; - }>; -} - -/** @namespace */ -declare const CompressedNft: { - createTransfer: (assetId: Pubkey, assetIdOwner: Pubkey, dest: Pubkey, delegate?: Pubkey | undefined) => Promise<_solana_web3_js.TransactionInstruction>; - transfer: (mint: Pubkey, owner: Pubkey, dest: Pubkey, ownerOrMultisig: Secret[]) => Promise>; - mintCollection: (owner: Secret$1, input: InputNftMetadata, options?: Partial) => Promise>; - Space: typeof CompressedNft$1.Space; - initSpace: (owner: Secret, maxDepth: number, maxBufferSize: number, canopyDepth: number, options?: Partial) => Promise>; - createSpace: (owner: Secret, spaceSize: SpaceNumber, options?: Partial) => Promise>; - calculateSpaceCost: (spaceSize: number) => Promise<{ - sol: number; - }>; - createVerifyCreator: (creators: mpl_bubblegum_instruction.Creator[], assetId: _solana_web3_js.PublicKey, treeOwner: _solana_web3_js.PublicKey, metadata: mpl_bubblegum_instruction.MetadataArgs, feePayer: _solana_web3_js.PublicKey) => Promise<_solana_web3_js.TransactionInstruction>; - mint: (owner: Secret$1, input: InputNftMetadata, treeOwner: Pubkey, collectionMint: Pubkey, options?: Partial) => Promise, Error>>; - gasLessTransfer: (mint: Pubkey, owner: Secret$1, dest: Pubkey, feePayer: Pubkey) => Promise[]>; - gasLessDelegate: (mint: Pubkey, owner: Secret$1, newDelegate: Pubkey) => Promise>; - findByOwner: (owner: Pubkey, options?: Partial) => Promise>; - findByMint: (mint: Pubkey) => Promise, Error>>; - findByCollection: (collectionMint: Pubkey, options?: Partial) => Promise>; - createDeleagate: (assetId: _solana_web3_js.PublicKey, newDelegate: _solana_web3_js.PublicKey | null) => Promise<_solana_web3_js.TransactionInstruction>; - setDelegate: (mint: Pubkey, owner: Secret$1, options?: Partial) => Promise>; -}; - -export { CompressedNft }; diff --git a/packages/suite-compressed-nft/dist/index.js b/packages/suite-compressed-nft/dist/index.js index 1f1280f04..5b200fcc8 100644 --- a/packages/suite-compressed-nft/dist/index.js +++ b/packages/suite-compressed-nft/dist/index.js @@ -414,14 +414,11 @@ var TransactionBuilder5; // ../global/src/index.ts var import_web38 = require("@solana/web3.js"); -// ../account/src/associated.ts -var import_spl_token = require("@solana/spl-token"); - // ../account/src/keypair.ts var import_web36 = require("@solana/web3.js"); var import_bs58 = __toESM(require("bs58")); var Account; -((Account5) => { +((Account4) => { class Keypair4 { secret; pubkey; @@ -457,111 +454,16 @@ var Account; }); }; } - Account5.Keypair = Keypair4; + Account4.Keypair = Keypair4; })(Account || (Account = {})); -// ../account/src/associated.ts -var Account2; -((Account5) => { - let Associated; - ((Associated2) => { - const RETRY_OVER_LIMIT = 10; - const RETRY_SLEEP_TIME = 3; - const get = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const res = await (0, Associated2.makeOrCreateInstruction)( - mint, - owner, - new Account.Keypair({ secret: feePayer }).pubkey, - allowOwnerOffCurve - ); - if (!res.inst) { - return res.tokenAccount; - } - return new TransactionBuilder6.Common( - [res.inst], - [], - feePayer.toKeypair(), - res.tokenAccount - ); - }; - Associated2.retryGetOrCreate = async (mint, owner, feePayer) => { - let counter = 1; - while (counter < RETRY_OVER_LIMIT) { - try { - const inst = await get(mint, owner, feePayer, true); - if (inst && typeof inst === "string") { - debugLog("# associatedTokenAccount: ", inst); - return inst; - } else if (inst instanceof TransactionBuilder6.Common) { - (await inst.submit()).map( - async (ok) => { - await Node.confirmedSig(ok); - return inst.data; - }, - (err) => { - debugLog("# Error submit retryGetOrCreate: ", err); - throw err; - } - ); - } - } catch (e) { - debugLog(`# retry: ${counter} create token account: `, e); - debugLog(`# mint: ${mint}, owner: ${owner}, feePayer: ${feePayer}`); - } - await sleep(RETRY_SLEEP_TIME); - counter++; - } - throw Error(`retry action is over limit ${RETRY_OVER_LIMIT}`); - }; - Associated2.makeOrCreateInstruction = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const associatedTokenAccount = (0, import_spl_token.getAssociatedTokenAddressSync)( - mint.toPublicKey(), - owner.toPublicKey(), - allowOwnerOffCurve, - import_spl_token.TOKEN_PROGRAM_ID, - import_spl_token.ASSOCIATED_TOKEN_PROGRAM_ID - ); - debugLog("# associatedTokenAccount: ", associatedTokenAccount.toString()); - try { - await (0, import_spl_token.getAccount)( - Node.getConnection(), - associatedTokenAccount, - Node.getConnection().commitment, - import_spl_token.TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst: void 0 - }; - } catch (error) { - if (!(error instanceof import_spl_token.TokenAccountNotFoundError) && !(error instanceof import_spl_token.TokenInvalidAccountOwnerError)) { - throw Error("Unexpected error"); - } - const payer = !feePayer ? owner : feePayer; - const inst = (0, import_spl_token.createAssociatedTokenAccountInstruction)( - payer.toPublicKey(), - associatedTokenAccount, - owner.toPublicKey(), - mint.toPublicKey(), - import_spl_token.TOKEN_PROGRAM_ID, - import_spl_token.ASSOCIATED_TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst - }; - } - }; - })(Associated = Account5.Associated || (Account5.Associated = {})); -})(Account2 || (Account2 = {})); - // ../account/src/pda.ts var import_web37 = require("@solana/web3.js"); var import_mpl_token_metadata = require("@metaplex-foundation/mpl-token-metadata"); var import_mpl_bubblegum = require("@metaplex-foundation/mpl-bubblegum"); var import_bn = __toESM(require("bn.js")); -var Account3; -((Account5) => { +var Account2; +((Account4) => { let Pda; ((Pda2) => { Pda2.getMetadata = (address) => { @@ -613,14 +515,13 @@ var Account3; ); return assetId.toString(); }; - })(Pda = Account5.Pda || (Account5.Pda = {})); -})(Account3 || (Account3 = {})); + })(Pda = Account4.Pda || (Account4.Pda = {})); +})(Account2 || (Account2 = {})); // ../account/src/index.ts -var Account4 = { - ...Account2, +var Account3 = { ...Account, - ...Account3 + ...Account2 }; // ../global/src/index.ts @@ -651,7 +552,7 @@ String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, op } return url; } - if (Account4.Keypair.isPubkey(addressOrSignature)) { + if (Account3.Keypair.isPubkey(addressOrSignature)) { if (explorer === "solanafm" /* SolanaFM */) { url = `${Constants.EXPLORER_SOLANAFM_URL}/address/${addressOrSignature}?cluster=${cluster}`; } else if (explorer === "xray" /* Xray */) { @@ -671,13 +572,13 @@ String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, op return url; }; String.prototype.toPublicKey = function() { - if (!Account4.Keypair.isPubkey(this.toString())) { + if (!Account3.Keypair.isPubkey(this.toString())) { throw Error(`No match KeyPair.PubKey: ${this.toString()}`); } return new import_web38.PublicKey(this.toString()); }; String.prototype.toKeypair = function() { - if (!Account4.Keypair.isSecret(this.toString())) { + if (!Account3.Keypair.isSecret(this.toString())) { throw Error(`No match KeyPair.Secret: ${this.toString()}`); } const decoded = import_bs582.default.decode(this.toString()); @@ -1730,7 +1631,7 @@ var CompressedNft; const ownership = rpcAsset.value.ownership; const assetProof = rpcAssetProof.value; const treeOwner = assetProof.tree_id.toPublicKey(); - const treeAuthority = Account4.Pda.getTreeAuthority(assetProof.tree_id); + const treeAuthority = Account3.Pda.getTreeAuthority(assetProof.tree_id); const previousLeafDelegate = ownership.delegate ? ownership.delegate.toPublicKey() : ownership.owner.toPublicKey(); const newLeafDelegate = newDelegate ? newDelegate : previousLeafDelegate; const treeAccount = await import_spl_account_compression.ConcurrentMerkleTreeAccount.fromAccountAddress( @@ -1919,7 +1820,7 @@ var CompressedNft5; inst.add( await CompressedNft4.createTransfer( mint, - new Account4.Keypair({ secret: owner }).pubkey, + new Account3.Keypair({ secret: owner }).pubkey, dest, feePayer ) @@ -2173,14 +2074,14 @@ var CompressedNft6; this.spaceOwner.toPublicKey() ); const leafIndex = treeAccount.tree.rightMostPath.index - 1; - return Account4.Pda.getAssetId(this.spaceOwner, leafIndex); + return Account3.Pda.getAssetId(this.spaceOwner, leafIndex); }; } CompressedNft10.Space = Space; CompressedNft10.initSpace = (owner, maxDepth, maxBufferSize, canopyDepth, options = {}) => { return Try(async () => { const payer = options.feePayer ? options.feePayer : owner; - const treeOwner = Account4.Keypair.create(); + const treeOwner = Account3.Keypair.create(); const space = (0, import_spl_account_compression3.getConcurrentMerkleTreeAccountSize)( maxDepth, maxBufferSize, @@ -2322,17 +2223,17 @@ var CompressedNft7; const storageType = input.storageType || DEFAULT_STORAGE_TYPE; const ownerPublicKey = owner.toKeypair().publicKey; const leafOwner = receiver ? receiver.toPublicKey() : ownerPublicKey; - const leafDelegate = delegate ? delegate : new Account4.Keypair({ secret: payer }).pubkey; - const treeAuthority = Account4.Pda.getTreeAuthority( + const leafDelegate = delegate ? delegate : new Account3.Keypair({ secret: payer }).pubkey; + const treeAuthority = Account3.Pda.getTreeAuthority( treeOwner.toPublicKey().toString() ); - const collectionMetadata = Account4.Pda.getMetadata( + const collectionMetadata = Account3.Pda.getMetadata( collectionMint.toString() ); - const collectionMasterEditionAccount = Account4.Pda.getMasterEdition( + const collectionMasterEditionAccount = Account3.Pda.getMasterEdition( collectionMint.toString() ); - const bubblegumSigner = Account4.Pda.getBgumSigner(); + const bubblegumSigner = Account3.Pda.getBgumSigner(); let properties; if (input.properties) { properties = await Converter14.Properties.intoInfra( @@ -2441,7 +2342,7 @@ var CompressedNft7; })(CompressedNft7 || (CompressedNft7 = {})); // ../suite-spl-token/src/add.ts -var import_spl_token2 = require("@solana/spl-token"); +var import_spl_token = require("@solana/spl-token"); // ../suite-spl-token/src/calculate-amount.ts var SplToken; @@ -2458,12 +2359,12 @@ var SplToken2; return Try(async () => { const payer = options.feePayer ? options.feePayer : ownerOrMultisig[0]; const keypairs = ownerOrMultisig.map((s) => s.toKeypair()); - const tokenAssociated = await Account4.Associated.retryGetOrCreate( + const tokenAssociated = await Account3.Associated.retryGetOrCreate( token, owner, payer ); - const inst = (0, import_spl_token2.createMintToCheckedInstruction)( + const inst = (0, import_spl_token.createMintToCheckedInstruction)( token.toPublicKey(), tokenAssociated.toPublicKey(), owner.toPublicKey(), @@ -2482,18 +2383,18 @@ var SplToken2; })(SplToken2 || (SplToken2 = {})); // ../suite-spl-token/src/burn.ts -var import_spl_token3 = require("@solana/spl-token"); +var import_spl_token2 = require("@solana/spl-token"); var SplToken3; ((SplToken11) => { SplToken11.burn = (mint, owner, ownerOrMultisig, burnAmount, tokenDecimals, options = {}) => { return Try(() => { - const tokenAccount = (0, import_spl_token3.getAssociatedTokenAddressSync)( + const tokenAccount = (0, import_spl_token2.getAssociatedTokenAddressSync)( mint.toPublicKey(), owner.toPublicKey() ); const payer = options.feePayer ? options.feePayer : ownerOrMultisig[0]; const keypairs = ownerOrMultisig.map((s) => s.toKeypair()); - const inst = (0, import_spl_token3.createBurnCheckedInstruction)( + const inst = (0, import_spl_token2.createBurnCheckedInstruction)( tokenAccount, mint.toPublicKey(), owner.toPublicKey(), @@ -2508,7 +2409,7 @@ var SplToken3; // ../suite-spl-token/src/find.ts var import_mpl_token_metadata3 = require("@metaplex-foundation/mpl-token-metadata"); -var import_spl_token4 = require("@solana/spl-token"); +var import_spl_token3 = require("@solana/spl-token"); var import_cross_fetch = __toESM(require("cross-fetch")); var SplToken4; ((SplToken11) => { @@ -2547,7 +2448,7 @@ var SplToken4; const info = await connection.getParsedTokenAccountsByOwner( owner.toPublicKey(), { - programId: import_spl_token4.TOKEN_PROGRAM_ID + programId: import_spl_token3.TOKEN_PROGRAM_ID } ); const datas = info.value.map(async (d) => { @@ -2558,7 +2459,7 @@ var SplToken4; } return import_mpl_token_metadata3.Metadata.fromAccountAddress( connection, - Account4.Pda.getMetadata(mint) + Account3.Pda.getMetadata(mint) ).then(async (metadata) => { return fetchRetry(metadata.data.uri).then((json) => { return converter(metadata, json, tokenAmount); @@ -2576,7 +2477,7 @@ var SplToken4; const connection = Node.getConnection(); const metadata = await import_mpl_token_metadata3.Metadata.fromAccountAddress( connection, - Account4.Pda.getMetadata(mint) + Account3.Pda.getMetadata(mint) ); debugLog("# findByMint metadata: ", metadata); if (metadata.tokenStandard === 0) { @@ -2593,20 +2494,20 @@ var SplToken4; })(SplToken4 || (SplToken4 = {})); // ../suite-spl-token/src/freeze.ts -var import_spl_token5 = require("@solana/spl-token"); +var import_spl_token4 = require("@solana/spl-token"); var SplToken5; ((SplToken11) => { SplToken11.freeze = (mint, owner, freezeAuthority, options = {}) => { return Try(() => { const payer = options.feePayer ? options.feePayer : freezeAuthority; - const tokenAccount = (0, import_spl_token5.getAssociatedTokenAddressSync)( + const tokenAccount = (0, import_spl_token4.getAssociatedTokenAddressSync)( mint.toPublicKey(), owner.toPublicKey() ); - const inst = (0, import_spl_token5.createFreezeAccountInstruction)( + const inst = (0, import_spl_token4.createFreezeAccountInstruction)( tokenAccount, mint.toPublicKey(), - new Account4.Keypair({ secret: freezeAuthority }).toPublicKey() + new Account3.Keypair({ secret: freezeAuthority }).toPublicKey() ); return new TransactionBuilder6.Common( [inst], @@ -2618,19 +2519,19 @@ var SplToken5; })(SplToken5 || (SplToken5 = {})); // ../suite-spl-token/src/gas-less-transfer.ts -var import_spl_token6 = require("@solana/spl-token"); +var import_spl_token5 = require("@solana/spl-token"); var import_web313 = require("@solana/web3.js"); var SplToken6; ((SplToken11) => { SplToken11.gasLessTransfer = async (mint, owner, dest, amount, mintDecimal, feePayer) => { return Try(async () => { const ownerPublicKey = owner.toKeypair().publicKey; - const sourceToken = await Account4.Associated.makeOrCreateInstruction( + const sourceToken = await Account3.Associated.makeOrCreateInstruction( mint, ownerPublicKey.toString(), feePayer ); - const destToken = await Account4.Associated.makeOrCreateInstruction( + const destToken = await Account3.Associated.makeOrCreateInstruction( mint, dest, feePayer @@ -2642,27 +2543,18 @@ var SplToken6; blockhash: blockhashObj.blockhash, feePayer: feePayer.toPublicKey() }); + inst2 = (0, import_spl_token5.createTransferCheckedInstruction)( + sourceToken.tokenAccount.toPublicKey(), + mint.toPublicKey(), + destToken.tokenAccount.toPublicKey(), + ownerPublicKey, + SplToken.calculateAmount(amount, mintDecimal), + mintDecimal, + [owner.toKeypair()] + ); if (!destToken.inst) { - inst2 = (0, import_spl_token6.createTransferCheckedInstruction)( - sourceToken.tokenAccount.toPublicKey(), - mint.toPublicKey(), - destToken.tokenAccount.toPublicKey(), - ownerPublicKey, - SplToken.calculateAmount(amount, mintDecimal), - mintDecimal, - [owner.toKeypair()] - ); tx.add(inst2); } else { - inst2 = (0, import_spl_token6.createTransferCheckedInstruction)( - sourceToken.tokenAccount.toPublicKey(), - mint.toPublicKey(), - destToken.tokenAccount.toPublicKey(), - ownerPublicKey, - SplToken.calculateAmount(amount, mintDecimal), - mintDecimal, - [owner.toKeypair()] - ); tx.add(destToken.inst).add(inst2); } tx.recentBlockhash = blockhashObj.blockhash; @@ -2678,45 +2570,45 @@ var SplToken6; // ../suite-spl-token/src/mint.ts var import_web314 = require("@solana/web3.js"); -var import_spl_token7 = require("@solana/spl-token"); +var import_spl_token6 = require("@solana/spl-token"); var import_mpl_token_metadata4 = require("@metaplex-foundation/mpl-token-metadata"); var SplToken7; ((SplToken11) => { const DEFAULT_STORAGE_TYPE = "nftStorage"; SplToken11.createFreezeAuthority = (mint2, owner, freezeAuthority) => { - return (0, import_spl_token7.createSetAuthorityInstruction)( + return (0, import_spl_token6.createSetAuthorityInstruction)( mint2, owner, - import_spl_token7.AuthorityType.FreezeAccount, + import_spl_token6.AuthorityType.FreezeAccount, freezeAuthority ); }; SplToken11.createMint = async (mint2, owner, totalAmount, mintDecimal, tokenMetadata, feePayer, isMutable) => { const connection = Node.getConnection(); - const lamports = await (0, import_spl_token7.getMinimumBalanceForRentExemptMint)(connection); - const metadataPda = Account4.Pda.getMetadata(mint2.toString()); - const tokenAssociated = (0, import_spl_token7.getAssociatedTokenAddressSync)(mint2, owner); + const lamports = await (0, import_spl_token6.getMinimumBalanceForRentExemptMint)(connection); + const metadataPda = Account3.Pda.getMetadata(mint2.toString()); + const tokenAssociated = (0, import_spl_token6.getAssociatedTokenAddressSync)(mint2, owner); const instructions = []; instructions.push( import_web314.SystemProgram.createAccount({ fromPubkey: feePayer, newAccountPubkey: mint2, - space: import_spl_token7.MINT_SIZE, + space: import_spl_token6.MINT_SIZE, lamports, - programId: import_spl_token7.TOKEN_PROGRAM_ID + programId: import_spl_token6.TOKEN_PROGRAM_ID }) ); instructions.push( - (0, import_spl_token7.createInitializeMintInstruction)( + (0, import_spl_token6.createInitializeMintInstruction)( mint2, mintDecimal, owner, owner, - import_spl_token7.TOKEN_PROGRAM_ID + import_spl_token6.TOKEN_PROGRAM_ID ) ); instructions.push( - (0, import_spl_token7.createAssociatedTokenAccountInstruction)( + (0, import_spl_token6.createAssociatedTokenAccountInstruction)( feePayer, tokenAssociated, owner, @@ -2724,7 +2616,7 @@ var SplToken7; ) ); instructions.push( - (0, import_spl_token7.createMintToCheckedInstruction)( + (0, import_spl_token6.createMintToCheckedInstruction)( mint2, tokenAssociated, owner, @@ -2803,7 +2695,7 @@ var SplToken7; ); debugLog("# datav2: ", datav2); debugLog("# upload content url: ", uri); - const mint2 = Account4.Keypair.create(); + const mint2 = Account3.Keypair.create(); const insts = await (0, SplToken11.createMint)( mint2.toPublicKey(), ownerPublicKey, @@ -2833,20 +2725,20 @@ var SplToken7; })(SplToken7 || (SplToken7 = {})); // ../suite-spl-token/src/thaw.ts -var import_spl_token8 = require("@solana/spl-token"); +var import_spl_token7 = require("@solana/spl-token"); var SplToken8; ((SplToken11) => { SplToken11.thaw = (mint, owner, freezeAuthority, options = {}) => { const payer = options.feePayer ? options.feePayer : freezeAuthority; return Try(() => { - const tokenAccount = (0, import_spl_token8.getAssociatedTokenAddressSync)( + const tokenAccount = (0, import_spl_token7.getAssociatedTokenAddressSync)( mint.toPublicKey(), owner.toPublicKey() ); - const inst = (0, import_spl_token8.createThawAccountInstruction)( + const inst = (0, import_spl_token7.createThawAccountInstruction)( tokenAccount, mint.toPublicKey(), - new Account4.Keypair({ secret: freezeAuthority }).toPublicKey() + new Account3.Keypair({ secret: freezeAuthority }).toPublicKey() ); return new TransactionBuilder6.Common( [inst], @@ -2858,33 +2750,39 @@ var SplToken8; })(SplToken8 || (SplToken8 = {})); // ../suite-spl-token/src/transfer.ts -var import_spl_token9 = require("@solana/spl-token"); +var import_spl_token8 = require("@solana/spl-token"); var SplToken9; ((SplToken11) => { SplToken11.transfer = async (mint, owner, dest, ownerOrMultisig, amount, mintDecimal, options = {}) => { return Try(async () => { const payer = options.feePayer ? options.feePayer : ownerOrMultisig[0]; + const payerPubkey = new Account3.Keypair({ secret: payer }); const keypairs = ownerOrMultisig.map((s) => s.toKeypair()); - const sourceToken = await Account4.Associated.retryGetOrCreate( + const sourceToken = await Account3.Associated.makeOrCreateInstruction( mint, - owner, - payer + owner.toString(), + payerPubkey.pubkey ); - const destToken = await Account4.Associated.retryGetOrCreate( + const destToken = await Account3.Associated.makeOrCreateInstruction( mint, dest, - payer + payerPubkey.pubkey ); - const inst = (0, import_spl_token9.createTransferCheckedInstruction)( - sourceToken.toPublicKey(), + const inst = (0, import_spl_token8.createTransferCheckedInstruction)( + sourceToken.tokenAccount.toPublicKey(), mint.toPublicKey(), - destToken.toPublicKey(), + destToken.tokenAccount.toPublicKey(), owner.toPublicKey(), SplToken.calculateAmount(amount, mintDecimal), mintDecimal, keypairs ); - return new TransactionBuilder6.Common([inst], keypairs, payer.toKeypair()); + const instructions = destToken.inst ? [destToken.inst, inst] : [inst]; + return new TransactionBuilder6.Common( + instructions, + keypairs, + payer.toKeypair() + ); }); }; })(SplToken9 || (SplToken9 = {})); @@ -2942,20 +2840,20 @@ var RegularNft2; })(RegularNft2 || (RegularNft2 = {})); // ../suite-regular-nft/src/freeze.ts -var import_spl_token10 = require("@solana/spl-token"); +var import_spl_token9 = require("@solana/spl-token"); var import_mpl_token_metadata5 = require("@metaplex-foundation/mpl-token-metadata"); var RegularNft3; ((RegularNft11) => { RegularNft11.freeze = (mint, owner, freezeAuthority, options = {}) => { return Try(() => { const payer = options.feePayer ? options.feePayer : freezeAuthority; - const tokenAccount = (0, import_spl_token10.getAssociatedTokenAddressSync)( + const tokenAccount = (0, import_spl_token9.getAssociatedTokenAddressSync)( mint.toPublicKey(), owner.toPublicKey() ); - const editionAddress = Account4.Pda.getMasterEdition(mint); + const editionAddress = Account3.Pda.getMasterEdition(mint); const inst = (0, import_mpl_token_metadata5.createFreezeDelegatedAccountInstruction)({ - delegate: new Account4.Keypair({ + delegate: new Account3.Keypair({ secret: freezeAuthority }).toPublicKey(), tokenAccount, @@ -2973,22 +2871,22 @@ var RegularNft3; // ../suite-regular-nft/src/mint.ts var import_web315 = require("@solana/web3.js"); -var import_spl_token11 = require("@solana/spl-token"); +var import_spl_token10 = require("@solana/spl-token"); var import_mpl_token_metadata6 = require("@metaplex-foundation/mpl-token-metadata"); var RegularNft4; ((RegularNft11) => { const NFT_AMOUNT = 1; const DEFAULT_STORAGE_TYPE = "nftStorage"; RegularNft11.createVerifyCreator = (mint2, creator) => { - const metadata = Account4.Pda.getMetadata(mint2.toString()); + const metadata = Account3.Pda.getMetadata(mint2.toString()); return (0, import_mpl_token_metadata6.createSignMetadataInstruction)({ metadata, creator }); }; RegularNft11.createDeleagate = (mint2, owner, delegateAuthority) => { - const tokenAccount = (0, import_spl_token11.getAssociatedTokenAddressSync)(mint2, owner); - return (0, import_spl_token11.createApproveInstruction)( + const tokenAccount = (0, import_spl_token10.getAssociatedTokenAddressSync)(mint2, owner); + return (0, import_spl_token10.createApproveInstruction)( tokenAccount, delegateAuthority, owner, @@ -2996,41 +2894,41 @@ var RegularNft4; ); }; RegularNft11.createVerifySizedCollection = (collectionChild, collectionParent, feePayer) => { - const collectionMetadata = Account4.Pda.getMetadata( + const collectionMetadata = Account3.Pda.getMetadata( collectionParent.toString() ); - const collectionMasterEditionAccount = Account4.Pda.getMasterEdition( + const collectionMasterEditionAccount = Account3.Pda.getMasterEdition( collectionParent.toString() ); return (0, import_mpl_token_metadata6.createVerifySizedCollectionItemInstruction)({ collection: collectionMetadata, collectionMasterEditionAccount, collectionMint: collectionParent, - metadata: Account4.Pda.getMetadata(collectionChild.toString()), + metadata: Account3.Pda.getMetadata(collectionChild.toString()), payer: feePayer, collectionAuthority: feePayer }); }; RegularNft11.createMint = async (mint2, owner, nftMetadata, feePayer, isMutable) => { - const ata = (0, import_spl_token11.getAssociatedTokenAddressSync)(mint2, owner); - const tokenMetadataPubkey = Account4.Pda.getMetadata(mint2.toString()); - const masterEditionPubkey = Account4.Pda.getMasterEdition(mint2.toString()); + const ata = (0, import_spl_token10.getAssociatedTokenAddressSync)(mint2, owner); + const tokenMetadataPubkey = Account3.Pda.getMetadata(mint2.toString()); + const masterEditionPubkey = Account3.Pda.getMasterEdition(mint2.toString()); const connection = Node.getConnection(); const instructions = []; instructions.push( import_web315.SystemProgram.createAccount({ fromPubkey: feePayer, newAccountPubkey: mint2, - lamports: await (0, import_spl_token11.getMinimumBalanceForRentExemptMint)(connection), - space: import_spl_token11.MINT_SIZE, - programId: import_spl_token11.TOKEN_PROGRAM_ID + lamports: await (0, import_spl_token10.getMinimumBalanceForRentExemptMint)(connection), + space: import_spl_token10.MINT_SIZE, + programId: import_spl_token10.TOKEN_PROGRAM_ID }) ); - instructions.push((0, import_spl_token11.createInitializeMintInstruction)(mint2, 0, owner, owner)); + instructions.push((0, import_spl_token10.createInitializeMintInstruction)(mint2, 0, owner, owner)); instructions.push( - (0, import_spl_token11.createAssociatedTokenAccountInstruction)(feePayer, ata, owner, mint2) + (0, import_spl_token10.createAssociatedTokenAccountInstruction)(feePayer, ata, owner, mint2) ); - instructions.push((0, import_spl_token11.createMintToCheckedInstruction)(mint2, ata, owner, 1, 0)); + instructions.push((0, import_spl_token10.createMintToCheckedInstruction)(mint2, ata, owner, 1, 0)); instructions.push( (0, import_mpl_token_metadata6.createCreateMetadataAccountV3Instruction)( { @@ -3134,7 +3032,7 @@ var RegularNft4; const isMutable = input.isMutable === void 0 ? true : input.isMutable; debugLog("# input: ", input); debugLog("# datav2: ", datav2); - const mint2 = Account4.Keypair.create(); + const mint2 = Account3.Keypair.create(); const instructions = await (0, RegularNft11.createMint)( mint2.toPublicKey(), ownerPublicKey, @@ -3163,7 +3061,7 @@ var RegularNft4; const keypairs = [owner.toKeypair(), mint2.toKeypair()]; if (input.creators) { input.creators.forEach((creator) => { - if (Account4.Keypair.isSecret(creator.secret)) { + if (Account3.Keypair.isSecret(creator.secret)) { const creatorPubkey = creator.address.toPublicKey(); const inst = (0, RegularNft11.createVerifyCreator)(mint2.toPublicKey(), creatorPubkey); instructions.push(inst); @@ -3237,7 +3135,7 @@ var RegularNft5; debugLog("# input: ", input); debugLog("# sellerFeeBasisPoints: ", sellerFeeBasisPoints); debugLog("# datav2: ", datav2); - const mint = Account4.Keypair.create(); + const mint = Account3.Keypair.create(); const insts = await RegularNft4.createMint( mint.toPublicKey(), ownerPublickey, @@ -3351,8 +3249,8 @@ var RegularNft7; const isMutable = input.isMutable === void 0 ? true : input.isMutable; debugLog("# input: ", input); debugLog("# datav2: ", datav2); - const collectionMint = Account4.Keypair.create(); - const collectionMetadataAccount = Account4.Pda.getMetadata( + const collectionMint = Account3.Keypair.create(); + const collectionMetadataAccount = Account3.Pda.getMetadata( collectionMint.pubkey ); const instructions = await RegularNft4.createMint( @@ -3394,20 +3292,20 @@ var RegularNft7; })(RegularNft7 || (RegularNft7 = {})); // ../suite-regular-nft/src/thaw.ts -var import_spl_token12 = require("@solana/spl-token"); +var import_spl_token11 = require("@solana/spl-token"); var import_mpl_token_metadata8 = require("@metaplex-foundation/mpl-token-metadata"); var RegularNft8; ((RegularNft11) => { RegularNft11.thaw = (mint, owner, freezeAuthority, options = {}) => { return Try(() => { const payer = options.feePayer ? options.feePayer : freezeAuthority; - const tokenAccount = (0, import_spl_token12.getAssociatedTokenAddressSync)( + const tokenAccount = (0, import_spl_token11.getAssociatedTokenAddressSync)( mint.toPublicKey(), owner.toPublicKey() ); - const editionAddress = Account4.Pda.getMasterEdition(mint); + const editionAddress = Account3.Pda.getMasterEdition(mint); const inst = (0, import_mpl_token_metadata8.createThawDelegatedAccountInstruction)({ - delegate: new Account4.Keypair({ + delegate: new Account3.Keypair({ secret: freezeAuthority }).toPublicKey(), tokenAccount, @@ -3482,4 +3380,4 @@ var CompressedNft9 = { 0 && (module.exports = { CompressedNft }); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uLy4uL3N1aXRlLXV0aWxzL3NyYy9jb25zdGFudHMudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvYmF0Y2gudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY29tbW9uLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL21pbnQudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvcGFydGlhbC1zaWduLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2NhbGN1bGF0ZS10eHNpemUudHMiLCAiLi4vLi4vZ2xvYmFsL3NyYy9pbmRleC50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9hc3NvY2lhdGVkLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2tleXBhaXIudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvcGRhLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3N1aXRlLXV0aWxzL3NyYy9zaGFyZWQudHMiLCAiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL3Jlc3VsdC50cyIsICIuLi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G5cbiAgICAgICAgICBpZiAoaW5zdCAmJiB0eXBlb2YgaW5zdCA9PT0gJ3N0cmluZycpIHtcbiAgICAgICAgICAgIGRlYnVnTG9nKCcjIGFzc29jaWF0ZWRUb2tlbkFjY291bnQ6ICcsIGluc3QpO1xuICAgICAgICAgICAgcmV0dXJuIGluc3Q7XG4gICAgICAgICAgfSBlbHNlIGlmIChpbnN0IGluc3RhbmNlb2YgVHJhbnNhY3Rpb25CdWlsZGVyLkNvbW1vbikge1xuICAgICAgICAgICAgKGF3YWl0IGluc3Quc3VibWl0KCkpLm1hcChcbiAgICAgICAgICAgICAgYXN5bmMgKG9rOiBzdHJpbmcpID0+IHtcbiAgICAgICAgICAgICAgICBhd2FpdCBOb2RlLmNvbmZpcm1lZFNpZyhvayk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGluc3QuZGF0YTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgKGVycjogRXJyb3IpID0+IHtcbiAgICAgICAgICAgICAgICBkZWJ1Z0xvZygnIyBFcnJvciBzdWJtaXQgcmV0cnlHZXRPckNyZWF0ZTogJywgZXJyKTtcbiAgICAgICAgICAgICAgICB0aHJvdyBlcnI7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgIGRlYnVnTG9nKGAjIHJldHJ5OiAke2NvdW50ZXJ9IGNyZWF0ZSB0b2tlbiBhY2NvdW50OiBgLCBlKTtcbiAgICAgICAgICBkZWJ1Z0xvZyhgIyBtaW50OiAke21pbnR9LCBvd25lcjogJHtvd25lcn0sIGZlZVBheWVyOiAke2ZlZVBheWVyfWApO1xuICAgICAgICB9XG4gICAgICAgIGF3YWl0IHNsZWVwKFJFVFJZX1NMRUVQX1RJTUUpO1xuICAgICAgICBjb3VudGVyKys7XG4gICAgICB9XG4gICAgICB0aHJvdyBFcnJvcihgcmV0cnkgYWN0aW9uIGlzIG92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zc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSk7XG5cbiAgICAgIHRyeSB7XG4gICAgICAgIC8vIERvbnQgdXNlIFJlc3VsdFxuICAgICAgICBhd2FpdCBnZXRBY2NvdW50KFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCkuY29tbWl0bWVudCxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3Q6IHVuZGVmaW5lZCxcbiAgICAgICAgfTtcbiAgICAgIH0gY2F0Y2ggKGVycm9yOiB1bmtub3duKSB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5BY2NvdW50Tm90Rm91bmRFcnJvcikgJiZcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5JbnZhbGlkQWNjb3VudE93bmVyRXJyb3IpXG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9yKCdVbmV4cGVjdGVkIGVycm9yJyk7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBwYXllciA9ICFmZWVQYXllciA/IG93bmVyIDogZmVlUGF5ZXI7XG5cbiAgICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgICBwYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCks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YSAmJiBtZXRhZGF0YS5yb3lhbHR5KSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzUm95YWx0eShtZXRhZGF0YS5yb3lhbHR5KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlcl9mZWVfYmFzaXNfcG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJGZWVCYXNpc1BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0YWRhdGEubmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzeW1ib2wnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLnN5bWJvbCkge1xuICAgICAgICAgICAgICByZXMgPSBpc1N5bWJvbChtZXRhZGF0YS5zeW1ib2wpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHJlcyAmJiByZXMuaXNFcnIpIHtcbiAgICA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uXG4gICAgY29uc3QgaXRlbXMgPSBhc3NldHMudmFsdWUuaXRlbXM7XG5cbiAgICBjb25zdCBtZXRhZGF0YXMgPSBhd2FpdCBQcm9taXNlLmFsbChcbiAgICAgIGl0ZW1zXG4gICAgICAgIC5maWx0ZXIoKGl0ZW0pID0+IGl0ZW0uY29tcHJlc3Npb24uY29tcHJlc3NlZCA9PT0gaXNDb21wcmVzc2VkKVxuICAgICAgICAubWFwKGFzeW5jIChpdGVtKSA9PiB7XG4gICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgIGNvbnN0IG9mZmNoYWluOiBPZmZjaGFpbiA9IGF3YWl0IGZldGNoT2ZmY2hhaW4oXG4gICAgICAgICAgICAgIGl0ZW0uY29udGVudC5qc29uX3VyaSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgICBjb25zdCBtZXJnZWQgPSB7XG4gICAgICAgICAgICAgIG9uY2hhaW46IGl0ZW0sXG4gICAgICAgICAgICAgIG9mZmNoYWluOiBvZmZjaGFpbixcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICByZXR1cm4gQ29udmVydGVyLk5mdC5pbnRvVXNlcihtZXJnZWQpO1xuICAgICAgICAgIH0gY2F0Y2ggKGVycikge1xuICAgICAgICAgICAgZGVidWdMb2coJyMgRmFpbGVkIGZldGNoIG9mZmNoYWluIHVybDogJywgaXRlbS5jb250ZW50Lmpzb25fdXJpKTtcbiAgICAgICAgICAgIHJldHVybiBDb252ZXJ0ZXIuTmZ0LmludG9Vc2VyKHtcbiAgICAgICAgICAgICAgb25jaGFpbjogaXRlbSxcbiAgICAgICAgICAgICAgb2ZmY2hhaW46IHt9LFxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfVxuICAgICAgICB9KSxcbiAgICApO1xuICAgIHJldHVybiB7XG4gICAgICBwYWdlOiBhc3NldHMudmFsdWUucGFnZSxcbiAgICAgIHRvdGFsOiBhc3NldHMudmFsdWUudG90YWwsXG4gICAgICBsaW1pdDogYXNzZXRzL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GxhbXBvcnRzOlxuICAgICAgICAgICAgYXdhaXQgTm9kZS5nZXRDb25uZWN0aW9uKCkuZ2V0TWluaW11bUJhbGFuY2VGb3JSZW50RXhlbXB0aW9uKHNwYWNlKSxcbiAgICAgICAgICBzcGFjZTogc3BhY2UsXG4gICAgICAgICAgcHJvZ3JhbUlkOiBTUExfQUNDT1VOVF9DT01QUkVTU0lPTl9QUk9HUkFNX0lELFxuICAgICAgICB9KSxcbiAgICAgICk7XG5cbiAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICBjcmVhdGVDcmVhdGVUcmVlSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAge1xuICAgICAgICAgICAgbWVya2xlVHJlZTogdHJlZU93bmVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgICAgIHRyZWVBdXRob3JpdHksXG4gICAgICAgICAgICB0cmVlQ3JlYXRvcjogb3duZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICAgICAgcGF5ZXI6IHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgICAgIGxvZ1dyYXBwZXI6IFNQTF9OT09QX1BST0dSQU1fSUQsXG4gICAgICAgICAgICBjb21wcmVzc2lvblByb2dyYW06IFNQTF9BQ0NPVU5UX0NPTVBSRVNTSU9OX1BST0dSQU1fSUQsXG4gICAgICAgICAgfSxcbiAgICAgICAgICB7XG4gICAgICAgICAgICBtYXhCdWZmZXJTaXplLFxuICAgICAgICAgICAgbWF4RGVwdGgsXG4gICAgICAgICAgICBwdWJsaWM6IGZhbHNlLFxuICAgICAgICAgIH0sXG4gICAgICAgICAgTVBMX0JVQkJMRUdVTV9QUk9HUkFNX0lELnRvUHVibGljS2V5KCksXG4gICAgICAgICksXG4gICAgICApO1xuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5NaW50KFxuICAgICAgICBpbnN0cnVjdGlvbnMsXG4gICAgICAgIFt0c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JpdHlSZWNvcmRQZGE6IEJVQkJMRUdVTV9QUk9HUkFNX0lELFxuICAgICAgICAgICAgY29tcHJlc3Npb25Qcm9ncmFtOiBTUExfQUNDT1VOVF9DT01QUkVTU0lPTl9QUk9HUkFNX0lELFxuICAgICAgICAgICAgdG9rZW5NZXRhZGF0YVByb2dyYW06IFRPS0VOX01FVEFEQVRBX1BST0dSQU1fSUQsXG4gICAgICAgICAgfSxcbiAgICAgICAgICB7XG4gICAgICAgICAgICBtZXRhZGF0YUFyZ3MsXG4gICAgICAgICAgfSxcbiAgICAgICAgKSxcbiAgICAgICk7XG5cbiAgICAgIGlmIChpbnB1dC5jcmVhdG9ycykge1xuICAgICAgICBjb25zdCBhc3NldElkID0gYXdhaXQgbmV3IFNwYWNlLlNwYWNlKHRyZWVPd25lcikuZ2V0QXNzZXRJZCgpO1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgICBhd2FpdCBjcmVhdGVWZXJpZnlDcmVhdG9yKFxuICAgICAgICAgICAgbWV0YWRhdGFBcmdzLmNyZWF0b3JzLFxuICAgICAgICAgICAgYXNzZXRJZC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgdHJlZU93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBtZXRhZGF0YUFyZ3MsXG4gICAgICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuTWludChcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLFxuICAgICAgICBbb3duZXIudG9LZXlwYWlyKCldLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgbmV3IFNwYWNlLlNwYWNlKHRyZWVPd25lciksXG4gICAgICApO1xuICAgIH0pO1xuICB9O1xufVxuIiwgImltcG9ydCB7IGNyZWF0ZU1pbnRUb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RhcyA9IGluZm8udmFsdWUubWFwKGFzeW5jIChkKSA9PiB7XG4gICAgICAgIGNvbnN0IG1pbnQgPSBkLmFjY291bnQuZGF0YS5wYXJzZWQuaW5mby5taW50IGFzIFB1YmtleTtcbiAgICAgICAgY29uc3QgdG9rZW5BbW91bnQgPSBkLmFjY291bnQuZGF0YS5wYXJzZWQuaW5mby50b2tlbkFtb3VudFxuICAgICAgICAgIC5hbW91bnQgYXMgc3RyaW5nO1xuICAgICAgICBpZiAodG9rZW5BbW91bnQgPT09ICcxJykge1xuICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gTWV0YWRhdGEuZnJvbUFjY291bnRBZGRyZXNzKFxuICAgICAgICAgIGNvbm5lY3Rpb24sXG4gICAgICAgICAgQWNjb3VudC5QZGEuZ2V0TWV0YWRhdGEobWludCksXG4gICAgICAgIClcbiAgICAgICAgICAudGhlbihhc3luYyAobWV0YWRhdGEpID0+IHtcbiAgICAgICAgICAgIC8qIGVzbGludC1kaXNhYmxlIEB0eXBlc2NyaXB0LWVzbGludC9uby1leHBsaWNpdC1hbnkgKi9cbiAgICAgICAgICAgIHJldHVybiBmZXRjaFJldHJ5KG1ldGFkYXRhLmRhdGEudXJpKS50aGVuKChqc29uOiBhbnkpID0+IHtcbiAgICAgICAgICAgICAgcmV0dXJuIGNvbnZlcnRlcihtZXRhZGF0YSwganNvbiwgdG9rZW5BbW91bnQpO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfSlcbiAgICAgICAgICAuY2F0Y2goKGVycikgPT4gZGVidWdMb2coJyMgW0ZldGNoIGVycm9yXScsIGVycikpO1xuICAgICAgfSk7XG5cbiAgICAgIGNvbnN0IGZpbHRlcnMgPSAoYXdhaXQgUHJvbWlzZS5hbGwoZGF0YXMpKS5maWx0ZXIoXG4gICAgICAgIChkYXRhKSA9PiBkYXRhICE9PSB1bmRlZmluZWQsXG4gICAgICApO1xuICAgICAgcmV0dXJuIGZpbHRlcnM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gICAgICBmZWVQYXllcixcbiAgICAgICAgdG9rZW5Bc3NvY2lhdGVkLFxuICAgICAgICBvd25lcixcbiAgICAgICAgbWludCxcbiAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlTWludFRvQ2hlY2tlZEluc3RydWN0aW9uKFxuICAgICAgICBtaW50LFxuICAgICAgICB0b2tlbkFzc29jaWF0ZWQsXG4gICAgICAgIG93bmVyLFxuICAgICAgICBDYWxjdWxhdGUuY2FsY3VsYXRlQW1vdW50KHRvdGFsQW1vdW50LCBtaW50RGVjaW1hbCksXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgKSxcbiAgICApO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVDcmVhdGVNZXRhZGF0YUFjY291bnRWM0luc3RydWN0aW9uKFxuICAgICAgICB7XG4gICAgICAgICAgbWV0YWRhdGE6IG1ldGFkYXRhUGRhLFxuICAgICAgICAgIG1pbnQsXG4gICAgICAgICAgbWludEF1dGhvcml0eTogb3duZXIsXG4gICAgICAgICAgcGF5ZXI6IGZlZVBheWVyLFxuICAgICAgICAgIHVwZGF0ZUF1dGhvcml0eTogb3duZXIsXG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICBjcmVhdGVNZXRhZGF0YUFjY291bnRBcmdzVjM6IHtcbiAgICAgICAgICAgIGRhdGE6IHRva2VuTWV0YWRhdGEsXG4gICAgICAgICAgICBpc011dGFibGUsXG4gICAgICAgICAgICBjb2xsZWN0aW9uRGV0YWlsczogbnVsbCxcbiAgICAgICAgICB9LFxuICAgICAgICB9LFxuICAgICAgKSxcbiAgICApO1xuICAgIHJldHVybiBpbnN0cnVjdGlvbnM7XG4gIH07XG5cbiAgLyoqXG4gICAqIFNQTC1UT0tFTiBtaW50XG4gICAqXG4gICAqIEBwYXJhbSB7U2VjcmV0fSBvd25lciAgICAgIC8vIHRva2VuIG93bm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nZS51cGxvYWREYXRhKFxuICAgICAgICAgIHsgLi4uc3RvcmFnZU1ldGFkYXRhLCAuLi5pbWFnZSB9LFxuICAgICAgICAgIHN0b3JhZ2VUeXBlLFxuICAgICAgICAgIHBheWVyLFxuICAgICAgICApO1xuICAgICAgICBpZiAodXBsb2FkZWQuaXNFcnIpIHtcbiAgICAgICAgICB0aHJvdyB1cGxvYWRlZDtcbiAgICAgICAgfVxuICAgICAgICB1cmkgPSB1cGxvYWRlZC52YWx1ZTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHRocm93IEVycm9yKGBNdXN0IHNldCBmaWxlUGF0aCcgb3IgJ3VyaSdgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgaXNNdXRhYmxlID0gdHJ1ZTtcblxuICAgICAgY29uc3QgZGF0YXYyID0gQ29udmVydGVyLlRva2VuTWV0YWRhdGEuaW50b0luZnJhKFxuICAgICAgICBpbnB1dCxcbiAgICAgICAgdXJpLFxuICAgICAgICBzZWxsZXJGZWVCYXNpc1BvaW50cyxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGRhdGF2MjogJywgZGF0YXYyKTtcbiAgICAgIGRlYnVnTG9nKCcjIHVwbG9hZCBjb250ZW50IHVybDogJywgdXJpKTtcblxuICAgICAgY29uc3QgbWludCA9IEFjY291bnQuS2V5cGFpci5jcmVhdGUoKTtcbiAgICAgIGNvbnN0IGluc3RzID0gYXdhaXQgY3JlYXRlTWludChcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgdG90YWxBbW91bnQsXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICBkYXRhdjIsXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgKTtcblxuICAgICAgLy8gZnJlZXplQXV0aG9yaXR5XG4gICAgICBpZiAoZnJlZX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9PiB7XG4gICAgICBjb25zdCBwYXllciA9IG9wdGlvbnMuZmVlUGF5ZXIgPyBvcHRpb25zLmZlZVBheWVyIDogb3duZXJPck11bHRpc2lnWzBdO1xuICAgICAgY29uc3Qga2V5cGFpcnMgPSBvd25lck9yTXVsdGlzaWcubWFwKChzKSA9PiBzLnRvS2V5cGFpcigpKTtcblxuICAgICAgY29uc3Qgc291cmNlVG9rZW4gPSBhd2FpdCBBY2NvdW50LkFzc29jaWF0ZWQucmV0cnlHZXRPckNyZWF0ZShcbiAgICAgICAgbWludCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIHBheWVyLFxuICAgICAgKTtcblxuICAgICAgY29uc3QgZGVzdFRva2VuID0gYXdhaXQgQWNjb3VudC5Bc3NvY2lhdGVkLnJldHJ5R2V0T3JDcmVhdGUoXG4gICAgICAgIG1pbnQsXG4gICAgICAgIGRlc3QsXG4gICAgICAgIHBheWVyLFxuICAgICAgKTtcblxuICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZVRyYW5zZmVyQ2hlY2tlZEluc3RydWN0aW9uKFxuICAgICAgICBzb3VyY2VUb2tlbi50b1B1YmxpY0tleSgpLFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIGRlc3RUb2tlbi50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICBDYWxjdWxhdG9yLmNhbGN1bGF0ZUFtb3VudChhbW91bnQsIG1pbnREZWNpbWFsKSxcbiAgICAgICAgbWludERlY2ltYWwsXG4gICAgICAgIGtleXBhaXJzLFxuICAgICAgKTtcblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uKFtpbnN0XSwga2V5cGFpcnMsIHBheWVyLnRvS2V5cGFpcigpKTtcbiAgICB9KTtcbiAgfTtcbn1cbiIsICJpbXBvcnQgeyBTcGxUb2tlbiBhcyBBZGQgfSBmcm9tICcuL2FkZCc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FxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChjcmVhdGVJbml0aWFsaXplTWludEluc3RydWN0aW9uKG1pbnQsIDAsIG93bmVyLCBvd25lcikpO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVBc3NvY2lhdGVkVG9rZW5BY2NvdW50SW5zdHJ1Y3Rpb24oZmVlUGF5ZXIsIGF0YSwgb3duZXIsIG1pbnQpLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChjcmVhdGVNaW50VG9DaGVja2VkSW5zdHJ1Y3Rpb24obWludCwgYXRhLCBvd25lciwgMSwgMCkpO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVDcmVhdGVNZXRhZGF0YUFjY291bnRWM0luc3RydWN0aW9uKFxuICAgICAgICB7XG4gICAgICAgICAgbWV0YWRhdGE6IHRva2VuTWV0YWRhdGFQdWJrZXksXG4gICAgICAgICAgbWludCxcbiAgICAgICAgICBtaW50QXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBwYXllcjogZmVlUGF5ZXIsXG4gICAgICAgICAgdXBkYXRlQXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgIGNyZWF0ZU1ldGFkYXRhQWNjb3VudEFyZ3NWMzoge1xuICAgICAgICAgICAgZGF0YTogbmZ0TWV0YWRhdGEsXG4gICAgICAgICAgICBpc011dGFibGUsXG4gICAgICAgICAgICBjb2xsZWN0aW9uRGV0YWlsczogbnVsbCxcbiAgICAgICAgICB9LFxuICAgICAgICB9LFxuICAgICAgKSxcbiAgICApO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVDcmVhdGVNYXN0ZXJFZGl0aW9uVjNJbnN0cnVjdGlvbihcbiAgICAgICAge1xuICAgICAgICAgIGVkaXRpb246IG1hc3RlckVkaXRpb25QdWJrZXksXG4gICAgICAgICAgbWludCxcbiAgICAgICAgICB1cGRhdGVBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICAgIG1pbnRBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICAgIHBheWVyOiBmZWVQYXllcixcbiAgICAgICAgICBtZXRhZGF0YTogdG9rZW5NZXRhZGF0YVB1YmtleSxcbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgIGNyZWF0ZU1hc3RlckVkaXRpb25BcmdzOiB7XG4gICAgICAgICAgICBtYXhTdXBwbHk6IDAsXG4gICAgICAgICAgfSxcbiAgICAgICAgfSxcbiAgICAgICksXG4gICAgKTtcbiAgICByZXR1cm4gaW5zdHJ1Y3Rpb25zO1xuICB9O1xuXG4gIC8qKlxuICAgKiBVcGxvYWQgY29udGVudCBhbmQgTkZUIG1pbnRcbiAgICpcbiAgICogQHBhcmFtIHtTZWNyZXR9IG93bmVyICAgICAgICAgLy8gb3duZXIncyBTZWNyZXRcbiAgICogQHBhcmFtIHtJbnB1dE5mdE1ldGFkYXRhfSBpbnB1dFxuICAgKiB7XG4gICAqICAgbmFtZTogc3RyaW5nICAgICAgICAgICAgICAgLy8gbmZ0IGNvbnRlbnQgbmFtZVxuICAgKiAgIHN5bWJvbDogc3RyaW5nICAgICAgICAgICAgIC8vIG5mdCB0aWNrZXIgc3ltYm9sXG4gICAqICAgZmlsZVBhdGg6IHN0cmluZyB8IEZpbGUgICAgLy8gbmZ0IHRpY2tlciBzeW1ib2xcbiAgICogICByb3lhbHR5OiBudW1iZXIgICAgICAgICAgICAvLyByb3lhbHR5IHBlcmNlbnRhZ2VcbiAgICogICBzdG9yYWdlVHlwZTogJ2Fyd2VhdmUnfCduZnRTdG9yYWdlJyAvLyBEZWNlbnRyYWxpemVkIHN0b3JhZ2VcbiAgICogICBkZXNjcmlwdGlvbj86IHN0cmluZyAgICAgICAvLyBuZnQgY29udGVudCBkZXNjcmlwdGlvblxuICAgKiAgIGV4dGVybmFsX3VybD86I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XBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICk7XG5cbiAgICAgIC8vIGZyZWV6ZUF1dGhvcml0eVxuICAgICAgaWYgKGZyZWV6ZUF1dGhvcml0eSkge1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgICBjcmVhdGVEZWxlYWdhdGUoXG4gICAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgICAgIGZyZWV6ZUF1dGhvcml0eS50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIC8vIGNvbGxlY3Rpb24gLS0tXG4gICAgICBpZiAoaW5wdXQuY29sbGVjdGlvbikge1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgICBjcmVhdGVWZXJpZnlTaXplZENvbGxlY3Rpb24oXG4gICAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBpbnB1dC5jb2xsZWN0aW9uLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3Qga2V5cGFpcnMgPSBbb3duZXIudG9LZXlwYWlyKCksIG1pbnQudG9LZXlwYWlyKCldO1xuXG4gICAgICAvLyBjcmVhdG9yIC0tLVxuICAgICAgaWYgKGlucHV0LmNyZWF0b3JzKSB7XG4gICAgICAgIGlucHV0LmNyZWF0b3JzLmZvckVhY2goKGNyZWF0b3IpID0+IHtcbiAgICAgICAgICBpZiAoQWNjb3VudC5LZXlwYWlyLmlzU2VjcmV0KGNyZWF0b3Iuc2VjcmV0KSkge1xuICAgICAgICAgICAgY29uc3QgY3JlYXRvclB1YmtleSA9IGNyZWF0b3IuYWRkcmVzcy50b1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gICAgIHNlbGxlckZlZUJhc2lzUG9pbnRzLFxuICAgICAgKTtcblxuICAgICAgLy8tLS0gY29sbGVjdGlvbiAtLS1cbiAgICAgIGxldCBjb2xsZWN0aW9uO1xuICAgICAgaWYgKGlucHV0LmNvbGxlY3Rpb24gJiYgaW5wdXQuY29sbGVjdGlvbikge1xuICAgICAgICBjb2xsZWN0aW9uID0gQ29udmVydGVyLkNvbGxlY3Rpb24uaW50b0luZnJhKGlucHV0LmNvbGxlY3Rpb24pO1xuICAgICAgICBkYXRhdjIgPSB7IC4uLmRhdGF2MiwgY29sbGVjdGlvbiB9O1xuICAgICAgfVxuICAgICAgLy8tLS0gY29sbGVjdGlvbiAtLS1cblxuICAgICAgY29uc3QgaXNNdXRhYmxlID0gaW5wdXQuaXNNdXRhYmxlID09PSB1bmRlZmluZWQgPyB0cnVlIDogaW5wdXQuaXNNdXRhYmxlO1xuXG4gICAgICBkZWJ1Z0xvZygnIyBpbnB1dDogJywgaW5wdXQpO1xuICAgICAgZGVidWdMb2coJyMgc2VsbGVyRmVlQmFzaXNQb2ludHM6ICcsIHNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgIGRlYnVnTG9nKCcjIGRhdGF2MjogJywgZGF0YXYyKTtcblxuICAgICAgY29uc3QgbWludCA9IEFjY291bnQuS2V5cGFpci5jcmVhdGUoKTtcbiAgICAgIGNvbnN0IGluc3RzID0gYXdhaXQgTWludC5jcmVhdGVNaW50KFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyUHVibGlja2V5LFxuICAgICAgICBkYXRhdjIsXG4gICAgICAgIGZlZVBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICk7XG5cbiAgICAgIC8vIGZyZWV6ZUF1dGhvcml0eVxuICAgICAgaWYgKG9wdGlvbnMuZnJlZXplQXV0aG9yaXR5KSB7XG4gICAgICAgIGluc3RzLnB1c2goXG4gICAgICAgICAgT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9nKCcjIGRhdGF2MjogJywgZGF0YXYyKTtcblxuICAgICAgY29uc3QgY29sbGVjdGlvbk1pbnQgPSBBY2NvdW50LktleXBhaXIuY3JlYXRlKCk7XG4gICAgICBjb25zdCBjb2xsZWN0aW9uTWV0YWRhdGFBY2NvdW50ID0gQWNjb3VudC5QZGEuZ2V0TWV0YWRhdGEoXG4gICAgICAgIGNvbGxlY3Rpb25NaW50LnB1YmtleSxcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IGluc3RydWN0aW9ucyA9IGF3YWl0IE1pbnQuY3JlYXRlTWludChcbiAgICAgICAgY29sbGVjdGlvbk1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgIGRhdGF2MixcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICBpc011dGFibGUsXG4gICAgICApO1xuXG4gICAgICAvLyBmcmVlemVBdXRob3JpdHlcbiAgICAgIGlmIChmcmVlemVBdXRob3JpdHkpIHtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgICAgTWludC5jcmVhdGVEZWxlYWdhdGUoXG4gICAgICAgICAgICBjb2xsZWN0aW9uTWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgICAgICBmcmVlemVBdXRob3JpdHkudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBjb2xsZWN0aW9ucyA9IHtcbiAgICAgICAgY29sbGVjdGlvbk1ldGFkYXRhOiBjb2xsZWN0aW9uTWV0YWRhdGFBY2NvdW50LFxuICAgICAgICBjb2xsZWN0aW9uQXV0aG9yaXR5OiBvd25lci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgIGNvbGxlY3Rpb25NaW50OiBjb2xsZWN0aW9uTWludC50b0tleXBh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TmZ0IiwgIkNvbXByZXNzZWROZnQiXQp9Cg== \ No newline at end of file +//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uLy4uL3N1aXRlLXV0aWxzL3NyYy9jb25zdGFudHMudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvYmF0Y2gudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY29tbW9uLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL21pbnQudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvcGFydGlhbC1zaWduLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2NhbGN1bGF0ZS10eHNpemUudHMiLCAiLi4vLi4vZ2xvYmFsL3NyYy9pbmRleC50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9rZXlwYWlyLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL3BkYS50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9pbmRleC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9pbmRleC50cyIsICIuLi8uLi9zdWl0ZS11dGlscy9zcmMvc2hhcmVkLnRzIiwgIi4uLy4uL3N1aXRlLXV0aWxzL3NyYy9yZXN1bHQudHMiLCAiLi4vLi4vY29udmVydGVyL3NyYy9jb2xsZWN0aW9uLnRzIiwgIi4uLy4uL2NvbnZlcnRlci9zcmMvY3JlYXRvcnMudHMiLCAiLi4vLi4vY29udmVydGVyL3NyYy9jb21wcmVzc2VkLW5mdC1tZXRhZGF0YS50cyIsICIuLi8uLi9jb252ZXJ0ZXIvc3JjL3JveWFsdHkudHMiLCAiLi4vLi4vY29udmVydGVyL3NyYy9uZnQudHMiLCAiLi4vLi4vY29udmVydGVyL3NyYy9tZW1vLn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9PiB7XG4gICAgICAgIGxldCBpID0gMDtcbiAgICAgICAgZm9yIChjb25zdCBhIG9mIGFycikge1xuICAgICAgICAgIGlmICghYS5pbnN0cnVjdGlvbnMgJiYgIWEuc2lnbmVycykge1xuICAgICAgICAgICAgdGhyb3cgRXJyb3IoXG4gICAgICAgICAgICAgIGBvbmx5IEluc3RydWN0aW9uIG9iamVjdCB0aGF0IGNhbiB1c2UgYmF0Y2hTdWJtaXQoKS5cbiAgICAgICAgICAgIEluZGV4OiAke2l9LCBTZXQgdmFsdWU6ICR7SlNPTi5zdHJpbmdpZnkoYSl9YCxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIGkrKztcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IGluc3RydWN0aW9ucyA9IGFyci5mbGF0TWFwKChhKSA9PiBhLmluc3RydWN0aW9ucyk7XG4gICAgICAgIGNvbnN0IHNpZ25lcnMgPSBhcnIuZmxhdE1hcCgoYSkgPT4gYS5zaWduZXJzKTtcbiAgICAgICAgY29uc3QgZmVlUGF5ZXJzID0gYXJyLmZpbHRlcigoYSkgPT4gYS5mZWVQYXllciAhPT0gdW5kZWZpbmVkKTtcbiAgICAgICAgbGV0IGZlZVBheWVyID0gc2lnbmVyc1swXTtcbiAgICAgICAgaWYgKGZlZVBheWVycy5sZW5ndGggPiAwICYmIGZlZVBheWVyc1swXS5mZWVQYXllcikge1xuICAgICAgICAgIGZlZVBheWVyID0gZmVlUGF5ZXJzWzBdLmZlZVBheWVyO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgdHJhbnNhY3Rpb24gPSBuZXcgVHJhbnNhY3Rpb24oKTtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHNpZ25lcnM7XG4gICAgICAgIGlmIChmZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gZmVlUGF5ZXIucHVibGljS2V5O1xuICAgICAgICAgIGZpbmFsU2lnb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xsZWN0aW9uPiA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBudWxsO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4ge1xuICAgICAgICBrZXk6IGlucHV0LnRvUHVibGljS2V5KCksXG4gICAgICAgIHZlcmlmaWVkOiBmYWxzZSxcbiAgICAgIH07XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlciA9IChcbiAgICAgIG91dHB1dDogT3B0aW9uPEludGVybmFsQ29sbGVjdGlvbj4sXG4gICAgKTogQ29sbGVjdGlvblR5cGUgfCB1bmRlZmluZWQgPT4ge1xuICAgICAgaWYgKCFvdXRwdXQpIHtcbiAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIHtcbiAgICAgICAgYWRkcmVzczogb3V0cHV0LmtleS50b1N0cmluZygpLFxuICAgICAgICB2ZXJpZmllZDogb3V0cHV0LnZlcmlmaWVkLFxuICAgICAgfTtcbiAgICB9O1xuICB9XG5cbiAgZXhwb3J0IG5hbWVzcGFjZSBDb2xsZWN0aW9uTWludCB7XG4gICAgZXhwb3J0IGNvbnN0IGludG9Vc2VyID0gKG91dHB1dDogR3JvdXBpbmdbXSk6IFB1YmtleSA9PiB7XG4gICAgICBjb25zdCByZXMgPSBvdXRwdXQuZmluZCgodmFsdWUpID0+IHtcbiAgICAgICAgaWYgKHZhbHVlLmdyb3VwX2tleSA9PT0gJ2NvbGxlY3Rpb24nKSB7XG4gICAgICAgICAgcmV0dXJuIHZhbHVlLmdyb3VwX3ZhbHVlO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIHJldHVybiByZXMgPyByZXMuZ3JvdXBfdmFsdWUgOiAnJztcbiAgICB9O1xuICB9XG59XG4iLCAiLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLXVudXNlZC12YXJzICovXG5pbXBvcnQgeyBDcmVhdG9ycywg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ICAgLm1hcChhc3luYyAoaXRlbSkgPT4ge1xuICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICBjb25zdCBvZmZjaGFpbjogT2ZmY2hhaW4gPSBhd2FpdCBmZXRjaE9mZmNoYWluKFxuICAgICAgICAgICAgICBpdGVtLmNvbnRlbnQuanNvbl91cmksXG4gICAgICAgICAgICApO1xuICAgICAgICAgICAgY29uc3QgbWVyZ2VkID0ge1xuICAgICAgICAgICAgICBvbmNoYWluOiBpdGVtLFxuICAgICAgICAgICAgICBvZmZjaGFpbjogb2ZmY2hhaW4sXG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgcmV0dXJuIENvbnZlcnRlci5OZnQuaW50b1VzZXIobWVyZ2VkKTtcbiAgICAgICAgICB9IGNhdGNoIChlcnIpIHtcbiAgICAgICAgICAgIGRlYnVnTG9nKCcjIEZhaWxlZCBmZXRjaCBvZmZjaGFpbiB1cmw6ICcsIGl0ZW0uY29udGVudC5qc29uX3VyaSk7XG4gICAgICAgICAgICByZXR1cm4gQ29udmVydGVyLk5mdC5pbnRvVXNlcih7XG4gICAgICAgICAgICAgIG9uY2hhaW46IGl0ZW0sXG4gICAgICAgICAgICAgIG9mZmNoYWluOiB7fSxcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgIH1cbiAgICAgICAgfSksXG4gICAgKTtcbiAgICByZXR1cm4ge1xuICAgICAgcGFnZTogYXNzZXRzLnZhbHVlLnBhZ2UsXG4gICAgICB0b3RhbDogYXNzZXRzLnZhbHVlLnRvdGFsLFxuICAgICAgbGltaXQ6IGFzc2V0cy52YWx1ZS5saW1pdCxcbiAgICAgIG1ldGFkYXRhcyxcbiAgICB9O1xuICB9O1xuXG4gIC8qKlxuICAgKiBGaW5kIG5mdCBieSBjb2xsZWN0aW9uIG1pbnRcbiAgICpcbiAgICogQHBhcmFtIHtQdWJrZXl9IGNvbGxlY3Rpb25NaW50XG4gICAqIEBwYXJhbSB7Ym9vbGVhbn0gaXNDb21wcmVzc2VkL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xuICAgICAgICAgIHByb2dyYW1JZDogU1BMX0FDQ09VTlRfQ09NUFJFU1NJT05fUFJPR1JBTV9JRCxcbiAgICAgICAgfSksXG4gICAgICApO1xuXG4gICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgY3JlYXRlQ3JlYXRlVHJlZUluc3RydWN0aW9uKFxuICAgICAgICAgIHtcbiAgICAgICAgICAgIG1lcmtsZVRyZWU6IHRyZWVPd25lci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgICAgICB0cmVlQXV0aG9yaXR5LFxuICAgICAgICAgICAgdHJlZUNyZWF0b3I6IG93bmVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgICAgIHBheWVyOiBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgICAgICBsb2dXcmFwcGVyOiBTUExfTk9PUF9QUk9HUkFNX0lELFxuICAgICAgICAgICAgY29tcHJlc3Npb25Qcm9ncmFtOiBTUExfQUNDT1VOVF9DT01QUkVTU0lPTl9QUk9HUkFNX0lELFxuICAgICAgICAgIH0sXG4gICAgICAgICAge1xuICAgICAgICAgICAgbWF4QnVmZmVyU2l6ZSxcbiAgICAgICAgICAgIG1heERlcHRoLFxuICAgICAgICAgICAgcHVibGljOiBmYWxzZSxcbiAgICAgICAgICB9LFxuICAgICAgICAgIE1QTF9CVUJCTEVHVU1fUFJPR1JBTV9JRC50b1B1YmxpY0tleSgpLFxuICAgICAgICApLFxuICAgICAgKTtcblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuTWludChcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLFxuICAgICAgICBbdHJlZU93bmVyLnRvS2V5cGFpcigpLCBvd25lci50b0tleXBhaXIoKV0sXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICB0cmVlT3duZXIucHVia2V5LFxuICAgICAgKTtcbiAgICB9KTtcbiAgfTtcblxuIC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mFsdWUuY29tcHJlc3Npb247XG4gICAgY29uc3Qgb3duZXJzaGlwID0gcnBjQXNzZXQudmFsdWUub3duZXJzaGlwO1xuICAgIGNvbnN0IGFzc2V0UHJvb2YgPSBycGNBc3NldFByb29mLnZhbHVlO1xuXG4gICAgY29uc3QgdHJlZUFjY291bnQgPSBhd2FpdCBDb25jdXJyZW50TWVya2xlVHJlZUFjY291bnQuZnJvbUFjY291bnRBZGRyZXNzKFxuICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICB0cmVlT3duZXIsXG4gICAgKTtcbiAgICBjb25zdCBjYW5vcHlEZXB0aCA9IHRyZWVBY2NvdW50LmdldENhbm9weURlcHRoKCk7XG4gICAgY29uc3Qgc2xpY2VkUHJvb2Y6IEFjY291bnRNZXRhW10gPSBhc3NldFByb29mLnByb29mXG4gICAgICAubWFwKChub2RlOiBzdHJpbmcpID0+ICh7XG4gICAgICAgIHB1YmtleTogbm9kZS50b1B1YmxpY0tleSgpLFxuICAgICAgICBpc1NpZ25lcjogZmFsc2UsXG4gICAgICAgIGlzV3JpdGFibGU6IGZhbHNlLFxuICAgICAgfSkpXG4gICAgICAuc2xpY2UoMCwgYXNzZXRQcm9vZi5wcm9vZi5sZW5ndGggLSAoY2Fub3B5RGVwdGggPyBjYW5vcHlEZXB0aCA6IDApKTtcblxuICAgIHJldHVybiBjcmVhdGVWZXJpZnlDcmVhdG9ySW5zdHJ1Y3Rpb24oXG4gICAgICB7XG4gICAgICAgIHRyZWVBdXRob3JpdHk6IHRyZWVPd25lcixcbiAgICAgICAgbGVhZk93bmVyOiBvd25lcnNoaXAub3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgbGVhZkRlbGVnYXRlOiAob3duZXJzaGlwLmRlbGVnYXRlIHx8IG93bmVyc2hpcC5vd25lcikudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgbWVya2xlVHJlZTogYXNzZXRQcm9vZi50cmVlX2lkLnRvUHVibGljS2V5KCksXG4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kLmluZm8udG9rZW5BbW91bnRcbiAgICAgICAgICAuYW1vdW50IGFzIHN0cmluZztcbiAgICAgICAgaWYgKHRva2VuQW1vdW50ID09PSAnMScpIHtcbiAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIE1ldGFkYXRhLmZyb21BY2NvdW50QWRkcmVzcyhcbiAgICAgICAgICBjb25uZWN0aW9uLFxuICAgICAgICAgIEFjY291bnQuUGRhLmdldE1ldGFkYXRhKG1pbnQpLFxuICAgICAgICApXG4gICAgICAgICAgLnRoZW4oYXN5bmMgKG1ldGFkYXRhKSA9PiB7XG4gICAgICAgICAgICAvKiBlc2xpbnQtZGlzYWJsZSBAdHlwZXNjcmlwdC1lc2xpbnQvbm8tZXhwbGljaXQtYW55ICovXG4gICAgICAgICAgICByZXR1cm4gZmV0Y2hSZXRyeShtZXRhZGF0YS5kYXRhLnVyaSkudGhlbigoanNvbjogYW55KSA9PiB7XG4gICAgICAgICAgICAgIHJldHVybiBjb252ZXJ0ZXIobWV0YWRhdGEsIGpzb24sIHRva2VuQW1vdW50KTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgIH0pXG4gICAgICAgICAgLmNhdGNoKChlcnIpID0+IGRlYnVnTG9nKCcjIFtGZXRjaCBlcnJvcl0nLCBlcnIpKTtcbiAgICAgIH0pO1xuXG4gICAgICBjb25zdCBmaWx0ZXJzID0gKGF3YWl0IFByb21pc2UuYWxsKGRhdGFzKSkuZmlsdGVyKFxuICAgICAgICAoZGF0YSkgPT4gZGF0YSAhPT0gdW5kZWZpbmVkLFxuICAgICAgKTtcbiAgICAgIHJldHVybiBmaWx0ZXJzIGFzIFRva2VuTWV0YWRhdGFbXTtcbiAgICB9KTtcbiAgfTtcblxuICAvKipcbiAgICogRmV0Y2ggbWludGVkIG1ldGFkYXRhIGJ5IG1pbnQgYWRkcmVzc1xuICAgKlxuICAgKiBAcGFyYW0ge1B1YmtleX0gbWludFxuICAgKiBAcmV0dXJuI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M6IGxhbXBvcnRzLFxuICAgICAgICBwcm9ncmFtSWQ6IFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICB9KSxcbiAgICApO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVJbml0aWFsaXplTWludEluc3RydWN0aW9uKFxuICAgICAgICBtaW50LFxuICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIG93bmVyLFxuICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKSxcbiAgICApO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVBc3NvY2lhdGVkVG9rZW5BY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgIGZlZVBheWVyLFxuICAgICAgICB0b2tlbkFzc29jaWF0ZWQsXG4gICAgICAgIG93bmVyLFxuICAgICAgICBtaW50LFxuICAgICAgKSxcbiAgICApO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVNaW50VG9DaGVja2VkSW5zdHJ1Y3Rpb24oXG4gICAgICAgIG1pbnQsXG4gICAgICAgIHRva2VuQXNzb2NpYXRlZCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIENhbGN1bGF0ZS5jYWxjdWxhdGVBbW91bnQodG90YWxBbW91bnQsIG1pbnREZWNpbWFsKSxcbiAgICAgICAgbWludERlY2ltYWwsXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUNyZWF0ZU1ldGFkYXRhQWNjb3VudFYzSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHtcbiAgICAgICAgICBtZXRhZGF0YTogbWV0YWRhdGFQZGEsXG4gICAgICAgICAgbWludCxcbiAgICAgICAgICBtaW50QXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBwYXllcjogZmVlUGF5ZXIsXG4gICAgICAg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dhaXQgU3RvcmFnZS51cGxvYWQoXG4gICAgICAgICAgc3RvcmFnZU1ldGFkYXRhLFxuICAgICAgICAgIGlucHV0LmZpbGVQYXRoLFxuICAgICAgICAgIHN0b3JhZ2VUeXBlLFxuICAgICAgICAgIHBheWVyLFxuICAgICAgICApO1xuXG4gICAgICAgIGlmICh1cGxvYWRlZC5pc0Vycikge1xuICAgICAgICAgIHRocm93IHVwbG9hZGVkO1xuICAgICAgICB9XG4gICAgICAgIHVyaSA9IHVwbG9hZGVkLnZhbHVlO1xuICAgICAgfSBlbHNlIGlmIChpbnB1dC51cmkpIHtcbiAgICAgICAgY29uc3QgaW1hZ2UgPSB7IGltYWdlOiBpbnB1dC51cmkgfTtcbiAgICAgICAgY29uc3QgdXBsb2FkZWQgPSBhd2FpdCBTdG9yYWdlLnVwbG9hZERhdGEoXG4gICAgICAgICAgeyAuLi5zdG9yYWdlTWV0YWRhdGEsIC4uLmltYWdlIH0sXG4gICAgICAgICAgc3RvcmFnZVR5cGUsXG4gICAgICAgICAgcGF5ZXIsXG4gICAgICAgICk7XG4gICAgICAgIGlmICh1cGxvYWRlZC5pc0Vycikge1xuICAgICAgICAgIHRocm93IHVwbG9hZGVkO1xuICAgICAgICB9XG4gICAgICAgIHVyaSA9IHVwbG9hZGVkLnZhbHVlO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgdGhyb3cgRXJyb3IoYE11c3Qgc2V0IGZpbGVQYXRoJyBvciAndXJpJ2ApO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBpc011dGFibGUgPSB0cnVlO1xuXG4gICAgICBjb25zdCBkYXRhdjIgPSBDb252ZXJ0ZXIuVG9rZW5NZXRhZGF0YS5pbnRvSW5mcmEoXG4gICAgICAgIGlucHV0LFxuICAgICAgICB1cmksXG4gICAgICAgIHNlbGxlckZlZUJhc2lzUG9pbnRzLFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgZGF0YXYyOiAnLCBkYXRhdjIpO1xuICAgICAgZGVidWdMb2coJyMgdXBsb2FkIGNvbnRlbnQgdXJsOiAnLCB1cmkpO1xuXG4gICAgICBjb25zdCBtaW50ID0gQWNjb3VudC5LZXlwYWlyLmNyZWF0ZSgpO1xuICAgICAgY29uc3QgaW5zdHMgPSBhd2FpdCBjcmVhdGVNaW50KFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICB0b3RhbEFtb3VudCxcbiAgICAgICAgbWludERlY2ltYWwsXG4gICAgICAgIGRhdGF2MixcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICBpc011dGFibGUsXG4gICAgICApO1xuXG4gICAgICAvLyBmcmVlemVBdXRob3JpdHlcbiAgICAgIGlmIChmcmVlemVBdXRob3JpdHkpIHtcbiAgICAgICAgaW5zdHMucHVzaChcbiAgICAgICAgICBjcmVhdGVGcmVlemVBdXRob3JpdHkoXG4gICAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgICAgIGZyZWV6ZUF1dGhvcml0eS50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBuZXcgVHJhbnNhY3Rpb25CdWlsZGVyLk1pbnQoXG4gICAgICAgIGluc3RzLFxuICAgICAgICBbb3duZXIudG9LZXlwYWlyKCksIG1pbnQudG9LZXlwYWlyKCldLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgbWludC5wdWJrZXksXG4gICAgICApO1xuICAgIH0pO1xuICB9O1xufVxuIiwgImltcG9ydCB7IFJlc3VsdCwgVHJ5IH0gZnJvbSAnfi9zdWl0ZS11dGlscyc7XG5pbXBvcnQgeyBUcmFuc2FjdGlvbkJ1aWxkZXIgfSBmcm9tICd+L3RyYW5zYWN0aW9uLWJ1aWxkZXInO1xua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W50VG9DaGVja2VkSW5zdHJ1Y3Rpb24obWludCwgYXRhLCBvd25lciwgMSwgMCkpO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVDcmVhdGVNZXRhZGF0YUFjY291bnRWM0luc3RydWN0aW9uKFxuICAgICAgICB7XG4gICAgICAgICAgbWV0YWRhdGE6IHRva2VuTWV0YWRhdGFQdWJrZXksXG4gICAgICAgICAgbWludCxcbiAgICAgICAgICBtaW50QXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBwYXllcjogZmVlUGF5ZXIsXG4gICAgICAgICAgdXBkYXRlQXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgIGNyZWF0ZU1ldGFkYXRhQWNjb3VudEFyZ3NWMzoge1xuICAgICAgICAgICAgZGF0YTogbmZ0TWV0YWRhdGEsXG4gICAgICAgICAgICBpc011dGFibGUsXG4gICAgICAgICAgICBjb2xsZWN0aW9uRGV0YWlsczogbnVsbCxcbiAgICAgICAgICB9LFxuICAgICAgICB9LFxuICAgICAgKSxcbiAgICApO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVDcmVhdGVNYXN0ZXJFZGl0aW9uVjNJbnN0cnVjdGlvbihcbiAgICAgICAge1xuICAgICAgICAgIGVkaXRpb246IG1hc3RlckVkaXRpb25QdWJrZXksXG4gICAgICAgICAgbWludCxcbiAgICAgICAgICB1cGRhdGVBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICAgIG1pbnRBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICAgIHBheWVyOiBmZWVQYXllcixcbiAgICAgICAgICBtZXRhZGF0YTogdG9rZW5NZXRhZGF0YVB1YmtleSxcbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgIGNyZWF0ZU1hc3RlckVkaXRpb25BcmdzOiB7XG4gICAgICAgICAgICBtYXhTdXBwbHk6IDAsXG4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WQ7XG4gICAgICAgIH1cbiAgICAgICAgdXJpID0gdXBsb2FkZWQudmFsdWU7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICB0aHJvdyBFcnJvcihgTXVzdCBzZXQgZmlsZVBhdGgnIG9yICd1cmknYCk7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGRhdGF2MiA9IENvbnZlcnRlci5SZWd1bGFyTmZ0TWV0YWRhdGEuaW50b0luZnJhKFxuICAgICAgICBpbnB1dCxcbiAgICAgICAgdXJpLFxuICAgICAgICBzZWxsZXJGZWVCYXNpc1BvaW50cyxcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IGlzTXV0YWJsZSA9IGlucHV0LmlzTXV0YWJsZSA9PT0gdW5kZWZpbmVkID8gdHJ1ZSA6IGlucHV0LmlzTXV0YWJsZTtcblxuICAgICAgZGVidWdMb2coJyMgaW5wdXQ6ICcsIGlucHV0KTtcbiAgICAgIGRlYnVnTG9nKCcjIGRhdGF2MjogJywgZGF0YXYyKTtcblxuICAgICAgY29uc3QgbWludCA9IEFjY291bnQuS2V5cGFpci5jcmVhdGUoKTtcblxuICAgICAgY29uc3QgaW5zdHJ1Y3Rpb25zID0gYXdhaXQgY3JlYXRlTWludChcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgZGF0YXYyLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICk7XG5cbiAgICAgIC8vIGZyZWV6ZUF1dGhvcml0eVxuICAgICAgaWYgKGZyZWV6ZUF1dGhvcml0eSkge1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgICBjcmVhdGVEZWxlYWdhdGUoXG4gICAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgICAgIGZyZWV6ZUF1dGhvcml0eS50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIC8vIGNvbGxlY3Rpb24gLS0tXG4gICAgICBpZiAoaW5wdXQuY29sbGVjdGlvbikge1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgICBjcmVhdGVWZXJpZnlTaXplZENvbGxlY3Rpb24oXG4gICAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBpbnB1dC5jb2xsZWN0aW9uLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3Qga2V5cGFpcnMgPSBbb3duZXIudG9LZXlwYWlyKCksIG1pbnQudG9LZXlwYWlyKCldO1xuXG4gICAgICAvLyBjcmVhdG9yIC0tLVxuICAgICAgaWYgKGlucHV0LmNyZWF0b3JzKSB7XG4gICAgICAgIGlucHV0LmNyZWF0b3JzLmZvckVhY2goKGNyZWF0b3IpID0+IHtcbiAgICAgICAgICBpZiAoQWNjb3VudC5LZXlwYWlyLmlzU2VjcmV0KGNyZWF0b3Iuc2VjcmV0KSkge1xuICAgICAgICAgICAgY29uc3QgY3JlYXRvclB1YmtleSA9IGNyZWF0b3IuYWRkcmVzcy50b1B1YmxpY0tleSgpO1xuICAgICAgICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZVZlcmlmeUNyZWF0b3IobWludC50b1B1YmxpY0tleSgpLCBjcmVhdG9yUHVia2V5KTtcbiAgICAgICAgICAgIGluc3RydWN0aW9ucy5wdXNoKGluc3QpO1xuICAgICAgICAgICAga2V5cGFpcnMucHVzaChjcmVhdG9yLnNlY3JldC50b0tleXBhaXIoKSk7XG4gICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG5ldyBUcmF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2MiwgY29sbGVjdGlvbiB9O1xuICAgICAgfVxuICAgICAgLy8tLS0gY29sbGVjdGlvbiAtLS1cblxuICAgICAgY29uc3QgaXNNdXRhYmxlID0gaW5wdXQuaXNNdXRhYmxlID09PSB1bmRlZmluZWQgPyB0cnVlIDogaW5wdXQuaXNNdXRhYmxlO1xuXG4gICAgICBkZWJ1Z0xvZygnIyBpbnB1dDogJywgaW5wdXQpO1xuICAgICAgZGVidWdMb2coJyMgc2VsbGVyRmVlQmFzaXNQb2ludHM6ICcsIHNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgIGRlYnVnTG9nKCcjIGRhdGF2MjogJywgZGF0YXYyKTtcblxuICAgICAgY29uc3QgbWludCA9IEFjY291bnQuS2V5cGFpci5jcmVhdGUoKTtcbiAgICAgIGNvbnN0IGluc3RzID0gYXdhaXQgTWludC5jcmVhdGVNaW50KFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyUHVibGlja2V5LFxuICAgICAgICBkYXRhdjIsXG4gICAgICAgIGZlZVBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICk7XG5cbiAgICAgIC8vIGZyZWV6ZUF1dGhvcml0eVxuICAgICAgaWYgKG9wdGlvbnMuZnJlZXplQXV0aG9yaXR5KSB7XG4gICAgICAgIGluc3RzLnB1c2goXG4gICAgICAgICAgTWludC5jcmVhdGVEZWxlYWdhdGUoXG4gICAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBvd25lclB1YmxpY2tleSxcbiAgICAgICAgICAgIG9wdGlvbnMuZnJlZXplQXV0aG9yaXR5LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgYmxvY2toYXNoT2JqID0gYXdhaXQgTm9kZS5nZXRDb25uZWN0aW9uKCkuZ2V0TGF0ZXN0QmxvY2toYXNoK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XRlTWludChcbiAgICAgICAgY29sbGVjdGlvbk1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgIGRhdGF2MixcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICBpc011dGFibGUsXG4gICAgICApO1xuXG4gICAgICAvLyBmcmVlemVBdXRob3JpdHlcbiAgICAgIGlmIChmcmVlemVBdXRob3JpdHkpIHtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgICAgTWludC5jcmVhdGVEZWxlYWdhdGUoXG4gICAgICAgICAgICBjb2xsZWN0aW9uTWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgICAgICBmcmVlemVBdXRob3JpdHkudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBjb2xsZWN0aW9ucyA9IHtcbiAgICAgICAgY29sbGVjdGlvbk1ldGFkYXRhOiBjb2xsZWN0aW9uTWV0YWRhdGFBY2NvdW50LFxuICAgICAgICBjb2xsZWN0aW9uQXV0aG9yaXR5OiBvd25lci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgIGNvbGxlY3Rpb25NaW50OiBjb2xsZWN0aW9uTWludC50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICB9O1xuXG4gICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgY3JlYXRlU2V0Q29sbGVjdGlvblNpemVJbnN0cnVjdGlvbihjb2xsZWN0aW9ucywge1xuICAgICAgICAgIHNldENvbGxlY3Rpb25TaXplQXJnczoge1xuICAgICAgICAgICAgc2l6ZTogY29sbGVjdGlvblNpemUgfHwgREVGQVVMVF9DT0xMRUNUSU9OX1NJWkUsXG4gICAgICAgICAgfSxcbiAgICAgICAgfSksXG4gICAgICApO1x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JBY2NvdW50IiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJSZWd1bGFyTmZ0IiwgIlNwbFRva2VuIiwgIlJlZ3VsYXJOZnQiLCAiQ29tcHJlc3NlZE5mdCIsICJSZWd1bGFyTmZ0IiwgIkNvbXByZXNzZWROZnQiXQp9Cg== \ No newline at end of file diff --git a/packages/suite-compressed-nft/dist/index.mjs b/packages/suite-compressed-nft/dist/index.mjs index 06386f13f..c1f556c7c 100644 --- a/packages/suite-compressed-nft/dist/index.mjs +++ b/packages/suite-compressed-nft/dist/index.mjs @@ -389,22 +389,11 @@ var TransactionBuilder5; // ../global/src/index.ts import { Keypair as Keypair3, LAMPORTS_PER_SOL, PublicKey as PublicKey4 } from "@solana/web3.js"; -// ../account/src/associated.ts -import { - ASSOCIATED_TOKEN_PROGRAM_ID, - createAssociatedTokenAccountInstruction, - getAccount, - getAssociatedTokenAddressSync, - TOKEN_PROGRAM_ID, - TokenAccountNotFoundError, - TokenInvalidAccountOwnerError -} from "@solana/spl-token"; - // ../account/src/keypair.ts import { Keypair as Original, PublicKey as PublicKey2 } from "@solana/web3.js"; import bs from "bs58"; var Account; -((Account5) => { +((Account4) => { class Keypair4 { secret; pubkey; @@ -440,111 +429,16 @@ var Account; }); }; } - Account5.Keypair = Keypair4; + Account4.Keypair = Keypair4; })(Account || (Account = {})); -// ../account/src/associated.ts -var Account2; -((Account5) => { - let Associated; - ((Associated2) => { - const RETRY_OVER_LIMIT = 10; - const RETRY_SLEEP_TIME = 3; - const get = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const res = await (0, Associated2.makeOrCreateInstruction)( - mint, - owner, - new Account.Keypair({ secret: feePayer }).pubkey, - allowOwnerOffCurve - ); - if (!res.inst) { - return res.tokenAccount; - } - return new TransactionBuilder6.Common( - [res.inst], - [], - feePayer.toKeypair(), - res.tokenAccount - ); - }; - Associated2.retryGetOrCreate = async (mint, owner, feePayer) => { - let counter = 1; - while (counter < RETRY_OVER_LIMIT) { - try { - const inst = await get(mint, owner, feePayer, true); - if (inst && typeof inst === "string") { - debugLog("# associatedTokenAccount: ", inst); - return inst; - } else if (inst instanceof TransactionBuilder6.Common) { - (await inst.submit()).map( - async (ok) => { - await Node.confirmedSig(ok); - return inst.data; - }, - (err) => { - debugLog("# Error submit retryGetOrCreate: ", err); - throw err; - } - ); - } - } catch (e) { - debugLog(`# retry: ${counter} create token account: `, e); - debugLog(`# mint: ${mint}, owner: ${owner}, feePayer: ${feePayer}`); - } - await sleep(RETRY_SLEEP_TIME); - counter++; - } - throw Error(`retry action is over limit ${RETRY_OVER_LIMIT}`); - }; - Associated2.makeOrCreateInstruction = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const associatedTokenAccount = getAssociatedTokenAddressSync( - mint.toPublicKey(), - owner.toPublicKey(), - allowOwnerOffCurve, - TOKEN_PROGRAM_ID, - ASSOCIATED_TOKEN_PROGRAM_ID - ); - debugLog("# associatedTokenAccount: ", associatedTokenAccount.toString()); - try { - await getAccount( - Node.getConnection(), - associatedTokenAccount, - Node.getConnection().commitment, - TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst: void 0 - }; - } catch (error) { - if (!(error instanceof TokenAccountNotFoundError) && !(error instanceof TokenInvalidAccountOwnerError)) { - throw Error("Unexpected error"); - } - const payer = !feePayer ? owner : feePayer; - const inst = createAssociatedTokenAccountInstruction( - payer.toPublicKey(), - associatedTokenAccount, - owner.toPublicKey(), - mint.toPublicKey(), - TOKEN_PROGRAM_ID, - ASSOCIATED_TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst - }; - } - }; - })(Associated = Account5.Associated || (Account5.Associated = {})); -})(Account2 || (Account2 = {})); - // ../account/src/pda.ts import { PublicKey as PublicKey3 } from "@solana/web3.js"; import { PROGRAM_ID } from "@metaplex-foundation/mpl-token-metadata"; import { MPL_BUBBLEGUM_PROGRAM_ID } from "@metaplex-foundation/mpl-bubblegum"; import BN from "bn.js"; -var Account3; -((Account5) => { +var Account2; +((Account4) => { let Pda; ((Pda2) => { Pda2.getMetadata = (address) => { @@ -596,14 +490,13 @@ var Account3; ); return assetId.toString(); }; - })(Pda = Account5.Pda || (Account5.Pda = {})); -})(Account3 || (Account3 = {})); + })(Pda = Account4.Pda || (Account4.Pda = {})); +})(Account2 || (Account2 = {})); // ../account/src/index.ts -var Account4 = { - ...Account2, +var Account3 = { ...Account, - ...Account3 + ...Account2 }; // ../global/src/index.ts @@ -634,7 +527,7 @@ String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, op } return url; } - if (Account4.Keypair.isPubkey(addressOrSignature)) { + if (Account3.Keypair.isPubkey(addressOrSignature)) { if (explorer === "solanafm" /* SolanaFM */) { url = `${Constants.EXPLORER_SOLANAFM_URL}/address/${addressOrSignature}?cluster=${cluster}`; } else if (explorer === "xray" /* Xray */) { @@ -654,13 +547,13 @@ String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, op return url; }; String.prototype.toPublicKey = function() { - if (!Account4.Keypair.isPubkey(this.toString())) { + if (!Account3.Keypair.isPubkey(this.toString())) { throw Error(`No match KeyPair.PubKey: ${this.toString()}`); } return new PublicKey4(this.toString()); }; String.prototype.toKeypair = function() { - if (!Account4.Keypair.isSecret(this.toString())) { + if (!Account3.Keypair.isSecret(this.toString())) { throw Error(`No match KeyPair.Secret: ${this.toString()}`); } const decoded = bs2.decode(this.toString()); @@ -1720,7 +1613,7 @@ var CompressedNft; const ownership = rpcAsset.value.ownership; const assetProof = rpcAssetProof.value; const treeOwner = assetProof.tree_id.toPublicKey(); - const treeAuthority = Account4.Pda.getTreeAuthority(assetProof.tree_id); + const treeAuthority = Account3.Pda.getTreeAuthority(assetProof.tree_id); const previousLeafDelegate = ownership.delegate ? ownership.delegate.toPublicKey() : ownership.owner.toPublicKey(); const newLeafDelegate = newDelegate ? newDelegate : previousLeafDelegate; const treeAccount = await ConcurrentMerkleTreeAccount.fromAccountAddress( @@ -1913,7 +1806,7 @@ var CompressedNft5; inst.add( await CompressedNft4.createTransfer( mint, - new Account4.Keypair({ secret: owner }).pubkey, + new Account3.Keypair({ secret: owner }).pubkey, dest, feePayer ) @@ -2173,14 +2066,14 @@ var CompressedNft6; this.spaceOwner.toPublicKey() ); const leafIndex = treeAccount.tree.rightMostPath.index - 1; - return Account4.Pda.getAssetId(this.spaceOwner, leafIndex); + return Account3.Pda.getAssetId(this.spaceOwner, leafIndex); }; } CompressedNft10.Space = Space; CompressedNft10.initSpace = (owner, maxDepth, maxBufferSize, canopyDepth, options = {}) => { return Try(async () => { const payer = options.feePayer ? options.feePayer : owner; - const treeOwner = Account4.Keypair.create(); + const treeOwner = Account3.Keypair.create(); const space = getConcurrentMerkleTreeAccountSize( maxDepth, maxBufferSize, @@ -2332,17 +2225,17 @@ var CompressedNft7; const storageType = input.storageType || DEFAULT_STORAGE_TYPE; const ownerPublicKey = owner.toKeypair().publicKey; const leafOwner = receiver ? receiver.toPublicKey() : ownerPublicKey; - const leafDelegate = delegate ? delegate : new Account4.Keypair({ secret: payer }).pubkey; - const treeAuthority = Account4.Pda.getTreeAuthority( + const leafDelegate = delegate ? delegate : new Account3.Keypair({ secret: payer }).pubkey; + const treeAuthority = Account3.Pda.getTreeAuthority( treeOwner.toPublicKey().toString() ); - const collectionMetadata = Account4.Pda.getMetadata( + const collectionMetadata = Account3.Pda.getMetadata( collectionMint.toString() ); - const collectionMasterEditionAccount = Account4.Pda.getMasterEdition( + const collectionMasterEditionAccount = Account3.Pda.getMasterEdition( collectionMint.toString() ); - const bubblegumSigner = Account4.Pda.getBgumSigner(); + const bubblegumSigner = Account3.Pda.getBgumSigner(); let properties; if (input.properties) { properties = await Converter14.Properties.intoInfra( @@ -2468,7 +2361,7 @@ var SplToken2; return Try(async () => { const payer = options.feePayer ? options.feePayer : ownerOrMultisig[0]; const keypairs = ownerOrMultisig.map((s) => s.toKeypair()); - const tokenAssociated = await Account4.Associated.retryGetOrCreate( + const tokenAssociated = await Account3.Associated.retryGetOrCreate( token, owner, payer @@ -2494,13 +2387,13 @@ var SplToken2; // ../suite-spl-token/src/burn.ts import { createBurnCheckedInstruction, - getAssociatedTokenAddressSync as getAssociatedTokenAddressSync2 + getAssociatedTokenAddressSync } from "@solana/spl-token"; var SplToken3; ((SplToken11) => { SplToken11.burn = (mint, owner, ownerOrMultisig, burnAmount, tokenDecimals, options = {}) => { return Try(() => { - const tokenAccount = getAssociatedTokenAddressSync2( + const tokenAccount = getAssociatedTokenAddressSync( mint.toPublicKey(), owner.toPublicKey() ); @@ -2521,7 +2414,7 @@ var SplToken3; // ../suite-spl-token/src/find.ts import { Metadata } from "@metaplex-foundation/mpl-token-metadata"; -import { TOKEN_PROGRAM_ID as TOKEN_PROGRAM_ID2 } from "@solana/spl-token"; +import { TOKEN_PROGRAM_ID } from "@solana/spl-token"; import fetch2 from "cross-fetch"; var SplToken4; ((SplToken11) => { @@ -2560,7 +2453,7 @@ var SplToken4; const info = await connection.getParsedTokenAccountsByOwner( owner.toPublicKey(), { - programId: TOKEN_PROGRAM_ID2 + programId: TOKEN_PROGRAM_ID } ); const datas = info.value.map(async (d) => { @@ -2571,7 +2464,7 @@ var SplToken4; } return Metadata.fromAccountAddress( connection, - Account4.Pda.getMetadata(mint) + Account3.Pda.getMetadata(mint) ).then(async (metadata) => { return fetchRetry(metadata.data.uri).then((json) => { return converter(metadata, json, tokenAmount); @@ -2589,7 +2482,7 @@ var SplToken4; const connection = Node.getConnection(); const metadata = await Metadata.fromAccountAddress( connection, - Account4.Pda.getMetadata(mint) + Account3.Pda.getMetadata(mint) ); debugLog("# findByMint metadata: ", metadata); if (metadata.tokenStandard === 0) { @@ -2608,21 +2501,21 @@ var SplToken4; // ../suite-spl-token/src/freeze.ts import { createFreezeAccountInstruction, - getAssociatedTokenAddressSync as getAssociatedTokenAddressSync3 + getAssociatedTokenAddressSync as getAssociatedTokenAddressSync2 } from "@solana/spl-token"; var SplToken5; ((SplToken11) => { SplToken11.freeze = (mint, owner, freezeAuthority, options = {}) => { return Try(() => { const payer = options.feePayer ? options.feePayer : freezeAuthority; - const tokenAccount = getAssociatedTokenAddressSync3( + const tokenAccount = getAssociatedTokenAddressSync2( mint.toPublicKey(), owner.toPublicKey() ); const inst = createFreezeAccountInstruction( tokenAccount, mint.toPublicKey(), - new Account4.Keypair({ secret: freezeAuthority }).toPublicKey() + new Account3.Keypair({ secret: freezeAuthority }).toPublicKey() ); return new TransactionBuilder6.Common( [inst], @@ -2641,12 +2534,12 @@ var SplToken6; SplToken11.gasLessTransfer = async (mint, owner, dest, amount, mintDecimal, feePayer) => { return Try(async () => { const ownerPublicKey = owner.toKeypair().publicKey; - const sourceToken = await Account4.Associated.makeOrCreateInstruction( + const sourceToken = await Account3.Associated.makeOrCreateInstruction( mint, ownerPublicKey.toString(), feePayer ); - const destToken = await Account4.Associated.makeOrCreateInstruction( + const destToken = await Account3.Associated.makeOrCreateInstruction( mint, dest, feePayer @@ -2658,27 +2551,18 @@ var SplToken6; blockhash: blockhashObj.blockhash, feePayer: feePayer.toPublicKey() }); + inst2 = createTransferCheckedInstruction( + sourceToken.tokenAccount.toPublicKey(), + mint.toPublicKey(), + destToken.tokenAccount.toPublicKey(), + ownerPublicKey, + SplToken.calculateAmount(amount, mintDecimal), + mintDecimal, + [owner.toKeypair()] + ); if (!destToken.inst) { - inst2 = createTransferCheckedInstruction( - sourceToken.tokenAccount.toPublicKey(), - mint.toPublicKey(), - destToken.tokenAccount.toPublicKey(), - ownerPublicKey, - SplToken.calculateAmount(amount, mintDecimal), - mintDecimal, - [owner.toKeypair()] - ); tx.add(inst2); } else { - inst2 = createTransferCheckedInstruction( - sourceToken.tokenAccount.toPublicKey(), - mint.toPublicKey(), - destToken.tokenAccount.toPublicKey(), - ownerPublicKey, - SplToken.calculateAmount(amount, mintDecimal), - mintDecimal, - [owner.toKeypair()] - ); tx.add(destToken.inst).add(inst2); } tx.recentBlockhash = blockhashObj.blockhash; @@ -2698,14 +2582,14 @@ import { } from "@solana/web3.js"; import { AuthorityType, - createAssociatedTokenAccountInstruction as createAssociatedTokenAccountInstruction2, + createAssociatedTokenAccountInstruction, createInitializeMintInstruction, createMintToCheckedInstruction as createMintToCheckedInstruction2, createSetAuthorityInstruction, - getAssociatedTokenAddressSync as getAssociatedTokenAddressSync4, + getAssociatedTokenAddressSync as getAssociatedTokenAddressSync3, getMinimumBalanceForRentExemptMint, MINT_SIZE, - TOKEN_PROGRAM_ID as TOKEN_PROGRAM_ID3 + TOKEN_PROGRAM_ID as TOKEN_PROGRAM_ID2 } from "@solana/spl-token"; import { createCreateMetadataAccountV3Instruction @@ -2724,8 +2608,8 @@ var SplToken7; SplToken11.createMint = async (mint2, owner, totalAmount, mintDecimal, tokenMetadata, feePayer, isMutable) => { const connection = Node.getConnection(); const lamports = await getMinimumBalanceForRentExemptMint(connection); - const metadataPda = Account4.Pda.getMetadata(mint2.toString()); - const tokenAssociated = getAssociatedTokenAddressSync4(mint2, owner); + const metadataPda = Account3.Pda.getMetadata(mint2.toString()); + const tokenAssociated = getAssociatedTokenAddressSync3(mint2, owner); const instructions = []; instructions.push( SystemProgram2.createAccount({ @@ -2733,7 +2617,7 @@ var SplToken7; newAccountPubkey: mint2, space: MINT_SIZE, lamports, - programId: TOKEN_PROGRAM_ID3 + programId: TOKEN_PROGRAM_ID2 }) ); instructions.push( @@ -2742,11 +2626,11 @@ var SplToken7; mintDecimal, owner, owner, - TOKEN_PROGRAM_ID3 + TOKEN_PROGRAM_ID2 ) ); instructions.push( - createAssociatedTokenAccountInstruction2( + createAssociatedTokenAccountInstruction( feePayer, tokenAssociated, owner, @@ -2833,7 +2717,7 @@ var SplToken7; ); debugLog("# datav2: ", datav2); debugLog("# upload content url: ", uri); - const mint2 = Account4.Keypair.create(); + const mint2 = Account3.Keypair.create(); const insts = await (0, SplToken11.createMint)( mint2.toPublicKey(), ownerPublicKey, @@ -2865,21 +2749,21 @@ var SplToken7; // ../suite-spl-token/src/thaw.ts import { createThawAccountInstruction, - getAssociatedTokenAddressSync as getAssociatedTokenAddressSync5 + getAssociatedTokenAddressSync as getAssociatedTokenAddressSync4 } from "@solana/spl-token"; var SplToken8; ((SplToken11) => { SplToken11.thaw = (mint, owner, freezeAuthority, options = {}) => { const payer = options.feePayer ? options.feePayer : freezeAuthority; return Try(() => { - const tokenAccount = getAssociatedTokenAddressSync5( + const tokenAccount = getAssociatedTokenAddressSync4( mint.toPublicKey(), owner.toPublicKey() ); const inst = createThawAccountInstruction( tokenAccount, mint.toPublicKey(), - new Account4.Keypair({ secret: freezeAuthority }).toPublicKey() + new Account3.Keypair({ secret: freezeAuthority }).toPublicKey() ); return new TransactionBuilder6.Common( [inst], @@ -2897,27 +2781,33 @@ var SplToken9; SplToken11.transfer = async (mint, owner, dest, ownerOrMultisig, amount, mintDecimal, options = {}) => { return Try(async () => { const payer = options.feePayer ? options.feePayer : ownerOrMultisig[0]; + const payerPubkey = new Account3.Keypair({ secret: payer }); const keypairs = ownerOrMultisig.map((s) => s.toKeypair()); - const sourceToken = await Account4.Associated.retryGetOrCreate( + const sourceToken = await Account3.Associated.makeOrCreateInstruction( mint, - owner, - payer + owner.toString(), + payerPubkey.pubkey ); - const destToken = await Account4.Associated.retryGetOrCreate( + const destToken = await Account3.Associated.makeOrCreateInstruction( mint, dest, - payer + payerPubkey.pubkey ); const inst = createTransferCheckedInstruction2( - sourceToken.toPublicKey(), + sourceToken.tokenAccount.toPublicKey(), mint.toPublicKey(), - destToken.toPublicKey(), + destToken.tokenAccount.toPublicKey(), owner.toPublicKey(), SplToken.calculateAmount(amount, mintDecimal), mintDecimal, keypairs ); - return new TransactionBuilder6.Common([inst], keypairs, payer.toKeypair()); + const instructions = destToken.inst ? [destToken.inst, inst] : [inst]; + return new TransactionBuilder6.Common( + instructions, + keypairs, + payer.toKeypair() + ); }); }; })(SplToken9 || (SplToken9 = {})); @@ -2975,20 +2865,20 @@ var RegularNft2; })(RegularNft2 || (RegularNft2 = {})); // ../suite-regular-nft/src/freeze.ts -import { getAssociatedTokenAddressSync as getAssociatedTokenAddressSync6 } from "@solana/spl-token"; +import { getAssociatedTokenAddressSync as getAssociatedTokenAddressSync5 } from "@solana/spl-token"; import { createFreezeDelegatedAccountInstruction } from "@metaplex-foundation/mpl-token-metadata"; var RegularNft3; ((RegularNft11) => { RegularNft11.freeze = (mint, owner, freezeAuthority, options = {}) => { return Try(() => { const payer = options.feePayer ? options.feePayer : freezeAuthority; - const tokenAccount = getAssociatedTokenAddressSync6( + const tokenAccount = getAssociatedTokenAddressSync5( mint.toPublicKey(), owner.toPublicKey() ); - const editionAddress = Account4.Pda.getMasterEdition(mint); + const editionAddress = Account3.Pda.getMasterEdition(mint); const inst = createFreezeDelegatedAccountInstruction({ - delegate: new Account4.Keypair({ + delegate: new Account3.Keypair({ secret: freezeAuthority }).toPublicKey(), tokenAccount, @@ -3010,13 +2900,13 @@ import { } from "@solana/web3.js"; import { createApproveInstruction, - createAssociatedTokenAccountInstruction as createAssociatedTokenAccountInstruction3, + createAssociatedTokenAccountInstruction as createAssociatedTokenAccountInstruction2, createInitializeMintInstruction as createInitializeMintInstruction2, createMintToCheckedInstruction as createMintToCheckedInstruction3, - getAssociatedTokenAddressSync as getAssociatedTokenAddressSync7, + getAssociatedTokenAddressSync as getAssociatedTokenAddressSync6, getMinimumBalanceForRentExemptMint as getMinimumBalanceForRentExemptMint2, MINT_SIZE as MINT_SIZE2, - TOKEN_PROGRAM_ID as TOKEN_PROGRAM_ID4 + TOKEN_PROGRAM_ID as TOKEN_PROGRAM_ID3 } from "@solana/spl-token"; import { createCreateMasterEditionV3Instruction, @@ -3029,14 +2919,14 @@ var RegularNft4; const NFT_AMOUNT = 1; const DEFAULT_STORAGE_TYPE = "nftStorage"; RegularNft11.createVerifyCreator = (mint2, creator) => { - const metadata = Account4.Pda.getMetadata(mint2.toString()); + const metadata = Account3.Pda.getMetadata(mint2.toString()); return createSignMetadataInstruction({ metadata, creator }); }; RegularNft11.createDeleagate = (mint2, owner, delegateAuthority) => { - const tokenAccount = getAssociatedTokenAddressSync7(mint2, owner); + const tokenAccount = getAssociatedTokenAddressSync6(mint2, owner); return createApproveInstruction( tokenAccount, delegateAuthority, @@ -3045,25 +2935,25 @@ var RegularNft4; ); }; RegularNft11.createVerifySizedCollection = (collectionChild, collectionParent, feePayer) => { - const collectionMetadata = Account4.Pda.getMetadata( + const collectionMetadata = Account3.Pda.getMetadata( collectionParent.toString() ); - const collectionMasterEditionAccount = Account4.Pda.getMasterEdition( + const collectionMasterEditionAccount = Account3.Pda.getMasterEdition( collectionParent.toString() ); return createVerifySizedCollectionItemInstruction({ collection: collectionMetadata, collectionMasterEditionAccount, collectionMint: collectionParent, - metadata: Account4.Pda.getMetadata(collectionChild.toString()), + metadata: Account3.Pda.getMetadata(collectionChild.toString()), payer: feePayer, collectionAuthority: feePayer }); }; RegularNft11.createMint = async (mint2, owner, nftMetadata, feePayer, isMutable) => { - const ata = getAssociatedTokenAddressSync7(mint2, owner); - const tokenMetadataPubkey = Account4.Pda.getMetadata(mint2.toString()); - const masterEditionPubkey = Account4.Pda.getMasterEdition(mint2.toString()); + const ata = getAssociatedTokenAddressSync6(mint2, owner); + const tokenMetadataPubkey = Account3.Pda.getMetadata(mint2.toString()); + const masterEditionPubkey = Account3.Pda.getMasterEdition(mint2.toString()); const connection = Node.getConnection(); const instructions = []; instructions.push( @@ -3072,12 +2962,12 @@ var RegularNft4; newAccountPubkey: mint2, lamports: await getMinimumBalanceForRentExemptMint2(connection), space: MINT_SIZE2, - programId: TOKEN_PROGRAM_ID4 + programId: TOKEN_PROGRAM_ID3 }) ); instructions.push(createInitializeMintInstruction2(mint2, 0, owner, owner)); instructions.push( - createAssociatedTokenAccountInstruction3(feePayer, ata, owner, mint2) + createAssociatedTokenAccountInstruction2(feePayer, ata, owner, mint2) ); instructions.push(createMintToCheckedInstruction3(mint2, ata, owner, 1, 0)); instructions.push( @@ -3183,7 +3073,7 @@ var RegularNft4; const isMutable = input.isMutable === void 0 ? true : input.isMutable; debugLog("# input: ", input); debugLog("# datav2: ", datav2); - const mint2 = Account4.Keypair.create(); + const mint2 = Account3.Keypair.create(); const instructions = await (0, RegularNft11.createMint)( mint2.toPublicKey(), ownerPublicKey, @@ -3212,7 +3102,7 @@ var RegularNft4; const keypairs = [owner.toKeypair(), mint2.toKeypair()]; if (input.creators) { input.creators.forEach((creator) => { - if (Account4.Keypair.isSecret(creator.secret)) { + if (Account3.Keypair.isSecret(creator.secret)) { const creatorPubkey = creator.address.toPublicKey(); const inst = (0, RegularNft11.createVerifyCreator)(mint2.toPublicKey(), creatorPubkey); instructions.push(inst); @@ -3286,7 +3176,7 @@ var RegularNft5; debugLog("# input: ", input); debugLog("# sellerFeeBasisPoints: ", sellerFeeBasisPoints); debugLog("# datav2: ", datav2); - const mint = Account4.Keypair.create(); + const mint = Account3.Keypair.create(); const insts = await RegularNft4.createMint( mint.toPublicKey(), ownerPublickey, @@ -3400,8 +3290,8 @@ var RegularNft7; const isMutable = input.isMutable === void 0 ? true : input.isMutable; debugLog("# input: ", input); debugLog("# datav2: ", datav2); - const collectionMint = Account4.Keypair.create(); - const collectionMetadataAccount = Account4.Pda.getMetadata( + const collectionMint = Account3.Keypair.create(); + const collectionMetadataAccount = Account3.Pda.getMetadata( collectionMint.pubkey ); const instructions = await RegularNft4.createMint( @@ -3443,20 +3333,20 @@ var RegularNft7; })(RegularNft7 || (RegularNft7 = {})); // ../suite-regular-nft/src/thaw.ts -import { getAssociatedTokenAddressSync as getAssociatedTokenAddressSync8 } from "@solana/spl-token"; +import { getAssociatedTokenAddressSync as getAssociatedTokenAddressSync7 } from "@solana/spl-token"; import { createThawDelegatedAccountInstruction } from "@metaplex-foundation/mpl-token-metadata"; var RegularNft8; ((RegularNft11) => { RegularNft11.thaw = (mint, owner, freezeAuthority, options = {}) => { return Try(() => { const payer = options.feePayer ? options.feePayer : freezeAuthority; - const tokenAccount = getAssociatedTokenAddressSync8( + const tokenAccount = getAssociatedTokenAddressSync7( mint.toPublicKey(), owner.toPublicKey() ); - const editionAddress = Account4.Pda.getMasterEdition(mint); + const editionAddress = Account3.Pda.getMasterEdition(mint); const inst = createThawDelegatedAccountInstruction({ - delegate: new Account4.Keypair({ + delegate: new Account3.Keypair({ secret: freezeAuthority }).toPublicKey(), tokenAccount, @@ -3530,4 +3420,4 @@ var CompressedNft9 = { export { CompressedNft9 as CompressedNft }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9iYXRjaC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jb21tb24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvbWludC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9wYXJ0aWFsLXNpZ24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY2FsY3VsYXRlLXR4c2l6ZS50cyIsICIuLi8uLi9nbG9iYWwvc3JjL2luZGV4LnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2Fzc29jaWF0ZWQudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMva2V5cGFpci50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9wZGEudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvaW5kZXgudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvaW5kZXgudHMiLCAiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL3NoYXJlZC50cyIsICIuLi8uLi9zdWl0ZS11dGlscy9zcmMvcmVzdWx0LnRzIiwgIi4uLy4uL2NvbnZlcnRlci9zcmMvY29sbGVjdGlvbi50cyIsICIuLi8uLi9jb252ZXJ0ZXIvc3JjL2NyZWF0b3JzLnRzIiwgIi4uLy4uL2NvbnZlcnRlci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PihmZWVQYXllclBrKTtcbiAgICBjb25zdCBhY2NvdW50cyA9IG5ldyBTZXQ8c3RyaW5nPihmZWVQYXllclBrKTtcblxuICAgIGNvbnN0IGl4c1NpemUgPSB0cmFuc2FjdGlvbi5pbnN0cnVjdGlvbnMucmVkdWNlKChhY2MsIGl4KSA9PiB7XG4gICAgICBpeC5rZXlzLmZvckVhY2goKHsgcHVia2V5LCBpc1NpZ25lciB9KSA9PiB7XG4gICAgICAgIGNvbnN0IHBrID0gcHVia2V5LnRvQmFzZTU4KCk7XG4gICAgICAgIGlmIChpc1NpZ25lcikgc2lnbmVycy5hZGQocGspO1xuICAgICAgICBhY2NvdW50cy5hZGQocGspO1xuICAgICAgfSk7XG5cbiAgICAgIGFjY291bnRzLmFkZChpeC5wcm9ncmFtSWQudG9CYXNlNTgoKSk7XG5cbiAgICAgIGNvbnN0IG5JbmRleGVzID0gaXgua2V5cy5sZW5ndGg7XG4gICAgICBjb25zdCBvcGFxdWVEYXRhID0gaXguZGF0YS5sZW5ndGg7XG5cbiAgICAgIHJldHVybiAoXG4gICAgICAgIGFjYyArXG4gICAgICAgIDEgKyAvLyBQSUQgaW5kZXhcbiAgICAgICAgY29tcGFjdEFycmF5U2l6ZShuSW5kZXhlcywgMSkgK1xuICAgICAgICBjb21wYWN0QXJyYXlTaXplKG9wYXF1ZURhdGEsIDEpXG4gICAgICApO1xuICAgIH0sIDApO1xuXG4gICAgcmV0dXJuIChcbiAgICAgIGNvbXBhY3RBcnJheVNpemUoc2lnbmVycy5zaXplLCA2NCkgKyAvLyBzaWduYXR1cmVzXG4gICAgICAzICsgLy8gaGVhZGVyXG4gICAgICBjb21wYWN0QXJyYXlTaXplKGFjY291bnRzLnNpemUsIDMyKSArIC8vIGFjY291bnRzXG4gICAgICAzMiArIC8vIGJsb2NraGFzaFxuICAgICAgY29tcGFjdEhlYWRlcih0cmFuc2FjdGlvbi5pbnN0cnVjdGlvbnMubGVuZ3RoKSArIC8vIGluc3RydWN0aW9uc1x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ICAgICByZXR1cm4gcmVzLnRva2VuQWNjb3VudDtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uPFB1YmtleT4oXG4gICAgICAgIFtyZXMuaW5zdF0sXG4gICAgICAgIFtdLFxuICAgICAgICBmZWVQYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgcmVzLnRva2VuQWNjb3VudCEsXG4gICAgICApO1xuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiBSZXRyeSBmdW5jdGlvbiBpZiBjcmVhdGUgbmV3IHRva2VuIGFjY291aW50XG4gICAgICpcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gbWludFxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBvd25lclxuICAgICAqIEBwYXJhbSB7U2VjcmV0fSBmZWVQYXllclxuICAgICAqIEByZXR1cm5zIFByb21pc2U8c3RyaW5nPlxuICAgICAqL1xuICAgIGV4cG9ydCBjb25zdCByZXRyeUdldE9yQ3JlYXRlID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyOiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxzdHJpbmc+ID0+IHtcbiAgICAgIGxldCBjb3VudGVyID0gMTtcbiAgICAgIHdoaWxlIChjb3VudGVyIDwgUkVUUllfT1ZFUl9MSU1JVCkge1xuICAgICAgICB0cnkge1xuICAgICAgICAgIGNvbnN0IGluc3QgPSBhd2FpdCBnZXQobWludCwgb3duZXIsIGZlZVBheWVyLCB0cnVlKTtcblxuICAgICAgICAgIGlmIChpbnN0ICYmIHR5cGVvZiBpbnN0ID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgaW5zdCk7XG4gICAgICAgICAgICByZXR1cm4gaW5zdDtcbiAgICAgICAgICB9IGVsc2UgaWYgKGluc3QgaW5zdGFuY2VvZiBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uKSB7XG4gICAgICAgICAgICAoYXdhaXQgaW5zdC5zdWJtaXQoKSkubWFwKFxuICAgICAgICAgICAgICBhc3luYyAob2s6IHN0cmluZykgPT4ge1xuICAgICAgICAgICAgICAgIGF3YWl0IE5vZGUuY29uZmlybWVkU2lnKG9rKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gaW5zdC5kYXRhO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAoZXJyOiBFcnJvcikgPT4ge1xuICAgICAgICAgICAgICAgIGRlYnVnTG9nKCcjIEVycm9yIHN1Ym1pdCByZXRyeUdldE9yQ3JlYXRlOiAnLCBlcnIpO1xuICAgICAgICAgICAgICAgIHRocm93IGVycjtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgZGVidWdMb2coYCMgcmV0cnk6ICR7Y291bnRlcn0gY3JlYXRlIHRva2VuIGFjY291bnQ6IGAsIGUpO1xuICAgICAgICAgIGRlYnVnTG9nKGAjIG1pbnQ6ICR7bWludH0sIG93bmVyOiAke293bmVyfSwgZmVlUGF5ZXI6ICR7ZmVlUGF5ZXJ9YCk7XG4gICAgICAgIH1cbiAgICAgICAgYXdhaXQgc2xlZXAoUkVUUllfU0xFRVBfVElNRSk7XG4gICAgICAgIGNvdW50ZXIrKztcbiAgICAgIH1cbiAgICAgIHRocm93IEVycm9yKGByZXRyeSBhY3Rpb24gaXMgb3ZlciBsaW1pdCAke1JFVFJZX09WRVJfTElNSVR9YCk7XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIFtNYWluIGxvZ2ljXUdldCBBc3NvY2lhdGVkIHRva2VuIEFjY291bnQuXG4gICAgICogaWYgbm90IGNyZWF0ZWQsIGNyZWF0ZSBuZXcgdG9rZW4gYWNjb3VpbnRcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBtaW50XG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAgICogQHBhcmFtIHtQdWJrZXl9IGZlZVBheWVyXG4gICAgICogQHJldHVybnMgUHJvbWlzZTxzdHJpbmc+XG4gICAgICovXG4gICAgZXhwb3J0IGNvbnN0IG1ha2VPckNyZWF0ZUluc3RydWN0aW9uID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyPzogUHVia2V5LFxuICAgICAgYWxsb3dPd25lck9mZkN1cnZlID0gZmFsc2UsXG4gICAgKTogUHJvbWlzZTx7XG4gICAgICB0b2tlbkFjY291bnQ6IHN0cmluZztcbiAgICAgIGluc3Q6IFRyYW5zYWN0aW9uSW5zdHJ1Y3Rpb24gfCB1bmRlZmluZWQ7XG4gICAgfT4gPT4ge1xuICAgICAgY29uc3QgYXNzb2NpYXRlZFRva2VuQWNjb3VudCA9IGdldEFzc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jKFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSxcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3QsXG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SAnc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEuc3ltYm9sKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU3ltYm9sKG1ldGFkYXRhLnN5bWJvbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAocmVzICYmIHJlcy5pc0Vycikge1xuICAgICAgICAgIHJlc3VsdHMucHVzaCguLi5yZXMuZXJyb3IuZGV0YWlscyk7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgICAgaWYgKHJlc3VsdHMubGVuZ3RoID4gMCkge1xuICAgICAgICBjb25zdCBtZXNzYWdlID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ICAgICAgIC5tYXAoYXN5bmMgKGl0ZW0pID0+IHtcbiAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgY29uc3Qgb2ZmY2hhaW46IE9mZmNoYWluID0gYXdhaXQgZmV0Y2hPZmZjaGFpbihcbiAgICAgICAgICAgICAgaXRlbS5jb250ZW50Lmpzb25fdXJpLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIGNvbnN0IG1lcmdlZCA9IHtcbiAgICAgICAgICAgICAgb25jaGFpbjogaXRlbSxcbiAgICAgICAgICAgICAgb2ZmY2hhaW46IG9mZmNoYWluLFxuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIHJldHVybiBDb252ZXJ0ZXIuTmZ0LmludG9Vc2VyKG1lcmdlZCk7XG4gICAgICAgICAgfSBjYXRjaCAoZXJyKSB7XG4gICAgICAgICAgICBkZWJ1Z0xvZygnIyBGYWlsZWQgZmV0Y2ggb2ZmY2hhaW4gdXJsOiAnLCBpdGVtLmNvbnRlbnQuanNvbl91cmkpO1xuICAgICAgICAgICAgcmV0dXJuIENvbnZlcnRlci5OZnQuaW50b1VzZXIoe1xuICAgICAgICAgICAgICBvbmNoYWluOiBpdGVtLFxuICAgICAgICAgICAgICBvZmZjaGFpbjoge30sXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICB9XG4gICAgICAgIH0pLFxuICAgICk7XG4gICAgcmV0dXJuIHtcbiAgICAgIHBhZ2U6IGFzc2V0cy52YWx1ZS5wYWdlLFxuICAgICAgdG90YWw6IGFzc2V0cy52YWx1ZS50b3RhbCxcbiAgICAgIGxpbWl0OiBhc3NldHMudmFsdWUubGltaXQsXG4gICAgICBtZXRhZGF0YXMsXG4gICAgfTtcbiAgfTtcblxuICAvKipcbiAgICogRmluZCBuZnQgYnkgY29sbGVjdGlvbiBtaW50XG4gICAqXG4gICAqIEBwYXJhbSB7UHVia2V5fSBjb2xsZWN0aW9uTWludFxuICAgKiBAcGFyYW0ge2Jvb2xlYW59IGlzQ29tcHJl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tcbiAgICBkZWJ1Z0xvZygnIyBhdXRob3JpdGllczogJywgYXNzZXQudmFsdWUuYXV0aG9yaXRpZXMpO1xuXG4gICAgY29uc3QgY29tcHJlc3Npb24gPSBhc3NldC52YWx1ZS5jb21wcmVzc2lvbjtcbiAgICBjb25zdCBvd25lcnNoaXAgPSBhc3NldC52YWx1ZS5vd25lcnNoaXA7XG4gICAgY29uc3QgcHJvb2YgPSBhc3NldFByb29mLnZhbHVlLnByb29mO1xuICAgIGNvbnN0IG1lcmtsZVRyZWUgPSBjb21wcmVzc2lvbi50cmVlLnRvUHVibGljS2V5KCk7XG4gICAgY29uc3QgdHJlZUFjY291bnQgPSBhd2FpdCBDb25jdXJyZW50TWVya2xlVHJlZUFjY291bnQuZnJvbUFjY291bnRBZGRyZXNzKFxuICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICBtZXJrbGVUcmVlLFxuICAgICk7XG4gICAgY29uc3QgdHJlZUF1dGhvcml0eSA9IHRyZWVBY2NvdW50LmdldEF1dGhvcml0eSgpO1xuICAgIGNvbnN0IGNhbm9weURlcHRoID0gdHJlZUFjY291bnQuZ2V0Q2Fub3B5RGVwdGgoKTtcblxuICAgIGNvbnN0IHByb29mUGF0aCA9IHByb29mXG4gICAgICAubWFwKChub2RlOiBzdHJpbmcpID0+ICh7XG4gICAgICAgIHB1YmtleTogbm9kZS50b1B1YmxpY0tleSgpLFxuICAgICAgICBpc1NpZ25lcjogZmFsc2UsXG4gICAgICAgIGlzV3JpdGFibGU6IGZhbHNlLFxuICAgICAgfSkpXG4gICAgICAuc2xpY2UoMCwgcHJvb2YubGVuZ3RoIC0gKGNhbm9weURlcHRoID8gY2Fub3B5RGVwdGggOiAwKSk7XG5cbiAgICBjb25zdCBsZWFmT3duZXIgPSBvd25lcnNoaXAub3duZXIudG9QdWJsaWNLZXkoKTtcbiAgICBjb25zdCBuZXdMZWFmT3duZXIgPSBkZXN0LnRvUHVibGljS2V5KCk7XG4gICAgY29uc3Q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NQTF9BQ0NPVU5UX0NPTVBSRVNTSU9OX1BST0dSQU1fSUQsXG4gICAgICAgIH0pLFxuICAgICAgKTtcblxuICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgIGNyZWF0ZUNyZWF0ZVRyZWVJbnN0cnVjdGlvbihcbiAgICAgICAgICB7XG4gICAgICAgICAgICBtZXJrbGVUcmVlOiB0cmVlT3duZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICAgICAgdHJlZUF1dGhvcml0eSxcbiAgICAgICAgICAgIHRyZWVDcmVhdG9yOiBvd25lci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgICAgICBwYXllcjogcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICAgICAgbG9nV3JhcHBlcjogU1BMX05PT1BfUFJPR1JBTV9JRCxcbiAgICAgICAgICAgIGNvbXByZXNzaW9uUHJvZ3JhbTogU1BMX0FDQ09VTlRfQ09NUFJFU1NJT05fUFJPR1JBTV9JRCxcbiAgICAgICAgICB9LFxuICAgICAgICAgIHtcbiAgICAgICAgICAgIG1heEJ1ZmZlclNpemUsXG4gICAgICAgICAgICBtYXhEZXB0aCxcbiAgICAgICAgICAgIHB1YmxpYzogZmFsc2UsXG4gICAgICAgICAgfSxcbiAgICAgICAgICBNUExfQlVCQkxFR1VNX1BST0dSQU1fSUQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgKSxcbiAgICAgICk7XG5cbiAgICAgIHJldHVybiBuZXcgVHJhbnNhY3Rpb25CdWlsZGVyLk1pbnQoXG4gICAgICAgIGluc3RydWN0aW9ucyxcbiAgICAgICAgW3RyZWVPd25lci50b0tleXBhaXIoKSwgb3duZXIudG9LZXlwYWlyKCldLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgdHJlZU93bmVyLnB1YmtleSxcbiAgICAgICk7XG4gICAgfSk7XG4gIH07XG5cbiAgLyoqXG4gICAqIGNyZ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AgICBwYXllcjogZmVlUGF5ZXIsXG5cbiAgICAgICAgbG9nV3JhcHBlcjogU1BMX05PT1BfUFJPR1JBTV9JRCxcbiAgICAgICAgY29tcHJlc3Npb25Qcm9ncmFtOiBTUExfQUNDT1VOVF9DT01QUkVTU0lPTl9QUk9HUkFNX0lELFxuICAgICAgICBjcmVhdG9yOiBmZWVQYXllcixcblxuICAgICAgICAvLyBwcm92aWRlIHRoZSBzbGljZWQgcHJvb2ZcbiAgICAgICAgYW5jaG9yUmVtYWluaW5nQWNjb3VudHM6IHNsaWNlZFByb29mLFxuICAgICAgfSxcbiAgICAgIHtcbiAgICAgICAgcm9vdDogWy4uLmFzc2V0UHJvb2Yucm9vdC50cmltKCkudG9QdWJsaWNLZXkoKS50b0J5dGVzKCldLFxuICAgICAgICBjcmVhdG9ySGFzaDogWy4uLmNvbXB1dGVDcmVhdG9ySGFzaChjcmVhdG9ycyldLFxuICAgICAgICBkYXRhSGFzaDogWy4uLmNvbXB1dGVEYXRhSGFzaChtZXRhZGF0YSldLFxuICAgICAgICBub25jZTogY29tcHJlc3Npb24ubGVhZl9pZCxcbiAgICAgICAgaW5kZXg6IGNvbXByZXNzaW9uLmxlYWZfaWQsXG4gICAgICAgIG1lc3NhZ2U6IG1ldGFkYXRhLFxuICAgICAgfSxcbiAgICApO1xuICB9O1xuXG4gIC8qKlxuICAgKiBVcGxvYWQgY29udGVudCBhbmQgQ29tcHJlc3NlZCBORlQgbWludFxuICAgKlxuICAgKiBAcGFyYW0ge1NlY3JldH0gb3duZXIgICAgICAgICAvLyBvd25lcidzIFNlY3JldFxuICAgKiBAcGFyYW0ge0lucHV0TmZ0TWV0YWRhdGF9IGlucHV0XG4gICAqIHtcbiAgICogICBuYW1lOiBzdHJpbmcgICAgICAgICAgICAgICAvLyBuZnQgY29udGVudCBuYW1lXG4gICAqICAgc3ltYm9sOiBzdHJpbmcgICAgICAgICAgICAgLy8gbmZ0IHRpY2tlciBzeW1ib2xcbiAgICogICBmaWxlUG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FkYXRhQXJncyk7XG5cbiAgICAgIGNvbnN0IGluc3RydWN0aW9ucyA9IFtdO1xuICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgIGNyZWF0ZU1pbnRUb0NvbGxlY3Rpb25WMUluc3RydWN0aW9uKFxuICAgICAgICAgIHtcbiAgICAgICAgICAgIG1lcmtsZVRyZWU6IHRyZWVPd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgdHJlZUF1dGhvcml0eSxcbiAgICAgICAgICAgIHRyZWVEZWxlZ2F0ZTogb3duZXJQdWJsaWNLZXksXG4gICAgICAgICAgICBwYXllcjogcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICAgICAgbGVhZk93bmVyOiBsZWFmT3duZXIsIC8vIHJlY2VpdmVyXG4gICAgICAgICAgICBsZWFmRGVsZWdhdGU6IGxlYWZEZWxlZ2F0ZS50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgY29sbGVjdGlvbkF1dGhvcml0eTogb3duZXJQdWJsaWNLZXksXG4gICAgICAgICAgICBjb2xsZWN0aW9uTWludDogY29sbGVjdGlvbk1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIGNvbGxlY3Rpb25NZXRhZGF0YSxcbiAgICAgICAgICAgIGVkaXRpb25BY2NvdW50OiBjb2xsZWN0aW9uTWFzdGVyRWRpdGlvbkFjY291bnQsXG4gICAgICAgICAgICBidWJibGVndW1TaWduZXIsXG4gICAgICAgICAgICBsb2dXcmFwcGVyOiBTUExfTk9PUF9QUk9HUkFNX0lELFxuICAgICAgICAgICAgY29sbGVjdGlvbkF1dGhvcml0eVJlY29yZFBkYTogQlVCQkxFR1VNX1BST0dSQU1fSUQsXG4gICAgICAgICAgICBjb21wcmVzc2lvblByb2dyYW06IFNQTF9BQ0NPVU5UX0NPTVBSRVNTSU9OX1BST0dSQU1fSUQsXG4gICAgICAgICAgICB0b2tlbk1ldGFkYXRhUHJvZ3JhbTogVE9LRU5fTUVUQURBVEFfUFJPR1JBTV9JRCxcbiAgICAgICAgICB9LFxuICAgICAgICAgIHtcbiAgICAgICAgICAgIG1ldGFkYXRhQXJncyxcbiAgICAgICAgICB9LFxuICAgICAgICApLFxuICAgICAgKTtcblxuICAgICAgaWYgKGlucHV0LmNyZWF0b3JzKSB7XG4gICAgICAgIGNvbnN0IGFzc2V0SWQgPSBhd2FpdCBuZXcgU3BhY2UuU3BhY2UodHJlZU93bmVyKS5nZXRBc3NldElkKCk7XG4gICAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICAgIGF3YWl0IGNyZWF0ZVZlcmlmeUNyZWF0b3IoXG4gICAgICAgICAgICBtZXRhZGF0YUFyZ3MuY3JlYXRvcnMsXG4gICAgICAgICAgICBhc3NldElkLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICB0cmVlT3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIG1ldGFkYXRhQXJncyxcbiAgICAgICAgICAgIHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5NaW50KFxuICAgICAgICBpbnN0cnVjdGlvbnMsXG4gICAgICAgIFtvd25lci50b0tleXBhaXIoKV0sXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICBuZXcgU3BhY2UuU3BhY2UodHJlZU93bmVyKSxcbiAgICAgICk7XG4gICAgfSk7XG4gIH07XG59XG4iLCAiaW1wb3J0IHsgY3JlYXRlTWludFRvQ2hlY2tlZEluc3RydWN0aW9uIH0gZnJvbSAnQHNvbGFuYS9zcGwtdG9rZW4nO1xuaW1wb3J0IHsgUmVzdWx0LCBUcnkgfSBmcm9tICd+L3N1aXRlLXV0aWxzJztcbmltcG9ydCB7IFB1YmtleSwgU2VjcmV0IH0gZnJvbSAnfi90eXBlc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uQW1vdW50XG4gICAgICAgICAgLmFtb3VudCBhcyBzdHJpbmc7XG4gICAgICAgIGlmICh0b2tlbkFtb3VudCA9PT0gJzEnKSB7XG4gICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBNZXRhZGF0YS5mcm9tQWNjb3VudEFkZHJlc3MoXG4gICAgICAgICAgY29ubmVjdGlvbixcbiAgICAgICAgICBBY2NvdW50LlBkYS5nZXRNZXRhZGF0YShtaW50KSxcbiAgICAgICAgKVxuICAgICAgICAgIC50aGVuKGFzeW5jIChtZXRhZGF0YSkgPT4ge1xuICAgICAgICAgICAgLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLWV4cGxpY2l0LWFueSAqL1xuICAgICAgICAgICAgcmV0dXJuIGZldGNoUmV0cnkobWV0YWRhdGEuZGF0YS51cmkpLnRoZW4oKGpzb246IGFueSkgPT4ge1xuICAgICAgICAgICAgICByZXR1cm4gY29udmVydGVyKG1ldGFkYXRhLCBqc29uLCB0b2tlbkFtb3VudCk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICB9KVxuICAgICAgICAgIC5jYXRjaCgoZXJyKSA9PiBkZWJ1Z0xvZygnIyBbRmV0Y2ggZXJyb3JdJywgZXJyKSk7XG4gICAgICB9KTtcblxuICAgICAgY29uc3QgZmlsdGVycyA9IChhd2FpdCBQcm9taXNlLmFsbChkYXRhcykpLmZpbHRlcihcbiAgICAgICAgKGRhdGEpID0+IGRhdGEgIT09IHVuZGVmaW5lZCxcbiAgICAgICk7XG4gICAgICByZXR1cm4gZmlsdGVycyBhcyBUb2tlbk1ldGFkYXRhW107XG4gICAgfSk7XG4gIH07XG5cbiAgLyoqXG4gICAqIEZldGNoIG1pbnRlZCBtZXRhZGF0YSBieSBtaW50IGFkZHJlc3NcbiAgICpcbiAgICogQHBhcmFtIHtQdWJrZXl9IG1pbnRcbiAgICogQHJldHVybiBQcm9taXNlPFJlc3VsdDxVc2V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Jsb2NraGFzaE9iai5sYXN0VmFsaWRCbG9ja0hlaWdodCxcbiAgICAgICAgYmxvY2toYXNoOiBibG9ja2hhc2hPYmouYmxvY2toYXNoLFxuICAgICAgICBmZWVQYXllcjogZmVlUGF5ZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgIH0pO1xuXG4gICAgICAvLyByZXR1cm4gYXNzb2NpYXRlZCB0b2tlbiBhY2NvdW50XG4gICAgICBpZiAoIWRlc3RUb2tlbi5pbnN0KSB7XG4gICAgICAgIGluc3QyID0gY3JlYXRlVHJhbnNmZXJDaGVja2VkSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgc291cmNlVG9rZW4udG9rZW5BY2NvdW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGRlc3RUb2tlbi50b2tlbkFjY291bnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgICBDYWxjdWxhdG9yLmNhbGN1bGF0ZUFtb3VudChhbW91bnQsIG1pbnREZWNpbWFsKSxcbiAgICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICAgICBbb3duZXIudG9LZXlwYWlyKCldLFxuICAgICAgICApO1xuICAgICAgICB0eC5hZGQoaW5zdDIpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgLy8gcmV0dXJuIGluc3RydWN0aW9uIGFuZCB1bmRlY2lkZWQgYXNzb2NpYXRlZCB0b2tlbiBhY2NvdW50XG4gICAgICAgIGluc3QyID0gY3JlYXRlVHJhbnNmZXJDaGVja2VkSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgc291cmNlVG9rZW4udG9rZW5BY2NvdW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGRlc3RUb2tlbi50b2tlbkFjY291bnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBvd25lclB1Ym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2NpYXRlZCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIENhbGN1bGF0ZS5jYWxjdWxhdGVBbW91bnQodG90YWxBbW91bnQsIG1pbnREZWNpbWFsKSxcbiAgICAgICAgbWludERlY2ltYWwsXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUNyZWF0ZU1ldGFkYXRhQWNjb3VudFYzSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHtcbiAgICAgICAgICBtZXRhZGF0YTogbWV0YWRhdGFQZGEsXG4gICAgICAgICAgbWludCxcbiAgICAgICAgICBtaW50QXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBwYXllcjogZmVlUGF5ZXIsXG4gICAgICAgICAgdXBkYXRlQXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgIGNyZWF0ZU1ldGFkYXRhQWNjb3VudEFyZ3NWMzoge1xuICAgICAgICAgICAgZGF0YTogdG9rZW5NZXRhZGF0YSxcbiAgICAgICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICAgICAgIGNvbGxlY3Rpb25EZXRhaWxzOiBudWxsLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICApLFxuICAgICk7XG4gICAgcmV0dXJuIGluc3RydWN0aW9ucztcbiAgfTtcblxuICAvKipcbiAgICogU1BMLVRPS0VOIG1pbnRcbiAgICpcbiAgICogQHBhcmFtIHtTZWNyZXR9IG93bmVyICAgICAgLy8gdG9rZW4gb3duZXIgU2VjcmV0XG4gICAqIEBwYXJhbSB7bnVtYmVyfSB0b3RhbEFtb3VudCAvLyB0b3RhbCBudW1iZXJcbiAgICogQHBhcmFtIHtudW1iZXJ9IG1pbnREZWNpbWFsIC8vIHRva2VuIGRlY2ltYWxcbiAgICogQHBhcmFtIHtJbnB1dFRva2VuTWV0YWRhdGF9IGlucHV0ICAgICAgIC8vIHRva2VuIG1ldGF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gICAgICB9XG4gICAgICAgIHVyaSA9IHVwbG9hZGVkLnZhbHVlO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgdGhyb3cgRXJyb3IoYE11c3Qgc2V0IGZpbGVQYXRoJyBvciAndXJpJ2ApO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBpc011dGFibGUgPSB0cnVlO1xuXG4gICAgICBjb25zdCBkYXRhdjIgPSBDb252ZXJ0ZXIuVG9rZW5NZXRhZGF0YS5pbnRvSW5mcmEoXG4gICAgICAgIGlucHV0LFxuICAgICAgICB1cmksXG4gICAgICAgIHNlbGxlckZlZUJhc2lzUG9pbnRzLFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgZGF0YXYyOiAnLCBkYXRhdjIpO1xuICAgICAgZGVidWdMb2coJyMgdXBsb2FkIGNvbnRlbnQgdXJsOiAnLCB1cmkpO1xuXG4gICAgICBjb25zdCBtaW50ID0gQWNjb3VudC5LZXlwYWlyLmNyZWF0ZSgpO1xuICAgICAgY29uc3QgaW5zdHMgPSBhd2FpdCBjcmVhdGVNaW50KFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICB0b3RhbEFtb3VudCxcbiAgICAgICAgbWludERlY2ltYWwsXG4gICAgICAgIGRhdGF2MixcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICBpc011dGFibGUsXG4gICAgICApO1xuXG4gICAgICAvLyBmcmVlemVBdXRob3JpdHlcbiAgICAgIGlmIChmcmVlemVBdXRob3JpdHkpIHtcbiAgICAgICAgaW5zdHMucHVzaChcbiAgICAgICAgICBjcmVhdGVGcmVlemVBdXRob3JpdHkoXG4gICAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgICAgIGZyZWV6ZUF1dGhvcml0eS50b1B1YmxpY0tleSgpLFxuICA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V5LFxuICAgIGlzTXV0YWJsZTogYm9vbGVhbixcbiAgKTogUHJvbWlzZTxUcmFuc2FjdGlvbkluc3RydWN0aW9uW10+ID0+IHtcbiAgICBjb25zdCBhdGEgPSBnZXRBc3NvY2lhdGVkVG9rZW5BZGRyZXNzU3luYyhtaW50LCBvd25lcik7XG4gICAgY29uc3QgdG9rZW5NZXRhZGF0YVB1YmtleSA9IEFjY291bnQuUGRhLmdldE1ldGFkYXRhKG1pbnQudG9TdHJpbmcoKSk7XG4gICAgY29uc3QgbWFzdGVyRWRpdGlvblB1YmtleSA9IEFjY291bnQuUGRhLmdldE1hc3RlckVkaXRpb24obWludC50b1N0cmluZygpKTtcbiAgICBjb25zdCBjb25uZWN0aW9uID0gTm9kZS5nZXRDb25uZWN0aW9uKCk7XG4gICAgY29uc3QgaW5zdHJ1Y3Rpb25zID0gW107XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIFN5c3RlbVByb2dyYW0uY3JlYXRlQWNjb3VudCh7XG4gICAgICAgIGZyb21QdWJrZXk6IGZlZVBheWVyLFxuICAgICAgICBuZXdBY2NvdW50UHVia2V5OiBtaW50LFxuICAgICAgICBsYW1wb3J0czogYXdhaXQgZ2V0TWluaW11bUJhbGFuY2VGb3JSZW50RXhlbXB0TWludChjb25uZWN0aW9uKSxcbiAgICAgICAgc3BhY2U6IE1JTlRfU0laRSxcbiAgICAgICAgcHJvZ3JhbUlkOiBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgfSksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKGNyZWF0ZUluaXRpYWxpemVNaW50SW5zdHJ1Y3Rpb24obWludCwgMCwgb3duZXIsIG93bmVyKSk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihmZWVQYXllciwgYXRhLCBvd25lciwgbWludCksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKGNyZWF0ZU1pbnRUb0NoZWNrZWRJbnN0cnVjdGlvbihtaW50LCBhdGEsIG93bmVyLCAxLCAwKSk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUNyZWF0ZU1ldGFkYXRhQWNjb3VudFYzSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHtcbiAgICAgICAgICBtZXRhZGF0YTogdG9rZW5NZXRhZGF0YVB1YmtleSxcbiAgICAgICAgICBtaW50LFxuICAgICAgICAgIG1pbnRBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICAgIHBheWVyOiBmZWVQYXllcixcbiAgICAgICAgICB1cGRhdGVBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICB9LFxuICAgICAgICB7XG4gICAgICAgICAgY3JlYXRlTWV0YWRhdGFBY2NvdW50QXJnc1YzOiB7XG4gICAgICAgICAgICBkYXRhOiBuZnRNZXRhZGF0YSxcbiAgICAgICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICAgICAgIGNvbGxlY3Rpb25EZXRhaWxzOiBudWxsLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUNyZWF0ZU1hc3RlckVkaXRpb25WM0luc3RydWN0aW9uKFxuICAgICAgICB7XG4gICAgICAgICAgZWRpdGlvbjogbWFzdGVyRWRpdGlvblB1YmtleSxcbiAgICAgICAgICBtaW50LFxuICAgICAgICAgIHVwZGF0ZUF1dGhvcml0eTogb3duZXIsXG4gICAgICAgICAgbWludEF1dGhvcml0eTogb3duZXIsXG4gICAgICAgICAgcGF5ZXI6IGZlZVBheWVyLFxuICAgICAgICAgIG1ldGFkYXRhOiB0b2tlbk1ldGFkYXRhUHVia2V5LFxuICAgICAgICB9LFxuICAgICAgICB7XG4gICAgICAgICAgY3JlYXRlTWFzdGVyRWRpd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iAgICAgICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICAgICAgZnJlZXplQXV0aG9yaXR5LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgLy8gY29sbGVjdGlvbiAtLS1cbiAgICAgIGlmIChpbnB1dC5jb2xsZWN0aW9uKSB7XG4gICAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICAgIGNyZWF0ZVZlcmlmeVNpemVkQ29sbGVjdGlvbihcbiAgICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIGlucHV0LmNvbGxlY3Rpb24udG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBrZXlwYWlycyA9IFtvd25lci50b0tleXBhaXIoKSwgbWludC50b0tleXBhaXIoKV07XG5cbiAgICAgIC8vIGNyZWF0b3IgLS0tXG4gICAgICBpZiAoaW5wdXQuY3JlYXRvcnMpIHtcbiAgICAgICAgaW5wdXQuY3JlYXRvcnMuZm9yRWFjaCgoY3JlYXRvcikgPT4ge1xuICAgICAgICAgIGlmIChBY2NvdW50LktleXBhaXIuaXNTZWNyZXQoY3JlYXRvci5zZWNyZXQpKSB7XG4gICAgICAgICAgICBjb25zdCBjcmVhdG9yUHVia2V5ID0gY3JlYXRvci5hZGRyZXNzLnRvUHVibGljS2V5KCk7XG4gICAgICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlVmVyaWZ5Q3JlYXRvcihtaW50LnRvUHVibGljS2V5KCksIGNyZWF0b3JQdWJrZXkpO1xuICAgICAgICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goaW5zdCk7XG4gICAgICAgICAgICBrZXlwYWlycy5wdXNoKGNyZWF0b3Iuc2VjcmV0LnRvS2V5cGFpcigp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5pbnRvSW5mcmEoaW5wdXQuY29sbGVjdGlvbik7XG4gICAgICAgIGRhdGF2MiA9IHsgLi4uZGF0YXYyLCBjb2xsZWN0aW9uIH07XG4gICAgICB9XG4gICAgICAvLy0tLSBjb2xsZWN0aW9uIC0tLVxuXG4gICAgICBjb25zdCBpc011dGFibGUgPSBpbnB1dC5pc011dGFibGUgPT09IHVuZGVmaW5lZCA/IHRydWUgOiBpbnB1dC5pc011dGFibGU7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGlucHV0OiAnLCBpbnB1dCk7XG4gICAgICBkZWJ1Z0xvZygnIyBzZWxsZXJGZWVCYXNpc1BvaW50czogJywgc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgZGVidWdMb2coJyMgZGF0YXYyOiAnLCBkYXRhdjIpO1xuXG4gICAgICBjb25zdCBtaW50ID0gQWNjb3VudC5LZXlwYWlyLmNyZWF0ZSgpO1xuICAgICAgY29uc3QgaW5zdHMgPSBhd2FpdCBNaW50LmNyZWF0ZU1pbnQoXG4gICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXJQdWJsaWNrZXksXG4gICAgICAgIGRhdGF2MixcbiAgICAgICAgZmVlUGF5ZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgKTtcblxuICAgICAgLy8gZnJlZXplQXV0aG9yaXR5XG4gICAgICBpZiAob3B0aW9ucy5mcmVlemVBdXRob3JpdHkpIHtcbiAgICAgICAgaW5zdHMucHVzaChcbiAgICAgICAgICBNaW50LmNyZWF0ZURlbGVhZ2F0ZShcbiAgICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIG93bmVyUHVibGlja2V5LFxuICAgICAgICAgICAgb3B0aW9ucy5mcmVlemVBdXRob3JpdHkudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICBjb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cblxuICAgICAgY29uc3QgaW5zdHJ1Y3Rpb25zID0gYXdhaXQgTWludC5jcmVhdGVNaW50KFxuICAgICAgICBjb2xsZWN0aW9uTWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgZGF0YXYyLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICk7XG5cbiAgICAgIC8vIGZyZWV6ZUF1dGhvcml0eVxuICAgICAgaWYgKGZyZWV6ZUF1dGhvcml0eSkge1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgICBNaW50LmNyZWF0ZURlbGVhZ2F0ZShcbiAgICAgICAgICAgIGNvbGxlY3Rpb25NaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgICAgIGZyZWV6ZUF1dGhvcml0eS50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGNvbGxlY3Rpb25zID0ge1xuICAgICAgICBjb2xsZWN0aW9uTWV0YWRhdGE6IGNvbGxlY3Rpb25NZXRhZGF0YUFjY291bnQsXG4gICAgICAgIGNvbGxlY3Rpb25BdXRob3JpdHk6IG93bmVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgY29sbGVjdGlvbk1pbnQ6IGNvbGxlY3Rpb25NaW50LnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgIH07XG5cbiAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICBjcmVhdGVTZXRDb2xsZWN0aW9uU2l6ZUluc3RydWN0aW9uKGNvbGxlY3Rpb25zLCB7XG4gICAgICAgICAgc2V0Q29sbGVjdGlvblNpemVBcmdzOiB7XG4gICAgICAgICAgICBzaXplOiBjb2xsZWN0aW9uU2l6ZSB8f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iBtZXRhZGF0YS5yb3lhbHR5KSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzUm95YWx0eShtZXRhZGF0YS5yb3lhbHR5KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlcl9mZWVfYmFzaXNfcG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJGZWVCYXNpc1BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0YWRhdGEubmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzeW1ib2wnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLnN5bWJvbCkge1xuICAgICAgICAgICAgICByZXMgPSBpc1N5bWJvbChtZXRhZGF0YS5zeW1ib2wpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHJlcyAmJiByZXMuaXNFcnIpIHtcbiAgICAgICAgIC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ICAgY29uc3QgaXRlbXMgPSBhc3NldHMudmFsdWUuaXRlbXM7XG5cbiAgICBjb25zdCBtZXRhZGF0YXMgPSBhd2FpdCBQcm9taXNlLmFsbChcbiAgICAgIGl0ZW1zXG4gICAgICAgIC5maWx0ZXIoKGl0ZW0pID0+IGl0ZW0uY29tcHJlc3Npb24uY29tcHJlc3NlZCA9PT0gaXNDb21wcmVzc2VkKVxuICAgICAgICAubWFwKGFzeW5jIChpdGVtKSA9PiB7XG4gICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgIGNvbnN0IG9mZmNoYWluOiBPZmZjaGFpbiA9IGF3YWl0IGZldGNoT2ZmY2hhaW4oXG4gICAgICAgICAgICAgIGl0ZW0uY29udGVudC5qc29uX3VyaSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgICBjb25zdCBtZXJnZWQgPSB7XG4gICAgICAgICAgICAgIG9uY2hhaW46IGl0ZW0sXG4gICAgICAgICAgICAgIG9mZmNoYWluOiBvZmZjaGFpbixcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICByZXR1cm4gQ29udmVydGVyLk5mdC5pbnRvVXNlcihtZXJnZWQpO1xuICAgICAgICAgIH0gY2F0Y2ggKGVycikge1xuICAgICAgICAgICAgZGVidWdMb2coJyMgRmFpbGVkIGZldGNoIG9mZmNoYWluIHVybDogJywgaXRlbS5jb250ZW50Lmpzb25fdXJpKTtcbiAgICAgICAgICAgIHJldHVybiBDb252ZXJ0ZXIuTmZ0LmludG9Vc2VyKHtcbiAgICAgICAgICAgICAgb25jaGFpbjogaXRlbSxcbiAgICAgICAgICAgICAgb2ZmY2hhaW46IHt9LFxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfVxuICAgICAgICB9KSxcbiAgICApO1xuICAgIHJldHVybiB7XG4gICAgICBwYWdlOiBhc3NldHMudmFsdWUucGFnZSxcbiAgICAgIHRvdGFsOiBhc3NldHMudmFsdWUudG90YWwsXG4gICAgICBsaW1pdDogYXNzZXRzLnZhbH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A/IG5ld0RlbGVnYXRlIDogcHJldmlvdXNMZWFmRGVsZWdhdGU7XG4gICAgY29uc3QgdHJlZUFjY291bnQgPSBhd2FpdCBDb25jdXJyZW50TWVya2xlVHJlZUFjY291bnQuZnJvbUFjY291bnRBZGRyZXNzKFxuICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICB0cmVlT3duZXIsXG4gICAgKTtcbiAgICBjb25zdCBjYW5vcHlEZXB0aCA9IHRyZWVBY2NvdW50LmdldENhbm9weURlcHRoKCk7XG4gICAgY29uc3Qgc2xpY2VkUHJvb2Y6IEFjY291bnRNZXRhW10gPSBhc3NldFByb29mLnByb29mXG4gICAgICAubWFwKChub2RlOiBzdHJpbmcpID0+ICh7XG4gICAgICAgIHB1YmtleTogbm9kZS50b1B1YmxpY0tleSgpLFxuICAgICAgICBpc1NpZ25lcjogZmFsc2UsXG4gICAgICAgIGlzV3JpdGFibGU6IGZhbHNlLFxuICAgICAgfSkpXG4gICAgICAuc2xpY2UoMCwgYXNzZXRQcm9vZi5wcm9vZi5sZW5ndGggLSAoY2Fub3B5RGVwdGggPyBjYW5vcHlEZXB0aCA6IDApKTtcblxuICAgIHJldHVybiBjcmVhdGVEZWxlZ2F0ZUluc3RydWN0aW9uKFxuICAgICAge1xuICAgICAgICB0cmVlQXV0aG9yaXR5LFxuICAgICAgICBsZWFmT3duZXI6IG93bmVyc2hpcC5vd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICBwcmV2aW91c0xlYWZEZWxlZ2F0ZSxcbiAgICAgICAgbmV3TGVhZkRlbGVnYXRlLFxuICAgICAgICBtZXJrbGVUcmVlOiBhc3NldFByb29mLnRyZWVfaWQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgbG9nV3JhcHBlcjogU1BMX05PT1BfUFJPR1JBTV9JRCxcbiAgICAgICAgY29tcHJlc3Npb25Qcm9ncmFtOiBTUExfQUNDT1VOVF9DT01QUkVTU0lPTl9QUk9HUkFNX0lELFxuICAgIC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BvcnRzOlxuICAgICAgICAgICAgYXdhaXQgTm9kZS5nZXRDb25uZWN0aW9uKCkuZ2V0TWluaW11bUJhbGFuY2VGb3JSZW50RXhlbXB0aW9uKHNwYWNlKSxcbiAgICAgICAgICBzcGFjZTogc3BhY2UsXG4gICAgICAgICAgcHJvZ3JhbUlkOiBTUExfQUNDT1VOVF9DT01QUkVTU0lPTl9QUk9HUkFNX0lELFxuICAgICAgICB9KSxcbiAgICAgICk7XG5cbiAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICBjcmVhdGVDcmVhdGVUcmVlSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAge1xuICAgICAgICAgICAgbWVya2xlVHJlZTogdHJlZU93bmVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgICAgIHRyZWVBdXRob3JpdHksXG4gICAgICAgICAgICB0cmVlQ3JlYXRvcjogb3duZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICAgICAgcGF5ZXI6IHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgICAgIGxvZ1dyYXBwZXI6IFNQTF9OT09QX1BST0dSQU1fSUQsXG4gICAgICAgICAgICBjb21wcmVzc2lvblByb2dyYW06IFNQTF9BQ0NPVU5UX0NPTVBSRVNTSU9OX1BST0dSQU1fSUQsXG4gICAgICAgICAgfSxcbiAgICAgICAgICB7XG4gICAgICAgICAgICBtYXhCdWZmZXJTaXplLFxuICAgICAgICAgICAgbWF4RGVwdGgsXG4gICAgICAgICAgICBwdWJsaWM6IGZhbHNlLFxuICAgICAgICAgIH0sXG4gICAgICAgICAgTVBMX0JVQkJMRUdVTV9QUk9HUkFNX0lELnRvUHVibGljS2V5KCksXG4gICAgICAgICksXG4gICAgICApO1xuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5NaW50KFxuICAgICAgICBpbnN0cnVjdGlvbnMsXG4gICAgICAgIFt0cmVlT3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SZWNvcmRQZGE6IEJVQkJMRUdVTV9QUk9HUkFNX0lELFxuICAgICAgICAgICAgY29tcHJlc3Npb25Qcm9ncmFtOiBTUExfQUNDT1VOVF9DT01QUkVTU0lPTl9QUk9HUkFNX0lELFxuICAgICAgICAgICAgdG9rZW5NZXRhZGF0YVByb2dyYW06IFRPS0VOX01FVEFEQVRBX1BST0dSQU1fSUQsXG4gICAgICAgICAgfSxcbiAgICAgICAgICB7XG4gICAgICAgICAgICBtZXRhZGF0YUFyZ3MsXG4gICAgICAgICAgfSxcbiAgICAgICAgKSxcbiAgICAgICk7XG5cbiAgICAgIGlmIChpbnB1dC5jcmVhdG9ycykge1xuICAgICAgICBjb25zdCBhc3NldElkID0gYXdhaXQgbmV3IFNwYWNlLlNwYWNlKHRyZWVPd25lcikuZ2V0QXNzZXRJZCgpO1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgICBhd2FpdCBjcmVhdGVWZXJpZnlDcmVhdG9yKFxuICAgICAgICAgICAgbWV0YWRhdGFBcmdzLmNyZWF0b3JzLFxuICAgICAgICAgICAgYXNzZXRJZC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgdHJlZU93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBtZXRhZGF0YUFyZ3MsXG4gICAgICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuTWludChcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLFxuICAgICAgICBbb3duZXIudG9LZXlwYWlyKCldLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgbmV3IFNwYWNlLlNwYWNlKHRyZWVPd25lciksXG4gICAgICApO1xuICAgIH0pO1xuICB9O1xufVxuIiwgImltcG9ydCB7IGNyZWF0ZU1pbnRUb0NoZW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9IGluZm8udmFsdWUubWFwKGFzeW5jIChkKSA9PiB7XG4gICAgICAgIGNvbnN0IG1pbnQgPSBkLmFjY291bnQuZGF0YS5wYXJzZWQuaW5mby5taW50IGFzIFB1YmtleTtcbiAgICAgICAgY29uc3QgdG9rZW5BbW91bnQgPSBkLmFjY291bnQuZGF0YS5wYXJzZWQuaW5mby50b2tlbkFtb3VudFxuICAgICAgICAgIC5hbW91bnQgYXMgc3RyaW5nO1xuICAgICAgICBpZiAodG9rZW5BbW91bnQgPT09ICcxJykge1xuICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gTWV0YWRhdGEuZnJvbUFjY291bnRBZGRyZXNzKFxuICAgICAgICAgIGNvbm5lY3Rpb24sXG4gICAgICAgICAgQWNjb3VudC5QZGEuZ2V0TWV0YWRhdGEobWludCksXG4gICAgICAgIClcbiAgICAgICAgICAudGhlbihhc3luYyAobWV0YWRhdGEpID0+IHtcbiAgICAgICAgICAgIC8qIGVzbGludC1kaXNhYmxlIEB0eXBlc2NyaXB0LWVzbGludC9uby1leHBsaWNpdC1hbnkgKi9cbiAgICAgICAgICAgIHJldHVybiBmZXRjaFJldHJ5KG1ldGFkYXRhLmRhdGEudXJpKS50aGVuKChqc29uOiBhbnkpID0+IHtcbiAgICAgICAgICAgICAgcmV0dXJuIGNvbnZlcnRlcihtZXRhZGF0YSwganNvbiwgdG9rZW5BbW91bnQpO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfSlcbiAgICAgICAgICAuY2F0Y2goKGVycikgPT4gZGVidWdMb2coJyMgW0ZldGNoIGVycm9yXScsIGVycikpO1xuICAgICAgfSk7XG5cbiAgICAgIGNvbnN0IGZpbHRlcnMgPSAoYXdhaXQgUHJvbWlzZS5hbGwoZGF0YXMpKS5maWx0ZXIoXG4gICAgICAgIChkYXRhKSA9PiBkYXRhICE9PSB1bmRlZmluZWQsXG4gICAgICApO1xuICAgICAgcmV0dXJuIGZpbHRlcnMgYXMg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gW107XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIFN5c3RlbVByb2dyYW0uY3JlYXRlQWNjb3VudCh7XG4gICAgICAgIGZyb21QdWJrZXk6IGZlZVBheWVyLFxuICAgICAgICBuZXdBY2NvdW50UHVia2V5OiBtaW50LFxuICAgICAgICBzcGFjZTogTUlOVF9TSVpFLFxuICAgICAgICBsYW1wb3J0czogbGFtcG9ydHMsXG4gICAgICAgIHByb2dyYW1JZDogVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgIH0pLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUluaXRpYWxpemVNaW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgIG1pbnQsXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICBvd25lcixcbiAgICAgICAgb3duZXIsXG4gICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgZmVlUGF5ZXIsXG4gICAgICAgIHRva2VuQXNzb2NpYXRlZCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIG1pbnQsXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZU1pbnRUb0NoZWNrZWRJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgdG9rZW5Bc3NvY2lhdGVkLFxuICAgICAgICBvd25lcixcbiAgICAgICAgQ2FsY3VsYXRlLmNhbGN1bGF0ZUFtb3VudCh0b3RhbEFtb3VudCwgbWludERlY2ltYWwpLFxuICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3J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nN0IGRhdGF2MiA9IENvbnZlcnRlci5Ub2tlbk1ldGFkYXRhLmludG9JbmZyYShcbiAgICAgICAgaW5wdXQsXG4gICAgICAgIHVyaSxcbiAgICAgICAgc2VsbGVyRmVlQmFzaXNQb2ludHMsXG4gICAgICApO1xuXG4gICAgICBkZWJ1Z0xvZygnIyBkYXRhdjI6ICcsIGRhdGF2Mik7XG4gICAgICBkZWJ1Z0xvZygnIyB1cGxvYWQgY29udGVudCB1cmw6ICcsIHVyaSk7XG5cbiAgICAgIGNvbnN0IG1pbnQgPSBBY2NvdW50LktleXBhaXIuY3JlYXRlKCk7XG4gICAgICBjb25zdCBpbnN0cyA9IGF3YWl0IGNyZWF0ZU1pbnQoXG4gICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgIHRvdGFsQW1vdW50LFxuICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICAgZGF0YXYyLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICk7XG5cbiAgICAgIC8vIGZyZWV6ZUF1dGhvcml0eVxuICAgICAgaWYgKGZyZWV6ZUF1dGhvcml0eSkge1xuICAgICAgICBpbnN0cy5wdXNoKFxuICAgICAgICAgIGNyZWF0ZUZyZWV6ZUF1dGhvcml0eShcbiAgICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICAgICAgZnJlZXplQXV0aG9yaXR5LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuTWludChcbiAgICAgICAgaW5zdHMsXG4gICAgICAgIFtvd25lci50b0tleXBhaXIoKSwgbWludC50b0tleXBhaXIoKV0sXG4gICAgICA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3J0IGNvbnN0IGNyZWF0ZU1pbnQgPSBhc3luYyAoXG4gICAgbWludDogUHVibGljS2V5LFxuICAgIG93bmVyOiBQdWJsaWNLZXksXG4gICAgbmZ0TWV0YWRhdGE6IERhdGFWMixcbiAgICBmZWVQYXllcjogUHVibGljS2V5LFxuICAgIGlzTXV0YWJsZTogYm9vbGVhbixcbiAgKTogUHJvbWlzZTxUcmFuc2FjdGlvbkluc3RydWN0aW9uW10+ID0+IHtcbiAgICBjb25zdCBhdGEgPSBnZXRBc3NvY2lhdGVkVG9rZW5BZGRyZXNzU3luYyhtaW50LCBvd25lcik7XG4gICAgY29uc3QgdG9rZW5NZXRhZGF0YVB1YmtleSA9IEFjY291bnQuUGRhLmdldE1ldGFkYXRhKG1pbnQudG9TdHJpbmcoKSk7XG4gICAgY29uc3QgbWFzdGVyRWRpdGlvblB1YmtleSA9IEFjY291bnQuUGRhLmdldE1hc3RlckVkaXRpb24obWludC50b1N0cmluZygpKTtcbiAgICBjb25zdCBjb25uZWN0aW9uID0gTm9kZS5nZXRDb25uZWN0aW9uKCk7XG4gICAgY29uc3QgaW5zdHJ1Y3Rpb25zID0gW107XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIFN5c3RlbVByb2dyYW0uY3JlYXRlQWNjb3VudCh7XG4gICAgICAgIGZyb21QdWJrZXk6IGZlZVBheWVyLFxuICAgICAgICBuZXdBY2NvdW50UHVia2V5OiBtaW50LFxuICAgICAgICBsYW1wb3J0czogYXdhaXQgZ2V0TWluaW11bUJhbGFuY2VGb3JSZW50RXhlbXB0TWludChjb25uZWN0aW9uKSxcbiAgICAgICAgc3BhY2U6IE1JTlRfU0laRSxcbiAgICAgICAgcHJvZ3JhbUlkOiBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgfSksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKGNyZWF0ZUluaXRpYWxpemVNaW50SW5zdHJ1Y3Rpb24obWludCwgMCwgb3duZXIsIG93bmVyKSk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihmZWVQYXllciwgYXRhLCBvd25lciwgbWludCksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKGNyZWF0ZU1pbnRUb0NoZWNrZWRJbnN0cnVjdGlvbihtaW50LCBhdGEsIG93bmVyLCAxLCAwKSk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUNyZWF0ZU1ldGFkYXRhQWNjb3VudFYzSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHtcbiAgICAgICAgICBtZXRhZGF0YTogdG9rZW5NZXRhZGF0YVB1YmtleSxcbiAgICAgICAgICBtaW50LFxuICAgICAgICAgIG1pbnRBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICAgIHBheWVyOiBmZWVQYXllcixcbiAgICAgICAgICB1cGRhdGVBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICB9LFxuICAgICAgICB7XG4gICAgICAgICAgY3JlYXRlTWV0YWRhdGFBY2NvdW50QXJnc1YzOiB7XG4gICAgICAgICAgICBkYXRhOiBuZnRNZXRhZGF0YSxcbiAgICAgICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICAgICAgIGNvbGxlY3Rpb25EZXRhaWxzOiBudWxsLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUNyZWF0ZU1hc3RlckVkaXRpb25WM0luc3RydWN0aW9uKFxuICAgICAgICB7XG4gICAgICAgICAgZWRpdGlvbjogbWFzdGVyRWRpdGlvblB1YmtleSxcbiAgICAgICAgICBtaW50LFxuICAgICAgICAgIHVwZGF0ZUF1dGhvcml0eTogb3duZXIsXG4gICAgICAgICAgbWludEF1dGhvcml0eTogb3du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cGxvYWREYXRhKFxuICAgICAgICAgIHsgLi4uc3RvcmFnZU1ldGFkYXRhLCAuLi5pbWFnZSB9LFxuICAgICAgICAgIHN0b3JhZ2VUeXBlLFxuICAgICAgICAgIHBheWVyLFxuICAgICAgICApO1xuICAgICAgICBpZiAodXBsb2FkZWQuaXNFcnIpIHtcbiAgICAgICAgICB0aHJvdyB1cGxvYWRlZDtcbiAgICAgICAgfVxuICAgICAgICB1cmkgPSB1cGxvYWRlZC52YWx1ZTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHRocm93IEVycm9yKGBNdXN0IHNldCBmaWxlUGF0aCcgb3IgJ3VyaSdgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgZGF0YXYyID0gQ29udmVydGVyLlJlZ3VsYXJOZnRNZXRhZGF0YS5pbnRvSW5mcmEoXG4gICAgICAgIGlucHV0LFxuICAgICAgICB1cmksXG4gICAgICAgIHNlbGxlckZlZUJhc2lzUG9pbnRzLFxuICAgICAgKTtcblxuICAgICAgY29uc3QgaXNNdXRhYmxlID0gaW5wdXQuaXNNdXRhYmxlID09PSB1bmRlZmluZWQgPyB0cnVlIDogaW5wdXQuaXNNdXRhYmxlO1xuXG4gICAgICBkZWJ1Z0xvZygnIyBpbnB1dDogJywgaW5wdXQpO1xuICAgICAgZGVidWdMb2coJyMgZGF0YXYyOiAnLCBkYXRhdjIpO1xuXG4gICAgICBjb25zdCBtaW50ID0gQWNjb3VudC5LZXlwYWlyLmNyZWF0ZSgpO1xuXG4gICAgICBjb25zdCBpbnN0cnVjdGlvbnMgPSBhd2FpdCBjcmVhdGVNaW50KFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICBkYXRhdjIsXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgKTtcblxuICAgICAgLy8gZnJlZXplQXV0aG9yaXR5XG4gICAgICBpZiAoZnJlZXplQXV0aG9yaXR5KSB7XG4gICAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICAgIGNyZWF0ZURlbGVhZ2F0ZShcbiAgICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICAgICAgZnJlZXplQXV0aG9yaXR5LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgLy8gY29sbGVjdGlvbiAtLS1cbiAgICAgIGlmIChpbnB1dC5jb2xsZWN0aW9uKSB7XG4gICAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICAgIGNyZWF0ZVZlcmlmeVNpemVkQ29sbGVjdGlvbihcbiAgICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIGlucHV0LmNvbGxlY3Rpb24udG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBrZXlwYWlycyA9IFtvd25lci50b0tleXBhaXIoKSwgbWludC50b0tleXBhaXIoKV07XG5cbiAgICAgIC8vIGNyZWF0b3IgLS0tXG4gICAgICBpZiAoaW5wdXQuY3JlYXRvcnMpIHtcbiAgICAgICAgaW5wdXQuY3JlYXRvcnMuZm9yRWFjaCgoY3JlYXRvcikgPT4ge1xuICAgICAgICAgIGlmIChBY2NvdW50LktleXBhaXIuaXNTZWNyZXQoY3JlYXRvci5zZWNyZXQpKSB7XG4gICAgICAgICAgICBjb25zdCBjcmVhdG9yUHVia2V5ID0gY3JlYXRvci5hZGRyZXNzLnRvUHVibGljS2V5KCk7XG4gICAgICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlVmVyaWZ5Q3JlYXRvcihtaW50LnRv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GFpci5jcmVhdGUoKTtcbiAgICAgIGNvbnN0IGNvbGxlY3Rpb25NZXRhZGF0YUFjY291bnQgPSBBY2NvdW50LlBkYS5nZXRNZXRhZGF0YShcbiAgICAgICAgY29sbGVjdGlvbk1pbnQucHVia2V5LFxuICAgICAgKTtcblxuICAgICAgY29uc3QgaW5zdHJ1Y3Rpb25zID0gYXdhaXQgTWludC5jcmVhdGVNaW50KFxuICAgICAgICBjb2xsZWN0aW9uTWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgZGF0YXYyLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICk7XG5cbiAgICAgIC8vIGZyZWV6ZUF1dGhvcml0eVxuICAgICAgaWYgKGZyZWV6ZUF1dGhvcml0eSkge1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgICBNaW50LmNyZWF0ZURlbGVhZ2F0ZShcbiAgICAgICAgICAgIGNvbGxlY3Rpb25NaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgICAgIGZyZWV6ZUF1dGhvcml0eS50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGNvbGxlY3Rpb25zID0ge1xuICAgICAgICBjb2xsZWN0aW9uTWV0YWRhdGE6IGNvbGxlY3Rpb25NZXRhZGF0YUFjY291bnQsXG4gICAgICAgIGNvbGxlY3Rpb25BdXRob3JpdHk6IG93bmVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgY29sbGVjdGlvbk1pbnQ6IGNvbGxlY3Rpb25NaW50LnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgIH07XG5cbiAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICBjcm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VOX1BST0dSQU1fSUQiLCAiY3JlYXRlSW5pdGlhbGl6ZU1pbnRJbnN0cnVjdGlvbiIsICJjcmVhdGVBc3NvY2lhdGVkVG9rZW5BY2NvdW50SW5zdHJ1Y3Rpb24iLCAiY3JlYXRlTWludFRvQ2hlY2tlZEluc3RydWN0aW9uIiwgIkNvbnZlcnRlciIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiVHJhbnNhY3Rpb24iLCAiUmVndWxhck5mdCIsICJDb252ZXJ0ZXIiLCAiQWNjb3VudCIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiUmVndWxhck5mdCIsICJTcGxUb2tlbiIsICJSZWd1bGFyTmZ0IiwgIkNvbnZlcnRlciIsICJBY2NvdW50IiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJnZXRBc3NvY2lhdGVkVG9rZW5BZGRyZXNzU3luYyIsICJSZWd1bGFyTmZ0IiwgIkFjY291bnQiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlJlZ3VsYXJOZnQiLCAiU3BsVG9rZW4iLCAiUmVndWxhck5mdCIsICJDb21wcmVzc2VkTmZ0IiwgIlJlZ3VsYXJOZnQiLCAiQ29tcHJlc3NlZE5mdCJdCn0K \ No newline at end of file diff --git a/packages/suite-memo/dist/index.js b/packages/suite-memo/dist/index.js index 18d292319..0e24a6c0c 100644 --- a/packages/suite-memo/dist/index.js +++ b/packages/suite-memo/dist/index.js @@ -397,14 +397,11 @@ var Result; Result9.all = all; })(Result || (Result = {})); -// ../account/src/associated.ts -var import_spl_token = require("@solana/spl-token"); - // ../account/src/keypair.ts var import_web32 = require("@solana/web3.js"); var import_bs58 = __toESM(require("bs58")); var Account; -((Account5) => { +((Account4) => { class Keypair4 { secret; pubkey; @@ -440,111 +437,16 @@ var Account; }); }; } - Account5.Keypair = Keypair4; + Account4.Keypair = Keypair4; })(Account || (Account = {})); -// ../account/src/associated.ts -var Account2; -((Account5) => { - let Associated; - ((Associated2) => { - const RETRY_OVER_LIMIT = 10; - const RETRY_SLEEP_TIME = 3; - const get = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const res = await (0, Associated2.makeOrCreateInstruction)( - mint, - owner, - new Account.Keypair({ secret: feePayer }).pubkey, - allowOwnerOffCurve - ); - if (!res.inst) { - return res.tokenAccount; - } - return new TransactionBuilder.Common( - [res.inst], - [], - feePayer.toKeypair(), - res.tokenAccount - ); - }; - Associated2.retryGetOrCreate = async (mint, owner, feePayer) => { - let counter = 1; - while (counter < RETRY_OVER_LIMIT) { - try { - const inst = await get(mint, owner, feePayer, true); - if (inst && typeof inst === "string") { - debugLog("# associatedTokenAccount: ", inst); - return inst; - } else if (inst instanceof TransactionBuilder.Common) { - (await inst.submit()).map( - async (ok) => { - await Node.confirmedSig(ok); - return inst.data; - }, - (err) => { - debugLog("# Error submit retryGetOrCreate: ", err); - throw err; - } - ); - } - } catch (e) { - debugLog(`# retry: ${counter} create token account: `, e); - debugLog(`# mint: ${mint}, owner: ${owner}, feePayer: ${feePayer}`); - } - await sleep(RETRY_SLEEP_TIME); - counter++; - } - throw Error(`retry action is over limit ${RETRY_OVER_LIMIT}`); - }; - Associated2.makeOrCreateInstruction = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const associatedTokenAccount = (0, import_spl_token.getAssociatedTokenAddressSync)( - mint.toPublicKey(), - owner.toPublicKey(), - allowOwnerOffCurve, - import_spl_token.TOKEN_PROGRAM_ID, - import_spl_token.ASSOCIATED_TOKEN_PROGRAM_ID - ); - debugLog("# associatedTokenAccount: ", associatedTokenAccount.toString()); - try { - await (0, import_spl_token.getAccount)( - Node.getConnection(), - associatedTokenAccount, - Node.getConnection().commitment, - import_spl_token.TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst: void 0 - }; - } catch (error) { - if (!(error instanceof import_spl_token.TokenAccountNotFoundError) && !(error instanceof import_spl_token.TokenInvalidAccountOwnerError)) { - throw Error("Unexpected error"); - } - const payer = !feePayer ? owner : feePayer; - const inst = (0, import_spl_token.createAssociatedTokenAccountInstruction)( - payer.toPublicKey(), - associatedTokenAccount, - owner.toPublicKey(), - mint.toPublicKey(), - import_spl_token.TOKEN_PROGRAM_ID, - import_spl_token.ASSOCIATED_TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst - }; - } - }; - })(Associated = Account5.Associated || (Account5.Associated = {})); -})(Account2 || (Account2 = {})); - // ../account/src/pda.ts var import_web33 = require("@solana/web3.js"); var import_mpl_token_metadata = require("@metaplex-foundation/mpl-token-metadata"); var import_mpl_bubblegum = require("@metaplex-foundation/mpl-bubblegum"); var import_bn = __toESM(require("bn.js")); -var Account3; -((Account5) => { +var Account2; +((Account4) => { let Pda; ((Pda2) => { Pda2.getMetadata = (address) => { @@ -596,14 +498,13 @@ var Account3; ); return assetId.toString(); }; - })(Pda = Account5.Pda || (Account5.Pda = {})); -})(Account3 || (Account3 = {})); + })(Pda = Account4.Pda || (Account4.Pda = {})); +})(Account2 || (Account2 = {})); // ../account/src/index.ts -var Account4 = { - ...Account2, +var Account3 = { ...Account, - ...Account3 + ...Account2 }; // ../global/src/index.ts @@ -635,7 +536,7 @@ String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, op } return url; } - if (Account4.Keypair.isPubkey(addressOrSignature)) { + if (Account3.Keypair.isPubkey(addressOrSignature)) { if (explorer === "solanafm" /* SolanaFM */) { url = `${Constants.EXPLORER_SOLANAFM_URL}/address/${addressOrSignature}?cluster=${cluster}`; } else if (explorer === "xray" /* Xray */) { @@ -655,13 +556,13 @@ String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, op return url; }; String.prototype.toPublicKey = function() { - if (!Account4.Keypair.isPubkey(this.toString())) { + if (!Account3.Keypair.isPubkey(this.toString())) { throw Error(`No match KeyPair.PubKey: ${this.toString()}`); } return new import_web34.PublicKey(this.toString()); }; String.prototype.toKeypair = function() { - if (!Account4.Keypair.isSecret(this.toString())) { + if (!Account3.Keypair.isSecret(this.toString())) { throw Error(`No match KeyPair.Secret: ${this.toString()}`); } const decoded = import_bs582.default.decode(this.toString()); @@ -1754,4 +1655,4 @@ var Memo3 = { ...Memo, ...Memo2 }; 0 && (module.exports = { Memo }); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uL3NyYy9jcmVhdGUudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvYmF0Y2gudHMiLCAiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi9zdWl0ZS11dGlscy9zcmMvc2hhcmVkLnRzIiwgIi4uLy4uL3N1aXRlLXV0aWxzL3NyYy9yZXN1bHQudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvYXNzb2NpYXRlZC50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9rZXlwYWlyLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL3BkYS50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9pbmRleC50cyIsICIuLi8uLi9nbG9iYWwvc3JjL2luZGV4LnRzIiwgIi4uLy4uL2NvbnZlcnRlci9zcmMvY29sbGVjdGlvbi50cyIsICIuLi8uLi9jb252ZXJ0ZXIvc3JjL2NyZWF0b3JzLnRzIiwgIi4uLy4uL2NvbnZlcnRlci9zcmMvY29tcHJlc3NlZC1uZnQtbWV0YWRhdGEudHMiLCAiLi4vLi4vY29udmVydGVyL3NyYy9yb3lhbHR5LnRzIiwgIi4uLy4uL2NvbnZlcnRlci9zcmMvbmZ0LnRzIiwgIi4uLy4uL2NvbnZlcnRlci9zcmMvbWVtby50cyIsICIuLi8uLi9jb252ZXJ0ZXIvc3JjL21pbnQudHMiLCAiLi4vLi4vY29udmVydGVyL3NyYy9yZWd1bGFyLW5mdC1tZXRhZGF0YS50cyIsICIuLi8uLi9jb252ZXJ0ZXIvc3JjL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iAgICovXG4gIGV4cG9ydCBjb25zdCBjcmVhdGUgPSAoXG4gICAgZGF0YTogc3RyaW5nLFxuICAgIG93bmVyOiBTZWNyZXQsXG4gICAgb3B0aW9uczogUGFydGlhbDxNZW1vT3B0aW9ucz4gPSB7fSxcbiAgKTogUmVzdWx0PENvbW1vblN0cnVjdHVyZSwgRXJyb3I+ID0+IHtcbiAgICByZXR1cm4gVHJ5KCgpID0+IHtcbiAgICAgIGNvbnN0IGZlZVBheWVyID0gb3B0aW9ucy5mZWVQYXllcjtcblxuICAgICAgY29uc3Qga2V5ID0gb3duZXIudG9LZXlwYWlyKCkucHVibGljS2V5XG4gICAgICAgID8gW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBwdWJrZXk6IG93bmVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgICAgICAgaXNTaWduZXI6IHRydWUsXG4gICAgICAgICAgICAgIGlzV3JpdGFibGU6IHRydWUsXG4gICAgICAgICAgICB9LFxuICAgICAgICAgIF1cbiAgICAgICAgOiBbXTtcblxuICAgICAgY29uc3QgaW5zdHJ1Y3Rpb24gPSBuZXcgVHJhbnNhY3Rpb25JbnN0cnVjdGlvbih7XG4gICAgICAgIHByb2dyYW1JZDogQ29uc3RhbnRzLk1FTU9fUFJPR1JBTV9JRCxcbiAgICAgICAgZGF0YTogZW5jb2RlKGRhdGEpLFxuICAgICAgICBrZXlzOiBrZXksXG4gICAgICB9KTtcblxuICAgICAgY29uc3QgcGF5ZXIgPSBmZWVQYXllciB8fCBvd25lcjtcblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uKFxuICAgICAgICBbaW5zdHJ1Y3Rpb25dLFxuICAgICAgICBbb3duZXIudG9LZXlwYWlyKCldLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKSxcbiAgICAgICk7XG4gICAgfSk7XG4gIH07XG59XG4iLCAiaW1wb3J0IHtcbiAgQ29uZmlybU9wdGl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cm1lZFNpZyhvayk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGluc3QuZGF0YTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgKGVycjogRXJyb3IpID0+IHtcbiAgICAgICAgICAgICAgICBkZWJ1Z0xvZygnIyBFcnJvciBzdWJtaXQgcmV0cnlHZXRPckNyZWF0ZTogJywgZXJyKTtcbiAgICAgICAgICAgICAgICB0aHJvdyBlcnI7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgIGRlYnVnTG9nKGAjIHJldHJ5OiAke2NvdW50ZXJ9IGNyZWF0ZSB0b2tlbiBhY2NvdW50OiBgLCBlKTtcbiAgICAgICAgICBkZWJ1Z0xvZyhgIyBtaW50OiAke21pbnR9LCBvd25lcjogJHtvd25lcn0sIGZlZVBheWVyOiAke2ZlZVBheWVyfWApO1xuICAgICAgICB9XG4gICAgICAgIGF3YWl0IHNsZWVwKFJFVFJZX1NMRUVQX1RJTUUpO1xuICAgICAgICBjb3VudGVyKys7XG4gICAgICB9XG4gICAgICB0aHJvdyBFcnJvcihgcmV0cnkgYWN0aW9uIGlzIG92ZXIgbGltaXQgJHtSRVRSWV9PVkVSX0xJTUlUfWApO1xuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiBbTWFpbiBsb2dpY11HZXQgQXNzb2NpYXRlZCB0b2tlbiBBY2NvdW50LlxuICAgICAqIGlmIG5vdCBjcmVhdGVkLCBjcmVhdGUgbmV3IHRva2VuIGFjY291aW50XG4gICAgICpcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gbWludFxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBvd25lclxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBmZWVQYXllclxuICAgICAqIEByZXR1cm5zIFByb21pc2U8c3RyaW5nPlxuICAgICAqL1xuICAgIGV4cG9ydCBjb25zdCBtYWtlT3JDc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50b1N0cmluZygpLFxuICAgICAgICAgIGluc3Q6IHVuZGVmaW5lZCxcbiAgICAgICAgfTtcbiAgICAgIH0gY2F0Y2ggKGVycm9yOiB1bmtub3duKSB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5BY2NvdW50Tm90Rm91bmRFcnJvcikgJiZcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5JbnZhbGlkQWNjb3VudE93bmVyRXJyb3IpXG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9yKCdVbmV4cGVjdGVkIGVycm9yJyk7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBwYXllciA9ICFmZWVQYXllciA/IG93bmVyIDogZmVlUGF5ZXI7XG5cbiAgICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgICBwYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgICBBU1NPQ0lBVEVEX1RPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG5cbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICB0b2tlbkFjY291bnQ6IGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSxcbiAgICAgICAgICBpbnN0LFxuICAgICAgICB9O1xuICAgICAgfVxuICAgIH07XG4gIH1cbn1cbiIsICJpbXBvcnQgeyBLZXlwYWlyIGFzIE9yaWdpbmFsLCBQdWJsaWNLZXkgfSBmcm9tICdAc29sYW5hL3dlYjMuanMnO1xuaW1wb3J0IHsgUHVia2V5LCBTZWNyZXQgfSB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AgICAgIHJldHVybiBpbnB1dC5tYXAoKGRhdGEpID0+IHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICBhZGRyZXNzOiBkYXRhLmFkZHJlc3MudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBzaGFyZTogZGF0YS5zaGFyZSxcbiAgICAgICAgICB2ZXJpZmllZDogZmFsc2UsXG4gICAgICAgIH07XG4gICAgICB9KTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGludG9Db21wcmVzc2VkTmZ0SW5mcmEgPSAoXG4gICAgICBpbnB1dDogT3B0aW9uPElucHV0Q3JlYXRvcnNbXT4gfCB1bmRlZmluZWQsXG4gICAgKTogSW50ZXJuYWxDcmVhdG9yc1tdID0+IHtcbiAgICAgIGlmICghaW5wdXQpIHtcbiAgICAgICAgcmV0dXJuIFtdO1xuICAgICAgfVxuICAgICAgcmV0dXJuIGlucHV0IS5tYXAoKGRhdGEpID0+IHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICBhZGRyZXNzOiBkYXRhLmFkZHJlc3MudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBzaGFyZTogZGF0YS5zaGFyZSxcbiAgICAgICAgICB2ZXJpZmllZDogZmFsc2UsXG4gICAgICAgIH07XG4gICAgICB9KTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGludG9Vc2VyID0gKFxuICAgICAgb3V0cHV0OiBPcHRpb248SW50ZXJuYWxDcmVhdG9yc1tdPixcbiAgICApOiBDcmVhdG9yc1tdIHwgdW5kZWZpbmVkID0+IHtcbiAgICAgIGlmICghb3V0cHV0KSB7XG4gICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBvdXRwdXQubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvU3RyaW5nKCksXG4gICAgICAgICAgc2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oKGtleSkgPT4ge1xuICAgICAgICBsZXQgcmVzITogUmVzdWx0PHN0cmluZywgVmFsaWRhdG9yRXJyb3I+O1xuICAgICAgICBzd2l0Y2ggKGtleSkge1xuICAgICAgICAgIGNhc2UgJ2ltYWdlJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuaW1hZ2UpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNJbWFnZVVybChtZXRhZGF0YS5pbWFnZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdyb3lhbHR5JzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEucm95YWx0eSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1JveWFsdHkobWV0YWRhdGEucm95YWx0eSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ25hbWUn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FzaE9iai5sYXN0VmFsaWRCbG9ja0hlaWdodDtcbiAgICAgICAgdHJhbnNhY3Rpb24ucmVjZW50QmxvY2toYXNoID0gYmxvY2toYXNoT2JqLmJsb2NraGFzaDtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHRoaXMuc2lnbmVycztcblxuICAgICAgICBpZiAodGhpcy5mZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gdGhpcy5mZWVQYXllci5wdWJsaWNLZXk7XG4gICAgICAgICAgZmluYWxTaWduZXJzID0gW3RoaXMuZmVlUGF5ZXIsIC4uLnRoaXMuc2lnbmVyc107XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLmluc3RydWN0aW9ucy5mb3JFYWNoKChpbnN0KSA9PiB0cmFuc2FjdGlvbi5hZGQoaW5zdCkpO1xuXG4gICAgICAgIGNvbnN0IG9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IE1BWF9SRVRSSUVTLFxuICAgICAgICB9O1xuXG4gICAgICAgIGlmIChOb2RlLmdldENvbm5lY3Rpb24oKS5ycGNFbmRwb2ludCA9PT0gQ29uc3RhbnRzLkVuZFBvaW50VXJsLnByZCkge1xuICAgICAgICAgIGRlYnVnTG9nKCcjIENoYW5nZSBtZXRhcGxleCBjbHVzdGVyIG9uIG1haW5uZXQtYmV0YScpO1xuICAgICAgICAgIE5vZGUuY2hhbmdlQ29ubmVjdGlvbih7IGNsdXN0ZXI6IENvbnN0YW50cy5DbHVzdGVyLnByZE1ldGFwbGV4IH0pO1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgIG9wdGlvb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ICAgICAgICAgICAgICAgLy8gZmV0Y2ggIHRyYW5zZmVyIHRyYW5zYWN0aW9uIGZvciByZWxhdGlvbmFsIG1lbW9cbiAgICAgICAgICAgICAgICB0eE1ldGEudHJhbnNhY3Rpb24ubWVzc2FnZS5pbnN0cnVjdGlvbnMuZm9yRWFjaChcbiAgICAgICAgICAgICAgICAgIChpbnN0cnVjdGlvbikgPT4ge1xuICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgaXNQYXJzZWRJbnN0cnVjdGlvbihpbnN0cnVjdGlvbikgJiZcbiAgICAgICAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLlRyYW5zZmVyLnByb2dyYW0uaW5jbHVkZXMoXG4gICAgICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbi5wcm9ncmFtLFxuICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlciA9IGluc3RydWN0aW9uO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICk7XG5cbiAgICAgICAgICAgICAgICAvLyBzcGwtdG9rZW4gb3Igc3lzdGVtXG4gICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlciAmJlxuICAgICAgICAgICAgICAgICAgbW9kdWxlTmFtZSAhPT0gaW5zdHJ1Y3Rpb25UcmFuc2ZlclsncHJvZ3JhbSddXG4gICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICBkZWJ1Z0xvZyhcbiAgICAgICAgICAgICAgICAgICAgJyMgRmlsdGVyVHlwZS5NZW1vIGJyZWFrIGluc3RydWN0aW9uOiAnLFxuICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyLFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vIGZldGNoIG1lbW8gb25seSB0cmFuc2FjdGlvblxuICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuTWVtby5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIsXG4gICAgICAgICAgICAgICAgICBwb3N0VG9rZW5BY2NvdW50LFxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXNlIEZpbHRlclR5cGUuT25seU1lbW86IHtcbiAgICAgICAgICAgICAgaWYgKEZpbHRlck9wdGlvbnMuTWVtby5wcm9ncmFtLmluY2x1ZGVzKGluc3RydWN0aW9uLnByb2dyYW0pKSB7XG4gICAgICAgICAgICAgICAgbGV0IGluc3RydWN0aW9uVHJhbnNmZXI7XG5cbiAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLk1lbW8uaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyLFxuICAgICAgICAgICAgICAgICAgcG9zdFRva2VuQWNjb3VudCxcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLk1pbnQ6IHtcbiAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuTWludC5wcm9ncmFtLmluY2x1ZGVzKGluc3RydWN0aW9uLnByb2dyYW0pICYmXG4gICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5NaW50LmFjdGlvbi5pbmNsdWRlcyhcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLnBhcnNlZC50eXBlIGFzIHN0cmluZyxcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuTWludC5pbnRvVXNlclNpZGUoaW5zdHJ1Y3Rpb24sIHR4TWV0YSk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXNlIEZpbHRlclR5cGUuVHJhbnNmZXI6XG4gICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICBtb2R1bGVOYW1lID09PSBpbnN0cnVjdGlvbi5wcm9ncmFtICYmXG4gICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5UcmFuc2Zlci5hY3Rpb24uaW5jbHVkZXMoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbi5wYXJzZWQudHlwZSBhcyBzdHJpbmcsXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICBpZiAoaW5zdHJ1Y3Rpb24ucGFyc2VkLnR5cGUgPT09ICd0cmFuc2ZlckNoZWNrZWQnKSB7XG4gICAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLlRyYW5zZmVyQ2hlY2tlZC5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICAgIHBvc3RUb2tlbkFjY291bnQsXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIH0gZW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c2FjdGlvbkJ1aWxkZXIiLCAiaW1wb3J0X2JzNTgiLCAiTWVtbyIsICJicyIsICJTaWduYXR1cmVzIiwgIlRyYW5zYWN0aW9uRmlsdGVyIiwgImluc3RydWN0aW9uIiwgIkNvbnZlcnRlciIsICJNZW1vIiwgIk1lbW8iXQp9Cg== \ No newline at end of file +//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uL3NyYy9jcmVhdGUudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvYmF0Y2gudHMiLCAiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi9zdWl0ZS11dGlscy9zcmMvc2hhcmVkLnRzIiwgIi4uLy4uL3N1aXRlLXV0aWxzL3NyYy9yZXN1bHQudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMva2V5cGFpci50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9wZGEudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvaW5kZXgudHMiLCAiLi4vLi4vZ2xvYmFsL3NyYy9pbmRleC50cyIsICIuLi8uLi9jb252ZXJ0ZXIvc3JjL2NvbGxlY3Rpb24udHMiLCAiLi4vLi4vY29udmVydGVyL3NyYy9jcmVhdG9ycy50cyIsICIuLi8uLi9jb252ZXJ0ZXIvc3JjL2NvbXByZXNzZWQtbmZ0LW1ldGFkYXRhLnRzIiwgIi4uLy4uL2NvbnZlcnRlci9zcmMvcm95YWx0eS50cyIsICIuLi8uLi9jb252ZXJ0ZXIvc3JjL25mdC50cyIsICIuLi8uLi9jb252ZXJ0ZXIvc3JjL21lbW8udHMiLCAiLi4vLi4vY29udmVydGVyL3NyYy9taW50LnRzIiwgIi4uLy4uL2NvbnZlcnRlci9zcmMvcmVndWxhci1uZnQtbWV0YWRhdGEudHMiLCAiLi4vLi4vY29udmVydGVyL3NyYy9wcm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qL1xuICBleHBvcnQgY29uc3QgY3JlYXRlID0gKFxuICAgIGRhdGE6IHN0cmluZyxcbiAgICBvd25lcjogU2VjcmV0LFxuICAgIG9wdGlvbnM6IFBhcnRpYWw8TWVtb09wdGlvbnM+ID0ge30sXG4gICk6IFJlc3VsdDxDb21tb25TdHJ1Y3R1cmUsIEVycm9yPiA9PiB7XG4gICAgcmV0dXJuIFRyeSgoKSA9PiB7XG4gICAgICBjb25zdCBmZWVQYXllciA9IG9wdGlvbnMuZmVlUGF5ZXI7XG5cbiAgICAgIGNvbnN0IGtleSA9IG93bmVyLnRvS2V5cGFpcigpLnB1YmxpY0tleVxuICAgICAgICA/IFtcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgcHVia2V5OiBvd25lci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgICAgICAgIGlzU2lnbmVyOiB0cnVlLFxuICAgICAgICAgICAgICBpc1dyaXRhYmxlOiB0cnVlLFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICBdXG4gICAgICAgIDogW107XG5cbiAgICAgIGNvbnN0IGluc3RydWN0aW9uID0gbmV3IFRyYW5zYWN0aW9uSW5zdHJ1Y3Rpb24oe1xuICAgICAgICBwcm9ncmFtSWQ6IENvbnN0YW50cy5NRU1PX1BST0dSQU1fSUQsXG4gICAgICAgIGRhdGE6IGVuY29kZShkYXRhKSxcbiAgICAgICAga2V5czoga2V5LFxuICAgICAgfSk7XG5cbiAgICAgIGNvbnN0IHBheWVyID0gZmVlUGF5ZXIgfHwgb3duZXI7XG5cbiAgICAgIHJldHVybiBuZXcgVHJhbnNhY3Rpb25CdWlsZGVyLkNvbW1vbihcbiAgICAgICAgW2luc3RydWN0aW9uXSxcbiAgICAgICAgW293bmVyLnRvS2V5cGFpcigpXSxcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCksXG4gICAgICApO1xuICAgIH0pO1xuICB9O1xufVxuIiwgImltcG9ydCB7XG4gIENvbmZpcm1PcHRpb25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FxuICAgICk6IE9wdGlvbjxJbnRlcm5hbENyZWF0b3JzW10+ID0+IHtcbiAgICAgIGlmICghaW5wdXQpIHtcbiAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICB9XG4gICAgICByZXR1cm4gaW5wdXQubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvQ29tcHJlc3NlZE5mdEluZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IEludGVybmFsQ3JlYXRvcnNbXSA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBbXTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBpbnB1dCEubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlciA9IChcbiAgICAgIG91dHB1dDogT3B0aW9uPEludGVybmFsQ3JlYXRvcnNbXT4sXG4gICAgKTogQ3JlYXRvcnNbXSB8IHVuZGVmaW5lZCA9PiB7XG4gICAgICBpZiAoIW91dHB1dCkge1xuICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gb3V0cHV0Lm1h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5cGU6IFN0b3JhZ2VUeXBlLFxuICAgICAgICBmZWVQYXllcj86IFNlY3JldCxcbiAgICAgICkgPT4gUHJvbWlzZTxSZXN1bHQ8c3RyaW5nLCBFcnJvcj4+LFxuICAgICAgc3RvcmFnZVR5cGU6IFN0b3JhZ2VUeXBlLFxuICAgICAgZmVlUGF5ZXI/OiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxQcm9wZXJ0aWVzPiA9PiB7XG4gICAgICBpZiAoIWlucHV0IHx8ICFpbnB1dC5maWxlcykge1xuICAgICAgICByZXR1cm4ge307XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGZpbGVzID0gYXdhaXQgUHJvbWlzZS5hbGwoXG4gICAgICAgIGlucHV0LmZpbGVzLm1hcChhc3luYyAoZmlsZSkgPT4ge1xuICAgICAgICAgIGlmICghZmlsZS5maWxlUGF0aCkge1xuICAgICAgICAgICAgcmV0dXJuIHt9O1xuICAgICAgICAgIH1cbiAgICAgICAgICBjb25zdCByZXMgPSBhd2FpdCBjYWxsYmFja0Z1bmMoZmlsZS5maWxlUGF0aCwgc3RvcmFnZVR5cGUsIGZlZVBheWVyKTtcbiAgICAgICAgICBpZiAocmVzLmlzRXJyKSB7XG4gICAgICAgICAgICB0aHJvdyBFcnJvcihyZXMuZXJyb3IubWVzc2FnZSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBvdmVyd3JpdGVPYmplY3QoZmlsZSwgW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBleGlzdHNLZXk6ICdmaWxlUGF0aCcsXG4gICAgICAgICAgICAgIHdpbGw6IHsga2V5OiAndXJpJywgdmFsdWU6IHJlcy52YWx1ZSB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICBdKTtcbiAgICAgICAgfSksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHsgLi4uaW5wdXQsIGZpbGVzIH0gYXMgUHJvcGVydGllcztcbiAgICB9O1xuICB9XG59XG4iLCAiLyogZXNsa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IGtleXMgPSBPYmplY3Qua2V5cyhtZXRhZGF0YSk7XG4gICAgICBjb25zdCByZXN1bHRzOiBEZXRhaWxzW10gPSBbXTtcbiAgICAgIGtleXMubWFwKChrZXkpID0+IHtcbiAgICAgICAgbGV0IHJlcyE6IFJlc3VsdDxzdHJpbmcsIFZhbGlkYXRvckVycm9yPjtcbiAgICAgICAgc3dpdGNoIChrZXkpIHtcbiAgICAgICAgICBjYXNlICdpbWFnZSc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLmltYWdlKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzSW1hZ2VVcmwobWV0YWRhdGEuaW1hZ2UpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAncm95YWx0eSc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnJveWFsdHkpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNSb3lhbHR5KG1ldGFkYXRhLnJveWFsdHkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEuc3ltYm9sKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU3ltYm9sKG1ldGFkYXRhLnN5bWJvbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAocmVzICYmIHJlcy5pc0Vycikge1xuICAgICAgICAgIHJlc3VsdHMucHVzaCguLi5yZXMuZXJyb3IuZGV0YWlscyk7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgICAgaWYgKHJlc3VsdHMubGVuZ3RoID4gMCkge1xuICAgICAgICBjb25zdCBtZXNzYWdlID1cbiAgICAgICAgICAnQ2F1Z2h0IGluIHRoZSB2YWxpZGF0aW9uIGVycm9ycy4gc2VlIGluZm9ybWF0aW9uIGUuZzogZXJyPFZhbGlkYXRvckVycm9yPi5kZXRhaWxzJztcbiAgICAgICAgdGhyb3cgbmV3IFZhbGlkYXRvckVycm9yKG1lc3NhZ2UsIHJlc3VsdHMpO1xuICAgICAgfVxuICAgICAgcmV0dXJuIE1lc3NhZ2UuU1VDQ0VTUztcbiAgICB9KTtcbiAgfTtcblxuICB0eXBlIFBpY2tOZnRTdG9yYWdlID0gUGljazxcbiAgICBPZmZjaGFpbixcbiAgICAnbmFtZScgfCAnc3ltYm9sJyB8ICdpbWFnZScgfCAnc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMnXG4gID47XG4gIHR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y5NZW1vLnByb2dyYW0uaW5jbHVkZXMoaW5zdHJ1Y3Rpb24ucHJvZ3JhbSkpIHtcbiAgICAgICAgICAgICAgICBsZXQgaW5zdHJ1Y3Rpb25UcmFuc2ZlcjtcblxuICAgICAgICAgICAgICAgIC8vIGZldGNoICB0cmFuc2ZlciB0cmFuc2FjdGlvbiBmb3IgcmVsYXRpb25hbCBtZW1vXG4gICAgICAgICAgICAgICAgdHhNZXRhLnRyYW5zYWN0aW9uLm1lc3NhZ2UuaW5zdHJ1Y3Rpb25zLmZvckVhY2goXG4gICAgICAgICAgICAgICAgICAoaW5zdHJ1Y3Rpb24pID0+IHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgIGlzUGFyc2VkSW5zdHJ1Y3Rpb24oaW5zdHJ1Y3Rpb24pICYmXG4gICAgICAgICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5UcmFuc2Zlci5wcm9ncmFtLmluY2x1ZGVzKFxuICAgICAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24ucHJvZ3JhbSxcbiAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIgPSBpbnN0cnVjdGlvbjtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICApO1xuXG4gICAgICAgICAgICAgICAgLy8gc3BsLXRva2VuIG9yIHN5c3RlbVxuICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIgJiZcbiAgICAgICAgICAgICAgICAgIG1vZHVsZU5hbWUgIT09IGluc3RydWN0aW9uVHJhbnNmZXJbJ3Byb2dyYW0nXVxuICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgZGVidWdMb2coXG4gICAgICAgICAgICAgICAgICAgICcjIEZpbHRlclR5cGUuTWVtbyBicmVhayBpbnN0cnVjdGlvbjogJyxcbiAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlcixcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAvLyBmZXRjaCBtZW1vIG9ubHkgdHJhbnNhY3Rpb25cbiAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLk1lbW8uaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyLFxuICAgICAgICAgICAgICAgICAgcG9zdFRva2VuQWNjb3VudCxcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLk9ubHlNZW1vOiB7XG4gICAgICAgICAgICAgIGlmIChGaWx0ZXJPcHRpb25zLk1lbW8ucHJvZ3JhbS5pbmNsdWRlcyhpbnN0cnVjdGlvbi5wcm9ncmFtKSkge1xuICAgICAgICAgICAgICAgIGxldCBpbnN0cnVjdGlvblRyYW5zZmVyO1xuXG4gICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5NZW1vLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlcixcbiAgICAgICAgICAgICAgICAgIHBvc3RUb2tlbkFjY291bnQsXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5NaW50OiB7XG4gICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLk1pbnQucHJvZ3JhbS5pbmNsdWRlcyhpbnN0cnVjdGlvbi5wcm9ncmFtKSAmJlxuICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuTWludC5hY3Rpb24uaW5jbHVkZXMoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbi5wYXJzZWQudHlwZSBhcyBzdHJpbmcsXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLk1pbnQuaW50b1VzZXJTaWRlKGluc3RydWN0aW9uLCB0eE1ldGEpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLlRyYW5zZmVyOlxuICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgbW9kdWxlTmFtZSA9PT0gaW5zdHJ1Y3Rpb24ucHJvZ3JhbSAmJlxuICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuVHJhbnNmZXIuYWN0aW9uLmluY2x1ZGVzKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24ucGFyc2VkLnR5cGUgYXMgc3RyaW5nLFxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgaWYgKGluc3RydWN0aW9uLnBhcnNlZC50eXBlID09PSAndHJhbnNmZXJDaGVja2VkJykge1xuICAgICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5UcmFuc2ZlckNoZWNrZWQuaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgICBwb3N0VG9rZW5BY2NvdW50LFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5UcmFuc2Zlci5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgICByZXR1cm4gaGlzdG9yeTtcbiAgICB9O1xufVxuIiwgImltcG9ydCB7IFB1YmtleSB9IGZyb20gJ34vdHlwZXMvYWNjb3VudCc7XG5pbXBvcnQgeyBGaW5kT3B0aW9ucywgSGlzdG9yeSB9IGZyb20gJ34vdHlwZXMvaGlzdG9yeSc7XG5pbXBvcnQgeyBPbkVyciwgT25PayB9IGZyb20gJ34vdHlwZXMvc3VpdGUtdXRpbHMnO1xuaW1wb3J0IHsgRmlsdGVyVHlwZSwgTW9kdWxlTmFtZSB9IGZyb20gJ34vdHlwZXMvdHJhbnNhY3Rpb24tZmlsdGVyJztcbmltcG9ydCB7IFNpZ25hdHVyZXMsIFRyYW5zYWN0aW9uRmlsdGVyIH0gZnJvbSAnfi90cmFuc2FjdGlvbi1maWx0ZXInO1xuXG5leHBvcnQgbmFtZXNwYWNlIE1lbW8ge1xuICAvKipcbiAgICogRmluZCBtZW1vIG1lc3NhZ2UgYnkgb3duZXIgYWNjb3VudFxuICAgKiBAbW9kdWxlIE1lbW9cbiAgICovXG4gIGV4cG9ydCBjb25zdCBmaW5kQnlPd25lciA9IGFzeW5jIChcbiAgICBvd25lcjogUHVia2V5LFxuICAgIG9uT2s6IE9uT2s8SGlzdG9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WF0b3JzIiwgIkNvbnZlcnRlciIsICJDb21wcmVzc2VkTmZ0TWV0YWRhdGEiLCAiQ29udmVydGVyIiwgIlJveWFsdHkiLCAiQ29udmVydGVyIiwgIk5mdCIsICJDb252ZXJ0ZXIiLCAiTWVtbyIsICJDb252ZXJ0ZXIiLCAiTWludCIsICJDb252ZXJ0ZXIiLCAiUmVndWxhck5mdE1ldGFkYXRhIiwgIkNvbnZlcnRlciIsICJQcm9wZXJ0aWVzIiwgIkNvbnZlcnRlciIsICJVc2VzIiwgIkNvbnZlcnRlciIsICJUb2tlbk1ldGFkYXRhIiwgIkNvbnZlcnRlciIsICJUcmFuc2ZlckNoZWNrZWQiLCAiQ29udmVydGVyIiwgIlRyYW5zZmVyIiwgIkNvbnZlcnRlciIsICJWYWxpZGF0b3IiLCAiTWVzc2FnZSIsICJDb252ZXJ0ZXIiLCAiaW1wb3J0X3dlYjMiLCAiTm9kZSIsICJpbXBvcnRfd2ViMyIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiQ29tbW9uIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJpbXBvcnRfd2ViMyIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiaW1wb3J0X3dlYjMiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiaW1wb3J0X2JzNTgiLCAiTWVtbyIsICJicyIsICJTaWduYXR1cmVzIiwgIlRyYW5zYWN0aW9uRmlsdGVyIiwgImluc3RydWN0aW9uIiwgIkNvbnZlcnRlciIsICJNZW1vIiwgIk1lbW8iXQp9Cg== \ No newline at end of file diff --git a/packages/suite-memo/dist/index.mjs b/packages/suite-memo/dist/index.mjs index e7ffe943c..6d92cff6a 100644 --- a/packages/suite-memo/dist/index.mjs +++ b/packages/suite-memo/dist/index.mjs @@ -364,22 +364,11 @@ var Result; Result9.all = all; })(Result || (Result = {})); -// ../account/src/associated.ts -import { - ASSOCIATED_TOKEN_PROGRAM_ID, - createAssociatedTokenAccountInstruction, - getAccount, - getAssociatedTokenAddressSync, - TOKEN_PROGRAM_ID, - TokenAccountNotFoundError, - TokenInvalidAccountOwnerError -} from "@solana/spl-token"; - // ../account/src/keypair.ts import { Keypair as Original, PublicKey as PublicKey2 } from "@solana/web3.js"; import bs from "bs58"; var Account; -((Account5) => { +((Account4) => { class Keypair4 { secret; pubkey; @@ -415,111 +404,16 @@ var Account; }); }; } - Account5.Keypair = Keypair4; + Account4.Keypair = Keypair4; })(Account || (Account = {})); -// ../account/src/associated.ts -var Account2; -((Account5) => { - let Associated; - ((Associated2) => { - const RETRY_OVER_LIMIT = 10; - const RETRY_SLEEP_TIME = 3; - const get = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const res = await (0, Associated2.makeOrCreateInstruction)( - mint, - owner, - new Account.Keypair({ secret: feePayer }).pubkey, - allowOwnerOffCurve - ); - if (!res.inst) { - return res.tokenAccount; - } - return new TransactionBuilder.Common( - [res.inst], - [], - feePayer.toKeypair(), - res.tokenAccount - ); - }; - Associated2.retryGetOrCreate = async (mint, owner, feePayer) => { - let counter = 1; - while (counter < RETRY_OVER_LIMIT) { - try { - const inst = await get(mint, owner, feePayer, true); - if (inst && typeof inst === "string") { - debugLog("# associatedTokenAccount: ", inst); - return inst; - } else if (inst instanceof TransactionBuilder.Common) { - (await inst.submit()).map( - async (ok) => { - await Node.confirmedSig(ok); - return inst.data; - }, - (err) => { - debugLog("# Error submit retryGetOrCreate: ", err); - throw err; - } - ); - } - } catch (e) { - debugLog(`# retry: ${counter} create token account: `, e); - debugLog(`# mint: ${mint}, owner: ${owner}, feePayer: ${feePayer}`); - } - await sleep(RETRY_SLEEP_TIME); - counter++; - } - throw Error(`retry action is over limit ${RETRY_OVER_LIMIT}`); - }; - Associated2.makeOrCreateInstruction = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const associatedTokenAccount = getAssociatedTokenAddressSync( - mint.toPublicKey(), - owner.toPublicKey(), - allowOwnerOffCurve, - TOKEN_PROGRAM_ID, - ASSOCIATED_TOKEN_PROGRAM_ID - ); - debugLog("# associatedTokenAccount: ", associatedTokenAccount.toString()); - try { - await getAccount( - Node.getConnection(), - associatedTokenAccount, - Node.getConnection().commitment, - TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst: void 0 - }; - } catch (error) { - if (!(error instanceof TokenAccountNotFoundError) && !(error instanceof TokenInvalidAccountOwnerError)) { - throw Error("Unexpected error"); - } - const payer = !feePayer ? owner : feePayer; - const inst = createAssociatedTokenAccountInstruction( - payer.toPublicKey(), - associatedTokenAccount, - owner.toPublicKey(), - mint.toPublicKey(), - TOKEN_PROGRAM_ID, - ASSOCIATED_TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst - }; - } - }; - })(Associated = Account5.Associated || (Account5.Associated = {})); -})(Account2 || (Account2 = {})); - // ../account/src/pda.ts import { PublicKey as PublicKey3 } from "@solana/web3.js"; import { PROGRAM_ID } from "@metaplex-foundation/mpl-token-metadata"; import { MPL_BUBBLEGUM_PROGRAM_ID } from "@metaplex-foundation/mpl-bubblegum"; import BN from "bn.js"; -var Account3; -((Account5) => { +var Account2; +((Account4) => { let Pda; ((Pda2) => { Pda2.getMetadata = (address) => { @@ -571,14 +465,13 @@ var Account3; ); return assetId.toString(); }; - })(Pda = Account5.Pda || (Account5.Pda = {})); -})(Account3 || (Account3 = {})); + })(Pda = Account4.Pda || (Account4.Pda = {})); +})(Account2 || (Account2 = {})); // ../account/src/index.ts -var Account4 = { - ...Account2, +var Account3 = { ...Account, - ...Account3 + ...Account2 }; // ../global/src/index.ts @@ -610,7 +503,7 @@ String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, op } return url; } - if (Account4.Keypair.isPubkey(addressOrSignature)) { + if (Account3.Keypair.isPubkey(addressOrSignature)) { if (explorer === "solanafm" /* SolanaFM */) { url = `${Constants.EXPLORER_SOLANAFM_URL}/address/${addressOrSignature}?cluster=${cluster}`; } else if (explorer === "xray" /* Xray */) { @@ -630,13 +523,13 @@ String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, op return url; }; String.prototype.toPublicKey = function() { - if (!Account4.Keypair.isPubkey(this.toString())) { + if (!Account3.Keypair.isPubkey(this.toString())) { throw Error(`No match KeyPair.PubKey: ${this.toString()}`); } return new PublicKey4(this.toString()); }; String.prototype.toKeypair = function() { - if (!Account4.Keypair.isSecret(this.toString())) { + if (!Account3.Keypair.isSecret(this.toString())) { throw Error(`No match KeyPair.Secret: ${this.toString()}`); } const decoded = bs2.decode(this.toString()); @@ -1739,4 +1632,4 @@ var Memo3 = { ...Memo, ...Memo2 }; export { Memo3 as Memo }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2NyZWF0ZS50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9iYXRjaC50cyIsICIuLi8uLi9zdWl0ZS11dGlscy9zcmMvY29uc3RhbnRzLnRzIiwgIi4uLy4uL3N1aXRlLXV0aWxzL3NyYy9zaGFyZWQudHMiLCAiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL3Jlc3VsdC50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9hc3NvY2lhdGVkLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2tleXBhaXIudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvcGRhLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2luZGV4LnRzIiwgIi4uLy4uL2dsb2JhbC9zcmMvaW5kZXgudHMiLCAiLi4vLi4vY29udmVydGVyL3NyYy9jb2xsZWN0aW9uLnRzIiwgIi4uLy4uL2NvbnZlcnRlci9zcmMvY3JlYXRvcnMudHMiLCAiLi4vLi4vY29udmVydGVyL3NyYy9jb21wcmVzc2VkLW5mdC1tZXRhZGF0YS50cyIsICIuLi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iAgICAvKipcbiAgICAgKiBSZXRyeSBmdW5jdGlvbiBpZiBjcmVhdGUgbmV3IHRva2VuIGFjY291aW50XG4gICAgICpcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gbWludFxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBvd25lclxuICAgICAqIEBwYXJhbSB7U2VjcmV0fSBmZWVQYXllclxuICAgICAqIEByZXR1cm5zIFByb21pc2U8c3RyaW5nPlxuICAgICAqL1xuICAgIGV4cG9ydCBjb25zdCByZXRyeUdldE9yQ3JlYXRlID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyOiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxzdHJpbmc+ID0+IHtcbiAgICAgIGxldCBjb3VudGVyID0gMTtcbiAgICAgIHdoaWxlIChjb3VudGVyIDwgUkVUUllfT1ZFUl9MSU1JVCkge1xuICAgICAgICB0cnkge1xuICAgICAgICAgIGNvbnN0IGluc3QgPSBhd2FpdCBnZXQobWludCwgb3duZXIsIGZlZVBheWVyLCB0cnVlKTtcblxuICAgICAgICAgIGlmIChpbnN0ICYmIHR5cGVvZiBpbnN0ID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgaW5zdCk7XG4gICAgICAgICAgICByZXR1cm4gaW5zdDtcbiAgICAgICAgICB9IGVsc2UgaWYgKGluc3QgaW5zdGFuY2VvZiBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uKSB7XG4gICAgICAgICAgICAoYXdhaXQgaW5zdC5zdWJtaXQoKSkubWFwKFxuICAgICAgICAgICAgICBhc3luYyAob2s6IHN0cmluZykgPT4ge1xuICAgICAgICAgICAgICAgIGF3YWl0IE5vZGUuY29uZmlybWVkU2lnKG9rKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gaW5zdC5kYXRhO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAoZXJyOiBFcnJvcikgPT4ge1xuICAgICAgICAgICAgICAgIGRlYnVnTG9nKCcjIEVycm9yIHN1Ym1pdCByZXRyeUdldE9yQ3JlYXRlOiAnLCBlcnIpO1xuICAgICAgICAgICAgICAgIHRocm93IGVycjtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgZGVidWdMb2coYCMgcmV0cnk6ICR7Y291bnRlcn0gY3JlYXRlIHRva2VuIGFjY291bnQ6IGAsIGUpO1xuICAgICAgICAgIGRlYnVnTG9nKGAjIG1pbnQ6ICR7bWludH0sIG93bmVyOiAke293bmVyfSwgZmVlUGF5ZXI6ICR7ZmVlUGF5ZXJ9YCk7XG4gICAgICAgIH1cbiAgICAgICAgYXdhaXQgc2xlZXAoUkVUUllfU0xFRVBfVElNRSk7XG4gICAgICAgIGNvdW50ZXIrKztcbiAgICAgIH1cbiAgICAgIHRocm93IEVycm9yKGByZXRyeSBhY3Rpb24gaXMgb3ZlciBsaW1pdCAke1JFVFJZX09WRVJfTElNSVR9YCk7XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIFtNYWluIGxvZ2ljXUdldCBBc3NvY2lhdGVkIHRva2VuIEFjY291bnQuXG4gICAgICogaWYgbm90IGNyZWF0ZWQsIGNyZWF0ZSBuZXcgdG9rZW4gYWNjb3VpbnRcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBtaW50XG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAgICogQHBhcmFtIHtQdWJrZXl9IGZlZVBheWVyXG4gICAgICogQHJldHVybnMgUHJvbWlzZTxzdHJpbmc+XG4gICAgICovXG4gICAgZXhwb3J0IGNvbnN0IG1ha2VPckNyZWF0ZUluc3RydWN0aW9uID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyPzogUHVia2V5LFxuICAgICAgYWxsb3dPd25lck9mZkN1cnZlID0gZmFsc2UsXG4gICAgKTogUHJvbWlzZTx7XG4gICAgICB0b2tlbkFjY291bnQ6IHN0cmluZztcbiAgICAgIGluc3Q6IFRyYW5zYWN0aW9uSW5zdHJ1Y3Rpb24gfCB1bmRlZmluZWQ7XG4gICAgfT4gPT4ge1xuICAgICAgY29uc3QgYXNzb2NpYXRlZFRva2VuQWNjb3VudCA9IGdldEFzc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jKFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSxcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3QsXG4gICAgICAgIH07XG4gICAgICB9XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IEtleXBhaXIgYXMgT3JpZ2luYWwsIFB1YmxpY0tleSB9IGZyb20gJ0Bzb2xhbmEvd2ViMy5qcyc7XG5pbXBvcnQgeyBQdWJrZXksIFNlY3JldCB9IGZyb20gJ34vdHlwZXMvYWNjb3VudCc7XG5pbXBvcnQgYnMgZnJvbSAnYnM1OCc7XG5cbmV4cG9ydCBuYW1l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XRjaCAoa2V5KSB7XG4gICAgICAgICAgY2FzZSAnaW1hZ2UnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5pbWFnZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc0ltYWdlVXJsKG1ldGFkYXRhLmltYWdlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3JveWFsdHknOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5yb3lhbHR5KSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzUm95YWx0eShtZXRhZGF0YS5yb3lhbHR5KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlcl9mZWVfYmFzaXNfcG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJGZWVCYXNpc1BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0Y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gbGV0IGluc3RydWN0aW9uVHJhbnNmZXI7XG5cbiAgICAgICAgICAgICAgICAvLyBmZXRjaCAgdHJhbnNmZXIgdHJhbnNhY3Rpb24gZm9yIHJlbGF0aW9uYWwgbWVtb1xuICAgICAgICAgICAgICAgIHR4TWV0YS50cmFuc2FjdGlvbi5tZXNzYWdlLmluc3RydWN0aW9ucy5mb3JFYWNoKFxuICAgICAgICAgICAgICAgICAgKGluc3RydWN0aW9uKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICBpc1BhcnNlZEluc3RydWN0aW9uKGluc3RydWN0aW9uKSAmJlxuICAgICAgICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuVHJhbnNmZXIucHJvZ3JhbS5pbmNsdWRlcyhcbiAgICAgICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLnByb2dyYW0sXG4gICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyID0gaW5zdHJ1Y3Rpb247XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgKTtcblxuICAgICAgICAgICAgICAgIC8vIHNwbC10b2tlbiBvciBzeXN0ZW1cbiAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyICYmXG4gICAgICAgICAgICAgICAgICBtb2R1bGVOYW1lICE9PSBpbnN0cnVjdGlvblRyYW5zZmVyWydwcm9ncmFtJ11cbiAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgIGRlYnVnTG9nKFxuICAgICAgICAgICAgICAgICAgICAnIyBGaWx0ZXJUeXBlLk1lbW8gYnJlYWsgaW5zdHJ1Y3Rpb246ICcsXG4gICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIsXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgLy8gZmV0Y2ggbWVtbyBvbmx5IHRyYW5zYWN0aW9uXG4gICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5NZW1vLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlcixcbiAgICAgICAgICAgICAgICAgIHBvc3RUb2tlbkFjY291bnQsXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5Pbmx5TWVtbzoge1xuICAgICAgICAgICAgICBpZiAoRmlsdGVyT3B0aW9ucy5NZW1vLnByb2dyYW0uaW5jbHVkZXMoaW5zdHJ1Y3Rpb24ucHJvZ3JhbSkpIHtcbiAgICAgICAgICAgICAgICBsZXQgaW5zdHJ1Y3Rpb25UcmFuc2ZlcjtcblxuICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuTWVtby5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIsXG4gICAgICAgICAgICAgICAgICBwb3N0VG9rZW5BY2NvdW50LFxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXNlIEZpbHRlclR5cGUuTWludDoge1xuICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5NaW50LnByb2dyYW0uaW5jbHVkZXMoaW5zdHJ1Y3Rpb24ucHJvZ3JhbSkgJiZcbiAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLk1pbnQuYWN0aW9uLmluY2x1ZGVzKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24ucGFyc2VkLnR5cGUgYXMgc3RyaW5nLFxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5NaW50LmludG9Vc2VyU2lkZShpbnN0cnVjdGlvbiwgdHhNZXRhKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5UcmFuc2ZlcjpcbiAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgIG1vZHVsZU5hbWUgPT09IGluc3RydWN0aW9uLnByb2dyYW0gJiZcbiAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLlRyYW5zZmVyLmFjdGlvbi5pbmNsdWRlcyhcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLnBhcnNlZC50eXBlIGFzIHN0cmluZyxcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgIGlmIChpbnN0cnVjdGlvbi5wYXJzZWQudHlwZSA9PT0gJ3RyYW5zZmVyQ2hlY2tlZCcpIHtcbiAgICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuVHJhbnNmZXJDaGVja2VkLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgICAgcG9zdFRva2VuQWNjb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9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ25hbWUnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLm5hbWUpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNOYW1lKG1ldGFkYXRhLm5hbWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc3ltYm9sJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5zeW1ib2wpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTeW1ib2wobWV0YWRhdGEuc3ltYm9sKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgICAgIGlmIChyZXMgJiYgcmVzLmlzRXJyKSB7XG4gICAgICAgICAgcmVzdWx0cy5wdXNoKC4uLnJlcy5lcnJvci5kZXRhaWxzKTtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgICBpZiAocmVzdWx0cy5sZW5ndGggPiAwKSB7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPVxuICAgICAgICAgICdDYXVnaHQgaW4gdGhlIHZhbGlkYXRpb24gZXJyb3JzLiBzZWUgaW5mb3JtYXRpb24gZS5nOiBlcnI8VmFsaWRhdG9yRXJyb3I+LmRldGFpbHMnO1xuICAgICAgICB0aHJvdy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lvbi5tZXNzYWdlLmluc3RydWN0aW9ucy5mb3JFYWNoKChpbnN0cnVjdGlvbikgPT4ge1xuICAgICAgICBpZiAoaXNQYXJzZWRJbnN0cnVjdGlvbihpbnN0cnVjdGlvbikpIHtcbiAgICAgICAgICBzd2l0Y2ggKGZpbHRlclR5cGUpIHtcbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5NZW1vOiB7XG4gICAgICAgICAgICAgIGlmIChGaWx0ZXJPcHRpb25zLk1lbW8ucHJvZ3JhbS5pbmNsdWRlcyhpbnN0cnVjdGlvbi5wcm9ncmFtKSkge1xuICAgICAgICAgICAgICAgIGxldCBpbnN0cnVjdGlvblRyYW5zZmVyO1xuXG4gICAgICAgICAgICAgICAgLy8gZmV0Y2ggIHRyYW5zZmVyIHRyYW5zYWN0aW9uIGZvciByZWxhdGlvbmFsIG1lbW9cbiAgICAgICAgICAgICAgICB0eE1ldGEudHJhbnNhY3Rpb24ubWVzc2FnZS5pbnN0cnVjdGlvbnMuZm9yRWFjaChcbiAgICAgICAgICAgICAgICAgIChpbnN0cnVjdGlvbikgPT4ge1xuICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgaXNQYXJzZWRJbnN0cnVjdGlvbihpbnN0cnVjdGlvbikgJiZcbiAgICAgICAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLlRyYW5zZmVyLnByb2dyYW0uaW5jbHVkZXMoXG4gICAgICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbi5wcm9ncmFtLFxuICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlciA9IGluc3RydWN0aW9uO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICk7XG5cbiAgICAgICAgICAgICAgICAvLyBzcGwtdG9rZW4gb3Igc3lzdGVtXG4gICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlciAmJlxuICAgICAgICAgICAgICAgICAgbW9kdWxlTmFtZSAhPT0gaW5zdHJ1Y3Rpb25UcmFuc2ZlclsncHJvZ3JhbSddXG4gICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICBkZWJ1Z0xvZyhcbiAgICAgICAgICAgICAgICAgICAgJyMgRmlsdGVyVHlwZS5NZW1vIGJyZWFrIGluc3RydWN0aW9uOiAnLFxuICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyLFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vIGZldGNoIG1lbW8gb25seSB0cmFuc2FjdGlvblxuICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuTWVtby5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIsXG4gICAgICAgICAgICAgICAgICBwb3N0VG9rZW5BY2NvdW50LFxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXNlIEZpbHRlclR5cGUuT25seU1lbW86IHtcbiAgICAgICAgICAgICAgaWYgKEZpbHRlck9wdGlvbnMuTWVtby5wcm9ncmFtLmluY2x1ZGVzKGluc3RydWN0aW9uLnByb2dyYW0pKSB7XG4gICAgICAgICAgICAgICAgbGV0IGluc3RydWN0aW9uVHJhbnNmZXI7XG5cbiAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLk1lbW8uaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyLFxuICAgICAgICAgICAgICAgICAgcG9zdFRva2VuQWNjb3VudCxcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLk1pbnQ6IHtcbiAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuTWludC5wcm9ncmFtLmluY2x1ZGVzKGluc3RydWN0aW9uLnByb2dyYW0pICYmXG4gICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5NaW50LmFjdGlvbi5pbmNsdWRlcyhcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLnBhcnNlZC50eXBlIGFzIHN0cmluZyxcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuTWludC5pbnRvVXNlclNpZGUoaW5zdHJ1Y3Rpb24sIHR4TWV0YSk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXNlIEZpbHRlclR5cGUuVHJhbnNmZXI6XG4gICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICBtb2R1bGVOYW1lID09PSBpbnN0cnVjdGlvbi5wcm9ncmFtICYmXG4gICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5UcmFuc2Zlci5hY3Rpb24uaW5jbHVkZXMoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbi5wYXJzZWQudHlwZSBhcyBzdHJpbmcsXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICBpZiAoaW5zdHJ1Y3Rpb24ucGFyc2VkLnR5cGUgPT09ICd0cmFuc2ZlckNoZWNrZWQnKSB7XG4gICAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLlRyYW5zZmVyQ2hlY2tlZC5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICAgIHBvc3RUb2tlbkFjY291bnQsXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLlRyYW5zZmVyLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIHJldHVybiBoaXN0b3J5O1xuICAgIH07XG59XG4iLCAiaW1wb3J0IHsgUHVia2V5IH0gZnJvbSAnfi90eXBlcy9hY2NvdW50JztcbmltcG9ydCB7IEZpbmRPcHRpb25zLCBIaXN0b3J5IH0gZnJvbSAnfi90eXBlcy9oaXN0b3J5JztcbmltcG9ydCB7IE9uRXJyLCBPbk9rIH0gZnJvbSAnfi90eXBlcy9zdWl0ZS11dGlscyc7XG5pbXBvcnQgeyBGaWx0ZXJUeXBlLCBNb2R1bGVOYW1lIH0gZnJvbSAnfi90eXBlcy90cmFuc2FjdGlvbi1maWx0ZXInO1xuaW1wb3J0IHsgU2lnbmF0dXJlcywgVHJhbnNhY3Rpb25GaWx0ZXIgfSBmcm9tICd+L3RyYW5zYWN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J1aWxkZXIiLCAiQ29tbW9uIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJUcmFuc2FjdGlvbiIsICJzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uIiwgInNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24iLCAiVHJhbnNhY3Rpb24iLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlRyYW5zYWN0aW9uIiwgInNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24iLCAiVHJhbnNhY3Rpb24iLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlRyYW5zYWN0aW9uIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiYnMiLCAiTWVtbyIsICJUcmFuc2FjdGlvbkluc3RydWN0aW9uIiwgIlNpZ25hdHVyZXMiLCAiVHJhbnNhY3Rpb25GaWx0ZXIiLCAiaW5zdHJ1Y3Rpb24iLCAiQ29udmVydGVyIiwgIk1lbW8iLCAiTWVtbyJdCn0K \ No newline at end of file diff --git a/packages/suite-multisig/dist/index.js b/packages/suite-multisig/dist/index.js index d13cb1fd7..1343866b3 100644 --- a/packages/suite-multisig/dist/index.js +++ b/packages/suite-multisig/dist/index.js @@ -37,7 +37,7 @@ module.exports = __toCommonJS(src_exports); // src/create.ts var import_web310 = require("@solana/web3.js"); var import_buffer_layout = require("@solana/buffer-layout"); -var import_spl_token2 = require("@solana/spl-token"); +var import_spl_token = require("@solana/spl-token"); // ../suite-utils/src/constants.ts var import_web3 = require("@solana/web3.js"); @@ -484,14 +484,11 @@ var TransactionBuilder5; // ../global/src/index.ts var import_web39 = require("@solana/web3.js"); -// ../account/src/associated.ts -var import_spl_token = require("@solana/spl-token"); - // ../account/src/keypair.ts var import_web37 = require("@solana/web3.js"); var import_bs58 = __toESM(require("bs58")); var Account; -((Account5) => { +((Account4) => { class Keypair5 { secret; pubkey; @@ -527,111 +524,16 @@ var Account; }); }; } - Account5.Keypair = Keypair5; + Account4.Keypair = Keypair5; })(Account || (Account = {})); -// ../account/src/associated.ts -var Account2; -((Account5) => { - let Associated; - ((Associated2) => { - const RETRY_OVER_LIMIT = 10; - const RETRY_SLEEP_TIME = 3; - const get = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const res = await (0, Associated2.makeOrCreateInstruction)( - mint, - owner, - new Account.Keypair({ secret: feePayer }).pubkey, - allowOwnerOffCurve - ); - if (!res.inst) { - return res.tokenAccount; - } - return new TransactionBuilder6.Common( - [res.inst], - [], - feePayer.toKeypair(), - res.tokenAccount - ); - }; - Associated2.retryGetOrCreate = async (mint, owner, feePayer) => { - let counter = 1; - while (counter < RETRY_OVER_LIMIT) { - try { - const inst = await get(mint, owner, feePayer, true); - if (inst && typeof inst === "string") { - debugLog("# associatedTokenAccount: ", inst); - return inst; - } else if (inst instanceof TransactionBuilder6.Common) { - (await inst.submit()).map( - async (ok) => { - await Node.confirmedSig(ok); - return inst.data; - }, - (err) => { - debugLog("# Error submit retryGetOrCreate: ", err); - throw err; - } - ); - } - } catch (e) { - debugLog(`# retry: ${counter} create token account: `, e); - debugLog(`# mint: ${mint}, owner: ${owner}, feePayer: ${feePayer}`); - } - await sleep(RETRY_SLEEP_TIME); - counter++; - } - throw Error(`retry action is over limit ${RETRY_OVER_LIMIT}`); - }; - Associated2.makeOrCreateInstruction = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const associatedTokenAccount = (0, import_spl_token.getAssociatedTokenAddressSync)( - mint.toPublicKey(), - owner.toPublicKey(), - allowOwnerOffCurve, - import_spl_token.TOKEN_PROGRAM_ID, - import_spl_token.ASSOCIATED_TOKEN_PROGRAM_ID - ); - debugLog("# associatedTokenAccount: ", associatedTokenAccount.toString()); - try { - await (0, import_spl_token.getAccount)( - Node.getConnection(), - associatedTokenAccount, - Node.getConnection().commitment, - import_spl_token.TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst: void 0 - }; - } catch (error) { - if (!(error instanceof import_spl_token.TokenAccountNotFoundError) && !(error instanceof import_spl_token.TokenInvalidAccountOwnerError)) { - throw Error("Unexpected error"); - } - const payer = !feePayer ? owner : feePayer; - const inst = (0, import_spl_token.createAssociatedTokenAccountInstruction)( - payer.toPublicKey(), - associatedTokenAccount, - owner.toPublicKey(), - mint.toPublicKey(), - import_spl_token.TOKEN_PROGRAM_ID, - import_spl_token.ASSOCIATED_TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst - }; - } - }; - })(Associated = Account5.Associated || (Account5.Associated = {})); -})(Account2 || (Account2 = {})); - // ../account/src/pda.ts var import_web38 = require("@solana/web3.js"); var import_mpl_token_metadata = require("@metaplex-foundation/mpl-token-metadata"); var import_mpl_bubblegum = require("@metaplex-foundation/mpl-bubblegum"); var import_bn = __toESM(require("bn.js")); -var Account3; -((Account5) => { +var Account2; +((Account4) => { let Pda; ((Pda2) => { Pda2.getMetadata = (address) => { @@ -683,14 +585,13 @@ var Account3; ); return assetId.toString(); }; - })(Pda = Account5.Pda || (Account5.Pda = {})); -})(Account3 || (Account3 = {})); + })(Pda = Account4.Pda || (Account4.Pda = {})); +})(Account2 || (Account2 = {})); // ../account/src/index.ts -var Account4 = { - ...Account2, +var Account3 = { ...Account, - ...Account3 + ...Account2 }; // ../global/src/index.ts @@ -721,7 +622,7 @@ String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, op } return url; } - if (Account4.Keypair.isPubkey(addressOrSignature)) { + if (Account3.Keypair.isPubkey(addressOrSignature)) { if (explorer === "solanafm" /* SolanaFM */) { url = `${Constants.EXPLORER_SOLANAFM_URL}/address/${addressOrSignature}?cluster=${cluster}`; } else if (explorer === "xray" /* Xray */) { @@ -741,13 +642,13 @@ String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, op return url; }; String.prototype.toPublicKey = function() { - if (!Account4.Keypair.isPubkey(this.toString())) { + if (!Account3.Keypair.isPubkey(this.toString())) { throw Error(`No match KeyPair.PubKey: ${this.toString()}`); } return new import_web39.PublicKey(this.toString()); }; String.prototype.toKeypair = function() { - if (!Account4.Keypair.isSecret(this.toString())) { + if (!Account3.Keypair.isSecret(this.toString())) { throw Error(`No match KeyPair.Secret: ${this.toString()}`); } const decoded = import_bs582.default.decode(this.toString()); @@ -783,9 +684,6 @@ var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { console.log("[DEBUG]", data1, data2, data3, data4); } }; -var sleep = async (sec) => { - return new Promise((r) => setTimeout(r, sec * 1e3)); -}; var isPromise = (obj) => { return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; }; @@ -1587,7 +1485,7 @@ var MultisigInstruction; newAccountPubkey: newAccount.publicKey, lamports: balanceNeeded, space: MultisigInstruction2.Layout.span, - programId: import_spl_token2.TOKEN_PROGRAM_ID + programId: import_spl_token.TOKEN_PROGRAM_ID }); }; MultisigInstruction2.multisig = (m, feePayer, signerPubkey) => { @@ -1624,14 +1522,14 @@ var MultisigInstruction; ); return new import_web310.TransactionInstruction({ keys, - programId: import_spl_token2.TOKEN_PROGRAM_ID, + programId: import_spl_token.TOKEN_PROGRAM_ID, data }); }; })(MultisigInstruction || (MultisigInstruction = {})); // src/get-info.ts -var import_spl_token3 = require("@solana/spl-token"); +var import_spl_token2 = require("@solana/spl-token"); var import_web311 = require("@solana/web3.js"); var Multisig2; ((Multisig5) => { @@ -1643,7 +1541,7 @@ var Multisig2; if (info === null) { throw Error("Failed to find multisig"); } - if (!info.owner.equals(import_spl_token3.TOKEN_PROGRAM_ID)) { + if (!info.owner.equals(import_spl_token2.TOKEN_PROGRAM_ID)) { throw Error("Invalid multisig owner"); } if (info.data.length !== MultisigInstruction.Layout.span) { @@ -1687,4 +1585,4 @@ var Multisig4 = { ...Multisig, ...Multisig2, ...Multisig3 }; 0 && (module.exports = { Multisig }); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4L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FzeW5jICgpID0+IHtcbiAgICAgIGlmIChtID4gc2lnbmVyUHVia2V5cy5sZW5ndGgpIHtcbiAgICAgICAgdGhyb3cgRXJyb3IoJ3NpZ25lcnMgbnVtYmVyIGxlc3MgdGhhbiBtIG51bWJlcicpO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBhY2NvdW50ID0gS2V5cGFpci5nZW5lcmF0ZSgpO1xuICAgICAgY29uc3QgY29ubmVjdGlvbiA9IE5vZGUuZ2V0Q29ubmVjdGlvbigpO1xuICAgICAgY29uc3QgYmFsYW5jZU5lZWRlZCA9IGF3YWl0IGNvbm5lY3Rpb24uZ2V0TWluaW11bUJhbGFuY2VGb3JSZW50RXhlbXB0aW9uKFxuICAgICAgICBNdWx0aXNpZ0luc3RydWN0aW9uLkxheW91dC5zcGFuLFxuICAgICAgKTtcblxuICAgICAgY29uc3QgaW5zdDEgPSBNdWx0aXNpZ0luc3RydWN0aW9uLmFjY291bnQoXG4gICAgICAgIGFjY291bnQsXG4gICAgICAgIGZlZVBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICBiYWxhbmNlTmVlZGVkLFxuICAgICAgKTtcblxuICAgICAgY29uc3QgaW5zdDIgPSBNdWx0aXNpZ0luc3RydWN0aW9uLm11bHRpc2lnKFxuICAgICAgICBtLFxuICAgICAgICBhY2NvdW50LFxuICAgICAgICBzaWduZXJQdWJrZXlzLm1hcCgocHVia2V5OiBQdWJrZXkpID0+IHB1YmtleS50b1B1YmxpY0tleSgpKSxcbiAgICAgICk7XG5cbiAgICAgIHJldHVybiBuZXcgVHJhbnNhY3Rpb25CdWlsZGVyLkNvbW1vbjxQdWJrZXk+KFxuICAgICAgICBbaW5zdDEsIGluc3QyXSxcbiAgICAgICAgW2FjY291bnRdLFxuICAgICAgICBmZWVQYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgYWNjb3VudC5wdWJsaWNLZXkudG9TdHJpbmcoKSxcbiAgICAgICk7XG4gICAgfSk7XG4gIH07XG59XG5cbm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zYWN0aW9uQnVpbGRlci5Db21tb24pIHtcbiAgICAgICAgICAgIChhd2FpdCBpbnN0LnN1Ym1pdCgpKS5tYXAoXG4gICAgICAgICAgICAgIGFzeW5jIChvazogc3RyaW5nKSA9PiB7XG4gICAgICAgICAgICAgICAgYXdhaXQgTm9kZS5jb25maXJtZWRTaWcob2spO1xuICAgICAgICAgICAgICAgIHJldHVybiBpbnN0LmRhdGE7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIChlcnI6IEVycm9yKSA9PiB7XG4gICAgICAgICAgICAgICAgZGVidWdMb2coJyMgRXJyb3Igc3VibWl0IHJldHJ5R2V0T3JDcmVhdGU6ICcsIGVycik7XG4gICAgICAgICAgICAgICAgdGhyb3cgZXJyO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICBkZWJ1Z0xvZyhgIyByZXRyeTogJHtjb3VudGVyfSBjcmVhdGUgdG9rZW4gYWNjb3VudDogYCwgZSk7XG4gICAgICAgICAgZGVidWdMb2coYCMgbWludDogJHttaW50fSwgb3duZXI6ICR7b3duZXJ9LCBmZWVQYXllcjogJHtmZWVQYXllcn1gKTtcbiAgICAgICAgfVxuICAgICAgICBhd2FpdCBzbGVlcChSRVRSWV9TTEVFUF9USU1FKTtcbiAgICAgICAgY291bnRlcisrO1xuICAgICAgfVxuICAgICAgdGhyb3cgRXJyb3IoYHJldHJ5IGFjdGlvbiBpcyBvdmVyIGxpbWl0ICR7UkVUUllfT1ZFUl9MSU1JVH1gKTtcbiAgICB9O1xuXG4gICAgLyoqXG4gICAgICogW01haW4gbG9naWNdR2V0IEFzc29jaWF0ZWQgdG9rZW4gQWNjb3VudC5cbiAgICAgKiBpZiBub3QgY3JlYXRlZCwgY3JlYXRlIG5ldyB0b2tlbiBhY2NvdWludFxuICAgICAqXG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG1pbnRc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AgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLmNvbW1pdG1lbnQsXG4gICAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICB0b2tlbkFjY291bnQ6IGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSxcbiAgICAgICAgICBpbnN0OiB1bmRlZmluZWQsXG4gICAgICAgIH07XG4gICAgICB9IGNhdGNoIChlcnJvcjogdW5rbm93bikge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuQWNjb3VudE5vdEZvdW5kRXJyb3IpICYmXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuSW52YWxpZEFjY291bnRPd25lckVycm9yKVxuICAgICAgICApIHtcbiAgICAgICAgICB0aHJvdyBFcnJvcignVW5leHBlY3RlZCBlcnJvcicpO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgcGF5ZXIgPSAhZmVlUGF5ZXIgPyBvd25lciA6IGZlZVBheWVyO1xuXG4gICAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVBc3NvY2lhdGVkVG9rZW5BY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgcGF5ZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5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HVuZGVmaW5lZCxcbiAgICApOiBPcHRpb248SW50ZXJuYWxDb2xsZWN0aW9uPiA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBudWxsO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4ge1xuICAgICAgICBrZXk6IGlucHV0LnRvUHVibGljS2V5KCksXG4gICAgICAgIHZlcmlmaWVkOiBmYWxzZSxcbiAgICAgIH07XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlciA9IChcbiAgICAgIG91dHB1dDogT3B0aW9uPEludGVybmFsQ29sbGVjdGlvbj4sXG4gICAgKTogQ29sbGVjdGlvblR5cGUgfCB1bmRlZmluZWQgPT4ge1xuICAgICAgaWYgKCFvdXRwdXQpIHtcbiAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIHtcbiAgICAgICAgYWRkcmVzczogb3V0cHV0LmtleS50b1N0cmluZygpLFxuICAgICAgICB2ZXJpZmllZDogb3V0cHV0LnZlcmlmaWVkLFxuICAgICAgfTtcbiAgICB9O1xuICB9XG5cbiAgZXhwb3J0IG5hbWVzcGFjZSBDb2xsZWN0aW9uTWludCB7XG4gICAgZXhwb3J0IGNvbnN0IGludG9Vc2VyID0gKG91dHB1dDogR3JvdXBpbmdbXSk6IFB1YmtleSA9PiB7XG4gICAgICBjb25zdCByZXMgPSBvdXRwdXQuZmluZCgodmFsdWUpID0+IHtcbiAgICAgICAgaWYgKHZhbHVlLmdyb3VwX2tleSA9PT0gJ2NvbGxlY3Rpb24nKSB7XG4gICAgICAgICAgcmV0dXJuIHZhbHVlLmdyb3VwX3ZhbHVlO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIHJldHVybiByZXMgPyByZXMuZ3JvdXBfdmFsdWUgOiAnJztcbiAgICB9O1xuICB9XG59XG4iLCAiLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L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6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ25hbWUnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLm5hbWUpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNOYW1lKG1ldGFkYXRhLm5hbWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc3ltYm9sJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5zeW1ib2wpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTeW1ib2wobWV0YWRhdGEuc3ltYm9sKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgICAgIGlmIChyZXMgJiYgcmVzLmlzRXJyKSB7XG4gICAgICAgICAgcmVzdWx0cy5wdXNoKC4uLnJlcy5lcnJvci5kZXRhaWxzKTtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgICBpZiAocmVzdWx0cy5sZW5ndGggPiAwKSB7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPVxuICAgICAgICAgICdDYXVnaHQgaW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hZGF0YSIsICJDb252ZXJ0ZXIiLCAiUHJvcGVydGllcyIsICJDb252ZXJ0ZXIiLCAiVXNlcyIsICJDb252ZXJ0ZXIiLCAiVG9rZW5NZXRhZGF0YSIsICJDb252ZXJ0ZXIiLCAiVHJhbnNmZXJDaGVja2VkIiwgIkNvbnZlcnRlciIsICJUcmFuc2ZlciIsICJDb252ZXJ0ZXIiLCAiVmFsaWRhdG9yIiwgIk1lc3NhZ2UiLCAiQ29udmVydGVyIiwgIk11bHRpc2lnIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJNdWx0aXNpZ0luc3RydWN0aW9uIiwgImltcG9ydF9zcGxfdG9rZW4iLCAiaW1wb3J0X3dlYjMiLCAiTXVsdGlzaWciLCAiTXVsdGlzaWciLCAiTXVsdGlzaWciXQp9Cg== \ No newline at end of file +//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uL3NyYy9jcmVhdGUudHMiLCAiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9iYXRjaC50cyIsICIuLi8uLi9ub2RlL3NyYy9pbmRleC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jb21tb24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvbWludC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9wYXJ0aWFsLXNpZ24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY2FsY3VsYXRlLXR4c2l6ZS50cyIsICIuLi8uLi9nbG9iYWwvc3JjL2luZGV4LnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2tleXBhaXIudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvcGRhLnRzIiwgIi4uLy4uL2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qgc3dpdGNoQnVuZGxyID0gKGVudjogc3RyaW5nKTogc3RyaW5nID0+IHtcbiAgICBzd2l0Y2ggKGVudikge1xuICAgICAgY2FzZSBDb25zdGFudHMuQ2x1c3Rlci5wcmQ6IHtcbiAgICAgICAgY29uc3QgdXJscyA9IENvbnN0YW50cy5CdW5kbHJVcmwucHJkLnNwbGl0KCcsJyk7XG4gICAgICAgIGNvbnN0IGluZGV4ID0gRGF0ZS5ub3coKSAlIHVybHMubGVuZ3RoO1xuICAgICAgICByZXR1cm4gdXJsc1tpbmRleF07XG4gICAgICB9XG4gICAgICBkZWZhdWx0OiB7XG4gICAgICAgIHJldHVybiBDb25zdGFudHMuQnVuZGxyVXJsLmRldjtcbiAgICAgIH1cbiAgICB9XG4gIH07XG5cbiAgZXhwb3J0IGNvbnN0IHN3aXRjaERhc0FwaSA9IChlbnY6IHN0cmluZyk6IHN0cmluZyA9PiB7XG4gICAgc3dpdGNoIChlbnYpIHtcbiAgICAgIGNhc2UgQ29uc3RhbnRzLkNsdXN0ZXIucHJkOiB7XG4gICAgICAgIGlmIChkYXNBcGlVcmwubGVuZ3RoIDwgMSkge1xuICAgICAgICAgIHRocm93IEVycm9yKENvbnN0YW50cy5XYXJubmluZ01lc3NhZ2UuREFTX0FQSV9VUkwpO1xuICAgICAgICB9XG4gICAgICAgIGNvbnN0IHVybHMgPSBDb25zdGFudHMuQnVuZGxyVXJsLnByZC5zcGxpdCgnLCcpO1xuICAgICAgICBjb25zdCBpbmRleCA9IERhdGUubm93KCkgJSB1cmxzLmxlbmd0aDtcbiAgICAgICAgcmV0dXJuIHVybHNbaW5kZXhdO1xuICAgICAgfVxuICAgICAgZGVmYXVsdDoge1xuICAgICAgICBjb25zdCB1cmxzID0gQ29uc3RhbnRzLkRhc0FwaVVybC5kZXYuc3BsaXQoJywnKTtcbiAgICAgICAgY29uc3QgaW5kZXggPSBEYXRlLm5vdygpICUgdXJscy5sZW5ndGg7XG4gICAgICAgIHJldHVybiB1cmxzW2lu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IHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvQ29tcHJlc3NlZE5mdEluZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IEludGVybmFsQ3JlYXRvcnNbXSA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBbXTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBpbnB1dCEubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlciA9IChcbiAgICAgIG91dHB1dDogT3B0aW9uPEludGVybmFsQ3JlYXRvcnNbXT4sXG4gICAgKTogQ3JlYXRvcnNbXSB8IHVuZGVmaW5lZCA9PiB7XG4gICAgICBpZiAoIW91dHB1dCkge1xuICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gb3V0cHV0Lm1hcCgoZGF0YSkgPT4ge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIGFkZHJlc3M6IGRhdGEuYWRkcmVzcy50b1N0cmluZygpLFxuICAgICAgICAgIHNoYXJlOiBkYXRhLnNoYXJlLFxuICAgICAgICAgIHZlcmlmaWVkOiBkYXRhLnZl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ZmVlUGF5ZXI/OiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxQcm9wZXJ0aWVzPiA9PiB7XG4gICAgICBpZiAoIWlucHV0IHx8ICFpbnB1dC5maWxlcykge1xuICAgICAgICByZXR1cm4ge307XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGZpbGVzID0gYXdhaXQgUHJvbWlzZS5hbGwoXG4gICAgICAgIGlucHV0LmZpbGVzLm1hcChhc3luYyAoZmlsZSkgPT4ge1xuICAgICAgICAgIGlmICghZmlsZS5maWxlUGF0aCkge1xuICAgICAgICAgICAgcmV0dXJuIHt9O1xuICAgICAgICAgIH1cbiAgICAgICAgICBjb25zdCByZXMgPSBhd2FpdCBjYWxsYmFja0Z1bmMoZmlsZS5maWxlUGF0aCwgc3RvcmFnZVR5cGUsIGZlZVBheWVyKTtcbiAgICAgICAgICBpZiAocmVzLmlzRXJyKSB7XG4gICAgICAgICAgICB0aHJvdyBFcnJvcihyZXMuZXJyb3IubWVzc2FnZSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBvdmVyd3JpdGVPYmplY3QoZmlsZSwgW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBleGlzdHNLZXk6ICdmaWxlUGF0aCcsXG4gICAgICAgICAgICAgIHdpbGw6IHsga2V5OiAndXJpJywgdmFsdWU6IHJlcy52YWx1ZSB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICBdKTtcbiAgICAgICAgfSksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHsgLi4uaW5wdXQsIGZpbGVzIH0gYXMgUHJvcGVydGllcztcbiAgICB9O1xuICB9XG59XG4iLCAiLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLXVudXNlZC12YXJzICovXG5pbXBvcnQgeyBPcHRpb24sIFVzZXMgfSBmcm9tICd+L3R5cGVzL3JlZ3VsYXItbmZ0JztcblxuZXhwb3J0IG5hbWVzcGFjZSBDb252ZXJ0ZXI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m95YWx0eSwge1xuICAgICAgICAgIHRocmVzaG9sZDogUk9ZQUxUWV9NSU4sXG4gICAgICAgICAgY29uZGl0aW9uOiAndW5kZXJNaW4nLFxuICAgICAgICB9KTtcbiAgICAgIH0gZWxzZSBpZiAocm95YWx0eSA+IFJPWUFMVFlfTUFYKSB7XG4gICAgICAgIHRocm93IGNyZWF0ZUVycm9yKGtleSwgTWVzc2FnZS5CSUdfTlVNQkVSLCByb3lhbHR5LCB7XG4gICAgICAgICAgdGhyZXNob2xkOiBST1lBTFRZX01BWCxcbiAgICAgICAgICBjb25kaXRpb246ICdvdmVyTWF4JyxcbiAgICAgICAgfSk7XG4gICAgICB9XG4gICAgICByZXR1cm4gTWVzc2FnZS5TVUNDRVNTO1xuICAgIH0pO1xuICB9O1xuXG4gIGV4cG9ydCBjb25zdCBpc1NlbGxlckZlZUJhc2lzUG9pbnRzID0gKFxuICAgIHJveWFsdHk6IG51bWJlcixcbiAgKTogUmVzdWx0PHN0cmluZywgVmFsaWRhdG9yRXJyb3I+ID0+IHtcbiAgICByZXR1cm4gVHJ5KCgpID0+IHtcbiAgICAgIGNvbnN0IGtleSA9ICdzZWxsZXJGZWVCYXNpc1BvaW50cy9zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyc7XG4gICAgICBpZiAocm95YWx0eSAhPT0gMCAmJiAhcm95YWx0eSkge1xuICAgICAgICB0aHJvdyBjcmVhdGVFcnJvcihrZXksIE1lc3NhZ2UuRU1QVFksIHJveWFsdHkpO1xuICAgICAgfVxuICAgICAgaWYgKHJveWFsdHkgPCBST1lBTFRZX01JTikge1xuICAgICAgICB0aHJvdyBjcmVhdGVFcnJvcihrZXksIE1lc3NhZ2UuU01BTExfTlVNQkVSLCByb3lhbHR5LCB7XG4gICAgICAgICAgdGhyZXNob2xkOiBST1lBTFRZX01JTixcbiAgICAgICAgICBjb25kaXRpb246ICd1bmRlck1pbicsXG4gICAgICAgIH0pO1xuICAgICAgfSBlbHNlIGlmIChyb3lhbHR5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lkYXRvckVycm9yPjtcbiAgICAgICAgc3dpdGNoIChrZXkpIHtcbiAgICAgICAgICBjYXNlICdpbWFnZSc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLmltYWdlKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzSW1hZ2VVcmwobWV0YWRhdGEuaW1hZ2UpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAncm95YWx0eSc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnJveWFsdHkpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNSb3lhbHR5KG1ldGFkYXRhLnJveWFsdHkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICA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aWRhdG9yIiwgIk1lc3NhZ2UiLCAiQ29udmVydGVyIiwgIk11bHRpc2lnIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJNdWx0aXNpZ0luc3RydWN0aW9uIiwgImltcG9ydF9zcGxfdG9rZW4iLCAiaW1wb3J0X3dlYjMiLCAiTXVsdGlzaWciLCAiTXVsdGlzaWciLCAiTXVsdGlzaWciXQp9Cg== \ No newline at end of file diff --git a/packages/suite-multisig/dist/index.mjs b/packages/suite-multisig/dist/index.mjs index ff1ed2baf..0fdc0a4d0 100644 --- a/packages/suite-multisig/dist/index.mjs +++ b/packages/suite-multisig/dist/index.mjs @@ -6,7 +6,7 @@ import { TransactionInstruction as TransactionInstruction3 } from "@solana/web3.js"; import { blob, struct, u8 } from "@solana/buffer-layout"; -import { TOKEN_PROGRAM_ID as TOKEN_PROGRAM_ID2 } from "@solana/spl-token"; +import { TOKEN_PROGRAM_ID } from "@solana/spl-token"; // ../suite-utils/src/constants.ts import { PublicKey } from "@solana/web3.js"; @@ -464,22 +464,11 @@ var TransactionBuilder5; // ../global/src/index.ts import { Keypair as Keypair3, LAMPORTS_PER_SOL, PublicKey as PublicKey4 } from "@solana/web3.js"; -// ../account/src/associated.ts -import { - ASSOCIATED_TOKEN_PROGRAM_ID, - createAssociatedTokenAccountInstruction, - getAccount, - getAssociatedTokenAddressSync, - TOKEN_PROGRAM_ID, - TokenAccountNotFoundError, - TokenInvalidAccountOwnerError -} from "@solana/spl-token"; - // ../account/src/keypair.ts import { Keypair as Original, PublicKey as PublicKey2 } from "@solana/web3.js"; import bs from "bs58"; var Account; -((Account5) => { +((Account4) => { class Keypair5 { secret; pubkey; @@ -515,111 +504,16 @@ var Account; }); }; } - Account5.Keypair = Keypair5; + Account4.Keypair = Keypair5; })(Account || (Account = {})); -// ../account/src/associated.ts -var Account2; -((Account5) => { - let Associated; - ((Associated2) => { - const RETRY_OVER_LIMIT = 10; - const RETRY_SLEEP_TIME = 3; - const get = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const res = await (0, Associated2.makeOrCreateInstruction)( - mint, - owner, - new Account.Keypair({ secret: feePayer }).pubkey, - allowOwnerOffCurve - ); - if (!res.inst) { - return res.tokenAccount; - } - return new TransactionBuilder6.Common( - [res.inst], - [], - feePayer.toKeypair(), - res.tokenAccount - ); - }; - Associated2.retryGetOrCreate = async (mint, owner, feePayer) => { - let counter = 1; - while (counter < RETRY_OVER_LIMIT) { - try { - const inst = await get(mint, owner, feePayer, true); - if (inst && typeof inst === "string") { - debugLog("# associatedTokenAccount: ", inst); - return inst; - } else if (inst instanceof TransactionBuilder6.Common) { - (await inst.submit()).map( - async (ok) => { - await Node.confirmedSig(ok); - return inst.data; - }, - (err) => { - debugLog("# Error submit retryGetOrCreate: ", err); - throw err; - } - ); - } - } catch (e) { - debugLog(`# retry: ${counter} create token account: `, e); - debugLog(`# mint: ${mint}, owner: ${owner}, feePayer: ${feePayer}`); - } - await sleep(RETRY_SLEEP_TIME); - counter++; - } - throw Error(`retry action is over limit ${RETRY_OVER_LIMIT}`); - }; - Associated2.makeOrCreateInstruction = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const associatedTokenAccount = getAssociatedTokenAddressSync( - mint.toPublicKey(), - owner.toPublicKey(), - allowOwnerOffCurve, - TOKEN_PROGRAM_ID, - ASSOCIATED_TOKEN_PROGRAM_ID - ); - debugLog("# associatedTokenAccount: ", associatedTokenAccount.toString()); - try { - await getAccount( - Node.getConnection(), - associatedTokenAccount, - Node.getConnection().commitment, - TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst: void 0 - }; - } catch (error) { - if (!(error instanceof TokenAccountNotFoundError) && !(error instanceof TokenInvalidAccountOwnerError)) { - throw Error("Unexpected error"); - } - const payer = !feePayer ? owner : feePayer; - const inst = createAssociatedTokenAccountInstruction( - payer.toPublicKey(), - associatedTokenAccount, - owner.toPublicKey(), - mint.toPublicKey(), - TOKEN_PROGRAM_ID, - ASSOCIATED_TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst - }; - } - }; - })(Associated = Account5.Associated || (Account5.Associated = {})); -})(Account2 || (Account2 = {})); - // ../account/src/pda.ts import { PublicKey as PublicKey3 } from "@solana/web3.js"; import { PROGRAM_ID } from "@metaplex-foundation/mpl-token-metadata"; import { MPL_BUBBLEGUM_PROGRAM_ID } from "@metaplex-foundation/mpl-bubblegum"; import BN from "bn.js"; -var Account3; -((Account5) => { +var Account2; +((Account4) => { let Pda; ((Pda2) => { Pda2.getMetadata = (address) => { @@ -671,14 +565,13 @@ var Account3; ); return assetId.toString(); }; - })(Pda = Account5.Pda || (Account5.Pda = {})); -})(Account3 || (Account3 = {})); + })(Pda = Account4.Pda || (Account4.Pda = {})); +})(Account2 || (Account2 = {})); // ../account/src/index.ts -var Account4 = { - ...Account2, +var Account3 = { ...Account, - ...Account3 + ...Account2 }; // ../global/src/index.ts @@ -709,7 +602,7 @@ String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, op } return url; } - if (Account4.Keypair.isPubkey(addressOrSignature)) { + if (Account3.Keypair.isPubkey(addressOrSignature)) { if (explorer === "solanafm" /* SolanaFM */) { url = `${Constants.EXPLORER_SOLANAFM_URL}/address/${addressOrSignature}?cluster=${cluster}`; } else if (explorer === "xray" /* Xray */) { @@ -729,13 +622,13 @@ String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, op return url; }; String.prototype.toPublicKey = function() { - if (!Account4.Keypair.isPubkey(this.toString())) { + if (!Account3.Keypair.isPubkey(this.toString())) { throw Error(`No match KeyPair.PubKey: ${this.toString()}`); } return new PublicKey4(this.toString()); }; String.prototype.toKeypair = function() { - if (!Account4.Keypair.isSecret(this.toString())) { + if (!Account3.Keypair.isSecret(this.toString())) { throw Error(`No match KeyPair.Secret: ${this.toString()}`); } const decoded = bs2.decode(this.toString()); @@ -771,9 +664,6 @@ var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { console.log("[DEBUG]", data1, data2, data3, data4); } }; -var sleep = async (sec) => { - return new Promise((r) => setTimeout(r, sec * 1e3)); -}; var isPromise = (obj) => { return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; }; @@ -1578,7 +1468,7 @@ var MultisigInstruction; newAccountPubkey: newAccount.publicKey, lamports: balanceNeeded, space: MultisigInstruction2.Layout.span, - programId: TOKEN_PROGRAM_ID2 + programId: TOKEN_PROGRAM_ID }); }; MultisigInstruction2.multisig = (m, feePayer, signerPubkey) => { @@ -1615,14 +1505,14 @@ var MultisigInstruction; ); return new TransactionInstruction3({ keys, - programId: TOKEN_PROGRAM_ID2, + programId: TOKEN_PROGRAM_ID, data }); }; })(MultisigInstruction || (MultisigInstruction = {})); // src/get-info.ts -import { TOKEN_PROGRAM_ID as TOKEN_PROGRAM_ID3 } from "@solana/spl-token"; +import { TOKEN_PROGRAM_ID as TOKEN_PROGRAM_ID2 } from "@solana/spl-token"; import { PublicKey as PublicKey6 } from "@solana/web3.js"; var Multisig2; ((Multisig5) => { @@ -1634,7 +1524,7 @@ var Multisig2; if (info === null) { throw Error("Failed to find multisig"); } - if (!info.owner.equals(TOKEN_PROGRAM_ID3)) { + if (!info.owner.equals(TOKEN_PROGRAM_ID2)) { throw Error("Invalid multisig owner"); } if (info.data.length !== MultisigInstruction.Layout.span) { @@ -1677,4 +1567,4 @@ var Multisig4 = { ...Multisig, ...Multisig2, ...Multisig3 }; export { Multisig4 as Multisig }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2NyZWF0ZS50cyIsICIuLi8uLi9zdWl0ZS11dGlscy9zcmMvY29uc3RhbnRzLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2JhdGNoLnRzIiwgIi4uLy4uL25vZGUvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2NvbW1vbi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G9pbnRVcmwubG9jYWxob3N0O1xuICAgIH1cbiAgfTtcblxuICBleHBvcnQgY29uc3Qgc3dpdGNoQnVuZGxyID0gKGVudjogc3RyaW5nKTogc3RyaW5nID0+IHtcbiAgICBzd2l0Y2ggKGVudikge1xuICAgICAgY2FzZSBDb25zdGFudHMuQ2x1c3Rlci5wcmQ6IHtcbiAgICAgICAgY29uc3QgdXJscyA9IENvbnN0YW50cy5CdW5kbHJVcmwucHJkLnNwbGl0KCcsJyk7XG4gICAgICAgIGNvbnN0IGluZGV4ID0gRGF0ZS5ub3coKSAlIHVybHMubGVuZ3RoO1xuICAgICAgICByZXR1cm4gdXJsc1tpbmRleF07XG4gICAgICB9XG4gICAgICBkZWZhdWx0OiB7XG4gICAgICAgIHJldHVybiBDb25zdGFudHMuQnVuZGxyVXJsLmRldjtcbiAgICAgIH1cbiAgICB9XG4gIH07XG5cbiAgZXhwb3J0IGNvbnN0IHN3aXRjaERhc0FwaSA9IChlbnY6IHN0cmluZyk6IHN0cmluZyA9PiB7XG4gICAgc3dpdGNoIChlbnYpIHtcbiAgICAgIGNhc2UgQ29uc3RhbnRzLkNsdXN0ZXIucHJkOiB7XG4gICAgICAgIGlmIChkYXNBcGlVcmwubGVuZ3RoIDwgMSkge1xuICAgICAgICAgIHRocm93IEVycm9yKENvbnN0YW50cy5XYXJubmluZ01lc3NhZ2UuREFTX0FQSV9VUkwpO1xuICAgICAgICB9XG4gICAgICAgIGNvbnN0IHVybHMgPSBDb25zdGFudHMuQnVuZGxyVXJsLnByZC5zcGxpdCgnLCcpO1xuICAgICAgICBjb25zdCBpbmRleCA9IERhdGUubm93KCkgJSB1cmxzLmxlbmd0aDtcbiAgICAgICAgcmV0dXJuIHVybHNbaW5kZXhdO1xuICAgICAgfVxuICAgICAgZGVmYXVsdDoge1xuICAgICAgICBjb25zdCB1cmxzID0gQ29uc3RhbnRzLkRhc0FwaVVybC5kZXYuc3BsaXQoJywnKTtcbiAgICAgICAgY29uc3QgaW5kZXggP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ICAgIGZlZVBheWVyOiBTZWNyZXQsXG4gICAgICBhbGxvd093bmVyT2ZmQ3VydmUgPSBmYWxzZSxcbiAgICApOiBQcm9taXNlPHN0cmluZyB8IENvbW1vblN0cnVjdHVyZTxQdWJrZXk+PiA9PiB7XG4gICAgICBjb25zdCByZXMgPSBhd2FpdCBtYWtlT3JDcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIG5ldyBLZXlwYWlyLktleXBhaXIoeyBzZWNyZXQ6IGZlZVBheWVyIH0pLnB1YmtleSxcbiAgICAgICAgYWxsb3dPd25lck9mZkN1cnZlLFxuICAgICAgKTtcblxuICAgICAgaWYgKCFyZXMuaW5zdCkge1xuICAgICAgICByZXR1cm4gcmVzLnRva2VuQWNjb3VudDtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uPFB1YmtleT4oXG4gICAgICAgIFtyZXMuaW5zdF0sXG4gICAgICAgIFtdLFxuICAgICAgICBmZWVQYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgcmVzLnRva2VuQWNjb3VudCEsXG4gICAgICApO1xuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiBSZXRyeSBmdW5jdGlvbiBpZiBjcmVhdGUgbmV3IHRva2VuIGFjY291aW50XG4gICAgICpcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gbWludFxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBvd25lclxuICAgICAqIEBwYXJhbSB7U2VjcmV0fSBmZWVQYXllclxuICAgICAqIEByZXR1cm5zIFByb21pc2U8c3RyaW5nPlxuICAgICAqL1xuICAgIGV4cG9ydCBjb25zdCByZXRyeUdldE9yQ3JlYXRlID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyOiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxzdHJpbmc+ID0+IHtcbiAgICAgIGxldCBjb3VudGVyID0gMTtcbiAgICAgIHdoaWxlIChjb3VudGVyIDwgUkVUUllfT1ZFUl9MSU1JVCkge1xuICAgICAgICB0cnkge1xuICAgICAgICAgIGNvbnN0IGluc3QgPSBhd2FpdCBnZXQobWludCwgb3duZXIsIGZlZVBheWVyLCB0cnVlKTtcblxuICAgICAgICAgIGlmIChpbnN0ICYmIHR5cGVvZiBpbnN0ID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgaW5zdCk7XG4gICAgICAgICAgICByZXR1cm4gaW5zdDtcbiAgICAgICAgICB9IGVsc2UgaWYgKGluc3QgaW5zdGFuY2VvZiBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uKSB7XG4gICAgICAgICAgICAoYXdhaXQgaW5zdC5zdWJtaXQoKSkubWFwKFxuICAgICAgICAgICAgICBhc3luYyAob2s6IHN0cmluZykgPT4ge1xuICAgICAgICAgICAgICAgIGF3YWl0IE5vZGUuY29uZmlybWVkU2lnKG9rKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gaW5zdC5kYXRhO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAoZXJyOiBFcnJvcikgPT4ge1xuICAgICAgICAgICAgICAgIGRlYnVnTG9nKCcjIEVycm9yIHN1Ym1pdCByZXRyeUdldE9yQ3JlYXRlOiAnLCBlcnIpO1xuICAgICAgICAgICAgICAgIHRocm93IGVycjtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgZGVidWdMb2coYCMgcmV0cnk6ICR7Y291bnRlcn0gY3JlYXRlIHRva2VuIGFjY291bnQ6IGAsIGUpO1xuICAgICAgICAgIGRlYnVnTG9nKGAjIG1pbnQ6ICR7bWludH0sIG93bmVyOi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ICAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSxcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3QsXG4gICAgICAgIH07XG4gICAgICB9XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IEtleXBhaXIgYXMgT3JpZ2luYWwsIFB1YmxpY0tleSB9IGZyb20gJ0Bzb2xhbmEvd2ViMy5qcyc7XG5pbXBvcnQgeyBQdWJrZXksIFNlY3JldCB9IGZyb20gJ34vdHlwZXMvYWNjb3VudCc7XG5pbXBvcnQgYnMgZnJvbSAnYnM1OCc7XG5cbmV4cG9ydCBuYW1lc3BhY2UgQWNjb3VudCB7XG4gIGV4cG9ydCBjbGFzcyBLZXlwYWlyIHtcbiAgICBzZWNyZXQ6IFNlY3JldDtcbiAgICBwdWJrZXk6IFB1YmtleTtcblxuICAgIGNvbnN0cnVjdG9yKHBhcmFtczogeyBwdWJrZXk/OiBQdWJrZXk7IHNlY3JldDogU2VjcmV0IH0pIHtcbiAgICAgIGlmICghcGFyYW1zLnB1YmtleSkge1xuICAgICAgICBjb25zdCBrZXlwYWlyID0gcGFyYW1zLnNlY3JldC50b0tleXBhaXIoKTtcbiAgICAgICAgdGhpcy5wdWJrZXkgPSBrZXlwYWlyLnB1YmxpY0tleS50b1N0cmluZygpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgdGhpcy5w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XG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvQ29tcHJlc3NlZE5mdEluZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IEludGVybmFsQ3JlYXRvcnNbXSA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBbXTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBpbnB1dCEubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlciA9IChcbiAgICAgIG91dHB1dDogT3B0aW9uPEludGVybmFsQ3JlYXRvcnNbXT4sXG4gICAgKTogQ3JlYXRvcnNbXSB8IHVuZGVmaW5lZCA9PiB7XG4gICAgICBpZiAoIW91dHB1dCkge1xuICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gb3V0cHV0Lm1hcCgoZGF0YSkgPT4ge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIGFkZHJlc3M6IGRhdGEuYWRkcmVzcy50b1N0cmluZygpLFxuICAgICAgICAgIHNoYXJlOiBkYXRhLnNoYXJlLFxuICAgICAgICAgIHZlcmlmaWVkOiBkYXRhLnZlcmlmaWVkLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9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B7XG4gICAgICBpZiAoIWlucHV0IHx8ICFpbnB1dC5maWxlcykge1xuICAgICAgICByZXR1cm4ge307XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGZpbGVzID0gYXdhaXQgUHJvbWlzZS5hbGwoXG4gICAgICAgIGlucHV0LmZpbGVzLm1hcChhc3luYyAoZmlsZSkgPT4ge1xuICAgICAgICAgIGlmICghZmlsZS5maWxlUGF0aCkge1xuICAgICAgICAgICAgcmV0dXJuIHt9O1xuICAgICAgICAgIH1cbiAgICAgICAgICBjb25zdCByZXMgPSBhd2FpdCBjYWxsYmFja0Z1bmMoZmlsZS5maWxlUGF0aCwgc3RvcmFnZVR5cGUsIGZlZVBheWVyKTtcbiAgICAgICAgICBpZiAocmVzLmlzRXJyKSB7XG4gICAgICAgICAgICB0aHJvdyBFcnJvcihyZXMuZXJyb3IubWVzc2FnZSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBvdmVyd3JpdGVPYmplY3QoZmlsZSwgW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBleGlzdHNLZXk6ICdmaWxlUGF0aCcsXG4gICAgICAgICAgICAgIHdpbGw6IHsga2V5OiAndXJpJywgdmFsdWU6IHJlcy52YWx1ZSB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICBdKTtcbiAgICAgICAgfSksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHsgLi4uaW5wdXQsIGZpbGVzIH0gYXMgUHJvcGVydGllcztcbiAgICB9O1xuICB9XG59XG4iLCAiLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLXVudXNlZC12YXJzICovXG5pbXBvcnQgeyBPcHRpb24sIFVzZXMgfSBmcm9tICd+L3R5cGVzL3JlZ3VsYXItbmZ0JztcblxuZXhwb3J0IG5hbWVzcGFjZSBDb252ZXJ0ZXIge1xuICBleHBvcnQgbmFtZXNwYWNlIFVzZXMge1xuICAgIGV4cG9ydCBjb25zdCBpbnRvVXN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WFnZSc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLmltYWdlKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzSW1hZ2VVcmwobWV0YWRhdGEuaW1hZ2UpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAncm95YWx0eSc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnJveWFsdHkpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNSb3lhbHR5KG1ldGFkYXRhLnJveWFsdHkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICA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AgICAgYWRkcmVzcy50b1B1YmxpY0tleSgpLnRvQnVmZmVyKCksXG4gICAgICAgIF0sXG4gICAgICAgIFBST0dSQU1fSUQsXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGdldE1hc3RlckVkaXRpb24gPSAoYWRkcmVzczogUHVia2V5KTogUHVibGljS2V5ID0+IHtcbiAgICAgIGNvbnN0IFtwdWJsaWNLZXldID0gUHVibGljS2V5LmZpbmRQcm9ncmFtQWRkcmVzc1N5bmMoXG4gICAgICAgIFtcbiAgICAgICAgICBCdWZmZXIuZnJvbSgnbWV0YWRhdGEnKSxcbiAgICAgICAgICBQUk9HUkFNX0lELnRvQnVmZmVyKCksXG4gICAgICAgICAgYWRkcmVzcy50b1B1YmxpY0tleSgpLnRvQnVmZmVyKCksXG4gICAgICAgICAgQnVmZmVyLmZyb20oJ2VkaXRpb24nKSxcbiAgICAgICAgXSxcbiAgICAgICAgUFJPR1JBTV9JRCxcbiAgICAgICk7XG4gICAgICByZXR1cm4gcHVibGljS2V5O1xuICAgIH07XG5cbiAgICBleHBvcnQgY29uc3QgZ2V0VHJlZUF1dGhvcml0eSA9IChhZGRyZXNzOiBQdWJrZXkpOiBQdWJsaWNLZXkgPT4ge1xuICAgICAgY29uc3QgW3B1YmxpY0tleV0gPSBQdWJsaWNLZXkuZmluZFByb2dyYW1BZGRyZXNzU3luYyhcbiAgICAgICAgW2FkZHJlc3MudG9QdWJsaWNLZXkoKS50b0J1ZmZlcigpXSxcbiAgICAgICAgTVBMX0JVQkJMRUdVTV9QUk9HUkFNX0lELnRvUHVibGljS2V5KCksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGdldEJndW1TaWduZXIgPSAoKTogUHVibGljS2V5ID0+IHtcbiAgICAgIGNvbnN0IFtwdWJsaWNLZXldID0gUHVibGljS2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nOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5pbWFnZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc0ltYWdlVXJsKG1ldGFkYXRhLmltYWdlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3JveWFsdHknOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5yb3lhbHR5KSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzUm95YWx0eShtZXRhZGF0YS5yb3lhbHR5KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlcl9mZWVfYmFzaXNfcG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJGZWVCYXNpc1BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0YWRhdGEubmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgIC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om/dist/index.mjs index 013773caa..a61c61115 100644 --- a/packages/suite-phantom/dist/index.mjs +++ b/packages/suite-phantom/dist/index.mjs @@ -460,22 +460,11 @@ var TransactionBuilder5; // ../global/src/index.ts import { Keypair as Keypair3, LAMPORTS_PER_SOL, PublicKey as PublicKey4 } from "@solana/web3.js"; -// ../account/src/associated.ts -import { - ASSOCIATED_TOKEN_PROGRAM_ID, - createAssociatedTokenAccountInstruction, - getAccount, - getAssociatedTokenAddressSync, - TOKEN_PROGRAM_ID, - TokenAccountNotFoundError, - TokenInvalidAccountOwnerError -} from "@solana/spl-token"; - // ../account/src/keypair.ts import { Keypair as Original, PublicKey as PublicKey2 } from "@solana/web3.js"; import bs from "bs58"; var Account; -((Account5) => { +((Account4) => { class Keypair5 { secret; pubkey; @@ -511,111 +500,16 @@ var Account; }); }; } - Account5.Keypair = Keypair5; + Account4.Keypair = Keypair5; })(Account || (Account = {})); -// ../account/src/associated.ts -var Account2; -((Account5) => { - let Associated; - ((Associated2) => { - const RETRY_OVER_LIMIT = 10; - const RETRY_SLEEP_TIME = 3; - const get = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const res = await (0, Associated2.makeOrCreateInstruction)( - mint, - owner, - new Account.Keypair({ secret: feePayer }).pubkey, - allowOwnerOffCurve - ); - if (!res.inst) { - return res.tokenAccount; - } - return new TransactionBuilder6.Common( - [res.inst], - [], - feePayer.toKeypair(), - res.tokenAccount - ); - }; - Associated2.retryGetOrCreate = async (mint, owner, feePayer) => { - let counter = 1; - while (counter < RETRY_OVER_LIMIT) { - try { - const inst = await get(mint, owner, feePayer, true); - if (inst && typeof inst === "string") { - debugLog("# associatedTokenAccount: ", inst); - return inst; - } else if (inst instanceof TransactionBuilder6.Common) { - (await inst.submit()).map( - async (ok) => { - await Node.confirmedSig(ok); - return inst.data; - }, - (err) => { - debugLog("# Error submit retryGetOrCreate: ", err); - throw err; - } - ); - } - } catch (e) { - debugLog(`# retry: ${counter} create token account: `, e); - debugLog(`# mint: ${mint}, owner: ${owner}, feePayer: ${feePayer}`); - } - await sleep(RETRY_SLEEP_TIME); - counter++; - } - throw Error(`retry action is over limit ${RETRY_OVER_LIMIT}`); - }; - Associated2.makeOrCreateInstruction = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const associatedTokenAccount = getAssociatedTokenAddressSync( - mint.toPublicKey(), - owner.toPublicKey(), - allowOwnerOffCurve, - TOKEN_PROGRAM_ID, - ASSOCIATED_TOKEN_PROGRAM_ID - ); - debugLog("# associatedTokenAccount: ", associatedTokenAccount.toString()); - try { - await getAccount( - Node.getConnection(), - associatedTokenAccount, - Node.getConnection().commitment, - TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst: void 0 - }; - } catch (error) { - if (!(error instanceof TokenAccountNotFoundError) && !(error instanceof TokenInvalidAccountOwnerError)) { - throw Error("Unexpected error"); - } - const payer = !feePayer ? owner : feePayer; - const inst = createAssociatedTokenAccountInstruction( - payer.toPublicKey(), - associatedTokenAccount, - owner.toPublicKey(), - mint.toPublicKey(), - TOKEN_PROGRAM_ID, - ASSOCIATED_TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst - }; - } - }; - })(Associated = Account5.Associated || (Account5.Associated = {})); -})(Account2 || (Account2 = {})); - // ../account/src/pda.ts import { PublicKey as PublicKey3 } from "@solana/web3.js"; import { PROGRAM_ID } from "@metaplex-foundation/mpl-token-metadata"; import { MPL_BUBBLEGUM_PROGRAM_ID } from "@metaplex-foundation/mpl-bubblegum"; import BN from "bn.js"; -var Account3; -((Account5) => { +var Account2; +((Account4) => { let Pda; ((Pda2) => { Pda2.getMetadata = (address) => { @@ -667,14 +561,13 @@ var Account3; ); return assetId.toString(); }; - })(Pda = Account5.Pda || (Account5.Pda = {})); -})(Account3 || (Account3 = {})); + })(Pda = Account4.Pda || (Account4.Pda = {})); +})(Account2 || (Account2 = {})); // ../account/src/index.ts -var Account4 = { - ...Account2, +var Account3 = { ...Account, - ...Account3 + ...Account2 }; // ../global/src/index.ts @@ -705,7 +598,7 @@ String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, op } return url; } - if (Account4.Keypair.isPubkey(addressOrSignature)) { + if (Account3.Keypair.isPubkey(addressOrSignature)) { if (explorer === "solanafm" /* SolanaFM */) { url = `${Constants.EXPLORER_SOLANAFM_URL}/address/${addressOrSignature}?cluster=${cluster}`; } else if (explorer === "xray" /* Xray */) { @@ -725,13 +618,13 @@ String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, op return url; }; String.prototype.toPublicKey = function() { - if (!Account4.Keypair.isPubkey(this.toString())) { + if (!Account3.Keypair.isPubkey(this.toString())) { throw Error(`No match KeyPair.PubKey: ${this.toString()}`); } return new PublicKey4(this.toString()); }; String.prototype.toKeypair = function() { - if (!Account4.Keypair.isSecret(this.toString())) { + if (!Account3.Keypair.isSecret(this.toString())) { throw Error(`No match KeyPair.Secret: ${this.toString()}`); } const decoded = bs2.decode(this.toString()); @@ -1539,7 +1432,7 @@ var SplToken2; return Try(async () => { const payer = options.feePayer ? options.feePayer : ownerOrMultisig[0]; const keypairs = ownerOrMultisig.map((s) => s.toKeypair()); - const tokenAssociated = await Account4.Associated.retryGetOrCreate( + const tokenAssociated = await Account3.Associated.retryGetOrCreate( token, owner, payer @@ -1565,13 +1458,13 @@ var SplToken2; // ../suite-spl-token/src/burn.ts import { createBurnCheckedInstruction, - getAssociatedTokenAddressSync as getAssociatedTokenAddressSync2 + getAssociatedTokenAddressSync } from "@solana/spl-token"; var SplToken3; ((SplToken11) => { SplToken11.burn = (mint, owner, ownerOrMultisig, burnAmount, tokenDecimals, options = {}) => { return Try(() => { - const tokenAccount = getAssociatedTokenAddressSync2( + const tokenAccount = getAssociatedTokenAddressSync( mint.toPublicKey(), owner.toPublicKey() ); @@ -1592,7 +1485,7 @@ var SplToken3; // ../suite-spl-token/src/find.ts import { Metadata } from "@metaplex-foundation/mpl-token-metadata"; -import { TOKEN_PROGRAM_ID as TOKEN_PROGRAM_ID2 } from "@solana/spl-token"; +import { TOKEN_PROGRAM_ID } from "@solana/spl-token"; import fetch2 from "cross-fetch"; var SplToken4; ((SplToken11) => { @@ -1631,7 +1524,7 @@ var SplToken4; const info = await connection.getParsedTokenAccountsByOwner( owner.toPublicKey(), { - programId: TOKEN_PROGRAM_ID2 + programId: TOKEN_PROGRAM_ID } ); const datas = info.value.map(async (d) => { @@ -1642,7 +1535,7 @@ var SplToken4; } return Metadata.fromAccountAddress( connection, - Account4.Pda.getMetadata(mint) + Account3.Pda.getMetadata(mint) ).then(async (metadata) => { return fetchRetry(metadata.data.uri).then((json) => { return converter(metadata, json, tokenAmount); @@ -1660,7 +1553,7 @@ var SplToken4; const connection = Node.getConnection(); const metadata = await Metadata.fromAccountAddress( connection, - Account4.Pda.getMetadata(mint) + Account3.Pda.getMetadata(mint) ); debugLog("# findByMint metadata: ", metadata); if (metadata.tokenStandard === 0) { @@ -1679,21 +1572,21 @@ var SplToken4; // ../suite-spl-token/src/freeze.ts import { createFreezeAccountInstruction, - getAssociatedTokenAddressSync as getAssociatedTokenAddressSync3 + getAssociatedTokenAddressSync as getAssociatedTokenAddressSync2 } from "@solana/spl-token"; var SplToken5; ((SplToken11) => { SplToken11.freeze = (mint, owner, freezeAuthority, options = {}) => { return Try(() => { const payer = options.feePayer ? options.feePayer : freezeAuthority; - const tokenAccount = getAssociatedTokenAddressSync3( + const tokenAccount = getAssociatedTokenAddressSync2( mint.toPublicKey(), owner.toPublicKey() ); const inst = createFreezeAccountInstruction( tokenAccount, mint.toPublicKey(), - new Account4.Keypair({ secret: freezeAuthority }).toPublicKey() + new Account3.Keypair({ secret: freezeAuthority }).toPublicKey() ); return new TransactionBuilder6.Common( [inst], @@ -1712,12 +1605,12 @@ var SplToken6; SplToken11.gasLessTransfer = async (mint, owner, dest, amount, mintDecimal, feePayer) => { return Try(async () => { const ownerPublicKey = owner.toKeypair().publicKey; - const sourceToken = await Account4.Associated.makeOrCreateInstruction( + const sourceToken = await Account3.Associated.makeOrCreateInstruction( mint, ownerPublicKey.toString(), feePayer ); - const destToken = await Account4.Associated.makeOrCreateInstruction( + const destToken = await Account3.Associated.makeOrCreateInstruction( mint, dest, feePayer @@ -1729,27 +1622,18 @@ var SplToken6; blockhash: blockhashObj.blockhash, feePayer: feePayer.toPublicKey() }); + inst2 = createTransferCheckedInstruction( + sourceToken.tokenAccount.toPublicKey(), + mint.toPublicKey(), + destToken.tokenAccount.toPublicKey(), + ownerPublicKey, + SplToken.calculateAmount(amount, mintDecimal), + mintDecimal, + [owner.toKeypair()] + ); if (!destToken.inst) { - inst2 = createTransferCheckedInstruction( - sourceToken.tokenAccount.toPublicKey(), - mint.toPublicKey(), - destToken.tokenAccount.toPublicKey(), - ownerPublicKey, - SplToken.calculateAmount(amount, mintDecimal), - mintDecimal, - [owner.toKeypair()] - ); tx.add(inst2); } else { - inst2 = createTransferCheckedInstruction( - sourceToken.tokenAccount.toPublicKey(), - mint.toPublicKey(), - destToken.tokenAccount.toPublicKey(), - ownerPublicKey, - SplToken.calculateAmount(amount, mintDecimal), - mintDecimal, - [owner.toKeypair()] - ); tx.add(destToken.inst).add(inst2); } tx.recentBlockhash = blockhashObj.blockhash; @@ -1769,14 +1653,14 @@ import { } from "@solana/web3.js"; import { AuthorityType, - createAssociatedTokenAccountInstruction as createAssociatedTokenAccountInstruction2, + createAssociatedTokenAccountInstruction, createInitializeMintInstruction, createMintToCheckedInstruction as createMintToCheckedInstruction2, createSetAuthorityInstruction, - getAssociatedTokenAddressSync as getAssociatedTokenAddressSync4, + getAssociatedTokenAddressSync as getAssociatedTokenAddressSync3, getMinimumBalanceForRentExemptMint, MINT_SIZE, - TOKEN_PROGRAM_ID as TOKEN_PROGRAM_ID3 + TOKEN_PROGRAM_ID as TOKEN_PROGRAM_ID2 } from "@solana/spl-token"; import { createCreateMetadataAccountV3Instruction @@ -2017,8 +1901,8 @@ var SplToken7; SplToken11.createMint = async (mint2, owner, totalAmount, mintDecimal, tokenMetadata, feePayer, isMutable) => { const connection = Node.getConnection(); const lamports = await getMinimumBalanceForRentExemptMint(connection); - const metadataPda = Account4.Pda.getMetadata(mint2.toString()); - const tokenAssociated = getAssociatedTokenAddressSync4(mint2, owner); + const metadataPda = Account3.Pda.getMetadata(mint2.toString()); + const tokenAssociated = getAssociatedTokenAddressSync3(mint2, owner); const instructions = []; instructions.push( SystemProgram.createAccount({ @@ -2026,7 +1910,7 @@ var SplToken7; newAccountPubkey: mint2, space: MINT_SIZE, lamports, - programId: TOKEN_PROGRAM_ID3 + programId: TOKEN_PROGRAM_ID2 }) ); instructions.push( @@ -2035,11 +1919,11 @@ var SplToken7; mintDecimal, owner, owner, - TOKEN_PROGRAM_ID3 + TOKEN_PROGRAM_ID2 ) ); instructions.push( - createAssociatedTokenAccountInstruction2( + createAssociatedTokenAccountInstruction( feePayer, tokenAssociated, owner, @@ -2126,7 +2010,7 @@ var SplToken7; ); debugLog("# datav2: ", datav2); debugLog("# upload content url: ", uri); - const mint2 = Account4.Keypair.create(); + const mint2 = Account3.Keypair.create(); const insts = await (0, SplToken11.createMint)( mint2.toPublicKey(), ownerPublicKey, @@ -2158,21 +2042,21 @@ var SplToken7; // ../suite-spl-token/src/thaw.ts import { createThawAccountInstruction, - getAssociatedTokenAddressSync as getAssociatedTokenAddressSync5 + getAssociatedTokenAddressSync as getAssociatedTokenAddressSync4 } from "@solana/spl-token"; var SplToken8; ((SplToken11) => { SplToken11.thaw = (mint, owner, freezeAuthority, options = {}) => { const payer = options.feePayer ? options.feePayer : freezeAuthority; return Try(() => { - const tokenAccount = getAssociatedTokenAddressSync5( + const tokenAccount = getAssociatedTokenAddressSync4( mint.toPublicKey(), owner.toPublicKey() ); const inst = createThawAccountInstruction( tokenAccount, mint.toPublicKey(), - new Account4.Keypair({ secret: freezeAuthority }).toPublicKey() + new Account3.Keypair({ secret: freezeAuthority }).toPublicKey() ); return new TransactionBuilder6.Common( [inst], @@ -2190,27 +2074,33 @@ var SplToken9; SplToken11.transfer = async (mint, owner, dest, ownerOrMultisig, amount, mintDecimal, options = {}) => { return Try(async () => { const payer = options.feePayer ? options.feePayer : ownerOrMultisig[0]; + const payerPubkey = new Account3.Keypair({ secret: payer }); const keypairs = ownerOrMultisig.map((s) => s.toKeypair()); - const sourceToken = await Account4.Associated.retryGetOrCreate( + const sourceToken = await Account3.Associated.makeOrCreateInstruction( mint, - owner, - payer + owner.toString(), + payerPubkey.pubkey ); - const destToken = await Account4.Associated.retryGetOrCreate( + const destToken = await Account3.Associated.makeOrCreateInstruction( mint, dest, - payer + payerPubkey.pubkey ); const inst = createTransferCheckedInstruction2( - sourceToken.toPublicKey(), + sourceToken.tokenAccount.toPublicKey(), mint.toPublicKey(), - destToken.toPublicKey(), + destToken.tokenAccount.toPublicKey(), owner.toPublicKey(), SplToken.calculateAmount(amount, mintDecimal), mintDecimal, keypairs ); - return new TransactionBuilder6.Common([inst], keypairs, payer.toKeypair()); + const instructions = destToken.inst ? [destToken.inst, inst] : [inst]; + return new TransactionBuilder6.Common( + instructions, + keypairs, + payer.toKeypair() + ); }); }; })(SplToken9 || (SplToken9 = {})); @@ -2310,8 +2200,11 @@ var DasApi2; sortDirection: "desc" /* Desc */ }; DasApi4.fetchOffchain = async (uri) => { - const json = await (await fetch(uri)).json(); - return json; + const response = await fetch(uri); + if (response.status !== 200) { + return {}; + } + return await response.json(); }; DasApi4.findByMint = async (mint, isCompressed) => { const asset = await DasApi.getAsset(mint); @@ -2448,20 +2341,20 @@ var RegularNft2; })(RegularNft2 || (RegularNft2 = {})); // ../suite-regular-nft/src/freeze.ts -import { getAssociatedTokenAddressSync as getAssociatedTokenAddressSync6 } from "@solana/spl-token"; +import { getAssociatedTokenAddressSync as getAssociatedTokenAddressSync5 } from "@solana/spl-token"; import { createFreezeDelegatedAccountInstruction } from "@metaplex-foundation/mpl-token-metadata"; var RegularNft3; ((RegularNft12) => { RegularNft12.freeze = (mint, owner, freezeAuthority, options = {}) => { return Try(() => { const payer = options.feePayer ? options.feePayer : freezeAuthority; - const tokenAccount = getAssociatedTokenAddressSync6( + const tokenAccount = getAssociatedTokenAddressSync5( mint.toPublicKey(), owner.toPublicKey() ); - const editionAddress = Account4.Pda.getMasterEdition(mint); + const editionAddress = Account3.Pda.getMasterEdition(mint); const inst = createFreezeDelegatedAccountInstruction({ - delegate: new Account4.Keypair({ + delegate: new Account3.Keypair({ secret: freezeAuthority }).toPublicKey(), tokenAccount, @@ -2483,13 +2376,13 @@ import { } from "@solana/web3.js"; import { createApproveInstruction, - createAssociatedTokenAccountInstruction as createAssociatedTokenAccountInstruction3, + createAssociatedTokenAccountInstruction as createAssociatedTokenAccountInstruction2, createInitializeMintInstruction as createInitializeMintInstruction2, createMintToCheckedInstruction as createMintToCheckedInstruction3, - getAssociatedTokenAddressSync as getAssociatedTokenAddressSync7, + getAssociatedTokenAddressSync as getAssociatedTokenAddressSync6, getMinimumBalanceForRentExemptMint as getMinimumBalanceForRentExemptMint2, MINT_SIZE as MINT_SIZE2, - TOKEN_PROGRAM_ID as TOKEN_PROGRAM_ID4 + TOKEN_PROGRAM_ID as TOKEN_PROGRAM_ID3 } from "@solana/spl-token"; import { createCreateMasterEditionV3Instruction, @@ -2502,14 +2395,14 @@ var RegularNft4; const NFT_AMOUNT = 1; const DEFAULT_STORAGE_TYPE = "nftStorage"; RegularNft12.createVerifyCreator = (mint2, creator) => { - const metadata = Account4.Pda.getMetadata(mint2.toString()); + const metadata = Account3.Pda.getMetadata(mint2.toString()); return createSignMetadataInstruction({ metadata, creator }); }; RegularNft12.createDeleagate = (mint2, owner, delegateAuthority) => { - const tokenAccount = getAssociatedTokenAddressSync7(mint2, owner); + const tokenAccount = getAssociatedTokenAddressSync6(mint2, owner); return createApproveInstruction( tokenAccount, delegateAuthority, @@ -2518,25 +2411,25 @@ var RegularNft4; ); }; RegularNft12.createVerifySizedCollection = (collectionChild, collectionParent, feePayer) => { - const collectionMetadata = Account4.Pda.getMetadata( + const collectionMetadata = Account3.Pda.getMetadata( collectionParent.toString() ); - const collectionMasterEditionAccount = Account4.Pda.getMasterEdition( + const collectionMasterEditionAccount = Account3.Pda.getMasterEdition( collectionParent.toString() ); return createVerifySizedCollectionItemInstruction({ collection: collectionMetadata, collectionMasterEditionAccount, collectionMint: collectionParent, - metadata: Account4.Pda.getMetadata(collectionChild.toString()), + metadata: Account3.Pda.getMetadata(collectionChild.toString()), payer: feePayer, collectionAuthority: feePayer }); }; RegularNft12.createMint = async (mint2, owner, nftMetadata, feePayer, isMutable) => { - const ata = getAssociatedTokenAddressSync7(mint2, owner); - const tokenMetadataPubkey = Account4.Pda.getMetadata(mint2.toString()); - const masterEditionPubkey = Account4.Pda.getMasterEdition(mint2.toString()); + const ata = getAssociatedTokenAddressSync6(mint2, owner); + const tokenMetadataPubkey = Account3.Pda.getMetadata(mint2.toString()); + const masterEditionPubkey = Account3.Pda.getMasterEdition(mint2.toString()); const connection = Node.getConnection(); const instructions = []; instructions.push( @@ -2545,12 +2438,12 @@ var RegularNft4; newAccountPubkey: mint2, lamports: await getMinimumBalanceForRentExemptMint2(connection), space: MINT_SIZE2, - programId: TOKEN_PROGRAM_ID4 + programId: TOKEN_PROGRAM_ID3 }) ); instructions.push(createInitializeMintInstruction2(mint2, 0, owner, owner)); instructions.push( - createAssociatedTokenAccountInstruction3(feePayer, ata, owner, mint2) + createAssociatedTokenAccountInstruction2(feePayer, ata, owner, mint2) ); instructions.push(createMintToCheckedInstruction3(mint2, ata, owner, 1, 0)); instructions.push( @@ -2656,7 +2549,7 @@ var RegularNft4; const isMutable = input.isMutable === void 0 ? true : input.isMutable; debugLog("# input: ", input); debugLog("# datav2: ", datav2); - const mint2 = Account4.Keypair.create(); + const mint2 = Account3.Keypair.create(); const instructions = await (0, RegularNft12.createMint)( mint2.toPublicKey(), ownerPublicKey, @@ -2685,7 +2578,7 @@ var RegularNft4; const keypairs = [owner.toKeypair(), mint2.toKeypair()]; if (input.creators) { input.creators.forEach((creator) => { - if (Account4.Keypair.isSecret(creator.secret)) { + if (Account3.Keypair.isSecret(creator.secret)) { const creatorPubkey = creator.address.toPublicKey(); const inst = (0, RegularNft12.createVerifyCreator)(mint2.toPublicKey(), creatorPubkey); instructions.push(inst); @@ -2759,7 +2652,7 @@ var RegularNft5; debugLog("# input: ", input); debugLog("# sellerFeeBasisPoints: ", sellerFeeBasisPoints); debugLog("# datav2: ", datav2); - const mint = Account4.Keypair.create(); + const mint = Account3.Keypair.create(); const insts = await RegularNft4.createMint( mint.toPublicKey(), ownerPublickey, @@ -2873,8 +2766,8 @@ var RegularNft7; const isMutable = input.isMutable === void 0 ? true : input.isMutable; debugLog("# input: ", input); debugLog("# datav2: ", datav2); - const collectionMint = Account4.Keypair.create(); - const collectionMetadataAccount = Account4.Pda.getMetadata( + const collectionMint = Account3.Keypair.create(); + const collectionMetadataAccount = Account3.Pda.getMetadata( collectionMint.pubkey ); const instructions = await RegularNft4.createMint( @@ -2916,20 +2809,20 @@ var RegularNft7; })(RegularNft7 || (RegularNft7 = {})); // ../suite-regular-nft/src/thaw.ts -import { getAssociatedTokenAddressSync as getAssociatedTokenAddressSync8 } from "@solana/spl-token"; +import { getAssociatedTokenAddressSync as getAssociatedTokenAddressSync7 } from "@solana/spl-token"; import { createThawDelegatedAccountInstruction } from "@metaplex-foundation/mpl-token-metadata"; var RegularNft8; ((RegularNft12) => { RegularNft12.thaw = (mint, owner, freezeAuthority, options = {}) => { return Try(() => { const payer = options.feePayer ? options.feePayer : freezeAuthority; - const tokenAccount = getAssociatedTokenAddressSync8( + const tokenAccount = getAssociatedTokenAddressSync7( mint.toPublicKey(), owner.toPublicKey() ); - const editionAddress = Account4.Pda.getMasterEdition(mint); + const editionAddress = Account3.Pda.getMasterEdition(mint); const inst = createThawDelegatedAccountInstruction({ - delegate: new Account4.Keypair({ + delegate: new Account3.Keypair({ secret: freezeAuthority }).toPublicKey(), tokenAccount, @@ -3015,7 +2908,7 @@ var PhantomMetaplex; sellerFeeBasisPoints ); const connection = Node.getConnection(); - const mint2 = Account4.Keypair.create(); + const mint2 = Account3.Keypair.create(); const isMutable = true; debugLog("# properties: ", properties); debugLog("# sellerFeeBasisPoints: ", sellerFeeBasisPoints); @@ -3054,7 +2947,7 @@ var RegularNft11 = { ...PhantomMetaplex }; // src/spl-token/add.ts import { createMintToCheckedInstruction as createMintToCheckedInstruction4, - TOKEN_PROGRAM_ID as TOKEN_PROGRAM_ID5 + TOKEN_PROGRAM_ID as TOKEN_PROGRAM_ID4 } from "@solana/spl-token"; import { Transaction as Transaction8 } from "@solana/web3.js"; var PhantomSplToken; @@ -3064,7 +2957,7 @@ var PhantomSplToken; Node.changeConnection({ cluster }); const connection = Node.getConnection(); const transaction = new Transaction8(); - const makeInstruction = await Account4.Associated.makeOrCreateInstruction( + const makeInstruction = await Account3.Associated.makeOrCreateInstruction( token, owner ); @@ -3077,7 +2970,7 @@ var PhantomSplToken; totalAmount, mintDecimal, [], - TOKEN_PROGRAM_ID5 + TOKEN_PROGRAM_ID4 ) ); transaction.feePayer = owner.toPublicKey(); @@ -3171,4 +3064,4 @@ export { PhantomSplToken3 as PhantomSplToken, RegularNft11 as RegularNft }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL3JlZ3VsYXItbmZ0L21pbnQudHMiLCAiLi4vLi4vc3VpdGUtc3BsLXRva2VuL3NyYy9hZGQudHMiLCAiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9iYXRjaC50cyIsICIuLi8uLi9ub2RlL3NyYy9pbmRleC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jb21tb24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvbWludC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9wYXJ0aWFsLXNpZ24udHMiLCAiLi4v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d2FpdCBOb2RlLmNvbmZpcm1lZFNpZyhvayk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGluc3QuZGF0YTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgKGVycjogRXJyb3IpID0+IHtcbiAgICAgICAgICAgICAgICBkZWJ1Z0xvZygnIyBFcnJvciBzdWJtaXQgcmV0cnlHZXRPckNyZWF0ZTogJywgZXJyKTtcbiAgICAgICAgICAgICAgICB0aHJvdyBlcnI7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgIGRlYnVnTG9nKGAjIHJldHJ5OiAke2NvdW50ZXJ9IGNyZWF0ZSB0b2tlbiBhY2NvdW50OiBgLCBlKTtcbiAgICAgICAgICBkZWJ1Z0xvZyhgIyBtaW50OiAke21pbnR9LCBvd25lcjogJHtvd25lcn0sIGZlZVBheWVyOiAke2ZlZVBheWVyfWApO1xuICAgICAgICB9XG4gICAgICAgIGF3YWl0IHNsZWVwKFJFVFJZX1NMRUVQX1RJTUUpO1xuICAgICAgICBjb3VudGVyKys7XG4gICAgICB9XG4gICAgICB0aHJvdyBFcnJvcihgcmV0cnkgYWN0aW9uIGlzIG92ZXIgbGltaXQgJHtSRVRSWV9PVkVSX0xJTUlUfWApO1xuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiBbTWFpbiBsb2dpY11HZXQgQXNzb2NpYXRlZCB0b2tlbiBBY2NvdW50LlxuICAgICAqIGlmIG5vdCBjcmVhdGVkLCBjcmVhdGUgbmV3IHRva2VuIGFjY291aW50XG4gICAgICpcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gbWludFxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBvd25lclxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBmZWVQYXllclxuICAgICAqIEByZXR1cm5zIFByb21pc2U8c3RyaW5nPlxuICAgICAqL1xuICAgIGV4cG9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YXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3Q6IHVuZGVmaW5lZCxcbiAgICAgICAgfTtcbiAgICAgIH0gY2F0Y2ggKGVycm9yOiB1bmtub3duKSB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5BY2NvdW50Tm90Rm91bmRFcnJvcikgJiZcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5JbnZhbGlkQWNjb3VudE93bmVyRXJyb3IpXG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9yKCdVbmV4cGVjdGVkIGVycm9yJyk7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBwYXllciA9ICFmZWVQYXllciA/IG93bmVyIDogZmVlUGF5ZXI7XG5cbiAgICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgICBwYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgICBBU1NPQ0lBVEVEX1RPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG5cbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICB0b2tlbkFjY291bnQ6IGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSxcbiAgICAgICAgICBpbnN0LFxuICAgICAgICB9O1xuICAgICAgfVxuICAgIH07XG4gIH1cbn1cbiIsICJpbXBvcnQgeyBLZXlwYWlyIGFzIE9yaWdpbmFsLCBQdWJsaWNLZXkgfSBmcm9tICdAc29sYW5hL3dlYjMuanMnO1xuaW1wb3J0IHsgUH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lzX3BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJGZWVCYXNpc1BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0YWRhdGEubmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzeW1ib2wnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLnN5bWJvbCkge1xuICAgICAgICAgICAgICByZXMgPSBpc1N5bWJvbChtZXRhZGF0YS5zeW1ib2wpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHJlcyAmJiByZXMuaXNFcnIpIHtcbiAgICAgICAgICByZXN1bHRzLnB1c2goLi4ucmVzLmVycm9yLmRldGFpbHMpO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIGlmIChyZXN1bHRzLmxlbmd0aCA+IDApIHtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9XG4gICAgICAgICAgJ0NhdWdodCBpbiB0aGUgdmFsaWRhdGlvbiBlcnJvcnMuIHNlZSBpbmZvcm1hdGlvbiBlLmc6IGVycjxWYWxpZGF0b3JFcnJvcj4uZGV0YWlscyc7XG4gICAgICAgIHRocm93IG5ldyBWYWxpZGF0b3JFcnJvcihtZXNzYWdlLCByZXN1bHRzKTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBNZXNzY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IHtcbiAgICAgICAgY29uc3QgbWludCA9IGQuYWNjb3VudC5kYXRhLnBhcnNlZC5pbmZvLm1pbnQgYXMgUHVia2V5O1xuICAgICAgICBjb25zdCB0b2tlbkFtb3VudCA9IGQuYWNjb3VudC5kYXRhLnBhcnNlZC5pbmZvLnRva2VuQW1vdW50XG4gICAgICAgICAgLmFtb3VudCBhcyBzdHJpbmc7XG4gICAgICAgIGlmICh0b2tlbkFtb3VudCA9PT0gJzEnKSB7XG4gICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBNZXRhZGF0YS5mcm9tQWNjb3VudEFkZHJlc3MoXG4gICAgICAgICAgY29ubmVjdGlvbixcbiAgICAgICAgICBBY2NvdW50LlBkYS5nZXRNZXRhZGF0YShtaW50KSxcbiAgICAgICAgKVxuICAgICAgICAgIC50aGVuKGFzeW5jIChtZXRhZGF0YSkgPT4ge1xuICAgICAgICAgICAgLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLWV4cGxpY2l0LWFueSAqL1xuICAgICAgICAgICAgcmV0dXJuIGZldGNoUmV0cnkobWV0YWRhdGEuZGF0YS51cmkpLnRoZW4oKGpzb246IGFueSkgPT4ge1xuICAgICAgICAgICAgICByZXR1cm4gY29udmVydGVyKG1ldGFkYXRhLCBqc29uLCB0b2tlbkFtb3VudCk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICB9KVxuICAgICAgICAgIC5jYXRjaCgoZXJyKSA9PiBkZWJ1Z0xvZygnIyBbRmV0Y2ggZXJyb3JdJywgZXJyKSk7XG4gICAgICB9KTtcblxuICAgICAgY29uc3QgZmlsdGVycyA9IChhd2FpdCBQcm9taXNlLmFsbChkYXRhcykpLmZpbHRlcihcbiAgICAgICAgKGRhdGEpID0+IGRhdGEgIT09IHVuZGVmaW5lZCxcbiAgICAgICk7XG4gICAgICByZXR1cm4gZmlsdGVycyBhcyBUb2tlbk1ldGFkYXRhW107XG4gICAgf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AgICAgICBtaW50LFxuICAgICAgKSxcbiAgICApO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVNaW50VG9DaGVja2VkSW5zdHJ1Y3Rpb24oXG4gICAgICAgIG1pbnQsXG4gICAgICAgIHRva2VuQXNzb2NpYXRlZCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIENhbGN1bGF0ZS5jYWxjdWxhdGVBbW91bnQodG90YWxBbW91bnQsIG1pbnREZWNpbWFsKSxcbiAgICAgICAgbWludERlY2ltYWwsXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUNyZWF0ZU1ldGFkYXRhQWNjb3VudFYzSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHtcbiAgICAgICAgICBtZXRhZGF0YTogbWV0YWRhdGFQZGEsXG4gICAgICAgICAgbWludCxcbiAgICAgICAgICBtaW50QXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBwYXllcjogZmVlUGF5ZXIsXG4gICAgICAgICAgdXBkYXRlQXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgIGNyZWF0ZU1ldGFkYXRhQWNjb3VudEFyZ3NWMzoge1xuICAgICAgICAgICAgZGF0YTogdG9rZW5NZXRhZGF0YSxcbiAgICAgICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICAgICAgIGNvbGxlY3Rpb25EZXRhaWxzOiBudWxsLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICApLFxuICAgICk7XG4gICAgcmV0dXJuIGluc3RydWN0aW9ucztcbiAgfTtcblxuICAvKipcbiAgICogU1BMLVRPS0VOIG1pbnRcbiAgICpcbiAgICogQHBhcmFtIHtTZWNyZXR9IG93bmVyICAgICAgLy8gdG9rZW4gb3duZXIgU2VjcmV0XG4gICAqIEBwYXJhbSB7bnVtYmVyfSB0b3RhbEFtb3VudCA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RhdGEsIC4uLmltYWdlIH0sXG4gICAgICAgICAgc3RvcmFnZVR5cGUsXG4gICAgICAgICAgcGF5ZXIsXG4gICAgICAgICk7XG4gICAgICAgIGlmICh1cGxvYWRlZC5pc0Vycikge1xuICAgICAgICAgIHRocm93IHVwbG9hZGVkO1xuICAgICAgICB9XG4gICAgICAgIHVyaSA9IHVwbG9hZGVkLnZhbHVlO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgdGhyb3cgRXJyb3IoYE11c3Qgc2V0IGZpbGVQYXRoJyBvciAndXJpJ2ApO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBpc011dGFibGUgPSB0cnVlO1xuXG4gICAgICBjb25zdCBkYXRhdjIgPSBDb252ZXJ0ZXIuVG9rZW5NZXRhZGF0YS5pbnRvSW5mcmEoXG4gICAgICAgIGlucHV0LFxuICAgICAgICB1cmksXG4gICAgICAgIHNlbGxlckZlZUJhc2lzUG9pbnRzLFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgZGF0YXYyOiAnLCBkYXRhdjIpO1xuICAgICAgZGVidWdMb2coJyMgdXBsb2FkIGNvbnRlbnQgdXJsOiAnLCB1cmkpO1xuXG4gICAgICBjb25zdCBtaW50ID0gQWNjb3VudC5LZXlwYWlyLmNyZWF0ZSgpO1xuICAgICAgY29uc3QgaW5zdHMgPSBhd2FpdCBjcmVhdGVNaW50KFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICB0b3RhbEFtb3VudCxcbiAgICAgICAgbWludERlY2ltYWwsXG4gICAgICAgIGRhdGF2MixcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICBpc011dGFibGUsXG4gICAgICApO1xuXG4gICAgICAvLyBmcmVlemVBdXRob3JpdHlcbiAgICAgIGlmIChmcmVlemVBdXRob3JpdHkpIHtcbiAgICAgICAgaW5zdHMucHVzaChcbiAgICAgIC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hdGVNaW50VG9DaGVja2VkSW5zdHJ1Y3Rpb24obWludCwgYXRhLCBvd25lciwgMSwgMCkpO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVDcmVhdGVNZXRhZGF0YUFjY291bnRWM0luc3RydWN0aW9uKFxuICAgICAgICB7XG4gICAgICAgICAgbWV0YWRhdGE6IHRva2VuTWV0YWRhdGFQdWJrZXksXG4gICAgICAgICAgbWludCxcbiAgICAgICAgICBtaW50QXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBwYXllcjogZmVlUGF5ZXIsXG4gICAgICAgICAgdXBkYXRlQXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgIGNyZWF0ZU1ldGFkYXRhQWNjb3VudEFyZ3NWMzoge1xuICAgICAgICAgICAgZGF0YTogbmZ0TWV0YWRhdGEsXG4gICAgICAgICAgICBpc011dGFibGUsXG4gICAgICAgICAgICBjb2xsZWN0aW9uRGV0YWlsczogbnVsbCxcbiAgICAgICAgICB9LFxuICAgICAgICB9LFxuICAgICAgKSxcbiAgICApO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVDcmVhdGVNYXN0ZXJFZGl0aW9uVjNJbnN0cnVjdGlvbihcbiAgICAgICAge1xuICAgICAgICAgIGVkaXRpb246IG1hc3RlckVkaXRpb25QdWJrZXksXG4gICAgICAgICAgbWludCxcbiAgICAgICAgICB1cGRhdGVBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICAgIG1pbnRBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICAgIHBheWVyOiBmZWVQYXllcixcbiAgICAgICAgICBtZXRhZGF0YTogdG9rZW5NZXRhZGF0YVB1YmtleSxcbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgIGNyZWF0ZU1hc3RlckVkaXRpb25BcmdzOiB7XG4gICAgICAgICAgICBtYXhTdXBwbHk6I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sb2FkZWQ7XG4gICAgICAgIH1cbiAgICAgICAgdXJpID0gdXBsb2FkZWQudmFsdWU7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICB0aHJvdyBFcnJvcihgTXVzdCBzZXQgZmlsZVBhdGgnIG9yICd1cmknYCk7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGRhdGF2MiA9IENvbnZlcnRlci5SZWd1bGFyTmZ0TWV0YWRhdGEuaW50b0luZnJhKFxuICAgICAgICBpbnB1dCxcbiAgICAgICAgdXJpLFxuICAgICAgICBzZWxsZXJGZWVCYXNpc1BvaW50cyxcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IGlzTXV0YWJsZSA9IGlucHV0LmlzTXV0YWJsZSA9PT0gdW5kZWZpbmVkID8gdHJ1ZSA6IGlucHV0LmlzTXV0YWJsZTtcblxuICAgICAgZGVidWdMb2coJyMgaW5wdXQ6ICcsIGlucHV0KTtcbiAgICAgIGRlYnVnTG9nKCcjIGRhdGF2MjogJywgZGF0YXYyKTtcblxuICAgICAgY29uc3QgbWludCA9IEFjY291bnQuS2V5cGFpci5jcmVhdGUoKTtcblxuICAgICAgY29uc3QgaW5zdHJ1Y3Rpb25zID0gYXdhaXQgY3JlYXRlTWludChcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgZGF0YXYyLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICk7XG5cbiAgICAgIC8vIGZyZWV6ZUF1dGhvcml0eVxuICAgICAgaWYgKGZyZWV6ZUF1dGhvcml0eSkge1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgICBjcmVhdGVEZWxlYWdhdGUoXG4gICAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgICAgIGZyZWV6ZUF1dGhvcml0eS50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIC8vIGNvbGxlY3Rpb24gLS0tXG4gICAgICBpZiAoaW5wdXQuY29sbGVjdGlvbikge1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgICBjcmVhdGVWZXJpZnlTaXplZENvbGxlY3Rpb24oXG4gICAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBpbnB1dC5jb2xsZWN0aW9uLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3Qga2V5cGFpcnMgPSBbb3duZXIudG9LZXlwYWlyKCksIG1pbnQudG9LZXlwYWlyKCldO1xuXG4gICAgICAvLyBjcmVhdG9yIC0tLVxuICAgICAgaWYgKGlucHV0LmNyZWF0b3JzKSB7XG4gICAgICAgIGlucHV0LmNyZWF0b3JzLmZvckVhY2goKGNyZWF0b3IpID0+IHtcbiAgICAgICAgICBpZiAoQWNjb3VudC5LZXlwYWlyLmlzU2VjcmV0KGNyZWF0b3Iuc2VjcmV0KSkge1xuICAgICAgICAgICAgY29uc3QgY3JlYXRvclB1YmtleSA9IGNyZWF0b3IuYWRkcmVzcy50b1B1YmxpY0tleSgpO1xuICAgICAgICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZVZlcmlmeUNyZWF0b3IobWludC50b1B1YmxpY0tleSgpLCBjcmVhdG9yUHVia2V5KTtcbiAgICAgICAgICAgIGluc3RydWN0aW9ucy5wdXNoKGluc3QpO1xuICAgICAgICAgICAga2V5cGFpcnMucHVzaChjcmVhdG9yLnNlY3JldC50b0tleXBhaXIoKSk7XG4gICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG5ld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mRhdGF2MiwgY29sbGVjdGlvbiB9O1xuICAgICAgfVxuICAgICAgLy8tLS0gY29sbGVjdGlvbiAtLS1cblxuICAgICAgY29uc3QgaXNNdXRhYmxlID0gaW5wdXQuaXNNdXRhYmxlID09PSB1bmRlZmluZWQgPyB0cnVlIDogaW5wdXQuaXNNdXRhYmxlO1xuXG4gICAgICBkZWJ1Z0xvZygnIyBpbnB1dDogJywgaW5wdXQpO1xuICAgICAgZGVidWdMb2coJyMgc2VsbGVyRmVlQmFzaXNQb2ludHM6ICcsIHNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgIGRlYnVnTG9nKCcjIGRhdGF2MjogJywgZGF0YXYyKTtcblxuICAgICAgY29uc3QgbWludCA9IEFjY291bnQuS2V5cGFpci5jcmVhdGUoKTtcbiAgICAgIGNvbnN0IGluc3RzID0gYXdhaXQgTWludC5jcmVhdGVNaW50KFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyUHVibGlja2V5LFxuICAgICAgICBkYXRhdjIsXG4gICAgICAgIGZlZVBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICk7XG5cbiAgICAgIC8vIGZyZWV6ZUF1dGhvcml0eVxuICAgICAgaWYgKG9wdGlvbnMuZnJlZXplQXV0aG9yaXR5KSB7XG4gICAgICAgIGluc3RzLnB1c2goXG4gICAgICAgICAgTWludC5jcmVhdGVEZWxlYWdhdGUoXG4gICAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBvd25lclB1YmxpY2tleSxcbiAgICAgICAgICAgIG9wdGlvbnMuZnJlZXplQXV0aG9yaXR5LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgYmxvY2toYXNoT2JqID0gYXdhaXQgTm9kZS5nZXRDb25uZWN0aW9uKCkuZ2V0TGF0ZXN0QmxvY2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uY3JlYXRlTWludChcbiAgICAgICAgY29sbGVjdGlvbk1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgIGRhdGF2MixcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICBpc011dGFibGUsXG4gICAgICApO1xuXG4gICAgICAvLyBmcmVlemVBdXRob3JpdHlcbiAgICAgIGlmIChmcmVlemVBdXRob3JpdHkpIHtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgICAgTWludC5jcmVhdGVEZWxlYWdhdGUoXG4gICAgICAgICAgICBjb2xsZWN0aW9uTWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgICAgICBmcmVlemVBdXRob3JpdHkudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBjb2xsZWN0aW9ucyA9IHtcbiAgICAgICAgY29sbGVjdGlvbk1ldGFkYXRhOiBjb2xsZWN0aW9uTWV0YWRhdGFBY2NvdW50LFxuICAgICAgICBjb2xsZWN0aW9uQXV0aG9yaXR5OiBvd25lci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgIGNvbGxlY3Rpb25NaW50OiBjb2xsZWN0aW9uTWludC50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICB9O1xuXG4gICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgY3JlYXRlU2V0Q29sbGVjdGlvblNpemVJbnN0cnVjdGlvbihjb2xsZWN0aW9ucywge1xuICAgICAgICAgIHNldENvbGxlY3Rpb25TaXplQXJnczoge1xuICAgICAgICAgICAgc2l6ZTogY29sbGVjdGlvblNpemUgfHwgREVGQVVMVF9DT0xMRUNUSU9OX1NJWkUsXG4gICAgICAgICAgfSxcbiAgICAgICAgfSksXG4gICA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QiLCAiU3BsVG9rZW4iLCAiUmVndWxhck5mdCIsICJDb252ZXJ0ZXIiLCAiQWNjb3VudCIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiZ2V0QXNzb2NpYXRlZFRva2VuQWRkcmVzc1N5bmMiLCAiUmVndWxhck5mdCIsICJBY2NvdW50IiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJSZWd1bGFyTmZ0IiwgIlNwbFRva2VuIiwgIlJlZ3VsYXJOZnQiLCAiUGhhbnRvbU1ldGFwbGV4IiwgIkNvbnZlcnRlciIsICJtaW50IiwgIkFjY291bnQiLCAiVHJhbnNhY3Rpb24iLCAiUmVndWxhck5mdCIsICJzaWciLCAiUmVndWxhck5mdCIsICJjcmVhdGVNaW50VG9DaGVja2VkSW5zdHJ1Y3Rpb24iLCAiVE9LRU5fUFJPR1JBTV9JRCIsICJUcmFuc2FjdGlvbiIsICJQaGFudG9tU3BsVG9rZW4iLCAiVHJhbnNhY3Rpb24iLCAiQWNjb3VudCIsICJjcmVhdGVNaW50VG9DaGVja2VkSW5zdHJ1Y3Rpb24iLCAiVE9LRU5fUFJPR1JBTV9JRCIsICJLZXlwYWlyIiwgIlRyYW5zYWN0aW9uIiwgIlBoYW50b21TcGxUb2tlbiIsICJUcmFuc2FjdGlvbiIsICJtaW50IiwgIktleXBhaXIiLCAiQ29udmVydGVyIiwgIlNwbFRva2VuIiwgInNpZyIsICJQaGFudG9tU3BsVG9rZW4iXQp9Cg== \ No newline at end of file +//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL3JlZ3VsYXItbmZ0L21pbnQudHMiLCAiLi4vLi4vc3VpdGUtc3BsLXRva2VuL3NyYy9hZGQudHMiLCAiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9iYXRjaC50cyIsICIuLi8uLi9ub2R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gICAgIGlmICh1cGxvYWRlZC5pc0Vycikge1xuICAgICAgICB0aHJvdyB1cGxvYWRlZDtcbiAgICAgIH1cbiAgICAgIGNvbnN0IHVyaSA9IHVwbG9hZGVkLnZhbHVlO1xuXG4gICAgICBjb25zdCBkYXRhdjIgPSBDb252ZXJ0ZXIuUmVndWxhck5mdE1ldGFkYXRhLmludG9JbmZyYShcbiAgICAgICAgaW5wdXQsXG4gICAgICAgIHVyaSxcbiAgICAgICAgc2VsbGVyRmVlQmFzaXNQb2ludHMsXG4gICAgICApO1xuXG4gICAgICBjb25zdCBjb25uZWN0aW9uID0gTm9kZS5nZXRDb25uZWN0aW9uKCk7XG4gICAgICBjb25zdCBtaW50ID0gQWNjb3VudC5LZXlwYWlyLmNyZWF0ZSgpO1xuICAgICAgY29uc3QgaXNNdXRhYmxlID0gdHJ1ZTtcblxuICAgICAgZGVidWdMb2coJyMgcHJvcGVydGllczogJywgcHJvcGVydGllcyk7XG4gICAgICBkZWJ1Z0xvZygnIyBzZWxsZXJGZWVCYXNpc1BvaW50czogJywgc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgZGVidWdMb2coJyMgbWludDogJywgbWludC5wdWJrZXkpO1xuXG4gICAgICBjb25zdCB0eCA9IG5ldyBUcmFuc2FjdGlvbigpO1xuXG4gICAgICBjb25zdCBpbnN0cyA9IGF3YWl0IFJlZ3VsYXJOZnQuY3JlYXRlTWludChcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBwaGFudG9tLnB1YmxpY0tleSEsXG4gICAgICAgIGRhdGF2MixcbiAgICAgICAgcGhhbnRvbS5wdWJsaWNLZXkhLFxuICAgICAgICBpc011dGFibGUsXG4gICAgICApO1xuXG4gICAgICBpbnN0cy5mb3JFYWNoKChpbnN0OiBUcmFuc2FjdGlvbkluc3RydWN0aW9uKSA9PiB7XG4gICAgICAgIHR4LmFkZChpbnN0KTtcbiAgICAgIH0pO1xuICAgICAgdHguZmVlUGF5ZX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ID0+IHtcbiAgICAgIGNvbnN0IHBheWVyID0gb3B0aW9ucy5mZWVQYXllciA/IG9wdGlvbnMuZmVlUGF5ZXIgOiBvd25lck9yTXVsdGlzaWdbMF07XG4gICAgICBjb25zdCBrZXlwYWlycyA9IG93bmVyT3JNdWx0aXNpZy5tYXAoKHMpID0+IHMudG9LZXlwYWlyKCkpO1xuXG4gICAgICBjb25zdCB0b2tlbkFzc29jaWF0ZWQgPSBhd2FpdCBBY2NvdW50LkFzc29jaWF0ZWQucmV0cnlHZXRPckNyZWF0ZShcbiAgICAgICAgdG9rZW4sXG4gICAgICAgIG93bmVyLFxuICAgICAgICBwYXllcixcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVNaW50VG9DaGVja2VkSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHRva2VuLnRvUHVibGljS2V5KCksXG4gICAgICAgIHRva2VuQXNzb2NpYXRlZC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICBDYWxjdWxhdGUuY2FsY3VsYXRlQW1vdW50KHRvdGFsQW1vdW50LCBtaW50RGVjaW1hbCksXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICBrZXlwYWlycyxcbiAgICAgICk7XG5cbiAgICAgIHJldHVybiBuZXcgVHJhbnNhY3Rpb25CdWlsZGVyLkNvbW1vbjxQdWJrZXk+KFxuICAgICAgICBbaW5zdF0sXG4gICAgICAgIGtleXBhaXJzLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgdG9rZW4sXG4gICAgICApO1xuICAgIH0pO1xuICB9O1xufVxuIiwgImltcG9ydCB7IENvbW1pdG1lbnQsIFB1YmxpY0tleSB9IGZyb20gJ0Bzb2xhbmEvd2ViMy5qcyc7XG5pbXBvcnQgU29sYW5hSnNvbkNvbmZpZyBmcm9tICdAc29sYW5hLXN1aXRlL2NvbmZpZy9sb2FkJztcblxubGV0IEN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Rocm93IEVycm9yKFxuICAgICAgICAgICAgICBgb25seSBJbnN0cnVjdGlvbiBvYmplY3QgdGhhdCBjYW4gdXNlIGJhdGNoU3VibWl0KCkuXG4gICAgICAgICAgICBJbmRleDogJHtpfSwgU2V0IHZhbHVlOiAke0pTT04uc3RyaW5naWZ5KGEpfWAsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICBpKys7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBpbnN0cnVjdGlvbnMgPSBhcnIuZmxhdE1hcCgoYSkgPT4gYS5pbnN0cnVjdGlvbnMpO1xuICAgICAgICBjb25zdCBzaWduZXJzID0gYXJyLmZsYXRNYXAoKGEpID0+IGEuc2lnbmVycyk7XG4gICAgICAgIGNvbnN0IGZlZVBheWVycyA9IGFyci5maWx0ZXIoKGEpID0+IGEuZmVlUGF5ZXIgIT09IHVuZGVmaW5lZCk7XG4gICAgICAgIGxldCBmZWVQYXllciA9IHNpZ25lcnNbMF07XG4gICAgICAgIGlmIChmZWVQYXllcnMubGVuZ3RoID4gMCAmJiBmZWVQYXllcnNbMF0uZmVlUGF5ZXIpIHtcbiAgICAgICAgICBmZWVQYXllciA9IGZlZVBheWVyc1swXS5mZWVQYXllcjtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHRyYW5zYWN0aW9uID0gbmV3IFRyYW5zYWN0aW9uKCk7XG4gICAgICAgIGxldCBmaW5hbFNpZ25lcnMgPSBzaWduZXJzO1xuICAgICAgICBpZiAoZmVlUGF5ZXIpIHtcbiAgICAgICAgICB0cmFuc2FjdGlvbi5mZWVQYXllciA9IGZlZVBheWVyLnB1YmxpY0tleTtcbiAgICAgICAgICBmaW5hbFNpZ25lcnMgPSBbZmVlUGF5ZXIsIC4uLnNpZ25lcnNdO1xuICAgICAgICB9XG4gICAgICAgIGluc3RydWN0aW9ucy5tYXAoKGluc3QpID0+IHRyYW5zYWN0aW9uLmFkZChpbnN0KSk7XG5cbiAgICAgICAgLy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5wdXRDb2xsZWN0aW9uPiB8IHVuZGVmaW5lZCxcbiAgICApOiBPcHRpb248SW50ZXJuYWxDb2xsZWN0aW9uPiA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBudWxsO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4ge1xuICAgICAgICBrZXk6IGlucHV0LnRvUHVibGljS2V5KCksXG4gICAgICAgIHZlcmlmaWVkOiBmYWxzZSxcbiAgICAgIH07XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlciA9IChcbiAgICAgIG91dHB1dDogT3B0aW9uPEludGVybmFsQ29sbGVjdGlvbj4sXG4gICAgKTogQ29sbGVjdGlvblR5cGUgfCB1bmRlZmluZWQgPT4ge1xuICAgICAgaWYgKCFvdXRwdXQpIHtcbiAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIHtcbiAgICAgICAgYWRkcmVzczogb3V0cHV0LmtleS50b1N0cmluZygpLFxuICAgICAgICB2ZXJpZmllZDogb3V0cHV0LnZlcmlmaWVkLFxuICAgICAgfTtcbiAgICB9O1xuICB9XG5cbiAgZXhwb3J0IG5hbWVzcGFjZSBDb2xsZWN0aW9uTWludCB7XG4gICAgZXhwb3J0IGNvbnN0IGludG9Vc2VyID0gKG91dHB1dDogR3JvdXBpbmdbXSk6IFB1YmtleSA9PiB7XG4gICAgICBjb25zdCByZXMgPSBvdXRwdXQuZmluZCgodmFsdWUpID0+IHtcbiAgICAgICAgaWYgKHZhbHVlLmdyb3VwX2tleSA9PT0gJ2NvbGxlY3Rpb24nKSB7XG4gICAgICAgICAgcmV0dXJuIHZhbHVlLmdyb3VwX3ZhbHVlO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIHJldHVybiByZXMgPyByZXMuZ3JvdXBfdmFsdWUgOiAnJztcbiAgICB9O1xuICB9XG59XG4iLCAiLyogZXNsaW50LWRpc2FibGUgQ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ZmVlX2Jhc2lzX3BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ25hbWUnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLm5hbWUpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNOYW1lKG1ldGFkYXRhLm5hbWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc3ltYm9sJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5zeW1ib2wpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTeW1ib2wobWV0YWRhdGEuc3ltYm9sKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgICAgIGlmIChyZXMgJiYgcmVzLmlzRXJyKSB7XG4gICAgICAgICAgcmVzdWx0cy5wdXNoKC4uLnJlcy5lcnJvci5kZXRhaWxzKTtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgICBpZiAocmVzdWx0cy5sZW5ndGggPiAwKSB7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPVx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24uZ2V0UGFyc2VkVG9rZW5BY2NvdW50c0J5T3duZXIoXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIHtcbiAgICAgICAgICBwcm9ncmFtSWQ6IFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgIH0sXG4gICAgICApO1xuXG4gICAgICBjb25zdCBkYXRhcyA9IGluZm8udmFsdWUubWFwKGFzeW5jIChkKSA9PiB7XG4gICAgICAgIGNvbnN0IG1pbnQgPSBkLmFjY291bnQuZGF0YS5wYXJzZWQuaW5mby5taW50IGFzIFB1YmtleTtcbiAgICAgICAgY29uc3QgdG9rZW5BbW91bnQgPSBkLmFjY291bnQuZGF0YS5wYXJzZWQuaW5mby50b2tlbkFtb3VudFxuICAgICAgICAgIC5hbW91bnQgYXMgc3RyaW5nO1xuICAgICAgICBpZiAodG9rZW5BbW91bnQgPT09ICcxJykge1xuICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gTWV0YWRhdGEuZnJvbUFjY291bnRBZGRyZXNzKFxuICAgICAgICAgIGNvbm5lY3Rpb24sXG4gICAgICAgICAgQWNjb3VudC5QZGEuZ2V0TWV0YWRhdGEobWludCksXG4gICAgICAgIClcbiAgICAgICAgICAudGhlbihhc3luYyAobWV0YWRhdGEpID0+IHtcbiAgICAgICAgICAgIC8qIGVzbGludC1kaXNhYmxlIEB0eXBlc2NyaXB0LWVzbGludC9uby1leHBsaWNpdC1hbnkgKi9cbiAgICAgICAgICAgIHJldHVybiBmZXRjaFJldHJ5KG1ldGFkYXRhLmRhdGEudXJpKS50aGVuKChqc29uOiBhbnkpID0+IHtcbiAgICAgICAgICAgICAgcmV0dXJuIGNvbnZlcnRlcihtZXRhZGF0YSwganNvbiwgdG9rZW5BbW91bnQpO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfSlcbiAgICAgICAgICAuY2F0Y2goKGVycikgPT4gZGVidWdMb2coJyMgW0ZldGNoIGVycm9yXScs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gICAgIGZlZVBheWVyLFxuICAgICAgKTtcblxuICAgICAgY29uc3QgZGVzdFRva2VuID0gYXdhaXQgQWNjb3VudC5Bc3NvY2lhdGVkLm1ha2VPckNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICBtaW50LFxuICAgICAgICBkZXN0LFxuICAgICAgICBmZWVQYXllcixcbiAgICAgICk7XG5cbiAgICAgIGxldCBpbnN0MjtcbiAgICAgIGNvbnN0IGJsb2NraGFzaE9iaiA9IGF3YWl0IE5vZGUuZ2V0Q29ubmVjdGlvbigpLmdldExhdGVzdEJsb2NraGFzaCgpO1xuXG4gICAgICBjb25zdCB0eCA9IG5ldyBUcmFuc2FjdGlvbih7XG4gICAgICAgIGxhc3RWYWxpZEJsb2NrSGVpZ2h0OiBibG9ja2hhc2hPYmoubGFzdFZhbGlkQmxvY2tIZWlnaHQsXG4gICAgICAgIGJsb2NraGFzaDogYmxvY2toYXNoT2JqLmJsb2NraGFzaCxcbiAgICAgICAgZmVlUGF5ZXI6IGZlZVBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICB9KTtcblxuICAgICAgaW5zdDIgPSBjcmVhdGVUcmFuc2ZlckNoZWNrZWRJbnN0cnVjdGlvbihcbiAgICAgICAgc291cmNlVG9rZW4udG9rZW5BY2NvdW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgZGVzdFRva2VuLnRva2VuQWNjb3VudC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgQ2FsY3VsYXRvci5jYWxjdWxhdGVBbW91bnQoYW1vdW50LCBtaW50RGVjaW1hbCksXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICBbb3duZXIudG9LZXlwYWlyKCldLFxuICAgICAgKTtcblxuICAgICAgLy8gcmV0dXJuIGFzc29jaWF0ZWQgdG9rZW4gYWNjb3VudFxuICAgICAgaWYgKCFkZXN0VG9rZW4u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ldGFkYXRhUGRhID0gQWNjb3VudC5QZGEuZ2V0TWV0YWRhdGEobWludC50b1N0cmluZygpKTtcbiAgICBjb25zdCB0b2tlbkFzc29jaWF0ZWQgPSBnZXRBc3NvY2lhdGVkVG9rZW5BZGRyZXNzU3luYyhtaW50LCBvd25lcik7XG4gICAgY29uc3QgaW5zdHJ1Y3Rpb25zID0gW107XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIFN5c3RlbVByb2dyYW0uY3JlYXRlQWNjb3VudCh7XG4gICAgICAgIGZyb21QdWJrZXk6IGZlZVBheWVyLFxuICAgICAgICBuZXdBY2NvdW50UHVia2V5OiBtaW50LFxuICAgICAgICBzcGFjZTogTUlOVF9TSVpFLFxuICAgICAgICBsYW1wb3J0czogbGFtcG9ydHMsXG4gICAgICAgIHByb2dyYW1JZDogVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgIH0pLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUluaXRpYWxpemVNaW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgIG1pbnQsXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICBvd25lcixcbiAgICAgICAgb3duZXIsXG4gICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgZmVlUGF5ZXIsXG4gICAgICAgIHRva2VuQXNzb2NpYXRlZCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIG1pbnQsXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZU1pbnRUb0NoZWNrZWRJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgdG9rZW5Bc3NvY2lhdGVkLFxuICAgICAgICBvd25lcixcbiAgICAgICAgQ2FsY3VsYXRlLmNhbGN1bGF0ZUFtb3VudCh0b3RhbEFtb3VudCwgbWludERlY2ltYWwpLFxuICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlQ3JlYXRlTWV0YWRhdGFBY2NvdW50VjNJbnN0cnVjdGlvbihcbiAgICAgICAge1xuICAgICAgICAgIG1ldGFkYXRhOiBtZXRhZGF0YVBkYSxcbiAgICAgICAgICBtaW50LFxuICAgICAgICAgIG1pbnRBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICAgIHBheWVyOiBmZWVQYXllcixcbiAgICAgICAgICB1cGRhdGVBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICB9LFxuICAgICAgICB7XG4gICAgICAgICAgY3JlYXRlTWV0YWRhdGFBY2NvdW50QXJnc1YzOiB7XG4gICAgICAgICAgICBkYXRhOiB0b2tlbk1ldGFkYXRhLFxuICAgICAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgICAgICAgY29sbGVjdGlvbkRldGFpbHM6IG51bGwsXG4gICAgICAgICAgfSxcbiAgICAgICAgfSxcbiAgICAgICksXG4gICAgKTtcbiAgICByZXR1cm4gaW5zdHJ1Y3Rpb25zO1xuICB9O1xuXG4gIC8qKlxuICAgKiBTUEwtVE9LRU4gbWludFxuICAgKlxuICAgKiBAcGFyYW0ge1NlY3JldH0gb3duZXIgICAgICAvLyB0b2tlbiBvd25lciBTZWNyZXRcbiAgICogQHBhcmFtIHtudW1iZXJ9IHRvdGFsQW1vdW50IC8vIHRvdGFsIG51bWJlclxuICAgKiBAcGFyYW0ge251bWJlcn0gbWludERlY2ltYWwgLy8gdG9rZW4gZGVjaW1hbFxuICAgKiBAcGFyYW0ge0lucHV0VG9rZW5NZXRhZGF0YX0gaW5wdXQgICAgICAgLy8gdG9rZW4gbWV0YWRhdGFcbi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ICAubWFwKGFzeW5jIChpdGVtKSA9PiB7XG4gICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgIGNvbnN0IG9mZmNoYWluOiBPZmZjaGFpbiA9IGF3YWl0IGZldGNoT2ZmY2hhaW4oXG4gICAgICAgICAgICAgIGl0ZW0uY29udGVudC5qc29uX3VyaSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgICBjb25zdCBtZXJnZWQgPSB7XG4gICAgICAgICAgICAgIG9uY2hhaW46IGl0ZW0sXG4gICAgICAgICAgICAgIG9mZmNoYWluOiBvZmZjaGFpbixcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICByZXR1cm4gQ29udmVydGVyLk5mdC5pbnRvVXNlcihtZXJnZWQpO1xuICAgICAgICAgIH0gY2F0Y2ggKGVycikge1xuICAgICAgICAgICAgZGVidWdMb2coJyMgRmFpbGVkIGZldGNoIG9mZmNoYWluIHVybDogJywgaXRlbS5jb250ZW50Lmpzb25fdXJpKTtcbiAgICAgICAgICAgIHJldHVybiBDb252ZXJ0ZXIuTmZ0LmludG9Vc2VyKHtcbiAgICAgICAgICAgICAgb25jaGFpbjogaXRlbSxcbiAgICAgICAgICAgICAgb2ZmY2hhaW46IHt9LFxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfVxuICAgICAgICB9KSxcbiAgICApO1xuICAgIHJldHVybiB7XG4gICAgICBwYWdlOiBhc3NldHMudmFsdWUucGFnZSxcbiAgICAgIHRvdGFsOiBhc3NldHMudmFsdWUudG90YWwsXG4gICAgICBsaW1pdDogYXNzZXRzLnZhbHVlLmxpbWl0LFxuICAgICAgbWV0YWRhdGFzLFxuICAgIH07XG4gIH07XG5cbiAgLyoqXG4gICAqIEZpbmQgbmZ0IGJ5IGNvbGxlY3Rpb24gbWludFxuICAgKlxuICAgKiBAcGFyYW0ge1B1YmtleX0gY29sbGVjdGlvbk1pbnRcbiAgICogQHBhcmFtIHtib29sZWFufSBpc0NvbXByZXNzZWQsXG4gICAqIEBwYXJh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25lciwgb3duZXIpKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKGZlZVBheWVyLCBhdGEsIG93bmVyLCBtaW50KSxcbiAgICApO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goY3JlYXRlTWludFRvQ2hlY2tlZEluc3RydWN0aW9uKG1pbnQsIGF0YSwgb3duZXIsIDEsIDApKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlQ3JlYXRlTWV0YWRhdGFBY2NvdW50VjNJbnN0cnVjdGlvbihcbiAgICAgICAge1xuICAgICAgICAgIG1ldGFkYXRhOiB0b2tlbk1ldGFkYXRhUHVia2V5LFxuICAgICAgICAgIG1pbnQsXG4gICAgICAgICAgbWludEF1dGhvcml0eTogb3duZXIsXG4gICAgICAgICAgcGF5ZXI6IGZlZVBheWVyLFxuICAgICAgICAgIHVwZGF0ZUF1dGhvcml0eTogb3duZXIsXG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICBjcmVhdGVNZXRhZGF0YUFjY291bnRBcmdzVjM6IHtcbiAgICAgICAgICAgIGRhdGE6IG5mdE1ldGFkYXRhLFxuICAgICAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgICAgICAgY29sbGVjdGlvbkRldGFpbHM6IG51bGwsXG4gICAgICAgICAgfSxcbiAgICAgICAgfSxcbiAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlQ3JlYXRlTWFzdGVyRWRpdGlvblYzSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHtcbiAgICAgICAgICBlZGl0aW9uOiBtYXN0ZXJFZGl0aW9uUHVia2V5LFxuICAgICAgICAgIG1pbnQsXG4gICAgICAgICAgdXBkYXRlQXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBtaW50QXV0aG9yaX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wbG9hZERhdGEoXG4gICAgICAgICAgeyAuLi5zdG9yYWdlTWV0YWRhdGEsIC4uLmltYWdlIH0sXG4gICAgICAgICAgc3RvcmFnZVR5cGUsXG4gICAgICAgICAgcGF5ZXIsXG4gICAgICAgICk7XG4gICAgICAgIGlmICh1cGxvYWRlZC5pc0Vycikge1xuICAgICAgICAgIHRocm93IHVwbG9hZGVkO1xuICAgICAgICB9XG4gICAgICAgIHVyaSA9IHVwbG9hZGVkLnZhbHVlO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgdGhyb3cgRXJyb3IoYE11c3Qgc2V0IGZpbGVQYXRoJyBvciAndXJpJ2ApO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBkYXRhdjIgPSBDb252ZXJ0ZXIuUmVndWxhck5mdE1ldGFkYXRhLmludG9JbmZyYShcbiAgICAgICAgaW5wdXQsXG4gICAgICAgIHVyaSxcbiAgICAgICAgc2VsbGVyRmVlQmFzaXNQb2ludHMsXG4gICAgICApO1xuXG4gICAgICBjb25zdCBpc011dGFibGUgPSBpbnB1dC5pc011dGFibGUgPT09IHVuZGVmaW5lZCA/IHRydWUgOiBpbnB1dC5pc011dGFibGU7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGlucHV0OiAnLCBpbnB1dCk7XG4gICAgICBkZWJ1Z0xvZygnIyBkYXRhdjI6ICcsIGRhdGF2Mik7XG5cbiAgICAgIGNvbnN0IG1pbnQgPSBBY2NvdW50LktleXBhaXIuY3JlYXRlKCk7XG5cbiAgICAgIGNvbnN0IGluc3RydWN0aW9ucyA9IGF3YWl0IGNyZWF0ZU1pbnQoXG4gICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgIGRhdGF2MixcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICBpc011dGFibGUsXG4gICAgICApO1xuXG4gICAgICAvLyBmcmVlemVBdXRob3JpdHlcbiAgICAgIGlmIChmcmVlemVBdXRob3JpdHkpIHtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgICAgY3JlYXRlRGVsZWFnYXRlKFxuICAgICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgICAgICBmcmVlemVBdXRob3JpdHkudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICAvLyBjb2xsZWN0aW9uIC0tLVxuICAgICAgaWYgKGlucHV0LmNvbGxlY3Rpb24pIHtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgICAgY3JlYXRlVmVyaWZ5U2l6ZWRDb2xsZWN0aW9uKFxuICAgICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgaW5wdXQuY29sbGVjdGlvbi50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGtleXBhaXJzID0gW293bmVyLnRvS2V5cGFpcigpLCBtaW50LnRvS2V5cGFpcigpXTtcblxuICAgICAgLy8gY3JlYXRvciAtLS1cbiAgICAgIGlmIChpbnB1dC5jcmVhdG9ycykge1xuICAgICAgICBpbnB1dC5jcmVhdG9ycy5mb3JFYWNoKChjcmVhdG9yKSA9PiB7XG4gICAgICAgICAgaWYgKEFjY291bnQuS2V5cGFpci5pc1NlY3JldChjcmVhdG9yLnNlY3JldCkpIHtcbiAgICAgICAgICAgIGNvbnN0IGNyZWF0b3JQdWJrZXkgPSBjcmVhdG9yLmFkZHJlc3MudG9QdWJsaWNLZXkoKTtcbiAgICAgICAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVWZXJpZnlDcmVhdG9yKG1pbnQudG9QdW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3QgY29sbGVjdGlvbk1ldGFkYXRhQWNjb3VudCA9IEFjY291bnQuUGRhLmdldE1ldGFkYXRhKFxuICAgICAgICBjb2xsZWN0aW9uTWludC5wdWJrZXksXG4gICAgICApO1xuXG4gICAgICBjb25zdCBpbnN0cnVjdGlvbnMgPSBhd2FpdCBNaW50LmNyZWF0ZU1pbnQoXG4gICAgICAgIGNvbGxlY3Rpb25NaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICBkYXRhdjIsXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgKTtcblxuICAgICAgLy8gZnJlZXplQXV0aG9yaXR5XG4gICAgICBpZiAoZnJlZXplQXV0aG9yaXR5KSB7XG4gICAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICAgIE1pbnQuY3JlYXRlRGVsZWFnYXRlKFxuICAgICAgICAgICAgY29sbGVjdGlvbk1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICAgICAgZnJlZXplQXV0aG9yaXR5LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgY29sbGVjdGlvbnMgPSB7XG4gICAgICAgIGNvbGxlY3Rpb25NZXRhZGF0YTogY29sbGVjdGlvbk1ldGFkYXRhQWNjb3VudCxcbiAgICAgICAgY29sbGVjdGlvbkF1dGhvcml0eTogb3duZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICBjb2xsZWN0aW9uTWludDogY29sbGVjdGlvbk1pbnQudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgfTtcblxuICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgIGNyZWF0ZVNldENvbGxlY3Rpb25TaXplSW5zdHJ1Y3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hY3Rpb24iLCAiUGhhbnRvbVNwbFRva2VuIiwgIlRyYW5zYWN0aW9uIiwgIkFjY291bnQiLCAiY3JlYXRlTWludFRvQ2hlY2tlZEluc3RydWN0aW9uIiwgIlRPS0VOX1BST0dSQU1fSUQiLCAiS2V5cGFpciIsICJUcmFuc2FjdGlvbiIsICJQaGFudG9tU3BsVG9rZW4iLCAiVHJhbnNhY3Rpb24iLCAibWludCIsICJLZXlwYWlyIiwgIkNvbnZlcnRlciIsICJTcGxUb2tlbiIsICJzaWciLCAiUGhhbnRvbVNwbFRva2VuIl0KfQo= \ No newline at end of file diff --git a/packages/suite-regular-nft/dist/index.js b/packages/suite-regular-nft/dist/index.js index ff1966491..ae6cc715b 100644 --- a/packages/suite-regular-nft/dist/index.js +++ b/packages/suite-regular-nft/dist/index.js @@ -35,7 +35,7 @@ __export(src_exports, { module.exports = __toCommonJS(src_exports); // ../suite-spl-token/src/add.ts -var import_spl_token2 = require("@solana/spl-token"); +var import_spl_token = require("@solana/spl-token"); // ../suite-utils/src/constants.ts var import_web3 = require("@solana/web3.js"); @@ -482,14 +482,11 @@ var TransactionBuilder5; // ../global/src/index.ts var import_web39 = require("@solana/web3.js"); -// ../account/src/associated.ts -var import_spl_token = require("@solana/spl-token"); - // ../account/src/keypair.ts var import_web37 = require("@solana/web3.js"); var import_bs58 = __toESM(require("bs58")); var Account; -((Account5) => { +((Account4) => { class Keypair4 { secret; pubkey; @@ -525,111 +522,16 @@ var Account; }); }; } - Account5.Keypair = Keypair4; + Account4.Keypair = Keypair4; })(Account || (Account = {})); -// ../account/src/associated.ts -var Account2; -((Account5) => { - let Associated; - ((Associated2) => { - const RETRY_OVER_LIMIT = 10; - const RETRY_SLEEP_TIME = 3; - const get = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const res = await (0, Associated2.makeOrCreateInstruction)( - mint, - owner, - new Account.Keypair({ secret: feePayer }).pubkey, - allowOwnerOffCurve - ); - if (!res.inst) { - return res.tokenAccount; - } - return new TransactionBuilder6.Common( - [res.inst], - [], - feePayer.toKeypair(), - res.tokenAccount - ); - }; - Associated2.retryGetOrCreate = async (mint, owner, feePayer) => { - let counter = 1; - while (counter < RETRY_OVER_LIMIT) { - try { - const inst = await get(mint, owner, feePayer, true); - if (inst && typeof inst === "string") { - debugLog("# associatedTokenAccount: ", inst); - return inst; - } else if (inst instanceof TransactionBuilder6.Common) { - (await inst.submit()).map( - async (ok) => { - await Node.confirmedSig(ok); - return inst.data; - }, - (err) => { - debugLog("# Error submit retryGetOrCreate: ", err); - throw err; - } - ); - } - } catch (e) { - debugLog(`# retry: ${counter} create token account: `, e); - debugLog(`# mint: ${mint}, owner: ${owner}, feePayer: ${feePayer}`); - } - await sleep(RETRY_SLEEP_TIME); - counter++; - } - throw Error(`retry action is over limit ${RETRY_OVER_LIMIT}`); - }; - Associated2.makeOrCreateInstruction = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const associatedTokenAccount = (0, import_spl_token.getAssociatedTokenAddressSync)( - mint.toPublicKey(), - owner.toPublicKey(), - allowOwnerOffCurve, - import_spl_token.TOKEN_PROGRAM_ID, - import_spl_token.ASSOCIATED_TOKEN_PROGRAM_ID - ); - debugLog("# associatedTokenAccount: ", associatedTokenAccount.toString()); - try { - await (0, import_spl_token.getAccount)( - Node.getConnection(), - associatedTokenAccount, - Node.getConnection().commitment, - import_spl_token.TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst: void 0 - }; - } catch (error) { - if (!(error instanceof import_spl_token.TokenAccountNotFoundError) && !(error instanceof import_spl_token.TokenInvalidAccountOwnerError)) { - throw Error("Unexpected error"); - } - const payer = !feePayer ? owner : feePayer; - const inst = (0, import_spl_token.createAssociatedTokenAccountInstruction)( - payer.toPublicKey(), - associatedTokenAccount, - owner.toPublicKey(), - mint.toPublicKey(), - import_spl_token.TOKEN_PROGRAM_ID, - import_spl_token.ASSOCIATED_TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst - }; - } - }; - })(Associated = Account5.Associated || (Account5.Associated = {})); -})(Account2 || (Account2 = {})); - // ../account/src/pda.ts var import_web38 = require("@solana/web3.js"); var import_mpl_token_metadata = require("@metaplex-foundation/mpl-token-metadata"); var import_mpl_bubblegum = require("@metaplex-foundation/mpl-bubblegum"); var import_bn = __toESM(require("bn.js")); -var Account3; -((Account5) => { +var Account2; +((Account4) => { let Pda; ((Pda2) => { Pda2.getMetadata = (address) => { @@ -681,14 +583,13 @@ var Account3; ); return assetId.toString(); }; - })(Pda = Account5.Pda || (Account5.Pda = {})); -})(Account3 || (Account3 = {})); + })(Pda = Account4.Pda || (Account4.Pda = {})); +})(Account2 || (Account2 = {})); // ../account/src/index.ts -var Account4 = { - ...Account2, +var Account3 = { ...Account, - ...Account3 + ...Account2 }; // ../global/src/index.ts @@ -719,7 +620,7 @@ String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, op } return url; } - if (Account4.Keypair.isPubkey(addressOrSignature)) { + if (Account3.Keypair.isPubkey(addressOrSignature)) { if (explorer === "solanafm" /* SolanaFM */) { url = `${Constants.EXPLORER_SOLANAFM_URL}/address/${addressOrSignature}?cluster=${cluster}`; } else if (explorer === "xray" /* Xray */) { @@ -739,13 +640,13 @@ String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, op return url; }; String.prototype.toPublicKey = function() { - if (!Account4.Keypair.isPubkey(this.toString())) { + if (!Account3.Keypair.isPubkey(this.toString())) { throw Error(`No match KeyPair.PubKey: ${this.toString()}`); } return new import_web39.PublicKey(this.toString()); }; String.prototype.toKeypair = function() { - if (!Account4.Keypair.isSecret(this.toString())) { + if (!Account3.Keypair.isSecret(this.toString())) { throw Error(`No match KeyPair.Secret: ${this.toString()}`); } const decoded = import_bs582.default.decode(this.toString()); @@ -1550,12 +1451,12 @@ var SplToken2; return Try(async () => { const payer = options.feePayer ? options.feePayer : ownerOrMultisig[0]; const keypairs = ownerOrMultisig.map((s) => s.toKeypair()); - const tokenAssociated = await Account4.Associated.retryGetOrCreate( + const tokenAssociated = await Account3.Associated.retryGetOrCreate( token, owner, payer ); - const inst = (0, import_spl_token2.createMintToCheckedInstruction)( + const inst = (0, import_spl_token.createMintToCheckedInstruction)( token.toPublicKey(), tokenAssociated.toPublicKey(), owner.toPublicKey(), @@ -1574,18 +1475,18 @@ var SplToken2; })(SplToken2 || (SplToken2 = {})); // ../suite-spl-token/src/burn.ts -var import_spl_token3 = require("@solana/spl-token"); +var import_spl_token2 = require("@solana/spl-token"); var SplToken3; ((SplToken11) => { SplToken11.burn = (mint, owner, ownerOrMultisig, burnAmount, tokenDecimals, options = {}) => { return Try(() => { - const tokenAccount = (0, import_spl_token3.getAssociatedTokenAddressSync)( + const tokenAccount = (0, import_spl_token2.getAssociatedTokenAddressSync)( mint.toPublicKey(), owner.toPublicKey() ); const payer = options.feePayer ? options.feePayer : ownerOrMultisig[0]; const keypairs = ownerOrMultisig.map((s) => s.toKeypair()); - const inst = (0, import_spl_token3.createBurnCheckedInstruction)( + const inst = (0, import_spl_token2.createBurnCheckedInstruction)( tokenAccount, mint.toPublicKey(), owner.toPublicKey(), @@ -1600,7 +1501,7 @@ var SplToken3; // ../suite-spl-token/src/find.ts var import_mpl_token_metadata2 = require("@metaplex-foundation/mpl-token-metadata"); -var import_spl_token4 = require("@solana/spl-token"); +var import_spl_token3 = require("@solana/spl-token"); var import_cross_fetch = __toESM(require("cross-fetch")); var SplToken4; ((SplToken11) => { @@ -1639,7 +1540,7 @@ var SplToken4; const info = await connection.getParsedTokenAccountsByOwner( owner.toPublicKey(), { - programId: import_spl_token4.TOKEN_PROGRAM_ID + programId: import_spl_token3.TOKEN_PROGRAM_ID } ); const datas = info.value.map(async (d) => { @@ -1650,7 +1551,7 @@ var SplToken4; } return import_mpl_token_metadata2.Metadata.fromAccountAddress( connection, - Account4.Pda.getMetadata(mint) + Account3.Pda.getMetadata(mint) ).then(async (metadata) => { return fetchRetry(metadata.data.uri).then((json) => { return converter(metadata, json, tokenAmount); @@ -1668,7 +1569,7 @@ var SplToken4; const connection = Node.getConnection(); const metadata = await import_mpl_token_metadata2.Metadata.fromAccountAddress( connection, - Account4.Pda.getMetadata(mint) + Account3.Pda.getMetadata(mint) ); debugLog("# findByMint metadata: ", metadata); if (metadata.tokenStandard === 0) { @@ -1685,20 +1586,20 @@ var SplToken4; })(SplToken4 || (SplToken4 = {})); // ../suite-spl-token/src/freeze.ts -var import_spl_token5 = require("@solana/spl-token"); +var import_spl_token4 = require("@solana/spl-token"); var SplToken5; ((SplToken11) => { SplToken11.freeze = (mint, owner, freezeAuthority, options = {}) => { return Try(() => { const payer = options.feePayer ? options.feePayer : freezeAuthority; - const tokenAccount = (0, import_spl_token5.getAssociatedTokenAddressSync)( + const tokenAccount = (0, import_spl_token4.getAssociatedTokenAddressSync)( mint.toPublicKey(), owner.toPublicKey() ); - const inst = (0, import_spl_token5.createFreezeAccountInstruction)( + const inst = (0, import_spl_token4.createFreezeAccountInstruction)( tokenAccount, mint.toPublicKey(), - new Account4.Keypair({ secret: freezeAuthority }).toPublicKey() + new Account3.Keypair({ secret: freezeAuthority }).toPublicKey() ); return new TransactionBuilder6.Common( [inst], @@ -1710,19 +1611,19 @@ var SplToken5; })(SplToken5 || (SplToken5 = {})); // ../suite-spl-token/src/gas-less-transfer.ts -var import_spl_token6 = require("@solana/spl-token"); +var import_spl_token5 = require("@solana/spl-token"); var import_web310 = require("@solana/web3.js"); var SplToken6; ((SplToken11) => { SplToken11.gasLessTransfer = async (mint, owner, dest, amount, mintDecimal, feePayer) => { return Try(async () => { const ownerPublicKey = owner.toKeypair().publicKey; - const sourceToken = await Account4.Associated.makeOrCreateInstruction( + const sourceToken = await Account3.Associated.makeOrCreateInstruction( mint, ownerPublicKey.toString(), feePayer ); - const destToken = await Account4.Associated.makeOrCreateInstruction( + const destToken = await Account3.Associated.makeOrCreateInstruction( mint, dest, feePayer @@ -1734,27 +1635,18 @@ var SplToken6; blockhash: blockhashObj.blockhash, feePayer: feePayer.toPublicKey() }); + inst2 = (0, import_spl_token5.createTransferCheckedInstruction)( + sourceToken.tokenAccount.toPublicKey(), + mint.toPublicKey(), + destToken.tokenAccount.toPublicKey(), + ownerPublicKey, + SplToken.calculateAmount(amount, mintDecimal), + mintDecimal, + [owner.toKeypair()] + ); if (!destToken.inst) { - inst2 = (0, import_spl_token6.createTransferCheckedInstruction)( - sourceToken.tokenAccount.toPublicKey(), - mint.toPublicKey(), - destToken.tokenAccount.toPublicKey(), - ownerPublicKey, - SplToken.calculateAmount(amount, mintDecimal), - mintDecimal, - [owner.toKeypair()] - ); tx.add(inst2); } else { - inst2 = (0, import_spl_token6.createTransferCheckedInstruction)( - sourceToken.tokenAccount.toPublicKey(), - mint.toPublicKey(), - destToken.tokenAccount.toPublicKey(), - ownerPublicKey, - SplToken.calculateAmount(amount, mintDecimal), - mintDecimal, - [owner.toKeypair()] - ); tx.add(destToken.inst).add(inst2); } tx.recentBlockhash = blockhashObj.blockhash; @@ -1770,7 +1662,7 @@ var SplToken6; // ../suite-spl-token/src/mint.ts var import_web311 = require("@solana/web3.js"); -var import_spl_token7 = require("@solana/spl-token"); +var import_spl_token6 = require("@solana/spl-token"); var import_mpl_token_metadata3 = require("@metaplex-foundation/mpl-token-metadata"); // ../storage/src/provenance-layer.ts @@ -1998,39 +1890,39 @@ var SplToken7; ((SplToken11) => { const DEFAULT_STORAGE_TYPE = "nftStorage"; SplToken11.createFreezeAuthority = (mint2, owner, freezeAuthority) => { - return (0, import_spl_token7.createSetAuthorityInstruction)( + return (0, import_spl_token6.createSetAuthorityInstruction)( mint2, owner, - import_spl_token7.AuthorityType.FreezeAccount, + import_spl_token6.AuthorityType.FreezeAccount, freezeAuthority ); }; SplToken11.createMint = async (mint2, owner, totalAmount, mintDecimal, tokenMetadata, feePayer, isMutable) => { const connection = Node.getConnection(); - const lamports = await (0, import_spl_token7.getMinimumBalanceForRentExemptMint)(connection); - const metadataPda = Account4.Pda.getMetadata(mint2.toString()); - const tokenAssociated = (0, import_spl_token7.getAssociatedTokenAddressSync)(mint2, owner); + const lamports = await (0, import_spl_token6.getMinimumBalanceForRentExemptMint)(connection); + const metadataPda = Account3.Pda.getMetadata(mint2.toString()); + const tokenAssociated = (0, import_spl_token6.getAssociatedTokenAddressSync)(mint2, owner); const instructions = []; instructions.push( import_web311.SystemProgram.createAccount({ fromPubkey: feePayer, newAccountPubkey: mint2, - space: import_spl_token7.MINT_SIZE, + space: import_spl_token6.MINT_SIZE, lamports, - programId: import_spl_token7.TOKEN_PROGRAM_ID + programId: import_spl_token6.TOKEN_PROGRAM_ID }) ); instructions.push( - (0, import_spl_token7.createInitializeMintInstruction)( + (0, import_spl_token6.createInitializeMintInstruction)( mint2, mintDecimal, owner, owner, - import_spl_token7.TOKEN_PROGRAM_ID + import_spl_token6.TOKEN_PROGRAM_ID ) ); instructions.push( - (0, import_spl_token7.createAssociatedTokenAccountInstruction)( + (0, import_spl_token6.createAssociatedTokenAccountInstruction)( feePayer, tokenAssociated, owner, @@ -2038,7 +1930,7 @@ var SplToken7; ) ); instructions.push( - (0, import_spl_token7.createMintToCheckedInstruction)( + (0, import_spl_token6.createMintToCheckedInstruction)( mint2, tokenAssociated, owner, @@ -2117,7 +2009,7 @@ var SplToken7; ); debugLog("# datav2: ", datav2); debugLog("# upload content url: ", uri); - const mint2 = Account4.Keypair.create(); + const mint2 = Account3.Keypair.create(); const insts = await (0, SplToken11.createMint)( mint2.toPublicKey(), ownerPublicKey, @@ -2147,20 +2039,20 @@ var SplToken7; })(SplToken7 || (SplToken7 = {})); // ../suite-spl-token/src/thaw.ts -var import_spl_token8 = require("@solana/spl-token"); +var import_spl_token7 = require("@solana/spl-token"); var SplToken8; ((SplToken11) => { SplToken11.thaw = (mint, owner, freezeAuthority, options = {}) => { const payer = options.feePayer ? options.feePayer : freezeAuthority; return Try(() => { - const tokenAccount = (0, import_spl_token8.getAssociatedTokenAddressSync)( + const tokenAccount = (0, import_spl_token7.getAssociatedTokenAddressSync)( mint.toPublicKey(), owner.toPublicKey() ); - const inst = (0, import_spl_token8.createThawAccountInstruction)( + const inst = (0, import_spl_token7.createThawAccountInstruction)( tokenAccount, mint.toPublicKey(), - new Account4.Keypair({ secret: freezeAuthority }).toPublicKey() + new Account3.Keypair({ secret: freezeAuthority }).toPublicKey() ); return new TransactionBuilder6.Common( [inst], @@ -2172,33 +2064,39 @@ var SplToken8; })(SplToken8 || (SplToken8 = {})); // ../suite-spl-token/src/transfer.ts -var import_spl_token9 = require("@solana/spl-token"); +var import_spl_token8 = require("@solana/spl-token"); var SplToken9; ((SplToken11) => { SplToken11.transfer = async (mint, owner, dest, ownerOrMultisig, amount, mintDecimal, options = {}) => { return Try(async () => { const payer = options.feePayer ? options.feePayer : ownerOrMultisig[0]; + const payerPubkey = new Account3.Keypair({ secret: payer }); const keypairs = ownerOrMultisig.map((s) => s.toKeypair()); - const sourceToken = await Account4.Associated.retryGetOrCreate( + const sourceToken = await Account3.Associated.makeOrCreateInstruction( mint, - owner, - payer + owner.toString(), + payerPubkey.pubkey ); - const destToken = await Account4.Associated.retryGetOrCreate( + const destToken = await Account3.Associated.makeOrCreateInstruction( mint, dest, - payer + payerPubkey.pubkey ); - const inst = (0, import_spl_token9.createTransferCheckedInstruction)( - sourceToken.toPublicKey(), + const inst = (0, import_spl_token8.createTransferCheckedInstruction)( + sourceToken.tokenAccount.toPublicKey(), mint.toPublicKey(), - destToken.toPublicKey(), + destToken.tokenAccount.toPublicKey(), owner.toPublicKey(), SplToken.calculateAmount(amount, mintDecimal), mintDecimal, keypairs ); - return new TransactionBuilder6.Common([inst], keypairs, payer.toKeypair()); + const instructions = destToken.inst ? [destToken.inst, inst] : [inst]; + return new TransactionBuilder6.Common( + instructions, + keypairs, + payer.toKeypair() + ); }); }; })(SplToken9 || (SplToken9 = {})); @@ -2298,8 +2196,11 @@ var DasApi2; sortDirection: "desc" /* Desc */ }; DasApi4.fetchOffchain = async (uri) => { - const json = await (await fetch(uri)).json(); - return json; + const response = await fetch(uri); + if (response.status !== 200) { + return {}; + } + return await response.json(); }; DasApi4.findByMint = async (mint, isCompressed) => { const asset = await DasApi.getAsset(mint); @@ -2436,20 +2337,20 @@ var RegularNft2; })(RegularNft2 || (RegularNft2 = {})); // src/freeze.ts -var import_spl_token10 = require("@solana/spl-token"); +var import_spl_token9 = require("@solana/spl-token"); var import_mpl_token_metadata4 = require("@metaplex-foundation/mpl-token-metadata"); var RegularNft3; ((RegularNft11) => { RegularNft11.freeze = (mint, owner, freezeAuthority, options = {}) => { return Try(() => { const payer = options.feePayer ? options.feePayer : freezeAuthority; - const tokenAccount = (0, import_spl_token10.getAssociatedTokenAddressSync)( + const tokenAccount = (0, import_spl_token9.getAssociatedTokenAddressSync)( mint.toPublicKey(), owner.toPublicKey() ); - const editionAddress = Account4.Pda.getMasterEdition(mint); + const editionAddress = Account3.Pda.getMasterEdition(mint); const inst = (0, import_mpl_token_metadata4.createFreezeDelegatedAccountInstruction)({ - delegate: new Account4.Keypair({ + delegate: new Account3.Keypair({ secret: freezeAuthority }).toPublicKey(), tokenAccount, @@ -2467,22 +2368,22 @@ var RegularNft3; // src/mint.ts var import_web312 = require("@solana/web3.js"); -var import_spl_token11 = require("@solana/spl-token"); +var import_spl_token10 = require("@solana/spl-token"); var import_mpl_token_metadata5 = require("@metaplex-foundation/mpl-token-metadata"); var RegularNft4; ((RegularNft11) => { const NFT_AMOUNT = 1; const DEFAULT_STORAGE_TYPE = "nftStorage"; RegularNft11.createVerifyCreator = (mint2, creator) => { - const metadata = Account4.Pda.getMetadata(mint2.toString()); + const metadata = Account3.Pda.getMetadata(mint2.toString()); return (0, import_mpl_token_metadata5.createSignMetadataInstruction)({ metadata, creator }); }; RegularNft11.createDeleagate = (mint2, owner, delegateAuthority) => { - const tokenAccount = (0, import_spl_token11.getAssociatedTokenAddressSync)(mint2, owner); - return (0, import_spl_token11.createApproveInstruction)( + const tokenAccount = (0, import_spl_token10.getAssociatedTokenAddressSync)(mint2, owner); + return (0, import_spl_token10.createApproveInstruction)( tokenAccount, delegateAuthority, owner, @@ -2490,41 +2391,41 @@ var RegularNft4; ); }; RegularNft11.createVerifySizedCollection = (collectionChild, collectionParent, feePayer) => { - const collectionMetadata = Account4.Pda.getMetadata( + const collectionMetadata = Account3.Pda.getMetadata( collectionParent.toString() ); - const collectionMasterEditionAccount = Account4.Pda.getMasterEdition( + const collectionMasterEditionAccount = Account3.Pda.getMasterEdition( collectionParent.toString() ); return (0, import_mpl_token_metadata5.createVerifySizedCollectionItemInstruction)({ collection: collectionMetadata, collectionMasterEditionAccount, collectionMint: collectionParent, - metadata: Account4.Pda.getMetadata(collectionChild.toString()), + metadata: Account3.Pda.getMetadata(collectionChild.toString()), payer: feePayer, collectionAuthority: feePayer }); }; RegularNft11.createMint = async (mint2, owner, nftMetadata, feePayer, isMutable) => { - const ata = (0, import_spl_token11.getAssociatedTokenAddressSync)(mint2, owner); - const tokenMetadataPubkey = Account4.Pda.getMetadata(mint2.toString()); - const masterEditionPubkey = Account4.Pda.getMasterEdition(mint2.toString()); + const ata = (0, import_spl_token10.getAssociatedTokenAddressSync)(mint2, owner); + const tokenMetadataPubkey = Account3.Pda.getMetadata(mint2.toString()); + const masterEditionPubkey = Account3.Pda.getMasterEdition(mint2.toString()); const connection = Node.getConnection(); const instructions = []; instructions.push( import_web312.SystemProgram.createAccount({ fromPubkey: feePayer, newAccountPubkey: mint2, - lamports: await (0, import_spl_token11.getMinimumBalanceForRentExemptMint)(connection), - space: import_spl_token11.MINT_SIZE, - programId: import_spl_token11.TOKEN_PROGRAM_ID + lamports: await (0, import_spl_token10.getMinimumBalanceForRentExemptMint)(connection), + space: import_spl_token10.MINT_SIZE, + programId: import_spl_token10.TOKEN_PROGRAM_ID }) ); - instructions.push((0, import_spl_token11.createInitializeMintInstruction)(mint2, 0, owner, owner)); + instructions.push((0, import_spl_token10.createInitializeMintInstruction)(mint2, 0, owner, owner)); instructions.push( - (0, import_spl_token11.createAssociatedTokenAccountInstruction)(feePayer, ata, owner, mint2) + (0, import_spl_token10.createAssociatedTokenAccountInstruction)(feePayer, ata, owner, mint2) ); - instructions.push((0, import_spl_token11.createMintToCheckedInstruction)(mint2, ata, owner, 1, 0)); + instructions.push((0, import_spl_token10.createMintToCheckedInstruction)(mint2, ata, owner, 1, 0)); instructions.push( (0, import_mpl_token_metadata5.createCreateMetadataAccountV3Instruction)( { @@ -2628,7 +2529,7 @@ var RegularNft4; const isMutable = input.isMutable === void 0 ? true : input.isMutable; debugLog("# input: ", input); debugLog("# datav2: ", datav2); - const mint2 = Account4.Keypair.create(); + const mint2 = Account3.Keypair.create(); const instructions = await (0, RegularNft11.createMint)( mint2.toPublicKey(), ownerPublicKey, @@ -2657,7 +2558,7 @@ var RegularNft4; const keypairs = [owner.toKeypair(), mint2.toKeypair()]; if (input.creators) { input.creators.forEach((creator) => { - if (Account4.Keypair.isSecret(creator.secret)) { + if (Account3.Keypair.isSecret(creator.secret)) { const creatorPubkey = creator.address.toPublicKey(); const inst = (0, RegularNft11.createVerifyCreator)(mint2.toPublicKey(), creatorPubkey); instructions.push(inst); @@ -2731,7 +2632,7 @@ var RegularNft5; debugLog("# input: ", input); debugLog("# sellerFeeBasisPoints: ", sellerFeeBasisPoints); debugLog("# datav2: ", datav2); - const mint = Account4.Keypair.create(); + const mint = Account3.Keypair.create(); const insts = await RegularNft4.createMint( mint.toPublicKey(), ownerPublickey, @@ -2845,8 +2746,8 @@ var RegularNft7; const isMutable = input.isMutable === void 0 ? true : input.isMutable; debugLog("# input: ", input); debugLog("# datav2: ", datav2); - const collectionMint = Account4.Keypair.create(); - const collectionMetadataAccount = Account4.Pda.getMetadata( + const collectionMint = Account3.Keypair.create(); + const collectionMetadataAccount = Account3.Pda.getMetadata( collectionMint.pubkey ); const instructions = await RegularNft4.createMint( @@ -2888,20 +2789,20 @@ var RegularNft7; })(RegularNft7 || (RegularNft7 = {})); // src/thaw.ts -var import_spl_token12 = require("@solana/spl-token"); +var import_spl_token11 = require("@solana/spl-token"); var import_mpl_token_metadata7 = require("@metaplex-foundation/mpl-token-metadata"); var RegularNft8; ((RegularNft11) => { RegularNft11.thaw = (mint, owner, freezeAuthority, options = {}) => { return Try(() => { const payer = options.feePayer ? options.feePayer : freezeAuthority; - const tokenAccount = (0, import_spl_token12.getAssociatedTokenAddressSync)( + const tokenAccount = (0, import_spl_token11.getAssociatedTokenAddressSync)( mint.toPublicKey(), owner.toPublicKey() ); - const editionAddress = Account4.Pda.getMasterEdition(mint); + const editionAddress = Account3.Pda.getMasterEdition(mint); const inst = (0, import_mpl_token_metadata7.createThawDelegatedAccountInstruction)({ - delegate: new Account4.Keypair({ + delegate: new Account3.Keypair({ secret: freezeAuthority }).toPublicKey(), tokenAccount, @@ -2951,4 +2852,4 @@ var RegularNft10 = { 0 && (module.exports = { RegularNft }); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uLy4uL3N1aXRlLXNwbC10b2tlbi9zcmMvYWRkLnRzIiwgIi4uLy4uL3N1aXRlLXV0aWxzL3NyYy9jb25zdGFudHMudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvYmF0Y2gudHMiLCAiLi4vLi4vbm9kZS9zcmMvaW5kZXgudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY29tbW9uLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL21pbnQudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvcGFydGlhbC1zaWduLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2NhbGN1bGF0ZS10eHNpemUudHMiLCAiLi4vLi4vZ2xvYmFsL3NyYy9pbmRleC50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9hc3NvY2lhdGVkLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2tleXB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t9LFxuICApOiBQcm9taXNlPFJlc3VsdDxDb21tb25TdHJ1Y3R1cmU8UHVia2V5PiwgRXJyb3I+PiA9PiB7XG4gICAgcmV0dXJuIFRyeShhc3luYyAoKSA9PiB7XG4gICAgICBjb25zdCBwYXllciA9IG9wdGlvbnMuZmVlUGF5ZXIgPyBvcHRpb25zLmZlZVBheWVyIDogb3duZXJPck11bHRpc2lnWzBdO1xuICAgICAgY29uc3Qga2V5cGFpcnMgPSBvd25lck9yTXVsdGlzaWcubWFwKChzKSA9PiBzLnRvS2V5cGFpcigpKTtcblxuICAgICAgY29uc3QgdG9rZW5Bc3NvY2lhdGVkID0gYXdhaXQgQWNjb3VudC5Bc3NvY2lhdGVkLnJldHJ5R2V0T3JDcmVhdGUoXG4gICAgICAgIHRva2VuLFxuICAgICAgICBvd25lcixcbiAgICAgICAgcGF5ZXIsXG4gICAgICApO1xuXG4gICAgICBjb25zdCBpbnN0ID0gY3JlYXRlTWludFRvQ2hlY2tlZEluc3RydWN0aW9uKFxuICAgICAgICB0b2tlbi50b1B1YmxpY0tleSgpLFxuICAgICAgICB0b2tlbkFzc29jaWF0ZWQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgQ2FsY3VsYXRlLmNhbGN1bGF0ZUFtb3VudCh0b3RhbEFtb3VudCwgbWludERlY2ltYWwpLFxuICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICAga2V5cGFpcnMsXG4gICAgICApO1xuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb248UHVia2V5PihcbiAgICAgICAgW2luc3RdLFxuICAgICAgICBrZXlwYWlycyxcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCksXG4gICAgICAgIHRva2VuLFxuICAgICAgKTtcbiAgICB9KTtcbiAgfTtcbn1cbiIsICJpbXBvcnQgeyBDb21taXRtZW50LCBQdWJsaWNLZXkgfSBmcm9tICd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KTtcblxuICAgIGNvbnN0IGl4c1NpemUgPSB0cmFuc2FjdGlvbi5pbnN0cnVjdGlvbnMucmVkdWNlKChhY2MsIGl4KSA9PiB7XG4gICAgICBpeC5rZXlzLmZvckVhY2goKHsgcHVia2V5LCBpc1NpZ25lciB9KSA9PiB7XG4gICAgICAgIGNvbnN0IHBrID0gcHVia2V5LnRvQmFzZTU4KCk7XG4gICAgICAgIGlmIChpc1NpZ25lcikgc2lnbmVycy5hZGQocGspO1xuICAgICAgICBhY2NvdW50cy5hZGQocGspO1xuICAgICAgfSk7XG5cbiAgICAgIGFjY291bnRzLmFkZChpeC5wcm9ncmFtSWQudG9CYXNlNTgoKSk7XG5cbiAgICAgIGNvbnN0IG5JbmRleGVzID0gaXgua2V5cy5sZW5ndGg7XG4gICAgICBjb25zdCBvcGFxdWVEYXRhID0gaXguZGF0YS5sZW5ndGg7XG5cbiAgICAgIHJldHVybiAoXG4gICAgICAgIGFjYyArXG4gICAgICAgIDEgKyAvLyBQSUQgaW5kZXhcbiAgICAgICAgY29tcGFjdEFycmF5U2l6ZShuSW5kZXhlcywgMSkgK1xuICAgICAgICBjb21wYWN0QXJyYXlTaXplKG9wYXF1ZURhdGEsIDEpXG4gICAgICApO1xuICAgIH0sIDApO1xuXG4gICAgcmV0dXJuIChcbiAgICAgIGNvbXBhY3RBcnJheVNpemUoc2lnbmVycy5zaXplLCA2NCkgKyAvLyBzaWduYXR1cmVzXG4gICAgICAzICsgLy8gaGVhZGVyXG4gICAgICBjb21wYWN0QXJyYXlTaXplKGFjY291bnRzLnNpemUsIDMyKSArIC8vIGFjY291bnRzXG4gICAgICAzMiArIC8vIGJsb2NraGFzaFxuICAgICAgY29tcGFjdEhlYWRlcih0cmFuc2FjdGlvbi5pbnN0cnVjdGlvbnMubGVuZ3RoKSArIC8vIGluc3RydWN0aW9uc1xuICAgICAgaXhzU2l6ZVxuICAgICk7XG4gIH07XG5cbiAgLyoqXG4gICAqIElzIG1heCB0cmFuc2FjdGlvbi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2FjdGlvbkJ1aWxkZXIuQ29tbW9uPFB1YmtleT4oXG4gICAgICAgIFtyZXMuaW5zdF0sXG4gICAgICAgIFtdLFxuICAgICAgICBmZWVQYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgcmVzLnRva2VuQWNjb3VudCEsXG4gICAgICApO1xuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiBSZXRyeSBmdW5jdGlvbiBpZiBjcmVhdGUgbmV3IHRva2VuIGFjY291aW50XG4gICAgICpcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gbWludFxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBvd25lclxuICAgICAqIEBwYXJhbSB7U2VjcmV0fSBmZWVQYXllclxuICAgICAqIEByZXR1cm5zIFByb21pc2U8c3RyaW5nPlxuICAgICAqL1xuICAgIGV4cG9ydCBjb25zdCByZXRyeUdldE9yQ3JlYXRlID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyOiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxzdHJpbmc+ID0+IHtcbiAgICAgIGxldCBjb3VudGVyID0gMTtcbiAgICAgIHdoaWxlIChjb3VudGVyIDwgUkVUUllfT1ZFUl9MSU1JVCkge1xuICAgICAgICB0cnkge1xuICAgICAgICAgIGNvbnN0IGluc3QgPSBhd2FpdCBnZXQobWludCwgb3duZXIsIGZlZVBheWVyLCB0cnVlKTtcblxuICAgICAgICAgIGlmIChpbnN0ICYmIHR5cGVvZiBpbnN0ID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgaW5zdCk7XG4gICAgICAgICAgICByZXR1cm4gaW5zdDtcbiAgICAgICAgICB9IGVsc2UgaWYgKGluc3QgaW5zdGFuY2VvZiBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uKSB7XG4gICAgICAgICAgICAoYXdhaXQgaW5zdC5zdWJtaXQoKSkubWFwKFxuICAgICAgICAgICAgICBhc3luYyAob2s6IHN0cmluZykgPT4ge1xuICAgICAgICAgICAgICAgIGF3YWl0IE5vZGUuY29uZmlybWVkU2lnKG9rKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gaW5zdC5kYXRhO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAoZXJyOiBFcnJvcikgPT4ge1xuICAgICAgICAgICAgICAgIGRlYnVnTG9nKCcjIEVycm9yIHN1Ym1pdCByZXRyeUdldE9yQ3JlYXRlOiAnLCBlcnIpO1xuICAgICAgICAgICAgICAgIHRocm93IGVycjtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgZGVidWdMb2coYCMgcmV0cnk6ICR7Y291bnRlcn0gY3JlYXRlIHRva2VuIGFjY291bnQ6IGAsIGUpO1xuICAgICAgICAgIGRlYnVnTG9nKGAjIG1pbnQ6ICR7bWludH0sIG93bmVyOiAke293bmVyfSwgZmVlUGF5ZXI6ICR7ZmVlUGF5ZXJ9YCk7XG4gICAgICAgIH1cbiAgICAgICAgYXdhaXQgc2xlZXAoUkVUUllfU0xFRVBfVElNRSk7XG4gICAgICAgIGNvdW50ZXIrKztcbiAgICAgIH1cbiAgICAgIHRocm93IEVycm9yKGByZXRyeSBhY3Rpb24gaXMgb3ZlciBsaW1pdCAke1JFVFJZX09WRVJfTElNSVR9YCk7XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIFtNYWluIGxvZ2ljXUdldCBBc3NvY2lhdGVkIHRva2VuIEFjY291bnQuXG4gICAgICogaWYgbm90IGNyZWF0ZWQsIGNyZWF0ZSBuZXcgdG9rZW4gYWNjb3VpbnRcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBtaW50XG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAgICogQHBhcmFtIHtQdWJrZXl9IGZlZVBheWVyXG4gICAgICogQHJldHVybnMgUHJvbWlzZTxzdHJpbmc+XG4gICAgICovXG4gICAgZXhwb3J0IGNvbnN0IG1ha2VPckNyZWF0ZUluc3RydWN0aW9uID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyPzogUHVia2V5LFxuICAgICAgYWxsb3dPd25lck9mZkN1cnZlID0gZmFsc2UsXG4gICAgKTogUHJvbWlzZTx7XG4gICAgICB0b2tlbkFjY291bnQ6IHN0cmluZztcbiAgICAgIGluc3Q6IFRyYW5zYWN0aW9uSW5zdHJ1Y3Rpb24gfCB1bmRlZmluZWQ7XG4gICAgfT4gPT4ge1xuICAgICAgY29uc3QgYXNzb2NpYXRlZFRva2VuQWNjb3VudCA9IGdldEFzc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jKFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSxcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3QsXG4gICAgICAgIH07XG4gICAgICB9XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IEtleXBhaXIgYXMgT3Jp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mJiBtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEuc3ltYm9sKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU3ltYm9sKG1ldGFkYXRhLnN5bWJvbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAocmVzICYmIHJlcy5pc0Vycikge1xuICAgICAgICAgIHJlc3VsdHMucHVzaCguLi5yZXMuZXJyb3IuZGV0YWlscyk7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgICAgaWYgKHJlc3VsdHMubGVuZ3RoID4gMCkge1xuICAgICAgICBjb25zdCBtZXNzYWdlID1cbiAgICAgICAgICAnQ2F1Z2h0IGluIHRoZSB2YWxpZGF0aW9uIGVycm9ycy4gc2VlIGluZm9ybWF0aW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XG4gICAgICAgICAgcHJvZ3JhbUlkOiBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICB9LFxuICAgICAgKTtcblxuICAgICAgY29uc3QgZGF0YXMgPSBpbmZvLnZhbHVlLm1hcChhc3luYyAoZCkgPT4ge1xuICAgICAgICBjb25zdCBtaW50ID0gZC5hY2NvdW50LmRhdGEucGFyc2VkLmluZm8ubWludCBhcyBQdWJrZXk7XG4gICAgICAgIGNvbnN0IHRva2VuQW1vdW50ID0gZC5hY2NvdW50LmRhdGEucGFyc2VkLmluZm8udG9rZW5BbW91bnRcbiAgICAgICAgICAuYW1vdW50IGFzIHN0cmluZztcbiAgICAgICAgaWYgKHRva2VuQW1vdW50ID09PSAnMScpIHtcbiAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIE1ldGFkYXRhLmZyb21BY2NvdW50QWRkcmVzcyhcbiAgICAgICAgICBjb25uZWN0aW9uLFxuICAgICAgICAgIEFjY291bnQuUGRhLmdldE1ldGFkYXRhKG1pbnQpLFxuICAgICAgICApXG4gICAgICAgICAgLnRoZW4oYXN5bmMgKG1ldGFkYXRhKSA9PiB7XG4gICAgICAgICAgICAvKiBlc2xpbnQtZGlzYWJsZSBAdHlwZXNjcmlwdC1lc2xpbnQvbm8tZXhwbGljaXQtYW55ICovXG4gICAgICAgICAgICByZXR1cm4gZmV0Y2hSZXRyeShtZXRhZGF0YS5kYXRhLnVyaSkudGhlbigoanNvbjogYW55KSA9PiB7XG4gICAgICAgICAgICAgIHJldHVybiBjb252ZXJ0ZXIobWV0YWRhdGEsIGpzb24sIHRva2VuQW1vdW50KTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgIH0pXG4gICAgICAgICAgLmNhdGNoKChlcnIpID0+IGRlYnVnTG9nKCcjIFtGZXRjaCBlcnJvcl0nLCBlcnIpKTtcbiAgICAgIH0pO1xuXG4gICAgICBjb25zdCBmaWx0ZXJzID0gKGF3YWl0IFByb21pc2UuYWxs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mVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgZGVzdCxcbiAgICAgICAgZmVlUGF5ZXIsXG4gICAgICApO1xuXG4gICAgICBsZXQgaW5zdDI7XG4gICAgICBjb25zdCBibG9ja2hhc2hPYmogPSBhd2FpdCBOb2RlLmdldENvbm5lY3Rpb24oKS5nZXRMYXRlc3RCbG9ja2hhc2goKTtcblxuICAgICAgY29uc3QgdHggPSBuZXcgVHJhbnNhY3Rpb24oe1xuICAgICAgICBsYXN0VmFsaWRCbG9ja0hlaWdodDogYmxvY2toYXNoT2JqLmxhc3RWYWxpZEJsb2NrSGVpZ2h0LFxuICAgICAgICBibG9ja2hhc2g6IGJsb2NraGFzaE9iai5ibG9ja2hhc2gsXG4gICAgICAgIGZlZVBheWVyOiBmZWVQYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgfSk7XG5cbiAgICAgIC8vIHJldHVybiBhc3NvY2lhdGVkIHRva2VuIGFjY291bnRcbiAgICAgIGlmICghZGVzdFRva2VuLmluc3QpIHtcbiAgICAgICAgaW5zdDIgPSBjcmVhdGVUcmFuc2ZlckNoZWNrZWRJbnN0cnVjdGlvbihcbiAgICAgICAgICBzb3VyY2VUb2tlbi50b2tlbkFjY291bnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgZGVzdFRva2VuLnRva2VuQWNjb3VudC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICAgIENhbGN1bGF0b3IuY2FsY3VsYXRlQW1vdW50KGFtb3VudCwgbWludERlY2ltYWwpLFxuICAgICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICAgIFtvd25lci50b0tleXBhaXIoKV0sXG4gICAgICAgICk7XG4gICAgICAgIHR4LmFkZChpbnN0Mik7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICAvLyByZXR1cm4gaW5zdHJ1Y3Rpb24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aChcbiAgICAgIGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgZmVlUGF5ZXIsXG4gICAgICAgIHRva2VuQXNzb2NpYXRlZCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIG1pbnQsXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZU1pbnRUb0NoZWNrZWRJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgdG9rZW5Bc3NvY2lhdGVkLFxuICAgICAgICBvd25lcixcbiAgICAgICAgQ2FsY3VsYXRlLmNhbGN1bGF0ZUFtb3VudCh0b3RhbEFtb3VudCwgbWludERlY2ltYWwpLFxuICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlQ3JlYXRlTWV0YWRhdGFBY2NvdW50VjNJbnN0cnVjdGlvbihcbiAgICAgICAge1xuICAgICAgICAgIG1ldGFkYXRhOiBtZXRhZGF0YVBkYSxcbiAgICAgICAgICBtaW50LFxuICAgICAgICAgIG1pbnRBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICAgIHBheWVyOiBmZWVQYXllcixcbiAgICAgICAgICB1cGRhdGVBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICB9LFxuICAgICAgICB7XG4gICAgICAgICAgY3JlYXRlTWV0YWRhdGFBY2NvdW50QXJnc1YzOiB7XG4gICAgICAgICAgICBkYXRhOiB0b2tlbk1ldGFkYXRhLFxuICAgICAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgICAgICAgY29sbGVjdGlvbkRldGFpbHM6IG51bGwsXG4gICAgICAgICAgfSxcbiAgICAgICAgfSxcbiAgICAgICksXG4gICAgKTtcbiAgICByZXR1cm4gaW5zdHJ1Y3Rpb25zO1xuICB9O1xuXG4gIC8qKlxuICAgKi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uICAgIGlzTXV0YWJsZTogYm9vbGVhbixcbiAgKTogUHJvbWlzZTxUcmFuc2FjdGlvbkluc3RydWN0aW9uW10+ID0+IHtcbiAgICBjb25zdCBhdGEgPSBnZXRBc3NvY2lhdGVkVG9rZW5BZGRyZXNzU3luYyhtaW50LCBvd25lcik7XG4gICAgY29uc3QgdG9rZW5NZXRhZGF0YVB1YmtleSA9IEFjY291bnQuUGRhLmdldE1ldGFkYXRhKG1pbnQudG9TdHJpbmcoKSk7XG4gICAgY29uc3QgbWFzdGVyRWRpdGlvblB1YmtleSA9IEFjY291bnQuUGRhLmdldE1hc3RlckVkaXRpb24obWludC50b1N0cmluZygpKTtcbiAgICBjb25zdCBjb25uZWN0aW9uID0gTm9kZS5nZXRDb25uZWN0aW9uKCk7XG4gICAgY29uc3QgaW5zdHJ1Y3Rpb25zID0gW107XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIFN5c3RlbVByb2dyYW0uY3JlYXRlQWNjb3VudCh7XG4gICAgICAgIGZyb21QdWJrZXk6IGZlZVBheWVyLFxuICAgICAgICBuZXdBY2NvdW50UHVia2V5OiBtaW50LFxuICAgICAgICBsYW1wb3J0czogYXdhaXQgZ2V0TWluaW11bUJhbGFuY2VGb3JSZW50RXhlbXB0TWludChjb25uZWN0aW9uKSxcbiAgICAgICAgc3BhY2U6IE1JTlRfU0laRSxcbiAgICAgICAgcHJvZ3JhbUlkOiBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgfSksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKGNyZWF0ZUluaXRpYWxpemVNaW50SW5zdHJ1Y3Rpb24obWludCwgMCwgb3duZXIsIG93bmVyKSk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihmZWVQYXllciwgYXRhLCBvd25lciwgbWludCksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKGNyZWF0ZU1pbnRUb0NoZWNrZWRJbnN0cnVjdGlvbihtaW50LCBhdGEsIG93bmVyLCAxLCAwKSk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUNyZWF0ZU1ldGFkYXRhQWNjb3VudFYzSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHtcbiAgICAgICAgICBtZXRhZGF0YTogdG9rZW5NZXRhZGF0YVB1YmtleSxcbiAgICAgICAgICBtaW50LFxuICAgICAgICAgIG1pbnRBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICAgIHBheWVyOiBmZWVQYXllcixcbiAgICAgICAgICB1cGRhdGVBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICB9LFxuICAgICAgICB7XG4gICAgICAgICAgY3JlYXRlTWV0YWRhdGFBY2NvdW50QXJnc1YzOiB7XG4gICAgICAgICAgICBkYXRhOiBuZnRNZXRhZGF0YSxcbiAgICAgICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICAgICAgIGNvbGxlY3Rpb25EZXRhaWxzOiBudWxsLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUNyZWF0ZU1hc3RlckVkaXRpb25WM0luc3RydWN0aW9uKFxuICAgICAgICB7XG4gICAgICAgICAgZWRpdGlvbjogbWFzdGVyRWRpdGlvblB1YmtleSxcbiAgICAgICAgICBtaW50LFxuICAgICAgICAgIHVwZGF0ZUF1dGhvcml0eTogb3duZXIsXG4gICAgICAgICAgbWludEF1dGhvcml0eTogb3duZXIsXG4gICAgICAgICAgcGF5ZXI6IGZlZVBheWVyLFxuICAgICAgICAgIG1ldGFkYXRhOiB0b2tlbk1ldGFkYXRhUHVia2V5LFxuICAgICAgICB9LFxuICAgICAgICB7XG4gICAgICAgICAgY3JlYXRlTWFzdGVyRWRpdGlvbk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gICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICAgICAgZnJlZXplQXV0aG9yaXR5LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgLy8gY29sbGVjdGlvbiAtLS1cbiAgICAgIGlmIChpbnB1dC5jb2xsZWN0aW9uKSB7XG4gICAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICAgIGNyZWF0ZVZlcmlmeVNpemVkQ29sbGVjdGlvbihcbiAgICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIGlucHV0LmNvbGxlY3Rpb24udG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBrZXlwYWlycyA9IFtvd25lci50b0tleXBhaXIoKSwgbWludC50b0tleXBhaXIoKV07XG5cbiAgICAgIC8vIGNyZWF0b3IgLS0tXG4gICAgICBpZiAoaW5wdXQuY3JlYXRvcnMpIHtcbiAgICAgICAgaW5wdXQuY3JlYXRvcnMuZm9yRWFjaCgoY3JlYXRvcikgPT4ge1xuICAgICAgICAgIGlmIChBY2NvdW50LktleXBhaXIuaXNTZWNyZXQoY3JlYXRvci5zZWNyZXQpKSB7XG4gICAgICAgICAgICBjb25zdCBjcmVhdG9yUHVia2V5ID0gY3JlYXRvci5hZGRyZXNzLnRvUHVibGljS2V5KCk7XG4gICAgICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlVmVyaWZ5Q3JlYXRvcihtaW50LnRvUHVibGljS2V5KCksIGNyZWF0b3JQdWJrZXkpO1xuICAgICAgICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goaW5zdCk7XG4gICAgICAgICAgICBrZXlwYWlycy5wdXNoKGNyZWF0b3Iuc2VjcmV0LnRvS2V5cGFpcigpKTtcb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vSW5mcmEoaW5wdXQuY29sbGVjdGlvbik7XG4gICAgICAgIGRhdGF2MiA9IHsgLi4uZGF0YXYyLCBjb2xsZWN0aW9uIH07XG4gICAgICB9XG4gICAgICAvLy0tLSBjb2xsZWN0aW9uIC0tLVxuXG4gICAgICBjb25zdCBpc011dGFibGUgPSBpbnB1dC5pc011dGFibGUgPT09IHVuZGVmaW5lZCA/IHRydWUgOiBpbnB1dC5pc011dGFibGU7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGlucHV0OiAnLCBpbnB1dCk7XG4gICAgICBkZWJ1Z0xvZygnIyBzZWxsZXJGZWVCYXNpc1BvaW50czogJywgc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgZGVidWdMb2coJyMgZGF0YXYyOiAnLCBkYXRhdjIpO1xuXG4gICAgICBjb25zdCBtaW50ID0gQWNjb3VudC5LZXlwYWlyLmNyZWF0ZSgpO1xuICAgICAgY29uc3QgaW5zdHMgPSBhd2FpdCBNaW50LmNyZWF0ZU1pbnQoXG4gICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXJQdWJsaWNrZXksXG4gICAgICAgIGRhdGF2MixcbiAgICAgICAgZmVlUGF5ZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgKTtcblxuICAgICAgLy8gZnJlZXplQXV0aG9yaXR5XG4gICAgICBpZiAob3B0aW9ucy5mcmVlemVBdXRob3JpdHkpIHtcbiAgICAgICAgaW5zdHMucHVzaChcbiAgICAgICAgICBNaW50LmNyZWF0ZURlbGVhZ2F0ZShcbiAgICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIG93bmVyUHVibGlja2V5LFxuICAgICAgICAgICAgb3B0aW9ucy5mcmVlemVBdXRob3JpdHkudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICBjb25zdCB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AgICAgY29uc3QgaW5zdHJ1Y3Rpb25zID0gYXdhaXQgTWludC5jcmVhdGVNaW50KFxuICAgICAgICBjb2xsZWN0aW9uTWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgZGF0YXYyLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICk7XG5cbiAgICAgIC8vIGZyZWV6ZUF1dGhvcml0eVxuICAgICAgaWYgKGZyZWV6ZUF1dGhvcml0eSkge1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgICBNaW50LmNyZWF0ZURlbGVhZ2F0ZShcbiAgICAgICAgICAgIGNvbGxlY3Rpb25NaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgICAgIGZyZWV6ZUF1dGhvcml0eS50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGNvbGxlY3Rpb25zID0ge1xuICAgICAgICBjb2xsZWN0aW9uTWV0YWRhdGE6IGNvbGxlY3Rpb25NZXRhZGF0YUFjY291bnQsXG4gICAgICAgIGNvbGxlY3Rpb25BdXRob3JpdHk6IG93bmVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgY29sbGVjdGlvbk1pbnQ6IGNvbGxlY3Rpb25NaW50LnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgIH07XG5cbiAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICBjcmVhdGVTZXRDb2xsZWN0aW9uU2l6ZUluc3RydWN0aW9uKGNvbGxlY3Rpb25zLCB7XG4gICAgICAgICAgc2V0Q29sbGVjdGlvblNpemVBcmdzOiB7XG4gICAgICAgICAgICBzaXplOiBjb2xsZWN0aW9uU2l6ZSB8fCBERUZ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9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBudWxsO1xuICAgICAgfVxuICAgICAgcmV0dXJuIGlucHV0Lm1hcCgoZGF0YSkgPT4ge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIGFkZHJlc3M6IGRhdGEuYWRkcmVzcy50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIHNoYXJlOiBkYXRhLnNoYXJlLFxuICAgICAgICAgIHZlcmlmaWVkOiBmYWxzZSxcbiAgICAgICAgfTtcbiAgICAgIH0pO1xuICAgIH07XG5cbiAgICBleHBvcnQgY29uc3QgaW50b0NvbXByZXNzZWROZnRJbmZyYSA9IChcbiAgICAgIGlucHV0OiBPcHRpb248SW5wdXRDcmVhdG9yc1tdPiB8IHVuZGVmaW5lZCxcbiAgICApOiBJbnRlcm5hbENyZWF0b3JzW10gPT4ge1xuICAgICAgaWYgKCFpbnB1dCkge1xuICAgICAgICByZXR1cm4gW107XG4gICAgICB9XG4gICAgICByZXR1cm4gaW5wdXQhLm1hcCgoZGF0YSkgPT4ge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIGFkZHJlc3M6IGRhdGEuYWRkcmVzcy50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIHNoYXJlOiBkYXRhLnNoYXJlLFxuICAgICAgICAgIHZlcmlmaWVkOiBmYWxzZSxcbiAgICAgICAgfTtcbiAgICAgIH0pO1xuICAgIH07XG5cbiAgICBleHBvcnQgY29uc3QgaW50b1VzZXIgPSAoXG4gICAgICBvdXRwdXQ6IE9wdGlvbjxJbnRlcm5hbENyZWF0b3JzW10+LFxuICAgICk6IENyZWF0b3JzW10gfCB1bmRlZmluZWQgPT4ge1xuICAgICAgaWYgKCFvdXRwdXQpIHtcbiAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG91dHB1dC5tYXAoKGRhdGEpID0+IHtcbiAgICAgICAgcmV0dXJuIHtc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WdlVHlwZSxcbiAgICAgICAgZmVlUGF5ZXI/OiBTZWNyZXQsXG4gICAgICApID0+IFByb21pc2U8UmVzdWx0PHN0cmluZywgRXJyb3I+PixcbiAgICAgIHN0b3JhZ2VUeXBlOiBTdG9yYWdlVHlwZSxcbiAgICAgIGZlZVBheWVyPzogU2VjcmV0LFxuICAgICk6IFByb21pc2U8UHJvcGVydGllcz4gPT4ge1xuICAgICAgaWYgKCFpbnB1dCB8fCAhaW5wdXQuZmlsZXMpIHtcbiAgICAgICAgcmV0dXJuIHt9O1xuICAgICAgfVxuXG4gICAgICBjb25zdCBmaWxlcyA9IGF3YWl0IFByb21pc2UuYWxsKFxuICAgICAgICBpbnB1dC5maWxlcy5tYXAoYXN5bmMgKGZpbGUpID0+IHtcbiAgICAgICAgICBpZiAoIWZpbGUuZmlsZVBhdGgpIHtcbiAgICAgICAgICAgIHJldHVybiB7fTtcbiAgICAgICAgICB9XG4gICAgICAgICAgY29uc3QgcmVzID0gYXdhaXQgY2FsbGJhY2tGdW5jKGZpbGUuZmlsZVBhdGgsIHN0b3JhZ2VUeXBlLCBmZWVQYXllcik7XG4gICAgICAgICAgaWYgKHJlcy5pc0Vycikge1xuICAgICAgICAgICAgdGhyb3cgRXJyb3IocmVzLmVycm9yLm1lc3NhZ2UpO1xuICAgICAgICAgIH1cbiAgICAgICAgICByZXR1cm4gb3ZlcndyaXRlT2JqZWN0KGZpbGUsIFtcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgZXhpc3RzS2V5OiAnZmlsZVBhdGgnLFxuICAgICAgICAgICAgICB3aWxsOiB7IGtleTogJ3VyaScsIHZhbHVlOiByZXMudmFsdWUgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgXSk7XG4gICAgICAgIH0pLFxuICAgICAgKTtcbiAgICAgIHJldHVybiB7IC4uLmlucHV0LCBmaWxlcyB9IGFzIFByb3BlcnRpZXM7XG4gICAgfTtcbiAgfVxufVxuIiwgIi8qIGVzbGludC1ka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b3VudCA9PT0gJzEnKSB7XG4gICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBNZXRhZGF0YS5mcm9tQWNjb3VudEFkZHJlc3MoXG4gICAgICAgICAgY29ubmVjdGlvbixcbiAgICAgICAgICBBY2NvdW50LlBkYS5nZXRNZXRhZGF0YShtaW50KSxcbiAgICAgICAgKVxuICAgICAgICAgIC50aGVuKGFzeW5jIChtZXRhZGF0YSkgPT4ge1xuICAgICAgICAgICAgLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLWV4cGxpY2l0LWFueSAqL1xuICAgICAgICAgICAgcmV0dXJuIGZldGNoUmV0cnkobWV0YWRhdGEuZGF0YS51cmkpLnRoZW4oKGpzb246IGFueSkgPT4ge1xuICAgICAgICAgICAgICByZXR1cm4gY29udmVydGVyKG1ldGFkYXRhLCBqc29uLCB0b2tlbkFtb3VudCk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICB9KVxuICAgICAgICAgIC5jYXRjaCgoZXJyKSA9PiBkZWJ1Z0xvZygnIyBbRmV0Y2ggZXJyb3JdJywgZXJyKSk7XG4gICAgICB9KTtcblxuICAgICAgY29uc3QgZmlsdGVycyA9IChhd2FpdCBQcm9taXNlLmFsbChkYXRhcykpLmZpbHRlcihcbiAgICAgICAgKGRhdGEpID0+IGRhdGEgIT09IHVuZGVmaW5lZCxcbiAgICAgICk7XG4gICAgICByZXR1cm4gZmlsdGVycyBhcyBUb2tlbk1ldGFkYXRhW107XG4gICAgfSk7XG4gIH07XG5cbiAgLyoqXG4gICAqIEZldGNoIG1pbnRlZCBtZXRhZGF0YSBieSBtaW50IGFkZHJlc3NcbiAgICpcbiAgICogQHBhcmFtIHtQdWJrZXl9IG1pbnRcbiAgICogQHJldHVybiBQcm9taXNlPFJlc3VsdDxVc2VyU2lkZU91dHB1dC5Ub2tlbk1ldGFkYXRhLCBFcnJvcj4+XG4gICAqL1xuICBleHBvcnQgY29u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9ja2hhc2hPYmouYmxvY2toYXNoLFxuICAgICAgICBmZWVQYXllcjogZmVlUGF5ZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgIH0pO1xuXG4gICAgICBpbnN0MiA9IGNyZWF0ZVRyYW5zZmVyQ2hlY2tlZEluc3RydWN0aW9uKFxuICAgICAgICBzb3VyY2VUb2tlbi50b2tlbkFjY291bnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBkZXN0VG9rZW4udG9rZW5BY2NvdW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICBDYWxjdWxhdG9yLmNhbGN1bGF0ZUFtb3VudChhbW91bnQsIG1pbnREZWNpbWFsKSxcbiAgICAgICAgbWludERlY2ltYWwsXG4gICAgICAgIFtvd25lci50b0tleXBhaXIoKV0sXG4gICAgICApO1xuXG4gICAgICAvLyByZXR1cm4gYXNzb2NpYXRlZCB0b2tlbiBhY2NvdW50XG4gICAgICBpZiAoIWRlc3RUb2tlbi5pbnN0KSB7XG4gICAgICAgIHR4LmFkZChpbnN0Mik7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICAvLyByZXR1cm4gaW5zdHJ1Y3Rpb24gYW5kIHVuZGVjaWRlZCBhc3NvY2lhdGVkIHRva2VuIGFjY291bnRcbiAgICAgICAgdHguYWRkKGRlc3RUb2tlbi5pbnN0KS5hZGQoaW5zdDIpO1xuICAgICAgfVxuXG4gICAgICB0eC5yZWNlbnRCbG9ja2hhc2ggPSBibG9ja2hhc2hPYmouYmxvY2toYXNoO1xuICAgICAgdHgucGFydGlhbFNpZ24ob3duZXIudG9LZXlwYWlyKCkpO1xuXG4gICAgICBjb25zdCBzZXJpYWxpemVkVHggPSB0eC5zZXJpYWxpemUoe1xuICAgICAgICByZXF1aXJlQWxsU2lnbmF0dXJlczogZmFsc2UsXG4gICAgICB9KTtcbiAgICAgIGNvbnN0IGhleCA9IHNlcm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gICAgfSksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlSW5pdGlhbGl6ZU1pbnRJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgbWludERlY2ltYWwsXG4gICAgICAgIG93bmVyLFxuICAgICAgICBvd25lcixcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICBmZWVQYXllcixcbiAgICAgICAgdG9rZW5Bc3NvY2lhdGVkLFxuICAgICAgICBvd25lcixcbiAgICAgICAgbWludCxcbiAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlTWludFRvQ2hlY2tlZEluc3RydWN0aW9uKFxuICAgICAgICBtaW50LFxuICAgICAgICB0b2tlbkFzc29jaWF0ZWQsXG4gICAgICAgIG93bmVyLFxuICAgICAgICBDYWxjdWxhdGUuY2FsY3VsYXRlQW1vdW50KHRvdGFsQW1vdW50LCBtaW50RGVjaW1hbCksXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgKSxcbiAgICApO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVDcmVhdGVNZXRhZGF0YUFjY291bnRWM0luc3RydWN0aW9uKFxuICAgICAgICB7XG4gICAgICAgICAgbWV0YWRhdGE6IG1ldGFkYXRhUGRhLFxuICAgICAgICAgIG1pbnQsXG4gICAgICAgICAgbWludEF1dGhvcml0eTogb3duZXIsXG4gICAgICAgICAgcGF5ZXI6IGZlZVBheWVyLFxuICAgICAgICAgIHVwZGF0ZUF1dGhvcml0eTogb3duZXIsXG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICBjcmVhdGVNZXRhZGF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AgICAgICAgICBzdG9yYWdlVHlwZSxcbiAgICAgICAgICBwYXllcixcbiAgICAgICAgKTtcblxuICAgICAgICBpZiAodXBsb2FkZWQuaXNFcnIpIHtcbiAgICAgICAgICB0aHJvdyB1cGxvYWRlZDtcbiAgICAgICAgfVxuICAgICAgICB1cmkgPSB1cGxvYWRlZC52YWx1ZTtcbiAgICAgIH0gZWxzZSBpZiAoaW5wdXQudXJpKSB7XG4gICAgICAgIGNvbnN0IGltYWdlID0geyBpbWFnZTogaW5wdXQudXJpIH07XG4gICAgICAgIGNvbnN0IHVwbG9hZGVkID0gYXdhaXQgU3RvcmFnZS51cGxvYWREYXRhKFxuICAgICAgICAgIHsgLi4uc3RvcmFnZU1ldGFkYXRhLCAuLi5pbWFnZSB9LFxuICAgICAgICAgIHN0b3JhZ2VUeXBlLFxuICAgICAgICAgIHBheWVyLFxuICAgICAgICApO1xuICAgICAgICBpZiAodXBsb2FkZWQuaXNFcnIpIHtcbiAgICAgICAgICB0aHJvdyB1cGxvYWRlZDtcbiAgICAgICAgfVxuICAgICAgICB1cmkgPSB1cGxvYWRlZC52YWx1ZTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHRocm93IEVycm9yKGBNdXN0IHNldCBmaWxlUGF0aCcgb3IgJ3VyaSdgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgaXNNdXRhYmxlID0gdHJ1ZTtcblxuICAgICAgY29uc3QgZGF0YXYyID0gQ29udmVydGVyLlRva2VuTWV0YWRhdGEuaW50b0luZnJhKFxuICAgICAgICBpbnB1dCxcbiAgICAgICAgdXJpLFxuICAgICAgICBzZWxsZXJGZWVCYXNpc1BvaW50cyxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGRhdGF2MjogJywgZGF0YXYyKTtcbiAgICAgIGRlYnVnTG9nKCcjIHVwbG9hZCBjb250ZW50IHVybDogJywgdXJpKTtcblxuICAgICAgY29uc3QgbWludCA9IEFjY291bnQuS2V5cGFpci5jcmVhdGUoKTtcbiAgICAgIGNvbnN0IGluc3RzID0gYXdhaXQgY3JlYXRlTWludChcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgdG90YWxBbW91bnQsXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICBkYXRhdjIsXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgKTtcblxuICAgICAgLy8gZnJlZXplQXV0aG9yaXR5XG4gICAgICBpZiAoZnJlZXplQXV0aG9yaXR5KSB7XG4gICAgICAgIGluc3RzLnB1c2goXG4gICAgICAgICAgY3JlYXRlRnJlZXplQXV0aG9yaXR5KFxuICAgICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgICAgICBmcmVlemVBdXRob3JpdHkudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5NaW50KFxuICAgICAgICBpbnN0cyxcbiAgICAgICAgW293bmVyLnRvS2V5cGFpcigpLCBtaW50LnRvS2V5cGFpcigpXSxcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCksXG4gICAgICAgIG1pbnQucHVia2V5LFxuICAgICAgKTtcbiAgICB9KTtcbiAgfTtcbn1cbiIsICJpbXBvcnQgeyBDb25zdGFudHMsIGRlYnVnTG9nLCBpc0Jyb3dzZXIsIGlzTm9kZSB9IGZyb20gJ34vc3VpdGUtdXRpbHMnO1xuaW1wb3J0IHsgRmlsZVR5cGUsIElkZW50aXR5LCBUYWdzLCBVcGxvYWRhYmxlRmlsZVR5cGUgfSBmcm9tICd+L3R5cGVzL3N0b3JhZ2UnO1xuaW1wb3J0IHsgUGhhbnRvbVByb3ZpZGV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AgY29uc3Qga2V5cGFpcnMgPSBvd25lck9yTXVsdGlzaWcubWFwKChzKSA9PiBzLnRvS2V5cGFpcigpKTtcbiAgICAgIGNvbnN0IHNvdXJjZVRva2VuID0gYXdhaXQgQWNjb3VudC5Bc3NvY2lhdGVkLm1ha2VPckNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICBtaW50LFxuICAgICAgICBvd25lci50b1N0cmluZygpLFxuICAgICAgICBwYXllclB1YmtleS5wdWJrZXksXG4gICAgICApO1xuXG4gICAgICBjb25zdCBkZXN0VG9rZW4gPSBhd2FpdCBBY2NvdW50LkFzc29jaWF0ZWQubWFrZU9yQ3JlYXRlSW5zdHJ1Y3Rpb24oXG4gICAgICAgIG1pbnQsXG4gICAgICAgIGRlc3QsXG4gICAgICAgIHBheWVyUHVia2V5LnB1YmtleSxcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVUcmFuc2ZlckNoZWNrZWRJbnN0cnVjdGlvbihcbiAgICAgICAgc291cmNlVG9rZW4udG9rZW5BY2NvdW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgZGVzdFRva2VuLnRva2VuQWNjb3VudC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICBDYWxjdWxhdG9yLmNhbGN1bGF0ZUFtb3VudChhbW91bnQsIG1pbnREZWNpbWFsKSxcbiAgICAgICAgbWludERlY2ltYWwsXG4gICAgICAgIGtleXBhaXJzLFxuICAgICAgKTtcblxuICAgICAgY29uc3QgaW5zdHJ1Y3Rpb25zID0gZGVzdFRva2VuLmluc3QgPyBbZGVzdFRva2VuLmluc3QsIGluc3RdIDogW2luc3RdO1xuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb24oXG4gICAgICAgIGluc3RydWN0aW9ucyxcbiAgICAgICAga2V5cGFpcnMs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llcjogZmVlUGF5ZXIsXG4gICAgICAgICAgdXBkYXRlQXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgIGNyZWF0ZU1ldGFkYXRhQWNjb3VudEFyZ3NWMzoge1xuICAgICAgICAgICAgZGF0YTogbmZ0TWV0YWRhdGEsXG4gICAgICAgICAgICBpc011dGFibGUsXG4gICAgICAgICAgICBjb2xsZWN0aW9uRGV0YWlsczogbnVsbCxcbiAgICAgICAgICB9LFxuICAgICAgICB9LFxuICAgICAgKSxcbiAgICApO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVDcmVhdGVNYXN0ZXJFZGl0aW9uVjNJbnN0cnVjdGlvbihcbiAgICAgICAge1xuICAgICAgICAgIGVkaXRpb246IG1hc3RlckVkaXRpb25QdWJrZXksXG4gICAgICAgICAgbWludCxcbiAgICAgICAgICB1cGRhdGVBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICAgIG1pbnRBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICAgIHBheWVyOiBmZWVQYXllcixcbiAgICAgICAgICBtZXRhZGF0YTogdG9rZW5NZXRhZGF0YVB1YmtleSxcbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgIGNyZWF0ZU1hc3RlckVkaXRpb25BcmdzOiB7XG4gICAgICAgICAgICBtYXhTdXBwbHk6IDAsXG4gICAgICAgICAgfSxcbiAgICAgICAgfSxcbiAgICAgICksXG4gICAgKTtcbiAgICByZXR1cm4gaW5zdHJ1Y3Rpb25zO1xuICB9O1xuXG4gIC8qKlxuICAgKiBVcGxvYWQgY29udGVudCBhbmQgTkZUIG1pbnRcbiAgICpcbiAgICogQHBhcmFtIHtTZWNyZXR9IG93bmVyICAgICAgICAgLy8gb3duZXIncyBTZWNyZXRcbiAgICogQHBhcmFtIHtJbnB1dE5mdE1ldGFkYXRhfSBpbnB1dFxuICAgKiB7XG4gICAqICAgbmFtZTog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ljS2V5ID0gb3duZXIudG9LZXlwYWlyKCkucHVibGljS2V5O1xuXG4gICAgICAvLyBwb3JwZXJ0aWVzLCBVcGxvYWQgY29udGVudFxuICAgICAgbGV0IHByb3BlcnRpZXM7XG4gICAgICBpZiAoaW5wdXQucHJvcGVydGllcykge1xuICAgICAgICBwcm9wZXJ0aWVzID0gYXdhaXQgQ29udmVydGVyLlByb3BlcnRpZXMuaW50b0luZnJhKFxuICAgICAgICAgIGlucHV0LnByb3BlcnRpZXMsXG4gICAgICAgICAgU3RvcmFnZS51cGxvYWRGaWxlLFxuICAgICAgICAgIHN0b3JhZ2VUeXBlLFxuICAgICAgICAgIHBheWVyLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICBpbnB1dCA9IHtcbiAgICAgICAgLi4uaW5wdXQsXG4gICAgICAgIHByb3BlcnRpZXMsXG4gICAgICAgIHN0b3JhZ2VUeXBlLFxuICAgICAgfTtcblxuICAgICAgY29uc3Qgcm95YWx0eSA9IGlucHV0LnJveWFsdHkgPyBpbnB1dC5yb3lhbHR5IDogMDtcbiAgICAgIGNvbnN0IHNlbGxlckZlZUJhc2lzUG9pbnRzID0gQ29udmVydGVyLlJveWFsdHkuaW50b0luZnJhKHJveWFsdHkpO1xuICAgICAgY29uc3Qgc3RvcmFnZU1ldGFkYXRhID0gU3RvcmFnZS50b0NvbnZlcnRPZmZjaGFpbmRhdGEoXG4gICAgICAgIGlucHV0LFxuICAgICAgICBzZWxsZXJGZWVCYXNpc1BvaW50cyxcbiAgICAgICk7XG5cbiAgICAgIC8vIGNyZWF0ZWQgYXQgYnkgdW5peCB0aW1lc3RhbXBcbiAgICAgIHN0b3JhZ2VNZXRhZGF0YS5jcmVhdGVkX2F0ID0gdW5peFRpbWVzdGFtcCgpO1xuXG4gICAgICBsZXQgdXJpITogc3RyaW5nO1xuICAgICAgLy8gdXBsb2FkIGZpbGVcbiAgICAgIGlmIChpbnB1dC5maWxlUGF0aCkge1xuICAgICAgICBjb25zdCB1cG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YXNpc1BvaW50cyxcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IGlzTXV0YWJsZSA9IGlucHV0LmlzTXV0YWJsZSA9PT0gdW5kZWZpbmVkID8gdHJ1ZSA6IGlucHV0LmlzTXV0YWJsZTtcblxuICAgICAgZGVidWdMb2coJyMgaW5wdXQ6ICcsIGlucHV0KTtcbiAgICAgIGRlYnVnTG9nKCcjIGRhdGF2MjogJywgZGF0YXYyKTtcblxuICAgICAgY29uc3QgbWludCA9IEFjY291bnQuS2V5cGFpci5jcmVhdGUoKTtcblxuICAgICAgY29uc3QgaW5zdHJ1Y3Rpb25zID0gYXdhaXQgY3JlYXRlTWludChcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgZGF0YXYyLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICk7XG5cbiAgICAgIC8vIGZyZWV6ZUF1dGhvcml0eVxuICAgICAgaWYgKGZyZWV6ZUF1dGhvcml0eSkge1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgICBjcmVhdGVEZWxlYWdhdGUoXG4gICAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgICAgIGZyZWV6ZUF1dGhvcml0eS50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIC8vIGNvbGxlY3Rpb24gLS0tXG4gICAgICBpZiAoaW5wdXQuY29sbGVjdGlvbikge1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgICBjcmVhdGVWZXJpZnlTaXplZENvbGxlY3Rpb24oXG4gICAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBpbnB1dC5jb2xsZWN0aW9uLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3Qga2V5cGFpcnMgPSBbb3duZXIudG9LZXlwYWlyKCksIG1pbnQudG9LZXlwYWlyKCldO1xuXG4gICAgICAvLyBjcmVhdG9yIC0tLVxuICAgICAgaWYgKGlucHV0LmNyZWF0b3JzKSB7XG4gICAgICAgIGlucHV0LmNyZWF0b3JzLmZvckVhY2goKGNyZWF0b3IpID0+IHtcbiAgICAgICAgICBpZiAoQWNjb3VudC5LZXlwYWlyLmlzU2VjcmV0KGNyZWF0b3Iuc2VjcmV0KSkge1xuICAgICAgICAgICAgY29uc3QgY3JlYXRvclB1YmtleSA9IGNyZWF0b3IuYWRkcmVzcy50b1B1YmxpY0tleSgpO1xuICAgICAgICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZVZlcmlmeUNyZWF0b3IobWludC50b1B1YmxpY0tleSgpLCBjcmVhdG9yUHVia2V5KTtcbiAgICAgICAgICAgIGluc3RydWN0aW9ucy5wdXNoKGluc3QpO1xuICAgICAgICAgICAga2V5cGFpcnMucHVzaChjcmVhdG9yLnNlY3JldC50b0tleXBhaXIoKSk7XG4gICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuTWludChcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLFxuICAgICAgICBrZXlwYWlycyxcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCksXG4gICAgICAgIG1pbnQucHVia2V5LFxuICAgICAgKTtcbiAgICB9KTtcbiAgfTtcbn1cbiIsICJpbXBvcnQgeyBkZWJ1Z0xvZywgUmVzdWx0LCBUcnksIHVuaXhUaW1lc3RhbXAgfSBmcm9tICd+L3N1aXRlLXV0aWxzJztcbmltcG9ydCB7IFB1Ymt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zUG9pbnRzKTtcbiAgICAgIGRlYnVnTG9nKCcjIGRhdGF2MjogJywgZGF0YXYyKTtcblxuICAgICAgY29uc3QgbWludCA9IEFjY291bnQuS2V5cGFpci5jcmVhdGUoKTtcbiAgICAgIGNvbnN0IGluc3RzID0gYXdhaXQgTWludC5jcmVhdGVNaW50KFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyUHVibGlja2V5LFxuICAgICAgICBkYXRhdjIsXG4gICAgICAgIGZlZVBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICk7XG5cbiAgICAgIC8vIGZyZWV6ZUF1dGhvcml0eVxuICAgICAgaWYgKG9wdGlvbnMuZnJlZXplQXV0aG9yaXR5KSB7XG4gICAgICAgIGluc3RzLnB1c2goXG4gICAgICAgICAgTWludC5jcmVhdGVEZWxlYWdhdGUoXG4gICAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBvd25lclB1YmxpY2tleSxcbiAgICAgICAgICAgIG9wdGlvbnMuZnJlZXplQXV0aG9yaXR5LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgYmxvY2toYXNoT2JqID0gYXdhaXQgTm9kZS5nZXRDb25uZWN0aW9uKCkuZ2V0TGF0ZXN0QmxvY2toYXNoKCk7XG4gICAgICBjb25zdCB0eCA9IG5ldyBUcmFuc2FjdGlvbih7XG4gICAgICAgIGxhc3RWYWxpZEJsb2NrSGVpZ2h0OiBibG9ja2hhc2hPYmoubGFzdFZhbGlkQmxvY2tIZWlnaHQsXG4gICAgICAgIGJsb2NraGFzaDogYmxvY2toYXNoT2JqLmJsb2NraGFzaCxcbiAgICAgICAgZmVlUGF5ZXI6IGZlZVBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICB9KTtcblxuICAgICAgaW5zdHMuZm9yRWFjaCgoaW5zdCkg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4gICAgICAgICAgTWludC5jcmVhdGVEZWxlYWdhdGUoXG4gICAgICAgICAgICBjb2xsZWN0aW9uTWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgICAgICBmcmVlemVBdXRob3JpdHkudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBjb2xsZWN0aW9ucyA9IHtcbiAgICAgICAgY29sbGVjdGlvbk1ldGFkYXRhOiBjb2xsZWN0aW9uTWV0YWRhdGFBY2NvdW50LFxuICAgICAgICBjb2xsZWN0aW9uQXV0aG9yaXR5OiBvd25lci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgIGNvbGxlY3Rpb25NaW50OiBjb2xsZWN0aW9uTWludC50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICB9O1xuXG4gICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgY3JlYXRlU2V0Q29sbGVjdGlvblNpemVJbnN0cnVjdGlvbihjb2xsZWN0aW9ucywge1xuICAgICAgICAgIHNldENvbGxlY3Rpb25TaXplQXJnczoge1xuICAgICAgICAgICAgc2l6ZTogY29sbGVjdGlvblNpemUgfHwgREVGQVVMVF9DT0xMRUNUSU9OX1NJWkUsXG4gICAgICAgICAgfSxcbiAgICAgICAgfSksXG4gICAgICApO1xuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5NaW50KFxuICAgICAgICBpbnN0cnVjdGlvbnMsXG4gICAgICAgIFtvd25lci50b0tleXBhaXIoKSwgY29sbGVjdGlvbk1pbnQudG9LZXlwYWlyKCldLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgY29sbGVjdGlvbk1pbnQucHVia2V5LFxuICAgICAgKTtcbiAgICB9KTtcbiAgfTtcbn1cbiIsICJpbXBvcnQgeyBSZXN1bHQsIFRyeSB9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OZnQiLCAiQ29udmVydGVyIiwgIkFjY291bnQiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlJlZ3VsYXJOZnQiLCAiU3BsVG9rZW4iLCAiaW1wb3J0X21wbF90b2tlbl9tZXRhZGF0YSIsICJSZWd1bGFyTmZ0IiwgIkNvbnZlcnRlciIsICJBY2NvdW50IiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJpbXBvcnRfc3BsX3Rva2VuIiwgImltcG9ydF9tcGxfdG9rZW5fbWV0YWRhdGEiLCAiUmVndWxhck5mdCIsICJBY2NvdW50IiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJSZWd1bGFyTmZ0IiwgIlNwbFRva2VuIiwgIlJlZ3VsYXJOZnQiXQp9Cg== \ No newline at end of file diff --git a/packages/suite-regular-nft/dist/index.mjs b/packages/suite-regular-nft/dist/index.mjs index 51663145a..7fc700e5c 100644 --- a/packages/suite-regular-nft/dist/index.mjs +++ b/packages/suite-regular-nft/dist/index.mjs @@ -457,22 +457,11 @@ var TransactionBuilder5; // ../global/src/index.ts import { Keypair as Keypair3, LAMPORTS_PER_SOL, PublicKey as PublicKey4 } from "@solana/web3.js"; -// ../account/src/associated.ts -import { - ASSOCIATED_TOKEN_PROGRAM_ID, - createAssociatedTokenAccountInstruction, - getAccount, - getAssociatedTokenAddressSync, - TOKEN_PROGRAM_ID, - TokenAccountNotFoundError, - TokenInvalidAccountOwnerError -} from "@solana/spl-token"; - // ../account/src/keypair.ts import { Keypair as Original, PublicKey as PublicKey2 } from "@solana/web3.js"; import bs from "bs58"; var Account; -((Account5) => { +((Account4) => { class Keypair4 { secret; pubkey; @@ -508,111 +497,16 @@ var Account; }); }; } - Account5.Keypair = Keypair4; + Account4.Keypair = Keypair4; })(Account || (Account = {})); -// ../account/src/associated.ts -var Account2; -((Account5) => { - let Associated; - ((Associated2) => { - const RETRY_OVER_LIMIT = 10; - const RETRY_SLEEP_TIME = 3; - const get = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const res = await (0, Associated2.makeOrCreateInstruction)( - mint, - owner, - new Account.Keypair({ secret: feePayer }).pubkey, - allowOwnerOffCurve - ); - if (!res.inst) { - return res.tokenAccount; - } - return new TransactionBuilder6.Common( - [res.inst], - [], - feePayer.toKeypair(), - res.tokenAccount - ); - }; - Associated2.retryGetOrCreate = async (mint, owner, feePayer) => { - let counter = 1; - while (counter < RETRY_OVER_LIMIT) { - try { - const inst = await get(mint, owner, feePayer, true); - if (inst && typeof inst === "string") { - debugLog("# associatedTokenAccount: ", inst); - return inst; - } else if (inst instanceof TransactionBuilder6.Common) { - (await inst.submit()).map( - async (ok) => { - await Node.confirmedSig(ok); - return inst.data; - }, - (err) => { - debugLog("# Error submit retryGetOrCreate: ", err); - throw err; - } - ); - } - } catch (e) { - debugLog(`# retry: ${counter} create token account: `, e); - debugLog(`# mint: ${mint}, owner: ${owner}, feePayer: ${feePayer}`); - } - await sleep(RETRY_SLEEP_TIME); - counter++; - } - throw Error(`retry action is over limit ${RETRY_OVER_LIMIT}`); - }; - Associated2.makeOrCreateInstruction = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const associatedTokenAccount = getAssociatedTokenAddressSync( - mint.toPublicKey(), - owner.toPublicKey(), - allowOwnerOffCurve, - TOKEN_PROGRAM_ID, - ASSOCIATED_TOKEN_PROGRAM_ID - ); - debugLog("# associatedTokenAccount: ", associatedTokenAccount.toString()); - try { - await getAccount( - Node.getConnection(), - associatedTokenAccount, - Node.getConnection().commitment, - TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst: void 0 - }; - } catch (error) { - if (!(error instanceof TokenAccountNotFoundError) && !(error instanceof TokenInvalidAccountOwnerError)) { - throw Error("Unexpected error"); - } - const payer = !feePayer ? owner : feePayer; - const inst = createAssociatedTokenAccountInstruction( - payer.toPublicKey(), - associatedTokenAccount, - owner.toPublicKey(), - mint.toPublicKey(), - TOKEN_PROGRAM_ID, - ASSOCIATED_TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst - }; - } - }; - })(Associated = Account5.Associated || (Account5.Associated = {})); -})(Account2 || (Account2 = {})); - // ../account/src/pda.ts import { PublicKey as PublicKey3 } from "@solana/web3.js"; import { PROGRAM_ID } from "@metaplex-foundation/mpl-token-metadata"; import { MPL_BUBBLEGUM_PROGRAM_ID } from "@metaplex-foundation/mpl-bubblegum"; import BN from "bn.js"; -var Account3; -((Account5) => { +var Account2; +((Account4) => { let Pda; ((Pda2) => { Pda2.getMetadata = (address) => { @@ -664,14 +558,13 @@ var Account3; ); return assetId.toString(); }; - })(Pda = Account5.Pda || (Account5.Pda = {})); -})(Account3 || (Account3 = {})); + })(Pda = Account4.Pda || (Account4.Pda = {})); +})(Account2 || (Account2 = {})); // ../account/src/index.ts -var Account4 = { - ...Account2, +var Account3 = { ...Account, - ...Account3 + ...Account2 }; // ../global/src/index.ts @@ -702,7 +595,7 @@ String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, op } return url; } - if (Account4.Keypair.isPubkey(addressOrSignature)) { + if (Account3.Keypair.isPubkey(addressOrSignature)) { if (explorer === "solanafm" /* SolanaFM */) { url = `${Constants.EXPLORER_SOLANAFM_URL}/address/${addressOrSignature}?cluster=${cluster}`; } else if (explorer === "xray" /* Xray */) { @@ -722,13 +615,13 @@ String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, op return url; }; String.prototype.toPublicKey = function() { - if (!Account4.Keypair.isPubkey(this.toString())) { + if (!Account3.Keypair.isPubkey(this.toString())) { throw Error(`No match KeyPair.PubKey: ${this.toString()}`); } return new PublicKey4(this.toString()); }; String.prototype.toKeypair = function() { - if (!Account4.Keypair.isSecret(this.toString())) { + if (!Account3.Keypair.isSecret(this.toString())) { throw Error(`No match KeyPair.Secret: ${this.toString()}`); } const decoded = bs2.decode(this.toString()); @@ -1536,7 +1429,7 @@ var SplToken2; return Try(async () => { const payer = options.feePayer ? options.feePayer : ownerOrMultisig[0]; const keypairs = ownerOrMultisig.map((s) => s.toKeypair()); - const tokenAssociated = await Account4.Associated.retryGetOrCreate( + const tokenAssociated = await Account3.Associated.retryGetOrCreate( token, owner, payer @@ -1562,13 +1455,13 @@ var SplToken2; // ../suite-spl-token/src/burn.ts import { createBurnCheckedInstruction, - getAssociatedTokenAddressSync as getAssociatedTokenAddressSync2 + getAssociatedTokenAddressSync } from "@solana/spl-token"; var SplToken3; ((SplToken11) => { SplToken11.burn = (mint, owner, ownerOrMultisig, burnAmount, tokenDecimals, options = {}) => { return Try(() => { - const tokenAccount = getAssociatedTokenAddressSync2( + const tokenAccount = getAssociatedTokenAddressSync( mint.toPublicKey(), owner.toPublicKey() ); @@ -1589,7 +1482,7 @@ var SplToken3; // ../suite-spl-token/src/find.ts import { Metadata } from "@metaplex-foundation/mpl-token-metadata"; -import { TOKEN_PROGRAM_ID as TOKEN_PROGRAM_ID2 } from "@solana/spl-token"; +import { TOKEN_PROGRAM_ID } from "@solana/spl-token"; import fetch2 from "cross-fetch"; var SplToken4; ((SplToken11) => { @@ -1628,7 +1521,7 @@ var SplToken4; const info = await connection.getParsedTokenAccountsByOwner( owner.toPublicKey(), { - programId: TOKEN_PROGRAM_ID2 + programId: TOKEN_PROGRAM_ID } ); const datas = info.value.map(async (d) => { @@ -1639,7 +1532,7 @@ var SplToken4; } return Metadata.fromAccountAddress( connection, - Account4.Pda.getMetadata(mint) + Account3.Pda.getMetadata(mint) ).then(async (metadata) => { return fetchRetry(metadata.data.uri).then((json) => { return converter(metadata, json, tokenAmount); @@ -1657,7 +1550,7 @@ var SplToken4; const connection = Node.getConnection(); const metadata = await Metadata.fromAccountAddress( connection, - Account4.Pda.getMetadata(mint) + Account3.Pda.getMetadata(mint) ); debugLog("# findByMint metadata: ", metadata); if (metadata.tokenStandard === 0) { @@ -1676,21 +1569,21 @@ var SplToken4; // ../suite-spl-token/src/freeze.ts import { createFreezeAccountInstruction, - getAssociatedTokenAddressSync as getAssociatedTokenAddressSync3 + getAssociatedTokenAddressSync as getAssociatedTokenAddressSync2 } from "@solana/spl-token"; var SplToken5; ((SplToken11) => { SplToken11.freeze = (mint, owner, freezeAuthority, options = {}) => { return Try(() => { const payer = options.feePayer ? options.feePayer : freezeAuthority; - const tokenAccount = getAssociatedTokenAddressSync3( + const tokenAccount = getAssociatedTokenAddressSync2( mint.toPublicKey(), owner.toPublicKey() ); const inst = createFreezeAccountInstruction( tokenAccount, mint.toPublicKey(), - new Account4.Keypair({ secret: freezeAuthority }).toPublicKey() + new Account3.Keypair({ secret: freezeAuthority }).toPublicKey() ); return new TransactionBuilder6.Common( [inst], @@ -1709,12 +1602,12 @@ var SplToken6; SplToken11.gasLessTransfer = async (mint, owner, dest, amount, mintDecimal, feePayer) => { return Try(async () => { const ownerPublicKey = owner.toKeypair().publicKey; - const sourceToken = await Account4.Associated.makeOrCreateInstruction( + const sourceToken = await Account3.Associated.makeOrCreateInstruction( mint, ownerPublicKey.toString(), feePayer ); - const destToken = await Account4.Associated.makeOrCreateInstruction( + const destToken = await Account3.Associated.makeOrCreateInstruction( mint, dest, feePayer @@ -1726,27 +1619,18 @@ var SplToken6; blockhash: blockhashObj.blockhash, feePayer: feePayer.toPublicKey() }); + inst2 = createTransferCheckedInstruction( + sourceToken.tokenAccount.toPublicKey(), + mint.toPublicKey(), + destToken.tokenAccount.toPublicKey(), + ownerPublicKey, + SplToken.calculateAmount(amount, mintDecimal), + mintDecimal, + [owner.toKeypair()] + ); if (!destToken.inst) { - inst2 = createTransferCheckedInstruction( - sourceToken.tokenAccount.toPublicKey(), - mint.toPublicKey(), - destToken.tokenAccount.toPublicKey(), - ownerPublicKey, - SplToken.calculateAmount(amount, mintDecimal), - mintDecimal, - [owner.toKeypair()] - ); tx.add(inst2); } else { - inst2 = createTransferCheckedInstruction( - sourceToken.tokenAccount.toPublicKey(), - mint.toPublicKey(), - destToken.tokenAccount.toPublicKey(), - ownerPublicKey, - SplToken.calculateAmount(amount, mintDecimal), - mintDecimal, - [owner.toKeypair()] - ); tx.add(destToken.inst).add(inst2); } tx.recentBlockhash = blockhashObj.blockhash; @@ -1766,14 +1650,14 @@ import { } from "@solana/web3.js"; import { AuthorityType, - createAssociatedTokenAccountInstruction as createAssociatedTokenAccountInstruction2, + createAssociatedTokenAccountInstruction, createInitializeMintInstruction, createMintToCheckedInstruction as createMintToCheckedInstruction2, createSetAuthorityInstruction, - getAssociatedTokenAddressSync as getAssociatedTokenAddressSync4, + getAssociatedTokenAddressSync as getAssociatedTokenAddressSync3, getMinimumBalanceForRentExemptMint, MINT_SIZE, - TOKEN_PROGRAM_ID as TOKEN_PROGRAM_ID3 + TOKEN_PROGRAM_ID as TOKEN_PROGRAM_ID2 } from "@solana/spl-token"; import { createCreateMetadataAccountV3Instruction @@ -2014,8 +1898,8 @@ var SplToken7; SplToken11.createMint = async (mint2, owner, totalAmount, mintDecimal, tokenMetadata, feePayer, isMutable) => { const connection = Node.getConnection(); const lamports = await getMinimumBalanceForRentExemptMint(connection); - const metadataPda = Account4.Pda.getMetadata(mint2.toString()); - const tokenAssociated = getAssociatedTokenAddressSync4(mint2, owner); + const metadataPda = Account3.Pda.getMetadata(mint2.toString()); + const tokenAssociated = getAssociatedTokenAddressSync3(mint2, owner); const instructions = []; instructions.push( SystemProgram.createAccount({ @@ -2023,7 +1907,7 @@ var SplToken7; newAccountPubkey: mint2, space: MINT_SIZE, lamports, - programId: TOKEN_PROGRAM_ID3 + programId: TOKEN_PROGRAM_ID2 }) ); instructions.push( @@ -2032,11 +1916,11 @@ var SplToken7; mintDecimal, owner, owner, - TOKEN_PROGRAM_ID3 + TOKEN_PROGRAM_ID2 ) ); instructions.push( - createAssociatedTokenAccountInstruction2( + createAssociatedTokenAccountInstruction( feePayer, tokenAssociated, owner, @@ -2123,7 +2007,7 @@ var SplToken7; ); debugLog("# datav2: ", datav2); debugLog("# upload content url: ", uri); - const mint2 = Account4.Keypair.create(); + const mint2 = Account3.Keypair.create(); const insts = await (0, SplToken11.createMint)( mint2.toPublicKey(), ownerPublicKey, @@ -2155,21 +2039,21 @@ var SplToken7; // ../suite-spl-token/src/thaw.ts import { createThawAccountInstruction, - getAssociatedTokenAddressSync as getAssociatedTokenAddressSync5 + getAssociatedTokenAddressSync as getAssociatedTokenAddressSync4 } from "@solana/spl-token"; var SplToken8; ((SplToken11) => { SplToken11.thaw = (mint, owner, freezeAuthority, options = {}) => { const payer = options.feePayer ? options.feePayer : freezeAuthority; return Try(() => { - const tokenAccount = getAssociatedTokenAddressSync5( + const tokenAccount = getAssociatedTokenAddressSync4( mint.toPublicKey(), owner.toPublicKey() ); const inst = createThawAccountInstruction( tokenAccount, mint.toPublicKey(), - new Account4.Keypair({ secret: freezeAuthority }).toPublicKey() + new Account3.Keypair({ secret: freezeAuthority }).toPublicKey() ); return new TransactionBuilder6.Common( [inst], @@ -2187,27 +2071,33 @@ var SplToken9; SplToken11.transfer = async (mint, owner, dest, ownerOrMultisig, amount, mintDecimal, options = {}) => { return Try(async () => { const payer = options.feePayer ? options.feePayer : ownerOrMultisig[0]; + const payerPubkey = new Account3.Keypair({ secret: payer }); const keypairs = ownerOrMultisig.map((s) => s.toKeypair()); - const sourceToken = await Account4.Associated.retryGetOrCreate( + const sourceToken = await Account3.Associated.makeOrCreateInstruction( mint, - owner, - payer + owner.toString(), + payerPubkey.pubkey ); - const destToken = await Account4.Associated.retryGetOrCreate( + const destToken = await Account3.Associated.makeOrCreateInstruction( mint, dest, - payer + payerPubkey.pubkey ); const inst = createTransferCheckedInstruction2( - sourceToken.toPublicKey(), + sourceToken.tokenAccount.toPublicKey(), mint.toPublicKey(), - destToken.toPublicKey(), + destToken.tokenAccount.toPublicKey(), owner.toPublicKey(), SplToken.calculateAmount(amount, mintDecimal), mintDecimal, keypairs ); - return new TransactionBuilder6.Common([inst], keypairs, payer.toKeypair()); + const instructions = destToken.inst ? [destToken.inst, inst] : [inst]; + return new TransactionBuilder6.Common( + instructions, + keypairs, + payer.toKeypair() + ); }); }; })(SplToken9 || (SplToken9 = {})); @@ -2307,8 +2197,11 @@ var DasApi2; sortDirection: "desc" /* Desc */ }; DasApi4.fetchOffchain = async (uri) => { - const json = await (await fetch(uri)).json(); - return json; + const response = await fetch(uri); + if (response.status !== 200) { + return {}; + } + return await response.json(); }; DasApi4.findByMint = async (mint, isCompressed) => { const asset = await DasApi.getAsset(mint); @@ -2445,20 +2338,20 @@ var RegularNft2; })(RegularNft2 || (RegularNft2 = {})); // src/freeze.ts -import { getAssociatedTokenAddressSync as getAssociatedTokenAddressSync6 } from "@solana/spl-token"; +import { getAssociatedTokenAddressSync as getAssociatedTokenAddressSync5 } from "@solana/spl-token"; import { createFreezeDelegatedAccountInstruction } from "@metaplex-foundation/mpl-token-metadata"; var RegularNft3; ((RegularNft11) => { RegularNft11.freeze = (mint, owner, freezeAuthority, options = {}) => { return Try(() => { const payer = options.feePayer ? options.feePayer : freezeAuthority; - const tokenAccount = getAssociatedTokenAddressSync6( + const tokenAccount = getAssociatedTokenAddressSync5( mint.toPublicKey(), owner.toPublicKey() ); - const editionAddress = Account4.Pda.getMasterEdition(mint); + const editionAddress = Account3.Pda.getMasterEdition(mint); const inst = createFreezeDelegatedAccountInstruction({ - delegate: new Account4.Keypair({ + delegate: new Account3.Keypair({ secret: freezeAuthority }).toPublicKey(), tokenAccount, @@ -2480,13 +2373,13 @@ import { } from "@solana/web3.js"; import { createApproveInstruction, - createAssociatedTokenAccountInstruction as createAssociatedTokenAccountInstruction3, + createAssociatedTokenAccountInstruction as createAssociatedTokenAccountInstruction2, createInitializeMintInstruction as createInitializeMintInstruction2, createMintToCheckedInstruction as createMintToCheckedInstruction3, - getAssociatedTokenAddressSync as getAssociatedTokenAddressSync7, + getAssociatedTokenAddressSync as getAssociatedTokenAddressSync6, getMinimumBalanceForRentExemptMint as getMinimumBalanceForRentExemptMint2, MINT_SIZE as MINT_SIZE2, - TOKEN_PROGRAM_ID as TOKEN_PROGRAM_ID4 + TOKEN_PROGRAM_ID as TOKEN_PROGRAM_ID3 } from "@solana/spl-token"; import { createCreateMasterEditionV3Instruction, @@ -2499,14 +2392,14 @@ var RegularNft4; const NFT_AMOUNT = 1; const DEFAULT_STORAGE_TYPE = "nftStorage"; RegularNft11.createVerifyCreator = (mint2, creator) => { - const metadata = Account4.Pda.getMetadata(mint2.toString()); + const metadata = Account3.Pda.getMetadata(mint2.toString()); return createSignMetadataInstruction({ metadata, creator }); }; RegularNft11.createDeleagate = (mint2, owner, delegateAuthority) => { - const tokenAccount = getAssociatedTokenAddressSync7(mint2, owner); + const tokenAccount = getAssociatedTokenAddressSync6(mint2, owner); return createApproveInstruction( tokenAccount, delegateAuthority, @@ -2515,25 +2408,25 @@ var RegularNft4; ); }; RegularNft11.createVerifySizedCollection = (collectionChild, collectionParent, feePayer) => { - const collectionMetadata = Account4.Pda.getMetadata( + const collectionMetadata = Account3.Pda.getMetadata( collectionParent.toString() ); - const collectionMasterEditionAccount = Account4.Pda.getMasterEdition( + const collectionMasterEditionAccount = Account3.Pda.getMasterEdition( collectionParent.toString() ); return createVerifySizedCollectionItemInstruction({ collection: collectionMetadata, collectionMasterEditionAccount, collectionMint: collectionParent, - metadata: Account4.Pda.getMetadata(collectionChild.toString()), + metadata: Account3.Pda.getMetadata(collectionChild.toString()), payer: feePayer, collectionAuthority: feePayer }); }; RegularNft11.createMint = async (mint2, owner, nftMetadata, feePayer, isMutable) => { - const ata = getAssociatedTokenAddressSync7(mint2, owner); - const tokenMetadataPubkey = Account4.Pda.getMetadata(mint2.toString()); - const masterEditionPubkey = Account4.Pda.getMasterEdition(mint2.toString()); + const ata = getAssociatedTokenAddressSync6(mint2, owner); + const tokenMetadataPubkey = Account3.Pda.getMetadata(mint2.toString()); + const masterEditionPubkey = Account3.Pda.getMasterEdition(mint2.toString()); const connection = Node.getConnection(); const instructions = []; instructions.push( @@ -2542,12 +2435,12 @@ var RegularNft4; newAccountPubkey: mint2, lamports: await getMinimumBalanceForRentExemptMint2(connection), space: MINT_SIZE2, - programId: TOKEN_PROGRAM_ID4 + programId: TOKEN_PROGRAM_ID3 }) ); instructions.push(createInitializeMintInstruction2(mint2, 0, owner, owner)); instructions.push( - createAssociatedTokenAccountInstruction3(feePayer, ata, owner, mint2) + createAssociatedTokenAccountInstruction2(feePayer, ata, owner, mint2) ); instructions.push(createMintToCheckedInstruction3(mint2, ata, owner, 1, 0)); instructions.push( @@ -2653,7 +2546,7 @@ var RegularNft4; const isMutable = input.isMutable === void 0 ? true : input.isMutable; debugLog("# input: ", input); debugLog("# datav2: ", datav2); - const mint2 = Account4.Keypair.create(); + const mint2 = Account3.Keypair.create(); const instructions = await (0, RegularNft11.createMint)( mint2.toPublicKey(), ownerPublicKey, @@ -2682,7 +2575,7 @@ var RegularNft4; const keypairs = [owner.toKeypair(), mint2.toKeypair()]; if (input.creators) { input.creators.forEach((creator) => { - if (Account4.Keypair.isSecret(creator.secret)) { + if (Account3.Keypair.isSecret(creator.secret)) { const creatorPubkey = creator.address.toPublicKey(); const inst = (0, RegularNft11.createVerifyCreator)(mint2.toPublicKey(), creatorPubkey); instructions.push(inst); @@ -2756,7 +2649,7 @@ var RegularNft5; debugLog("# input: ", input); debugLog("# sellerFeeBasisPoints: ", sellerFeeBasisPoints); debugLog("# datav2: ", datav2); - const mint = Account4.Keypair.create(); + const mint = Account3.Keypair.create(); const insts = await RegularNft4.createMint( mint.toPublicKey(), ownerPublickey, @@ -2870,8 +2763,8 @@ var RegularNft7; const isMutable = input.isMutable === void 0 ? true : input.isMutable; debugLog("# input: ", input); debugLog("# datav2: ", datav2); - const collectionMint = Account4.Keypair.create(); - const collectionMetadataAccount = Account4.Pda.getMetadata( + const collectionMint = Account3.Keypair.create(); + const collectionMetadataAccount = Account3.Pda.getMetadata( collectionMint.pubkey ); const instructions = await RegularNft4.createMint( @@ -2913,20 +2806,20 @@ var RegularNft7; })(RegularNft7 || (RegularNft7 = {})); // src/thaw.ts -import { getAssociatedTokenAddressSync as getAssociatedTokenAddressSync8 } from "@solana/spl-token"; +import { getAssociatedTokenAddressSync as getAssociatedTokenAddressSync7 } from "@solana/spl-token"; import { createThawDelegatedAccountInstruction } from "@metaplex-foundation/mpl-token-metadata"; var RegularNft8; ((RegularNft11) => { RegularNft11.thaw = (mint, owner, freezeAuthority, options = {}) => { return Try(() => { const payer = options.feePayer ? options.feePayer : freezeAuthority; - const tokenAccount = getAssociatedTokenAddressSync8( + const tokenAccount = getAssociatedTokenAddressSync7( mint.toPublicKey(), owner.toPublicKey() ); - const editionAddress = Account4.Pda.getMasterEdition(mint); + const editionAddress = Account3.Pda.getMasterEdition(mint); const inst = createThawDelegatedAccountInstruction({ - delegate: new Account4.Keypair({ + delegate: new Account3.Keypair({ secret: freezeAuthority }).toPublicKey(), tokenAccount, @@ -2975,4 +2868,4 @@ var RegularNft10 = { export { RegularNft10 as RegularNft }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vc3VpdGUtc3BsLXRva2VuL3NyYy9hZGQudHMiLCAiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9iYXRjaC50cyIsICIuLi8uLi9ub2RlL3NyYy9pbmRleC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jb21tb24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvbWludC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9wYXJ0aWFsLXNpZ24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY2FsY3VsYXRlLXR4c2l6ZS50cyIsICIuLi8uLi9nbG9iYWwvc3JjL2luZGV4LnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2Fzc29jaWF0ZWQudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMva2V5cGFpci50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9wZGEud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tdLFxuICAgIHRvdGFsQW1vdW50OiBudW1iZXIsXG4gICAgbWludERlY2ltYWw6IG51bWJlcixcbiAgICBvcHRpb25zOiBQYXJ0aWFsPE1pbnRPcHRpb25zPiA9IHt9LFxuICApOiBQcm9taXNlPFJlc3VsdDxDb21tb25TdHJ1Y3R1cmU8UHVia2V5PiwgRXJyb3I+PiA9PiB7XG4gICAgcmV0dXJuIFRyeShhc3luYyAoKSA9PiB7XG4gICAgICBjb25zdCBwYXllciA9IG9wdGlvbnMuZmVlUGF5ZXIgPyBvcHRpb25zLmZlZVBheWVyIDogb3duZXJPck11bHRpc2lnWzBdO1xuICAgICAgY29uc3Qga2V5cGFpcnMgPSBvd25lck9yTXVsdGlzaWcubWFwKChzKSA9PiBzLnRvS2V5cGFpcigpKTtcblxuICAgICAgY29uc3QgdG9rZW5Bc3NvY2lhdGVkID0gYXdhaXQgQWNjb3VudC5Bc3NvY2lhdGVkLnJldHJ5R2V0T3JDcmVhdGUoXG4gICAgICAgIHRva2VuLFxuICAgICAgICBvd25lcixcbiAgICAgICAgcGF5ZXIsXG4gICAgICApO1xuXG4gICAgICBjb25zdCBpbnN0ID0gY3JlYXRlTWludFRvQ2hlY2tlZEluc3RydWN0aW9uKFxuICAgICAgICB0b2tlbi50b1B1YmxpY0tleSgpLFxuICAgICAgICB0b2tlbkFzc29jaWF0ZWQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgQ2FsY3VsYXRlLmNhbGN1bGF0ZUFtb3VudCh0b3RhbEFtb3VudCwgbWludERlY2ltYWwpLFxuICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICAga2V5cGFpcnMsXG4gICAgICApO1xuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb248UHVia2V5PihcbiAgICAgICAgW2luc3RdLFxuICAgICAgICBrZXlwYWlycyxcbiAgICAgICAgcGF5ZXIudG9LZXlwYW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c3Qgc2lnbmVycyA9IG5ldyBTZXQ8c3RyaW5nPihmZWVQYXllclBrKTtcbiAgICBjb25zdCBhY2NvdW50cyA9IG5ldyBTZXQ8c3RyaW5nPihmZWVQYXllclBrKTtcblxuICAgIGNvbnN0IGl4c1NpemUgPSB0cmFuc2FjdGlvbi5pbnN0cnVjdGlvbnMucmVkdWNlKChhY2MsIGl4KSA9PiB7XG4gICAgICBpeC5rZXlzLmZvckVhY2goKHsgcHVia2V5LCBpc1NpZ25lciB9KSA9PiB7XG4gICAgICAgIGNvbnN0IHBrID0gcHVia2V5LnRvQmFzZTU4KCk7XG4gICAgICAgIGlmIChpc1NpZ25lcikgc2lnbmVycy5hZGQocGspO1xuICAgICAgICBhY2NvdW50cy5hZGQocGspO1xuICAgICAgfSk7XG5cbiAgICAgIGFjY291bnRzLmFkZChpeC5wcm9ncmFtSWQudG9CYXNlNTgoKSk7XG5cbiAgICAgIGNvbnN0IG5JbmRleGVzID0gaXgua2V5cy5sZW5ndGg7XG4gICAgICBjb25zdCBvcGFxdWVEYXRhID0gaXguZGF0YS5sZW5ndGg7XG5cbiAgICAgIHJldHVybiAoXG4gICAgICAgIGFjYyArXG4gICAgICAgIDEgKyAvLyBQSUQgaW5kZXhcbiAgICAgICAgY29tcGFjdEFycmF5U2l6ZShuSW5kZXhlcywgMSkgK1xuICAgICAgICBjb21wYWN0QXJyYXlTaXplKG9wYXF1ZURhdGEsIDEpXG4gICAgICApO1xuICAgIH0sIDApO1xuXG4gICAgcmV0dXJuIChcbiAgICAgIGNvbXBhY3RBcnJheVNpemUoc2lnbmVycy5zaXplLCA2NCkgKyAvLyBzaWduYXR1cmVzXG4gICAgICAzICsgLy8gaGVhZGVyXG4gICAgICBjb21wYWN0QXJyYXlTaXplKGFjY291bnRzLnNpemUsIDMyKSArIC8vIGFjY291bnRzXG4gICAgICAzMiArIC8vIGJsb2NraGFzaFxuICAgICAgY29tcGFjdEhlYWRlcih0cmFuc2FjdGlvbi5pbnN0cnVjdGl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tcblxuICAgICAgaWYgKCFyZXMuaW5zdCkge1xuICAgICAgICByZXR1cm4gcmVzLnRva2VuQWNjb3VudDtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uPFB1YmtleT4oXG4gICAgICAgIFtyZXMuaW5zdF0sXG4gICAgICAgIFtdLFxuICAgICAgICBmZWVQYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgcmVzLnRva2VuQWNjb3VudCEsXG4gICAgICApO1xuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiBSZXRyeSBmdW5jdGlvbiBpZiBjcmVhdGUgbmV3IHRva2VuIGFjY291aW50XG4gICAgICpcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gbWludFxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBvd25lclxuICAgICAqIEBwYXJhbSB7U2VjcmV0fSBmZWVQYXllclxuICAgICAqIEByZXR1cm5zIFByb21pc2U8c3RyaW5nPlxuICAgICAqL1xuICAgIGV4cG9ydCBjb25zdCByZXRyeUdldE9yQ3JlYXRlID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyOiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxzdHJpbmc+ID0+IHtcbiAgICAgIGxldCBjb3VudGVyID0gMTtcbiAgICAgIHdoaWxlIChjb3VudGVyIDwgUkVUUllfT1ZFUl9MSU1JVCkge1xuICAgICAgICB0cnkge1xuICAgICAgICAgIGNvbnN0IGluc3QgPSBhd2FpdCBnZXQobWludCwgb3duZXIsIGZlZVBheWVyLCB0cnVlKTtcblxuICAgICAgICAgIGlmIChpbnN0ICYmIHR5cGVvZiBpbnN0ID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgaW5zdCk7XG4gICAgICAgICAgICByZXR1cm4gaW5zdDtcbiAgICAgICAgICB9IGVsc2UgaWYgKGluc3QgaW5zdGFuY2VvZiBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uKSB7XG4gICAgICAgICAgICAoYXdhaXQgaW5zdC5zdWJtaXQoKSkubWFwKFxuICAgICAgICAgICAgICBhc3luYyAob2s6IHN0cmluZykgPT4ge1xuICAgICAgICAgICAgICAgIGF3YWl0IE5vZGUuY29uZmlybWVkU2lnKG9rKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gaW5zdC5kYXRhO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAoZXJyOiBFcnJvcikgPT4ge1xuICAgICAgICAgICAgICAgIGRlYnVnTG9nKCcjIEVycm9yIHN1Ym1pdCByZXRyeUdldE9yQ3JlYXRlOiAnLCBlcnIpO1xuICAgICAgICAgICAgICAgIHRocm93IGVycjtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgZGVidWdMb2coYCMgcmV0cnk6ICR7Y291bnRlcn0gY3JlYXRlIHRva2VuIGFjY291bnQ6IGAsIGUpO1xuICAgICAgICAgIGRlYnVnTG9nKGAjIG1pbnQ6ICR7bWludH0sIG93bmVyOiAke293bmVyfSwgZmVlUGF5ZXI6ICR7ZmVlUGF5ZXJ9YCk7XG4gICAgICAgIH1cbiAgICAgICAgYXdhaXQgc2xlZXAoUkVUUllfU0xFRVBfVElNRSk7XG4gICAgICAgIGNvdW50ZXIrKztcbiAgICAgIH1cbiAgICAgIHRocm93IEVycm9yKGByZXRyeSBhY3Rpb24gaXMgb3ZlciBsaW1pdCAke1JFVFJZX09WRVJfTElNSVR9YCk7XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIFtNYWluIGxvZ2ljXUdldCBBc3NvY2lhdGVkIHRva2VuIEFjY291bnQuXG4gICAgICogaWYgbm90IGNyZWF0ZWQsIGNyZWF0ZSBuZXcgdG9rZW4gYWNjb3VpbnRcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBtaW50XG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAgICogQHBhcmFtIHtQdWJrZXl9IGZlZVBheWVyXG4gICAgICogQHJldHVybnMgUHJvbWlzZTxzdHJpbmc+XG4gICAgICovXG4gICAgZXhwb3J0IGNvbnN0IG1ha2VPckNyZWF0ZUluc3RydWN0aW9uID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyPzogUHVia2V5LFxuICAgICAgYWxsb3dPd25lck9mZkN1cnZlID0gZmFsc2UsXG4gICAgKTogUHJvbWlzZTx7XG4gICAgICB0b2tlbkFjY291bnQ6IHN0cmluZztcbiAgICAgIGluc3Q6IFRyYW5zYWN0aW9uSW5zdHJ1Y3Rpb24gfCB1bmRlZmluZWQ7XG4gICAgfT4gPT4ge1xuICAgICAgY29uc3QgYXNzb2NpYXRlZFRva2VuQWNjb3VudCA9IGdldEFzc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jKFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSxcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb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AgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEuc3ltYm9sKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU3ltYm9sKG1ldGFkYXRhLnN5bWJvbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAocmVzICYmIHJlcy5pc0Vycikge1xuICAgICAgICAgIHJlc3VsdHMucHVzaCguLi5yZXMuZXJyb3IuZGV0YWlscyk7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgICAgaWYgKHJlc3VsdHMubGVuZ3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0IGluZm8gPSBhd2FpdCBjb25uZWN0aW9uLmdldFBhcnNlZFRva2VuQWNjb3VudHNCeU93bmVyKFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICB7XG4gICAgICAgICAgcHJvZ3JhbUlkOiBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICB9LFxuICAgICAgKTtcblxuICAgICAgY29uc3QgZGF0YXMgPSBpbmZvLnZhbHVlLm1hcChhc3luYyAoZCkgPT4ge1xuICAgICAgICBjb25zdCBtaW50ID0gZC5hY2NvdW50LmRhdGEucGFyc2VkLmluZm8ubWludCBhcyBQdWJrZXk7XG4gICAgICAgIGNvbnN0IHRva2VuQW1vdW50ID0gZC5hY2NvdW50LmRhdGEucGFyc2VkLmluZm8udG9rZW5BbW91bnRcbiAgICAgICAgICAuYW1vdW50IGFzIHN0cmluZztcbiAgICAgICAgaWYgKHRva2VuQW1vdW50ID09PSAnMScpIHtcbiAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIE1ldGFkYXRhLmZyb21BY2NvdW50QWRkcmVzcyhcbiAgICAgICAgICBjb25uZWN0aW9uLFxuICAgICAgICAgIEFjY291bnQuUGRhLmdldE1ldGFkYXRhKG1pbnQpLFxuICAgICAgICApXG4gICAgICAgICAgLnRoZW4oYXN5bmMgKG1ldGFkYXRhKSA9PiB7XG4gICAgICAgICAgICAvKiBlc2xpbnQtZGlzYWJsZSBAdHlwZXNjcmlwdC1lc2xpbnQvbm8tZXhwbGljaXQtYW55ICovXG4gICAgICAgICAgICByZXR1cm4gZmV0Y2hSZXRyeShtZXRhZGF0YS5kYXRhLnVyaSkudGhlbigoanNvbjogYW55KSA9PiB7XG4gICAgICAgICAgICAgIHJldHVybiBjb252ZXJ0ZXIobWV0YWRhdGEsIGpzb24sIHRva2VuQW1vdW50KTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgIH0pXG4gICAgICAgICAgLmNhdGNoKChlcnIpID0+I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ygpLFxuICAgICAgICBmZWVQYXllcixcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IGRlc3RUb2tlbiA9IGF3YWl0IEFjY291bnQuQXNzb2NpYXRlZC5tYWtlT3JDcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgZGVzdCxcbiAgICAgICAgZmVlUGF5ZXIsXG4gICAgICApO1xuXG4gICAgICBsZXQgaW5zdDI7XG4gICAgICBjb25zdCBibG9ja2hhc2hPYmogPSBhd2FpdCBOb2RlLmdldENvbm5lY3Rpb24oKS5nZXRMYXRlc3RCbG9ja2hhc2goKTtcblxuICAgICAgY29uc3QgdHggPSBuZXcgVHJhbnNhY3Rpb24oe1xuICAgICAgICBsYXN0VmFsaWRCbG9ja0hlaWdodDogYmxvY2toYXNoT2JqLmxhc3RWYWxpZEJsb2NrSGVpZ2h0LFxuICAgICAgICBibG9ja2hhc2g6IGJsb2NraGFzaE9iai5ibG9ja2hhc2gsXG4gICAgICAgIGZlZVBheWVyOiBmZWVQYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgfSk7XG5cbiAgICAgIC8vIHJldHVybiBhc3NvY2lhdGVkIHRva2VuIGFjY291bnRcbiAgICAgIGlmICghZGVzdFRva2VuLmluc3QpIHtcbiAgICAgICAgaW5zdDIgPSBjcmVhdGVUcmFuc2ZlckNoZWNrZWRJbnN0cnVjdGlvbihcbiAgICAgICAgICBzb3VyY2VUb2tlbi50b2tlbkFjY291bnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgZGVzdFRva2VuLnRva2VuQWNjb3VudC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICAgIENhbGN1bGF0b3IuY2FsY3VsYXRlQW1vdW50KGFtb3VudCwgbWludERlY2ltYWwpLFxuICAgICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICAgIFtvd25lci50b0tleXBhaXIoKV0sXG4gICAgICAgICk7XG4gICAgICAgIHR4LmFkZChpbnN0Mik7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICAvLyByZXR1cm4gaW5zdHJ1Y3Rpb24gYW5kIHVuZGVjaWRlZCBhc3NvY2lhdGVkIHRva2VuIGFjY291bnRcbiAgICAgICAgaW5zdDIgPSBjcmVhdGVUcmFuc2ZlckNoZWNrZWRJbnN0cnVjdGlvbihcbiAgICAgICAgICBzb3VyY2VUb2tlbi50b2tlbkFjY291bnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgZGVzdFRva2VuLnRva2VuQWNjb3VudC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICAgIENhbGN1bGF0b3IuY2FsY3VsYXRlQW1vdW50KGFtb3VudCwgbWludERlY2ltYWwpLFxuICAgICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICAgIFtvd25lci50b0tleXBhaXIoKV0sXG4gICAgICAgICk7XG4gICAgICAgIHR4LmFkZChkZXN0VG9rZW4uaW5zdCkuYWRkKGluc3QyKTtcbiAgICAgIH1cblxuICAgICAgdHgucmVjZW50QmxvY2toYXNoID0gYmxvY2toYXNoT2JqLmJsb2NraGFzaDtcbiAgICAgIHR4LnBhcnRpYWxTaWduKG93bmVyLnRvS2V5cGFpcigpKTtcblxuICAgICAgY29uc3Qgc2VyaWFsaXplZFR4ID0gdHguc2VyaWFsaXplKHtcbiAgICAgICAgcmVxdWlyZUFsbFNpZ25hdHVyZXM6IGZhbHNlLFxuICAgICAgfSk7XG4gICAgICBjb25zdCBoZXggPSBzZXJpYWxpemVkVHgudG9TdHJpbmcoJ2hleCcpO1xuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuUGFydGlhbFNpZ24oaGV4KTtcbiAgICB9KTtcbiAgfTtcbn1cbiIsICJpbXBvcnQge1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AgICAgICBvd25lcixcbiAgICAgICAgb3duZXIsXG4gICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgZmVlUGF5ZXIsXG4gICAgICAgIHRva2VuQXNzb2NpYXRlZCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIG1pbnQsXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZU1pbnRUb0NoZWNrZWRJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgdG9rZW5Bc3NvY2lhdGVkLFxuICAgICAgICBvd25lcixcbiAgICAgICAgQ2FsY3VsYXRlLmNhbGN1bGF0ZUFtb3VudCh0b3RhbEFtb3VudCwgbWludERlY2ltYWwpLFxuICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlQ3JlYXRlTWV0YWRhdGFBY2NvdW50VjNJbnN0cnVjdGlvbihcbiAgICAgICAge1xuICAgICAgICAgIG1ldGFkYXRhOiBtZXRhZGF0YVBkYSxcbiAgICAgICAgICBtaW50LFxuICAgICAgICAgIG1pbnRBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICAgIHBheWVyOiBmZWVQYXllcixcbiAgICAgICAgICB1cGRhdGVBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICB9LFxuICAgICAgICB7XG4gICAgICAgICAgY3JlYXRlTWV0YWRhdGFBY2NvdW50QXJnc1YzOiB7XG4gICAgICAgICAgICBkYXRhOiB0b2tlbk1ldGFkYXRhLFxuICAgICAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgICAgICAgY29sbGVjdGlvbkRldGFpbHM6IG51bG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saWNLZXksXG4gICAgICAgIHRvdGFsQW1vdW50LFxuICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICAgZGF0YXYyLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICk7XG5cbiAgICAgIC8vIGZyZWV6ZUF1dGhvcml0eVxuICAgICAgaWYgKGZyZWV6ZUF1dGhvcml0eSkge1xuICAgICAgICBpbnN0cy5wdXNoKFxuICAgICAgICAgIGNyZWF0ZUZyZWV6ZUF1dGhvcml0eShcbiAgICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICAgICAgZnJlZXplQXV0aG9yaXR5LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuTWludChcbiAgICAgICAgaW5zdHMsXG4gICAgICAgIFtvd25lci50b0tleXBhaXIoKSwgbWludC50b0tleXBhaXIoKV0sXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICBtaW50LnB1YmtleSxcbiAgICAgICk7XG4gICAgfSk7XG4gIH07XG59XG4iLCAiaW1wb3J0IHsgQ29uc3RhbnRzLCBkZWJ1Z0xvZywgaXNCcm93c2VyLCBpc05vZGUgfSBmcm9tICd+L3N1aXRlLXV0aWxzJztcbmltcG9ydCB7IEZpbGVUeXBlLCBJZGVudGl0eSwgVGFncywgVXBsb2FkYWJsZUZpbGVUeXBlIH0gZnJvbSAnfi90eXBlcy9zdG9yYWdlJztcbmltcG9ydCB7IFBoYW50b21Qcm92aWRlciB9IGZyb20gJ34vdHlwZXMvcGhhbnRvbSc7XG5pbXBvcnQgSXJ5cywgeyBXZWJJcnlzIH0gZnJvbSAnQGlyeXMvc2RrJztcbmltcG9ydCB7IFVwbG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IHRyeSB7XG4gICAgICAgICAgICBjb25zdCBvZmZjaGFpbjogT2ZmY2hhaW4gPSBhd2FpdCBmZXRjaE9mZmNoYWluKFxuICAgICAgICAgICAgICBpdGVtLmNvbnRlbnQuanNvbl91cmksXG4gICAgICAgICAgICApO1xuICAgICAgICAgICAgY29uc3QgbWVyZ2VkID0ge1xuICAgICAgICAgICAgICBvbmNoYWluOiBpdGVtLFxuICAgICAgICAgICAgICBvZmZjaGFpbjogb2ZmY2hhaW4sXG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgcmV0dXJuIENvbnZlcnRlci5OZnQuaW50b1VzZXIobWVyZ2VkKTtcbiAgICAgICAgICB9IGNhdGNoIChlcnIpIHtcbiAgICAgICAgICAgIGRlYnVnTG9nKCcjIEZhaWxlZCBmZXRjaCBvZmZjaGFpbiB1cmw6ICcsIGl0ZW0uY29udGVudC5qc29uX3VyaSk7XG4gICAgICAgICAgICByZXR1cm4gQ29udmVydGVyLk5mdC5pbnRvVXNlcih7XG4gICAgICAgICAgICAgIG9uY2hhaW46IGl0ZW0sXG4gICAgICAgICAgICAgIG9mZmNoYWluOiB7fSxcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgIH1cbiAgICAgICAgfSksXG4gICAgKTtcbiAgICByZXR1cm4ge1xuICAgICAgcGFnZTogYXNzZXRzLnZhbHVlLnBhZ2UsXG4gICAgICB0b3RhbDogYXNzZXRzLnZhbHVlLnRvdGFsLFxuICAgICAgbGltaXQ6IGFzc2V0cy52YWx1ZS5saW1pdCxcbiAgICAgIG1ldGFkYXRhcyxcbiAgICB9O1xuICB9O1xuXG4gIC8qKlxuICAgKiBGaW5kIG5mdCBieSBjb2xsZWN0aW9uIG1pbnRcbiAgICpcbiAgICogQHBhcmFtIHtQdWJrZXl9IGNvbGxlY3Rpb25NaW50XG4gICAqIEBwYXJhbSB7Ym9vbGVhbn0gaXNDb21wcmVzc2VkLFxuICAgKiBAcGFyYW0ge1BhcnRpYWw8RmluZE9wdGlvb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4gICAgbWludDogUHVibGljS2V5LFxuICAgIG93bmVyOiBQdWJsaWNLZXksXG4gICAgbmZ0TWV0YWRhdGE6IERhdGFWMixcbiAgICBmZWVQYXllcjogUHVibGljS2V5LFxuICAgIGlzTXV0YWJsZTogYm9vbGVhbixcbiAgKTogUHJvbWlzZTxUcmFuc2FjdGlvbkluc3RydWN0aW9uW10+ID0+IHtcbiAgICBjb25zdCBhdGEgPSBnZXRBc3NvY2lhdGVkVG9rZW5BZGRyZXNzU3luYyhtaW50LCBvd25lcik7XG4gICAgY29uc3QgdG9rZW5NZXRhZGF0YVB1YmtleSA9IEFjY291bnQuUGRhLmdldE1ldGFkYXRhKG1pbnQudG9TdHJpbmcoKSk7XG4gICAgY29uc3QgbWFzdGVyRWRpdGlvblB1YmtleSA9IEFjY291bnQuUGRhLmdldE1hc3RlckVkaXRpb24obWludC50b1N0cmluZygpKTtcbiAgICBjb25zdCBjb25uZWN0aW9uID0gTm9kZS5nZXRDb25uZWN0aW9uKCk7XG4gICAgY29uc3QgaW5zdHJ1Y3Rpb25zID0gW107XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIFN5c3RlbVByb2dyYW0uY3JlYXRlQWNjb3VudCh7XG4gICAgICAgIGZyb21QdWJrZXk6IGZlZVBheWVyLFxuICAgICAgICBuZXdBY2NvdW50UHVia2V5OiBtaW50LFxuICAgICAgICBsYW1wb3J0czogYXdhaXQgZ2V0TWluaW11bUJhbGFuY2VGb3JSZW50RXhlbXB0TWludChjb25uZWN0aW9uKSxcbiAgICAgICAgc3BhY2U6IE1JTlRfU0laRSxcbiAgICAgICAgcHJvZ3JhbUlkOiBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgfSksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKGNyZWF0ZUluaXRpYWxpemVNaW50SW5zdHJ1Y3Rpb24obWludCwgMCwgb3duZXIsIG93bmVyKSk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihmZWVQYXllciwgYXRhLCBvd25lciwgbWludCksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKGNyZWF0ZU1pbnRUb0NoZWNrZWRJbnN0cnVjdGlvbihtaW50LCBhdGEsIG93bmVyLCAxLCAwKSk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUNyZWF0ZU1ldGFkYXRhQWNjb3VudFYzSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHtcbiAgICAgICAgICBtZXRhZGF0YTogdG9rZW5NZXRhZGF0YVB1YmtleSxcbiAgICAgICAgICBtaW50LFxuICAgICAgICAgIG1pbnRBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICAgIHBheWVyOiBmZWVQYXllcixcbiAgICAgICAgICB1cGRhdGVBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICB9LFxuICAgICAgICB7XG4gICAgICAgICAgY3JlYXRlTWV0YWRhdGFBY2NvdW50QXJnc1YzOiB7XG4gICAgICAgICAgICBkYXRhOiBuZnRNZXRhZGF0YSxcbiAgICAgICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICAgICAgIGNvbGxlY3Rpb25EZXRhaWxzOiBudWxsLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUNyZWF0ZU1hc3RlckVkaXRpb25WM0luc3RydWN0aW9uKFxuICAgICAgICB7XG4gICAgICAgICAgZWRpdGlvbjogbWFzdGVyRWRpdGlvblB1YmtleSxcbiAgICAgICAgICBtaW50LFxuICAgICAgICAgIHVwZGF0ZUF1dGhvcml0eTogb3duZXIsXG4gICAgICAgICAgbWludEF1dGhvcml0eTogb3duZXIsXG4gICAgICAgICAgcGF5ZXI6IGZlZVBheWVyLFxu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gICAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICAgIGNyZWF0ZURlbGVhZ2F0ZShcbiAgICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICAgICAgZnJlZXplQXV0aG9yaXR5LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgLy8gY29sbGVjdGlvbiAtLS1cbiAgICAgIGlmIChpbnB1dC5jb2xsZWN0aW9uKSB7XG4gICAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICAgIGNyZWF0ZVZlcmlmeVNpemVkQ29sbGVjdGlvbihcbiAgICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIGlucHV0LmNvbGxlY3Rpb24udG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBrZXlwYWlycyA9IFtvd25lci50b0tleXBhaXIoKSwgbWludC50b0tleXBhaXIoKV07XG5cbiAgICAgIC8vIGNyZWF0b3IgLS0tXG4gICAgICBpZiAoaW5wdXQuY3JlYXRvcnMpIHtcbiAgICAgICAgaW5wdXQuY3JlYXRvcnMuZm9yRWFjaCgoY3JlYXRvcikgPT4ge1xuICAgICAgICAgIGlmIChBY2NvdW50LktleXBhaXIuaXNTZWNyZXQoY3JlYXRvci5zZWNyZXQpKSB7XG4gICAgICAgICAgICBjb25zdCBjcmVhdG9yUHVia2V5ID0gY3JlYXRvci5hZGRyZXNzLnRvUHVibGljS2V5KCk7XG4gICAgICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlVmVyaWZ5Q3JlYXRvcihtaW50LnRvUHVibGljS2V5KCksIGNyZWF0b3JQdWJrZXkpO1xuICAgIC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Y3Rpb25NZXRhZGF0YUFjY291bnQgPSBBY2NvdW50LlBkYS5nZXRNZXRhZGF0YShcbiAgICAgICAgY29sbGVjdGlvbk1pbnQucHVia2V5LFxuICAgICAgKTtcblxuICAgICAgY29uc3QgaW5zdHJ1Y3Rpb25zID0gYXdhaXQgTWludC5jcmVhdGVNaW50KFxuICAgICAgICBjb2xsZWN0aW9uTWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgZGF0YXYyLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICk7XG5cbiAgICAgIC8vIGZyZWV6ZUF1dGhvcml0eVxuICAgICAgaWYgKGZyZWV6ZUF1dGhvcml0eSkge1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgICBNaW50LmNyZWF0ZURlbGVhZ2F0ZShcbiAgICAgICAgICAgIGNvbGxlY3Rpb25NaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgICAgIGZyZWV6ZUF1dGhvcml0eS50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGNvbGxlY3Rpb25zID0ge1xuICAgICAgICBjb2xsZWN0aW9uTWV0YWRhdGE6IGNvbGxlY3Rpb25NZXRhZGF0YUFjY291bnQsXG4gICAgICAgIGNvbGxlY3Rpb25BdXRob3JpdHk6IG93bmVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgY29sbGVjdGlvbk1pbnQ6IGNvbGxlY3Rpb25NaW50LnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgIH07XG5cbiAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICBjcmVhdGVTZXRDb2xsZWN0aW9uU2l6ZUluc3RydWN0aW9u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WduZXJzKTtcbiAgICAgICAgY29uc3QgZmVlUGF5ZXJzID0gYXJyLmZpbHRlcigoYSkgPT4gYS5mZWVQYXllciAhPT0gdW5kZWZpbmVkKTtcbiAgICAgICAgbGV0IGZlZVBheWVyID0gc2lnbmVyc1swXTtcbiAgICAgICAgaWYgKGZlZVBheWVycy5sZW5ndGggPiAwICYmIGZlZVBheWVyc1swXS5mZWVQYXllcikge1xuICAgICAgICAgIGZlZVBheWVyID0gZmVlUGF5ZXJzWzBdLmZlZVBheWVyO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgdHJhbnNhY3Rpb24gPSBuZXcgVHJhbnNhY3Rpb24oKTtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHNpZ25lcnM7XG4gICAgICAgIGlmIChmZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gZmVlUGF5ZXIucHVibGljS2V5O1xuICAgICAgICAgIGZpbmFsU2lnbmVycyA9IFtmZWVQYXllciwgLi4uc2lnbmVyc107XG4gICAgICAgIH1cbiAgICAgICAgaW5zdHJ1Y3Rpb25zLm1hcCgoaW5zdCkgPT4gdHJhbnNhY3Rpb24uYWRkKGluc3QpKTtcblxuICAgICAgICAvLyBDYWxjdWxhdGVUeHNpemUuaXNNYXhUcmFuc2FjdGlvblNpemUodHJhbnNhY3Rpb24sIGZlZVBheWVyLnB1YmxpY0tleSk7XG5cbiAgICAgICAgY29uc3Qgb3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogTUFYX1JFVFJJRVMsXG4gICAgICAgIH07XG5cbiAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgIG9wdG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G9QdWJsaWNLZXkoKS50b0J1ZmZlcigpXSxcbiAgICAgICAgTVBMX0JVQkJMRUdVTV9QUk9HUkFNX0lELnRvUHVibGljS2V5KCksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGdldEJndW1TaWduZXIgPSAoKTogUHVibGljS2V5ID0+IHtcbiAgICAgIGNvbnN0IFtwdWJsaWNLZXldID0gUHVibGljS2V5LmZpbmRQcm9ncmFtQWRkcmVzc1N5bmMoXG4gICAgICAgIFtCdWZmZXIuZnJvbSgnY29sbGVjdGlvbl9jcGknLCAndXRmOCcpXSxcbiAgICAgICAgTVBMX0JVQkJMRUdVTV9QUk9HUkFNX0lELnRvUHVibGljS2V5KCksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGdldEFzc2V0SWQgPSAoYWRkcmVzczogUHVia2V5LCBsZWFmSW5kZXg6IG51bWJlcik6IFB1YmtleSA9PiB7XG4gICAgICBjb25zdCBub2RlID0gbmV3IEJOLkJOKGxlYWZJbmRleCk7XG4gICAgICBjb25zdCBbYXNzZXRJZF0gPSBQdWJsaWNLZXkuZmluZFByb2dyYW1BZGRyZXNzU3luYyhcbiAgICAgICAgW1xuICAgICAgICAgIEJ1ZmZlci5mcm9tKCdhc3NldCcsICd1dGY4JyksXG4gICAgICAgICAgYWRkcmVzcy50b1B1YmxpY0tleSgpLnRvQnVmZmVyKCksXG4gICAgICAgICAgVWludDhBcnJheS5mcm9tKG5vZGUudG9BcnJheSgnbGUnLCA4KSksXG4gICAgICAgIF0sXG4gICAgICAgIE1QTF9CVUJCTEVHVU1fUFJPR1JBTV9JRC50b1B1YmxpY0tleSgpLFxuICAgICAgKTtcbiAgICAgIHJldHVybiBhc3NldElkLnRvU3RyaW5nKCk7XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IEFj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uZGVmaW5lZCxcbiAgICApOiBPcHRpb248SW50ZXJuYWxDcmVhdG9yc1tdPiA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBudWxsO1xuICAgICAgfVxuICAgICAgcmV0dXJuIGlucHV0Lm1hcCgoZGF0YSkgPT4ge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIGFkZHJlc3M6IGRhdGEuYWRkcmVzcy50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIHNoYXJlOiBkYXRhLnNoYXJlLFxuICAgICAgICAgIHZlcmlmaWVkOiBmYWxzZSxcbiAgICAgICAgfTtcbiAgICAgIH0pO1xuICAgIH07XG5cbiAgICBleHBvcnQgY29uc3QgaW50b0NvbXByZXNzZWROZnRJbmZyYSA9IChcbiAgICAgIGlucHV0OiBPcHRpb248SW5wdXRDcmVhdG9yc1tdPiB8IHVuZGVmaW5lZCxcbiAgICApOiBJbnRlcm5hbENyZWF0b3JzW10gPT4ge1xuICAgICAgaWYgKCFpbnB1dCkge1xuICAgICAgICByZXR1cm4gW107XG4gICAgICB9XG4gICAgICByZXR1cm4gaW5wdXQhLm1hcCgoZGF0YSkgPT4ge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIGFkZHJlc3M6IGRhdGEuYWRkcmVzcy50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIHNoYXJlOiBkYXRhLnNoYXJlLFxuICAgICAgICAgIHZlcmlmaWVkOiBmYWxzZSxcbiAgICAgICAgfTtcbiAgICAgIH0pO1xuICAgIH07XG5cbiAgICBleHBvcnQgY29uc3QgaW50b1VzZXIgPSAoXG4gICAgICBvdXRwdXQ6IE9wdGlvbjxJbnRlcm5hbENyZWF0b3JzW10+LFxuICAgICk6IENyZWF0b3JzW10gfCB1bmRlZmluZWQgPT4ge1xuICAgICAgaWYgKCFvdXRwdXQpIHtcbiAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICAgIH1cblxuICAgICAgcmV0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AgICAgICAgLmFtb3VudCBhcyBzdHJpbmc7XG4gICAgICAgIGlmICh0b2tlbkFtb3VudCA9PT0gJzEnKSB7XG4gICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBNZXRhZGF0YS5mcm9tQWNjb3VudEFkZHJlc3MoXG4gICAgICAgICAgY29ubmVjdGlvbixcbiAgICAgICAgICBBY2NvdW50LlBkYS5nZXRNZXRhZGF0YShtaW50KSxcbiAgICAgICAgKVxuICAgICAgICAgIC50aGVuKGFzeW5jIChtZXRhZGF0YSkgPT4ge1xuICAgICAgICAgICAgLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLWV4cGxpY2l0LWFueSAqL1xuICAgICAgICAgICAgcmV0dXJuIGZldGNoUmV0cnkobWV0YWRhdGEuZGF0YS51cmkpLnRoZW4oKGpzb246IGFueSkgPT4ge1xuICAgICAgICAgICAgICByZXR1cm4gY29udmVydGVyKG1ldGFkYXRhLCBqc29uLCB0b2tlbkFtb3VudCk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICB9KVxuICAgICAgICAgIC5jYXRjaCgoZXJyKSA9PiBkZWJ1Z0xvZygnIyBbRmV0Y2ggZXJyb3JdJywgZXJyKSk7XG4gICAgICB9KTtcblxuICAgICAgY29uc3QgZmlsdGVycyA9IChhd2FpdCBQcm9taXNlLmFsbChkYXRhcykpLmZpbHRlcihcbiAgICAgICAgKGRhdGEpID0+IGRhdGEgIT09IHVuZGVmaW5lZCxcbiAgICAgICk7XG4gICAgICByZXR1cm4gZmlsdGVycyBhcyBUb2tlbk1ldGFkYXRhW107XG4gICAgfSk7XG4gIH07XG5cbiAgLyoqXG4gICAqIEZldGNoIG1pbnRlZCBtZXRhZGF0YSBieSBtaW50IGFkZHJlc3NcbiAgICpcbiAgICogQHBhcmFtIHtQdWJrZXl9IG1pbnRcbiAgICogQHJldHVybiBQcm9taXNlPFJlc3VsdDxVc2VyU2lkZU91dHB1d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ai5sYXN0VmFsaWRCbG9ja0hlaWdodCxcbiAgICAgICAgYmxvY2toYXNoOiBibG9ja2hhc2hPYmouYmxvY2toYXNoLFxuICAgICAgICBmZWVQYXllcjogZmVlUGF5ZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgIH0pO1xuXG4gICAgICBpbnN0MiA9IGNyZWF0ZVRyYW5zZmVyQ2hlY2tlZEluc3RydWN0aW9uKFxuICAgICAgICBzb3VyY2VUb2tlbi50b2tlbkFjY291bnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBkZXN0VG9rZW4udG9rZW5BY2NvdW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICBDYWxjdWxhdG9yLmNhbGN1bGF0ZUFtb3VudChhbW91bnQsIG1pbnREZWNpbWFsKSxcbiAgICAgICAgbWludERlY2ltYWwsXG4gICAgICAgIFtvd25lci50b0tleXBhaXIoKV0sXG4gICAgICApO1xuXG4gICAgICAvLyByZXR1cm4gYXNzb2NpYXRlZCB0b2tlbiBhY2NvdW50XG4gICAgICBpZiAoIWRlc3RUb2tlbi5pbnN0KSB7XG4gICAgICAgIHR4LmFkZChpbnN0Mik7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICAvLyByZXR1cm4gaW5zdHJ1Y3Rpb24gYW5kIHVuZGVjaWRlZCBhc3NvY2lhdGVkIHRva2VuIGFjY291bnRcbiAgICAgICAgdHguYWRkKGRlc3RUb2tlbi5pbnN0KS5hZGQoaW5zdDIpO1xuICAgICAgfVxuXG4gICAgICB0eC5yZWNlbnRCbG9ja2hhc2ggPSBibG9ja2hhc2hPYmouYmxvY2toYXNoO1xuICAgICAgdHgucGFydGlhbFNpZ24ob3duZXIudG9LZXlwYWlyKCkpO1xuXG4gICAgICBjb25zdCBzZXJpYWxpemVkVHggPSB0eC5zZXJpYWxpemUoe1xuICAgICAgICByZXF1aXJlQWxsU2lnbmF0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cyxcbiAgICAgICAgcHJvZ3JhbUlkOiBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgfSksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlSW5pdGlhbGl6ZU1pbnRJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgbWludERlY2ltYWwsXG4gICAgICAgIG93bmVyLFxuICAgICAgICBvd25lcixcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICBmZWVQYXllcixcbiAgICAgICAgdG9rZW5Bc3NvY2lhdGVkLFxuICAgICAgICBvd25lcixcbiAgICAgICAgbWludCxcbiAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlTWludFRvQ2hlY2tlZEluc3RydWN0aW9uKFxuICAgICAgICBtaW50LFxuICAgICAgICB0b2tlbkFzc29jaWF0ZWQsXG4gICAgICAgIG93bmVyLFxuICAgICAgICBDYWxjdWxhdGUuY2FsY3VsYXRlQW1vdW50KHRvdGFsQW1vdW50LCBtaW50RGVjaW1hbCksXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgKSxcbiAgICApO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVDcmVhdGVNZXRhZGF0YUFjY291bnRWM0luc3RydWN0aW9uKFxuICAgICAgICB7XG4gICAgICAgICAgbWV0YWRhdGE6IG1ldGFkYXRhUGRhLFxuICAgICAgICAgIG1pbnQsXG4gICAgICAgICAgbWludEF1dGhvcml0eTogb3duZXIsXG4gICAgICAgICAgcGF5ZXI6IGZlZVBheWVyLFxuICAgICAgICAgIHVwZGF0ZUF1dGhvcml0eTogb3duZXIs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0b3JhZ2VNZXRhZGF0YSxcbiAgICAgICAgICBpbnB1dC5maWxlUGF0aCxcbiAgICAgICAgICBzdG9yYWdlVHlwZSxcbiAgICAgICAgICBwYXllcixcbiAgICAgICAgKTtcblxuICAgICAgICBpZiAodXBsb2FkZWQuaXNFcnIpIHtcbiAgICAgICAgICB0aHJvdyB1cGxvYWRlZDtcbiAgICAgICAgfVxuICAgICAgICB1cmkgPSB1cGxvYWRlZC52YWx1ZTtcbiAgICAgIH0gZWxzZSBpZiAoaW5wdXQudXJpKSB7XG4gICAgICAgIGNvbnN0IGltYWdlID0geyBpbWFnZTogaW5wdXQudXJpIH07XG4gICAgICAgIGNvbnN0IHVwbG9hZGVkID0gYXdhaXQgU3RvcmFnZS51cGxvYWREYXRhKFxuICAgICAgICAgIHsgLi4uc3RvcmFnZU1ldGFkYXRhLCAuLi5pbWFnZSB9LFxuICAgICAgICAgIHN0b3JhZ2VUeXBlLFxuICAgICAgICAgIHBheWVyLFxuICAgICAgICApO1xuICAgICAgICBpZiAodXBsb2FkZWQuaXNFcnIpIHtcbiAgICAgICAgICB0aHJvdyB1cGxvYWRlZDtcbiAgICAgICAgfVxuICAgICAgICB1cmkgPSB1cGxvYWRlZC52YWx1ZTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHRocm93IEVycm9yKGBNdXN0IHNldCBmaWxlUGF0aCcgb3IgJ3VyaSdgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgaXNNdXRhYmxlID0gdHJ1ZTtcblxuICAgICAgY29uc3QgZGF0YXYyID0gQ29udmVydGVyLlRva2VuTWV0YWRhdGEuaW50b0luZnJhKFxuICAgICAgICBpbnB1dCxcbiAgICAgICAgdXJpLFxuICAgICAgICBzZWxsZXJGZWVCYXNpc1BvaW50cyxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGRhdGF2MjogJywgZGF0YXYyKTtcbiAgICAgIGRlYnVnTG9nKCcjIHVwbG9hZCBjb250ZW50IHVybDogJywgdXJpKTtcblxuICAgICAgY29uc3QgbWludCA9IEFjY291bnQuS2V5cGFpci5jcmVhdGUoKTtcbiAgICAgIGNvbnN0IGluc3RzID0gYXdhaXQgY3JlYXRlTWludChcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgdG90YWxBbW91bnQsXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICBkYXRhdjIsXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgKTtcblxuICAgICAgLy8gZnJlZXplQXV0aG9yaXR5XG4gICAgICBpZiAoZnJlZXplQXV0aG9yaXR5KSB7XG4gICAgICAgIGluc3RzLnB1c2goXG4gICAgICAgICAgY3JlYXRlRnJlZXplQXV0aG9yaXR5KFxuICAgICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgICAgICBmcmVlemVBdXRob3JpdHkudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5NaW50KFxuICAgICAgICBpbnN0cyxcbiAgICAgICAgW293bmVyLnRvS2V5cGFpcigpLCBtaW50LnRvS2V5cGFpcigpXSxcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCksXG4gICAgICAgIG1pbnQucHVia2V5LFxuICAgICAgKTtcbiAgICB9KTtcbiAgfTtcbn1cbiIsICJpbXBvcnQgeyBDb25zdGFudHMsIGRlYnVnTG9nLCBpc0Jyb3dzZXIsIGlzTm9kZSB9IGZyb20gJ34vc3VpdGUtdXRpbHMnO1xuaW1wb3J0IHsgRmlsZVR5cGUsIElkZW50aXR5LCBUYWdzLCBVcGxvYWRhYmxlRmlsZVR5cGUgfSBmcm9tICd+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G5ldyBBY2NvdW50LktleXBhaXIoeyBzZWNyZXQ6IHBheWVyIH0pO1xuICAgICAgY29uc3Qga2V5cGFpcnMgPSBvd25lck9yTXVsdGlzaWcubWFwKChzKSA9PiBzLnRvS2V5cGFpcigpKTtcbiAgICAgIGNvbnN0IHNvdXJjZVRva2VuID0gYXdhaXQgQWNjb3VudC5Bc3NvY2lhdGVkLm1ha2VPckNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICBtaW50LFxuICAgICAgICBvd25lci50b1N0cmluZygpLFxuICAgICAgICBwYXllclB1YmtleS5wdWJrZXksXG4gICAgICApO1xuXG4gICAgICBjb25zdCBkZXN0VG9rZW4gPSBhd2FpdCBBY2NvdW50LkFzc29jaWF0ZWQubWFrZU9yQ3JlYXRlSW5zdHJ1Y3Rpb24oXG4gICAgICAgIG1pbnQsXG4gICAgICAgIGRlc3QsXG4gICAgICAgIHBheWVyUHVia2V5LnB1YmtleSxcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVUcmFuc2ZlckNoZWNrZWRJbnN0cnVjdGlvbihcbiAgICAgICAgc291cmNlVG9rZW4udG9rZW5BY2NvdW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgZGVzdFRva2VuLnRva2VuQWNjb3VudC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICBDYWxjdWxhdG9yLmNhbGN1bGF0ZUFtb3VudChhbW91bnQsIG1pbnREZWNpbWFsKSxcbiAgICAgICAgbWludERlY2ltYWwsXG4gICAgICAgIGtleXBhaXJzLFxuICAgICAgKTtcblxuICAgICAgY29uc3QgaW5zdHJ1Y3Rpb25zID0gZGVzdFRva2VuLmluc3QgPyBbZGVzdFRva2VuLmluc3QsIGluc3RdIDogW2luc3RdO1xuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5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CxcbiAgICAgICAgICBtaW50QXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBwYXllcjogZmVlUGF5ZXIsXG4gICAgICAgICAgdXBkYXRlQXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgIGNyZWF0ZU1ldGFkYXRhQWNjb3VudEFyZ3NWMzoge1xuICAgICAgICAgICAgZGF0YTogbmZ0TWV0YWRhdGEsXG4gICAgICAgICAgICBpc011dGFibGUsXG4gICAgICAgICAgICBjb2xsZWN0aW9uRGV0YWlsczogbnVsbCxcbiAgICAgICAgICB9LFxuICAgICAgICB9LFxuICAgICAgKSxcbiAgICApO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVDcmVhdGVNYXN0ZXJFZGl0aW9uVjNJbnN0cnVjdGlvbihcbiAgICAgICAge1xuICAgICAgICAgIGVkaXRpb246IG1hc3RlckVkaXRpb25QdWJrZXksXG4gICAgICAgICAgbWludCxcbiAgICAgICAgICB1cGRhdGVBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICAgIG1pbnRBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICAgIHBheWVyOiBmZWVQYXllcixcbiAgICAgICAgICBtZXRhZGF0YTogdG9rZW5NZXRhZGF0YVB1YmtleSxcbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgIGNyZWF0ZU1hc3RlckVkaXRpb25BcmdzOiB7XG4gICAgICAgICAgICBtYXhTdXBwbHk6IDAsXG4gICAgICAgICAgfSxcbiAgICAgICAgfSxcbiAgICAgICksXG4gICAgKTtcbiAgICByZXR1cm4gaW5zdHJ1Y3Rpb25zO1xuICB9O1xuXG4gIC8qKlxuICAgKiBVcGxvYWQgY29udGVudCBhbmQgTkZUIG1pbnRcbiAgICpcbiAgICogQHBhcmFtIHtTZWNyZXR9IG93bmVyICAgICAgICAgLy8gb3duZXIncyBTZWNyZXRcbiAgICogQHBhcmFtIHtJ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ICAgICAgICBpbnB1dCxcbiAgICAgICAgdXJpLFxuICAgICAgICBzZWxsZXJGZWVCYXNpc1BvaW50cyxcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IGlzTXV0YWJsZSA9IGlucHV0LmlzTXV0YWJsZSA9PT0gdW5kZWZpbmVkID8gdHJ1ZSA6IGlucHV0LmlzTXV0YWJsZTtcblxuICAgICAgZGVidWdMb2coJyMgaW5wdXQ6ICcsIGlucHV0KTtcbiAgICAgIGRlYnVnTG9nKCcjIGRhdGF2MjogJywgZGF0YXYyKTtcblxuICAgICAgY29uc3QgbWludCA9IEFjY291bnQuS2V5cGFpci5jcmVhdGUoKTtcblxuICAgICAgY29uc3QgaW5zdHJ1Y3Rpb25zID0gYXdhaXQgY3JlYXRlTWludChcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgZGF0YXYyLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICk7XG5cbiAgICAgIC8vIGZyZWV6ZUF1dGhvcml0eVxuICAgICAgaWYgKGZyZWV6ZUF1dGhvcml0eSkge1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgICBjcmVhdGVEZWxlYWdhdGUoXG4gICAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgICAgIGZyZWV6ZUF1dGhvcml0eS50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIC8vIGNvbGxlY3Rpb24gLS0tXG4gICAgICBpZiAoaW5wdXQuY29sbGVjdGlvbikge1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgICBjcmVhdGVWZXJpZnlTaXplZENvbGxlY3Rpb24oXG4gICAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBpbnB1dC5jb2xsZWN0aW9uLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3Qga2V5cGFpcnMgPSBbb3duZXIudG9LZXlwYWlyKCksIG1pbnQudG9LZXlwYWlyKCldO1xuXG4gICAgICAvLyBjcmVhdG9yIC0tLVxuICAgICAgaWYgKGlucHV0LmNyZWF0b3JzKSB7XG4gICAgICAgIGlucHV0LmNyZWF0b3JzLmZvckVhY2goKGNyZWF0b3IpID0+IHtcbiAgICAgICAgICBpZiAoQWNjb3VudC5LZXlwYWlyLmlzU2VjcmV0KGNyZWF0b3Iuc2VjcmV0KSkge1xuICAgICAgICAgICAgY29uc3QgY3JlYXRvclB1YmtleSA9IGNyZWF0b3IuYWRkcmVzcy50b1B1YmxpY0tleSgpO1xuICAgICAgICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZVZlcmlmeUNyZWF0b3IobWludC50b1B1YmxpY0tleSgpLCBjcmVhdG9yUHVia2V5KTtcbiAgICAgICAgICAgIGluc3RydWN0aW9ucy5wdXNoKGluc3QpO1xuICAgICAgICAgICAga2V5cGFpcnMucHVzaChjcmVhdG9yLnNlY3JldC50b0tleXBhaXIoKSk7XG4gICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuTWludChcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLFxuICAgICAgICBrZXlwYWlycyxcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCksXG4gICAgICAgIG1pbnQucHVia2V5LFxuICAgICAgKTtcbiAgICB9KTtcbiAgfTtcbn1cbiIsICJpbXBvcnQgeyBkZWJ1Z0xvZywgUmVzdWx0LCBUcnksIHVuaXhUaW1l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b2coJyMgc2VsbGVyRmVlQmFzaXNQb2ludHM6ICcsIHNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgIGRlYnVnTG9nKCcjIGRhdGF2MjogJywgZGF0YXYyKTtcblxuICAgICAgY29uc3QgbWludCA9IEFjY291bnQuS2V5cGFpci5jcmVhdGUoKTtcbiAgICAgIGNvbnN0IGluc3RzID0gYXdhaXQgTWludC5jcmVhdGVNaW50KFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyUHVibGlja2V5LFxuICAgICAgICBkYXRhdjIsXG4gICAgICAgIGZlZVBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICk7XG5cbiAgICAgIC8vIGZyZWV6ZUF1dGhvcml0eVxuICAgICAgaWYgKG9wdGlvbnMuZnJlZXplQXV0aG9yaXR5KSB7XG4gICAgICAgIGluc3RzLnB1c2goXG4gICAgICAgICAgTWludC5jcmVhdGVEZWxlYWdhdGUoXG4gICAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBvd25lclB1YmxpY2tleSxcbiAgICAgICAgICAgIG9wdGlvbnMuZnJlZXplQXV0aG9yaXR5LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgYmxvY2toYXNoT2JqID0gYXdhaXQgTm9kZS5nZXRDb25uZWN0aW9uKCkuZ2V0TGF0ZXN0QmxvY2toYXNoKCk7XG4gICAgICBjb25zdCB0eCA9IG5ldyBUcmFuc2FjdGlvbih7XG4gICAgICAgIGxhc3RWYWxpZEJsb2NrSGVpZ2h0OiBibG9ja2hhc2hPYmoubGFzdFZhbGlkQmxvY2tIZWlnaHQsXG4gICAgICAgIGJsb2NraGFzaDogYmxvY2toYXNoT2JqLmJsb2NraGFzaCxcbiAgICAgICAgZmVlUGF5ZXI6IGZlZVBheWVyLnRvUHVibGljS2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lemVBdXRob3JpdHkpIHtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgICAgTWludC5jcmVhdGVEZWxlYWdhdGUoXG4gICAgICAgICAgICBjb2xsZWN0aW9uTWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgICAgICBmcmVlemVBdXRob3JpdHkudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBjb2xsZWN0aW9ucyA9IHtcbiAgICAgICAgY29sbGVjdGlvbk1ldGFkYXRhOiBjb2xsZWN0aW9uTWV0YWRhdGFBY2NvdW50LFxuICAgICAgICBjb2xsZWN0aW9uQXV0aG9yaXR5OiBvd25lci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgIGNvbGxlY3Rpb25NaW50OiBjb2xsZWN0aW9uTWludC50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICB9O1xuXG4gICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgY3JlYXRlU2V0Q29sbGVjdGlvblNpemVJbnN0cnVjdGlvbihjb2xsZWN0aW9ucywge1xuICAgICAgICAgIHNldENvbGxlY3Rpb25TaXplQXJnczoge1xuICAgICAgICAgICAgc2l6ZTogY29sbGVjdGlvblNpemUgfHwgREVGQVVMVF9DT0xMRUNUSU9OX1NJWkUsXG4gICAgICAgICAgfSxcbiAgICAgICAgfSksXG4gICAgICApO1xuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5NaW50KFxuICAgICAgICBpbnN0cnVjdGlvbnMsXG4gICAgICAgIFtvd25lci50b0tleXBhaXIoKSwgY29sbGVjdGlvbk1pbnQudG9LZXlwYWlyKCldLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgY29sbGVjdGlvbk1pbnQucHVia2V5LFxuICAgICAgKTtcbi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lzdGVtUHJvZ3JhbSIsICJnZXRNaW5pbXVtQmFsYW5jZUZvclJlbnRFeGVtcHRNaW50IiwgIk1JTlRfU0laRSIsICJUT0tFTl9QUk9HUkFNX0lEIiwgImNyZWF0ZUluaXRpYWxpemVNaW50SW5zdHJ1Y3Rpb24iLCAiY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uIiwgImNyZWF0ZU1pbnRUb0NoZWNrZWRJbnN0cnVjdGlvbiIsICJDb252ZXJ0ZXIiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlRyYW5zYWN0aW9uIiwgIlJlZ3VsYXJOZnQiLCAiQ29udmVydGVyIiwgIkFjY291bnQiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlJlZ3VsYXJOZnQiLCAiU3BsVG9rZW4iLCAiUmVndWxhck5mdCIsICJDb252ZXJ0ZXIiLCAiQWNjb3VudCIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiZ2V0QXNzb2NpYXRlZFRva2VuQWRkcmVzc1N5bmMiLCAiUmVndWxhck5mdCIsICJBY2NvdW50IiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJSZWd1bGFyTmZ0IiwgIlNwbFRva2VuIiwgIlJlZ3VsYXJOZnQiXQp9Cg== \ No newline at end of file diff --git a/packages/suite-sol-native/dist/index.js b/packages/suite-sol-native/dist/index.js index 3e95374c0..73d0e771d 100644 --- a/packages/suite-sol-native/dist/index.js +++ b/packages/suite-sol-native/dist/index.js @@ -479,14 +479,11 @@ var TransactionBuilder5; // ../global/src/index.ts var import_web39 = require("@solana/web3.js"); -// ../account/src/associated.ts -var import_spl_token = require("@solana/spl-token"); - // ../account/src/keypair.ts var import_web37 = require("@solana/web3.js"); var import_bs58 = __toESM(require("bs58")); var Account; -((Account5) => { +((Account4) => { class Keypair4 { secret; pubkey; @@ -522,111 +519,16 @@ var Account; }); }; } - Account5.Keypair = Keypair4; + Account4.Keypair = Keypair4; })(Account || (Account = {})); -// ../account/src/associated.ts -var Account2; -((Account5) => { - let Associated; - ((Associated2) => { - const RETRY_OVER_LIMIT = 10; - const RETRY_SLEEP_TIME = 3; - const get = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const res = await (0, Associated2.makeOrCreateInstruction)( - mint, - owner, - new Account.Keypair({ secret: feePayer }).pubkey, - allowOwnerOffCurve - ); - if (!res.inst) { - return res.tokenAccount; - } - return new TransactionBuilder6.Common( - [res.inst], - [], - feePayer.toKeypair(), - res.tokenAccount - ); - }; - Associated2.retryGetOrCreate = async (mint, owner, feePayer) => { - let counter = 1; - while (counter < RETRY_OVER_LIMIT) { - try { - const inst = await get(mint, owner, feePayer, true); - if (inst && typeof inst === "string") { - debugLog("# associatedTokenAccount: ", inst); - return inst; - } else if (inst instanceof TransactionBuilder6.Common) { - (await inst.submit()).map( - async (ok) => { - await Node.confirmedSig(ok); - return inst.data; - }, - (err) => { - debugLog("# Error submit retryGetOrCreate: ", err); - throw err; - } - ); - } - } catch (e) { - debugLog(`# retry: ${counter} create token account: `, e); - debugLog(`# mint: ${mint}, owner: ${owner}, feePayer: ${feePayer}`); - } - await sleep(RETRY_SLEEP_TIME); - counter++; - } - throw Error(`retry action is over limit ${RETRY_OVER_LIMIT}`); - }; - Associated2.makeOrCreateInstruction = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const associatedTokenAccount = (0, import_spl_token.getAssociatedTokenAddressSync)( - mint.toPublicKey(), - owner.toPublicKey(), - allowOwnerOffCurve, - import_spl_token.TOKEN_PROGRAM_ID, - import_spl_token.ASSOCIATED_TOKEN_PROGRAM_ID - ); - debugLog("# associatedTokenAccount: ", associatedTokenAccount.toString()); - try { - await (0, import_spl_token.getAccount)( - Node.getConnection(), - associatedTokenAccount, - Node.getConnection().commitment, - import_spl_token.TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst: void 0 - }; - } catch (error) { - if (!(error instanceof import_spl_token.TokenAccountNotFoundError) && !(error instanceof import_spl_token.TokenInvalidAccountOwnerError)) { - throw Error("Unexpected error"); - } - const payer = !feePayer ? owner : feePayer; - const inst = (0, import_spl_token.createAssociatedTokenAccountInstruction)( - payer.toPublicKey(), - associatedTokenAccount, - owner.toPublicKey(), - mint.toPublicKey(), - import_spl_token.TOKEN_PROGRAM_ID, - import_spl_token.ASSOCIATED_TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst - }; - } - }; - })(Associated = Account5.Associated || (Account5.Associated = {})); -})(Account2 || (Account2 = {})); - // ../account/src/pda.ts var import_web38 = require("@solana/web3.js"); var import_mpl_token_metadata = require("@metaplex-foundation/mpl-token-metadata"); var import_mpl_bubblegum = require("@metaplex-foundation/mpl-bubblegum"); var import_bn = __toESM(require("bn.js")); -var Account3; -((Account5) => { +var Account2; +((Account4) => { let Pda; ((Pda2) => { Pda2.getMetadata = (address) => { @@ -678,14 +580,13 @@ var Account3; ); return assetId.toString(); }; - })(Pda = Account5.Pda || (Account5.Pda = {})); -})(Account3 || (Account3 = {})); + })(Pda = Account4.Pda || (Account4.Pda = {})); +})(Account2 || (Account2 = {})); // ../account/src/index.ts -var Account4 = { - ...Account2, +var Account3 = { ...Account, - ...Account3 + ...Account2 }; // ../global/src/index.ts @@ -716,7 +617,7 @@ String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, op } return url; } - if (Account4.Keypair.isPubkey(addressOrSignature)) { + if (Account3.Keypair.isPubkey(addressOrSignature)) { if (explorer === "solanafm" /* SolanaFM */) { url = `${Constants.EXPLORER_SOLANAFM_URL}/address/${addressOrSignature}?cluster=${cluster}`; } else if (explorer === "xray" /* Xray */) { @@ -736,13 +637,13 @@ String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, op return url; }; String.prototype.toPublicKey = function() { - if (!Account4.Keypair.isPubkey(this.toString())) { + if (!Account3.Keypair.isPubkey(this.toString())) { throw Error(`No match KeyPair.PubKey: ${this.toString()}`); } return new import_web39.PublicKey(this.toString()); }; String.prototype.toKeypair = function() { - if (!Account4.Keypair.isSecret(this.toString())) { + if (!Account3.Keypair.isSecret(this.toString())) { throw Error(`No match KeyPair.Secret: ${this.toString()}`); } const decoded = import_bs582.default.decode(this.toString()); @@ -1767,7 +1668,7 @@ var SolNative3; })(SolNative3 || (SolNative3 = {})); // src/transfer-with-multisig.ts -var import_spl_token2 = require("@solana/spl-token"); +var import_spl_token = require("@solana/spl-token"); var SolNative4; ((SolNative6) => { const RADIX = 10; @@ -1776,7 +1677,7 @@ var SolNative4; const connection = Node.getConnection(); const payer = options.feePayer ? options.feePayer : multisig[0]; const keypairs = multisig.map((s) => s.toKeypair()); - const wrapped = await (0, import_spl_token2.createWrappedNativeAccount)( + const wrapped = await (0, import_spl_token.createWrappedNativeAccount)( connection, payer.toKeypair(), owner.toPublicKey(), @@ -1784,27 +1685,27 @@ var SolNative4; ); debugLog("# wrapped sol: ", wrapped.toBase58()); const instructions = []; - const token = await (0, import_spl_token2.createMint)( + const token = await (0, import_spl_token.createMint)( connection, payer.toKeypair(), owner.toPublicKey(), owner.toPublicKey(), 0 ); - const sourceToken = await Account4.Associated.retryGetOrCreate( + const sourceToken = await Account3.Associated.retryGetOrCreate( token.toString(), owner, payer ); debugLog("# sourceToken: ", sourceToken); - const destToken = await Account4.Associated.retryGetOrCreate( + const destToken = await Account3.Associated.retryGetOrCreate( token.toString(), wrapped.toString(), payer ); debugLog("# destToken: ", destToken); instructions.push( - (0, import_spl_token2.createTransferInstruction)( + (0, import_spl_token.createTransferInstruction)( sourceToken.toPublicKey(), destToken.toPublicKey(), owner.toPublicKey(), @@ -1814,7 +1715,7 @@ var SolNative4; ) ); instructions.push( - (0, import_spl_token2.createCloseAccountInstruction)( + (0, import_spl_token.createCloseAccountInstruction)( wrapped, dest.toPublicKey(), owner.toPublicKey(), @@ -1841,4 +1742,4 @@ var SolNative5 = { 0 && (module.exports = { SolNative }); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9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DcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIG5ldyBLZXlwYWlyLktleXBhaXIoeyBzZWNyZXQ6IGZlZVBheWVyIH0pLnB1YmtleSxcbiAgICAgICAgYWxsb3dPd25lck9mZkN1cnZlLFxuICAgICAgKTtcblxuICAgICAgaWYgKCFyZXMuaW5zdCkge1xuICAgICAgICByZXR1cm4gcmVzLnRva2VuQWNjb3VudDtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uPFB1YmtleT4oXG4gICAgICAgIFtyZXMuaW5zdF0sXG4gICAgICAgIFtdLFxuICAgICAgICBmZWVQYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgcmVzLnRva2VuQWNjb3VudCEsXG4gICAgICApO1xuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiBSZXRyeSBmdW5jdGlvbiBpZiBjcmVhdGUgbmV3IHRva2VuIGFjY291aW50XG4gICAgICpcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gbWludFxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBvd25lclxuICAgICAqIEBwYXJhbSB7U2VjcmV0fSBmZWVQYXllclxuICAgICAqIEByZXR1cm5zIFByb21pc2U8c3RyaW5nPlxuICAgICAqL1xuICAgIGV4cG9ydCBjb25zdCByZXRyeUdldE9yQ3JlYXRlID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyOiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxzdHJpbmc+ID0+IHtcbiAgICAgIGxldCBjb3VudGVyID0gMTtcbiAgICAgIHdoaWxlIChjb3VudGVyIDwgUkVUUllfT1ZFUl9MSU1JVCkge1xuICAgICAgICB0cnkge1xuICAgICAgICAgIGNvbnN0IGluc3QgPSBhd2FpdCBnZXQobWludCwgb3duZXIsIGZlZVBheWVyLCB0cnVlKTtcblxuICAgICAgICAgIGlmIChpbnN0ICYmIHR5cGVvZiBpbnN0ID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgaW5zdCk7XG4gICAgICAgICAgICByZXR1cm4gaW5zdDtcbiAgICAgICAgICB9IGVsc2UgaWYgKGluc3QgaW5zdGFuY2VvZiBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uKSB7XG4gICAgICAgICAgICAoYXdhaXQgaW5zdC5zdWJtaXQoKSkubWFwKFxuICAgICAgICAgICAgICBhc3luYyAob2s6IHN0cmluZykgPT4ge1xuICAgICAgICAgICAgICAgIGF3YWl0IE5vZGUuY29uZmlybWVkU2lnKG9rKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gaW5zdC5kYXRhO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAoZXJyOiBFcnJvcikgPT4ge1xuICAgICAgICAgICAgICAgIGRlYnVnTG9nKCcjIEVycm9yIHN1Ym1pdCByZXRyeUdldE9yQ3JlYXRlOiAnLCBlcnIpO1xuICAgICAgICAgICAgICAgIHRocm93IGVycjtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgZGVidWdMb2coYCMgcmV0cnk6ICR7Y291bnRlcn0gY3JlYXRlIHRva2VuIGFjY291bnQ6IGAsIGUpO1xuICAgICAgICAgIGRlYnVnTG9nKGAjIG1pbnQ6ICR7bWludH0sIG93bmVyOiAke293bmVyfSwgZmVlUGF5ZXI6ICR7ZmVlUGF5ZXJ9YCk7XG4gICAgICAgIH1cbiAgICAgICAgYXdhaXQgc2xlZXAoUkVUUllfU0xFRVBfVElNRSk7XG4gICAgICAgIGNvdW50ZXIrKztcbiAgICAgIH1cbiAgICAgIHRocm93IEVycm9yKGByZXRyeSBh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udDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG1pbnQudG9QdWJsaWNLZ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gPT4ge1xuICAgICAgICAgIGlmICghZmlsZS5maWxlUGF0aCkge1xuICAgICAgICAgICAgcmV0dXJuIHt9O1xuICAgICAgICAgIH1cbiAgICAgICAgICBjb25zdCByZXMgPSBhd2FpdCBjYWxsYmFja0Z1bmMoZmlsZS5maWxlUGF0aCwgc3RvcmFnZVR5cGUsIGZlZVBheWVyKTtcbiAgICAgICAgICBpZiAocmVzLmlzRXJyKSB7XG4gICAgICAgICAgICB0aHJvdyBFcnJvcihyZXMuZXJyb3IubWVzc2FnZSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBvdmVyd3JpdGVPYmplY3QoZmlsZSwgW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBleGlzdHNLZXk6ICdmaWxlUGF0aCcsXG4gICAgICAgICAgICAgIHdpbGw6IHsga2V5OiAndXJpJywgdmFsdWU6IHJlcy52YWx1ZSB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICBdKTtcbiAgICAgICAgfSksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHsgLi4uaW5wdXQsIGZpbGVzIH0gYXMgUHJvcGVydGllcztcbiAgICB9O1xuICB9XG59XG4iLCAiLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLXVudXNlZC12YXJzICovXG5pbXBvcnQgeyBPcHRpb24sIFVzZXMgfSBmcm9tICd+L3R5cGVzL3JlZ3VsYXItbmZ0JztcblxuZXhwb3J0IG5hbWVzcGFjZSBDb252ZXJ0ZXIge1xuICBleHBvcnQgbmFtZXNwYWNlIFVzZXMge1xuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlclNpZGUgPSAob3V0cHV0OiBPcHRpb248VXNlcz4pOiBVc2VzIHwgdW5kZWZpbmVkID0+IHtcbiAgICAgIGlmICghb3V0cHV0KSB7XG4gICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgICB9XG4gICAgICByZXR1cm4gb3V0cHV0O1xuICAgIH07XG4gIH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gICAgICAgICAgY2FzZSAncm95YWx0eSc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnJveWFsdHkpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNSb3lhbHR5KG1ldGFkYXRhLnJveWFsdHkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEuc3ltYm9sKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU3ltYm9sKG1ldGFkYXRhLnN5bWJvbCk7XG4gICAgICAgICAgICB9XG4gICAgIC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AgY2FzZSBGaWx0ZXJUeXBlLk1lbW86IHtcbiAgICAgICAgICAgICAgaWYgKEZpbHRlck9wdGlvbnMuTWVtby5wcm9ncmFtLmluY2x1ZGVzKGluc3RydWN0aW9uLnByb2dyYW0pKSB7XG4gICAgICAgICAgICAgICAgbGV0IGluc3RydWN0aW9uVHJhbnNmZXI7XG5cbiAgICAgICAgICAgICAgICAvLyBmZXRjaCAgdHJhbnNmZXIgdHJhbnNhY3Rpb24gZm9yIHJlbGF0aW9uYWwgbWVtb1xuICAgICAgICAgICAgICAgIHR4TWV0YS50cmFuc2FjdGlvbi5tZXNzYWdlLmluc3RydWN0aW9ucy5mb3JFYWNoKFxuICAgICAgICAgICAgICAgICAgKGluc3RydWN0aW9uKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICBpc1BhcnNlZEluc3RydWN0aW9uKGluc3RydWN0aW9uKSAmJlxuICAgICAgICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuVHJhbnNmZXIucHJvZ3JhbS5pbmNsdWRlcyhcbiAgICAgICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLnByb2dyYW0sXG4gICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyID0gaW5zdHJ1Y3Rpb247XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgKTtcblxuICAgICAgICAgICAgICAgIC8vIHNwbC10b2tlbiBvciBzeXN0ZW1cbiAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyICYmXG4gICAgICAgICAgICAgICAgICBtb2R1bGVOYW1lICE9PSBpbnN0cnVjdGlvblRyYW5zZmVyWydwcm9ncmFtJ11cbiAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgIGRlYnVnTG9nKFxuICAgICAgICAgICAgICAgICAgICAnIyBGaWx0ZXJUeXBlLk1lbW8gYnJlYWsgaW5zdHJ1Y3Rpb246ICcsXG4gICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIsXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgLy8gZmV0Y2ggbWVtbyBvbmx5IHRyYW5zYWN0aW9uXG4gICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5NZW1vLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlcixcbiAgICAgICAgICAgICAgICAgIHBvc3RUb2tlbkFjY291bnQsXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5Pbmx5TWVtbzoge1xuICAgICAgICAgICAgICBpZiAoRmlsdGVyT3B0aW9ucy5NZW1vLnByb2dyYW0uaW5jbHVkZXMoaW5zdHJ1Y3Rpb24ucHJvZ3JhbSkpIHtcbiAgICAgICAgICAgICAgICBsZXQgaW5zdHJ1Y3Rpb25UcmFuc2ZlcjtcblxuICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuTWVtby5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIsXG4gICAgICAgICAgICAgICAgICBwb3N0VG9rZW5BY2NvdW50LFxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXNlIEZpbHRlclR5cGUuTWludDoge1xuICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5NaW50LnByb2dyYW0uaW5jbHVkZXMoaW5zdHJ1Y3Rpb24ucHJvZ3JhbSkgJiZcbiAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLk1pbnQuYWN0aW9uLmluY2x1ZGVzKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24ucGFyc2VkLnR5cGUgYXMgc3RyaW5nLFxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5NaW50LmludG9Vc2VyU2lkZShpbnN0cnVjdGlvbiwgdHhNZXRhKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5UcmFuc2ZlcjpcbiAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgIG1vZHVsZU5hbWUgPT09IGluc3RydWN0aW9uLnByb2dyYW0gJiZcbiAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLlRyYW5zZmVyLmFjdGlvbi5pbmNsdWRlcyhcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLnBhcnNlZC50eXBlIGFzIHN0cmluZyxcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgIGlmIChpbnN0cnVjdGlvbi5wYXJzZWQudHlwZSA9PT0gJ3RyYW5zZmVyQ2hlY2tlZCcpIHtcbiAgICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuVHJhbnNmZXJDaGVja2VkLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgICAgcG9zdFRva2VuQWNjb3VudCxcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuVHJhbnNmZXIuaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgICAgcmV0dXJuIGhpc3Rvcnk7XG4gICAgfTtcbn1cbiIsICJpbXBvcnQgeyBQYXJzZWRBY2NvdW50RGF0YSB9IGZyb20gJ0Bzb2xhbmEvd2ViMy5qcyc7XG5pbXBvcnQgeyBSZXN1bHQsIFRyeSB9IGZyb20gJ34vc3VpdGUtdXRpbHMnO1xuaW1wb3J0IHsgTm9kZSB9IGZyb20gJ34vbm9kZSc7XG5pbXBvcnQgeyBPd25lckluZm8sIFB1YmtleSB9IGZyb20gJ34vdHlwZXMvYWNjb3VudCc7XG5pbXBvcnQgeyBUcmFuc2FjdGlvbkZpbHRlciB9IGZyb20gJ34vdHJhbnNhY3Rpb24tZmlsdGVyJztcblxuZXhwb3J0IG5hbWVzcGFjZSBTb2xOYXRpdmUge1xuICAvKipcbiAgICogRmluZCBuZnQgYnkgb3duZXIgYWRkcmVzc1xuICAgKlxuICAgKiBAcGFyYW0ge1B1YmtleX0gb3duZXJcbiAgICogQHJldHVybiBQcm9taXNlPFJlc3VsdDxPd25lckluZm8sIEVycm9yPj5cbiAgICovXG4gIGV4cG9ydCB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W50KFxuICAgICAgICBjb25uZWN0aW9uLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgMCxcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IHNvdXJjZVRva2VuID0gYXdhaXQgQWNjb3VudC5Bc3NvY2lhdGVkLnJldHJ5R2V0T3JDcmVhdGUoXG4gICAgICAgIHRva2VuLnRvU3RyaW5nKCksXG4gICAgICAgIG93bmVyLFxuICAgICAgICBwYXllcixcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIHNvdXJjZVRva2VuOiAnLCBzb3VyY2VUb2tlbik7XG5cbiAgICAgIGNvbnN0IGRlc3RUb2tlbiA9IGF3YWl0IEFjY291bnQuQXNzb2NpYXRlZC5yZXRyeUdldE9yQ3JlYXRlKFxuICAgICAgICB0b2tlbi50b1N0cmluZygpLFxuICAgICAgICB3cmFwcGVkLnRvU3RyaW5nKCksXG4gICAgICAgIHBheWVyLFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgZGVzdFRva2VuOiAnLCBkZXN0VG9rZW4pO1xuXG4gICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgY3JlYXRlVHJhbnNmZXJJbnN0cnVjdGlvbihcbiAgICAgICAgICBzb3VyY2VUb2tlbi50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGRlc3RUb2tlbi50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgcGFyc2VJbnQoYCR7YW1vdW50fWAsIFJBRElYKSwgLy8gTm8gbGFtcG9ydHMsIGl0cyBzb2xcbiAgICAgICAgICBrZXlwYWlycyxcbiAgICAgICAgKSxcbiAgICAgICk7XG5cbiAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICBjcmVhdGVDbG9z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aWNLZXkuZmluZFByb2dyYW1BZGRyZXNzU3luYyhcbiAgICAgICAgW2FkZHJlc3MudG9QdWJsaWNLZXkoKS50b0J1ZmZlcigpXSxcbiAgICAgICAgTVBMX0JVQkJMRUdVTV9QUk9HUkFNX0lELnRvUHVibGljS2V5KCksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGdldEJndW1TaWduZXIgPSAoKTogUHVibGljS2V5ID0+IHtcbiAgICAgIGNvbnN0IFtwdWJsaWNLZXldID0gUHVibGljS2V5LmZpbmRQcm9ncmFtQWRkcmVzc1N5bmMoXG4gICAgICAgIFtCdWZmZXIuZnJvbSgnY29sbGVjdGlvbl9jcGknLCAndXRmOCcpXSxcbiAgICAgICAgTVBMX0JVQkJMRUdVTV9QUk9HUkFNX0lELnRvUHVibGljS2V5KCksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGdldEFzc2V0SWQgPSAoYWRkcmVzczogUHVia2V5LCBsZWFmSW5kZXg6IG51bWJlcik6IFB1YmtleSA9PiB7XG4gICAgICBjb25zdCBub2RlID0gbmV3IEJOLkJOKGxlYWZJbmRleCk7XG4gICAgICBjb25zdCBbYXNzZXRJZF0gPSBQdWJsaWNLZXkuZmluZFByb2dyYW1BZGRyZXNzU3luYyhcbiAgICAgICAgW1xuICAgICAgICAgIEJ1ZmZlci5mcm9tKCdhc3NldCcsICd1dGY4JyksXG4gICAgICAgICAgYWRkcmVzcy50b1B1YmxpY0tleSgpLnRvQnVmZmVyKCksXG4gICAgICAgICAgVWludDhBcnJheS5mcm9tKG5vZGUudG9BcnJheSgnbGUnLCA4KSksXG4gICAgICAgIF0sXG4gICAgICAgIE1QTF9CVUJCTEVHVU1fUFJPR1JBTV9JRC50b1B1YmxpY0tleSgpLFxuICAgICAgKTtcbiAgICAgIHJldHVybiBhc3N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yYSA9IChcbiAgICAgIGlucHV0OiBPcHRpb248SW5wdXRDcmVhdG9yc1tdPiB8IHVuZGVmaW5lZCxcbiAgICApOiBPcHRpb248SW50ZXJuYWxDcmVhdG9yc1tdPiA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBudWxsO1xuICAgICAgfVxuICAgICAgcmV0dXJuIGlucHV0Lm1hcCgoZGF0YSkgPT4ge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIGFkZHJlc3M6IGRhdGEuYWRkcmVzcy50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIHNoYXJlOiBkYXRhLnNoYXJlLFxuICAgICAgICAgIHZlcmlmaWVkOiBmYWxzZSxcbiAgICAgICAgfTtcbiAgICAgIH0pO1xuICAgIH07XG5cbiAgICBleHBvcnQgY29uc3QgaW50b0NvbXByZXNzZWROZnRJbmZyYSA9IChcbiAgICAgIGlucHV0OiBPcHRpb248SW5wdXRDcmVhdG9yc1tdPiB8IHVuZGVmaW5lZCxcbiAgICApOiBJbnRlcm5hbENyZWF0b3JzW10gPT4ge1xuICAgICAgaWYgKCFpbnB1dCkge1xuICAgICAgICByZXR1cm4gW107XG4gICAgICB9XG4gICAgICByZXR1cm4gaW5wdXQhLm1hcCgoZGF0YSkgPT4ge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIGFkZHJlc3M6IGRhdGEuYWRkcmVzcy50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIHNoYXJlOiBkYXRhLnNoYXJlLFxuICAgICAgICAgIHZlcmlmaWVkOiBmYWxzZSxcbiAgICAgICAgfTtcbiAgICAgIH0pO1xuICAgIH07XG5cbiAgICBleHBvcnQgY29uc3QgaW50b1VzZXIgPSAoXG4gICAgICBvdXRwdXQ6IE9wdGlvbjxJbnRlcm5hbENyZWF0b3JzW10+LFxuICAgICk6IENyZWF0b3JzW10gfCB1bmRlZmluZWQgPT4ge1xuICAgICAgaWYgKCFvdXRwdXQpIHt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ICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0YWRhdGEubmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzeW1ib2wnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLnN5bWJvbCkge1xuICAgICAgICAgICAgICByZXMgPSBpc1N5bWJvbChtZXRhZGF0YS5zeW1ib2wpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHJlcyAmJiByZXMuaXNFcnIpIHtcbiAgICAgICAgICByZXN1bHRzLnB1c2goLi4ucmVzLmVycm9yLmRldGFpbHMpO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIGlmIChyZXN1bHRzLmxlbmd0aCA+IDApIHtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9XG4gICAgICAgICAgJ0NhdWdodCBpbiB0aGUgdmFsaWRhdGlvbiBlcnJvcnMuIHNlZSBpbmZvcm1hdGlvbiBlLmc6IGVycjxWYWxpZGF0b3JFcnJvcj4uZGV0YWlscyc7XG4gICAgICAgIHRocm93IG5ldyBWYWxpZGF0b3JFcnJvcihtZXNzYWdlLCByZXN1bHRzKTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBNZXNzYWdlLlNVQ0NFU1M7XG4gICAgfSk7XG4gIH07XG5cbiAgdHlwZSBQaWNrTmZ0U3RvcmFnZSA9IFBpY2s8XG4gICAgT2ZmY2hhaW4sXG4gICAgJ25hb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0cnVjdGlvbikgJiZcbiAgICAgICAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLlRyYW5zZmVyLnByb2dyYW0uaW5jbHVkZXMoXG4gICAgICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbi5wcm9ncmFtLFxuICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlciA9IGluc3RydWN0aW9uO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICk7XG5cbiAgICAgICAgICAgICAgICAvLyBzcGwtdG9rZW4gb3Igc3lzdGVtXG4gICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlciAmJlxuICAgICAgICAgICAgICAgICAgbW9kdWxlTmFtZSAhPT0gaW5zdHJ1Y3Rpb25UcmFuc2ZlclsncHJvZ3JhbSddXG4gICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICBkZWJ1Z0xvZyhcbiAgICAgICAgICAgICAgICAgICAgJyMgRmlsdGVyVHlwZS5NZW1vIGJyZWFrIGluc3RydWN0aW9uOiAnLFxuICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyLFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vIGZldGNoIG1lbW8gb25seSB0cmFuc2FjdGlvblxuICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuTWVtby5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIsXG4gICAgICAgICAgICAgICAgICBwb3N0VG9rZW5BY2NvdW50LFxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXNlIEZpbHRlclR5cGUuT25seU1lbW86IHtcbiAgICAgICAgICAgICAgaWYgKEZpbHRlck9wdGlvbnMuTWVtby5wcm9ncmFtLmluY2x1ZGVzKGluc3RydWN0aW9uLnByb2dyYW0pKSB7XG4gICAgICAgICAgICAgICAgbGV0IGluc3RydWN0aW9uVHJhbnNmZXI7XG5cbiAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLk1lbW8uaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyLFxuICAgICAgICAgICAgICAgICAgcG9zdFRva2VuQWNjb3VudCxcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLk1pbnQ6IHtcbiAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuTWludC5wcm9ncmFtLmluY2x1ZGVzKGluc3RydWN0aW9uLnByb2dyYW0pICYmXG4gICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5NaW50LmFjdGlvbi5pbmNsdWRlcyhcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLnBhcnNlZC50eXBlIGFzIHN0cmluZyxcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuTWludC5pbnRvVXNlclNpZGUoaW5zdHJ1Y3Rpb24sIHR4TWV0YSk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXNlIEZpbHRlclR5cGUuVHJhbnNmZXI6XG4gICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICBtb2R1bGVOYW1lID09PSBpbnN0cnVjdGlvbi5wcm9ncmFtICYmXG4gICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5UcmFuc2Zlci5hY3Rpb24uaW5jbHVkZXMoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbi5wYXJzZWQudHlwZSBhcyBzdHJpbmcsXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICBpZiAoaW5zdHJ1Y3Rpb24ucGFyc2VkLnR5cGUgPT09ICd0cmFuc2ZlckNoZWNrZWQnKSB7XG4gICAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLlRyYW5zZmVyQ2hlY2tlZC5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICAgIHBvc3RUb2tlbkFjY291bnQsXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLlRyYW5zZmVyLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIHJldHVybiBoaXN0b3J5O1xuICAgIH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ZXIgPSBvcHRpb25zLmZlZVBheWVyID8gb3B0aW9ucy5mZWVQYXllciA6IG11bHRpc2lnWzBdO1xuICAgICAgY29uc3Qga2V5cGFpcnMgPSBtdWx0aXNpZy5tYXAoKHMpID0+IHMudG9LZXlwYWlyKCkpO1xuICAgICAgY29uc3Qgd3JhcHBlZCA9IGF3YWl0IGNyZWF0ZVdyYXBwZWROYXRpdmVBY2NvdW50KFxuICAgICAgICBjb25uZWN0aW9uLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgcGFyc2VJbnQoYCR7YW1vdW50LnRvTGFtcG9ydHMoKX1gLCBSQURJWCksXG4gICAgICApO1xuXG4gICAgICBkZWJ1Z0xvZygnIyB3cmFwcGVkIHNvbDogJywgd3JhcHBlZC50b0Jhc2U1OCgpKTtcblxuICAgICAgY29uc3QgaW5zdHJ1Y3Rpb25zID0gW107XG5cbiAgICAgIGNvbnN0IHRva2VuID0gYXdhaXQgY3JlYXRlTWludChcbiAgICAgICAgY29ubmVjdGlvbixcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIDAsXG4gICAgICApO1xuXG4gICAgICBjb25zdCBzb3VyY2VUb2tlbiA9IGF3YWl0IEFjY291bnQuQXNzb2NpYXRlZC5yZXRyeUdldE9yQ3JlYXRlKFxuICAgICAgICB0b2tlbi50b1N0cmluZygpLFxuICAgICAgICBvd25lcixcbiAgICAgICAgcGF5ZXIsXG4gICAgICApO1xuXG4gICAgICBkZWJ1Z0xvZygnIyBzb3VyY2VUb2tlbjogJywgc291cmNlVG9rZW4pO1xuXG4gICAgICBjb25zdCBkZXN0VG9rZW4gPSBhd2FpdCBBY2NvdW50LkFzc29jaWF0ZWQucmV0cnlHZXRPckNyZWF0ZShcbiAgICAgICA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wgIlRva2VuTWV0YWRhdGEiLCAiQ29udmVydGVyIiwgIlRyYW5zZmVyQ2hlY2tlZCIsICJDb252ZXJ0ZXIiLCAiVHJhbnNmZXIiLCAiQ29udmVydGVyIiwgIlZhbGlkYXRvciIsICJNZXNzYWdlIiwgIkNvbnZlcnRlciIsICJTaWduYXR1cmVzIiwgIlRyYW5zYWN0aW9uRmlsdGVyIiwgImluc3RydWN0aW9uIiwgIkNvbnZlcnRlciIsICJTb2xOYXRpdmUiLCAiaW1wb3J0X3dlYjMiLCAiU29sTmF0aXZlIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJpbXBvcnRfd2ViMyIsICJTb2xOYXRpdmUiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlNvbE5hdGl2ZSIsICJBY2NvdW50IiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJTb2xOYXRpdmUiXQp9Cg== \ No newline at end of file diff --git a/packages/suite-sol-native/dist/index.mjs b/packages/suite-sol-native/dist/index.mjs index fd0d919b1..318ee6089 100644 --- a/packages/suite-sol-native/dist/index.mjs +++ b/packages/suite-sol-native/dist/index.mjs @@ -454,22 +454,11 @@ var TransactionBuilder5; // ../global/src/index.ts import { Keypair as Keypair3, LAMPORTS_PER_SOL, PublicKey as PublicKey4 } from "@solana/web3.js"; -// ../account/src/associated.ts -import { - ASSOCIATED_TOKEN_PROGRAM_ID, - createAssociatedTokenAccountInstruction, - getAccount, - getAssociatedTokenAddressSync, - TOKEN_PROGRAM_ID, - TokenAccountNotFoundError, - TokenInvalidAccountOwnerError -} from "@solana/spl-token"; - // ../account/src/keypair.ts import { Keypair as Original, PublicKey as PublicKey2 } from "@solana/web3.js"; import bs from "bs58"; var Account; -((Account5) => { +((Account4) => { class Keypair4 { secret; pubkey; @@ -505,111 +494,16 @@ var Account; }); }; } - Account5.Keypair = Keypair4; + Account4.Keypair = Keypair4; })(Account || (Account = {})); -// ../account/src/associated.ts -var Account2; -((Account5) => { - let Associated; - ((Associated2) => { - const RETRY_OVER_LIMIT = 10; - const RETRY_SLEEP_TIME = 3; - const get = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const res = await (0, Associated2.makeOrCreateInstruction)( - mint, - owner, - new Account.Keypair({ secret: feePayer }).pubkey, - allowOwnerOffCurve - ); - if (!res.inst) { - return res.tokenAccount; - } - return new TransactionBuilder6.Common( - [res.inst], - [], - feePayer.toKeypair(), - res.tokenAccount - ); - }; - Associated2.retryGetOrCreate = async (mint, owner, feePayer) => { - let counter = 1; - while (counter < RETRY_OVER_LIMIT) { - try { - const inst = await get(mint, owner, feePayer, true); - if (inst && typeof inst === "string") { - debugLog("# associatedTokenAccount: ", inst); - return inst; - } else if (inst instanceof TransactionBuilder6.Common) { - (await inst.submit()).map( - async (ok) => { - await Node.confirmedSig(ok); - return inst.data; - }, - (err) => { - debugLog("# Error submit retryGetOrCreate: ", err); - throw err; - } - ); - } - } catch (e) { - debugLog(`# retry: ${counter} create token account: `, e); - debugLog(`# mint: ${mint}, owner: ${owner}, feePayer: ${feePayer}`); - } - await sleep(RETRY_SLEEP_TIME); - counter++; - } - throw Error(`retry action is over limit ${RETRY_OVER_LIMIT}`); - }; - Associated2.makeOrCreateInstruction = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const associatedTokenAccount = getAssociatedTokenAddressSync( - mint.toPublicKey(), - owner.toPublicKey(), - allowOwnerOffCurve, - TOKEN_PROGRAM_ID, - ASSOCIATED_TOKEN_PROGRAM_ID - ); - debugLog("# associatedTokenAccount: ", associatedTokenAccount.toString()); - try { - await getAccount( - Node.getConnection(), - associatedTokenAccount, - Node.getConnection().commitment, - TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst: void 0 - }; - } catch (error) { - if (!(error instanceof TokenAccountNotFoundError) && !(error instanceof TokenInvalidAccountOwnerError)) { - throw Error("Unexpected error"); - } - const payer = !feePayer ? owner : feePayer; - const inst = createAssociatedTokenAccountInstruction( - payer.toPublicKey(), - associatedTokenAccount, - owner.toPublicKey(), - mint.toPublicKey(), - TOKEN_PROGRAM_ID, - ASSOCIATED_TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst - }; - } - }; - })(Associated = Account5.Associated || (Account5.Associated = {})); -})(Account2 || (Account2 = {})); - // ../account/src/pda.ts import { PublicKey as PublicKey3 } from "@solana/web3.js"; import { PROGRAM_ID } from "@metaplex-foundation/mpl-token-metadata"; import { MPL_BUBBLEGUM_PROGRAM_ID } from "@metaplex-foundation/mpl-bubblegum"; import BN from "bn.js"; -var Account3; -((Account5) => { +var Account2; +((Account4) => { let Pda; ((Pda2) => { Pda2.getMetadata = (address) => { @@ -661,14 +555,13 @@ var Account3; ); return assetId.toString(); }; - })(Pda = Account5.Pda || (Account5.Pda = {})); -})(Account3 || (Account3 = {})); + })(Pda = Account4.Pda || (Account4.Pda = {})); +})(Account2 || (Account2 = {})); // ../account/src/index.ts -var Account4 = { - ...Account2, +var Account3 = { ...Account, - ...Account3 + ...Account2 }; // ../global/src/index.ts @@ -699,7 +592,7 @@ String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, op } return url; } - if (Account4.Keypair.isPubkey(addressOrSignature)) { + if (Account3.Keypair.isPubkey(addressOrSignature)) { if (explorer === "solanafm" /* SolanaFM */) { url = `${Constants.EXPLORER_SOLANAFM_URL}/address/${addressOrSignature}?cluster=${cluster}`; } else if (explorer === "xray" /* Xray */) { @@ -719,13 +612,13 @@ String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, op return url; }; String.prototype.toPublicKey = function() { - if (!Account4.Keypair.isPubkey(this.toString())) { + if (!Account3.Keypair.isPubkey(this.toString())) { throw Error(`No match KeyPair.PubKey: ${this.toString()}`); } return new PublicKey4(this.toString()); }; String.prototype.toKeypair = function() { - if (!Account4.Keypair.isSecret(this.toString())) { + if (!Account3.Keypair.isSecret(this.toString())) { throw Error(`No match KeyPair.Secret: ${this.toString()}`); } const decoded = bs2.decode(this.toString()); @@ -1782,13 +1675,13 @@ var SolNative4; owner.toPublicKey(), 0 ); - const sourceToken = await Account4.Associated.retryGetOrCreate( + const sourceToken = await Account3.Associated.retryGetOrCreate( token.toString(), owner, payer ); debugLog("# sourceToken: ", sourceToken); - const destToken = await Account4.Associated.retryGetOrCreate( + const destToken = await Account3.Associated.retryGetOrCreate( token.toString(), wrapped.toString(), payer @@ -1831,4 +1724,4 @@ var SolNative5 = { export { SolNative5 as SolNative }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9iYXRjaC50cyIsICIuLi8uLi9ub2RlL3NyYy9pbmRleC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jb21tb24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvbWludC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9wYXJ0aWFsLXNpZ24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY2FsY3VsYXRlLXR4c2l6ZS50cyIsICIuLi8uLi9nbG9iYWwvc3JjL2luZGV4LnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2Fzc29jaWF0ZWQudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMva2V5cGFpci50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9wZGEudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvaW5kZXgudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvaW5kZXgudHMiLCAiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL3NoYXJlZC50cyIsICIuLi8uLi9zdWl0ZS11dGlscy9zcmMvcmVzdWx0LnRzIiwgIi4uLy4uL2NvbnZlcnRlci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QYXllclBrKTtcbiAgICBjb25zdCBhY2NvdW50cyA9IG5ldyBTZXQ8c3RyaW5nPihmZWVQYXllclBrKTtcblxuICAgIGNvbnN0IGl4c1NpemUgPSB0cmFuc2FjdGlvbi5pbnN0cnVjdGlvbnMucmVkdWNlKChhY2MsIGl4KSA9PiB7XG4gICAgICBpeC5rZXlzLmZvckVhY2goKHsgcHVia2V5LCBpc1NpZ25lciB9KSA9PiB7XG4gICAgICAgIGNvbnN0IHBrID0gcHVia2V5LnRvQmFzZTU4KCk7XG4gICAgICAgIGlmIChpc1NpZ25lcikgc2lnbmVycy5hZGQocGspO1xuICAgICAgICBhY2NvdW50cy5hZGQocGspO1xuICAgICAgfSk7XG5cbiAgICAgIGFjY291bnRzLmFkZChpeC5wcm9ncmFtSWQudG9CYXNlNTgoKSk7XG5cbiAgICAgIGNvbnN0IG5JbmRleGVzID0gaXgua2V5cy5sZW5ndGg7XG4gICAgICBjb25zdCBvcGFxdWVEYXRhID0gaXguZGF0YS5sZW5ndGg7XG5cbiAgICAgIHJldHVybiAoXG4gICAgICAgIGFjYyArXG4gICAgICAgIDEgKyAvLyBQSUQgaW5kZXhcbiAgICAgICAgY29tcGFjdEFycmF5U2l6ZShuSW5kZXhlcywgMSkgK1xuICAgICAgICBjb21wYWN0QXJyYXlTaXplKG9wYXF1ZURhdGEsIDEpXG4gICAgICApO1xuICAgIH0sIDApO1xuXG4gICAgcmV0dXJuIChcbiAgICAgIGNvbXBhY3RBcnJheVNpemUoc2lnbmVycy5zaXplLCA2NCkgKyAvLyBzaWduYXR1cmVzXG4gICAgICAzICsgLy8gaGVhZGVyXG4gICAgICBjb21wYWN0QXJyYXlTaXplKGFjY291bnRzLnNpemUsIDMyKSArIC8vIGFjY291bnRzXG4gICAgICAzMiArIC8vIGJsb2NraGFzaFxuICAgICAgY29tcGFjdEhlYWRlcih0cmFuc2FjdGlvbi5pbnN0cnVjdGlvbnMubGVuZ3RoKSArIC8vIGluc3RydWN0aW9uc1xuICAgICA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XR1cm4gcmVzLnRva2VuQWNjb3VudDtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uPFB1YmtleT4oXG4gICAgICAgIFtyZXMuaW5zdF0sXG4gICAgICAgIFtdLFxuICAgICAgICBmZWVQYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgcmVzLnRva2VuQWNjb3VudCEsXG4gICAgICApO1xuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiBSZXRyeSBmdW5jdGlvbiBpZiBjcmVhdGUgbmV3IHRva2VuIGFjY291aW50XG4gICAgICpcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gbWludFxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBvd25lclxuICAgICAqIEBwYXJhbSB7U2VjcmV0fSBmZWVQYXllclxuICAgICAqIEByZXR1cm5zIFByb21pc2U8c3RyaW5nPlxuICAgICAqL1xuICAgIGV4cG9ydCBjb25zdCByZXRyeUdldE9yQ3JlYXRlID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyOiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxzdHJpbmc+ID0+IHtcbiAgICAgIGxldCBjb3VudGVyID0gMTtcbiAgICAgIHdoaWxlIChjb3VudGVyIDwgUkVUUllfT1ZFUl9MSU1JVCkge1xuICAgICAgICB0cnkge1xuICAgICAgICAgIGNvbnN0IGluc3QgPSBhd2FpdCBnZXQobWludCwgb3duZXIsIGZlZVBheWVyLCB0cnVlKTtcblxuICAgICAgICAgIGlmIChpbnN0ICYmIHR5cGVvZiBpbnN0ID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgaW5zdCk7XG4gICAgICAgICAgICByZXR1cm4gaW5zdDtcbiAgICAgICAgICB9IGVsc2UgaWYgKGluc3QgaW5zdGFuY2VvZiBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uKSB7XG4gICAgICAgICAgICAoYXdhaXQgaW5zdC5zdWJtaXQoKSkubWFwKFxuICAgICAgICAgICAgICBhc3luYyAob2s6IHN0cmluZykgPT4ge1xuICAgICAgICAgICAgICAgIGF3YWl0IE5vZGUuY29uZmlybWVkU2lnKG9rKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gaW5zdC5kYXRhO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAoZXJyOiBFcnJvcikgPT4ge1xuICAgICAgICAgICAgICAgIGRlYnVnTG9nKCcjIEVycm9yIHN1Ym1pdCByZXRyeUdldE9yQ3JlYXRlOiAnLCBlcnIpO1xuICAgICAgICAgICAgICAgIHRocm93IGVycjtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgZGVidWdMb2coYCMgcmV0cnk6ICR7Y291bnRlcn0gY3JlYXRlIHRva2VuIGFjY291bnQ6IGAsIGUpO1xuICAgICAgICAgIGRlYnVnTG9nKGAjIG1pbnQ6ICR7bWludH0sIG93bmVyOiAke293bmVyfSwgZmVlUGF5ZXI6ICR7ZmVlUGF5ZXJ9YCk7XG4gICAgICAgIH1cbiAgICAgICAgYXdhaXQgc2xlZXAoUkVUUllfU0xFRVBfVElNRSk7XG4gICAgICAgIGNvdW50ZXIrKztcbiAgICAgIH1cbiAgICAgIHRocm93IEVycm9yKGByZXRyeSBhY3Rpb24gaXMgb3ZlciBsaW1pdCAke1JFVFJZX09WRVJfTElNSVR9YCk7XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIFtNYWluIGxvZ2ljXUdldCBBc3NvY2lhdGVkIHRva2VuIEFjY291bnQuXG4gICAgICogaWYgbm90IGNyZWF0ZWQsIGNyZWF0ZSBuZXcgdG9rZW4gYWNjb3VpbnRcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBtaW50XG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAgICogQHBhcmFtIHtQdWJrZXl9IGZlZVBheWVyXG4gICAgICogQHJldHVybnMgUHJvbWlzZTxzdHJpbmc+XG4gICAgICovXG4gICAgZXhwb3J0IGNvbnN0IG1ha2VPckNyZWF0ZUluc3RydWN0aW9uID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyPzogUHVia2V5LFxuICAgICAgYWxsb3dPd25lck9mZkN1cnZlID0gZmFsc2UsXG4gICAgKTogUHJvbWlzZTx7XG4gICAgICB0b2tlbkFjY291bnQ6IHN0cmluZztcbiAgICAgIGluc3Q6IFRyYW5zYWN0aW9uSW5zdHJ1Y3Rpb24gfCB1bmRlZmluZWQ7XG4gICAgfT4gPT4ge1xuICAgICAgY29uc3QgYXNzb2NpYXRlZFRva2VuQWNjb3VudCA9IGdldEFzc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jKFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSxcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3QsXG4gICAgIC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sbGVyX2ZlZV9iYXNpc19wb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEuc3ltYm9sKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU3ltYm9sKG1ldGFkYXRhLnN5bWJvbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAocmVzICYmIHJlcy5pc0Vycikge1xuICAgICAgICAgIHJlc3VsdHMucHVzaCguLi5yZXMuZXJyb3IuZGV0YWlscyk7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgICAgaWYgKHJlc3VsdHMubGVuZ3RoID4gMCkge1xuICAgICAgICBjb25zdCBtZXNzYWdlID1cbiAg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NmZXIgdHJhbnNhY3Rpb24gZm9yIHJlbGF0aW9uYWwgbWVtb1xuICAgICAgICAgICAgICAgIHR4TWV0YS50cmFuc2FjdGlvbi5tZXNzYWdlLmluc3RydWN0aW9ucy5mb3JFYWNoKFxuICAgICAgICAgICAgICAgICAgKGluc3RydWN0aW9uKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICBpc1BhcnNlZEluc3RydWN0aW9uKGluc3RydWN0aW9uKSAmJlxuICAgICAgICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuVHJhbnNmZXIucHJvZ3JhbS5pbmNsdWRlcyhcbiAgICAgICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLnByb2dyYW0sXG4gICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyID0gaW5zdHJ1Y3Rpb247XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgKTtcblxuICAgICAgICAgICAgICAgIC8vIHNwbC10b2tlbiBvciBzeXN0ZW1cbiAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyICYmXG4gICAgICAgICAgICAgICAgICBtb2R1bGVOYW1lICE9PSBpbnN0cnVjdGlvblRyYW5zZmVyWydwcm9ncmFtJ11cbiAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgIGRlYnVnTG9nKFxuICAgICAgICAgICAgICAgICAgICAnIyBGaWx0ZXJUeXBlLk1lbW8gYnJlYWsgaW5zdHJ1Y3Rpb246ICcsXG4gICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIsXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgLy8gZmV0Y2ggbWVtbyBvbmx5IHRyYW5zYWN0aW9uXG4gICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5NZW1vLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlcixcbiAgICAgICAgICAgICAgICAgIHBvc3RUb2tlbkFjY291bnQsXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5Pbmx5TWVtbzoge1xuICAgICAgICAgICAgICBpZiAoRmlsdGVyT3B0aW9ucy5NZW1vLnByb2dyYW0uaW5jbHVkZXMoaW5zdHJ1Y3Rpb24ucHJvZ3JhbSkpIHtcbiAgICAgICAgICAgICAgICBsZXQgaW5zdHJ1Y3Rpb25UcmFuc2ZlcjtcblxuICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuTWVtby5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIsXG4gICAgICAgICAgICAgICAgICBwb3N0VG9rZW5BY2NvdW50LFxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXNlIEZpbHRlclR5cGUuTWludDoge1xuICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5NaW50LnByb2dyYW0uaW5jbHVkZXMoaW5zdHJ1Y3Rpb24ucHJvZ3JhbSkgJiZcbiAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLk1pbnQuYWN0aW9uLmluY2x1ZGVzKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24ucGFyc2VkLnR5cGUgYXMgc3RyaW5nLFxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5NaW50LmludG9Vc2VyU2lkZShpbnN0cnVjdGlvbiwgdHhNZXRhKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5UcmFuc2ZlcjpcbiAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgIG1vZHVsZU5hbWUgPT09IGluc3RydWN0aW9uLnByb2dyYW0gJiZcbiAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLlRyYW5zZmVyLmFjdGlvbi5pbmNsdWRlcyhcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLnBhcnNlZC50eXBlIGFzIHN0cmluZyxcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgIGlmIChpbnN0cnVjdGlvbi5wYXJzZWQudHlwZSA9PT0gJ3RyYW5zZmVyQ2hlY2tlZCcpIHtcbiAgICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuVHJhbnNmZXJDaGVja2VkLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgICAgcG9zdFRva2VuQWNjb3VudCxcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAg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U2VjcmV0W10sXG4gICAgYW1vdW50OiBudW1iZXIsXG4gICAgb3B0aW9uczogUGFydGlhbDxUcmFuc2Zlck9wdGlvbnM+ID0ge30sXG4gICk6IFByb21pc2U8UmVzdWx0PENvbW1vblN0cnVjdHVyZSwgRXJyb3I+PiA9PiB7XG4gICAgcmV0dXJuIFRyeShhc3luYyAoKSA9PiB7XG4gICAgICBjb25zdCBjb25uZWN0aW9uID0gTm9kZS5nZXRDb25uZWN0aW9uKCk7XG4gICAgICBjb25zdCBwYXllciA9IG9wdGlvbnMuZmVlUGF5ZXIgPyBvcHRpb25zLmZlZVBheWVyIDogbXVsdGlzaWdbMF07XG4gICAgICBjb25zdCBrZXlwYWlycyA9IG11bHRpc2lnLm1hcCgocykgPT4gcy50b0tleXBhaXIoKSk7XG4gICAgICBjb25zdCB3cmFwcGVkID0gYXdhaXQgY3JlYXRlV3JhcHBlZE5hdGl2ZUFjY291bnQoXG4gICAgICAgIGNvbm5lY3Rpb24sXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICBwYXJzZUludChgJHthbW91bnQudG9MYW1wb3J0cygpfWAsIFJBRElYKSxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIHdyYXBwZWQgc29sOiAnLCB3cmFwcGVkLnRvQmFzZTU4KCkpO1xuXG4gICAgICBjb25zdCBpbnN0cnVjdGlvbnMgPSBbXTtcblxuICAgICAgY29uc3QgdG9rZW4gPSBhd2FpdCBjcmVhdGVNaW50KFxuICAgICAgICBjb25uZWN0aW9uLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgMCxcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IHNvdXJjZVRva2VuID0gYXdhaXQgQWNjb3VudC5Bc3NvY2lhdGVkLnJldHJ5R2V0T3JDcmVhdGUoXG4gICAgICAgIHRva2VuLnRvU3RyaW5nKCksXG4gICAgICAgIG93bmVyLFxuICAgICAgICBwYXllcixcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIHNvdXJjZVRva2VuOiAnLCBzb3VyY2VUb2tlbik7XG5cbiAgICAgIGNvbnN0IGRlc3RUb2tlbiA9IGF3YWl0IEFjY291bnQuQXNzb2NpYXRlZC5yZXRyeUdldE9yQ3JlYXRlKFxuICAgICAgICB0b2tlbi50b1N0cmluZygpLFxuICAgICAgICB3cmFwcGVkLnRvU3RyaW5nKCksXG4gICAgICAgIHBheWVyLFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgZGVzdFRva2VuOiAnLCBkZXN0VG9rZW4pO1xuXG4gICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgY3JlYXRlVHJhbnNmZXJJbnN0cnVjdGlvbihcbiAgICAgICAgICBzb3VyY2VUb2tlbi50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGRlc3RUb2tlbi50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgcGFyc2VJbnQoYCR7YW1vdW50fWAsIFJBRElYKSwgLy8gTm8gbGFtcG9ydHMsIGl0cyBzb2xcbiAgICAgICAgICBrZXlwYWlycyxcbiAgICAgICAgKSxcbiAgICAgICk7XG5cbiAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICBjcmVhdGVDbG9zZUFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgICB3cmFwcGVkLFxuICAgICAgICAgIGRlc3QudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGtleXBhaXJzLFxuICAgICAgICApLFxuICAgICAgKTtcblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIu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IHtcbiAgICAgICAgaWYgKG1hcHBpbmdUb2tlbkFjY291bnQgJiYgb3V0cHV0VHJhbnNmZXIucHJvZ3JhbSA9PT0gJ3NwbC10b2tlbicpIHtcbiAgICAgICAgICBjb25zdCBmb3VuZFNvdXJjZSA9IG1hcHBpbmdUb2tlbkFjY291bnQuZmluZChcbiAgICAgICAgICAgIChtKSA9PiBtLmFjY291bnQgPT09IG91dHB1dFRyYW5zZmVyLnBhcnNlZC5pbmZvLnNvdXJjZSxcbiAgICAgICAgICApO1xuICAgICAgICAgIGNvbnN0IGZvdW5kRGVzdCA9IG1hcHBpbmdUb2tlbkFjY291bnQuZmluZChcbiAgICAgICAgICAgIChtKSA9PiBtLmFjY291bnQgPT09IG91dHB1dFRyYW5zZmVyLnBhcnNlZC5pbmZvLmRlc3RpbmF0aW9uLFxuICAgICAgICAgICk7XG5cbiAgICAgICAgICBoaXN0b3J5Lm1pbnQgPSBvdXRwdXRUcmFuc2Zlci5wYXJzZWQuaW5mby5taW50O1xuICAgICAgICAgIGZvdW5kU291cmNlICYmIChoaXN0b3J5LnNvdXJjZSA9IGZvdW5kU291cmNlLm93bmVyKTtcbiAgICAgICAgICBmb3VuZERlc3QgJiYgKGhpc3RvcnkuZGVzdGluYXRpb24gPSBmb3VuZERlc3Qub3duZXIpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIGhpc3Rvcnkuc291cmNlID0gb3V0cHV0VHJhbnNmZXIucGFyc2VkLmluZm8uc291cmNlO1xuICAgICAgICAgIGhpc3RvcnkuZGVzdGluYXRpb24gPSBvdXRwdXRUcmFuc2Zlci5wYXJzZWQuaW5mby5kZXN0aW5hdGlvbjtcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICBoaXN0b3J5Lm1lbW8gPSBvdXRwdXQucGFyc2VkO1xuICAgICAgaGlzdG9yeS50eXBlID0gb3V0cHV0LnByb2dyYW07XG4gICAgICBoaXN0b3J5LmRhdGVUaW1lID0gY29udmVydFRpbWVzdGF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4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJGZWVCYXNpc1BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0YWRhdGEubmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzeW1ib2wnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLnN5bWJvbCkge1xuICAgICAgICAgICAgICByZXMgPSBpc1N5bWJvbChtZXRhZGF0YS5zeW1ib2wpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHJlcyAmJiByZXMuaXNFcnIpIHtcbiAgICAgICAgICByZXN1bHRzLnB1c2goLi4ucmVzLmVycm9yLmRldGFpbHMpO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIGlmIChyZXN1bHRzLmxlbmd0aCA+IDApIHtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9XG4gICAgICAgICAgJ0NhdWdodCBpbiB0aGUgdmFsaWRhdGlvbiBlcnJvcnMuIHNlZSBpbmZvcm1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ggIHRyYW5zZmVyIHRyYW5zYWN0aW9uIGZvciByZWxhdGlvbmFsIG1lbW9cbiAgICAgICAgICAgICAgICB0eE1ldGEudHJhbnNhY3Rpb24ubWVzc2FnZS5pbnN0cnVjdGlvbnMuZm9yRWFjaChcbiAgICAgICAgICAgICAgICAgIChpbnN0cnVjdGlvbikgPT4ge1xuICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgaXNQYXJzZWRJbnN0cnVjdGlvbihpbnN0cnVjdGlvbikgJiZcbiAgICAgICAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLlRyYW5zZmVyLnByb2dyYW0uaW5jbHVkZXMoXG4gICAgICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbi5wcm9ncmFtLFxuICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlciA9IGluc3RydWN0aW9uO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICk7XG5cbiAgICAgICAgICAgICAgICAvLyBzcGwtdG9rZW4gb3Igc3lzdGVtXG4gICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlciAmJlxuICAgICAgICAgICAgICAgICAgbW9kdWxlTmFtZSAhPT0gaW5zdHJ1Y3Rpb25UcmFuc2ZlclsncHJvZ3JhbSddXG4gICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICBkZWJ1Z0xvZyhcbiAgICAgICAgICAgICAgICAgICAgJyMgRmlsdGVyVHlwZS5NZW1vIGJyZWFrIGluc3RydWN0aW9uOiAnLFxuICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyLFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vIGZldGNoIG1lbW8gb25seSB0cmFuc2FjdGlvblxuICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuTWVtby5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIsXG4gICAgICAgICAgICAgICAgICBwb3N0VG9rZW5BY2NvdW50LFxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXNlIEZpbHRlclR5cGUuT25seU1lbW86IHtcbiAgICAgICAgICAgICAgaWYgKEZpbHRlck9wdGlvbnMuTWVtby5wcm9ncmFtLmluY2x1ZGVzKGluc3RydWN0aW9uLnByb2dyYW0pKSB7XG4gICAgICAgICAgICAgICAgbGV0IGluc3RydWN0aW9uVHJhbnNmZXI7XG5cbiAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLk1lbW8uaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyLFxuICAgICAgICAgICAgICAgICAgcG9zdFRva2VuQWNjb3VudCxcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLk1pbnQ6IHtcbiAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuTWludC5wcm9ncmFtLmluY2x1ZGVzKGluc3RydWN0aW9uLnByb2dyYW0pICYmXG4gICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5NaW50LmFjdGlvbi5pbmNsdWRlcyhcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLnBhcnNlZC50eXBlIGFzIHN0cmluZyxcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuTWludC5pbnRvVXNlclNpZGUoaW5zdHJ1Y3Rpb24sIHR4TWV0YSk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXNlIEZpbHRlclR5cGUuVHJhbnNmZXI6XG4gICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICBtb2R1bGVOYW1lID09PSBpbnN0cnVjdGlvbi5wcm9ncmFtICYmXG4gICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5UcmFuc2Zlci5hY3Rpb24uaW5jbHVkZXMoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbi5wYXJzZWQudHlwZSBhcyBzdHJpbmcsXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICBpZiAoaW5zdHJ1Y3Rpb24ucGFyc2VkLnR5cGUgPT09ICd0cmFuc2ZlckNoZWNrZWQnKSB7XG4gICAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLlRyYW5zZmVyQ2hlY2tlZC5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICAgIHBvc3RUb2tlbkFjY291bnQsXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICB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5yZXRyeUdldE9yQ3JlYXRlKFxuICAgICAgICB0b2tlbi50b1N0cmluZygpLFxuICAgICAgICBvd25lcixcbiAgICAgICAgcGF5ZXIsXG4gICAgICApO1xuXG4gICAgICBkZWJ1Z0xvZygnIyBzb3VyY2VUb2tlbjogJywgc291cmNlVG9rZW4pO1xuXG4gICAgICBjb25zdCBkZXN0VG9rZW4gPSBhd2FpdCBBY2NvdW50LkFzc29jaWF0ZWQucmV0cnlHZXRPckNyZWF0ZShcbiAgICAgICAgdG9rZW4udG9TdHJpbmcoKSxcbiAgICAgICAgd3JhcHBlZC50b1N0cmluZygpLFxuICAgICAgICBwYXllcixcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGRlc3RUb2tlbjogJywgZGVzdFRva2VuKTtcblxuICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgIGNyZWF0ZVRyYW5zZmVySW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgc291cmNlVG9rZW4udG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBkZXN0VG9rZW4udG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIHBhcnNlSW50KGAke2Ftb3VudH1gLCBSQURJWCksIC8vIE5vIGxhbXBvcnRzLCBpdHMgc29sXG4gICAgICAgICAga2V5cGFpcnMsXG4gICAgICAgICksXG4gICAgICApO1xuXG4gICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgY3JlYXRlQ2xvc2VBY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgd3JhcHBlZCxcbiAgICAgICAgICBkZXN0LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBrZXlwYWlycyxcbiAgICAgICAgKSxcbiAgICAgICk7XG5cbiAgICAgIHJldHVybiBuZXcgVHJhbnNhY3Rpb25CdWlsZGVyLkNvbW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XMiLCAiQ29udmVydGVyIiwgIlRva2VuTWV0YWRhdGEiLCAiQ29udmVydGVyIiwgIlRyYW5zZmVyQ2hlY2tlZCIsICJDb252ZXJ0ZXIiLCAiVHJhbnNmZXIiLCAiQ29udmVydGVyIiwgIlZhbGlkYXRvciIsICJNZXNzYWdlIiwgIkNvbnZlcnRlciIsICJTaWduYXR1cmVzIiwgIlRyYW5zYWN0aW9uRmlsdGVyIiwgImluc3RydWN0aW9uIiwgIkNvbnZlcnRlciIsICJTb2xOYXRpdmUiLCAiVHJhbnNhY3Rpb24iLCAiU29sTmF0aXZlIiwgIlRyYW5zYWN0aW9uIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJTeXN0ZW1Qcm9ncmFtIiwgIlNvbE5hdGl2ZSIsICJTeXN0ZW1Qcm9ncmFtIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJTb2xOYXRpdmUiLCAiQWNjb3VudCIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiU29sTmF0aXZlIl0KfQo= \ No newline at end of file diff --git a/packages/suite-spl-token/dist/index.js b/packages/suite-spl-token/dist/index.js index d3bd45aa8..b98aad7a3 100644 --- a/packages/suite-spl-token/dist/index.js +++ b/packages/suite-spl-token/dist/index.js @@ -35,7 +35,7 @@ __export(src_exports, { module.exports = __toCommonJS(src_exports); // src/add.ts -var import_spl_token2 = require("@solana/spl-token"); +var import_spl_token = require("@solana/spl-token"); // ../suite-utils/src/constants.ts var import_web3 = require("@solana/web3.js"); @@ -482,14 +482,11 @@ var TransactionBuilder5; // ../global/src/index.ts var import_web39 = require("@solana/web3.js"); -// ../account/src/associated.ts -var import_spl_token = require("@solana/spl-token"); - // ../account/src/keypair.ts var import_web37 = require("@solana/web3.js"); var import_bs58 = __toESM(require("bs58")); var Account; -((Account5) => { +((Account4) => { class Keypair4 { secret; pubkey; @@ -525,111 +522,16 @@ var Account; }); }; } - Account5.Keypair = Keypair4; + Account4.Keypair = Keypair4; })(Account || (Account = {})); -// ../account/src/associated.ts -var Account2; -((Account5) => { - let Associated; - ((Associated2) => { - const RETRY_OVER_LIMIT = 10; - const RETRY_SLEEP_TIME = 3; - const get = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const res = await (0, Associated2.makeOrCreateInstruction)( - mint, - owner, - new Account.Keypair({ secret: feePayer }).pubkey, - allowOwnerOffCurve - ); - if (!res.inst) { - return res.tokenAccount; - } - return new TransactionBuilder6.Common( - [res.inst], - [], - feePayer.toKeypair(), - res.tokenAccount - ); - }; - Associated2.retryGetOrCreate = async (mint, owner, feePayer) => { - let counter = 1; - while (counter < RETRY_OVER_LIMIT) { - try { - const inst = await get(mint, owner, feePayer, true); - if (inst && typeof inst === "string") { - debugLog("# associatedTokenAccount: ", inst); - return inst; - } else if (inst instanceof TransactionBuilder6.Common) { - (await inst.submit()).map( - async (ok) => { - await Node.confirmedSig(ok); - return inst.data; - }, - (err) => { - debugLog("# Error submit retryGetOrCreate: ", err); - throw err; - } - ); - } - } catch (e) { - debugLog(`# retry: ${counter} create token account: `, e); - debugLog(`# mint: ${mint}, owner: ${owner}, feePayer: ${feePayer}`); - } - await sleep(RETRY_SLEEP_TIME); - counter++; - } - throw Error(`retry action is over limit ${RETRY_OVER_LIMIT}`); - }; - Associated2.makeOrCreateInstruction = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const associatedTokenAccount = (0, import_spl_token.getAssociatedTokenAddressSync)( - mint.toPublicKey(), - owner.toPublicKey(), - allowOwnerOffCurve, - import_spl_token.TOKEN_PROGRAM_ID, - import_spl_token.ASSOCIATED_TOKEN_PROGRAM_ID - ); - debugLog("# associatedTokenAccount: ", associatedTokenAccount.toString()); - try { - await (0, import_spl_token.getAccount)( - Node.getConnection(), - associatedTokenAccount, - Node.getConnection().commitment, - import_spl_token.TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst: void 0 - }; - } catch (error) { - if (!(error instanceof import_spl_token.TokenAccountNotFoundError) && !(error instanceof import_spl_token.TokenInvalidAccountOwnerError)) { - throw Error("Unexpected error"); - } - const payer = !feePayer ? owner : feePayer; - const inst = (0, import_spl_token.createAssociatedTokenAccountInstruction)( - payer.toPublicKey(), - associatedTokenAccount, - owner.toPublicKey(), - mint.toPublicKey(), - import_spl_token.TOKEN_PROGRAM_ID, - import_spl_token.ASSOCIATED_TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst - }; - } - }; - })(Associated = Account5.Associated || (Account5.Associated = {})); -})(Account2 || (Account2 = {})); - // ../account/src/pda.ts var import_web38 = require("@solana/web3.js"); var import_mpl_token_metadata = require("@metaplex-foundation/mpl-token-metadata"); var import_mpl_bubblegum = require("@metaplex-foundation/mpl-bubblegum"); var import_bn = __toESM(require("bn.js")); -var Account3; -((Account5) => { +var Account2; +((Account4) => { let Pda; ((Pda2) => { Pda2.getMetadata = (address) => { @@ -681,14 +583,13 @@ var Account3; ); return assetId.toString(); }; - })(Pda = Account5.Pda || (Account5.Pda = {})); -})(Account3 || (Account3 = {})); + })(Pda = Account4.Pda || (Account4.Pda = {})); +})(Account2 || (Account2 = {})); // ../account/src/index.ts -var Account4 = { - ...Account2, +var Account3 = { ...Account, - ...Account3 + ...Account2 }; // ../global/src/index.ts @@ -719,7 +620,7 @@ String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, op } return url; } - if (Account4.Keypair.isPubkey(addressOrSignature)) { + if (Account3.Keypair.isPubkey(addressOrSignature)) { if (explorer === "solanafm" /* SolanaFM */) { url = `${Constants.EXPLORER_SOLANAFM_URL}/address/${addressOrSignature}?cluster=${cluster}`; } else if (explorer === "xray" /* Xray */) { @@ -739,13 +640,13 @@ String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, op return url; }; String.prototype.toPublicKey = function() { - if (!Account4.Keypair.isPubkey(this.toString())) { + if (!Account3.Keypair.isPubkey(this.toString())) { throw Error(`No match KeyPair.PubKey: ${this.toString()}`); } return new import_web39.PublicKey(this.toString()); }; String.prototype.toKeypair = function() { - if (!Account4.Keypair.isSecret(this.toString())) { + if (!Account3.Keypair.isSecret(this.toString())) { throw Error(`No match KeyPair.Secret: ${this.toString()}`); } const decoded = import_bs582.default.decode(this.toString()); @@ -1550,12 +1451,12 @@ var SplToken2; return Try(async () => { const payer = options.feePayer ? options.feePayer : ownerOrMultisig[0]; const keypairs = ownerOrMultisig.map((s) => s.toKeypair()); - const tokenAssociated = await Account4.Associated.retryGetOrCreate( + const tokenAssociated = await Account3.Associated.retryGetOrCreate( token, owner, payer ); - const inst = (0, import_spl_token2.createMintToCheckedInstruction)( + const inst = (0, import_spl_token.createMintToCheckedInstruction)( token.toPublicKey(), tokenAssociated.toPublicKey(), owner.toPublicKey(), @@ -1574,18 +1475,18 @@ var SplToken2; })(SplToken2 || (SplToken2 = {})); // src/burn.ts -var import_spl_token3 = require("@solana/spl-token"); +var import_spl_token2 = require("@solana/spl-token"); var SplToken3; ((SplToken11) => { SplToken11.burn = (mint, owner, ownerOrMultisig, burnAmount, tokenDecimals, options = {}) => { return Try(() => { - const tokenAccount = (0, import_spl_token3.getAssociatedTokenAddressSync)( + const tokenAccount = (0, import_spl_token2.getAssociatedTokenAddressSync)( mint.toPublicKey(), owner.toPublicKey() ); const payer = options.feePayer ? options.feePayer : ownerOrMultisig[0]; const keypairs = ownerOrMultisig.map((s) => s.toKeypair()); - const inst = (0, import_spl_token3.createBurnCheckedInstruction)( + const inst = (0, import_spl_token2.createBurnCheckedInstruction)( tokenAccount, mint.toPublicKey(), owner.toPublicKey(), @@ -1600,7 +1501,7 @@ var SplToken3; // src/find.ts var import_mpl_token_metadata2 = require("@metaplex-foundation/mpl-token-metadata"); -var import_spl_token4 = require("@solana/spl-token"); +var import_spl_token3 = require("@solana/spl-token"); var import_cross_fetch = __toESM(require("cross-fetch")); var SplToken4; ((SplToken11) => { @@ -1639,7 +1540,7 @@ var SplToken4; const info = await connection.getParsedTokenAccountsByOwner( owner.toPublicKey(), { - programId: import_spl_token4.TOKEN_PROGRAM_ID + programId: import_spl_token3.TOKEN_PROGRAM_ID } ); const datas = info.value.map(async (d) => { @@ -1650,7 +1551,7 @@ var SplToken4; } return import_mpl_token_metadata2.Metadata.fromAccountAddress( connection, - Account4.Pda.getMetadata(mint) + Account3.Pda.getMetadata(mint) ).then(async (metadata) => { return fetchRetry(metadata.data.uri).then((json) => { return converter(metadata, json, tokenAmount); @@ -1668,7 +1569,7 @@ var SplToken4; const connection = Node.getConnection(); const metadata = await import_mpl_token_metadata2.Metadata.fromAccountAddress( connection, - Account4.Pda.getMetadata(mint) + Account3.Pda.getMetadata(mint) ); debugLog("# findByMint metadata: ", metadata); if (metadata.tokenStandard === 0) { @@ -1685,20 +1586,20 @@ var SplToken4; })(SplToken4 || (SplToken4 = {})); // src/freeze.ts -var import_spl_token5 = require("@solana/spl-token"); +var import_spl_token4 = require("@solana/spl-token"); var SplToken5; ((SplToken11) => { SplToken11.freeze = (mint, owner, freezeAuthority, options = {}) => { return Try(() => { const payer = options.feePayer ? options.feePayer : freezeAuthority; - const tokenAccount = (0, import_spl_token5.getAssociatedTokenAddressSync)( + const tokenAccount = (0, import_spl_token4.getAssociatedTokenAddressSync)( mint.toPublicKey(), owner.toPublicKey() ); - const inst = (0, import_spl_token5.createFreezeAccountInstruction)( + const inst = (0, import_spl_token4.createFreezeAccountInstruction)( tokenAccount, mint.toPublicKey(), - new Account4.Keypair({ secret: freezeAuthority }).toPublicKey() + new Account3.Keypair({ secret: freezeAuthority }).toPublicKey() ); return new TransactionBuilder6.Common( [inst], @@ -1710,19 +1611,19 @@ var SplToken5; })(SplToken5 || (SplToken5 = {})); // src/gas-less-transfer.ts -var import_spl_token6 = require("@solana/spl-token"); +var import_spl_token5 = require("@solana/spl-token"); var import_web310 = require("@solana/web3.js"); var SplToken6; ((SplToken11) => { SplToken11.gasLessTransfer = async (mint, owner, dest, amount, mintDecimal, feePayer) => { return Try(async () => { const ownerPublicKey = owner.toKeypair().publicKey; - const sourceToken = await Account4.Associated.makeOrCreateInstruction( + const sourceToken = await Account3.Associated.makeOrCreateInstruction( mint, ownerPublicKey.toString(), feePayer ); - const destToken = await Account4.Associated.makeOrCreateInstruction( + const destToken = await Account3.Associated.makeOrCreateInstruction( mint, dest, feePayer @@ -1734,27 +1635,18 @@ var SplToken6; blockhash: blockhashObj.blockhash, feePayer: feePayer.toPublicKey() }); + inst2 = (0, import_spl_token5.createTransferCheckedInstruction)( + sourceToken.tokenAccount.toPublicKey(), + mint.toPublicKey(), + destToken.tokenAccount.toPublicKey(), + ownerPublicKey, + SplToken.calculateAmount(amount, mintDecimal), + mintDecimal, + [owner.toKeypair()] + ); if (!destToken.inst) { - inst2 = (0, import_spl_token6.createTransferCheckedInstruction)( - sourceToken.tokenAccount.toPublicKey(), - mint.toPublicKey(), - destToken.tokenAccount.toPublicKey(), - ownerPublicKey, - SplToken.calculateAmount(amount, mintDecimal), - mintDecimal, - [owner.toKeypair()] - ); tx.add(inst2); } else { - inst2 = (0, import_spl_token6.createTransferCheckedInstruction)( - sourceToken.tokenAccount.toPublicKey(), - mint.toPublicKey(), - destToken.tokenAccount.toPublicKey(), - ownerPublicKey, - SplToken.calculateAmount(amount, mintDecimal), - mintDecimal, - [owner.toKeypair()] - ); tx.add(destToken.inst).add(inst2); } tx.recentBlockhash = blockhashObj.blockhash; @@ -1770,7 +1662,7 @@ var SplToken6; // src/mint.ts var import_web311 = require("@solana/web3.js"); -var import_spl_token7 = require("@solana/spl-token"); +var import_spl_token6 = require("@solana/spl-token"); var import_mpl_token_metadata3 = require("@metaplex-foundation/mpl-token-metadata"); // ../storage/src/provenance-layer.ts @@ -1998,39 +1890,39 @@ var SplToken7; ((SplToken11) => { const DEFAULT_STORAGE_TYPE = "nftStorage"; SplToken11.createFreezeAuthority = (mint2, owner, freezeAuthority) => { - return (0, import_spl_token7.createSetAuthorityInstruction)( + return (0, import_spl_token6.createSetAuthorityInstruction)( mint2, owner, - import_spl_token7.AuthorityType.FreezeAccount, + import_spl_token6.AuthorityType.FreezeAccount, freezeAuthority ); }; SplToken11.createMint = async (mint2, owner, totalAmount, mintDecimal, tokenMetadata, feePayer, isMutable) => { const connection = Node.getConnection(); - const lamports = await (0, import_spl_token7.getMinimumBalanceForRentExemptMint)(connection); - const metadataPda = Account4.Pda.getMetadata(mint2.toString()); - const tokenAssociated = (0, import_spl_token7.getAssociatedTokenAddressSync)(mint2, owner); + const lamports = await (0, import_spl_token6.getMinimumBalanceForRentExemptMint)(connection); + const metadataPda = Account3.Pda.getMetadata(mint2.toString()); + const tokenAssociated = (0, import_spl_token6.getAssociatedTokenAddressSync)(mint2, owner); const instructions = []; instructions.push( import_web311.SystemProgram.createAccount({ fromPubkey: feePayer, newAccountPubkey: mint2, - space: import_spl_token7.MINT_SIZE, + space: import_spl_token6.MINT_SIZE, lamports, - programId: import_spl_token7.TOKEN_PROGRAM_ID + programId: import_spl_token6.TOKEN_PROGRAM_ID }) ); instructions.push( - (0, import_spl_token7.createInitializeMintInstruction)( + (0, import_spl_token6.createInitializeMintInstruction)( mint2, mintDecimal, owner, owner, - import_spl_token7.TOKEN_PROGRAM_ID + import_spl_token6.TOKEN_PROGRAM_ID ) ); instructions.push( - (0, import_spl_token7.createAssociatedTokenAccountInstruction)( + (0, import_spl_token6.createAssociatedTokenAccountInstruction)( feePayer, tokenAssociated, owner, @@ -2038,7 +1930,7 @@ var SplToken7; ) ); instructions.push( - (0, import_spl_token7.createMintToCheckedInstruction)( + (0, import_spl_token6.createMintToCheckedInstruction)( mint2, tokenAssociated, owner, @@ -2117,7 +2009,7 @@ var SplToken7; ); debugLog("# datav2: ", datav2); debugLog("# upload content url: ", uri); - const mint2 = Account4.Keypair.create(); + const mint2 = Account3.Keypair.create(); const insts = await (0, SplToken11.createMint)( mint2.toPublicKey(), ownerPublicKey, @@ -2147,20 +2039,20 @@ var SplToken7; })(SplToken7 || (SplToken7 = {})); // src/thaw.ts -var import_spl_token8 = require("@solana/spl-token"); +var import_spl_token7 = require("@solana/spl-token"); var SplToken8; ((SplToken11) => { SplToken11.thaw = (mint, owner, freezeAuthority, options = {}) => { const payer = options.feePayer ? options.feePayer : freezeAuthority; return Try(() => { - const tokenAccount = (0, import_spl_token8.getAssociatedTokenAddressSync)( + const tokenAccount = (0, import_spl_token7.getAssociatedTokenAddressSync)( mint.toPublicKey(), owner.toPublicKey() ); - const inst = (0, import_spl_token8.createThawAccountInstruction)( + const inst = (0, import_spl_token7.createThawAccountInstruction)( tokenAccount, mint.toPublicKey(), - new Account4.Keypair({ secret: freezeAuthority }).toPublicKey() + new Account3.Keypair({ secret: freezeAuthority }).toPublicKey() ); return new TransactionBuilder6.Common( [inst], @@ -2172,33 +2064,39 @@ var SplToken8; })(SplToken8 || (SplToken8 = {})); // src/transfer.ts -var import_spl_token9 = require("@solana/spl-token"); +var import_spl_token8 = require("@solana/spl-token"); var SplToken9; ((SplToken11) => { SplToken11.transfer = async (mint, owner, dest, ownerOrMultisig, amount, mintDecimal, options = {}) => { return Try(async () => { const payer = options.feePayer ? options.feePayer : ownerOrMultisig[0]; + const payerPubkey = new Account3.Keypair({ secret: payer }); const keypairs = ownerOrMultisig.map((s) => s.toKeypair()); - const sourceToken = await Account4.Associated.retryGetOrCreate( + const sourceToken = await Account3.Associated.makeOrCreateInstruction( mint, - owner, - payer + owner.toString(), + payerPubkey.pubkey ); - const destToken = await Account4.Associated.retryGetOrCreate( + const destToken = await Account3.Associated.makeOrCreateInstruction( mint, dest, - payer + payerPubkey.pubkey ); - const inst = (0, import_spl_token9.createTransferCheckedInstruction)( - sourceToken.toPublicKey(), + const inst = (0, import_spl_token8.createTransferCheckedInstruction)( + sourceToken.tokenAccount.toPublicKey(), mint.toPublicKey(), - destToken.toPublicKey(), + destToken.tokenAccount.toPublicKey(), owner.toPublicKey(), SplToken.calculateAmount(amount, mintDecimal), mintDecimal, keypairs ); - return new TransactionBuilder6.Common([inst], keypairs, payer.toKeypair()); + const instructions = destToken.inst ? [destToken.inst, inst] : [inst]; + return new TransactionBuilder6.Common( + instructions, + keypairs, + payer.toKeypair() + ); }); }; })(SplToken9 || (SplToken9 = {})); @@ -2218,4 +2116,4 @@ var SplToken10 = { 0 && (module.exports = { SplToken }); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uL3NyYy9hZGQudHMiLCAiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9iYXRjaC50cyIsICIuLi8uLi9ub2RlL3NyYy9pbmRleC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jb21tb24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvbWludC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9wYXJ0aWFsLXNpZ24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY2FsY3VsYXRlLXR4c2l6ZS50cyIsICIuLi8uLi9nbG9iYWwvc3JjL2luZGV4LnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2Fzc29jaWF0ZWQudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMva2V5cGFpci50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9wZGEudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvaW5kZXgudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvaW5kZXgudHMiLCAiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL3NoYXJlZC50cyIsICIuLi8uLi9zdWl0ZS11dGlscy9zcmMvcmVzdWx0LnRzIiwgIi4uLy4uL2NvbnZlcnRlci9zcmMvY29sbGVjdGlvbi50cyIsICIuLi8uLi9jb252ZXJ0ZXIvc3JjL2NyZWF0b3JzLnRzIiwgIi4uLy4uL2NvbnZlcnRlci9zcmMvY29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aXQgTm9kZS5jb25maXJtZWRTaWcob2spO1xuICAgICAgICAgICAgICAgIHJldHVybiBpbnN0LmRhdGE7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIChlcnI6IEVycm9yKSA9PiB7XG4gICAgICAgICAgICAgICAgZGVidWdMb2coJyMgRXJyb3Igc3VibWl0IHJldHJ5R2V0T3JDcmVhdGU6ICcsIGVycik7XG4gICAgICAgICAgICAgICAgdGhyb3cgZXJyO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICBkZWJ1Z0xvZyhgIyByZXRyeTogJHtjb3VudGVyfSBjcmVhdGUgdG9rZW4gYWNjb3VudDogYCwgZSk7XG4gICAgICAgICAgZGVidWdMb2coYCMgbWludDogJHttaW50fSwgb3duZXI6ICR7b3duZXJ9LCBmZWVQYXllcjogJHtmZWVQYXllcn1gKTtcbiAgICAgICAgfVxuICAgICAgICBhd2FpdCBzbGVlcChSRVRSWV9TTEVFUF9USU1FKTtcbiAgICAgICAgY291bnRlcisrO1xuICAgICAgfVxuICAgICAgdGhyb3cgRXJyb3IoYHJldHJ5IGFjdGlvbiBpcyBvdmVyIGxpbWl0ICR7UkVUUllfT1ZFUl9MSU1JVH1gKTtcbiAgICB9O1xuXG4gICAgLyoqXG4gICAgICogW01haW4gbG9naWNdR2V0IEFzc29jaWF0ZWQgdG9rZW4gQWNjb3VudC5cbiAgICAgKiBpZiBub3QgY3JlYXRlZCwgY3JlYXRlIG5ldyB0b2tlbiBhY2NvdWludFxuICAgICAqXG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG1pbnRcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gb3duZXJcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gZmVlUGF5ZXJcbiAgICAgKiBAcmV0dXJucyBQcm9taXNlPHN0cmluZz5cbiAgICAgKi9cbiAgICBleHBvcnQgY29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IGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSxcbiAgICAgICAgICBpbnN0OiB1bmRlZmluZWQsXG4gICAgICAgIH07XG4gICAgICB9IGNhdGNoIChlcnJvcjogdW5rbm93bikge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuQWNjb3VudE5vdEZvdW5kRXJyb3IpICYmXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuSW52YWxpZEFjY291bnRPd25lckVycm9yKVxuICAgICAgICApIHtcbiAgICAgICAgICB0aHJvdyBFcnJvcignVW5leHBlY3RlZCBlcnJvcicpO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgcGF5ZXIgPSAhZmVlUGF5ZXIgPyBvd25lciA6IGZlZVBheWVyO1xuXG4gICAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVBc3NvY2lhdGVkVG9rZW5BY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgcGF5ZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdCxcbiAgICAgICAgfTtcbiAgICAgIH1cbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHsgS2V5cGFpciBhcyBPcmlnaW5hbCwgUHVibGljS2V5IH0gZnJvbSAnQHNvbGFuYS93ZWIzLmpzJztcbmltcG9yd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kuZmluZFByb2dyYW1BZGRyZXNzU3luYyhcbiAgICAgICAgW2FkZHJlc3MudG9QdWJsaWNLZXkoKS50b0J1ZmZlcigpXSxcbiAgICAgICAgTVBMX0JVQkJMRUdVTV9QUk9HUkFNX0lELnRvUHVibGljS2V5KCksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGdldEJndW1TaWduZXIgPSAoKTogUHVibGljS2V5ID0+IHtcbiAgICAgIGNvbnN0IFtwdWJsaWNLZXldID0gUHVibGljS2V5LmZpbmRQcm9ncmFtQWRkcmVzc1N5bmMoXG4gICAgICAgIFtCdWZmZXIuZnJvbSgnY29sbGVjdGlvbl9jcGknLCAndXRmOCcpXSxcbiAgICAgICAgTVBMX0JVQkJMRUdVTV9QUk9HUkFNX0lELnRvUHVibGljS2V5KCksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGdldEFzc2V0SWQgPSAoYWRkcmVzczogUHVia2V5LCBsZWFmSW5kZXg6IG51bWJlcik6IFB1YmtleSA9PiB7XG4gICAgICBjb25zdCBub2RlID0gbmV3IEJOLkJOKGxlYWZJbmRleCk7XG4gICAgICBjb25zdCBbYXNzZXRJZF0gPSBQdWJsaWNLZXkuZmluZFByb2dyYW1BZGRyZXNzU3luYyhcbiAgICAgICAgW1xuICAgICAgICAgIEJ1ZmZlci5mcm9tKCdhc3NldCcsICd1dGY4JyksXG4gICAgICAgICAgYWRkcmVzcy50b1B1YmxpY0tleSgpLnRvQnVmZmVyKCksXG4gICAgICAgICAgVWludDhBcnJheS5mcm9tKG5vZGUudG9BcnJheSgnbGUnLCA4KSksXG4gICAgICAgIF0sXG4gICAgICAgIE1QTF9CVUJCTEVHVU1fUFJPR1JBTV9JRC50b1B1YmxpY0tleSgpLFxuICAgICAgKTtcbiAgICAgIHJldHVybiBhc3NldElkLnR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AgICBjb25zdCBkYXRhcyA9IGluZm8udmFsdWUubWFwKGFzeW5jIChkKSA9PiB7XG4gICAgICAgIGNvbnN0IG1pbnQgPSBkLmFjY291bnQuZGF0YS5wYXJzZWQuaW5mby5taW50IGFzIFB1YmtleTtcbiAgICAgICAgY29uc3QgdG9rZW5BbW91bnQgPSBkLmFjY291bnQuZGF0YS5wYXJzZWQuaW5mby50b2tlbkFtb3VudFxuICAgICAgICAgIC5hbW91bnQgYXMgc3RyaW5nO1xuICAgICAgICBpZiAodG9rZW5BbW91bnQgPT09ICcxJykge1xuICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gTWV0YWRhdGEuZnJvbUFjY291bnRBZGRyZXNzKFxuICAgICAgICAgIGNvbm5lY3Rpb24sXG4gICAgICAgICAgQWNjb3VudC5QZGEuZ2V0TWV0YWRhdGEobWludCksXG4gICAgICAgIClcbiAgICAgICAgICAudGhlbihhc3luYyAobWV0YWRhdGEpID0+IHtcbiAgICAgICAgICAgIC8qIGVzbGludC1kaXNhYmxlIEB0eXBlc2NyaXB0LWVzbGludC9uby1leHBsaWNpdC1hbnkgKi9cbiAgICAgICAgICAgIHJldHVybiBmZXRjaFJldHJ5KG1ldGFkYXRhLmRhdGEudXJpKS50aGVuKChqc29uOiBhbnkpID0+IHtcbiAgICAgICAgICAgICAgcmV0dXJuIGNvbnZlcnRlcihtZXRhZGF0YSwganNvbiwgdG9rZW5BbW91bnQpO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfSlcbiAgICAgICAgICAuY2F0Y2goKGVycikgPT4gZGVidWdMb2coJyMgW0ZldGNoIGVycm9yXScsIGVycikpO1xuICAgICAgfSk7XG5cbiAgICAgIGNvbnN0IGZpbHRlcnMgPSAoYXdhaXQgUHJvbWlzZS5hbGwoZGF0YXMpKS5maWx0ZXIoXG4gICAgICAgIChkYXRhKSA9PiBkYXRhICE9PSB1bmRlZmluZWQsXG4gICAgICApO1xuICAgICAgcmV0d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ydWN0aW9uKFxuICAgICAgICBmZWVQYXllcixcbiAgICAgICAgdG9rZW5Bc3NvY2lhdGVkLFxuICAgICAgICBvd25lcixcbiAgICAgICAgbWludCxcbiAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlTWludFRvQ2hlY2tlZEluc3RydWN0aW9uKFxuICAgICAgICBtaW50LFxuICAgICAgICB0b2tlbkFzc29jaWF0ZWQsXG4gICAgICAgIG93bmVyLFxuICAgICAgICBDYWxjdWxhdGUuY2FsY3VsYXRlQW1vdW50KHRvdGFsQW1vdW50LCBtaW50RGVjaW1hbCksXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgKSxcbiAgICApO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVDcmVhdGVNZXRhZGF0YUFjY291bnRWM0luc3RydWN0aW9uKFxuICAgICAgICB7XG4gICAgICAgICAgbWV0YWRhdGE6IG1ldGFkYXRhUGRhLFxuICAgICAgICAgIG1pbnQsXG4gICAgICAgICAgbWludEF1dGhvcml0eTogb3duZXIsXG4gICAgICAgICAgcGF5ZXI6IGZlZVBheWVyLFxuICAgICAgICAgIHVwZGF0ZUF1dGhvcml0eTogb3duZXIsXG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICBjcmVhdGVNZXRhZGF0YUFjY291bnRBcmdzVjM6IHtcbiAgICAgICAgICAgIGRhdGE6IHRva2VuTWV0YWRhdGEsXG4gICAgICAgICAgICBpc011dGFibGUsXG4gICAgICAgICAgICBjb2xsZWN0aW9uRGV0YWlsczogbnVsbCxcbiAgICAgICAgICB9LFxuICAgICAgICB9LFxuICAgICAgKSxcbiAgICApO1xuICAgIHJldHVybiBpbnN0cnVjdGlvbnM7XG4gIH07XG5cbiAgLyoqXG4gICAqIFNQTC1UT0tFTiBtaW50XG4gICAqXG4gICAqIEBwYXJhbSB7U2VjcmV0fSBvd25lciAgICAgIC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XdhaXQgU3RvcmFnZS51cGxvYWREYXRhKFxuICAgICAgICAgIHsgLi4uc3RvcmFnZU1ldGFkYXRhLCAuLi5pbWFnZSB9LFxuICAgICAgICAgIHN0b3JhZ2VUeXBlLFxuICAgICAgICAgIHBheWVyLFxuICAgICAgICApO1xuICAgICAgICBpZiAodXBsb2FkZWQuaXNFcnIpIHtcbiAgICAgICAgICB0aHJvdyB1cGxvYWRlZDtcbiAgICAgICAgfVxuICAgICAgICB1cmkgPSB1cGxvYWRlZC52YWx1ZTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHRocm93IEVycm9yKGBNdXN0IHNldCBmaWxlUGF0aCcgb3IgJ3VyaSdgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgaXNNdXRhYmxlID0gdHJ1ZTtcblxuICAgICAgY29uc3QgZGF0YXYyID0gQ29udmVydGVyLlRva2VuTWV0YWRhdGEuaW50b0luZnJhKFxuICAgICAgICBpbnB1dCxcbiAgICAgICAgdXJpLFxuICAgICAgICBzZWxsZXJGZWVCYXNpc1BvaW50cyxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGRhdGF2MjogJywgZGF0YXYyKTtcbiAgICAgIGRlYnVnTG9nKCcjIHVwbG9hZCBjb250ZW50IHVybDogJywgdXJpKTtcblxuICAgICAgY29uc3QgbWludCA9IEFjY291bnQuS2V5cGFpci5jcmVhdGUoKTtcbiAgICAgIGNvbnN0IGluc3RzID0gYXdhaXQgY3JlYXRlTWludChcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgdG90YWxBbW91bnQsXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICBkYXRhdjIsXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgKTtcblxuICAgICAgLy8gZnJlZXplQXV0aG9yaXR5XG4gICA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ibWludCIsICJBY2NvdW50IiwgIkNvbnZlcnRlciIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiaW1wb3J0X3NwbF90b2tlbiIsICJTcGxUb2tlbiIsICJBY2NvdW50IiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJpbXBvcnRfc3BsX3Rva2VuIiwgIlNwbFRva2VuIiwgIkFjY291bnQiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlNwbFRva2VuIl0KfQo= \ No newline at end of file +//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uL3NyYy9hZGQudHMiLCAiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9iYXRjaC50cyIsICIuLi8uLi9ub2RlL3NyYy9pbmRleC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jb21tb24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvbWludC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9wYXJ0aWFsLXNpZ24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY2FsY3VsYXRlLXR4c2l6ZS50cyIsICIuLi8uLi9nbG9iYWwvc3JjL2luZGV4LnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2tleXBhaXIudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvcGRhLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3N1aXRlLXV0aWxzL3NyYy9zaGFyZWQudHMiLCAiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL3Jlc3VsdC50cyI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Db21tb25TdHJ1Y3R1cmU8UHVia2V5PiwgRXJyb3I+PiA9PiB7XG4gICAgcmV0dXJuIFRyeShhc3luYyAoKSA9PiB7XG4gICAgICBjb25zdCBwYXllciA9IG9wdGlvbnMuZmVlUGF5ZXIgPyBvcHRpb25zLmZlZVBheWVyIDogb3duZXJPck11bHRpc2lnWzBdO1xuICAgICAgY29uc3Qga2V5cGFpcnMgPSBvd25lck9yTXVsdGlzaWcubWFwKChzKSA9PiBzLnRvS2V5cGFpcigpKTtcblxuICAgICAgY29uc3QgdG9rZW5Bc3NvY2lhdGVkID0gYXdhaXQgQWNjb3VudC5Bc3NvY2lhdGVkLnJldHJ5R2V0T3JDcmVhdGUoXG4gICAgICAgIHRva2VuLFxuICAgICAgICBvd25lcixcbiAgICAgICAgcGF5ZXIsXG4gICAgICApO1xuXG4gICAgICBjb25zdCBpbnN0ID0gY3JlYXRlTWludFRvQ2hlY2tlZEluc3RydWN0aW9uKFxuICAgICAgICB0b2tlbi50b1B1YmxpY0tleSgpLFxuICAgICAgICB0b2tlbkFzc29jaWF0ZWQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgQ2FsY3VsYXRlLmNhbGN1bGF0ZUFtb3VudCh0b3RhbEFtb3VudCwgbWludERlY2ltYWwpLFxuICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICAga2V5cGFpcnMsXG4gICAgICApO1xuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb248UHVia2V5PihcbiAgICAgICAgW2luc3RdLFxuICAgICAgICBrZXlwYWlycyxcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCksXG4gICAgICAgIHRva2VuLFxuICAgICAgKTtcbiAgICB9KTtcbiAgfTtcbn1cbiIsICJpbXBvcnQgeyBDb21taXRtZW50LCBQdWJsaWNLZXkgfSBmcm9tICdAc29sYW5hL3dlYjMuanMnO1xuaW1wb3J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SB0cmFuc2FjdGlvbi5pbnN0cnVjdGlvbnMucmVkdWNlKChhY2MsIGl4KSA9PiB7XG4gICAgICBpeC5rZXlzLmZvckVhY2goKHsgcHVia2V5LCBpc1NpZ25lciB9KSA9PiB7XG4gICAgICAgIGNvbnN0IHBrID0gcHVia2V5LnRvQmFzZTU4KCk7XG4gICAgICAgIGlmIChpc1NpZ25lcikgc2lnbmVycy5hZGQocGspO1xuICAgICAgICBhY2NvdW50cy5hZGQocGspO1xuICAgICAgfSk7XG5cbiAgICAgIGFjY291bnRzLmFkZChpeC5wcm9ncmFtSWQudG9CYXNlNTgoKSk7XG5cbiAgICAgIGNvbnN0IG5JbmRleGVzID0gaXgua2V5cy5sZW5ndGg7XG4gICAgICBjb25zdCBvcGFxdWVEYXRhID0gaXguZGF0YS5sZW5ndGg7XG5cbiAgICAgIHJldHVybiAoXG4gICAgICAgIGFjYyArXG4gICAgICAgIDEgKyAvLyBQSUQgaW5kZXhcbiAgICAgICAgY29tcGFjdEFycmF5U2l6ZShuSW5kZXhlcywgMSkgK1xuICAgICAgICBjb21wYWN0QXJyYXlTaXplKG9wYXF1ZURhdGEsIDEpXG4gICAgICApO1xuICAgIH0sIDApO1xuXG4gICAgcmV0dXJuIChcbiAgICAgIGNvbXBhY3RBcnJheVNpemUoc2lnbmVycy5zaXplLCA2NCkgKyAvLyBzaWduYXR1cmVzXG4gICAgICAzICsgLy8gaGVhZGVyXG4gICAgICBjb21wYWN0QXJyYXlTaXplKGFjY291bnRzLnNpemUsIDMyKSArIC8vIGFjY291bnRzXG4gICAgICAzMiArIC8vIGJsb2NraGFzaFxuICAgICAgY29tcGFjdEhlYWRlcih0cmFuc2FjdGlvbi5pbnN0cnVjdGlvbnMubGVuZ3RoKSArIC8vIGluc3RydWN0aW9uc1xuICAgICAgaXhzU2l6ZVxuICAgICk7XG4gIH07XG5cbiAgLyoqXG4gICAqIElzIG1heCB0cmFuc2FjdGlvbiBzaXplXG4gICAqIEBwYXJhbSB0cmFuc2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7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEuc3ltYm9sKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU3ltYm9sKG1ldGFkYXRhLnN5bWJvbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAocmVzICYmIHJlcy5pc0Vycikge1xuICAgICAgICAgIHJlc3VsdHMucHVzaCguLi5yZXMuZXJyb3IuZGV0YWlscyk7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgICAgaWYgKHJlc3VsdHMubGVuZ3RoID4gMCkge1xuICAgICAg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Bjb25uZWN0aW9uLmdldFBhcnNlZFRva2VuQWNjb3VudHNCeU93bmVyKFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICB7XG4gICAgICAgICAgcHJvZ3JhbUlkOiBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICB9LFxuICAgICAgKTtcblxuICAgICAgY29uc3QgZGF0YXMgPSBpbmZvLnZhbHVlLm1hcChhc3luYyAoZCkgPT4ge1xuICAgICAgICBjb25zdCBtaW50ID0gZC5hY2NvdW50LmRhdGEucGFyc2VkLmluZm8ubWludCBhcyBQdWJrZXk7XG4gICAgICAgIGNvbnN0IHRva2VuQW1vdW50ID0gZC5hY2NvdW50LmRhdGEucGFyc2VkLmluZm8udG9rZW5BbW91bnRcbiAgICAgICAgICAuYW1vdW50IGFzIHN0cmluZztcbiAgICAgICAgaWYgKHRva2VuQW1vdW50ID09PSAnMScpIHtcbiAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIE1ldGFkYXRhLmZyb21BY2NvdW50QWRkcmVzcyhcbiAgICAgICAgICBjb25uZWN0aW9uLFxuICAgICAgICAgIEFjY291bnQuUGRhLmdldE1ldGFkYXRhKG1pbnQpLFxuICAgICAgICApXG4gICAgICAgICAgLnRoZW4oYXN5bmMgKG1ldGFkYXRhKSA9PiB7XG4gICAgICAgICAgICAvKiBlc2xpbnQtZGlzYWJsZSBAdHlwZXNjcmlwdC1lc2xpbnQvbm8tZXhwbGljaXQtYW55ICovXG4gICAgICAgICAgICByZXR1cm4gZmV0Y2hSZXRyeShtZXRhZGF0YS5kYXRhLnVyaSkudGhlbigoanNvbjogYW55KSA9PiB7XG4gICAgICAgICAgICAgIHJldHVybiBjb252ZXJ0ZXIobWV0YWRhdGEsIGpzb24sIHRva2VuQW1vdW50KTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgIH0pXG4gICAgICAgICAgLmNhdGNoKChlcnIpID0+IGRlYnVnTG9nKCcjIFt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QYXllcixcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IGRlc3RUb2tlbiA9IGF3YWl0IEFjY291bnQuQXNzb2NpYXRlZC5tYWtlT3JDcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgZGVzdCxcbiAgICAgICAgZmVlUGF5ZXIsXG4gICAgICApO1xuXG4gICAgICBsZXQgaW5zdDI7XG4gICAgICBjb25zdCBibG9ja2hhc2hPYmogPSBhd2FpdCBOb2RlLmdldENvbm5lY3Rpb24oKS5nZXRMYXRlc3RCbG9ja2hhc2goKTtcblxuICAgICAgY29uc3QgdHggPSBuZXcgVHJhbnNhY3Rpb24oe1xuICAgICAgICBsYXN0VmFsaWRCbG9ja0hlaWdodDogYmxvY2toYXNoT2JqLmxhc3RWYWxpZEJsb2NrSGVpZ2h0LFxuICAgICAgICBibG9ja2hhc2g6IGJsb2NraGFzaE9iai5ibG9ja2hhc2gsXG4gICAgICAgIGZlZVBheWVyOiBmZWVQYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgfSk7XG5cbiAgICAgIGluc3QyID0gY3JlYXRlVHJhbnNmZXJDaGVja2VkSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHNvdXJjZVRva2VuLnRva2VuQWNjb3VudC50b1B1YmxpY0tleSgpLFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIGRlc3RUb2tlbi50b2tlbkFjY291bnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgIENhbGN1bGF0b3IuY2FsY3VsYXRlQW1vdW50KGFtb3VudCwgbWludERlY2ltYWwpLFxuICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICAgW293bmVyLnRvS2V5cGFpcigpXSxcbiAgICAgICk7XG5cbiAgICAgIC8vIHJldHVybiBhc3NvY2lhdGVkIHRva2VuIGFjY291bnRcbiAgICAgIGlmICghZGVzdFRva2VuLmluc3QpIHtcbiAg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sXG4gICAgICAgIENhbGN1bGF0ZS5jYWxjdWxhdGVBbW91bnQodG90YWxBbW91bnQsIG1pbnREZWNpbWFsKSxcbiAgICAgICAgbWludERlY2ltYWwsXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUNyZWF0ZU1ldGFkYXRhQWNjb3VudFYzSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHtcbiAgICAgICAgICBtZXRhZGF0YTogbWV0YWRhdGFQZGEsXG4gICAgICAgICAgbWludCxcbiAgICAgICAgICBtaW50QXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBwYXllcjogZmVlUGF5ZXIsXG4gICAgICAgICAgdXBkYXRlQXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgIGNyZWF0ZU1ldGFkYXRhQWNjb3VudEFyZ3NWMzoge1xuICAgICAgICAgICAgZGF0YTogdG9rZW5NZXRhZGF0YSxcbiAgICAgICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICAgICAgIGNvbGxlY3Rpb25EZXRhaWxzOiBudWxsLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICApLFxuICAgICk7XG4gICAgcmV0dXJuIGluc3RydWN0aW9ucztcbiAgfTtcblxuICAvKipcbiAgICogU1BMLVRPS0VOIG1pbnRcbiAgICpcbiAgICogQHBhcmFtIHtTZWNyZXR9IG93bmVyICAgICAgLy8gdG9rZW4gb3duZXIgU2VjcmV0XG4gICAqIEBwYXJhbSB7bnVtYmVyfSB0b3RhbEFtb3VudCAvLyB0b3RhbCBudW1iZXJcbiAgICogQHBhcmFtIHtudW1iZXJ9IG1pbnREZWNpbWFsIC8vIHRva2VuIGRlY2ltYWxcbiAgICogQHBhcmFtIHtJbnB1dFRva2VuTWV0YWRhdGF9IGlucHV0ICAgICAgIC8vIHRva2VuIG1ldGFkYXRhXG4gICAqIEBwYXJhbSB7UGF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VwbG9hZGVkLnZhbHVlO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgdGhyb3cgRXJyb3IoYE11c3Qgc2V0IGZpbGVQYXRoJyBvciAndXJpJ2ApO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBpc011dGFibGUgPSB0cnVlO1xuXG4gICAgICBjb25zdCBkYXRhdjIgPSBDb252ZXJ0ZXIuVG9rZW5NZXRhZGF0YS5pbnRvSW5mcmEoXG4gICAgICAgIGlucHV0LFxuICAgICAgICB1cmksXG4gICAgICAgIHNlbGxlckZlZUJhc2lzUG9pbnRzLFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgZGF0YXYyOiAnLCBkYXRhdjIpO1xuICAgICAgZGVidWdMb2coJyMgdXBsb2FkIGNvbnRlbnQgdXJsOiAnLCB1cmkpO1xuXG4gICAgICBjb25zdCBtaW50ID0gQWNjb3VudC5LZXlwYWlyLmNyZWF0ZSgpO1xuICAgICAgY29uc3QgaW5zdHMgPSBhd2FpdCBjcmVhdGVNaW50KFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICB0b3RhbEFtb3VudCxcbiAgICAgICAgbWludERlY2ltYWwsXG4gICAgICAgIGRhdGF2MixcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICBpc011dGFibGUsXG4gICAgICApO1xuXG4gICAgICAvLyBmcmVlemVBdXRob3JpdHlcbiAgICAgIGlmIChmcmVlemVBdXRob3JpdHkpIHtcbiAgICAgICAgaW5zdHMucHVzaChcbiAgICAgICAgICBjcmVhdGVGcmVlemVBdXRob3JpdHkoXG4gICAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgICAgIGZyZWV6ZUF1dGhvcml0eS50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gIC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RyYW5zYWN0aW9uQnVpbGRlciIsICJpbXBvcnRfc3BsX3Rva2VuIiwgIlNwbFRva2VuIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJpbXBvcnRfbXBsX3Rva2VuX21ldGFkYXRhIiwgImltcG9ydF9zcGxfdG9rZW4iLCAiU3BsVG9rZW4iLCAiTUFYX1JFVFJJRVMiLCAiQ29udmVydGVyIiwgImZldGNoIiwgIkFjY291bnQiLCAiaW1wb3J0X3NwbF90b2tlbiIsICJTcGxUb2tlbiIsICJBY2NvdW50IiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJpbXBvcnRfc3BsX3Rva2VuIiwgImltcG9ydF93ZWIzIiwgIlNwbFRva2VuIiwgIkFjY291bnQiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgImltcG9ydF93ZWIzIiwgImltcG9ydF9zcGxfdG9rZW4iLCAiaW1wb3J0X21wbF90b2tlbl9tZXRhZGF0YSIsICJQcm92ZW5hbmNlTGF5ZXIiLCAidXBsb2FkRmlsZSIsICJJcnlzIiwgIkFyd2VhdmUiLCAiaW1wb3J0X25mdCIsICJOZnRTdG9yYWdlIiwgIlN0b3JhZ2UiLCAiU3BsVG9rZW4iLCAibWludCIsICJBY2NvdW50IiwgIkNvbnZlcnRlciIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiaW1wb3J0X3NwbF90b2tlbiIsICJTcGxUb2tlbiIsICJBY2NvdW50IiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJpbXBvcnRfc3BsX3Rva2VuIiwgIlNwbFRva2VuIiwgIkFjY291bnQiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlNwbFRva2VuIl0KfQo= \ No newline at end of file diff --git a/packages/suite-spl-token/dist/index.mjs b/packages/suite-spl-token/dist/index.mjs index eee324f36..16869ec2e 100644 --- a/packages/suite-spl-token/dist/index.mjs +++ b/packages/suite-spl-token/dist/index.mjs @@ -457,22 +457,11 @@ var TransactionBuilder5; // ../global/src/index.ts import { Keypair as Keypair3, LAMPORTS_PER_SOL, PublicKey as PublicKey4 } from "@solana/web3.js"; -// ../account/src/associated.ts -import { - ASSOCIATED_TOKEN_PROGRAM_ID, - createAssociatedTokenAccountInstruction, - getAccount, - getAssociatedTokenAddressSync, - TOKEN_PROGRAM_ID, - TokenAccountNotFoundError, - TokenInvalidAccountOwnerError -} from "@solana/spl-token"; - // ../account/src/keypair.ts import { Keypair as Original, PublicKey as PublicKey2 } from "@solana/web3.js"; import bs from "bs58"; var Account; -((Account5) => { +((Account4) => { class Keypair4 { secret; pubkey; @@ -508,111 +497,16 @@ var Account; }); }; } - Account5.Keypair = Keypair4; + Account4.Keypair = Keypair4; })(Account || (Account = {})); -// ../account/src/associated.ts -var Account2; -((Account5) => { - let Associated; - ((Associated2) => { - const RETRY_OVER_LIMIT = 10; - const RETRY_SLEEP_TIME = 3; - const get = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const res = await (0, Associated2.makeOrCreateInstruction)( - mint, - owner, - new Account.Keypair({ secret: feePayer }).pubkey, - allowOwnerOffCurve - ); - if (!res.inst) { - return res.tokenAccount; - } - return new TransactionBuilder6.Common( - [res.inst], - [], - feePayer.toKeypair(), - res.tokenAccount - ); - }; - Associated2.retryGetOrCreate = async (mint, owner, feePayer) => { - let counter = 1; - while (counter < RETRY_OVER_LIMIT) { - try { - const inst = await get(mint, owner, feePayer, true); - if (inst && typeof inst === "string") { - debugLog("# associatedTokenAccount: ", inst); - return inst; - } else if (inst instanceof TransactionBuilder6.Common) { - (await inst.submit()).map( - async (ok) => { - await Node.confirmedSig(ok); - return inst.data; - }, - (err) => { - debugLog("# Error submit retryGetOrCreate: ", err); - throw err; - } - ); - } - } catch (e) { - debugLog(`# retry: ${counter} create token account: `, e); - debugLog(`# mint: ${mint}, owner: ${owner}, feePayer: ${feePayer}`); - } - await sleep(RETRY_SLEEP_TIME); - counter++; - } - throw Error(`retry action is over limit ${RETRY_OVER_LIMIT}`); - }; - Associated2.makeOrCreateInstruction = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const associatedTokenAccount = getAssociatedTokenAddressSync( - mint.toPublicKey(), - owner.toPublicKey(), - allowOwnerOffCurve, - TOKEN_PROGRAM_ID, - ASSOCIATED_TOKEN_PROGRAM_ID - ); - debugLog("# associatedTokenAccount: ", associatedTokenAccount.toString()); - try { - await getAccount( - Node.getConnection(), - associatedTokenAccount, - Node.getConnection().commitment, - TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst: void 0 - }; - } catch (error) { - if (!(error instanceof TokenAccountNotFoundError) && !(error instanceof TokenInvalidAccountOwnerError)) { - throw Error("Unexpected error"); - } - const payer = !feePayer ? owner : feePayer; - const inst = createAssociatedTokenAccountInstruction( - payer.toPublicKey(), - associatedTokenAccount, - owner.toPublicKey(), - mint.toPublicKey(), - TOKEN_PROGRAM_ID, - ASSOCIATED_TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst - }; - } - }; - })(Associated = Account5.Associated || (Account5.Associated = {})); -})(Account2 || (Account2 = {})); - // ../account/src/pda.ts import { PublicKey as PublicKey3 } from "@solana/web3.js"; import { PROGRAM_ID } from "@metaplex-foundation/mpl-token-metadata"; import { MPL_BUBBLEGUM_PROGRAM_ID } from "@metaplex-foundation/mpl-bubblegum"; import BN from "bn.js"; -var Account3; -((Account5) => { +var Account2; +((Account4) => { let Pda; ((Pda2) => { Pda2.getMetadata = (address) => { @@ -664,14 +558,13 @@ var Account3; ); return assetId.toString(); }; - })(Pda = Account5.Pda || (Account5.Pda = {})); -})(Account3 || (Account3 = {})); + })(Pda = Account4.Pda || (Account4.Pda = {})); +})(Account2 || (Account2 = {})); // ../account/src/index.ts -var Account4 = { - ...Account2, +var Account3 = { ...Account, - ...Account3 + ...Account2 }; // ../global/src/index.ts @@ -702,7 +595,7 @@ String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, op } return url; } - if (Account4.Keypair.isPubkey(addressOrSignature)) { + if (Account3.Keypair.isPubkey(addressOrSignature)) { if (explorer === "solanafm" /* SolanaFM */) { url = `${Constants.EXPLORER_SOLANAFM_URL}/address/${addressOrSignature}?cluster=${cluster}`; } else if (explorer === "xray" /* Xray */) { @@ -722,13 +615,13 @@ String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, op return url; }; String.prototype.toPublicKey = function() { - if (!Account4.Keypair.isPubkey(this.toString())) { + if (!Account3.Keypair.isPubkey(this.toString())) { throw Error(`No match KeyPair.PubKey: ${this.toString()}`); } return new PublicKey4(this.toString()); }; String.prototype.toKeypair = function() { - if (!Account4.Keypair.isSecret(this.toString())) { + if (!Account3.Keypair.isSecret(this.toString())) { throw Error(`No match KeyPair.Secret: ${this.toString()}`); } const decoded = bs2.decode(this.toString()); @@ -1536,7 +1429,7 @@ var SplToken2; return Try(async () => { const payer = options.feePayer ? options.feePayer : ownerOrMultisig[0]; const keypairs = ownerOrMultisig.map((s) => s.toKeypair()); - const tokenAssociated = await Account4.Associated.retryGetOrCreate( + const tokenAssociated = await Account3.Associated.retryGetOrCreate( token, owner, payer @@ -1562,13 +1455,13 @@ var SplToken2; // src/burn.ts import { createBurnCheckedInstruction, - getAssociatedTokenAddressSync as getAssociatedTokenAddressSync2 + getAssociatedTokenAddressSync } from "@solana/spl-token"; var SplToken3; ((SplToken11) => { SplToken11.burn = (mint, owner, ownerOrMultisig, burnAmount, tokenDecimals, options = {}) => { return Try(() => { - const tokenAccount = getAssociatedTokenAddressSync2( + const tokenAccount = getAssociatedTokenAddressSync( mint.toPublicKey(), owner.toPublicKey() ); @@ -1589,7 +1482,7 @@ var SplToken3; // src/find.ts import { Metadata } from "@metaplex-foundation/mpl-token-metadata"; -import { TOKEN_PROGRAM_ID as TOKEN_PROGRAM_ID2 } from "@solana/spl-token"; +import { TOKEN_PROGRAM_ID } from "@solana/spl-token"; import fetch from "cross-fetch"; var SplToken4; ((SplToken11) => { @@ -1628,7 +1521,7 @@ var SplToken4; const info = await connection.getParsedTokenAccountsByOwner( owner.toPublicKey(), { - programId: TOKEN_PROGRAM_ID2 + programId: TOKEN_PROGRAM_ID } ); const datas = info.value.map(async (d) => { @@ -1639,7 +1532,7 @@ var SplToken4; } return Metadata.fromAccountAddress( connection, - Account4.Pda.getMetadata(mint) + Account3.Pda.getMetadata(mint) ).then(async (metadata) => { return fetchRetry(metadata.data.uri).then((json) => { return converter(metadata, json, tokenAmount); @@ -1657,7 +1550,7 @@ var SplToken4; const connection = Node.getConnection(); const metadata = await Metadata.fromAccountAddress( connection, - Account4.Pda.getMetadata(mint) + Account3.Pda.getMetadata(mint) ); debugLog("# findByMint metadata: ", metadata); if (metadata.tokenStandard === 0) { @@ -1676,21 +1569,21 @@ var SplToken4; // src/freeze.ts import { createFreezeAccountInstruction, - getAssociatedTokenAddressSync as getAssociatedTokenAddressSync3 + getAssociatedTokenAddressSync as getAssociatedTokenAddressSync2 } from "@solana/spl-token"; var SplToken5; ((SplToken11) => { SplToken11.freeze = (mint, owner, freezeAuthority, options = {}) => { return Try(() => { const payer = options.feePayer ? options.feePayer : freezeAuthority; - const tokenAccount = getAssociatedTokenAddressSync3( + const tokenAccount = getAssociatedTokenAddressSync2( mint.toPublicKey(), owner.toPublicKey() ); const inst = createFreezeAccountInstruction( tokenAccount, mint.toPublicKey(), - new Account4.Keypair({ secret: freezeAuthority }).toPublicKey() + new Account3.Keypair({ secret: freezeAuthority }).toPublicKey() ); return new TransactionBuilder6.Common( [inst], @@ -1709,12 +1602,12 @@ var SplToken6; SplToken11.gasLessTransfer = async (mint, owner, dest, amount, mintDecimal, feePayer) => { return Try(async () => { const ownerPublicKey = owner.toKeypair().publicKey; - const sourceToken = await Account4.Associated.makeOrCreateInstruction( + const sourceToken = await Account3.Associated.makeOrCreateInstruction( mint, ownerPublicKey.toString(), feePayer ); - const destToken = await Account4.Associated.makeOrCreateInstruction( + const destToken = await Account3.Associated.makeOrCreateInstruction( mint, dest, feePayer @@ -1726,27 +1619,18 @@ var SplToken6; blockhash: blockhashObj.blockhash, feePayer: feePayer.toPublicKey() }); + inst2 = createTransferCheckedInstruction( + sourceToken.tokenAccount.toPublicKey(), + mint.toPublicKey(), + destToken.tokenAccount.toPublicKey(), + ownerPublicKey, + SplToken.calculateAmount(amount, mintDecimal), + mintDecimal, + [owner.toKeypair()] + ); if (!destToken.inst) { - inst2 = createTransferCheckedInstruction( - sourceToken.tokenAccount.toPublicKey(), - mint.toPublicKey(), - destToken.tokenAccount.toPublicKey(), - ownerPublicKey, - SplToken.calculateAmount(amount, mintDecimal), - mintDecimal, - [owner.toKeypair()] - ); tx.add(inst2); } else { - inst2 = createTransferCheckedInstruction( - sourceToken.tokenAccount.toPublicKey(), - mint.toPublicKey(), - destToken.tokenAccount.toPublicKey(), - ownerPublicKey, - SplToken.calculateAmount(amount, mintDecimal), - mintDecimal, - [owner.toKeypair()] - ); tx.add(destToken.inst).add(inst2); } tx.recentBlockhash = blockhashObj.blockhash; @@ -1766,14 +1650,14 @@ import { } from "@solana/web3.js"; import { AuthorityType, - createAssociatedTokenAccountInstruction as createAssociatedTokenAccountInstruction2, + createAssociatedTokenAccountInstruction, createInitializeMintInstruction, createMintToCheckedInstruction as createMintToCheckedInstruction2, createSetAuthorityInstruction, - getAssociatedTokenAddressSync as getAssociatedTokenAddressSync4, + getAssociatedTokenAddressSync as getAssociatedTokenAddressSync3, getMinimumBalanceForRentExemptMint, MINT_SIZE, - TOKEN_PROGRAM_ID as TOKEN_PROGRAM_ID3 + TOKEN_PROGRAM_ID as TOKEN_PROGRAM_ID2 } from "@solana/spl-token"; import { createCreateMetadataAccountV3Instruction @@ -2014,8 +1898,8 @@ var SplToken7; SplToken11.createMint = async (mint2, owner, totalAmount, mintDecimal, tokenMetadata, feePayer, isMutable) => { const connection = Node.getConnection(); const lamports = await getMinimumBalanceForRentExemptMint(connection); - const metadataPda = Account4.Pda.getMetadata(mint2.toString()); - const tokenAssociated = getAssociatedTokenAddressSync4(mint2, owner); + const metadataPda = Account3.Pda.getMetadata(mint2.toString()); + const tokenAssociated = getAssociatedTokenAddressSync3(mint2, owner); const instructions = []; instructions.push( SystemProgram.createAccount({ @@ -2023,7 +1907,7 @@ var SplToken7; newAccountPubkey: mint2, space: MINT_SIZE, lamports, - programId: TOKEN_PROGRAM_ID3 + programId: TOKEN_PROGRAM_ID2 }) ); instructions.push( @@ -2032,11 +1916,11 @@ var SplToken7; mintDecimal, owner, owner, - TOKEN_PROGRAM_ID3 + TOKEN_PROGRAM_ID2 ) ); instructions.push( - createAssociatedTokenAccountInstruction2( + createAssociatedTokenAccountInstruction( feePayer, tokenAssociated, owner, @@ -2123,7 +2007,7 @@ var SplToken7; ); debugLog("# datav2: ", datav2); debugLog("# upload content url: ", uri); - const mint2 = Account4.Keypair.create(); + const mint2 = Account3.Keypair.create(); const insts = await (0, SplToken11.createMint)( mint2.toPublicKey(), ownerPublicKey, @@ -2155,21 +2039,21 @@ var SplToken7; // src/thaw.ts import { createThawAccountInstruction, - getAssociatedTokenAddressSync as getAssociatedTokenAddressSync5 + getAssociatedTokenAddressSync as getAssociatedTokenAddressSync4 } from "@solana/spl-token"; var SplToken8; ((SplToken11) => { SplToken11.thaw = (mint, owner, freezeAuthority, options = {}) => { const payer = options.feePayer ? options.feePayer : freezeAuthority; return Try(() => { - const tokenAccount = getAssociatedTokenAddressSync5( + const tokenAccount = getAssociatedTokenAddressSync4( mint.toPublicKey(), owner.toPublicKey() ); const inst = createThawAccountInstruction( tokenAccount, mint.toPublicKey(), - new Account4.Keypair({ secret: freezeAuthority }).toPublicKey() + new Account3.Keypair({ secret: freezeAuthority }).toPublicKey() ); return new TransactionBuilder6.Common( [inst], @@ -2187,27 +2071,33 @@ var SplToken9; SplToken11.transfer = async (mint, owner, dest, ownerOrMultisig, amount, mintDecimal, options = {}) => { return Try(async () => { const payer = options.feePayer ? options.feePayer : ownerOrMultisig[0]; + const payerPubkey = new Account3.Keypair({ secret: payer }); const keypairs = ownerOrMultisig.map((s) => s.toKeypair()); - const sourceToken = await Account4.Associated.retryGetOrCreate( + const sourceToken = await Account3.Associated.makeOrCreateInstruction( mint, - owner, - payer + owner.toString(), + payerPubkey.pubkey ); - const destToken = await Account4.Associated.retryGetOrCreate( + const destToken = await Account3.Associated.makeOrCreateInstruction( mint, dest, - payer + payerPubkey.pubkey ); const inst = createTransferCheckedInstruction2( - sourceToken.toPublicKey(), + sourceToken.tokenAccount.toPublicKey(), mint.toPublicKey(), - destToken.toPublicKey(), + destToken.tokenAccount.toPublicKey(), owner.toPublicKey(), SplToken.calculateAmount(amount, mintDecimal), mintDecimal, keypairs ); - return new TransactionBuilder6.Common([inst], keypairs, payer.toKeypair()); + const instructions = destToken.inst ? [destToken.inst, inst] : [inst]; + return new TransactionBuilder6.Common( + instructions, + keypairs, + payer.toKeypair() + ); }); }; })(SplToken9 || (SplToken9 = {})); @@ -2226,4 +2116,4 @@ var SplToken10 = { export { SplToken10 as SplToken }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2FkZC50cyIsICIuLi8uLi9zdWl0ZS11dGlscy9zcmMvY29uc3RhbnRzLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2JhdGNoLnRzIiwgIi4uLy4uL25vZGUvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2NvbW1vbi50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9taW50LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL3BhcnRpYWwtc2lnbi50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jYWxjdWxhdGUtdHhzaXplLnRzIiwgIi4uLy4uL2dsb2JhbC9zcmMvaW5kZXgudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvYXNzb2NpYXRlZC50cyIsICIuLi8uL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ZXRPckNyZWF0ZTogJywgZXJyKTtcbiAgICAgICAgICAgICAgICB0aHJvdyBlcnI7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgIGRlYnVnTG9nKGAjIHJldHJ5OiAke2NvdW50ZXJ9IGNyZWF0ZSB0b2tlbiBhY2NvdW50OiBgLCBlKTtcbiAgICAgICAgICBkZWJ1Z0xvZyhgIyBtaW50OiAke21pbnR9LCBvd25lcjogJHtvd25lcn0sIGZlZVBheWVyOiAke2ZlZVBheWVyfWApO1xuICAgICAgICB9XG4gICAgICAgIGF3YWl0IHNsZWVwKFJFVFJZX1NMRUVQX1RJTUUpO1xuICAgICAgICBjb3VudGVyKys7XG4gICAgICB9XG4gICAgICB0aHJvdyBFcnJvcihgcmV0cnkgYWN0aW9uIGlzIG92ZXIgbGltaXQgJHtSRVRSWV9PVkVSX0xJTUlUfWApO1xuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiBbTWFpbiBsb2dpY11HZXQgQXNzb2NpYXRlZCB0b2tlbiBBY2NvdW50LlxuICAgICAqIGlmIG5vdCBjcmVhdGVkLCBjcmVhdGUgbmV3IHRva2VuIGFjY291aW50XG4gICAgICpcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gbWludFxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBvd25lclxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBmZWVQYXllclxuICAgICAqIEByZXR1cm5zIFByb21pc2U8c3RyaW5nPlxuICAgICAqL1xuICAgIGV4cG9ydCBjb25zdCBtYWtlT3JDcmVhdGVJbnN0cnVjdGlvbiA9IGFzeW5jIChcbiAgICAgIG1pbnQ6IFB1YmtleSxcbiAgICAgIG93bmVyOiBQdWJrZXksXG4gICAgICBmZWVQYXllcj86IFB1YmtleSxcbiAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSA9IGZhbHNlLFxuICAgICk6IFByb21pc2U8e1xuICAgICAgdG9rZW5BY2NvdW50OiBzdHJpbmc7XG4gICAgICBpbnN0OiBUcmFuc2FjdGlvbkluc3RydWN0aW9uIHwgdW5kZWZpbmVkO1xuICAgIH0+ID0+IHtcbiAgICAgIGNvbnN0IGFzc29jaWF0ZWRUb2tlbkFjY291bnQgPSBnZXRBc3NvY2lhdGVkVG9rZW5BZGRyZXNzU3luYyhcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICBhbGxvd093bmVyT2ZmQ3VydmUsXG4gICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGFzc29jaWF0ZWRUb2tlbkFjY291bnQ6ICcsIGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSk7XG5cbiAgICAgIHRyeSB7XG4gICAgICAgIC8vIERvbnQgdXNlIFJlc3VsdFxuICAgICAgICBhd2FpdCBnZXRBY2NvdW50KFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCkuY29tbWl0bWVudCxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3Q6IHVuZGVmaW5lZCxcbiAgICAgICAgfTtcbiAgICAgIH0gY2F0Y2ggKGVycm9yOiB1bmtub3duKSB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5BY2NvdW50Tm90Rm91bmRFcnJvcikgJiZcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5JbnZhbGlkQWNjb3VudE93bmVyRXJyb3IpXG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9yKCdVbmV4cGVjdGVkIGVycm9yJyk7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBwYXllciA9ICFmZWVQYXllciA/IG93bmVyIDogZmVlUGF5ZXI7XG5cbiAgICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgICBwYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgICBBU1NPQ0lBVEVEX1RPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG5cbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICB0b2tlbkFjY291bnQ6IGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSxcbiAgICAgICAgICBpbnN0LFxuICAgICAgICB9O1xuICAgICAgfVxuICAgIH07XG4gIH1cbn1cbiIsICJpbXBvcnQgeyBLZXlwYWlyIGFzIE9yaWdpbmFsLCBQdWJsaWNLZXkgfSBmcm9tICdAc29sYW5hL3dlYjMuanMnO1xuaW1wb3J0IHsgUHVia2V5LCBTZWNyZXQgfSBmcm9tICd+L3R5cGVzL2FjY291bnQnO1xuaW1wb3J0IGJzIGZyb20gJ2JzNTgnO1xuXG5leHBvcnQgbmFtZXNwYWNlIEFjY291bnQge1xuICBleHBvcnQgY2xhc3MgS2V5cGFpciB7XG4gICAgc2VjcmV0OiBTZWNyZXQ7XG4gICAgcHVia2V5OiBQ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cHRpb248SW50ZXJuYWxDcmVhdG9yc1tdPiA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBudWxsO1xuICAgICAgfVxuICAgICAgcmV0dXJuIGlucHV0Lm1hcCgoZGF0YSkgPT4ge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIGFkZHJlc3M6IGRhdGEuYWRkcmVzcy50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIHNoYXJlOiBkYXRhLnNoYXJlLFxuICAgICAgICAgIHZlcmlmaWVkOiBmYWxzZSxcbiAgICAgICAgfTtcbiAgICAgIH0pO1xuICAgIH07XG5cbiAgICBleHBvcnQgY29uc3QgaW50b0NvbXByZXNzZWROZnRJbmZyYSA9IChcbiAgICAgIGlucHV0OiBPcHRpb248SW5wdXRDcmVhdG9yc1tdPiB8IHVuZGVmaW5lZCxcbiAgICApOiBJbnRlcm5hbENyZWF0b3JzW10gPT4ge1xuICAgICAgaWYgKCFpbnB1dCkge1xuICAgICAgICByZXR1cm4gW107XG4gICAgICB9XG4gICAgICByZXR1cm4gaW5wdXQhLm1hcCgoZGF0YSkgPT4ge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIGFkZHJlc3M6IGRhdGEuYWRkcmVzcy50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIHNoYXJlOiBkYXRhLnNoYXJlLFxuICAgICAgICAgIHZlcmlmaWVkOiBmYWxzZSxcbiAgICAgICAgfTtcbiAgICAgIH0pO1xuICAgIH07XG5cbiAgICBleHBvcnQgY29uc3QgaW50b1VzZXIgPSAoXG4gICAgICBvdXRwdXQ6IE9wdGlvbjxJbnRlcm5hbENyZWF0b3JzW10+LFxuICAgICk6IENyZWF0b3JzW10gfCB1bmRlZmluZWQgPT4ge1xuICAgICAgaWYgKCFvdXRwdXQpIHtcbiAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG91dHB1dC5tYXAoKGRh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dHJpbmc7XG4gICAgICAgIGlmICh0b2tlbkFtb3VudCA9PT0gJzEnKSB7XG4gICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBNZXRhZGF0YS5mcm9tQWNjb3VudEFkZHJlc3MoXG4gICAgICAgICAgY29ubmVjdGlvbixcbiAgICAgICAgICBBY2NvdW50LlBkYS5nZXRNZXRhZGF0YShtaW50KSxcbiAgICAgICAgKVxuICAgICAgICAgIC50aGVuKGFzeW5jIChtZXRhZGF0YSkgPT4ge1xuICAgICAgICAgICAgLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLWV4cGxpY2l0LWFueSAqL1xuICAgICAgICAgICAgcmV0dXJuIGZldGNoUmV0cnkobWV0YWRhdGEuZGF0YS51cmkpLnRoZW4oKGpzb246IGFueSkgPT4ge1xuICAgICAgICAgICAgICByZXR1cm4gY29udmVydGVyKG1ldGFkYXRhLCBqc29uLCB0b2tlbkFtb3VudCk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICB9KVxuICAgICAgICAgIC5jYXRjaCgoZXJyKSA9PiBkZWJ1Z0xvZygnIyBbRmV0Y2ggZXJyb3JdJywgZXJyKSk7XG4gICAgICB9KTtcblxuICAgICAgY29uc3QgZmlsdGVycyA9IChhd2FpdCBQcm9taXNlLmFsbChkYXRhcykpLmZpbHRlcihcbiAgICAgICAgKGRhdGEpID0+IGRhdGEgIT09IHVuZGVmaW5lZCxcbiAgICAgICk7XG4gICAgICByZXR1cm4gZmlsdGVycyBhcyBUb2tlbk1ldGFkYXRhW107XG4gICAgfSk7XG4gIH07XG5cbiAgLyoqXG4gICAqIEZldGNoIG1pbnRlZCBtZXRhZGF0YSBieSBtaW50IGFkZHJlc3NcbiAgICpcbiAgICogQHBhcmFtIHtQdWJrZXl9IG1pbnRcbiAgICogQHJldHVybiBQcm9taXNlPFJlc3VsdDxVc2VyU2lkZU91dHB1dC5Ub2tlbk1ldGFkYXRhLCB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aWdodCxcbiAgICAgICAgYmxvY2toYXNoOiBibG9ja2hhc2hPYmouYmxvY2toYXNoLFxuICAgICAgICBmZWVQYXllcjogZmVlUGF5ZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgIH0pO1xuXG4gICAgICAvLyByZXR1cm4gYXNzb2NpYXRlZCB0b2tlbiBhY2NvdW50XG4gICAgICBpZiAoIWRlc3RUb2tlbi5pbnN0KSB7XG4gICAgICAgIGluc3QyID0gY3JlYXRlVHJhbnNmZXJDaGVja2VkSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgc291cmNlVG9rZW4udG9rZW5BY2NvdW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGRlc3RUb2tlbi50b2tlbkFjY291bnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgICBDYWxjdWxhdG9yLmNhbGN1bGF0ZUFtb3VudChhbW91bnQsIG1pbnREZWNpbWFsKSxcbiAgICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICAgICBbb3duZXIudG9LZXlwYWlyKCldLFxuICAgICAgICApO1xuICAgICAgICB0eC5hZGQoaW5zdDIpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgLy8gcmV0dXJuIGluc3RydWN0aW9uIGFuZCB1bmRlY2lkZWQgYXNzb2NpYXRlZCB0b2tlbiBhY2NvdW50XG4gICAgICAgIGluc3QyID0gY3JlYXRlVHJhbnNmZXJDaGVja2VkSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgc291cmNlVG9rZW4udG9rZW5BY2NvdW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGRlc3RUb2tlbi50b2tlbkFjY291bnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgICBDYWxjdWxhdG9yLm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AgIENhbGN1bGF0ZS5jYWxjdWxhdGVBbW91bnQodG90YWxBbW91bnQsIG1pbnREZWNpbWFsKSxcbiAgICAgICAgbWludERlY2ltYWwsXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUNyZWF0ZU1ldGFkYXRhQWNjb3VudFYzSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHtcbiAgICAgICAgICBtZXRhZGF0YTogbWV0YWRhdGFQZGEsXG4gICAgICAgICAgbWludCxcbiAgICAgICAgICBtaW50QXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBwYXllcjogZmVlUGF5ZXIsXG4gICAgICAgICAgdXBkYXRlQXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgIGNyZWF0ZU1ldGFkYXRhQWNjb3VudEFyZ3NWMzoge1xuICAgICAgICAgICAgZGF0YTogdG9rZW5NZXRhZGF0YSxcbiAgICAgICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICAgICAgIGNvbGxlY3Rpb25EZXRhaWxzOiBudWxsLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICApLFxuICAgICk7XG4gICAgcmV0dXJuIGluc3RydWN0aW9ucztcbiAgfTtcblxuICAvKipcbiAgICogU1BMLVRPS0VOIG1pbnRcbiAgICpcbiAgICogQHBhcmFtIHtTZWNyZXR9IG93bmVyICAgICAgLy8gdG9rZW4gb3duZXIgU2VjcmV0XG4gICAqIEBwYXJhbSB7bnVtYmVyfSB0b3RhbEFtb3VudCAvLyB0b3RhbCBudW1iZXJcbiAgICogQHBhcmFtIHtudW1iZXJ9IG1pbnREZWNpbWFsIC8vIHRva2VuIGRlY2ltYWxcbiAgICogQHBhcmFtIHtJbnB1dFRva2VuTWV0YWRhdGF9IGlucHV0ICAgICAgIC8vIHRva2VuIG1ldGFkYXRhXG4gICAqIEBwYXJhbSB7UGFydGlhbDxNa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kLnZhbHVlO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgdGhyb3cgRXJyb3IoYE11c3Qgc2V0IGZpbGVQYXRoJyBvciAndXJpJ2ApO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBpc011dGFibGUgPSB0cnVlO1xuXG4gICAgICBjb25zdCBkYXRhdjIgPSBDb252ZXJ0ZXIuVG9rZW5NZXRhZGF0YS5pbnRvSW5mcmEoXG4gICAgICAgIGlucHV0LFxuICAgICAgICB1cmksXG4gICAgICAgIHNlbGxlckZlZUJhc2lzUG9pbnRzLFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgZGF0YXYyOiAnLCBkYXRhdjIpO1xuICAgICAgZGVidWdMb2coJyMgdXBsb2FkIGNvbnRlbnQgdXJsOiAnLCB1cmkpO1xuXG4gICAgICBjb25zdCBtaW50ID0gQWNjb3VudC5LZXlwYWlyLmNyZWF0ZSgpO1xuICAgICAgY29uc3QgaW5zdHMgPSBhd2FpdCBjcmVhdGVNaW50KFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICB0b3RhbEFtb3VudCxcbiAgICAgICAgbWludERlY2ltYWwsXG4gICAgICAgIGRhdGF2MixcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICBpc011dGFibGUsXG4gICAgICApO1xuXG4gICAgICAvLyBmcmVlemVBdXRob3JpdHlcbiAgICAgIGlmIChmcmVlemVBdXRob3JpdHkpIHtcbiAgICAgICAgaW5zdHMucHVzaChcbiAgICAgICAgICBjcmVhdGVGcmVlemVBdXRob3JpdHkoXG4gICAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgICAgIGZyZWV6ZUF1dGhvcml0eS50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5c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IEFjY291bnQge1xuICBleHBvcnQgbmFtZXNwYWNlIFBkYSB7XG4gICAgZXhwb3J0IGNvbnN0IGdldE1ldGFkYXRhID0gKGFkZHJlc3M6IFB1YmtleSk6IFB1YmxpY0tleSA9PiB7XG4gICAgICBjb25zdCBbcHVibGljS2V5XSA9IFB1YmxpY0tleS5maW5kUHJvZ3JhbUFkZHJlc3NTeW5jKFxuICAgICAgICBbXG4gICAgICAgICAgQnVmZmVyLmZyb20oJ21ldGFkYXRhJyksXG4gICAgICAgICAgUFJPR1JBTV9JRC50b0J1ZmZlcigpLFxuICAgICAgICAgIGFkZHJlc3MudG9QdWJsaWNLZXkoKS50b0J1ZmZlcigpLFxuICAgICAgICBdLFxuICAgICAgICBQUk9HUkFNX0lELFxuICAgICAgKTtcbiAgICAgIHJldHVybiBwdWJsaWNLZXk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBnZXRNYXN0ZXJFZGl0aW9uID0gKGFkZHJlc3M6IFB1YmtleSk6IFB1YmxpY0tleSA9PiB7XG4gICAgICBjb25zdCBbcHVibGljS2V5XSA9IFB1YmxpY0tleS5maW5kUHJvZ3JhbUFkZHJlc3NTeW5jKFxuICAgICAgICBbXG4gICAgICAgICAgQnVmZmVyLmZyb20oJ21ldGFkYXRhJyksXG4gICAgICAgICAgUFJPR1JBTV9JRC50b0J1ZmZlcigpLFxuICAgICAgICAgIGFkZHJlc3MudG9QdWJsaWNLZXkoKS50b0J1ZmZlcigpLFxuICAgICAgICAgIEJ1ZmZlci5mcm9tKCdlZGl0aW9uJyksXG4gICAgICAgIF0sXG4gICAgICAgIFBST0dSQU1fSUQsXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGdldFRyZWVBdXRob3JpdHkgPSAoYWRkcmVzczogUHVia2V5KTogUHVibGljS2V5ID0+IHtcbiAgICAgIGNvbnN0IFtwdWJsaWNLZXldID0gUHVibGljS2V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GFwbGV4IHwgUGlja01ldGFwbGV4LFxuICA+KFxuICAgIG1ldGFkYXRhOiBULFxuICApOiBSZXN1bHQ8c3RyaW5nLCBWYWxpZGF0b3JFcnJvcj4gPT4ge1xuICAgIHJldHVybiBUcnkoKCkgPT4ge1xuICAgICAgY29uc3Qga2V5cyA9IE9iamVjdC5rZXlzKG1ldGFkYXRhKTtcbiAgICAgIGNvbnN0IHJlc3VsdHM6IERldGFpbHNbXSA9IFtdO1xuICAgICAga2V5cy5tYXAoKGtleSkgPT4ge1xuICAgICAgICBsZXQgcmVzITogUmVzdWx0PHN0cmluZywgVmFsaWRhdG9yRXJyb3I+O1xuICAgICAgICBzd2l0Y2ggKGtleSkge1xuICAgICAgICAgIGNhc2UgJ2ltYWdlJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuaW1hZ2UpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNJbWFnZVVybChtZXRhZGF0YS5pbWFnZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdyb3lhbHR5JzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEucm95YWx0eSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1JveWFsdHkobWV0YWRhdGEucm95YWx0eSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYn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G1pbnQgPSBkLmFjY291bnQuZGF0YS5wYXJzZWQuaW5mby5taW50IGFzIFB1YmtleTtcbiAgICAgICAgY29uc3QgdG9rZW5BbW91bnQgPSBkLmFjY291bnQuZGF0YS5wYXJzZWQuaW5mby50b2tlbkFtb3VudFxuICAgICAgICAgIC5hbW91bnQgYXMgc3RyaW5nO1xuICAgICAgICBpZiAodG9rZW5BbW91bnQgPT09ICcxJykge1xuICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gTWV0YWRhdGEuZnJvbUFjY291bnRBZGRyZXNzKFxuICAgICAgICAgIGNvbm5lY3Rpb24sXG4gICAgICAgICAgQWNjb3VudC5QZGEuZ2V0TWV0YWRhdGEobWludCksXG4gICAgICAgIClcbiAgICAgICAgICAudGhlbihhc3luYyAobWV0YWRhdGEpID0+IHtcbiAgICAgICAgICAgIC8qIGVzbGludC1kaXNhYmxlIEB0eXBlc2NyaXB0LWVzbGludC9uby1leHBsaWNpdC1hbnkgKi9cbiAgICAgICAgICAgIHJldHVybiBmZXRjaFJldHJ5KG1ldGFkYXRhLmRhdGEudXJpKS50aGVuKChqc29uOiBhbnkpID0+IHtcbiAgICAgICAgICAgICAgcmV0dXJuIGNvbnZlcnRlcihtZXRhZGF0YSwganNvbiwgdG9rZW5BbW91bnQpO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfSlcbiAgICAgICAgICAuY2F0Y2goKGVycikgPT4gZGVidWdMb2coJyMgW0ZldGNoIGVycm9yXScsIGVycikpO1xuICAgICAgfSk7XG5cbiAgICAgIGNvbnN0IGZpbHRlcnMgPSAoYXdhaXQgUHJvbWlzZS5hbGwoZGF0YXMpKS5maWx0ZXIoXG4gICAgICAgIChkYXRhKSA9PiBkYXRhICE9PSB1bmRlZmluZWQsXG4gICAgICApO1xuICAgICAgcmV0dXJuIGZpbHRlcnMgYXMgVG9rZW5NZXRhZGF0YVtdO1xuICAgIH0pO1xuICB9O1xuXG4gIC8qKlxuICA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dyYW0uY3JlYXRlQWNjb3VudCh7XG4gICAgICAgIGZyb21QdWJrZXk6IGZlZVBheWVyLFxuICAgICAgICBuZXdBY2NvdW50UHVia2V5OiBtaW50LFxuICAgICAgICBzcGFjZTogTUlOVF9TSVpFLFxuICAgICAgICBsYW1wb3J0czogbGFtcG9ydHMsXG4gICAgICAgIHByb2dyYW1JZDogVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgIH0pLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUluaXRpYWxpemVNaW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgIG1pbnQsXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICBvd25lcixcbiAgICAgICAgb3duZXIsXG4gICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgZmVlUGF5ZXIsXG4gICAgICAgIHRva2VuQXNzb2NpYXRlZCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIG1pbnQsXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZU1pbnRUb0NoZWNrZWRJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgdG9rZW5Bc3NvY2lhdGVkLFxuICAgICAgICBvd25lcixcbiAgICAgICAgQ2FsY3VsYXRlLmNhbGN1bGF0ZUFtb3VudCh0b3RhbEFtb3VudCwgbWludERlY2ltYWwpLFxuICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlQ3JlYXRlTWV0YWRhdGFBY2NvdW50VjNJbnN0cnVjdGlvbihcbiAgICAgICAge1xuICAgICAgICAgIG1ldGFkYXRhOiBtZXRhZGF0YVBkYSxcbiAgICAgICAgICBtaW50LFxuICAgICAgICAgIG1pbnRBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICAgIHBheWVyOiBmZWVQYXllcixcbiAgICAgICAgICB1cGRhdGVBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICB9LFxuICAgICAgICB7XG4gICAgICAgICAgY3JlYXRlTWV0YWRhdGFBY2NvdW50QXJnc1YzOiB7XG4gICAgICAgICAgICBkYXRhOiB0b2tlbk1ldGFkYXRhLFxuICAgICAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgICAgICAgY29sbGVjdGlvbkRldGFpbHM6IG51bGwsXG4gICAgICAgICAgfSxcbiAgICAgICAgfSxcbiAgICAgICksXG4gICAgKTtcbiAgICByZXR1cm4gaW5zdHJ1Y3Rpb25zO1xuICB9O1xuXG4gIC8qKlxuICAgKiBTUEwtVE9LRU4gbWludFxuICAgKlxuICAgKiBAcGFyYW0ge1NlY3JldH0gb3duZXIgICAgICAvLyB0b2tlbiBvd25lciBTZWNyZXRcbiAgICogQHBhcmFtIHtudW1iZXJ9IHRvdGFsQW1vdW50IC8vIHRvdGFsIG51bWJlclxuICAgKiBAcGFyYW0ge251bWJlcn0gbWludERlY2ltYWwgLy8gdG9rZW4gZGVjaW1hbFxuICAgKiBAcGFyYW0ge0lucHV0VG9rZW5NZXRhZGF0YX0gaW5wdXQgICAgICAgLy8gdG9rZW4gbWV0YWRhdGFcbiAgICogQHBhcmFtIHtQYXJ0aWFsPE1pbnRPcHRpb25zPn0gb3B0aW9ucyAgIC8vIG9wdGlvbnNcbiAgICogQHJldHVybiBQcm9taXNlPFJlc3VsdDxNaW50SW5zdHJ1Y3Rpb24sIEVycm9yPj5cbiAgICovXG4gIGV4cG9ydCBjb25zdCBtaW50ID0gYXN5bmMgKFxuICAgIG93bmVyOiBTZWNyZXQsXG4gICAgdG90YWxBbW91bnQ6IG51bWJlcixcbiAg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YShcbiAgICAgICAgaW5wdXQsXG4gICAgICAgIHVyaSxcbiAgICAgICAgc2VsbGVyRmVlQmFzaXNQb2ludHMsXG4gICAgICApO1xuXG4gICAgICBkZWJ1Z0xvZygnIyBkYXRhdjI6ICcsIGRhdGF2Mik7XG4gICAgICBkZWJ1Z0xvZygnIyB1cGxvYWQgY29udGVudCB1cmw6ICcsIHVyaSk7XG5cbiAgICAgIGNvbnN0IG1pbnQgPSBBY2NvdW50LktleXBhaXIuY3JlYXRlKCk7XG4gICAgICBjb25zdCBpbnN0cyA9IGF3YWl0IGNyZWF0ZU1pbnQoXG4gICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgIHRvdGFsQW1vdW50LFxuICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICAgZGF0YXYyLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICk7XG5cbiAgICAgIC8vIGZyZWV6ZUF1dGhvcml0eVxuICAgICAgaWYgKGZyZWV6ZUF1dGhvcml0eSkge1xuICAgICAgICBpbnN0cy5wdXNoKFxuICAgICAgICAgIGNyZWF0ZUZyZWV6ZUF1dGhvcml0eShcbiAgICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICAgICAgZnJlZXplQXV0aG9yaXR5LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuTWludChcbiAgICAgICAgaW5zdHMsXG4gICAgICAgIFtvd25lci50b0tleXBhaXIoKSwgbWludC50b0tleXBhaXIoKV0sXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICBtaW50LnB1YmtleSxcbiAgICA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yZSwgRXJyb3I+PiA9PiB7XG4gICAgcmV0dXJuIFRyeShhc3luYyAoKSA9PiB7XG4gICAgICBjb25zdCBwYXllciA9IG9wdGlvbnMuZmVlUGF5ZXIgPyBvcHRpb25zLmZlZVBheWVyIDogb3duZXJPck11bHRpc2lnWzBdO1xuICAgICAgY29uc3QgcGF5ZXJQdWJrZXkgPSBuZXcgQWNjb3VudC5LZXlwYWlyKHsgc2VjcmV0OiBwYXllciB9KTtcbiAgICAgIGNvbnN0IGtleXBhaXJzID0gb3duZXJPck11bHRpc2lnLm1hcCgocykgPT4gcy50b0tleXBhaXIoKSk7XG4gICAgICBjb25zdCBzb3VyY2VUb2tlbiA9IGF3YWl0IEFjY291bnQuQXNzb2NpYXRlZC5tYWtlT3JDcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgb3duZXIudG9TdHJpbmcoKSxcbiAgICAgICAgcGF5ZXJQdWJrZXkucHVia2V5LFxuICAgICAgKTtcblxuICAgICAgY29uc3QgZGVzdFRva2VuID0gYXdhaXQgQWNjb3VudC5Bc3NvY2lhdGVkLm1ha2VPckNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICBtaW50LFxuICAgICAgICBkZXN0LFxuICAgICAgICBwYXllclB1YmtleS5wdWJrZXksXG4gICAgICApO1xuXG4gICAgICBjb25zdCBpbnN0ID0gY3JlYXRlVHJhbnNmZXJDaGVja2VkSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHNvdXJjZVRva2VuLnRva2VuQWNjb3VudC50b1B1YmxpY0tleSgpLFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIGRlc3RUb2tlbi50b2tlbkFjY291bnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgQ2FsY3VsYXRvci5jYWxjdWxhdGVBbW91bnQoYW1vdW50LCBtaW50RGVjaW1hbCksXG4gICAgICAgIG1pbnREZW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ICJBY2NvdW50IiwgImdldEFzc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jIiwgIlNwbFRva2VuIiwgIkFjY291bnQiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlRyYW5zYWN0aW9uIiwgIlNwbFRva2VuIiwgIkFjY291bnQiLCAiVHJhbnNhY3Rpb24iLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgImNyZWF0ZU1pbnRUb0NoZWNrZWRJbnN0cnVjdGlvbiIsICJnZXRBc3NvY2lhdGVkVG9rZW5BZGRyZXNzU3luYyIsICJUT0tFTl9QUk9HUkFNX0lEIiwgIlByb3ZlbmFuY2VMYXllciIsICJ1cGxvYWRGaWxlIiwgIkFyd2VhdmUiLCAiTmZ0U3RvcmFnZSIsICJTdG9yYWdlIiwgIlNwbFRva2VuIiwgIm1pbnQiLCAiQWNjb3VudCIsICJnZXRBc3NvY2lhdGVkVG9rZW5BZGRyZXNzU3luYyIsICJUT0tFTl9QUk9HUkFNX0lEIiwgImNyZWF0ZU1pbnRUb0NoZWNrZWRJbnN0cnVjdGlvbiIsICJDb252ZXJ0ZXIiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgImdldEFzc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jIiwgIlNwbFRva2VuIiwgIkFjY291bnQiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgImNyZWF0ZVRyYW5zZmVyQ2hlY2tlZEluc3RydWN0aW9uIiwgIlNwbFRva2VuIiwgIkFjY291bnQiLCAiY3JlYXRlVHJhbnNmZXJDaGVja2VkSW5zdHJ1Y3Rpb24iLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlNwbFRva2VuIl0KfQo= \ No newline at end of file diff --git a/packages/suite-utils/dist/exports-8dfab8bf.d.ts b/packages/suite-utils/dist/exports-248b9ab6.d.ts similarity index 92% rename from packages/suite-utils/dist/exports-8dfab8bf.d.ts rename to packages/suite-utils/dist/exports-248b9ab6.d.ts index ba9bf6df5..34cd7f4f1 100644 --- a/packages/suite-utils/dist/exports-8dfab8bf.d.ts +++ b/packages/suite-utils/dist/exports-248b9ab6.d.ts @@ -1,5 +1,5 @@ import * as _solana_web3_js from '@solana/web3.js'; -import { TransactionSignature, TransactionInstruction, PublicKey, Keypair, Connection, Commitment } from '@solana/web3.js'; +import { TransactionSignature, PublicKey, Keypair, Connection, Commitment } from '@solana/web3.js'; import BN from 'bn.js'; import { DataV2 } from '@metaplex-foundation/mpl-token-metadata'; @@ -308,43 +308,6 @@ declare const convertTimestampToDateTime: (created_at: number | undefined) => Da */ declare const unixTimestamp: () => number; -/** - * 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 - */ -declare namespace Account$3 { - namespace Associated { - /** - * Retry function if create new token accouint - * - * @param {Pubkey} mint - * @param {Pubkey} owner - * @param {Secret} feePayer - * @returns Promise - */ - const retryGetOrCreate: (mint: Pubkey, owner: Pubkey, feePayer: Secret) => Promise; - /** - * [Main logic]Get Associated token Account. - * if not created, create new token accouint - * - * @param {Pubkey} mint - * @param {Pubkey} owner - * @param {Pubkey} feePayer - * @returns Promise - */ - const makeOrCreateInstruction: (mint: Pubkey, owner: Pubkey, feePayer?: Pubkey, allowOwnerOffCurve?: boolean) => Promise<{ - tokenAccount: string; - inst: TransactionInstruction | undefined; - }>; - } -} - declare namespace Account$2 { class Keypair { secret: Secret; @@ -375,7 +338,6 @@ declare namespace Account$1 { declare const Account: { Pda: typeof Account$1.Pda; Keypair: typeof Account$2.Keypair; - Associated: typeof Account$3.Associated; }; declare namespace Node { diff --git a/packages/suite-utils/dist/exports.d.mts b/packages/suite-utils/dist/exports.d.mts index b37d67968..bc8cb4133 100644 --- a/packages/suite-utils/dist/exports.d.mts +++ b/packages/suite-utils/dist/exports.d.mts @@ -1,4 +1,4 @@ -export { A as Account, E as Explorer, g as ExplorerOptions, K as KeypairAccount, N as Node, O as OwnerInfo, P as Pubkey, S as Secret, T as Try, V as Validator, f as ValidatorError, b as bufferToArray, e as convertTimestampToDateTime, d as debugLog, i as isBrowser, a as isNode, c as isPromise, o as overwriteObject, s as sleep, u as unixTimestamp } from './exports-8dfab8bf.js'; +export { A as Account, E as Explorer, g as ExplorerOptions, K as KeypairAccount, N as Node, O as OwnerInfo, P as Pubkey, S as Secret, T as Try, V as Validator, f as ValidatorError, b as bufferToArray, e as convertTimestampToDateTime, d as debugLog, i as isBrowser, a as isNode, c as isPromise, o as overwriteObject, s as sleep, u as unixTimestamp } from './exports-248b9ab6.js'; import '@solana/web3.js'; import 'bn.js'; import '@metaplex-foundation/mpl-token-metadata'; diff --git a/packages/suite-utils/dist/exports.d.ts b/packages/suite-utils/dist/exports.d.ts index b37d67968..bc8cb4133 100644 --- a/packages/suite-utils/dist/exports.d.ts +++ b/packages/suite-utils/dist/exports.d.ts @@ -1,4 +1,4 @@ -export { A as Account, E as Explorer, g as ExplorerOptions, K as KeypairAccount, N as Node, O as OwnerInfo, P as Pubkey, S as Secret, T as Try, V as Validator, f as ValidatorError, b as bufferToArray, e as convertTimestampToDateTime, d as debugLog, i as isBrowser, a as isNode, c as isPromise, o as overwriteObject, s as sleep, u as unixTimestamp } from './exports-8dfab8bf.js'; +export { A as Account, E as Explorer, g as ExplorerOptions, K as KeypairAccount, N as Node, O as OwnerInfo, P as Pubkey, S as Secret, T as Try, V as Validator, f as ValidatorError, b as bufferToArray, e as convertTimestampToDateTime, d as debugLog, i as isBrowser, a as isNode, c as isPromise, o as overwriteObject, s as sleep, u as unixTimestamp } from './exports-248b9ab6.js'; import '@solana/web3.js'; import 'bn.js'; import '@metaplex-foundation/mpl-token-metadata'; diff --git a/packages/suite-utils/dist/exports.js b/packages/suite-utils/dist/exports.js index 060b74b8e..8af7d5d6f 100644 --- a/packages/suite-utils/dist/exports.js +++ b/packages/suite-utils/dist/exports.js @@ -30,7 +30,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru // src/exports.ts var exports_exports = {}; __export(exports_exports, { - Account: () => Account4, + Account: () => Account3, Explorer: () => Explorer, Node: () => Node, Try: () => Try, @@ -223,14 +223,11 @@ var Explorer = /* @__PURE__ */ ((Explorer2) => { // ../global/src/index.ts var import_web34 = require("@solana/web3.js"); -// ../account/src/associated.ts -var import_spl_token = require("@solana/spl-token"); - // ../account/src/keypair.ts var import_web32 = require("@solana/web3.js"); var import_bs58 = __toESM(require("bs58")); var Account; -((Account5) => { +((Account4) => { class Keypair4 { secret; pubkey; @@ -266,111 +263,16 @@ var Account; }); }; } - Account5.Keypair = Keypair4; + Account4.Keypair = Keypair4; })(Account || (Account = {})); -// ../account/src/associated.ts -var Account2; -((Account5) => { - let Associated; - ((Associated2) => { - const RETRY_OVER_LIMIT = 10; - const RETRY_SLEEP_TIME = 3; - const get = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const res = await (0, Associated2.makeOrCreateInstruction)( - mint, - owner, - new Account.Keypair({ secret: feePayer }).pubkey, - allowOwnerOffCurve - ); - if (!res.inst) { - return res.tokenAccount; - } - return new TransactionBuilder.Common( - [res.inst], - [], - feePayer.toKeypair(), - res.tokenAccount - ); - }; - Associated2.retryGetOrCreate = async (mint, owner, feePayer) => { - let counter = 1; - while (counter < RETRY_OVER_LIMIT) { - try { - const inst = await get(mint, owner, feePayer, true); - if (inst && typeof inst === "string") { - debugLog("# associatedTokenAccount: ", inst); - return inst; - } else if (inst instanceof TransactionBuilder.Common) { - (await inst.submit()).map( - async (ok) => { - await Node.confirmedSig(ok); - return inst.data; - }, - (err) => { - debugLog("# Error submit retryGetOrCreate: ", err); - throw err; - } - ); - } - } catch (e) { - debugLog(`# retry: ${counter} create token account: `, e); - debugLog(`# mint: ${mint}, owner: ${owner}, feePayer: ${feePayer}`); - } - await sleep(RETRY_SLEEP_TIME); - counter++; - } - throw Error(`retry action is over limit ${RETRY_OVER_LIMIT}`); - }; - Associated2.makeOrCreateInstruction = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const associatedTokenAccount = (0, import_spl_token.getAssociatedTokenAddressSync)( - mint.toPublicKey(), - owner.toPublicKey(), - allowOwnerOffCurve, - import_spl_token.TOKEN_PROGRAM_ID, - import_spl_token.ASSOCIATED_TOKEN_PROGRAM_ID - ); - debugLog("# associatedTokenAccount: ", associatedTokenAccount.toString()); - try { - await (0, import_spl_token.getAccount)( - Node.getConnection(), - associatedTokenAccount, - Node.getConnection().commitment, - import_spl_token.TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst: void 0 - }; - } catch (error) { - if (!(error instanceof import_spl_token.TokenAccountNotFoundError) && !(error instanceof import_spl_token.TokenInvalidAccountOwnerError)) { - throw Error("Unexpected error"); - } - const payer = !feePayer ? owner : feePayer; - const inst = (0, import_spl_token.createAssociatedTokenAccountInstruction)( - payer.toPublicKey(), - associatedTokenAccount, - owner.toPublicKey(), - mint.toPublicKey(), - import_spl_token.TOKEN_PROGRAM_ID, - import_spl_token.ASSOCIATED_TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst - }; - } - }; - })(Associated = Account5.Associated || (Account5.Associated = {})); -})(Account2 || (Account2 = {})); - // ../account/src/pda.ts var import_web33 = require("@solana/web3.js"); var import_mpl_token_metadata = require("@metaplex-foundation/mpl-token-metadata"); var import_mpl_bubblegum = require("@metaplex-foundation/mpl-bubblegum"); var import_bn = __toESM(require("bn.js")); -var Account3; -((Account5) => { +var Account2; +((Account4) => { let Pda; ((Pda2) => { Pda2.getMetadata = (address) => { @@ -422,14 +324,13 @@ var Account3; ); return assetId.toString(); }; - })(Pda = Account5.Pda || (Account5.Pda = {})); -})(Account3 || (Account3 = {})); + })(Pda = Account4.Pda || (Account4.Pda = {})); +})(Account2 || (Account2 = {})); // ../account/src/index.ts -var Account4 = { - ...Account2, +var Account3 = { ...Account, - ...Account3 + ...Account2 }; // ../global/src/index.ts @@ -460,7 +361,7 @@ String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, op } return url; } - if (Account4.Keypair.isPubkey(addressOrSignature)) { + if (Account3.Keypair.isPubkey(addressOrSignature)) { if (explorer === "solanafm" /* SolanaFM */) { url = `${Constants.EXPLORER_SOLANAFM_URL}/address/${addressOrSignature}?cluster=${cluster}`; } else if (explorer === "xray" /* Xray */) { @@ -480,13 +381,13 @@ String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, op return url; }; String.prototype.toPublicKey = function() { - if (!Account4.Keypair.isPubkey(this.toString())) { + if (!Account3.Keypair.isPubkey(this.toString())) { throw Error(`No match KeyPair.PubKey: ${this.toString()}`); } return new import_web34.PublicKey(this.toString()); }; String.prototype.toKeypair = function() { - if (!Account4.Keypair.isSecret(this.toString())) { + if (!Account3.Keypair.isSecret(this.toString())) { throw Error(`No match KeyPair.Secret: ${this.toString()}`); } const decoded = import_bs582.default.decode(this.toString()); @@ -567,7 +468,7 @@ var Node; // ../transaction-builder/src/common.ts var import_web36 = require("@solana/web3.js"); var MAX_RETRIES = 3; -var TransactionBuilder2; +var TransactionBuilder; ((TransactionBuilder7) => { class Common2 { static MAX_TRANSACTION_SIZE = 1232; @@ -609,10 +510,10 @@ var TransactionBuilder2; }; } TransactionBuilder7.Common = Common2; -})(TransactionBuilder2 || (TransactionBuilder2 = {})); +})(TransactionBuilder || (TransactionBuilder = {})); // ../transaction-builder/src/batch.ts -var TransactionBuilder3; +var TransactionBuilder2; ((TransactionBuilder7) => { class Batch { submit = async (arr) => { @@ -654,11 +555,11 @@ var TransactionBuilder3; }; } TransactionBuilder7.Batch = Batch; -})(TransactionBuilder3 || (TransactionBuilder3 = {})); +})(TransactionBuilder2 || (TransactionBuilder2 = {})); // ../transaction-builder/src/mint.ts var import_web38 = require("@solana/web3.js"); -var TransactionBuilder4; +var TransactionBuilder3; ((TransactionBuilder7) => { class Mint { instructions; @@ -703,11 +604,11 @@ var TransactionBuilder4; }; } TransactionBuilder7.Mint = Mint; -})(TransactionBuilder4 || (TransactionBuilder4 = {})); +})(TransactionBuilder3 || (TransactionBuilder3 = {})); // ../transaction-builder/src/partial-sign.ts var import_web39 = require("@solana/web3.js"); -var TransactionBuilder5; +var TransactionBuilder4; ((TransactionBuilder7) => { class PartialSign { hexInstruction; @@ -738,10 +639,10 @@ var TransactionBuilder5; }; } TransactionBuilder7.PartialSign = PartialSign; -})(TransactionBuilder5 || (TransactionBuilder5 = {})); +})(TransactionBuilder4 || (TransactionBuilder4 = {})); // ../transaction-builder/src/calculate-txsize.ts -var TransactionBuilder6; +var TransactionBuilder5; ((TransactionBuilder7) => { const LOW_VALUE = 127; const HIGH_VALUE = 16383; @@ -775,15 +676,15 @@ var TransactionBuilder6; TransactionBuilder7.isOverTransactionSize = (transaction, feePayer) => { return (0, TransactionBuilder7.calculateTxSize)(transaction, feePayer) > MAX_TRANSACTION_SIZE; }; -})(TransactionBuilder6 || (TransactionBuilder6 = {})); +})(TransactionBuilder5 || (TransactionBuilder5 = {})); // ../transaction-builder/src/index.ts -var TransactionBuilder = { - ...TransactionBuilder3, - ...TransactionBuilder6, - ...TransactionBuilder4, +var TransactionBuilder6 = { ...TransactionBuilder2, - ...TransactionBuilder5 + ...TransactionBuilder5, + ...TransactionBuilder3, + ...TransactionBuilder, + ...TransactionBuilder4 }; // src/result.ts @@ -871,7 +772,7 @@ Array.prototype.submit = async function(feePayer) { } } debugLog("# Result batch submit: ", instructions); - return new TransactionBuilder.Batch().submit(instructions); + return new TransactionBuilder6.Batch().submit(instructions); } }; var InternalOk = class extends AbstractResult { @@ -1578,4 +1479,4 @@ var ValidatorError = class extends Error { sleep, unixTimestamp }); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2V4cG9ydHMudHMiLCAiLi4vc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9iYXRjaC50cyIsICIuLi8uLi90eXBlcy9z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3QgZ2V0ID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyOiBTZWNyZXQsXG4gICAgICBhbGxvd093bmVyT2ZmQ3VydmUgPSBmYWxzZSxcbiAgICApOiBQcm9taXNlPHN0cmluZyB8IENvbW1vblN0cnVjdHVyZTxQdWJrZXk+PiA9PiB7XG4gICAgICBjb25zdCByZXMgPSBhd2FpdCBtYWtlT3JDcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIG5ldyBLZXlwYWlyLktleXBhaXIoeyBzZWNyZXQ6IGZlZVBheWVyIH0pLnB1YmtleSxcbiAgICAgICAgYWxsb3dPd25lck9mZkN1cnZlLFxuICAgICAgKTtcblxuICAgICAgaWYgKCFyZXMuaW5zdCkge1xuICAgICAgICByZXR1cm4gcmVzLnRva2VuQWNjb3VudDtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uPFB1YmtleT4oXG4gICAgICAgIFtyZXMuaW5zdF0sXG4gICAgICAgIFtdLFxuICAgICAgICBmZWVQYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgcmVzLnRva2VuQWNjb3VudCEsXG4gICAgICApO1xuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiBSZXRyeSBmdW5jdGlvbiBpZiBjcmVhdGUgbmV3IHRva2VuIGFjY291aW50XG4gICAgICpcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gbWludFxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBvd25lclxuICAgICAqIEBwYXJhbSB7U2VjcmV0fSBmZWVQYXllclxuICAgICAqIEByZXR1cm5zIFByb21pc2U8c3RyaW5nPlxuICAgICAqL1xuICAgIGV4cG9ydCBjb25zdCByZXRyeUdldE9yQ3JlYXRlID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyOiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxzdHJpbmc+ID0+IHtcbiAgICAgIGxldCBjb3VudGVyID0gMTtcbiAgICAgIHdoaWxlIChjb3VudGVyIDwgUkVUUllfT1ZFUl9MSU1JVCkge1xuICAgICAgICB0cnkge1xuICAgICAgICAgIGNvbnN0IGluc3QgPSBhd2FpdCBnZXQobWludCwgb3duZXIsIGZlZVBheWVyLCB0cnVlKTtcblxuICAgICAgICAgIGlmIChpbnN0ICYmIHR5cGVvZiBpbnN0ID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgaW5zdCk7XG4gICAgICAgICAgICByZXR1cm4gaW5zdDtcbiAgICAgICAgICB9IGVsc2UgaWYgKGluc3QgaW5zdGFuY2VvZiBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uKSB7XG4gICAgICAgICAgICAoYXdhaXQgaW5zdC5zdWJtaXQoKSkubWFwKFxuICAgICAgICAgICAgICBhc3luYyAob2s6IHN0cmluZykgPT4ge1xuICAgICAgICAgICAgICAgIGF3YWl0IE5vZGUuY29uZmlybWVkU2lnKG9rKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gaW5zdC5kYXRhO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAoZXJyOiBFcnJvcikgPT4ge1xuICAgICAgICAgICAgICAgIGRlYnVnTG9nKCcjIEVycm9yIHN1Ym1pdCByZXRyeUdldE9yQ3JlYXRlOiAnLCBlcnIpO1xuICAgICAgICAgICAgICAgIHRocm93IGVycjtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgZGVidWdMb2coYCMgcmV0cnk6ICR7Y291bnRlcn0gY3JlYXRlIHRva2VuIG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W5jKFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSxcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3QsXG4gICAgICAgIH07XG4gICAgICB9XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IEtleXBhaXIgYXMgT3JpZ2luYWwsIFB1YmxpY0tleSB9IGZyb20gJ0Bzb2xhbmEvd2ViMy5qcyc7XG5pbXBvcnQgeyBQdWJrZXksIFNlY3JldCB9IGZyb20gJ34vdHlwZXMvYWNjb3VudCc7XG5pbXBvcnQgYnMgZnJvbSAnYnM1OCc7XG5cbmV4cG9ydCBuYW1lc3BhY2UgQWNjb3VudCB7XG4gIGV4cG9ydCBjbGFzcyBLZXlwYWlyIHtcbiAgICBzZWNyZXQ6IFNlY3JldDtcbiAgICBwdWJrZXk6IFB1YmtleTtcblxuICAgIGNvbnN0cnVjdG9yKHBhcmFtczogeyBwdWJrZXk/OiBQdWJrZXk7IHNlY3JldDogU2VjcmV0IH0pIHtcbiAgICAgIGlmICghcGFyYW1zLnB1YmtleSkge1xuICAgICAgICBjb25zdCBrZXlwYWlyID0gcGFyYW1zLnNlY3JldC50b0tleXBhaXIoKTtcbiAgICAgICAgdGhpcy5wdWJrZXkgPS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AgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvQ29tcHJlc3NlZE5mdEluZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IEludGVybmFsQ3JlYXRvcnNbXSA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBbXTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBpbnB1dCEubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlciA9IChcbiAgICAgIG91dHB1dDogT3B0aW9uPEludGVybmFsQ3JlYXRvcnNbXT4sXG4gICAgKTogQ3JlYXRvcnNbXSB8IHVuZGVmaW5lZCA9PiB7XG4gICAgICBpZiAoIW91dHB1dCkge1xuICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gb3V0cHV0Lm1hcCgoZGF0YSkgPT4ge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIGFkZHJlc3M6IGRhdGEuYWRkcmVzcy50b1N0cmluZygpLFxuICAgICAgICAgIHNoYXJlOiBkYXRhLnNoYXJlLFxuICAgICAgICAgIHZlcmlmaWVkOiBkYXRhLnZlcmlmaWVkLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IENvbnZlcnRlciBhcyBDb2xsZWN0aW9uIH0gZnJvbS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1xuICAgICAgICByZXR1cm4ge307XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGZpbGVzID0gYXdhaXQgUHJvbWlzZS5hbGwoXG4gICAgICAgIGlucHV0LmZpbGVzLm1hcChhc3luYyAoZmlsZSkgPT4ge1xuICAgICAgICAgIGlmICghZmlsZS5maWxlUGF0aCkge1xuICAgICAgICAgICAgcmV0dXJuIHt9O1xuICAgICAgICAgIH1cbiAgICAgICAgICBjb25zdCByZXMgPSBhd2FpdCBjYWxsYmFja0Z1bmMoZmlsZS5maWxlUGF0aCwgc3RvcmFnZVR5cGUsIGZlZVBheWVyKTtcbiAgICAgICAgICBpZiAocmVzLmlzRXJyKSB7XG4gICAgICAgICAgICB0aHJvdyBFcnJvcihyZXMuZXJyb3IubWVzc2FnZSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBvdmVyd3JpdGVPYmplY3QoZmlsZSwgW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBleGlzdHNLZXk6ICdmaWxlUGF0aCcsXG4gICAgICAgICAgICAgIHdpbGw6IHsga2V5OiAndXJpJywgdmFsdWU6IHJlcy52YWx1ZSB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICBdKTtcbiAgICAgICAgfSksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHsgLi4uaW5wdXQsIGZpbGVzIH0gYXMgUHJvcGVydGllcztcbiAgICB9O1xuICB9XG59XG4iLCAiLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLXVudXNlZC12YXJzICovXG5pbXBvcnQgeyBPcHRpb24sIFVzZXMgfSBmcm9tICd+L3R5cGVzL3JlZ3VsYXItbmZ0JztcblxuZXhwb3J0IG5hbWVzcGFjZSBDb252ZXJ0ZXIge1xuICBleHBvcnQgbmFtZXNwYWNlIFVzZXMge1xuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlclNpZGUgPSAob3V0cHV0OiBPcHRpb248VXNlcz4pOiBVc2Vz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hICYmIG1ldGFkYXRhLmltYWdlKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzSW1hZ2VVcmwobWV0YWRhdGEuaW1hZ2UpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAncm95YWx0eSc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnJveWFsdHkpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNSb3lhbHR5KG1ldGFkYXRhLnJveWFsdHkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJv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2ludHMpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJGZWVCYXNpc1BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0YWRhdGEubmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzeW1ib2wnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLnN5bWJvbCkge1xuICAgICAgICAgICAgICByZXMgPSBpc1N5bWJvbChtZXRhZGF0YS5zeW1ib2wpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHJlcyAmJiByZXMuaXNFcnIpIHtcbiAgICAgICAgICByZXN1bHRzLnB1c2goLi4ucmVzLmVycm9yLmRldGFpbHMpO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIGlmIChyZXN1bHRzLmxlbmd0aCA+IDApIHtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9XG4gICAgICAgICAgJ0NhdWdodCBpbiB0aGUgdmFsaWRhdGlvbiBlcnJvcnMuIHNlZSBpbmZvcm1hdGlvbiBlLmc6IGVycjxWYWxpZGF0b3JFcnJvcj4uZGV0YWlscyc7XG4g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lciIsICJOZnQiLCAiQ29udmVydGVyIiwgIk1lbW8iLCAiQ29udmVydGVyIiwgIk1pbnQiLCAiQ29udmVydGVyIiwgIlJlZ3VsYXJOZnRNZXRhZGF0YSIsICJDb252ZXJ0ZXIiLCAiUHJvcGVydGllcyIsICJDb252ZXJ0ZXIiLCAiVXNlcyIsICJDb252ZXJ0ZXIiLCAiVG9rZW5NZXRhZGF0YSIsICJDb252ZXJ0ZXIiLCAiVHJhbnNmZXJDaGVja2VkIiwgIkNvbnZlcnRlciIsICJUcmFuc2ZlciIsICJDb252ZXJ0ZXIiLCAiVmFsaWRhdG9yIiwgIk1lc3NhZ2UiLCAiQ29udmVydGVyIl0KfQo= \ No newline at end of file diff --git a/packages/suite-utils/dist/exports.mjs b/packages/suite-utils/dist/exports.mjs index 8665e598b..ebaf8d8cb 100644 --- a/packages/suite-utils/dist/exports.mjs +++ b/packages/suite-utils/dist/exports.mjs @@ -176,22 +176,11 @@ var Explorer = /* @__PURE__ */ ((Explorer2) => { // ../global/src/index.ts import { Keypair, LAMPORTS_PER_SOL, PublicKey as PublicKey4 } from "@solana/web3.js"; -// ../account/src/associated.ts -import { - ASSOCIATED_TOKEN_PROGRAM_ID, - createAssociatedTokenAccountInstruction, - getAccount, - getAssociatedTokenAddressSync, - TOKEN_PROGRAM_ID, - TokenAccountNotFoundError, - TokenInvalidAccountOwnerError -} from "@solana/spl-token"; - // ../account/src/keypair.ts import { Keypair as Original, PublicKey as PublicKey2 } from "@solana/web3.js"; import bs from "bs58"; var Account; -((Account5) => { +((Account4) => { class Keypair4 { secret; pubkey; @@ -227,111 +216,16 @@ var Account; }); }; } - Account5.Keypair = Keypair4; + Account4.Keypair = Keypair4; })(Account || (Account = {})); -// ../account/src/associated.ts -var Account2; -((Account5) => { - let Associated; - ((Associated2) => { - const RETRY_OVER_LIMIT = 10; - const RETRY_SLEEP_TIME = 3; - const get = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const res = await (0, Associated2.makeOrCreateInstruction)( - mint, - owner, - new Account.Keypair({ secret: feePayer }).pubkey, - allowOwnerOffCurve - ); - if (!res.inst) { - return res.tokenAccount; - } - return new TransactionBuilder.Common( - [res.inst], - [], - feePayer.toKeypair(), - res.tokenAccount - ); - }; - Associated2.retryGetOrCreate = async (mint, owner, feePayer) => { - let counter = 1; - while (counter < RETRY_OVER_LIMIT) { - try { - const inst = await get(mint, owner, feePayer, true); - if (inst && typeof inst === "string") { - debugLog("# associatedTokenAccount: ", inst); - return inst; - } else if (inst instanceof TransactionBuilder.Common) { - (await inst.submit()).map( - async (ok) => { - await Node.confirmedSig(ok); - return inst.data; - }, - (err) => { - debugLog("# Error submit retryGetOrCreate: ", err); - throw err; - } - ); - } - } catch (e) { - debugLog(`# retry: ${counter} create token account: `, e); - debugLog(`# mint: ${mint}, owner: ${owner}, feePayer: ${feePayer}`); - } - await sleep(RETRY_SLEEP_TIME); - counter++; - } - throw Error(`retry action is over limit ${RETRY_OVER_LIMIT}`); - }; - Associated2.makeOrCreateInstruction = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const associatedTokenAccount = getAssociatedTokenAddressSync( - mint.toPublicKey(), - owner.toPublicKey(), - allowOwnerOffCurve, - TOKEN_PROGRAM_ID, - ASSOCIATED_TOKEN_PROGRAM_ID - ); - debugLog("# associatedTokenAccount: ", associatedTokenAccount.toString()); - try { - await getAccount( - Node.getConnection(), - associatedTokenAccount, - Node.getConnection().commitment, - TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst: void 0 - }; - } catch (error) { - if (!(error instanceof TokenAccountNotFoundError) && !(error instanceof TokenInvalidAccountOwnerError)) { - throw Error("Unexpected error"); - } - const payer = !feePayer ? owner : feePayer; - const inst = createAssociatedTokenAccountInstruction( - payer.toPublicKey(), - associatedTokenAccount, - owner.toPublicKey(), - mint.toPublicKey(), - TOKEN_PROGRAM_ID, - ASSOCIATED_TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst - }; - } - }; - })(Associated = Account5.Associated || (Account5.Associated = {})); -})(Account2 || (Account2 = {})); - // ../account/src/pda.ts import { PublicKey as PublicKey3 } from "@solana/web3.js"; import { PROGRAM_ID } from "@metaplex-foundation/mpl-token-metadata"; import { MPL_BUBBLEGUM_PROGRAM_ID } from "@metaplex-foundation/mpl-bubblegum"; import BN from "bn.js"; -var Account3; -((Account5) => { +var Account2; +((Account4) => { let Pda; ((Pda2) => { Pda2.getMetadata = (address) => { @@ -383,14 +277,13 @@ var Account3; ); return assetId.toString(); }; - })(Pda = Account5.Pda || (Account5.Pda = {})); -})(Account3 || (Account3 = {})); + })(Pda = Account4.Pda || (Account4.Pda = {})); +})(Account2 || (Account2 = {})); // ../account/src/index.ts -var Account4 = { - ...Account2, +var Account3 = { ...Account, - ...Account3 + ...Account2 }; // ../global/src/index.ts @@ -421,7 +314,7 @@ String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, op } return url; } - if (Account4.Keypair.isPubkey(addressOrSignature)) { + if (Account3.Keypair.isPubkey(addressOrSignature)) { if (explorer === "solanafm" /* SolanaFM */) { url = `${Constants.EXPLORER_SOLANAFM_URL}/address/${addressOrSignature}?cluster=${cluster}`; } else if (explorer === "xray" /* Xray */) { @@ -441,13 +334,13 @@ String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, op return url; }; String.prototype.toPublicKey = function() { - if (!Account4.Keypair.isPubkey(this.toString())) { + if (!Account3.Keypair.isPubkey(this.toString())) { throw Error(`No match KeyPair.PubKey: ${this.toString()}`); } return new PublicKey4(this.toString()); }; String.prototype.toKeypair = function() { - if (!Account4.Keypair.isSecret(this.toString())) { + if (!Account3.Keypair.isSecret(this.toString())) { throw Error(`No match KeyPair.Secret: ${this.toString()}`); } const decoded = bs2.decode(this.toString()); @@ -531,7 +424,7 @@ import { Transaction } from "@solana/web3.js"; var MAX_RETRIES = 3; -var TransactionBuilder2; +var TransactionBuilder; ((TransactionBuilder7) => { class Common2 { static MAX_TRANSACTION_SIZE = 1232; @@ -573,10 +466,10 @@ var TransactionBuilder2; }; } TransactionBuilder7.Common = Common2; -})(TransactionBuilder2 || (TransactionBuilder2 = {})); +})(TransactionBuilder || (TransactionBuilder = {})); // ../transaction-builder/src/batch.ts -var TransactionBuilder3; +var TransactionBuilder2; ((TransactionBuilder7) => { class Batch { submit = async (arr) => { @@ -618,14 +511,14 @@ var TransactionBuilder3; }; } TransactionBuilder7.Batch = Batch; -})(TransactionBuilder3 || (TransactionBuilder3 = {})); +})(TransactionBuilder2 || (TransactionBuilder2 = {})); // ../transaction-builder/src/mint.ts import { sendAndConfirmTransaction as sendAndConfirmTransaction3, Transaction as Transaction3 } from "@solana/web3.js"; -var TransactionBuilder4; +var TransactionBuilder3; ((TransactionBuilder7) => { class Mint { instructions; @@ -670,13 +563,13 @@ var TransactionBuilder4; }; } TransactionBuilder7.Mint = Mint; -})(TransactionBuilder4 || (TransactionBuilder4 = {})); +})(TransactionBuilder3 || (TransactionBuilder3 = {})); // ../transaction-builder/src/partial-sign.ts import { Transaction as Transaction4 } from "@solana/web3.js"; -var TransactionBuilder5; +var TransactionBuilder4; ((TransactionBuilder7) => { class PartialSign { hexInstruction; @@ -707,10 +600,10 @@ var TransactionBuilder5; }; } TransactionBuilder7.PartialSign = PartialSign; -})(TransactionBuilder5 || (TransactionBuilder5 = {})); +})(TransactionBuilder4 || (TransactionBuilder4 = {})); // ../transaction-builder/src/calculate-txsize.ts -var TransactionBuilder6; +var TransactionBuilder5; ((TransactionBuilder7) => { const LOW_VALUE = 127; const HIGH_VALUE = 16383; @@ -744,15 +637,15 @@ var TransactionBuilder6; TransactionBuilder7.isOverTransactionSize = (transaction, feePayer) => { return (0, TransactionBuilder7.calculateTxSize)(transaction, feePayer) > MAX_TRANSACTION_SIZE; }; -})(TransactionBuilder6 || (TransactionBuilder6 = {})); +})(TransactionBuilder5 || (TransactionBuilder5 = {})); // ../transaction-builder/src/index.ts -var TransactionBuilder = { - ...TransactionBuilder3, - ...TransactionBuilder6, - ...TransactionBuilder4, +var TransactionBuilder6 = { ...TransactionBuilder2, - ...TransactionBuilder5 + ...TransactionBuilder5, + ...TransactionBuilder3, + ...TransactionBuilder, + ...TransactionBuilder4 }; // src/result.ts @@ -840,7 +733,7 @@ Array.prototype.submit = async function(feePayer) { } } debugLog("# Result batch submit: ", instructions); - return new TransactionBuilder.Batch().submit(instructions); + return new TransactionBuilder6.Batch().submit(instructions); } }; var InternalOk = class extends AbstractResult { @@ -1533,7 +1426,7 @@ var ValidatorError = class extends Error { } }; export { - Account4 as Account, + Account3 as Account, Explorer, Node, Try, @@ -1549,4 +1442,4 @@ export { sleep, unixTimestamp }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9iYXRjaC50cyIsICIuLi8uLi90eXBlcy9zcmMvZ2xvYmFsL2luZGV4LnRzIiwgIi4uLy4uL2dsb2JhbC9zcmMvaW5kZXgudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvYXNzb2NpYXRlZC50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9rZXlwYWlyLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL3BkYS50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9pbmRleC50cyIsICIuLi8uLi9ub2RlL3NyYy9pbmRleC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jb21tb24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvbWludC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9wYXJ0aWFsLXNpZ24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY2FsY3VsYXRlLXR4c2l6ZS50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3Ny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W4gYWNjb3VpbnRcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBtaW50XG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAgICogQHBhcmFtIHtTZWNyZXR9IGZlZVBheWVyXG4gICAgICogQHJldHVybnMgUHJvbWlzZTxzdHJpbmc+XG4gICAgICovXG4gICAgZXhwb3J0IGNvbnN0IHJldHJ5R2V0T3JDcmVhdGUgPSBhc3luYyAoXG4gICAgICBtaW50OiBQdWJrZXksXG4gICAgICBvd25lcjogUHVia2V5LFxuICAgICAgZmVlUGF5ZXI6IFNlY3JldCxcbiAgICApOiBQcm9taXNlPHN0cmluZz4gPT4ge1xuICAgICAgbGV0IGNvdW50ZXIgPSAxO1xuICAgICAgd2hpbGUgKGNvdW50ZXIgPCBSRVRSWV9PVkVSX0xJTUlUKSB7XG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgY29uc3QgaW5zdCA9IGF3YWl0IGdldChtaW50LCBvd25lciwgZmVlUGF5ZXIsIHRydWUpO1xuXG4gICAgICAgICAgaWYgKGluc3QgJiYgdHlwZW9mIGluc3QgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICBkZWJ1Z0xvZygnIyBhc3NvY2lhdGVkVG9rZW5BY2NvdW50OiAnLCBpbnN0KTtcbiAgICAgICAgICAgIHJldHVybiBpbnN0O1xuICAgICAgICAgIH0gZWxzZSBpZiAoaW5zdCBpbnN0YW5jZW9mIFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb24pIHtcbiAgICAgICAgICAgIChhd2FpdCBpbnN0LnN1Ym1pdCgpKS5tYXAoXG4gICAgICAgICAgICAgIGFzeW5jIChvazogc3RyaW5nKSA9PiB7XG4gICAgICAgICAgICAgICAgYXdhaXQgTm9kZS5jb25maXJtZWRTaWcob2spO1xuICAgICAgICAgICAgICAgIHJldHVybiBpbnN0LmRhdGE7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIChlcnI6IEVycm9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dW5rbm93bikge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuQWNjb3VudE5vdEZvdW5kRXJyb3IpICYmXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuSW52YWxpZEFjY291bnRPd25lckVycm9yKVxuICAgICAgICApIHtcbiAgICAgICAgICB0aHJvdyBFcnJvcignVW5leHBlY3RlZCBlcnJvcicpO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgcGF5ZXIgPSAhZmVlUGF5ZXIgPyBvd25lciA6IGZlZVBheWVyO1xuXG4gICAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVBc3NvY2lhdGVkVG9rZW5BY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgcGF5ZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdCxcbiAgICAgICAgfTtcbiAgICAgIH1cbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHsgS2V5cGFpciBhcyBPcmlnaW5hbCwgUHVibGljS2V5IH0gZnJvbSAnQHNvbGFuYS93ZWIzLmpzJztcbmltcG9ydCB7IFB1YmtleSwgU2VjcmV0IH0gZnJvbSAnfi90eXBlcy9hY2NvdW50JztcbmltcG9ydCBicyBmcm9tICdiczU4JztcblxuZXhwb3J0IG5hbWVzcGFjZSBBY2NvdW50IH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k9HUkFNX0lELnRvUHVibGljS2V5KCksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGdldEJndW1TaWduZXIgPSAoKTogUHVibGljS2V5ID0+IHtcbiAgICAgIGNvbnN0IFtwdWJsaWNLZXldID0gUHVibGljS2V5LmZpbmRQcm9ncmFtQWRkcmVzc1N5bmMoXG4gICAgICAgIFtCdWZmZXIuZnJvbSgnY29sbGVjdGlvbl9jcGknLCAndXRmOCcpXSxcbiAgICAgICAgTVBMX0JVQkJMRUdVTV9QUk9HUkFNX0lELnRvUHVibGljS2V5KCksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGdldEFzc2V0SWQgPSAoYWRkcmVzczogUHVia2V5LCBsZWFmSW5kZXg6IG51bWJlcik6IFB1YmtleSA9PiB7XG4gICAgICBjb25zdCBub2RlID0gbmV3IEJOLkJOKGxlYWZJbmRleCk7XG4gICAgICBjb25zdCBbYXNzZXRJZF0gPSBQdWJsaWNLZXkuZmluZFByb2dyYW1BZGRyZXNzU3luYyhcbiAgICAgICAgW1xuICAgICAgICAgIEJ1ZmZlci5mcm9tKCdhc3NldCcsICd1dGY4JyksXG4gICAgICAgICAgYWRkcmVzcy50b1B1YmxpY0tleSgpLnRvQnVmZmVyKCksXG4gICAgICAgICAgVWludDhBcnJheS5mcm9tKG5vZGUudG9BcnJheSgnbGUnLCA4KSksXG4gICAgICAgIF0sXG4gICAgICAgIE1QTF9CVUJCTEVHVU1fUFJPR1JBTV9JRC50b1B1YmxpY0tleSgpLFxuICAgICAgKTtcbiAgICAgIHJldHVybiBhc3NldElkLnRvU3RyaW5nKCk7XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IEFjY291bnQgYXMgQXNzb2NpYXRlZCB9IGZyb20gJy4vYXNzb2NpYXRlZCc7XG5pbXBvcnQg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B1dCkge1xuICAgICAgICByZXR1cm4gbnVsbDtcbiAgICAgIH1cbiAgICAgIHJldHVybiBpbnB1dC5tYXAoKGRhdGEpID0+IHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICBhZGRyZXNzOiBkYXRhLmFkZHJlc3MudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBzaGFyZTogZGF0YS5zaGFyZSxcbiAgICAgICAgICB2ZXJpZmllZDogZmFsc2UsXG4gICAgICAgIH07XG4gICAgICB9KTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGludG9Db21wcmVzc2VkTmZ0SW5mcmEgPSAoXG4gICAgICBpbnB1dDogT3B0aW9uPElucHV0Q3JlYXRvcnNbXT4gfCB1bmRlZmluZWQsXG4gICAgKTogSW50ZXJuYWxDcmVhdG9yc1tdID0+IHtcbiAgICAgIGlmICghaW5wdXQpIHtcbiAgICAgICAgcmV0dXJuIFtdO1xuICAgICAgfVxuICAgICAgcmV0dXJuIGlucHV0IS5tYXAoKGRhdGEpID0+IHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICBhZGRyZXNzOiBkYXRhLmFkZHJlc3MudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBzaGFyZTogZGF0YS5zaGFyZSxcbiAgICAgICAgICB2ZXJpZmllZDogZmFsc2UsXG4gICAgICAgIH07XG4gICAgICB9KTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGludG9Vc2VyID0gKFxuICAgICAgb3V0cHV0OiBPcHRpb248SW50ZXJuYWxDcmVhdG9yc1tdPixcbiAgICApOiBDcmVhdG9yc1tdIHwgdW5kZWZpbmVkID0+IHtcbiAgICAgIGlmICghb3V0cHV0KSB7XG4gICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBvdXRwdXQubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczog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c3VsdHM6IERldGFpbHNbXSA9IFtdO1xuICAgICAga2V5cy5tYXAoKGtleSkgPT4ge1xuICAgICAgICBsZXQgcmVzITogUmVzdWx0PHN0cmluZywgVmFsaWRhdG9yRXJyb3I+O1xuICAgICAgICBzd2l0Y2ggKGtleSkge1xuICAgICAgICAgIGNhc2UgJ2ltYWdlJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuaW1hZ2UpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNJbWFnZVVybChtZXRhZGF0YS5pbWFnZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdyb3lhbHR5JzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEucm95YWx0eSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1JveWFsdHkobWV0YWRhdGEucm95YWx0eSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAg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1bHQiLCAiQ29udmVydGVyIiwgIkNvbGxlY3Rpb24iLCAiQ29sbGVjdGlvbk1pbnQiLCAiQ29udmVydGVyIiwgIkNyZWF0b3JzIiwgIkNvbnZlcnRlciIsICJDb21wcmVzc2VkTmZ0TWV0YWRhdGEiLCAiQ29udmVydGVyIiwgIlJveWFsdHkiLCAiQ29udmVydGVyIiwgIk5mdCIsICJDb252ZXJ0ZXIiLCAiTWVtbyIsICJDb252ZXJ0ZXIiLCAiTWludCIsICJDb252ZXJ0ZXIiLCAiUmVndWxhck5mdE1ldGFkYXRhIiwgIkNvbnZlcnRlciIsICJQcm9wZXJ0aWVzIiwgIkNvbnZlcnRlciIsICJVc2VzIiwgIkNvbnZlcnRlciIsICJUb2tlbk1ldGFkYXRhIiwgIkNvbnZlcnRlciIsICJUcmFuc2ZlckNoZWNrZWQiLCAiQ29udmVydGVyIiwgIlRyYW5zZmVyIiwgIkNvbnZlcnRlciIsICJWYWxpZGF0b3IiLCAiTWVzc2FnZSIsICJDb252ZXJ0ZXIiXQp9Cg== \ No newline at end of file +//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9iYXRjaC50cyIsICIuLi8uLi90eXBlcy9zcmMvZ2xvYmFsL2luZGV4LnRzIiwgIi4uLy4uL2dsb2JhbC9zcmMvaW5kZXgudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMva2V5cGFpci50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9wZGEudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvaW5kZXgudHMiLCAiLi4vLi4vbm9kZS9zcmMvaW5kZXgudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY29tbW9uLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL21pbnQudHMiLCA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AgICAgICAgfVxuICAgICAgICBjb25zdCB0cmFuc2FjdGlvbiA9IG5ldyBUcmFuc2FjdGlvbigpO1xuXG4gICAgICAgIGNvbnN0IGJsb2NraGFzaE9iaiA9IGF3YWl0IE5vZGUuZ2V0Q29ubmVjdGlvbigpLmdldExhdGVzdEJsb2NraGFzaCgpO1xuICAgICAgICB0cmFuc2FjdGlvbi5sYXN0VmFsaWRCbG9ja0hlaWdodCA9IGJsb2NraGFzaE9iai5sYXN0VmFsaWRCbG9ja0hlaWdodDtcbiAgICAgICAgdHJhbnNhY3Rpb24ucmVjZW50QmxvY2toYXNoID0gYmxvY2toYXNoT2JqLmJsb2NraGFzaDtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHRoaXMuc2lnbmVycztcblxuICAgICAgICBpZiAodGhpcy5mZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gdGhpcy5mZWVQYXllci5wdWJsaWNLZXk7XG4gICAgICAgICAgZmluYWxTaWduZXJzID0gW3RoaXMuZmVlUGF5ZXIsIC4uLnRoaXMuc2lnbmVyc107XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLmluc3RydWN0aW9ucy5mb3JFYWNoKChpbnN0KSA9PiB0cmFuc2FjdGlvbi5hZGQoaW5zdCkpO1xuXG4gICAgICAgIGNvbnN0IG9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IE1BWF9SRVRSSUVTLFxuICAgICAgICB9O1xuXG4gICAgICAgIHJldHVybiBhd2FpdCBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uKFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICBvcHRpb25zLFxuICAgICAgICApO1xuICAgICAgfSk7XG4gICAgfTtcbiAgfVxufVxuIiwgIm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KSA9PiB7XG4gICAgICBpeC5rZXlzLmZvckVhY2goKHsgcHVia2V5LCBpc1NpZ25lciB9KSA9PiB7XG4gICAgICAgIGNvbnN0IHBrID0gcHVia2V5LnRvQmFzZTU4KCk7XG4gICAgICAgIGlmIChpc1NpZ25lcikgc2lnbmVycy5hZGQocGspO1xuICAgICAgICBhY2NvdW50cy5hZGQocGspO1xuICAgICAgfSk7XG5cbiAgICAgIGFjY291bnRzLmFkZChpeC5wcm9ncmFtSWQudG9CYXNlNTgoKSk7XG5cbiAgICAgIGNvbnN0IG5JbmRleGVzID0gaXgua2V5cy5sZW5ndGg7XG4gICAgICBjb25zdCBvcGFxdWVEYXRhID0gaXguZGF0YS5sZW5ndGg7XG5cbiAgICAgIHJldHVybiAoXG4gICAgICAgIGFjYyArXG4gICAgICAgIDEgKyAvLyBQSUQgaW5kZXhcbiAgICAgICAgY29tcGFjdEFycmF5U2l6ZShuSW5kZXhlcywgMSkgK1xuICAgICAgICBjb21wYWN0QXJyYXlTaXplKG9wYXF1ZURhdGEsIDEpXG4gICAgICApO1xuICAgIH0sIDApO1xuXG4gICAgcmV0dXJuIChcbiAgICAgIGNvbXBhY3RBcnJheVNpemUoc2lnbmVycy5zaXplLCA2NCkgKyAvLyBzaWduYXR1cmVzXG4gICAgICAzICsgLy8gaGVhZGVyXG4gICAgICBjb21wYWN0QXJyYXlTaXplKGFjY291bnRzLnNpemUsIDMyKSArIC8vIGFjY291bnRzXG4gICAgICAzMiArIC8vIGJsb2NraGFzaFxuICAgICAgY29tcGFjdEhlYWRlcih0cmFuc2FjdGlvbi5pbnN0cnVjdGlvbnMubGVuZ3RoKSArIC8vIGluc3RydWN0aW9uc1xuICAgICAgaXhzU2l6ZVxuICAgICk7XG4gIH07XG5cbiAgLyoqXG4gICAqIElzIG1heCB0cmFuc2FjdGlvbiBzaXplXG4gICAqIEBwYXJhbSB0cmFuc2FjdGlvbiBhIHNvbGFuYSB0cmFuc2FjdGlvblxuICAgKiBAcGFyYW0gZ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gKGZlZVBheWVyPzogU2VjcmV0KSB7XG4gIGlmIChmZWVQYXllcikge1xuICAgIGxldCBpID0gMTtcbiAgICBmb3IgYXdhaXQgKGNvbnN0IG9iaiBvZiB0aGlzKSB7XG4gICAgICBpZiAob2JqLmlzRXJyKSB7XG4gICAgICAgIHJldHVybiBvYmo7XG4gICAgICB9IGVsc2UgaWYgKG9iai52YWx1ZS5jYW5TdWJtaXQpIHtcbiAgICAgICAgZGVidWdMb2coJyMgUmVzdWx0IGJhdGNoIGNhblN1Ym1pdCcpO1xuICAgICAgICBjb25zdCBzaWcgPSBhd2FpdCAob2JqIGFzIFBhcnRpYWxTaWduU3RydWN0dXJlKS5zdWJtaXQoZmVlUGF5ZXIpO1xuICAgICAgICBpZiAoc2lnLmlzRXJyKSB7XG4gICAgICAgICAgcmV0dXJuIHNpZztcbiAgICAgICAgfVxuICAgICAgICBhd2FpdCBOb2RlLmNvbmZpcm1lZFNpZyhzaWcudmFsdWUpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgZGVidWdMb2coJyMgUmVzdWx0IGJhdGNoIG90aGVyIHRoYW4gY2FuU3VibWl0Jyk7XG4gICAgICAgIGlmICh0aGlzLmxlbmd0aCA9PSBpKSB7XG4gICAgICAgICAgLy8gbGFzdCBvYmplY3RcbiAgICAgICAgICByZXR1cm4gb2JqLnN1Ym1pdChmZWVQYXllcik7XG4gICAgICAgIH1cbiAgICAgICAgb2JqLnN1Ym1pdChmZWVQYXllcik7XG4gICAgICB9XG4gICAgICBpKys7XG4gICAgfVxuICB9IGVsc2Uge1xuICAgIGNvbnN0IGluc3RydWN0aW9uczogQ29tbW9uU3RydWN0dXJlIHwgTWludFN0cnVjdHVyZVtdID0gW107XG4gICAgZm9yIChjb25zdCBvYmogb2YgdGhpcykge1xuICAgICAgaWYgKG9iai5pc0Vycikge1xuICAgICAgICByZXR1cm4gb2JqO1xuICAgICAgfSBlbHNlIGlmIChvYmouaXNPaykge1xuICAgICAgICBpbnN0cnVjdG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mVndWxhci1uZnQnO1xuaW1wb3J0IHsgSW50ZXJuYWxDcmVhdG9ycyB9IGZyb20gJ34vdHlwZXMvY29udmVydGVyJztcblxuZXhwb3J0IG5hbWVzcGFjZSBDb252ZXJ0ZXIge1xuICBleHBvcnQgbmFtZXNwYWNlIENyZWF0b3JzIHtcbiAgICBleHBvcnQgY29uc3QgaW50b0luZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IE9wdGlvbjxJbnRlcm5hbENyZWF0b3JzW10+ID0+IHtcbiAgICAgIGlmICghaW5wdXQpIHtcbiAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICB9XG4gICAgICByZXR1cm4gaW5wdXQubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvQ29tcHJlc3NlZE5mdEluZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IEludGVybmFsQ3JlYXRvcnNbXSA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBbXTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBpbnB1dCEubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgIC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ZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEuc3ltYm9sKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU3ltYm9sKG1ldGFkYXRhLnN5bWJvbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAocmVzICYmIHJlcy5pc0Vycikge1xuICAgICAgICAgIHJlc3VsdHMucHVzaCguLi5yZXMuZXJyb3IuZGV0YWlscyk7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgICAgaWYgKHJlc3VsdHMubGVuZ3RoID4gMCkge1xuICAgICAgICBjb25zdCBtZXNzYWdlID1cbiAgICAgICAgICAnQ2F1Z2h0IGluIHRoZSB2YWxpZGF0aW9uIGVycm9ycy4gc2VlIGluZm9ybWF0aW9uIGUuZzogZXJyPFZhbGlkYXRvckVycm9yPi5kZXRhaWxzJztcbiAgICAgICAgdGhyb3cgb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zZWROZnRNZXRhZGF0YSIsICJDb252ZXJ0ZXIiLCAiUm95YWx0eSIsICJDb252ZXJ0ZXIiLCAiTmZ0IiwgIkNvbnZlcnRlciIsICJNZW1vIiwgIkNvbnZlcnRlciIsICJNaW50IiwgIkNvbnZlcnRlciIsICJSZWd1bGFyTmZ0TWV0YWRhdGEiLCAiQ29udmVydGVyIiwgIlByb3BlcnRpZXMiLCAiQ29udmVydGVyIiwgIlVzZXMiLCAiQ29udmVydGVyIiwgIlRva2VuTWV0YWRhdGEiLCAiQ29udmVydGVyIiwgIlRyYW5zZmVyQ2hlY2tlZCIsICJDb252ZXJ0ZXIiLCAiVHJhbnNmZXIiLCAiQ29udmVydGVyIiwgIlZhbGlkYXRvciIsICJNZXNzYWdlIiwgIkNvbnZlcnRlciJdCn0K \ No newline at end of file diff --git a/packages/suite-utils/dist/index.d.mts b/packages/suite-utils/dist/index.d.mts index c93bddc0c..6ad40da0d 100644 --- a/packages/suite-utils/dist/index.d.mts +++ b/packages/suite-utils/dist/index.d.mts @@ -1,5 +1,5 @@ import { PublicKey, Commitment } from '@solana/web3.js'; -export { A as Account, E as Explorer, g as ExplorerOptions, K as KeypairAccount, N as Node, O as OwnerInfo, P as Pubkey, R as Result, S as Secret, T as Try, V as Validator, f as ValidatorError, b as bufferToArray, e as convertTimestampToDateTime, d as debugLog, i as isBrowser, a as isNode, c as isPromise, o as overwriteObject, s as sleep, u as unixTimestamp } from './exports-8dfab8bf.js'; +export { A as Account, E as Explorer, g as ExplorerOptions, K as KeypairAccount, N as Node, O as OwnerInfo, P as Pubkey, R as Result, S as Secret, T as Try, V as Validator, f as ValidatorError, b as bufferToArray, e as convertTimestampToDateTime, d as debugLog, i as isBrowser, a as isNode, c as isPromise, o as overwriteObject, s as sleep, u as unixTimestamp } from './exports-248b9ab6.js'; import 'bn.js'; import '@metaplex-foundation/mpl-token-metadata'; diff --git a/packages/suite-utils/dist/index.d.ts b/packages/suite-utils/dist/index.d.ts index c93bddc0c..6ad40da0d 100644 --- a/packages/suite-utils/dist/index.d.ts +++ b/packages/suite-utils/dist/index.d.ts @@ -1,5 +1,5 @@ import { PublicKey, Commitment } from '@solana/web3.js'; -export { A as Account, E as Explorer, g as ExplorerOptions, K as KeypairAccount, N as Node, O as OwnerInfo, P as Pubkey, R as Result, S as Secret, T as Try, V as Validator, f as ValidatorError, b as bufferToArray, e as convertTimestampToDateTime, d as debugLog, i as isBrowser, a as isNode, c as isPromise, o as overwriteObject, s as sleep, u as unixTimestamp } from './exports-8dfab8bf.js'; +export { A as Account, E as Explorer, g as ExplorerOptions, K as KeypairAccount, N as Node, O as OwnerInfo, P as Pubkey, R as Result, S as Secret, T as Try, V as Validator, f as ValidatorError, b as bufferToArray, e as convertTimestampToDateTime, d as debugLog, i as isBrowser, a as isNode, c as isPromise, o as overwriteObject, s as sleep, u as unixTimestamp } from './exports-248b9ab6.js'; import 'bn.js'; import '@metaplex-foundation/mpl-token-metadata'; diff --git a/packages/suite-utils/dist/index.js b/packages/suite-utils/dist/index.js index 5fba45df0..b7b732124 100644 --- a/packages/suite-utils/dist/index.js +++ b/packages/suite-utils/dist/index.js @@ -30,7 +30,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru // src/index.ts var src_exports = {}; __export(src_exports, { - Account: () => Account4, + Account: () => Account3, Constants: () => Constants, Explorer: () => Explorer, Node: () => Node, @@ -503,14 +503,11 @@ var Explorer = /* @__PURE__ */ ((Explorer2) => { // ../global/src/index.ts var import_web39 = require("@solana/web3.js"); -// ../account/src/associated.ts -var import_spl_token = require("@solana/spl-token"); - // ../account/src/keypair.ts var import_web37 = require("@solana/web3.js"); var import_bs58 = __toESM(require("bs58")); var Account; -((Account5) => { +((Account4) => { class Keypair4 { secret; pubkey; @@ -546,111 +543,16 @@ var Account; }); }; } - Account5.Keypair = Keypair4; + Account4.Keypair = Keypair4; })(Account || (Account = {})); -// ../account/src/associated.ts -var Account2; -((Account5) => { - let Associated; - ((Associated2) => { - const RETRY_OVER_LIMIT = 10; - const RETRY_SLEEP_TIME = 3; - const get = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const res = await (0, Associated2.makeOrCreateInstruction)( - mint, - owner, - new Account.Keypair({ secret: feePayer }).pubkey, - allowOwnerOffCurve - ); - if (!res.inst) { - return res.tokenAccount; - } - return new TransactionBuilder6.Common( - [res.inst], - [], - feePayer.toKeypair(), - res.tokenAccount - ); - }; - Associated2.retryGetOrCreate = async (mint, owner, feePayer) => { - let counter = 1; - while (counter < RETRY_OVER_LIMIT) { - try { - const inst = await get(mint, owner, feePayer, true); - if (inst && typeof inst === "string") { - debugLog("# associatedTokenAccount: ", inst); - return inst; - } else if (inst instanceof TransactionBuilder6.Common) { - (await inst.submit()).map( - async (ok) => { - await Node.confirmedSig(ok); - return inst.data; - }, - (err) => { - debugLog("# Error submit retryGetOrCreate: ", err); - throw err; - } - ); - } - } catch (e) { - debugLog(`# retry: ${counter} create token account: `, e); - debugLog(`# mint: ${mint}, owner: ${owner}, feePayer: ${feePayer}`); - } - await sleep(RETRY_SLEEP_TIME); - counter++; - } - throw Error(`retry action is over limit ${RETRY_OVER_LIMIT}`); - }; - Associated2.makeOrCreateInstruction = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const associatedTokenAccount = (0, import_spl_token.getAssociatedTokenAddressSync)( - mint.toPublicKey(), - owner.toPublicKey(), - allowOwnerOffCurve, - import_spl_token.TOKEN_PROGRAM_ID, - import_spl_token.ASSOCIATED_TOKEN_PROGRAM_ID - ); - debugLog("# associatedTokenAccount: ", associatedTokenAccount.toString()); - try { - await (0, import_spl_token.getAccount)( - Node.getConnection(), - associatedTokenAccount, - Node.getConnection().commitment, - import_spl_token.TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst: void 0 - }; - } catch (error) { - if (!(error instanceof import_spl_token.TokenAccountNotFoundError) && !(error instanceof import_spl_token.TokenInvalidAccountOwnerError)) { - throw Error("Unexpected error"); - } - const payer = !feePayer ? owner : feePayer; - const inst = (0, import_spl_token.createAssociatedTokenAccountInstruction)( - payer.toPublicKey(), - associatedTokenAccount, - owner.toPublicKey(), - mint.toPublicKey(), - import_spl_token.TOKEN_PROGRAM_ID, - import_spl_token.ASSOCIATED_TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst - }; - } - }; - })(Associated = Account5.Associated || (Account5.Associated = {})); -})(Account2 || (Account2 = {})); - // ../account/src/pda.ts var import_web38 = require("@solana/web3.js"); var import_mpl_token_metadata = require("@metaplex-foundation/mpl-token-metadata"); var import_mpl_bubblegum = require("@metaplex-foundation/mpl-bubblegum"); var import_bn = __toESM(require("bn.js")); -var Account3; -((Account5) => { +var Account2; +((Account4) => { let Pda; ((Pda2) => { Pda2.getMetadata = (address) => { @@ -702,14 +604,13 @@ var Account3; ); return assetId.toString(); }; - })(Pda = Account5.Pda || (Account5.Pda = {})); -})(Account3 || (Account3 = {})); + })(Pda = Account4.Pda || (Account4.Pda = {})); +})(Account2 || (Account2 = {})); // ../account/src/index.ts -var Account4 = { - ...Account2, +var Account3 = { ...Account, - ...Account3 + ...Account2 }; // ../global/src/index.ts @@ -740,7 +641,7 @@ String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, op } return url; } - if (Account4.Keypair.isPubkey(addressOrSignature)) { + if (Account3.Keypair.isPubkey(addressOrSignature)) { if (explorer === "solanafm" /* SolanaFM */) { url = `${Constants.EXPLORER_SOLANAFM_URL}/address/${addressOrSignature}?cluster=${cluster}`; } else if (explorer === "xray" /* Xray */) { @@ -760,13 +661,13 @@ String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, op return url; }; String.prototype.toPublicKey = function() { - if (!Account4.Keypair.isPubkey(this.toString())) { + if (!Account3.Keypair.isPubkey(this.toString())) { throw Error(`No match KeyPair.PubKey: ${this.toString()}`); } return new import_web39.PublicKey(this.toString()); }; String.prototype.toKeypair = function() { - if (!Account4.Keypair.isSecret(this.toString())) { + if (!Account3.Keypair.isSecret(this.toString())) { throw Error(`No match KeyPair.Secret: ${this.toString()}`); } const decoded = import_bs582.default.decode(this.toString()); @@ -1582,4 +1483,4 @@ var ValidatorError = class extends Error { sleep, unixTimestamp }); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uL3NyYy9jb25zdGFudHMudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvYmF0Y2gudHMiLCAiLi4vLi4vbm9kZS9zcmMvaW5kZXgudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY29tbW9uLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL21pbnQudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvcGFydGlhbC1zaWduLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2NhbGN1bGF0ZS10eHNpemUudHMiLCAiLi4vLi4vdHlwZXMvc3JjL2dsb2JhbC9pbmRleC50cyIsICIuLi8uLi9nbG9iYWwvc3JjL2luZGV4LnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2Fzc29jaWF0ZWQudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMva2V5cGFpci50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9wZGEudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvaW5kZXgudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvaW5kZXgudHMiLCAiLi4vc3JjL3NoYXJlZC50cyIsICIuLi9zcmMvcmVzdWx0LnRzIiwgIi4uLy4uL2NvbnZlcnRlci9zcmMvY29sbGVjdGlvbi50cyIsICIuLi8uLi9jb252ZXJ0ZXIvc3JjL2NyZWF0b3JzLnRzIiwgIi4uLy4uL2NvbnZlcnRlci9zcmMvY29tc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hbWVzcGFjZSBBY2NvdW50IHtcbiAgZXhwb3J0IG5hbWVzcGFjZSBBc3NvY2lhdGVkIHtcbiAgICBjb25zdCBSRVRSWV9PVkVSX0xJTUlUID0gMTA7XG4gICAgY29uc3QgUkVUUllfU0xFRVBfVElNRSA9IDM7XG4gICAgLy9AaW50ZXJuYWxcbiAgICBjb25zdCBnZXQgPSBhc3luYyAoXG4gICAgICBtaW50OiBQdWJrZXksXG4gICAgICBvd25lcjogUHVia2V5LFxuICAgICAgZmVlUGF5ZXI6IFNlY3JldCxcbiAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSA9IGZhbHNlLFxuICAgICk6IFByb21pc2U8c3RyaW5nIHwgQ29tbW9uU3RydWN0dXJlPFB1YmtleT4+ID0+IHtcbiAgICAgIGNvbnN0IHJlcyA9IGF3YWl0IG1ha2VPckNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICBtaW50LFxuICAgICAgICBvd25lcixcbiAgICAgICAgbmV3IEtleXBhaXIuS2V5cGFpcih7IHNlY3JldDogZmVlUGF5ZXIgfSkucHVia2V5LFxuICAgICAgICBhbGxvd093bmVyT2ZmQ3VydmUsXG4gICAgICApO1xuXG4gICAgICBpZiAoIXJlcy5pbnN0KSB7XG4gICAgICAgIHJldHVybiByZXMudG9rZW5BY2NvdW50O1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb248UHVia2V5PihcbiAgICAgICAgW3Jlcy5pbnN0XSxcbiAgICAgICAgW10sXG4gICAgICAgIGZlZVBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICByZXMudG9rZW5BY2NvdW50ISxcbiAgICAgICk7XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIFJldHJ5IGZ1bmN0aW9uIGlmIGNyZWF0ZSBuZXcgdG9rZW4gYWNjb3VpbnRcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBtaW50XG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAgICogQHBhcmFtIHtTZWNyZXR9IGZlZVBheWVyXG4gICAgICogQHJldHVybnMgUHJvbWlzZTxzdHJpbmc+XG4gICAgICovXG4gICAgZXhwb3J0IGNvbnN0IHJldHJ5R2V0T3JDcmVhdGUgPSBhc3luYyAoXG4gICAgICBtaW50OiBQdWJrZXksXG4gICAgICBvd25lcjogUHVia2V5LFxuICAgICAgZmVlUGF5ZXI6IFNlY3JldCxcbiAgICApOiBQcm9taXNlPHN0cmluZz4gPT4ge1xuICAgICAgbGV0IGNvdW50ZXIgPSAxO1xuICAgICAgd2hpbGUgKGNvdW50ZXIgPCBSRVRSWV9PVkVSX0xJTUlUKSB7XG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgY29uc3QgaW5zdCA9IGF3YWl0IGdldChtaW50LCBvd25lciwgZmVlUGF5ZXIsIHRydWUpO1xuXG4gICAgICAgICAgaWYgKGluc3QgJiYgdHlwZW9mIGluc3QgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICBkZWJ1Z0xvZygnIyBhc3NvY2lhdGVkVG9rZW5BY2NvdW50OiAnLCBpbnN0KTtcbiAgICAgICAgICAgIHJldHVybiBpbnN0O1xuICAgICAgICAgIH0gZWxzZSBpZiAoaW5zdCBpbnN0YW5jZW9mIFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb24pIHtcbiAgICAgICAgICAgIChhd2FpdCBpbnN0LnN1Ym1pdCgpKS5tYXAoXG4gICAgICAgICAgICAgIGFzeW5jIChvazogc3RyaW5nKSA9PiB7XG4gICAgICAgICAgICAgICAgYXdhaXQgTm9kZS5jb25maXJtZWRTaWcob2spO1xuICAgICAgICAgICAgICAgIHJldHVybiBpbnN0LmRhdGE7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIChlcnI6IEVycm9yKSA9PiB7XG4gICAgICAgICAgICAgICAgZGVidWdMb2coJyMgRXJyb3Igc3VibWl0IHJldHJ5R2V0T3JD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3VudE5vdEZvdW5kRXJyb3IpICYmXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuSW52YWxpZEFjY291bnRPd25lckVycm9yKVxuICAgICAgICApIHtcbiAgICAgICAgICB0aHJvdyBFcnJvcignVW5leHBlY3RlZCBlcnJvcicpO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgcGF5ZXIgPSAhZmVlUGF5ZXIgPyBvd25lciA6IGZlZVBheWVyO1xuXG4gICAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVBc3NvY2lhdGVkVG9rZW5BY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgcGF5ZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdCxcbiAgICAgICAgfTtcbiAgICAgIH1cbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHsgS2V5cGFpciBhcyBPcmlnaW5hbCwgUHVibGljS2V5IH0gZnJvbSAnQHNvbGFuYS93ZWIzLmpzJztcbmltcG9ydCB7IFB1YmtleSwgU2VjcmV0IH0gZnJvbSAnfi90eXBlcy9hY2NvdW50JztcbmltcG9ydCBicyBmcm9tICdiczU4JztcblxuZXhwb3J0IG5hbWVzcGFjZSBBY2NvdW50IHtcbiAgZXhwb3J0IGNsYXNzIEtleXBhaXIge1xuICAgIHNlY3JldDogU2VjcmV0O1xuICAgIHB1YmtleT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1N5bmMoXG4gICAgICAgIFtcbiAgICAgICAgICBCdWZmZXIuZnJvbSgnbWV0YWRhdGEnKSxcbiAgICAgICAgICBQUk9HUkFNX0lELnRvQnVmZmVyKCksXG4gICAgICAgICAgYWRkcmVzcy50b1B1YmxpY0tleSgpLnRvQnVmZmVyKCksXG4gICAgICAgIF0sXG4gICAgICAgIFBST0dSQU1fSUQsXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGdldE1hc3RlckVkaXRpb24gPSAoYWRkcmVzczogUHVia2V5KTogUHVibGljS2V5ID0+IHtcbiAgICAgIGNvbnN0IFtwdWJsaWNLZXldID0gUHVibGljS2V5LmZpbmRQcm9ncmFtQWRkcmVzc1N5bmMoXG4gICAgICAgIFtcbiAgICAgICAgICBCdWZmZXIuZnJvbSgnbWV0YWRhdGEnKSxcbiAgICAgICAgICBQUk9HUkFNX0lELnRvQnVmZmVyKCksXG4gICAgICAgICAgYWRkcmVzcy50b1B1YmxpY0tleSgpLnRvQnVmZmVyKCksXG4gICAgICAgICAgQnVmZmVyLmZyb20oJ2VkaXRpb24nKSxcbiAgICAgICAgXSxcbiAgICAgICAgUFJPR1JBTV9JRCxcbiAgICAgICk7XG4gICAgICByZXR1cm4gcHVibGljS2V5O1xuICAgIH07XG5cbiAgICBleHBvcnQgY29uc3QgZ2V0VHJlZUF1dGhvcml0eSA9IChhZGRyZXNzOiBQdWJrZXkpOiBQdWJsaWNLZXkgPT4ge1xuICAgICAgY29uc3QgW3B1YmxpY0tleV0gPSBQdWJsaWNLZXkuZmluZFByb2dyYW1BZGRyZXNzU3luYyhcbiAgICAgICAgW2FkZHJlc3MudG9QdWJsaWNLZXkoKS50b0J1ZmZlcigpXSxcbiAgICAgICAgTVBMX0JVQkJMRUdVTV9QUk9HUkFNX0lELnRvUHVibGljS2V5KCksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAg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ZVBhdGg6IEZpbGVUeXBlLFxuICAgICAgICBzdG9yYWdlVHlwZTogU3RvcmFnZVR5cGUsXG4gICAgICAgIGZlZVBheWVyPzogU2VjcmV0LFxuICAgICAgKSA9PiBQcm9taXNlPFJlc3VsdDxzdHJpbmcsIEVycm9yPj4sXG4gICAgICBzdG9yYWdlVHlwZTogU3RvcmFnZVR5cGUsXG4gICAgICBmZWVQYXllcj86IFNlY3JldCxcbiAgICApOiBQcm9taXNlPFByb3BlcnRpZXM+ID0+IHtcbiAgICAgIGlmICghaW5wdXQgfHwgIWlucHV0LmZpbGVzKSB7XG4gICAgICAgIHJldHVybiB7fTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgZmlsZXMgPSBhd2FpdCBQcm9taXNlLmFsbChcbiAgICAgICAgaW5wdXQuZmlsZXMubWFwKGFzeW5jIChmaWxlKSA9PiB7XG4gICAgICAgICAgaWYgKCFmaWxlLmZpbGVQYXRoKSB7XG4gICAgICAgICAgICByZXR1cm4ge307XG4gICAgICAgICAgfVxuICAgICAgICAgIGNvbnN0IHJlcyA9IGF3YWl0IGNhbGxiYWNrRnVuYyhmaWxlLmZpbGVQYXRoLCBzdG9yYWdlVHlwZSwgZmVlUGF5ZXIpO1xuICAgICAgICAgIGlmIChyZXMuaXNFcnIpIHtcbiAgICAgICAgICAgIHRocm93IEVycm9yKHJlcy5lcnJvci5tZXNzYWdlKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgcmV0dXJuIG92ZXJ3cml0ZU9iamVjdChmaWxlLCBbXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGV4aXN0c0tleTogJ2ZpbGVQYXRoJyxcbiAgICAgICAgICAgICAgd2lsbDogeyBrZXk6ICd1cmknLCB2YWx1ZTogcmVzLnZhbHVlIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgIF0pO1xuICAgICAgICB9KSxcbiAgICAgICk7XG4gICAgICByZXR1cm4geyAuLi5pbnB1dCwgZmlsZXMgfSBhcyBQcm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IHJldHVybiBUcnkoKCkgPT4ge1xuICAgICAgY29uc3Qga2V5cyA9IE9iamVjdC5rZXlzKG1ldGFkYXRhKTtcbiAgICAgIGNvbnN0IHJlc3VsdHM6IERldGFpbHNbXSA9IFtdO1xuICAgICAga2V5cy5tYXAoKGtleSkgPT4ge1xuICAgICAgICBsZXQgcmVzITogUmVzdWx0PHN0cmluZywgVmFsaWRhdG9yRXJyb3I+O1xuICAgICAgICBzd2l0Y2ggKGtleSkge1xuICAgICAgICAgIGNhc2UgJ2ltYWdlJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuaW1hZ2UpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNJbWFnZVVybChtZXRhZGF0YS5pbWFnZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdyb3lhbHR5JzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEucm95YWx0eSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1JveWFsdHkobWV0YWRhdGEucm95YWx0eSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSkge1xuICAgICAgICAgICAgICByZX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hLnJveWFsdHkpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNSb3lhbHR5KG1ldGFkYXRhLnJveWFsdHkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEuc3ltYm9sKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU3ltYm9sKG1ldGFkYXRhLnN5bWJvbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAocmVzICYmIHJlcy5pc0Vycikge1xuICAgICAgICAgIHJlc3V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vdW50IiwgImJzIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiUmVzdWx0IiwgIkNvbnZlcnRlciIsICJDb2xsZWN0aW9uIiwgIkNvbGxlY3Rpb25NaW50IiwgIkNvbnZlcnRlciIsICJDcmVhdG9ycyIsICJDb252ZXJ0ZXIiLCAiQ29tcHJlc3NlZE5mdE1ldGFkYXRhIiwgIkNvbnZlcnRlciIsICJSb3lhbHR5IiwgIkNvbnZlcnRlciIsICJOZnQiLCAiQ29udmVydGVyIiwgIk1lbW8iLCAiQ29udmVydGVyIiwgIk1pbnQiLCAiQ29udmVydGVyIiwgIlJlZ3VsYXJOZnRNZXRhZGF0YSIsICJDb252ZXJ0ZXIiLCAiUHJvcGVydGllcyIsICJDb252ZXJ0ZXIiLCAiVXNlcyIsICJDb252ZXJ0ZXIiLCAiVG9rZW5NZXRhZGF0YSIsICJDb252ZXJ0ZXIiLCAiVHJhbnNmZXJDaGVja2VkIiwgIkNvbnZlcnRlciIsICJUcmFuc2ZlciIsICJDb252ZXJ0ZXIiLCAiVmFsaWRhdG9yIiwgIk1lc3NhZ2UiLCAiQ29udmVydGVyIl0KfQo= \ No newline at end of file diff --git a/packages/suite-utils/dist/index.mjs b/packages/suite-utils/dist/index.mjs index ee4d690b4..89710c084 100644 --- a/packages/suite-utils/dist/index.mjs +++ b/packages/suite-utils/dist/index.mjs @@ -462,22 +462,11 @@ var Explorer = /* @__PURE__ */ ((Explorer2) => { // ../global/src/index.ts import { Keypair as Keypair3, LAMPORTS_PER_SOL, PublicKey as PublicKey4 } from "@solana/web3.js"; -// ../account/src/associated.ts -import { - ASSOCIATED_TOKEN_PROGRAM_ID, - createAssociatedTokenAccountInstruction, - getAccount, - getAssociatedTokenAddressSync, - TOKEN_PROGRAM_ID, - TokenAccountNotFoundError, - TokenInvalidAccountOwnerError -} from "@solana/spl-token"; - // ../account/src/keypair.ts import { Keypair as Original, PublicKey as PublicKey2 } from "@solana/web3.js"; import bs from "bs58"; var Account; -((Account5) => { +((Account4) => { class Keypair4 { secret; pubkey; @@ -513,111 +502,16 @@ var Account; }); }; } - Account5.Keypair = Keypair4; + Account4.Keypair = Keypair4; })(Account || (Account = {})); -// ../account/src/associated.ts -var Account2; -((Account5) => { - let Associated; - ((Associated2) => { - const RETRY_OVER_LIMIT = 10; - const RETRY_SLEEP_TIME = 3; - const get = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const res = await (0, Associated2.makeOrCreateInstruction)( - mint, - owner, - new Account.Keypair({ secret: feePayer }).pubkey, - allowOwnerOffCurve - ); - if (!res.inst) { - return res.tokenAccount; - } - return new TransactionBuilder6.Common( - [res.inst], - [], - feePayer.toKeypair(), - res.tokenAccount - ); - }; - Associated2.retryGetOrCreate = async (mint, owner, feePayer) => { - let counter = 1; - while (counter < RETRY_OVER_LIMIT) { - try { - const inst = await get(mint, owner, feePayer, true); - if (inst && typeof inst === "string") { - debugLog("# associatedTokenAccount: ", inst); - return inst; - } else if (inst instanceof TransactionBuilder6.Common) { - (await inst.submit()).map( - async (ok) => { - await Node.confirmedSig(ok); - return inst.data; - }, - (err) => { - debugLog("# Error submit retryGetOrCreate: ", err); - throw err; - } - ); - } - } catch (e) { - debugLog(`# retry: ${counter} create token account: `, e); - debugLog(`# mint: ${mint}, owner: ${owner}, feePayer: ${feePayer}`); - } - await sleep(RETRY_SLEEP_TIME); - counter++; - } - throw Error(`retry action is over limit ${RETRY_OVER_LIMIT}`); - }; - Associated2.makeOrCreateInstruction = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const associatedTokenAccount = getAssociatedTokenAddressSync( - mint.toPublicKey(), - owner.toPublicKey(), - allowOwnerOffCurve, - TOKEN_PROGRAM_ID, - ASSOCIATED_TOKEN_PROGRAM_ID - ); - debugLog("# associatedTokenAccount: ", associatedTokenAccount.toString()); - try { - await getAccount( - Node.getConnection(), - associatedTokenAccount, - Node.getConnection().commitment, - TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst: void 0 - }; - } catch (error) { - if (!(error instanceof TokenAccountNotFoundError) && !(error instanceof TokenInvalidAccountOwnerError)) { - throw Error("Unexpected error"); - } - const payer = !feePayer ? owner : feePayer; - const inst = createAssociatedTokenAccountInstruction( - payer.toPublicKey(), - associatedTokenAccount, - owner.toPublicKey(), - mint.toPublicKey(), - TOKEN_PROGRAM_ID, - ASSOCIATED_TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst - }; - } - }; - })(Associated = Account5.Associated || (Account5.Associated = {})); -})(Account2 || (Account2 = {})); - // ../account/src/pda.ts import { PublicKey as PublicKey3 } from "@solana/web3.js"; import { PROGRAM_ID } from "@metaplex-foundation/mpl-token-metadata"; import { MPL_BUBBLEGUM_PROGRAM_ID } from "@metaplex-foundation/mpl-bubblegum"; import BN from "bn.js"; -var Account3; -((Account5) => { +var Account2; +((Account4) => { let Pda; ((Pda2) => { Pda2.getMetadata = (address) => { @@ -669,14 +563,13 @@ var Account3; ); return assetId.toString(); }; - })(Pda = Account5.Pda || (Account5.Pda = {})); -})(Account3 || (Account3 = {})); + })(Pda = Account4.Pda || (Account4.Pda = {})); +})(Account2 || (Account2 = {})); // ../account/src/index.ts -var Account4 = { - ...Account2, +var Account3 = { ...Account, - ...Account3 + ...Account2 }; // ../global/src/index.ts @@ -707,7 +600,7 @@ String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, op } return url; } - if (Account4.Keypair.isPubkey(addressOrSignature)) { + if (Account3.Keypair.isPubkey(addressOrSignature)) { if (explorer === "solanafm" /* SolanaFM */) { url = `${Constants.EXPLORER_SOLANAFM_URL}/address/${addressOrSignature}?cluster=${cluster}`; } else if (explorer === "xray" /* Xray */) { @@ -727,13 +620,13 @@ String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, op return url; }; String.prototype.toPublicKey = function() { - if (!Account4.Keypair.isPubkey(this.toString())) { + if (!Account3.Keypair.isPubkey(this.toString())) { throw Error(`No match KeyPair.PubKey: ${this.toString()}`); } return new PublicKey4(this.toString()); }; String.prototype.toKeypair = function() { - if (!Account4.Keypair.isSecret(this.toString())) { + if (!Account3.Keypair.isSecret(this.toString())) { throw Error(`No match KeyPair.Secret: ${this.toString()}`); } const decoded = bs2.decode(this.toString()); @@ -1533,7 +1426,7 @@ var ValidatorError = class extends Error { } }; export { - Account4 as Account, + Account3 as Account, Constants, Explorer, Node, @@ -1551,4 +1444,4 @@ export { sleep, unixTimestamp }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9iYXRjaC50cyIsICIuLi8uLi9ub2RlL3NyYy9pbmRleC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jb21tb24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvbWludC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9wYXJ0aWFsLXNpZ24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY2FsY3VsYXRlLXR4c2l6ZS50cyIsICIuLi8uLi90eXBlcy9zcmMvZ2xvYmFsL2luZGV4LnRzIiwgIi4uLy4uL2dsb2JhbC9zcmMvaW5kZXgudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvYXNzb2NpYXRlZC50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9rZXlwYWlyLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL3BkYS50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9pbmRleC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9pbmRleC50cyIsICIuLi9zcmMvc2hhcmVkLnRzIiwgIi4uL3NyYy9yZXN1bHQudHMiLCAiLi4vLi4vY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JTUlUID0gMTA7XG4gICAgY29uc3QgUkVUUllfU0xFRVBfVElNRSA9IDM7XG4gICAgLy9AaW50ZXJuYWxcbiAgICBjb25zdCBnZXQgPSBhc3luYyAoXG4gICAgICBtaW50OiBQdWJrZXksXG4gICAgICBvd25lcjogUHVia2V5LFxuICAgICAgZmVlUGF5ZXI6IFNlY3JldCxcbiAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSA9IGZhbHNlLFxuICAgICk6IFByb21pc2U8c3RyaW5nIHwgQ29tbW9uU3RydWN0dXJlPFB1YmtleT4+ID0+IHtcbiAgICAgIGNvbnN0IHJlcyA9IGF3YWl0IG1ha2VPckNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICBtaW50LFxuICAgICAgICBvd25lcixcbiAgICAgICAgbmV3IEtleXBhaXIuS2V5cGFpcih7IHNlY3JldDogZmVlUGF5ZXIgfSkucHVia2V5LFxuICAgICAgICBhbGxvd093bmVyT2ZmQ3VydmUsXG4gICAgICApO1xuXG4gICAgICBpZiAoIXJlcy5pbnN0KSB7XG4gICAgICAgIHJldHVybiByZXMudG9rZW5BY2NvdW50O1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb248UHVia2V5PihcbiAgICAgICAgW3Jlcy5pbnN0XSxcbiAgICAgICAgW10sXG4gICAgICAgIGZlZVBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICByZXMudG9rZW5BY2NvdW50ISxcbiAgICAgICk7XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIFJldHJ5IGZ1bmN0aW9uIGlmIGNyZWF0ZSBuZXcgdG9rZW4gYWNjb3VpbnRcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBtaW50XG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAgICogQHBhcmFtIHtTZWNyZXR9IGZlZVBheWVyXG4gICAgICogQHJldHVybnMgUHJvbWlzZTxzdHJpbmc+XG4gICAgICovXG4gICAgZXhwb3J0IGNvbnN0IHJldHJ5R2V0T3JDcmVhdGUgPSBhc3luYyAoXG4gICAgICBtaW50OiBQdWJrZXksXG4gICAgICBvd25lcjogUHVia2V5LFxuICAgICAgZmVlUGF5ZXI6IFNlY3JldCxcbiAgICApOiBQcm9taXNlPHN0cmluZz4gPT4ge1xuICAgICAgbGV0IGNvdW50ZXIgPSAxO1xuICAgICAgd2hpbGUgKGNvdW50ZXIgPCBSRVRSWV9PVkVSX0xJTUlUKSB7XG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgY29uc3QgaW5zdCA9IGF3YWl0IGdldChtaW50LCBvd25lciwgZmVlUGF5ZXIsIHRydWUpO1xuXG4gICAgICAgICAgaWYgKGluc3QgJiYgdHlwZW9mIGluc3QgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICBkZWJ1Z0xvZygnIyBhc3NvY2lhdGVkVG9rZW5BY2NvdW50OiAnLCBpbnN0KTtcbiAgICAgICAgICAgIHJldHVybiBpbnN0O1xuICAgICAgICAgIH0gZWxzZSBpZiAoaW5zdCBpbnN0YW5jZW9mIFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb24pIHtcbiAgICAgICAgICAgIChhd2FpdCBpbnN0LnN1Ym1pdCgpKS5tYXAoXG4gICAgICAgICAgICAgIGFzeW5jIChvazogc3RyaW5nKSA9PiB7XG4gICAgICAgICAgICAgICAgYXdhaXQgTm9kZS5jb25maXJtZWRTaWcob2spO1xuICAgICAgICAgICAgICAgIHJldHVybiBpbnN0LmRhdGE7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIChlcnI6IEVycm9yKSA9PiB7XG4gICAgICAgICAgICAgICAgZGVidWdMb2coJyMgRXJyb3Igc3VibWl0IHJldHJ5R2V0T3JDcmVhdGU6ICcsIGVycik7XG4gICAgICAgICAgICAgICAgdGhyb3cgZXJyO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgKTtcbiAgICAgICA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W5lZDtcbiAgICB9PiA9PiB7XG4gICAgICBjb25zdCBhc3NvY2lhdGVkVG9rZW5BY2NvdW50ID0gZ2V0QXNzb2NpYXRlZFRva2VuQWRkcmVzc1N5bmMoXG4gICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgYWxsb3dPd25lck9mZkN1cnZlLFxuICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICBBU1NPQ0lBVEVEX1RPS0VOX1BST0dSQU1fSUQsXG4gICAgICApO1xuXG4gICAgICBkZWJ1Z0xvZygnIyBhc3NvY2lhdGVkVG9rZW5BY2NvdW50OiAnLCBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCkpO1xuXG4gICAgICB0cnkge1xuICAgICAgICAvLyBEb250IHVzZSBSZXN1bHRcbiAgICAgICAgYXdhaXQgZ2V0QWNjb3VudChcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLmNvbW1pdG1lbnQsXG4gICAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICB0b2tlbkFjY291bnQ6IGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSxcbiAgICAgICAgICBpbnN0OiB1bmRlZmluZWQsXG4gICAgICAgIH07XG4gICAgICB9IGNhdGNoIChlcnJvcjogdW5rbm93bikge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuQWNjb3VudE5vdEZvdW5kRXJyb3IpICYmXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuSW52YWxpZEFjY291bnRPd25lckVycm9yKVxuICAgICAgICApIHtcbiAgICAgICAgICB0aHJvdyBFcnJvcignVW5leHBlY3RlZCBlcnJvcicpO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgcGF5ZXIgPSAhZmVlUGF5ZXIgPyBvd25lciA6IGZlZVBheWVyO1xuXG4gICAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVBc3NvY2lhdGVkVG9rZW5BY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgcGF5ZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdCxcbiAgICAgICAgfTtcbiAgICAgIH1cbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHsgS2V5cGFpciBhcyBPcmlnaW5hbCwgUHVibGljS2V5IH0gZnJvbSAnQHNvbGFuYS93ZWIzLmpzJztcbmltcG9ydCB7IFB1YmtleSwgU2VjcmV0IH0gZnJvbSAnfi90eXBlcy9hY2NvdW50JztcbmltcG9ydCBicyBmcm9tICdiczU4JztcblxuZXhwb3J0IG5hbWVzcGFjZSBBY2NvdW50IHtcbiAgZXhwb3J0IGNsYXNzIEtleXBhaXIge1xuICAgIHNlY3JldDogU2VjcmV0O1xuICAgIHB1YmtleTogUHVia2V5O1xuXG4gICAgY29uc3RydWN0b3IocGFyYW1zOiB7IHB1YmtleT86IFB1YmtleTsgc2VjcmV0OiBTZWNyZXQgfSkge1xuICAgICA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mZmVyKCksXG4gICAgICAgICAgYWRkcmVzcy50b1B1YmxpY0tleSgpLnRvQnVmZmVyKCksXG4gICAgICAgIF0sXG4gICAgICAgIFBST0dSQU1fSUQsXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGdldE1hc3RlckVkaXRpb24gPSAoYWRkcmVzczogUHVia2V5KTogUHVibGljS2V5ID0+IHtcbiAgICAgIGNvbnN0IFtwdWJsaWNLZXldID0gUHVibGljS2V5LmZpbmRQcm9ncmFtQWRkcmVzc1N5bmMoXG4gICAgICAgIFtcbiAgICAgICAgICBCdWZmZXIuZnJvbSgnbWV0YWRhdGEnKSxcbiAgICAgICAgICBQUk9HUkFNX0lELnRvQnVmZmVyKCksXG4gICAgICAgICAgYWRkcmVzcy50b1B1YmxpY0tleSgpLnRvQnVmZmVyKCksXG4gICAgICAgICAgQnVmZmVyLmZyb20oJ2VkaXRpb24nKSxcbiAgICAgICAgXSxcbiAgICAgICAgUFJPR1JBTV9JRCxcbiAgICAgICk7XG4gICAgICByZXR1cm4gcHVibGljS2V5O1xuICAgIH07XG5cbiAgICBleHBvcnQgY29uc3QgZ2V0VHJlZUF1dGhvcml0eSA9IChhZGRyZXNzOiBQdWJrZXkpOiBQdWJsaWNLZXkgPT4ge1xuICAgICAgY29uc3QgW3B1YmxpY0tleV0gPSBQdWJsaWNLZXkuZmluZFByb2dyYW1BZGRyZXNzU3luYyhcbiAgICAgICAgW2FkZHJlc3MudG9QdWJsaWNLZXkoKS50b0J1ZmZlcigpXSxcbiAgICAgICAgTVBMX0JVQkJMRUdVTV9QUk9HUkFNX0lELnRvUHVibGljS2V5KCksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGdldEJndW1TaWduZXIgPSAoKTogUHVibGljS2V5ID0+IHtcbiAgICAgIGNvbnN0IFtwdWJsaW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B1dCkge1xuICAgICAgICByZXR1cm4gbnVsbDtcbiAgICAgIH1cbiAgICAgIHJldHVybiBpbnB1dC5tYXAoKGRhdGEpID0+IHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICBhZGRyZXNzOiBkYXRhLmFkZHJlc3MudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBzaGFyZTogZGF0YS5zaGFyZSxcbiAgICAgICAgICB2ZXJpZmllZDogZmFsc2UsXG4gICAgICAgIH07XG4gICAgICB9KTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGludG9Db21wcmVzc2VkTmZ0SW5mcmEgPSAoXG4gICAgICBpbnB1dDogT3B0aW9uPElucHV0Q3JlYXRvcnNbXT4gfCB1bmRlZmluZWQsXG4gICAgKTogSW50ZXJuYWxDcmVhdG9yc1tdID0+IHtcbiAgICAgIGlmICghaW5wdXQpIHtcbiAgICAgICAgcmV0dXJuIFtdO1xuICAgICAgfVxuICAgICAgcmV0dXJuIGlucHV0IS5tYXAoKGRhdGEpID0+IHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICBhZGRyZXNzOiBkYXRhLmFkZHJlc3MudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBzaGFyZTogZGF0YS5zaGFyZSxcbiAgICAgICAgICB2ZXJpZmllZDogZmFsc2UsXG4gICAgICAgIH07XG4gICAgICB9KTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGludG9Vc2VyID0gKFxuICAgICAgb3V0cHV0OiBPcHRpb248SW50ZXJuYWxDcmVhdG9yc1tdPixcbiAgICApOiBDcmVhdG9yc1tdIHwgdW5kZWZpbmVkID0+IHtcbiAgICAgIGlmICghb3V0cHV0KSB7XG4gICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBvdXRwdXQubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczog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c3VsdHM6IERldGFpbHNbXSA9IFtdO1xuICAgICAga2V5cy5tYXAoKGtleSkgPT4ge1xuICAgICAgICBsZXQgcmVzITogUmVzdWx0PHN0cmluZywgVmFsaWRhdG9yRXJyb3I+O1xuICAgICAgICBzd2l0Y2ggKGtleSkge1xuICAgICAgICAgIGNhc2UgJ2ltYWdlJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuaW1hZ2UpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNJbWFnZVVybChtZXRhZGF0YS5pbWFnZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdyb3lhbHR5JzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEucm95YWx0eSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1JveWFsdHkobWV0YWRhdGEucm95YWx0eSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAg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nMiLCAiQWNjb3VudCIsICJQdWJsaWNLZXkiLCAiS2V5cGFpciIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlJlc3VsdCIsICJDb252ZXJ0ZXIiLCAiQ29sbGVjdGlvbiIsICJDb2xsZWN0aW9uTWludCIsICJDb252ZXJ0ZXIiLCAiQ3JlYXRvcnMiLCAiQ29udmVydGVyIiwgIkNvbXByZXNzZWROZnRNZXRhZGF0YSIsICJDb252ZXJ0ZXIiLCAiUm95YWx0eSIsICJDb252ZXJ0ZXIiLCAiTmZ0IiwgIkNvbnZlcnRlciIsICJNZW1vIiwgIkNvbnZlcnRlciIsICJNaW50IiwgIkNvbnZlcnRlciIsICJSZWd1bGFyTmZ0TWV0YWRhdGEiLCAiQ29udmVydGVyIiwgIlByb3BlcnRpZXMiLCAiQ29udmVydGVyIiwgIlVzZXMiLCAiQ29udmVydGVyIiwgIlRva2VuTWV0YWRhdGEiLCAiQ29udmVydGVyIiwgIlRyYW5zZmVyQ2hlY2tlZCIsICJDb252ZXJ0ZXIiLCAiVHJhbnNmZXIiLCAiQ29udmVydGVyIiwgIlZhbGlkYXRvciIsICJNZXNzYWdlIiwgIkNvbnZlcnRlciJdCn0K \ No newline at end of file +//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9iYXRjaC50cyIsICIuLi8uLi9ub2RlL3NyYy9pbmRleC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jb21tb24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvbWludC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9wYXJ0aWFsLXNpZ24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVp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W5nPihmZWVQYXllclBrKTtcbiAgICBjb25zdCBhY2NvdW50cyA9IG5ldyBTZXQ8c3RyaW5nPihmZWVQYXllclBrKTtcblxuICAgIGNvbnN0IGl4c1NpemUgPSB0cmFuc2FjdGlvbi5pbnN0cnVjdGlvbnMucmVkdWNlKChhY2MsIGl4KSA9PiB7XG4gICAgICBpeC5rZXlzLmZvckVhY2goKHsgcHVia2V5LCBpc1NpZ25lciB9KSA9PiB7XG4gICAgICAgIGNvbnN0IHBrID0gcHVia2V5LnRvQmFzZTU4KCk7XG4gICAgICAgIGlmIChpc1NpZ25lcikgc2lnbmVycy5hZGQocGspO1xuICAgICAgICBhY2NvdW50cy5hZGQocGspO1xuICAgICAgfSk7XG5cbiAgICAgIGFjY291bnRzLmFkZChpeC5wcm9ncmFtSWQudG9CYXNlNTgoKSk7XG5cbiAgICAgIGNvbnN0IG5JbmRleGVzID0gaXgua2V5cy5sZW5ndGg7XG4gICAgICBjb25zdCBvcGFxdWVEYXRhID0gaXguZGF0YS5sZW5ndGg7XG5cbiAgICAgIHJldHVybiAoXG4gICAgICAgIGFjYyArXG4gICAgICAgIDEgKyAvLyBQSUQgaW5kZXhcbiAgICAgICAgY29tcGFjdEFycmF5U2l6ZShuSW5kZXhlcywgMSkgK1xuICAgICAgICBjb21wYWN0QXJyYXlTaXplKG9wYXF1ZURhdGEsIDEpXG4gICAgICApO1xuICAgIH0sIDApO1xuXG4gICAgcmV0dXJuIChcbiAgICAgIGNvbXBhY3RBcnJheVNpemUoc2lnbmVycy5zaXplLCA2NCkgKyAvLyBzaWduYXR1cmVzXG4gICAgICAzICsgLy8gaGVhZGVyXG4gICAgICBjb21wYWN0QXJyYXlTaXplKGFjY291bnRzLnNpemUsIDMyKSArIC8vIGFjY291bnRzXG4gICAgICAzMiArIC8vIGJsb2NraGFzaFxuICAgICAgY29tcGFjdEhlYWRlcih0cmFuc2FjdGlvbi5pbnN0cnVjdGlvbnMubGVuZ3RoKSArIC8vIGluc3RydWN0aW9u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AgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEuc3ltYm9sKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU3ltYm9sKG1ldGFkYXRhLnN5bWJvbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAocmVzICYmIHJlcy5pc0Vycikge1xuICAgICAgICAgIHJlc3VsdHMucHVzaCguLi5yZXMuZXJyb3IuZGV0YWlscyk7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgICAgaWYgKHJlc3VsdHMubGVuZ3RoID4gMCkge1xuICAgICAgICBjb25zdCBtZXNzYWdlID1cbiAgICAgICAgICAnQ2F1Z2h0IGluIHRoZSB2YWx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UcmFuc2FjdGlvbkJ1aWxkZXIiLCAiUmVzdWx0IiwgIkNvbnZlcnRlciIsICJDb2xsZWN0aW9uIiwgIkNvbGxlY3Rpb25NaW50IiwgIkNvbnZlcnRlciIsICJDcmVhdG9ycyIsICJDb252ZXJ0ZXIiLCAiQ29tcHJlc3NlZE5mdE1ldGFkYXRhIiwgIkNvbnZlcnRlciIsICJSb3lhbHR5IiwgIkNvbnZlcnRlciIsICJOZnQiLCAiQ29udmVydGVyIiwgIk1lbW8iLCAiQ29udmVydGVyIiwgIk1pbnQiLCAiQ29udmVydGVyIiwgIlJlZ3VsYXJOZnRNZXRhZGF0YSIsICJDb252ZXJ0ZXIiLCAiUHJvcGVydGllcyIsICJDb252ZXJ0ZXIiLCAiVXNlcyIsICJDb252ZXJ0ZXIiLCAiVG9rZW5NZXRhZGF0YSIsICJDb252ZXJ0ZXIiLCAiVHJhbnNmZXJDaGVja2VkIiwgIkNvbnZlcnRlciIsICJUcmFuc2ZlciIsICJDb252ZXJ0ZXIiLCAiVmFsaWRhdG9yIiwgIk1lc3NhZ2UiLCAiQ29udmVydGVyIl0KfQo= \ No newline at end of file diff --git a/packages/test-tools/dist/index.js b/packages/test-tools/dist/index.js index 82715137e..027f39a44 100644 --- a/packages/test-tools/dist/index.js +++ b/packages/test-tools/dist/index.js @@ -483,14 +483,11 @@ var TransactionBuilder5; // ../global/src/index.ts var import_web39 = require("@solana/web3.js"); -// ../account/src/associated.ts -var import_spl_token = require("@solana/spl-token"); - // ../account/src/keypair.ts var import_web37 = require("@solana/web3.js"); var import_bs58 = __toESM(require("bs58")); var Account; -((Account5) => { +((Account4) => { class Keypair4 { secret; pubkey; @@ -526,111 +523,16 @@ var Account; }); }; } - Account5.Keypair = Keypair4; + Account4.Keypair = Keypair4; })(Account || (Account = {})); -// ../account/src/associated.ts -var Account2; -((Account5) => { - let Associated; - ((Associated2) => { - const RETRY_OVER_LIMIT = 10; - const RETRY_SLEEP_TIME = 3; - const get = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const res = await (0, Associated2.makeOrCreateInstruction)( - mint, - owner, - new Account.Keypair({ secret: feePayer }).pubkey, - allowOwnerOffCurve - ); - if (!res.inst) { - return res.tokenAccount; - } - return new TransactionBuilder6.Common( - [res.inst], - [], - feePayer.toKeypair(), - res.tokenAccount - ); - }; - Associated2.retryGetOrCreate = async (mint, owner, feePayer) => { - let counter = 1; - while (counter < RETRY_OVER_LIMIT) { - try { - const inst = await get(mint, owner, feePayer, true); - if (inst && typeof inst === "string") { - debugLog("# associatedTokenAccount: ", inst); - return inst; - } else if (inst instanceof TransactionBuilder6.Common) { - (await inst.submit()).map( - async (ok) => { - await Node.confirmedSig(ok); - return inst.data; - }, - (err) => { - debugLog("# Error submit retryGetOrCreate: ", err); - throw err; - } - ); - } - } catch (e) { - debugLog(`# retry: ${counter} create token account: `, e); - debugLog(`# mint: ${mint}, owner: ${owner}, feePayer: ${feePayer}`); - } - await sleep(RETRY_SLEEP_TIME); - counter++; - } - throw Error(`retry action is over limit ${RETRY_OVER_LIMIT}`); - }; - Associated2.makeOrCreateInstruction = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const associatedTokenAccount = (0, import_spl_token.getAssociatedTokenAddressSync)( - mint.toPublicKey(), - owner.toPublicKey(), - allowOwnerOffCurve, - import_spl_token.TOKEN_PROGRAM_ID, - import_spl_token.ASSOCIATED_TOKEN_PROGRAM_ID - ); - debugLog("# associatedTokenAccount: ", associatedTokenAccount.toString()); - try { - await (0, import_spl_token.getAccount)( - Node.getConnection(), - associatedTokenAccount, - Node.getConnection().commitment, - import_spl_token.TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst: void 0 - }; - } catch (error) { - if (!(error instanceof import_spl_token.TokenAccountNotFoundError) && !(error instanceof import_spl_token.TokenInvalidAccountOwnerError)) { - throw Error("Unexpected error"); - } - const payer = !feePayer ? owner : feePayer; - const inst = (0, import_spl_token.createAssociatedTokenAccountInstruction)( - payer.toPublicKey(), - associatedTokenAccount, - owner.toPublicKey(), - mint.toPublicKey(), - import_spl_token.TOKEN_PROGRAM_ID, - import_spl_token.ASSOCIATED_TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst - }; - } - }; - })(Associated = Account5.Associated || (Account5.Associated = {})); -})(Account2 || (Account2 = {})); - // ../account/src/pda.ts var import_web38 = require("@solana/web3.js"); var import_mpl_token_metadata = require("@metaplex-foundation/mpl-token-metadata"); var import_mpl_bubblegum = require("@metaplex-foundation/mpl-bubblegum"); var import_bn = __toESM(require("bn.js")); -var Account3; -((Account5) => { +var Account2; +((Account4) => { let Pda; ((Pda2) => { Pda2.getMetadata = (address) => { @@ -682,14 +584,13 @@ var Account3; ); return assetId.toString(); }; - })(Pda = Account5.Pda || (Account5.Pda = {})); -})(Account3 || (Account3 = {})); + })(Pda = Account4.Pda || (Account4.Pda = {})); +})(Account2 || (Account2 = {})); // ../account/src/index.ts -var Account4 = { - ...Account2, +var Account3 = { ...Account, - ...Account3 + ...Account2 }; // ../global/src/index.ts @@ -720,7 +621,7 @@ String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, op } return url; } - if (Account4.Keypair.isPubkey(addressOrSignature)) { + if (Account3.Keypair.isPubkey(addressOrSignature)) { if (explorer === "solanafm" /* SolanaFM */) { url = `${Constants.EXPLORER_SOLANAFM_URL}/address/${addressOrSignature}?cluster=${cluster}`; } else if (explorer === "xray" /* Xray */) { @@ -740,13 +641,13 @@ String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, op return url; }; String.prototype.toPublicKey = function() { - if (!Account4.Keypair.isPubkey(this.toString())) { + if (!Account3.Keypair.isPubkey(this.toString())) { throw Error(`No match KeyPair.PubKey: ${this.toString()}`); } return new import_web39.PublicKey(this.toString()); }; String.prototype.toKeypair = function() { - if (!Account4.Keypair.isSecret(this.toString())) { + if (!Account3.Keypair.isSecret(this.toString())) { throw Error(`No match KeyPair.Secret: ${this.toString()}`); } const decoded = import_bs582.default.decode(this.toString()); @@ -1771,7 +1672,7 @@ var SolNative3; })(SolNative3 || (SolNative3 = {})); // ../suite-sol-native/src/transfer-with-multisig.ts -var import_spl_token2 = require("@solana/spl-token"); +var import_spl_token = require("@solana/spl-token"); var SolNative4; ((SolNative6) => { const RADIX = 10; @@ -1780,7 +1681,7 @@ var SolNative4; const connection = Node.getConnection(); const payer = options.feePayer ? options.feePayer : multisig[0]; const keypairs = multisig.map((s) => s.toKeypair()); - const wrapped = await (0, import_spl_token2.createWrappedNativeAccount)( + const wrapped = await (0, import_spl_token.createWrappedNativeAccount)( connection, payer.toKeypair(), owner.toPublicKey(), @@ -1788,27 +1689,27 @@ var SolNative4; ); debugLog("# wrapped sol: ", wrapped.toBase58()); const instructions = []; - const token = await (0, import_spl_token2.createMint)( + const token = await (0, import_spl_token.createMint)( connection, payer.toKeypair(), owner.toPublicKey(), owner.toPublicKey(), 0 ); - const sourceToken = await Account4.Associated.retryGetOrCreate( + const sourceToken = await Account3.Associated.retryGetOrCreate( token.toString(), owner, payer ); debugLog("# sourceToken: ", sourceToken); - const destToken = await Account4.Associated.retryGetOrCreate( + const destToken = await Account3.Associated.retryGetOrCreate( token.toString(), wrapped.toString(), payer ); debugLog("# destToken: ", destToken); instructions.push( - (0, import_spl_token2.createTransferInstruction)( + (0, import_spl_token.createTransferInstruction)( sourceToken.toPublicKey(), destToken.toPublicKey(), owner.toPublicKey(), @@ -1818,7 +1719,7 @@ var SolNative4; ) ); instructions.push( - (0, import_spl_token2.createCloseAccountInstruction)( + (0, import_spl_token.createCloseAccountInstruction)( wrapped, dest.toPublicKey(), owner.toPublicKey(), @@ -1867,4 +1768,4 @@ var requestSol = async (pubkey, sol = 0.1) => { 0 && (module.exports = { requestSol }); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uL3NyYy9yZXF1ZXN0LXNvbC50cyIsICIuLi8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IFB1YmtleSxcbiAgICAgIG93bmVyOiBQdWJrZXksXG4gICAgICBmZWVQYXllcjogU2VjcmV0LFxuICAgICk6IFByb21pc2U8c3RyaW5nPiA9PiB7XG4gICAgICBsZXQgY291bnRlciA9IDE7XG4gICAgICB3aGlsZSAoY291bnRlciA8IFJFVFJZX09WRVJfTElNSVQpIHtcbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICBjb25zdCBpbnN0ID0gYXdhaXQgZ2V0KG1pbnQsIG93bmVyLCBmZWVQYXllciwgdHJ1ZSk7XG5cbiAgICAgICAgICBpZiAoaW5zdCAmJiB0eXBlb2YgaW5zdCA9PT0gJ3N0cmluZycpIHtcbiAgICAgICAgICAgIGRlYnVnTG9nKCcjIGFzc29jaWF0ZWRUb2tlbkFjY291bnQ6ICcsIGluc3QpO1xuICAgICAgICAgICAgcmV0dXJuIGluc3Q7XG4gICAgICAgICAgfSBlbHNlIGlmIChpbnN0IGluc3RhbmNlb2YgVHJhbnNhY3Rpb25CdWlsZGVyLkNvbW1vbikge1xuICAgICAgICAgICAgKGF3YWl0IGluc3Quc3VibWl0KCkpLm1hcChcbiAgICAgICAgICAgICAgYXN5bmMgKG9rOiBzdHJpbmcpID0+IHtcbiAgICAgICAgICAgICAgICBhd2FpdCBOb2RlLmNvbmZpcm1lZFNpZyhvayk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGluc3QuZGF0YTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgKGVycjogRXJyb3IpID0+IHtcbiAgICAgICAgICAgICAgICBkZWJ1Z0xvZygnIyBFcnJvciBzdWJtaXQgcmV0cnlHZXRPckNyZWF0ZTogJywgZXJyKTtcbiAgICAgICAgICAgICAgICB0aHJvdyBlcnI7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgIGRlYnVnTG9nKGAjIHJldHJ5OiAke2NvdW50ZXJ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GVkVG9rZW5BZGRyZXNzU3luYyhcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICBhbGxvd093bmVyT2ZmQ3VydmUsXG4gICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGFzc29jaWF0ZWRUb2tlbkFjY291bnQ6ICcsIGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSk7XG5cbiAgICAgIHRyeSB7XG4gICAgICAgIC8vIERvbnQgdXNlIFJlc3VsdFxuICAgICAgICBhd2FpdCBnZXRBY2NvdW50KFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCkuY29tbWl0bWVudCxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3Q6IHVuZGVmaW5lZCxcbiAgICAgICAgfTtcbiAgICAgIH0gY2F0Y2ggKGVycm9yOiB1bmtub3duKSB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5BY2NvdW50Tm90Rm91bmRFcnJvcikgJiZcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5JbnZhbGlkQWNjb3VudE93bmVyRXJyb3IpXG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9yKCdVbmV4cGVjdGVkIGVycm9yJyk7XG4gICAgICAgIH1cblxuICAgICAgICBjb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RjaCAoa2V5KSB7XG4gICAgICAgICAgY2FzZSAnaW1hZ2UnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5pbWFnZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc0ltYWdlVXJsKG1ldGFkYXRhLmltYWdlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3JveWFsdHknOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5yb3lhbHR5KSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzUm95YWx0eShtZXRhZGF0YS5yb3lhbHR5KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlcl9mZWVfYmFzaXNfcG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJGZWVCYXNpc1BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0YW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b25zdCBwb3N0VG9rZW5BY2NvdW50ID0gY3JlYXRlUG9zdFRva2VuQWNjb3VudExpc3QodHhNZXRhKTtcbiAgICAgIHR4TWV0YS50cmFuc2FjdGlvbi5tZXNzYWdlLmluc3RydWN0aW9ucy5mb3JFYWNoKChpbnN0cnVjdGlvbikgPT4ge1xuICAgICAgICBpZiAoaXNQYXJzZWRJbnN0cnVjdGlvbihpbnN0cnVjdGlvbikpIHtcbiAgICAgICAgICBzd2l0Y2ggKGZpbHRlclR5cGUpIHtcbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5NZW1vOiB7XG4gICAgICAgICAgICAgIGlmIChGaWx0ZXJPcHRpb25zLk1lbW8ucHJvZ3JhbS5pbmNsdWRlcyhpbnN0cnVjdGlvbi5wcm9ncmFtKSkge1xuICAgICAgICAgICAgICAgIGxldCBpbnN0cnVjdGlvblRyYW5zZmVyO1xuXG4gICAgICAgICAgICAgICAgLy8gZmV0Y2ggIHRyYW5zZmVyIHRyYW5zYWN0aW9uIGZvciByZWxhdGlvbmFsIG1lbW9cbiAgICAgICAgICAgICAgICB0eE1ldGEudHJhbnNhY3Rpb24ubWVzc2FnZS5pbnN0cnVjdGlvbnMuZm9yRWFjaChcbiAgICAgICAgICAgICAgICAgIChpbnN0cnVjdGlvbikgPT4ge1xuICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgaXNQYXJzZWRJbnN0cnVjdGlvbihpbnN0cnVjdGlvbikgJiZcbiAgICAgICAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLlRyYW5zZmVyLnByb2dyYW0uaW5jbHVkZXMoXG4gICAgICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbi5wcm9ncmFtLFxuICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlciA9IGluc3RydWN0aW9uO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICk7XG5cbiAgICAgICAgICAgICAgICAvLyBzcGwtdG9rZW4gb3Igc3lzdGVtXG4gICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlciAmJlxuICAgICAgICAgICAgICAgICAgbW9kdWxlTmFtZSAhPT0gaW5zdHJ1Y3Rpb25UcmFuc2ZlclsncHJvZ3JhbSddXG4gICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICBkZWJ1Z0xvZyhcbiAgICAgICAgICAgICAgICAgICAgJyMgRmlsdGVyVHlwZS5NZW1vIGJyZWFrIGluc3RydWN0aW9uOiAnLFxuICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyLFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vIGZldGNoIG1lbW8gb25seSB0cmFuc2FjdGlvblxuICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuTWVtby5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIsXG4gICAgICAgICAgICAgICAgICBwb3N0VG9rZW5BY2NvdW50LFxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXNlIEZpbHRlclR5cGUuT25seU1lbW86IHtcbiAgICAgICAgICAgICAgaWYgKEZpbHRlck9wdGlvbnMuTWVtby5wcm9ncmFtLmluY2x1ZGVzKGluc3RydWN0aW9uLnByb2dyYW0pKSB7XG4gICAgICAgICAgICAgICAgbGV0IGluc3RydWN0aW9uVHJhbnNmZXI7XG5cbiAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLk1lbW8uaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyLFxuICAgICAgICAgICAgICAgICAgcG9zdFRva2VuQWNjb3VudCxcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLk1pbnQ6IHtcbiAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuTWludC5wcm9ncmFtLmluY2x1ZGVzKGluc3RydWN0aW9uLnByb2dyYW0pICYmXG4gICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5NaW50LmFjdGlvbi5pbmNsdWRlcyhcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLnBhcnNlZC50eXBlIGFzIHN0cmluZyxcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuTWludC5pbnRvVXNlclNpZGUoaW5zdHJ1Y3Rpb24sIHR4TWV0YSk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXNlIEZpbHRlclR5cGUuVHJhbnNmZXI6XG4gICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICBtb2R1bGVOYW1lID09PSBpbnN0cnVjdGlvbi5wcm9ncmFtICYmXG4gICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5UcmFuc2Zlci5hY3Rpb24uaW5jbHVkZXMoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbi5wYXJzZWQudHlwZSBhcyBzdHJpbmcsXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICBpZiAoaW5zdHJ1Y3Rpb24ucGFyc2VkLnR5cGUgPT09ICd0cmFuc2ZlckNoZWNrZWQnKSB7XG4gICAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLlRyYW5zZmVyQ2hlY2tlZC5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICAgIHBvc3RUb2tlbkFjY291bnQsXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLlRyYW5zZmVyLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIHJldHVybiBoaXN0b3J5O1xuICAgIH07XG59XG4iLCAiaW1wb3J0IHsgUGFyc2VkQWNjb3VudERhdGEgfSBmcm9tICdAc29sYW5hL3dlYjMuanMnO1xuaW1wb3J0IHsgUmVzdWx0LCBUcnkgfSBmcm9tICd+L3N1aXRlLXV0aWxzJztcbmltcG9ydCB7IE5vZGUgfSBmcm9tICd+L25vZGUnO1xuaW1wb3J0IHsgT3duZXJJbmZvLCBQdWJrZXkgfSBmcm9tICd+L3R5cGVzL2FjY291bnQnO1xuaW1wb3J0IHsgVHJhbnNhY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oKSxcbiAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgcGFyc2VJbnQoYCR7YW1vdW50LnRvTGFtcG9ydHMoKX1gLCBSQURJWCksXG4gICAgICApO1xuXG4gICAgICBkZWJ1Z0xvZygnIyB3cmFwcGVkIHNvbDogJywgd3JhcHBlZC50b0Jhc2U1OCgpKTtcblxuICAgICAgY29uc3QgaW5zdHJ1Y3Rpb25zID0gW107XG5cbiAgICAgIGNvbnN0IHRva2VuID0gYXdhaXQgY3JlYXRlTWludChcbiAgICAgICAgY29ubmVjdGlvbixcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIDAsXG4gICAgICApO1xuXG4gICAgICBjb25zdCBzb3VyY2VUb2tlbiA9IGF3YWl0IEFjY291bnQuQXNzb2NpYXRlZC5yZXRyeUdldE9yQ3JlYXRlKFxuICAgICAgICB0b2tlbi50b1N0cmluZygpLFxuICAgICAgICBvd25lcixcbiAgICAgICAgcGF5ZXIsXG4gICAgICApO1xuXG4gICAgICBkZWJ1Z0xvZygnIyBzb3VyY2VUb2tlbjogJywgc291cmNlVG9rZW4pO1xuXG4gICAgICBjb25zdCBkZXN0VG9rZW4gPSBhd2FpdCBBY2NvdW50LkFzc29jaWF0ZWQucmV0cnlHZXRPckNyZWF0ZShcbiAgICAgICAgdG9rZW4udG9TdHJpbmcoKSxcbiAgICAgICAgd3JhcHBlZC50b1N0cmluZygpLFxuICAgICAgICBwYXllcixcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGRlc3RUb2tlbjogJywgZGVzdFRva2VuKTtcblxuICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgIGNyZWF0ZVRyYW5zZmVySW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgc291cmNlVG9rZW4udG9QdWJsaWNLZXk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xufVxuXG5BcnJheS5wcm90b3R5cGUuc3VibWl0ID0gYXN5bmMgZnVuY3Rpb24gKGZlZVBheWVyPzogU2VjcmV0KSB7XG4gIGlmIChmZWVQYXllcikge1xuICAgIGxldCBpID0gMTtcbiAgICBmb3IgYXdhaXQgKGNvbnN0IG9iaiBvZiB0aGlzKSB7XG4gICAgICBpZiAob2JqLmlzRXJyKSB7XG4gICAgICAgIHJldHVybiBvYmo7XG4gICAgICB9IGVsc2UgaWYgKG9iai52YWx1ZS5jYW5TdWJtaXQpIHtcbiAgICAgICAgZGVidWdMb2coJyMgUmVzdWx0IGJhdGNoIGNhblN1Ym1pdCcpO1xuICAgICAgICBjb25zdCBzaWcgPSBhd2FpdCAob2JqIGFzIFBhcnRpYWxTaWduU3RydWN0dXJlKS5zdWJtaXQoZmVlUGF5ZXIpO1xuICAgICAgICBpZiAoc2lnLmlzRXJyKSB7XG4gICAgICAgICAgcmV0dXJuIHNpZztcbiAgICAgICAgfVxuICAgICAgICBhd2FpdCBOb2RlLmNvbmZpcm1lZFNpZyhzaWcudmFsdWUpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgZGVidWdMb2coJyMgUmVzdWx0IGJhdGNoIG90aGVyIHRoYW4gY2FuU3VibWl0Jyk7XG4gICAgICAgIGlmICh0aGlzLmxlbmd0aCA9PSBpKSB7XG4gICAgICAgICAgLy8gbGFzdCBvYmplY3RcbiAgICAgICAgICByZXR1cm4gb2JqLnN1Ym1pdChmZWVQYXllcik7XG4gICAgICAgIH1cbiAgICAgICAgb2JqLnN1Ym1pdChmZWVQYXllcik7XG4gICAgICB9XG4gICAgICBpKys7XG4gICAgfVxuICB9IGVsc2Uge1xuICAgIGNvbnN0IGluc3RydWN0aW9uczogQ29tbW9uU3RydWN0dXJlIHwgTWludFN0cnVjdHVyZVtdID0gW107XG4gICAgZm9yIChjb25zdCBvYmogb2YgdGhpcykge1xuICAgICAgaWYgKG9iai5pc0Vycikge1xuICAgICAgICByZXR1cm4gb2Jq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O1xuICAgICAgICBzd2l0Y2ggKGtleSkge1xuICAgICAgICAgIGNhc2UgJ2ltYWdlJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuaW1hZ2UpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNJbWFnZVVybChtZXRhZGF0YS5pbWFnZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdyb3lhbHR5JzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEucm95YWx0eSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1JveWFsdHkobWV0YWRhdGEucm95YWx0eSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ25hbWUnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLm5hbWUpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNOYW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AgICAgICAgICAgICApO1xuXG4gICAgICAgICAgICAgICAgLy8gc3BsLXRva2VuIG9yIHN5c3RlbVxuICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIgJiZcbiAgICAgICAgICAgICAgICAgIG1vZHVsZU5hbWUgIT09IGluc3RydWN0aW9uVHJhbnNmZXJbJ3Byb2dyYW0nXVxuICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgZGVidWdMb2coXG4gICAgICAgICAgICAgICAgICAgICcjIEZpbHRlclR5cGUuTWVtbyBicmVhayBpbnN0cnVjdGlvbjogJyxcbiAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlcixcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAvLyBmZXRjaCBtZW1vIG9ubHkgdHJhbnNhY3Rpb25cbiAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLk1lbW8uaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyLFxuICAgICAgICAgICAgICAgICAgcG9zdFRva2VuQWNjb3VudCxcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLk9ubHlNZW1vOiB7XG4gICAgICAgICAgICAgIGlmIChGaWx0ZXJPcHRpb25zLk1lbW8ucHJvZ3JhbS5pbmNsdWRlcyhpbnN0cnVjdGlvbi5wcm9ncmFtKSkge1xuICAgICAgICAgICAgICAgIGxldCBpbnN0cnVjdGlvblRyYW5zZmVyO1xuXG4gICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5NZW1vLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlcixcbiAgICAgICAgICAgICAgICAgIHBvc3RUb2tlbkFjY291bnQsXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5NaW50OiB7XG4gICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLk1pbnQucHJvZ3JhbS5pbmNsdWRlcyhpbnN0cnVjdGlvbi5wcm9ncmFtKSAmJlxuICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuTWludC5hY3Rpb24uaW5jbHVkZXMoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbi5wYXJzZWQudHlwZSBhcyBzdHJpbmcsXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLk1pbnQuaW50b1VzZXJTaWRlKGluc3RydWN0aW9uLCB0eE1ldGEpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLlRyYW5zZmVyOlxuICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgbW9kdWxlTmFtZSA9PT0gaW5zdHJ1Y3Rpb24ucHJvZ3JhbSAmJlxuICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuVHJhbnNmZXIuYWN0aW9uLmluY2x1ZGVzKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24ucGFyc2VkLnR5cGUgYXMgc3RyaW5nLFxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgaWYgKGluc3RydWN0aW9uLnBhcnNlZC50eXBlID09PSAndHJhbnNmZXJDaGVja2VkJykge1xuICAgICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5UcmFuc2ZlckNoZWNrZWQuaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgICBwb3N0VG9rZW5BY2NvdW50LFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5UcmFuc2Zlci5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgICByZXR1cm4gaGlzdG9yeTtcbiAgICB9O1xufVxuIiwgImltcG9ydCB7IFBhcnNlZEFjY291bnREYXRhIH0gZnJvbSAnQHNvbGFuYS93ZWIzLmpzJztcbmltcG9ydCB7IFJlc3VsdCwgVHJ5IH0gZnJvbSAnfi9zdWl0ZS11dGlscyc7XG5pbXBvcnQgeyBOb2RlIH0gZnJvbSAnfi9ub2RlJztcbmltcG9ydCB7IE93bmVySW5mbywgUHVia2V5IH0gZnJvbSAnfi90eXBlcy9hY2NvdW50JztcbmltcG9ydCB7IFRyYW5zYWN0aW9uRmlsdGVyIH0gZnJvbSAnfi90cmFuc2FjdGlvbi1maWx0ZXInO1xuXG5leHB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gICAgIHBhcnNlSW50KGAke2Ftb3VudC50b0xhbXBvcnRzKCl9YCwgUkFESVgpLFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgd3JhcHBlZCBzb2w6ICcsIHdyYXBwZWQudG9CYXNlNTgoKSk7XG5cbiAgICAgIGNvbnN0IGluc3RydWN0aW9ucyA9IFtdO1xuXG4gICAgICBjb25zdCB0b2tlbiA9IGF3YWl0IGNyZWF0ZU1pbnQoXG4gICAgICAgIGNvbm5lY3Rpb24sXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAwLFxuICAgICAgKTtcblxuICAgICAgY29uc3Qgc291cmNlVG9rZW4gPSBhd2FpdCBBY2NvdW50LkFzc29jaWF0ZWQucmV0cnlHZXRPckNyZWF0ZShcbiAgICAgICAgdG9rZW4udG9TdHJpbmcoKSxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIHBheWVyLFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgc291cmNlVG9rZW46ICcsIHNvdXJjZVRva2VuKTtcblxuICAgICAgY29uc3QgZGVzdFRva2VuID0gYXdhaXQgQWNjb3VudC5Bc3NvY2lhdGVkLnJldHJ5R2V0T3JDcmVhdGUoXG4gICAgICAgIHRva2VuLnRvU3RyaW5nKCksXG4gICAgICAgIHdyYXBwZWQudG9TdHJpbmcoKSxcbiAgICAgICAgcGF5ZXIsXG4gICAgICApO1xuXG4gICAgICBkZWJ1Z0xvZygnIyBkZXN0VG9rZW46ICcsIGRlc3RUb2tlbik7XG5cbiAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICBjcmVhdGVUcmFuc2Zlckluc3RydWN0aW9uKFxuICAgICAgICAgIHNvdXJjZVRva2VuLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgZGVzdFRva2VuLnRvUHVibGljS2V5KCksXG4g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CAiU2lnbmF0dXJlcyIsICJUcmFuc2FjdGlvbkZpbHRlciIsICJpbnN0cnVjdGlvbiIsICJDb252ZXJ0ZXIiLCAiU29sTmF0aXZlIiwgImltcG9ydF93ZWIzIiwgIlNvbE5hdGl2ZSIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiaW1wb3J0X3dlYjMiLCAiU29sTmF0aXZlIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJTb2xOYXRpdmUiLCAiQWNjb3VudCIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiU29sTmF0aXZlIiwgImZzIiwgIlNvbE5hdGl2ZSIsICJhc3NlcnQiXQp9Cg== \ No newline at end of file diff --git a/packages/test-tools/dist/index.mjs b/packages/test-tools/dist/index.mjs index 4131bc3f6..0f715a579 100644 --- a/packages/test-tools/dist/index.mjs +++ b/packages/test-tools/dist/index.mjs @@ -458,22 +458,11 @@ var TransactionBuilder5; // ../global/src/index.ts import { Keypair as Keypair3, LAMPORTS_PER_SOL, PublicKey as PublicKey4 } from "@solana/web3.js"; -// ../account/src/associated.ts -import { - ASSOCIATED_TOKEN_PROGRAM_ID, - createAssociatedTokenAccountInstruction, - getAccount, - getAssociatedTokenAddressSync, - TOKEN_PROGRAM_ID, - TokenAccountNotFoundError, - TokenInvalidAccountOwnerError -} from "@solana/spl-token"; - // ../account/src/keypair.ts import { Keypair as Original, PublicKey as PublicKey2 } from "@solana/web3.js"; import bs from "bs58"; var Account; -((Account5) => { +((Account4) => { class Keypair4 { secret; pubkey; @@ -509,111 +498,16 @@ var Account; }); }; } - Account5.Keypair = Keypair4; + Account4.Keypair = Keypair4; })(Account || (Account = {})); -// ../account/src/associated.ts -var Account2; -((Account5) => { - let Associated; - ((Associated2) => { - const RETRY_OVER_LIMIT = 10; - const RETRY_SLEEP_TIME = 3; - const get = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const res = await (0, Associated2.makeOrCreateInstruction)( - mint, - owner, - new Account.Keypair({ secret: feePayer }).pubkey, - allowOwnerOffCurve - ); - if (!res.inst) { - return res.tokenAccount; - } - return new TransactionBuilder6.Common( - [res.inst], - [], - feePayer.toKeypair(), - res.tokenAccount - ); - }; - Associated2.retryGetOrCreate = async (mint, owner, feePayer) => { - let counter = 1; - while (counter < RETRY_OVER_LIMIT) { - try { - const inst = await get(mint, owner, feePayer, true); - if (inst && typeof inst === "string") { - debugLog("# associatedTokenAccount: ", inst); - return inst; - } else if (inst instanceof TransactionBuilder6.Common) { - (await inst.submit()).map( - async (ok) => { - await Node.confirmedSig(ok); - return inst.data; - }, - (err) => { - debugLog("# Error submit retryGetOrCreate: ", err); - throw err; - } - ); - } - } catch (e) { - debugLog(`# retry: ${counter} create token account: `, e); - debugLog(`# mint: ${mint}, owner: ${owner}, feePayer: ${feePayer}`); - } - await sleep(RETRY_SLEEP_TIME); - counter++; - } - throw Error(`retry action is over limit ${RETRY_OVER_LIMIT}`); - }; - Associated2.makeOrCreateInstruction = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const associatedTokenAccount = getAssociatedTokenAddressSync( - mint.toPublicKey(), - owner.toPublicKey(), - allowOwnerOffCurve, - TOKEN_PROGRAM_ID, - ASSOCIATED_TOKEN_PROGRAM_ID - ); - debugLog("# associatedTokenAccount: ", associatedTokenAccount.toString()); - try { - await getAccount( - Node.getConnection(), - associatedTokenAccount, - Node.getConnection().commitment, - TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst: void 0 - }; - } catch (error) { - if (!(error instanceof TokenAccountNotFoundError) && !(error instanceof TokenInvalidAccountOwnerError)) { - throw Error("Unexpected error"); - } - const payer = !feePayer ? owner : feePayer; - const inst = createAssociatedTokenAccountInstruction( - payer.toPublicKey(), - associatedTokenAccount, - owner.toPublicKey(), - mint.toPublicKey(), - TOKEN_PROGRAM_ID, - ASSOCIATED_TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst - }; - } - }; - })(Associated = Account5.Associated || (Account5.Associated = {})); -})(Account2 || (Account2 = {})); - // ../account/src/pda.ts import { PublicKey as PublicKey3 } from "@solana/web3.js"; import { PROGRAM_ID } from "@metaplex-foundation/mpl-token-metadata"; import { MPL_BUBBLEGUM_PROGRAM_ID } from "@metaplex-foundation/mpl-bubblegum"; import BN from "bn.js"; -var Account3; -((Account5) => { +var Account2; +((Account4) => { let Pda; ((Pda2) => { Pda2.getMetadata = (address) => { @@ -665,14 +559,13 @@ var Account3; ); return assetId.toString(); }; - })(Pda = Account5.Pda || (Account5.Pda = {})); -})(Account3 || (Account3 = {})); + })(Pda = Account4.Pda || (Account4.Pda = {})); +})(Account2 || (Account2 = {})); // ../account/src/index.ts -var Account4 = { - ...Account2, +var Account3 = { ...Account, - ...Account3 + ...Account2 }; // ../global/src/index.ts @@ -703,7 +596,7 @@ String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, op } return url; } - if (Account4.Keypair.isPubkey(addressOrSignature)) { + if (Account3.Keypair.isPubkey(addressOrSignature)) { if (explorer === "solanafm" /* SolanaFM */) { url = `${Constants.EXPLORER_SOLANAFM_URL}/address/${addressOrSignature}?cluster=${cluster}`; } else if (explorer === "xray" /* Xray */) { @@ -723,13 +616,13 @@ String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, op return url; }; String.prototype.toPublicKey = function() { - if (!Account4.Keypair.isPubkey(this.toString())) { + if (!Account3.Keypair.isPubkey(this.toString())) { throw Error(`No match KeyPair.PubKey: ${this.toString()}`); } return new PublicKey4(this.toString()); }; String.prototype.toKeypair = function() { - if (!Account4.Keypair.isSecret(this.toString())) { + if (!Account3.Keypair.isSecret(this.toString())) { throw Error(`No match KeyPair.Secret: ${this.toString()}`); } const decoded = bs2.decode(this.toString()); @@ -1786,13 +1679,13 @@ var SolNative4; owner.toPublicKey(), 0 ); - const sourceToken = await Account4.Associated.retryGetOrCreate( + const sourceToken = await Account3.Associated.retryGetOrCreate( token.toString(), owner, payer ); debugLog("# sourceToken: ", sourceToken); - const destToken = await Account4.Associated.retryGetOrCreate( + const destToken = await Account3.Associated.retryGetOrCreate( token.toString(), wrapped.toString(), payer @@ -1857,4 +1750,4 @@ var requestSol = async (pubkey, sol = 0.1) => { export { requestSol }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL3JlcXVlc3Qtc29sLnRzIiwgIi4uLy4uL3N1aXRlLXV0aWxzL3NyYy9jb25zdGFudHMudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvYmF0Y2gudHMiLCAiLi4vLi4vbm9kZS9zcmMvaW5kZXgudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY29tbW9uLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL21pbnQudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvcGFydGlhbC1zaWduLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2NhbGN1bGF0ZS10eHNpemUudHMiLCAiLi4vLi4vZ2xvYmFsL3NyYy9pbmRleC50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9hc3NvY2lhdGVkLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2tleXBhaXIudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvcGRhLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3N1aXRlLXV0aWxzL3NyYy9zaGFyZWQudHMiLCAiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL3Jlc3VsdC50cyIsICIuLi8uLi9jb252ZXJ0ZXIvc3JjL2NvbGxlY3Rpb24udHMiLCAiLi4vLi4vY29udmVydGVyL3NyYy9jcmVhdG9ycy50cyIsICI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AgICAgICByZXR1cm4gQ29uc3RhbnRzLkVuZFBvaW50VXJsLmRldjtcbiAgICAgIGRlZmF1bHQ6XG4gICAgICAgIHJldHVybiBDb25zdGFudHMuRW5kUG9pbnRVcmwubG9jYWxob3N0O1xuICAgIH1cbiAgfTtcblxuICBleHBvcnQgY29uc3Qgc3dpdGNoQnVuZGxyID0gKGVudjogc3RyaW5nKTogc3RyaW5nID0+IHtcbiAgICBzd2l0Y2ggKGVudikge1xuICAgICAgY2FzZSBDb25zdGFudHMuQ2x1c3Rlci5wcmQ6IHtcbiAgICAgICAgY29uc3QgdXJscyA9IENvbnN0YW50cy5CdW5kbHJVcmwucHJkLnNwbGl0KCcsJyk7XG4gICAgICAgIGNvbnN0IGluZGV4ID0gRGF0ZS5ub3coKSAlIHVybHMubGVuZ3RoO1xuICAgICAgICByZXR1cm4gdXJsc1tpbmRleF07XG4gICAgICB9XG4gICAgICBkZWZhdWx0OiB7XG4gICAgICAgIHJldHVybiBDb25zdGFudHMuQnVuZGxyVXJsLmRldjtcbiAgICAgIH1cbiAgICB9XG4gIH07XG5cbiAgZXhwb3J0IGNvbnN0IHN3aXRjaERhc0FwaSA9IChlbnY6IHN0cmluZyk6IHN0cmluZyA9PiB7XG4gICAgc3dpdGNoIChlbnYpIHtcbiAgICAgIGNhc2UgQ29uc3RhbnRzLkNsdXN0ZXIucHJkOiB7XG4gICAgICAgIGlmIChkYXNBcGlVcmwubGVuZ3RoIDwgMSkge1xuICAgICAgICAgIHRocm93IEVycm9yKENvbnN0YW50cy5XYXJubmluZ01lc3NhZ2UuREFTX0FQSV9VUkwpO1xuICAgICAgICB9XG4gICAgICAgIGNvbnN0IHVybHMgPSBDb25zdGFudHMuQnVuZGxyVXJsLnByZC5zcGxpdCgnLCcpO1xuICAgICAgICBjb25zdCBpbmRleCA9IERhdGUubm93KCkgJSB1cmxzLmxlbmd0aDtcbiAgICAgICAgcmV0dXJuIHVybHNbaW5kZXhdO1xuICAgICAgfVxuICAgICAgZGVmY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1xuICAgIC8vQGludGVybmFsXG4gICAgY29uc3QgZ2V0ID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyOiBTZWNyZXQsXG4gICAgICBhbGxvd093bmVyT2ZmQ3VydmUgPSBmYWxzZSxcbiAgICApOiBQcm9taXNlPHN0cmluZyB8IENvbW1vblN0cnVjdHVyZTxQdWJrZXk+PiA9PiB7XG4gICAgICBjb25zdCByZXMgPSBhd2FpdCBtYWtlT3JDcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIG5ldyBLZXlwYWlyLktleXBhaXIoeyBzZWNyZXQ6IGZlZVBheWVyIH0pLnB1YmtleSxcbiAgICAgICAgYWxsb3dPd25lck9mZkN1cnZlLFxuICAgICAgKTtcblxuICAgICAgaWYgKCFyZXMuaW5zdCkge1xuICAgICAgICByZXR1cm4gcmVzLnRva2VuQWNjb3VudDtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uPFB1YmtleT4oXG4gICAgICAgIFtyZXMuaW5zdF0sXG4gICAgICAgIFtdLFxuICAgICAgICBmZWVQYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgcmVzLnRva2VuQWNjb3VudCEsXG4gICAgICApO1xuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiBSZXRyeSBmdW5jdGlvbiBpZiBjcmVhdGUgbmV3IHRva2VuIGFjY291aW50XG4gICAgICpcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gbWludFxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBvd25lclxuICAgICAqIEBwYXJhbSB7U2VjcmV0fSBmZWVQYXllclxuICAgICAqIEByZXR1cm5zIFByb21pc2U8c3RyaW5nPlxuICAgICAqL1xuICAgIGV4cG9ydCBjb25zdCByZXRyeUdldE9yQ3JlYXRlID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyOiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxzdHJpbmc+ID0+IHtcbiAgICAgIGxldCBjb3VudGVyID0gMTtcbiAgICAgIHdoaWxlIChjb3VudGVyIDwgUkVUUllfT1ZFUl9MSU1JVCkge1xuICAgICAgICB0cnkge1xuICAgICAgICAgIGNvbnN0IGluc3QgPSBhd2FpdCBnZXQobWludCwgb3duZXIsIGZlZVBheWVyLCB0cnVlKTtcblxuICAgICAgICAgIGlmIChpbnN0ICYmIHR5cGVvZiBpbnN0ID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgaW5zdCk7XG4gICAgICAgICAgICByZXR1cm4gaW5zdDtcbiAgICAgICAgICB9IGVsc2UgaWYgKGluc3QgaW5zdGFuY2VvZiBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uKSB7XG4gICAgICAgICAgICAoYXdhaXQgaW5zdC5zdWJtaXQoKSkubWFwKFxuICAgICAgICAgICAgICBhc3luYyAob2s6IHN0cmluZykgPT4ge1xuICAgICAgICAgICAgICAgIGF3YWl0IE5vZGUuY29uZmlybWVkU2lnKG9rKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gaW5zdC5kYXRhO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAoZXJyOiBFcnJvcikgPT4ge1xuICAgICAgICAgICAgICAgIGRlYnVnTG9nKCcjIEVycm9yIHN1Ym1pdCByZXRyeUdldE9yQ3JlYXRlOiAnLCBlcnIpO1xuICAgICAgICAgICAgICAgIHRocm93IGVycjtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgZGVidWdMb2coYCMgcmV0cnk6IC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zc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jKFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSxcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3QsXG4gICAgICAgIH07XG4gICAgICB9XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IEtleXBhaXIgYXMgT3JpZ2luYWwsIFB1YmxpY0tleSB9IGZyb20gJ0Bzb2xhbmEvd2ViMy5qcyc7XG5pbXBvcnQgeyBQdWJrZXksIFNlY3JldCB9IGZyb20gJ34vdHlwZXMvYWNjb3VudCc7XG5pbXBvcnQgYnMgZnJvbSAnYnM1OCc7XG5cbmV4cG9ydCBuYW1lc3BhY2UgQWNjb3VudCB7XG4gIGV4cG9ydCBjbGFzcyBLZXlwYWlyIHtcbiAgICBzZWNyZXQ6IFNlY3JldDtcbiAgICBwdWJrZXk6IFB1YmtleTtcblxuICAgIGNvbnN0cnVjdG9yKHBhcmFtczogeyBwdWJrZXk/OiBQdWJrZXk7IHNlY3JldDogU2VjcmV0IH0pIHtcbiAgICAgIGlmICghcGFyYW1zLnB1YmtleSkge1xuICAgICAgICBjb25zdCBrZXlwYWlyID0gcGFyYW1zLnNlY3JldC50b0tleXBhaXIoKT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4gaW5wdXQubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvQ29tcHJlc3NlZE5mdEluZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IEludGVybmFsQ3JlYXRvcnNbXSA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBbXTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBpbnB1dCEubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlciA9IChcbiAgICAgIG91dHB1dDogT3B0aW9uPEludGVybmFsQ3JlYXRvcnNbXT4sXG4gICAgKTogQ3JlYXRvcnNbXSB8IHVuZGVmaW5lZCA9PiB7XG4gICAgICBpZiAoIW91dHB1dCkge1xuICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gb3V0cHV0Lm1hcCgoZGF0YSkgPT4ge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIGFkZHJlc3M6IGRhdGEuYWRkcmVzcy50b1N0cmluZygpLFxuICAgICAgICAgIHNoYXJlOiBkYXRhLnNoYXJ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mFnZVR5cGU6IFN0b3JhZ2VUeXBlLFxuICAgICAgZmVlUGF5ZXI/OiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxQcm9wZXJ0aWVzPiA9PiB7XG4gICAgICBpZiAoIWlucHV0IHx8ICFpbnB1dC5maWxlcykge1xuICAgICAgICByZXR1cm4ge307XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGZpbGVzID0gYXdhaXQgUHJvbWlzZS5hbGwoXG4gICAgICAgIGlucHV0LmZpbGVzLm1hcChhc3luYyAoZmlsZSkgPT4ge1xuICAgICAgICAgIGlmICghZmlsZS5maWxlUGF0aCkge1xuICAgICAgICAgICAgcmV0dXJuIHt9O1xuICAgICAgICAgIH1cbiAgICAgICAgICBjb25zdCByZXMgPSBhd2FpdCBjYWxsYmFja0Z1bmMoZmlsZS5maWxlUGF0aCwgc3RvcmFnZVR5cGUsIGZlZVBheWVyKTtcbiAgICAgICAgICBpZiAocmVzLmlzRXJyKSB7XG4gICAgICAgICAgICB0aHJvdyBFcnJvcihyZXMuZXJyb3IubWVzc2FnZSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBvdmVyd3JpdGVPYmplY3QoZmlsZSwgW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBleGlzdHNLZXk6ICdmaWxlUGF0aCcsXG4gICAgICAgICAgICAgIHdpbGw6IHsga2V5OiAndXJpJywgdmFsdWU6IHJlcy52YWx1ZSB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICBdKTtcbiAgICAgICAgfSksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHsgLi4uaW5wdXQsIGZpbGVzIH0gYXMgUHJvcGVydGllcztcbiAgICB9O1xuICB9XG59XG4iLCAiLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLXVudXNlZC12YXJzICovXG5pbXBvcnQgeyBPcHRpb24sIFVzZXMgfSBmcm9tICd+L3R5cGVzL3JlZ3VsYXItbmZ0Jztcbl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ioa2V5LCBNZXNzYWdlLlNNQUxMX05VTUJFUiwgcm95YWx0eSwge1xuICAgICAgICAgIHRocmVzaG9sZDogUk9ZQUxUWV9NSU4sXG4gICAgICAgICAgY29uZGl0aW9uOiAndW5kZXJNaW4nLFxuICAgICAgICB9KTtcbiAgICAgIH0gZWxzZSBpZiAocm95YWx0eSA+IFJPWUFMVFlfTUFYKSB7XG4gICAgICAgIHRocm93IGNyZWF0ZUVycm9yKGtleSwgTWVzc2FnZS5CSUdfTlVNQkVSLCByb3lhbHR5LCB7XG4gICAgICAgICAgdGhyZXNob2xkOiBST1lBTFRZX01BWCxcbiAgICAgICAgICBjb25kaXRpb246ICdvdmVyTWF4JyxcbiAgICAgICAgfSk7XG4gICAgICB9XG4gICAgICByZXR1cm4gTWVzc2FnZS5TVUNDRVNTO1xuICAgIH0pO1xuICB9O1xuXG4gIGV4cG9ydCBjb25zdCBpc1NlbGxlckZlZUJhc2lzUG9pbnRzID0gKFxuICAgIHJveWFsdHk6IG51bWJlcixcbiAgKTogUmVzdWx0PHN0cmluZywgVmFsaWRhdG9yRXJyb3I+ID0+IHtcbiAgICByZXR1cm4gVHJ5KCgpID0+IHtcbiAgICAgIGNvbnN0IGtleSA9ICdzZWxsZXJGZWVCYXNpc1BvaW50cy9zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyc7XG4gICAgICBpZiAocm95YWx0eSAhPT0gMCAmJiAhcm95YWx0eSkge1xuICAgICAgICB0aHJvdyBjcmVhdGVFcnJvcihrZXksIE1lc3NhZ2UuRU1QVFksIHJveWFsdHkpO1xuICAgICAgfVxuICAgICAgaWYgKHJveWFsdHkgPCBST1lBTFRZX01JTikge1xuICAgICAgICB0aHJvdyBjcmVhdGVFcnJvcihrZXksIE1lc3NhZ2UuU01BTExfTlVNQkVSLCByb3lhbHR5LCB7XG4gICAgICAgICAgdGhyZXNob2xkOiBST1lBTFRZX01JTixcbiAgICAgICAgICBjb25kaXRpb246ICd1bmRlck1pbicsXG4gICAgICA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bGV0IHJlcyE6IFJlc3VsdDxzdHJpbmcsIFZhbGlkYXRvckVycm9yPjtcbiAgICAgICAgc3dpdGNoIChrZXkpIHtcbiAgICAgICAgICBjYXNlICdpbWFnZSc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLmltYWdlKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzSW1hZ2VVcmwobWV0YWRhdGEuaW1hZ2UpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAncm95YWx0eSc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnJveWFsdHkpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNSb3lhbHR5KG1ldGFkYXRhLnJveWFsdHkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgI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bnN0IHBvc3RUb2tlbkFjY291bnQgPSBjcmVhdGVQb3N0VG9rZW5BY2NvdW50TGlzdCh0eE1ldGEpO1xuICAgICAgdHhNZXRhLnRyYW5zYWN0aW9uLm1lc3NhZ2UuaW5zdHJ1Y3Rpb25zLmZvckVhY2goKGluc3RydWN0aW9uKSA9PiB7XG4gICAgICAgIGlmIChpc1BhcnNlZEluc3RydWN0aW9uKGluc3RydWN0aW9uKSkge1xuICAgICAgICAgIHN3aXRjaCAoZmlsdGVyVHlwZSkge1xuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLk1lbW86IHtcbiAgICAgICAgICAgICAgaWYgKEZpbHRlck9wdGlvbnMuTWVtby5wcm9ncmFtLmluY2x1ZGVzKGluc3RydWN0aW9uLnByb2dyYW0pKSB7XG4gICAgICAgICAgICAgICAgbGV0IGluc3RydWN0aW9uVHJhbnNmZXI7XG5cbiAgICAgICAgICAgICAgICAvLyBmZXRjaCAgdHJhbnNmZXIgdHJhbnNhY3Rpb24gZm9yIHJlbGF0aW9uYWwgbWVtb1xuICAgICAgICAgICAgICAgIHR4TWV0YS50cmFuc2FjdGlvbi5tZXNzYWdlLmluc3RydWN0aW9ucy5mb3JFYWNoKFxuICAgICAgICAgICAgICAgICAgKGluc3RydWN0aW9uKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICBpc1BhcnNlZEluc3RydWN0aW9uKGluc3RydWN0aW9uKSAmJlxuICAgICAgICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuVHJhbnNmZXIucHJvZ3JhbS5pbmNsdWRlcyhcbiAgICAgICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLnByb2dyYW0sXG4gICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyID0gaW5zdHJ1Y3Rpb247XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgKTtcblxuICAgICAgICAgICAgICAgIC8vIHNwbC10b2tlbiBvciBzeXN0ZW1cbiAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyICYmXG4gICAgICAgICAgICAgICAgICBtb2R1bGVOYW1lICE9PSBpbnN0cnVjdGlvblRyYW5zZmVyWydwcm9ncmFtJ11cbiAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgIGRlYnVnTG9nKFxuICAgICAgICAgICAgICAgICAgICAnIyBGaWx0ZXJUeXBlLk1lbW8gYnJlYWsgaW5zdHJ1Y3Rpb246ICcsXG4gICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIsXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgLy8gZmV0Y2ggbWVtbyBvbmx5IHRyYW5zYWN0aW9uXG4gICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5NZW1vLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlcixcbiAgICAgICAgICAgICAgICAgIHBvc3RUb2tlbkFjY291bnQsXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5Pbmx5TWVtbzoge1xuICAgICAgICAgICAgICBpZiAoRmlsdGVyT3B0aW9ucy5NZW1vLnByb2dyYW0uaW5jbHVkZXMoaW5zdHJ1Y3Rpb24ucHJvZ3JhbSkpIHtcbiAgICAgICAgICAgICAgICBsZXQgaW5zdHJ1Y3Rpb25UcmFuc2ZlcjtcblxuICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuTWVtby5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIsXG4gICAgICAgICAgICAgICAgICBwb3N0VG9rZW5BY2NvdW50LFxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXNlIEZpbHRlclR5cGUuTWludDoge1xuICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5NaW50LnByb2dyYW0uaW5jbHVkZXMoaW5zdHJ1Y3Rpb24ucHJvZ3JhbSkgJiZcbiAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLk1pbnQuYWN0aW9uLmluY2x1ZGVzKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24ucGFyc2VkLnR5cGUgYXMgc3RyaW5nLFxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5NaW50LmludG9Vc2VyU2lkZShpbnN0cnVjdGlvbiwgdHhNZXRhKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5UcmFuc2ZlcjpcbiAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgIG1vZHVsZU5hbWUgPT09IGluc3RydWN0aW9uLnByb2dyYW0gJiZcbiAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLlRyYW5zZmVyLmFjdGlvbi5pbmNsdWRlcyhcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLnBhcnNlZC50eXBlIGFzIHN0cmluZyxcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgIGlmIChpbnN0cnVjdGlvbi5wYXJzZWQudHlwZSA9PT0gJ3RyYW5zZmVyQ2hlY2tlZCcpIHtcbiAgICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuVHJhbnNmZXJDaGVja2VkLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgICAgcG9zdFRva2VuQWNjb3VudCxcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuVHJhbnNmZXIuaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgICAgcmV0dXJuIGhpc3Rvcnk7XG4gICAgfTtcbn1cbiIsICJpbXBvcnQgeyBQYXJzZWRBY2NvdW50RGF0YSB9IGZyb20gJ0Bzb2xhbmEvd2ViMy5qcyc7XG5pbXBvcnQgeyBSZXN1bHQsIFRyeSB9IGZyb20gJ34vc3VpdGUtdXRpbHMnO1xuaW1wb3J0IHsgTm9kZSB9IGZyb20gJ34vbm9kZSc7XG5pbXBvcnQgeyBPd25lckluZm8sIFB1YmtleSB9IGZyb20gJ34vdHlwZXMvYWNjb3VudCc7XG5pbXBvcnQgeyBUcmFuc2FjdGlvbkZpbHRlciB9IGZyb20gJ34vdHJhbnNhY3Rpb24tZmlsdGVyJztcblxuZXhwb3J0IG5hbWVzcGFjZSBTb2xOYXRpdmUge1xuICAvKipcbiAgICogRmluZCBuZnQgYnkgb3duZXIgYWRkcmVzc1xuICAgKlxuICAgKiBAcGFyYW0ge1B1YmtleX0gb3duZXJcbiAgICogQHJldHVybiBQcm9taXNlPFJlc3VsdDxPd25lckluZm8sIEVycm9yPj5cbiAgICovXG4gIGV4cG9ydCBjb25zdCBmaW5kQnlPd25lciA9IGFzeW5jIChcbiAgICBvd25lcjogUHVia2V5LFxuICApOiBQcm9taXNlPFJlc3VsdDxPd25lckluZm8sIEVycm9yPj4gPT4ge1xuICAgIHJldHVybiBUcnkoYXN5bmMgKCkgPT4ge1xuICAgICAgY29uc3QgcmVzID0gYXdhaXQgTm9kZS5nZXRDb25uZWN0aW9uKCkuZ2V0UGFyc2VkQWNjb3VudEluZm8oXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICApO1xuXG4gICAgICBjb25zdCBpbmZvID0ge1xuICAgICAgICBzb2w6IDAsXG4gICAgICAgIGxhbXBvcnRzOiAwLFxuICAgICAgICBvd25lcjogb3duZXIudG9TdHJpbmcoKSxcbiAgICAgIH07XG5cbiAgICAgIGlmIChUcmFuc2FjdGlvbkZpbHRlci5pc1BhcnNlZEluc3RydWN0aW9uKHJlcy52YWx1ZT8uZGF0YSkpIHtcbiAgICAgICAgY29uc3QgcGFyc2VkQWNjb3VudERhdGEgPSByZXMudmFsdWU/LmRhdGEgYXMgUGFyc2VkQWNjb3VudERhdGE7XG4gICAgICAgIGluZm8ub3duZXIgPSBwYXJzZWRBY2NvdW50RGF0YS5wYXJzZWQ/LmluZm8/Lm93bmVyIGFzIHN0cmluZztcbiAgICAgIH1cblxuICAgICAgaWYgKHJlcy52YWx1ZSkge1xuICAgICAgICBpbmZvLmxhbXBvcnRzID0gcmVzLnZh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vS2V5cGFpcigpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICBwYXJzZUludChgJHthbW91bnQudG9MYW1wb3J0cygpfWAsIFJBRElYKSxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIHdyYXBwZWQgc29sOiAnLCB3cmFwcGVkLnRvQmFzZTU4KCkpO1xuXG4gICAgICBjb25zdCBpbnN0cnVjdGlvbnMgPSBbXTtcblxuICAgICAgY29uc3QgdG9rZW4gPSBhd2FpdCBjcmVhdGVNaW50KFxuICAgICAgICBjb25uZWN0aW9uLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgMCxcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IHNvdXJjZVRva2VuID0gYXdhaXQgQWNjb3VudC5Bc3NvY2lhdGVkLnJldHJ5R2V0T3JDcmVhdGUoXG4gICAgICAgIHRva2VuLnRvU3RyaW5nKCksXG4gICAgICAgIG93bmVyLFxuICAgICAgICBwYXllcixcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIHNvdXJjZVRva2VuOiAnLCBzb3VyY2VUb2tlbik7XG5cbiAgICAgIGNvbnN0IGRlc3RUb2tlbiA9IGF3YWl0IEFjY291bnQuQXNzb2NpYXRlZC5yZXRyeUdldE9yQ3JlYXRlKFxuICAgICAgICB0b2tlbi50b1N0cmluZygpLFxuICAgICAgICB3cmFwcGVkLnRvU3RyaW5nKCksXG4gICAgICAgIHBheWVyLFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgZGVzdFRva2VuOiAnLCBkZXN0VG9rZW4pO1xuXG4gICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgY3JlYXRlVHJhbnNmZXJJbnN0cnVjdGlvbihcbiAgICAgICAgICBzb3VyY2VUb2tlbi50b1B1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ZGF0YS5yb3lhbHR5KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlcl9mZWVfYmFzaXNfcG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJGZWVCYXNpc1BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0YWRhdGEubmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzeW1ib2wnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLnN5bWJvbCkge1xuICAgICAgICAgICAgICByZXMgPSBpc1N5bWJvbChtZXRhZGF0YS5zeW1ib2wpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHJlcyAmJiByZXMuaXNFcnIpIHtcbiAgICAgICAgICByZXN1bHRzLnB1c2goLi4ucmVzLmVycm9yLmRldGFpbHMpO1xuICAgICAgICB9XG4gICAgICB9KTtc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1lbW8ucHJvZ3JhbS5pbmNsdWRlcyhpbnN0cnVjdGlvbi5wcm9ncmFtKSkge1xuICAgICAgICAgICAgICAgIGxldCBpbnN0cnVjdGlvblRyYW5zZmVyO1xuXG4gICAgICAgICAgICAgICAgLy8gZmV0Y2ggIHRyYW5zZmVyIHRyYW5zYWN0aW9uIGZvciByZWxhdGlvbmFsIG1lbW9cbiAgICAgICAgICAgICAgICB0eE1ldGEudHJhbnNhY3Rpb24ubWVzc2FnZS5pbnN0cnVjdGlvbnMuZm9yRWFjaChcbiAgICAgICAgICAgICAgICAgIChpbnN0cnVjdGlvbikgPT4ge1xuICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgaXNQYXJzZWRJbnN0cnVjdGlvbihpbnN0cnVjdGlvbikgJiZcbiAgICAgICAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLlRyYW5zZmVyLnByb2dyYW0uaW5jbHVkZXMoXG4gICAgICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbi5wcm9ncmFtLFxuICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlciA9IGluc3RydWN0aW9uO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICk7XG5cbiAgICAgICAgICAgICAgICAvLyBzcGwtdG9rZW4gb3Igc3lzdGVtXG4gICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlciAmJlxuICAgICAgICAgICAgICAgICAgbW9kdWxlTmFtZSAhPT0gaW5zdHJ1Y3Rpb25UcmFuc2ZlclsncHJvZ3JhbSddXG4gICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICBkZWJ1Z0xvZyhcbiAgICAgICAgICAgICAgICAgICAgJyMgRmlsdGVyVHlwZS5NZW1vIGJyZWFrIGluc3RydWN0aW9uOiAnLFxuICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyLFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vIGZldGNoIG1lbW8gb25seSB0cmFuc2FjdGlvblxuICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuTWVtby5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIsXG4gICAgICAgICAgICAgICAgICBwb3N0VG9rZW5BY2NvdW50LFxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXNlIEZpbHRlclR5cGUuT25seU1lbW86IHtcbiAgICAgICAgICAgICAgaWYgKEZpbHRlck9wdGlvbnMuTWVtby5wcm9ncmFtLmluY2x1ZGVzKGluc3RydWN0aW9uLnByb2dyYW0pKSB7XG4gICAgICAgICAgICAgICAgbGV0IGluc3RydWN0aW9uVHJhbnNmZXI7XG5cbiAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLk1lbW8uaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyLFxuICAgICAgICAgICAgICAgICAgcG9zdFRva2VuQWNjb3VudCxcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLk1pbnQ6IHtcbiAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuTWludC5wcm9ncmFtLmluY2x1ZGVzKGluc3RydWN0aW9uLnByb2dyYW0pICYmXG4gICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5NaW50LmFjdGlvbi5pbmNsdWRlcyhcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLnBhcnNlZC50eXBlIGFzIHN0cmluZyxcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuTWludC5pbnRvVXNlclNpZGUoaW5zdHJ1Y3Rpb24sIHR4TWV0YSk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXNlIEZpbHRlclR5cGUuVHJhbnNmZXI6XG4gICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICBtb2R1bGVOYW1lID09PSBpbnN0cnVjdGlvbi5wcm9ncmFtICYmXG4gICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5UcmFuc2Zlci5hY3Rpb24uaW5jbHVkZXMoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbi5wYXJzZWQudHlwZSBhcyBzdHJpbmcsXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICBpZiAoaW5zdHJ1Y3Rpb24ucGFyc2VkLnR5cGUgPT09ICd0cmFuc2ZlckNoZWNrZWQnKSB7XG4gICAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLlRyYW5zZmVyQ2hlY2tlZC5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICAgIHBvc3RUb2tlbkFjY291bnQsXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLlRyYW5zZmVyLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIHJldHVybiBoaXN0b3J5O1xuICAgIH07XG59XG4iLCAiaW1wb3J0IHsgUGFyc2VkQWNjb3VudERhdGEgfSBmcm9tICdAc29sYW5hL3dlYjMuanMnO1xuaW1wb3J0IHsgUmVzdWx0LCBUcnkgfSBmcm9tICd+L3N1aXRlLXV0aWxzJztcbmltcG9ydCB7IE5vZGUgfSBmcm9tICd+L25vZGUnO1xuaW1wb3J0IHsgT3duZXJJbmZvLCBQdWJrZXkgfSBmcm9tICd+L3R5cGVzL2FjY291bnQnO1xuaW1wb3J0IHsgVHJhbnNhY3Rpb25GaWx0ZXIgfSBmcm9tICd+L3RyYW5zYWN0aW9uLWZpbHRlcic7XG5cbmV4cG9ydCBuYW1lc3BhY2UgU29sTmF0aXZlIHtcbiAgLyoqXG4gICAqIEZpbmQgbmZ0IGJ5IG93bmVyIGFkZHJlc3NcbiAgICpcbiAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAqIEByZXR1cm4gUHJvbWlzZTxSZXN1bHQ8T3duZXJJbmZvLCBFcnJvcj4+XG4gICAqL1xuICBleHBvcnQgY29uc3QgZmluZEJ5T3duZXIgPSBhc3luYyAoXG4gICAgb3duZXI6IFB1YmtleSxcbiAgKTogUHJvbWlzZTxSZXN1b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nRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIDAsXG4gICAgICApO1xuXG4gICAgICBjb25zdCBzb3VyY2VUb2tlbiA9IGF3YWl0IEFjY291bnQuQXNzb2NpYXRlZC5yZXRyeUdldE9yQ3JlYXRlKFxuICAgICAgICB0b2tlbi50b1N0cmluZygpLFxuICAgICAgICBvd25lcixcbiAgICAgICAgcGF5ZXIsXG4gICAgICApO1xuXG4gICAgICBkZWJ1Z0xvZygnIyBzb3VyY2VUb2tlbjogJywgc291cmNlVG9rZW4pO1xuXG4gICAgICBjb25zdCBkZXN0VG9rZW4gPSBhd2FpdCBBY2NvdW50LkFzc29jaWF0ZWQucmV0cnlHZXRPckNyZWF0ZShcbiAgICAgICAgdG9rZW4udG9TdHJpbmcoKSxcbiAgICAgICAgd3JhcHBlZC50b1N0cmluZygpLFxuICAgICAgICBwYXllcixcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGRlc3RUb2tlbjogJywgZGVzdFRva2VuKTtcblxuICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgIGNyZWF0ZVRyYW5zZmVySW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgc291cmNlVG9rZW4udG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBkZXN0VG9rZW4udG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIHBhcnNlSW50KGAke2Ftb3VudH1gLCBSQURJWCksIC8vIE5vIGxhbXBvcnRzLCBpdHMgc29sXG4gICAgICAgICAga2V5cGFpcnMsXG4gICAgICAgICksXG4gICAgICApO1xuXG4gICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgY3JlYXRlQ2xvc2VBY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgd3JhcHBlZCxcbiAgICAgICAgICBkZXN0LnRvUHVibGljS2V5KCks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iLCAiU2lnbmF0dXJlcyIsICJUcmFuc2FjdGlvbkZpbHRlciIsICJpbnN0cnVjdGlvbiIsICJDb252ZXJ0ZXIiLCAiU29sTmF0aXZlIiwgIlRyYW5zYWN0aW9uIiwgIlNvbE5hdGl2ZSIsICJUcmFuc2FjdGlvbiIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiU3lzdGVtUHJvZ3JhbSIsICJTb2xOYXRpdmUiLCAiU3lzdGVtUHJvZ3JhbSIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiU29sTmF0aXZlIiwgIkFjY291bnQiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlNvbE5hdGl2ZSIsICJTb2xOYXRpdmUiXQp9Cg== \ No newline at end of file diff --git a/packages/transaction-builder/dist/index.js b/packages/transaction-builder/dist/index.js index c54fc6f46..56dcadfce 100644 --- a/packages/transaction-builder/dist/index.js +++ b/packages/transaction-builder/dist/index.js @@ -212,9 +212,6 @@ var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { console.log("[DEBUG]", data1, data2, data3, data4); } }; -var sleep = async (sec) => { - return new Promise((r) => setTimeout(r, sec * 1e3)); -}; var isPromise = (obj) => { return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; }; @@ -394,14 +391,11 @@ var Result; Result8.all = all; })(Result || (Result = {})); -// ../account/src/associated.ts -var import_spl_token = require("@solana/spl-token"); - // ../account/src/keypair.ts var import_web32 = require("@solana/web3.js"); var import_bs58 = __toESM(require("bs58")); var Account; -((Account5) => { +((Account4) => { class Keypair4 { secret; pubkey; @@ -437,111 +431,16 @@ var Account; }); }; } - Account5.Keypair = Keypair4; + Account4.Keypair = Keypair4; })(Account || (Account = {})); -// ../account/src/associated.ts -var Account2; -((Account5) => { - let Associated; - ((Associated2) => { - const RETRY_OVER_LIMIT = 10; - const RETRY_SLEEP_TIME = 3; - const get = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const res = await (0, Associated2.makeOrCreateInstruction)( - mint, - owner, - new Account.Keypair({ secret: feePayer }).pubkey, - allowOwnerOffCurve - ); - if (!res.inst) { - return res.tokenAccount; - } - return new TransactionBuilder.Common( - [res.inst], - [], - feePayer.toKeypair(), - res.tokenAccount - ); - }; - Associated2.retryGetOrCreate = async (mint, owner, feePayer) => { - let counter = 1; - while (counter < RETRY_OVER_LIMIT) { - try { - const inst = await get(mint, owner, feePayer, true); - if (inst && typeof inst === "string") { - debugLog("# associatedTokenAccount: ", inst); - return inst; - } else if (inst instanceof TransactionBuilder.Common) { - (await inst.submit()).map( - async (ok) => { - await Node.confirmedSig(ok); - return inst.data; - }, - (err) => { - debugLog("# Error submit retryGetOrCreate: ", err); - throw err; - } - ); - } - } catch (e) { - debugLog(`# retry: ${counter} create token account: `, e); - debugLog(`# mint: ${mint}, owner: ${owner}, feePayer: ${feePayer}`); - } - await sleep(RETRY_SLEEP_TIME); - counter++; - } - throw Error(`retry action is over limit ${RETRY_OVER_LIMIT}`); - }; - Associated2.makeOrCreateInstruction = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const associatedTokenAccount = (0, import_spl_token.getAssociatedTokenAddressSync)( - mint.toPublicKey(), - owner.toPublicKey(), - allowOwnerOffCurve, - import_spl_token.TOKEN_PROGRAM_ID, - import_spl_token.ASSOCIATED_TOKEN_PROGRAM_ID - ); - debugLog("# associatedTokenAccount: ", associatedTokenAccount.toString()); - try { - await (0, import_spl_token.getAccount)( - Node.getConnection(), - associatedTokenAccount, - Node.getConnection().commitment, - import_spl_token.TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst: void 0 - }; - } catch (error) { - if (!(error instanceof import_spl_token.TokenAccountNotFoundError) && !(error instanceof import_spl_token.TokenInvalidAccountOwnerError)) { - throw Error("Unexpected error"); - } - const payer = !feePayer ? owner : feePayer; - const inst = (0, import_spl_token.createAssociatedTokenAccountInstruction)( - payer.toPublicKey(), - associatedTokenAccount, - owner.toPublicKey(), - mint.toPublicKey(), - import_spl_token.TOKEN_PROGRAM_ID, - import_spl_token.ASSOCIATED_TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst - }; - } - }; - })(Associated = Account5.Associated || (Account5.Associated = {})); -})(Account2 || (Account2 = {})); - // ../account/src/pda.ts var import_web33 = require("@solana/web3.js"); var import_mpl_token_metadata = require("@metaplex-foundation/mpl-token-metadata"); var import_mpl_bubblegum = require("@metaplex-foundation/mpl-bubblegum"); var import_bn = __toESM(require("bn.js")); -var Account3; -((Account5) => { +var Account2; +((Account4) => { let Pda; ((Pda2) => { Pda2.getMetadata = (address) => { @@ -593,14 +492,13 @@ var Account3; ); return assetId.toString(); }; - })(Pda = Account5.Pda || (Account5.Pda = {})); -})(Account3 || (Account3 = {})); + })(Pda = Account4.Pda || (Account4.Pda = {})); +})(Account2 || (Account2 = {})); // ../account/src/index.ts -var Account4 = { - ...Account2, +var Account3 = { ...Account, - ...Account3 + ...Account2 }; // ../global/src/index.ts @@ -632,7 +530,7 @@ String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, op } return url; } - if (Account4.Keypair.isPubkey(addressOrSignature)) { + if (Account3.Keypair.isPubkey(addressOrSignature)) { if (explorer === "solanafm" /* SolanaFM */) { url = `${Constants.EXPLORER_SOLANAFM_URL}/address/${addressOrSignature}?cluster=${cluster}`; } else if (explorer === "xray" /* Xray */) { @@ -652,13 +550,13 @@ String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, op return url; }; String.prototype.toPublicKey = function() { - if (!Account4.Keypair.isPubkey(this.toString())) { + if (!Account3.Keypair.isPubkey(this.toString())) { throw Error(`No match KeyPair.PubKey: ${this.toString()}`); } return new import_web34.PublicKey(this.toString()); }; String.prototype.toKeypair = function() { - if (!Account4.Keypair.isSecret(this.toString())) { + if (!Account3.Keypair.isSecret(this.toString())) { throw Error(`No match KeyPair.Secret: ${this.toString()}`); } const decoded = import_bs582.default.decode(this.toString()); @@ -1524,4 +1422,4 @@ var TransactionBuilder = { 0 && (module.exports = { TransactionBuilder }); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uL3NyYy9iYXRjaC50cyIsICIuLi8uLi9zdWl0ZS11dGlscy9zcmMvY29uc3RhbnRzLnRzIiwgIi4uLy4uL3N1aXRlLXV0aWxzL3NyYy9zaGFyZWQudHMiLCAiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL3Jlc3VsdC50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9hc3NvY2lhdGVkLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2tleXBhaXIudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvcGRhLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2luZGV4LnRzIiwgIi4uLy4uL2dsb2JhbC9zcmMvaW5kZXgudHMiLCAiLi4vLi4vY29udmVydGVyL3NyYy9jb2xsZWN0aW9uLnRzIiwgIi4uLy4uL2NvbnZlcnRlci9zcmMvY3JlYXRvcnMudHMiLCAiLi4vLi4vY29udmVydGVyL3NyYy9jb21wcmVzc2VkLW5mdC1tZXRhZGF0YS50cyIsICIuLi8uLi9jb252ZXJ0ZXIvc3JjL3JveWFsdHkudHMiLCAiLi4vLi4vY29udmVydGVyL3NyYy9uZnQudHMiLCAiLi4vLi4vY29udmVydGVyL3NyYy9tZW1vLnRzIiwgIi4uLy4uL2NvbnZlcnRlci9zcmMvbWludC50cyIsICIuLi8uLi9jb252ZXJ0ZXIvc3JjL3JlZ3VsYXItbmZ0LW1ldGFkYXRhLnRzIiwgIi4uLy4uL2NvbnZlcnRlci9zcmMvcHJvcGVydGllcy50cyIsICIuLi8uLi9jb252ZXJ0ZXIvc3JjL3VzZXMudHMiLCAiLi4vLi4vY29udmVydGVyL3NyYy90b2tlbi1tZXRhZGF0YS50cyIsICIuLi8uLi9jb252ZXJ0ZXIvc3JjL3RyYW5zZmVyLWNoZ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0LmRhdGE7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIChlcnI6IEVycm9yKSA9PiB7XG4gICAgICAgICAgICAgICAgZGVidWdMb2coJyMgRXJyb3Igc3VibWl0IHJldHJ5R2V0T3JDcmVhdGU6ICcsIGVycik7XG4gICAgICAgICAgICAgICAgdGhyb3cgZXJyO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICBkZWJ1Z0xvZyhgIyByZXRyeTogJHtjb3VudGVyfSBjcmVhdGUgdG9rZW4gYWNjb3VudDogYCwgZSk7XG4gICAgICAgICAgZGVidWdMb2coYCMgbWludDogJHttaW50fSwgb3duZXI6ICR7b3duZXJ9LCBmZWVQYXllcjogJHtmZWVQYXllcn1gKTtcbiAgICAgICAgfVxuICAgICAgICBhd2FpdCBzbGVlcChSRVRSWV9TTEVFUF9USU1FKTtcbiAgICAgICAgY291bnRlcisrO1xuICAgICAgfVxuICAgICAgdGhyb3cgRXJyb3IoYHJldHJ5IGFjdGlvbiBpcyBvdmVyIGxpbWl0ICR7UkVUUllfT1ZFUl9MSU1JVH1gKTtcbiAgICB9O1xuXG4gICAgLyoqXG4gICAgICogW01haW4gbG9naWNdR2V0IEFzc29jaWF0ZWQgdG9rZW4gQWNjb3VudC5cbiAgICAgKiBpZiBub3QgY3JlYXRlZCwgY3JlYXRlIG5ldyB0b2tlbiBhY2NvdWludFxuICAgICAqXG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG1pbnRcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gb3duZXJcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gZmVlUGF5ZXJcbiAgICAgKiBAcmV0dXJucyBQcm9taXNlPHN0cmluZz5cbiAgICAgKi9cbiAgICBleHBvcnQgY29uc3QgbWFrZU9yQ3JlYXRlSW5zdHJ1Y3Rpb24gPSBhc3luYyAoXG4gICAgICB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N0OiB1bmRlZmluZWQsXG4gICAgICAgIH07XG4gICAgICB9IGNhdGNoIChlcnJvcjogdW5rbm93bikge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuQWNjb3VudE5vdEZvdW5kRXJyb3IpICYmXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuSW52YWxpZEFjY291bnRPd25lckVycm9yKVxuICAgICAgICApIHtcbiAgICAgICAgICB0aHJvdyBFcnJvcignVW5leHBlY3RlZCBlcnJvcicpO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgcGF5ZXIgPSAhZmVlUGF5ZXIgPyBvd25lciA6IGZlZVBheWVyO1xuXG4gICAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVBc3NvY2lhdGVkVG9rZW5BY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgcGF5ZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdCxcbiAgICAgICAgfTtcbiAgICAgIH1cbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHsgS2V5cGFpciBhcyBPcmlnaW5hbCwgUHVibGljS2V5IH0gZnJvbSAnQHNvbGFuYS93ZWIzLmpzJztcbmltcG9ydCB7IFB1YmtleSwgU2VjcmV0IH0gZnJvbSAnfi90eXBlcy9hY2NvdW50JztcbmltcG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aWNLZXkoKS50b0J1ZmZlcigpXSxcbiAgICAgICAgTVBMX0JVQkJMRUdVTV9QUk9HUkFNX0lELnRvUHVibGljS2V5KCksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGdldEJndW1TaWduZXIgPSAoKTogUHVibGljS2V5ID0+IHtcbiAgICAgIGNvbnN0IFtwdWJsaWNLZXldID0gUHVibGljS2V5LmZpbmRQcm9ncmFtQWRkcmVzc1N5bmMoXG4gICAgICAgIFtCdWZmZXIuZnJvbSgnY29sbGVjdGlvbl9jcGknLCAndXRmOCcpXSxcbiAgICAgICAgTVBMX0JVQkJMRUdVTV9QUk9HUkFNX0lELnRvUHVibGljS2V5KCksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGdldEFzc2V0SWQgPSAoYWRkcmVzczogUHVia2V5LCBsZWFmSW5kZXg6IG51bWJlcik6IFB1YmtleSA9PiB7XG4gICAgICBjb25zdCBub2RlID0gbmV3IEJOLkJOKGxlYWZJbmRleCk7XG4gICAgICBjb25zdCBbYXNzZXRJZF0gPSBQdWJsaWNLZXkuZmluZFByb2dyYW1BZGRyZXNzU3luYyhcbiAgICAgICAgW1xuICAgICAgICAgIEJ1ZmZlci5mcm9tKCdhc3NldCcsICd1dGY4JyksXG4gICAgICAgICAgYWRkcmVzcy50b1B1YmxpY0tleSgpLnRvQnVmZmVyKCksXG4gICAgICAgICAgVWludDhBcnJheS5mcm9tKG5vZGUudG9BcnJheSgnbGUnLCA4KSksXG4gICAgICAgIF0sXG4gICAgICAgIE1QTF9CVUJCTEVHVU1fUFJPR1JBTV9JRC50b1B1YmxpY0tleSgpLFxuICAgICAgKTtcbiAgICAgIHJldHVybiBhc3NldElkLnRvU3RyaW5nKCk7XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IEFjY291bnQgY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ICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvQ29tcHJlc3NlZE5mdEluZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IEludGVybmFsQ3JlYXRvcnNbXSA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBbXTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBpbnB1dCEubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlciA9IChcbiAgICAgIG91dHB1dDogT3B0aW9uPEludGVybmFsQ3JlYXRvcnNbXT4sXG4gICAgKTogQ3JlYXRvcnNbXSB8IHVuZGVmaW5lZCA9PiB7XG4gICAgICBpZiAoIW91dHB1dCkge1xuICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gb3V0cHV0Lm1hcCgoZGF0YSkgPT4ge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIGFkZHJlc3M6IGRhdGEuYWRkcmVzcy50b1N0cmluZygpLFxuICAgICAgICAgIHNoYXJlOiBkYXRhLnNoYXJlLFxuICAgICAgICAgIHZlcmlmaWVkOiBkYXRhLnZlcmlmaWVkLFxuICAgICAgICB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yZXQsXG4gICAgKTogUHJvbWlzZTxQcm9wZXJ0aWVzPiA9PiB7XG4gICAgICBpZiAoIWlucHV0IHx8ICFpbnB1dC5maWxlcykge1xuICAgICAgICByZXR1cm4ge307XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGZpbGVzID0gYXdhaXQgUHJvbWlzZS5hbGwoXG4gICAgICAgIGlucHV0LmZpbGVzLm1hcChhc3luYyAoZmlsZSkgPT4ge1xuICAgICAgICAgIGlmICghZmlsZS5maWxlUGF0aCkge1xuICAgICAgICAgICAgcmV0dXJuIHt9O1xuICAgICAgICAgIH1cbiAgICAgICAgICBjb25zdCByZXMgPSBhd2FpdCBjYWxsYmFja0Z1bmMoZmlsZS5maWxlUGF0aCwgc3RvcmFnZVR5cGUsIGZlZVBheWVyKTtcbiAgICAgICAgICBpZiAocmVzLmlzRXJyKSB7XG4gICAgICAgICAgICB0aHJvdyBFcnJvcihyZXMuZXJyb3IubWVzc2FnZSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBvdmVyd3JpdGVPYmplY3QoZmlsZSwgW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBleGlzdHNLZXk6ICdmaWxlUGF0aCcsXG4gICAgICAgICAgICAgIHdpbGw6IHsga2V5OiAndXJpJywgdmFsdWU6IHJlcy52YWx1ZSB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICBdKTtcbiAgICAgICAgfSksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHsgLi4uaW5wdXQsIGZpbGVzIH0gYXMgUHJvcGVydGllcztcbiAgICB9O1xuICB9XG59XG4iLCAiLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLXVudXNlZC12YXJzICovXG5pbXBvcnQgeyBPcHRpb24sIFVzZXMgfSBmcm9tICd+L3R5cGVzL3JlZ3VsYXItbmZ0JztcblxuZXhwb3J0IG5hbWVzcGFjZSBDb252ZXJ0ZXIge1xuICBleHBvcnQgbmFtZX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ICAgICAgc3dpdGNoIChrZXkpIHtcbiAgICAgICAgICBjYXNlICdpbWFnZSc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLmltYWdlKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzSW1hZ2VVcmwobWV0YWRhdGEuaW1hZ2UpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAncm95YWx0eSc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnJveWFsdHkpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNSb3lhbHR5KG1ldGFkYXRhLnJveWFsdHkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFt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mVyID0+IHtcbiAgICBjb25zdCBmZWVQYXllclBrID0gW2ZlZVBheWVyLnRvQmFzZTU4KCldO1xuXG4gICAgY29uc3Qgc2lnbmVycyA9IG5ldyBTZXQ8c3RyaW5nPihmZWVQYXllclBrKTtcbiAgICBjb25zdCBhY2NvdW50cyA9IG5ldyBTZXQ8c3RyaW5nPihmZWVQYXllclBrKTtcblxuICAgIGNvbnN0IGl4c1NpemUgPSB0cmFuc2FjdGlvbi5pbnN0cnVjdGlvbnMucmVkdWNlKChhY2MsIGl4KSA9PiB7XG4gICAgICBpeC5rZXlzLmZvckVhY2goKHsgcHVia2V5LCBpc1NpZ25lciB9KSA9PiB7XG4gICAgICAgIGNvbnN0IHBrID0gcHVia2V5LnRvQmFzZTU4KCk7XG4gICAgICAgIGlmIChpc1NpZ25lcikgc2lnbmVycy5hZGQocGspO1xuICAgICAgICBhY2NvdW50cy5hZGQocGspO1xuICAgICAgfSk7XG5cbiAgICAgIGFjY291bnRzLmFkZChpeC5wcm9ncmFtSWQudG9CYXNlNTgoKSk7XG5cbiAgICAgIGNvbnN0IG5JbmRleGVzID0gaXgua2V5cy5sZW5ndGg7XG4gICAgICBjb25zdCBvcGFxdWVEYXRhID0gaXguZGF0YS5sZW5ndGg7XG5cbiAgICAgIHJldHVybiAoXG4gICAgICAgIGFjYyArXG4gICAgICAgIDEgKyAvLyBQSUQgaW5kZXhcbiAgICAgICAgY29tcGFjdEFycmF5U2l6ZShuSW5kZXhlcywgMSkgK1xuICAgICAgICBjb21wYWN0QXJyYXlTaXplKG9wYXF1ZURhdGEsIDEpXG4gICAgICApO1xuICAgIH0sIDApO1xuXG4gICAgcmV0dXJuIChcbiAgICAgIGNvbXBhY3RBcnJheVNpemUoc2lnbmVycy5zaXplLCA2NCkgKyAvLyBzaWduYXR1cmVzXG4gICAgICAzICsgLy8gaGVhZGVyXG4gICAgICBjb21wYWN0QXJyYXlTaXplKGFjY291bnRzLnNpemUsIDMyKSArIC8vIGFjY291bnRzXG4gIC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pID0gMDtcbiAgICAgICAgZm9yIChjb25zdCBhIG9mIGFycikge1xuICAgICAgICAgIGlmICghYS5pbnN0cnVjdGlvbnMgJiYgIWEuc2lnbmVycykge1xuICAgICAgICAgICAgdGhyb3cgRXJyb3IoXG4gICAgICAgICAgICAgIGBvbmx5IEluc3RydWN0aW9uIG9iamVjdCB0aGF0IGNhbiB1c2UgYmF0Y2hTdWJtaXQoKS5cbiAgICAgICAgICAgIEluZGV4OiAke2l9LCBTZXQgdmFsdWU6ICR7SlNPTi5zdHJpbmdpZnkoYSl9YCxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIGkrKztcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IGluc3RydWN0aW9ucyA9IGFyci5mbGF0TWFwKChhKSA9PiBhLmluc3RydWN0aW9ucyk7XG4gICAgICAgIGNvbnN0IHNpZ25lcnMgPSBhcnIuZmxhdE1hcCgoYSkgPT4gYS5zaWduZXJzKTtcbiAgICAgICAgY29uc3QgZmVlUGF5ZXJzID0gYXJyLmZpbHRlcigoYSkgPT4gYS5mZWVQYXllciAhPT0gdW5kZWZpbmVkKTtcbiAgICAgICAgbGV0IGZlZVBheWVyID0gc2lnbmVyc1swXTtcbiAgICAgICAgaWYgKGZlZVBheWVycy5sZW5ndGggPiAwICYmIGZlZVBheWVyc1swXS5mZWVQYXllcikge1xuICAgICAgICAgIGZlZVBheWVyID0gZmVlUGF5ZXJzWzBdLmZlZVBheWVyO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgdHJhbnNhY3Rpb24gPSBuZXcgVHJhbnNhY3Rpb24oKTtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHNpZ25lcnM7XG4gICAgICAgIGlmIChmZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gZmVlUGF5ZXIucHVibGljS2V5O1xuICAgICAgICAgIGZpbmFsU2lnbmVycyA9IFtmZWVQYXllciwgL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luYyhcbiAgICAgICAgW1xuICAgICAgICAgIEJ1ZmZlci5mcm9tKCdtZXRhZGF0YScpLFxuICAgICAgICAgIFBST0dSQU1fSUQudG9CdWZmZXIoKSxcbiAgICAgICAgICBhZGRyZXNzLnRvUHVibGljS2V5KCkudG9CdWZmZXIoKSxcbiAgICAgICAgICBCdWZmZXIuZnJvbSgnZWRpdGlvbicpLFxuICAgICAgICBdLFxuICAgICAgICBQUk9HUkFNX0lELFxuICAgICAgKTtcbiAgICAgIHJldHVybiBwdWJsaWNLZXk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBnZXRUcmVlQXV0aG9yaXR5ID0gKGFkZHJlc3M6IFB1YmtleSk6IFB1YmxpY0tleSA9PiB7XG4gICAgICBjb25zdCBbcHVibGljS2V5XSA9IFB1YmxpY0tleS5maW5kUHJvZ3JhbUFkZHJlc3NTeW5jKFxuICAgICAgICBbYWRkcmVzcy50b1B1YmxpY0tleSgpLnRvQnVmZmVyKCldLFxuICAgICAgICBNUExfQlVCQkxFR1VNX1BST0dSQU1fSUQudG9QdWJsaWNLZXkoKSxcbiAgICAgICk7XG4gICAgICByZXR1cm4gcHVibGljS2V5O1xuICAgIH07XG5cbiAgICBleHBvcnQgY29uc3QgZ2V0Qmd1bVNpZ25lciA9ICgpOiBQdWJsaWNLZXkgPT4ge1xuICAgICAgY29uc3QgW3B1YmxpY0tleV0gPSBQdWJsaWNLZXkuZmluZFByb2dyYW1BZGRyZXNzU3luYyhcbiAgICAgICAgW0J1ZmZlci5mcm9tKCdjb2xsZWN0aW9uX2NwaScsICd1dGY4JyldLFxuICAgICAgICBNUExfQlVCQkxFR1VNX1BST0dSQU1fSUQudG9QdWJsaWNLZXkoKSxcbiAgICAgICk7XG4gICAgICByZXR1cm4gcHVibGljS2V5O1xuICAgIH07XG5cbiAgICBleHBvcnQgY29uc3QgZ2V0QXNzZXRJZCA9IChhZGRyZXNzOiBQdWJrZXksIGxlYWZJbmRleDogbnVtYmVyKTogUHVia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WxsZXJfZmVlX2Jhc2lzX3BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJGZWVCYXNpc1BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0YWRhdGEubmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzeW1ib2wnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLnN5bWJvbCkge1xuICAgICAgICAgICAgICByZXMgPSBpc1N5bWJvbChtZXRhZGF0YS5zeW1ib2wpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHJlcyAmJiByZXMuaXNFcnIpIHtcbiAgICAgICAgICByZXN1bHRzLnB1c2goLi4ucmVzLmVycm9yLmRldGFpbHMpO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIGlmIChyZXN1bHRzLmxlbmd0aCA+IDApIHtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9XG4gICAgICAgICAgJ0NhdWdodCBpbiB0aGUgdmFsaWRhdGlvbiBlcnJvcnMuIHNlZSBpbmZvcm1hdGlvbiBlLmc6IGVycjxWYWxpZGF0b3JFcnJvcj4uZGV0YWlscyc7XG4gICAgICAgIHRocm93IG5ldyBWYWxpZGF0b3JFcnJvcihtZXNzYWdlLCByZXN1bHRzKTtcbiAgICAgIH1cbiAg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1ldGFkYXRhIiwgIkNvbnZlcnRlciIsICJUcmFuc2ZlckNoZWNrZWQiLCAiQ29udmVydGVyIiwgIlRyYW5zZmVyIiwgIkNvbnZlcnRlciIsICJWYWxpZGF0b3IiLCAiTWVzc2FnZSIsICJDb252ZXJ0ZXIiLCAiaW1wb3J0X3dlYjMiLCAiTm9kZSIsICJpbXBvcnRfd2ViMyIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiQ29tbW9uIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJpbXBvcnRfd2ViMyIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiaW1wb3J0X3dlYjMiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiXQp9Cg== \ No newline at end of file diff --git a/packages/transaction-builder/dist/index.mjs b/packages/transaction-builder/dist/index.mjs index 2e82a91c4..a4f674628 100644 --- a/packages/transaction-builder/dist/index.mjs +++ b/packages/transaction-builder/dist/index.mjs @@ -179,9 +179,6 @@ var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { console.log("[DEBUG]", data1, data2, data3, data4); } }; -var sleep = async (sec) => { - return new Promise((r) => setTimeout(r, sec * 1e3)); -}; var isPromise = (obj) => { return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; }; @@ -361,22 +358,11 @@ var Result; Result8.all = all; })(Result || (Result = {})); -// ../account/src/associated.ts -import { - ASSOCIATED_TOKEN_PROGRAM_ID, - createAssociatedTokenAccountInstruction, - getAccount, - getAssociatedTokenAddressSync, - TOKEN_PROGRAM_ID, - TokenAccountNotFoundError, - TokenInvalidAccountOwnerError -} from "@solana/spl-token"; - // ../account/src/keypair.ts import { Keypair as Original, PublicKey as PublicKey2 } from "@solana/web3.js"; import bs from "bs58"; var Account; -((Account5) => { +((Account4) => { class Keypair4 { secret; pubkey; @@ -412,111 +398,16 @@ var Account; }); }; } - Account5.Keypair = Keypair4; + Account4.Keypair = Keypair4; })(Account || (Account = {})); -// ../account/src/associated.ts -var Account2; -((Account5) => { - let Associated; - ((Associated2) => { - const RETRY_OVER_LIMIT = 10; - const RETRY_SLEEP_TIME = 3; - const get = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const res = await (0, Associated2.makeOrCreateInstruction)( - mint, - owner, - new Account.Keypair({ secret: feePayer }).pubkey, - allowOwnerOffCurve - ); - if (!res.inst) { - return res.tokenAccount; - } - return new TransactionBuilder.Common( - [res.inst], - [], - feePayer.toKeypair(), - res.tokenAccount - ); - }; - Associated2.retryGetOrCreate = async (mint, owner, feePayer) => { - let counter = 1; - while (counter < RETRY_OVER_LIMIT) { - try { - const inst = await get(mint, owner, feePayer, true); - if (inst && typeof inst === "string") { - debugLog("# associatedTokenAccount: ", inst); - return inst; - } else if (inst instanceof TransactionBuilder.Common) { - (await inst.submit()).map( - async (ok) => { - await Node.confirmedSig(ok); - return inst.data; - }, - (err) => { - debugLog("# Error submit retryGetOrCreate: ", err); - throw err; - } - ); - } - } catch (e) { - debugLog(`# retry: ${counter} create token account: `, e); - debugLog(`# mint: ${mint}, owner: ${owner}, feePayer: ${feePayer}`); - } - await sleep(RETRY_SLEEP_TIME); - counter++; - } - throw Error(`retry action is over limit ${RETRY_OVER_LIMIT}`); - }; - Associated2.makeOrCreateInstruction = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const associatedTokenAccount = getAssociatedTokenAddressSync( - mint.toPublicKey(), - owner.toPublicKey(), - allowOwnerOffCurve, - TOKEN_PROGRAM_ID, - ASSOCIATED_TOKEN_PROGRAM_ID - ); - debugLog("# associatedTokenAccount: ", associatedTokenAccount.toString()); - try { - await getAccount( - Node.getConnection(), - associatedTokenAccount, - Node.getConnection().commitment, - TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst: void 0 - }; - } catch (error) { - if (!(error instanceof TokenAccountNotFoundError) && !(error instanceof TokenInvalidAccountOwnerError)) { - throw Error("Unexpected error"); - } - const payer = !feePayer ? owner : feePayer; - const inst = createAssociatedTokenAccountInstruction( - payer.toPublicKey(), - associatedTokenAccount, - owner.toPublicKey(), - mint.toPublicKey(), - TOKEN_PROGRAM_ID, - ASSOCIATED_TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst - }; - } - }; - })(Associated = Account5.Associated || (Account5.Associated = {})); -})(Account2 || (Account2 = {})); - // ../account/src/pda.ts import { PublicKey as PublicKey3 } from "@solana/web3.js"; import { PROGRAM_ID } from "@metaplex-foundation/mpl-token-metadata"; import { MPL_BUBBLEGUM_PROGRAM_ID } from "@metaplex-foundation/mpl-bubblegum"; import BN from "bn.js"; -var Account3; -((Account5) => { +var Account2; +((Account4) => { let Pda; ((Pda2) => { Pda2.getMetadata = (address) => { @@ -568,14 +459,13 @@ var Account3; ); return assetId.toString(); }; - })(Pda = Account5.Pda || (Account5.Pda = {})); -})(Account3 || (Account3 = {})); + })(Pda = Account4.Pda || (Account4.Pda = {})); +})(Account2 || (Account2 = {})); // ../account/src/index.ts -var Account4 = { - ...Account2, +var Account3 = { ...Account, - ...Account3 + ...Account2 }; // ../global/src/index.ts @@ -607,7 +497,7 @@ String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, op } return url; } - if (Account4.Keypair.isPubkey(addressOrSignature)) { + if (Account3.Keypair.isPubkey(addressOrSignature)) { if (explorer === "solanafm" /* SolanaFM */) { url = `${Constants.EXPLORER_SOLANAFM_URL}/address/${addressOrSignature}?cluster=${cluster}`; } else if (explorer === "xray" /* Xray */) { @@ -627,13 +517,13 @@ String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, op return url; }; String.prototype.toPublicKey = function() { - if (!Account4.Keypair.isPubkey(this.toString())) { + if (!Account3.Keypair.isPubkey(this.toString())) { throw Error(`No match KeyPair.PubKey: ${this.toString()}`); } return new PublicKey4(this.toString()); }; String.prototype.toKeypair = function() { - if (!Account4.Keypair.isSecret(this.toString())) { + if (!Account3.Keypair.isSecret(this.toString())) { throw Error(`No match KeyPair.Secret: ${this.toString()}`); } const decoded = bs2.decode(this.toString()); @@ -1509,4 +1399,4 @@ var TransactionBuilder = { export { TransactionBuilder }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2JhdGNoLnRzIiwgIi4uLy4uL3N1aXRlLXV0aWxzL3NyYy9jb25zdGFudHMudHMiLCAiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL3NoYXJlZC50cyIsICIuLi8uLi9zdWl0ZS11dGlscy9zcmMvcmVzdWx0LnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2Fzc29jaWF0ZWQudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMva2V5cGFpci50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9wZGEudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvaW5kZXgudHMiLCAiLi4vLi4vZ2xvYmFsL3NyYy9pbmRleC50cyIsICIuLi8uLi9jb252ZXJ0ZXIvc3JjL2NvbGxlY3Rpb24udHMiLCAiLi4vLi4vY29udmVydGVyL3NyYy9jcmVhdG9ycy50cyIsICIuLi8uLi9jb252ZXJ0ZXIvc3JjL2NvbXByZXNzZWQtbmZ0LW1ldGFkYXRhLnRzIiwgIi4uLy4uL2NvbnZlcnRlci9zcmMvcm95YWx0eS50cyIsICIuLi8uLi9jb252ZXJ0ZXIvc3JjL25mdC50cyIsICIuLi8uLi9jb252ZXJ0ZXIvc3JjL21lbW8udHMiLCAiLi4vLi4vY29udmVydGVyL3NyYy9taW50LnRzIiwgIi4uLy4uL2NvbnZlcnRlci9zcmMvcmVndWxhci1uZnQtbWV0YWRhdGEudHMiLCAiLi4vLi4vY29udmVydGVyL3NyYy9wcm9wZXJ0aWVzLnRzIiwgIi4uLy4uL2NvbnZlcnRlci9zcmMvdXNlcy50cyIsICIuLi8uLi9jb252ZXJ0ZXIvc3Jj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1bHQ8VHJhbnNhY3Rpb25TaWduYXR1cmUsIEVycm9yPj4gPT4ge1xuICAgICAgcmV0dXJuIFRyeShhc3luYyAoKSA9PiB7XG4gICAgICAgIGxldCBpID0gMDtcbiAgICAgICAgZm9yIChjb25zdCBhIG9mIGFycikge1xuICAgICAgICAgIGlmICghYS5pbnN0cnVjdGlvbnMgJiYgIWEuc2lnbmVycykge1xuICAgICAgICAgICAgdGhyb3cgRXJyb3IoXG4gICAgICAgICAgICAgIGBvbmx5IEluc3RydWN0aW9uIG9iamVjdCB0aGF0IGNhbiB1c2UgYmF0Y2hTdWJtaXQoKS5cbiAgICAgICAgICAgIEluZGV4OiAke2l9LCBTZXQgdmFsdWU6ICR7SlNPTi5zdHJpbmdpZnkoYSl9YCxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIGkrKztcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IGluc3RydWN0aW9ucyA9IGFyci5mbGF0TWFwKChhKSA9PiBhLmluc3RydWN0aW9ucyk7XG4gICAgICAgIGNvbnN0IHNpZ25lcnMgPSBhcnIuZmxhdE1hcCgoYSkgPT4gYS5zaWduZXJzKTtcbiAgICAgICAgY29uc3QgZmVlUGF5ZXJzID0gYXJyLmZpbHRlcigoYSkgPT4gYS5mZWVQYXllciAhPT0gdW5kZWZpbmVkKTtcbiAgICAgICAgbGV0IGZlZVBheWVyID0gc2lnbmVyc1swXTtcbiAgICAgICAgaWYgKGZlZVBheWVycy5sZW5ndGggPiAwICYmIGZlZVBheWVyc1swXS5mZWVQYXllcikge1xuICAgICAgICAgIGZlZVBheWVyID0gZmVlUGF5ZXJzWzBdLmZlZVBheWVyO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgdHJhbnNhY3Rpb24gPSBuZXcgVHJhbnNhY3Rpb24oKTtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHNpZ25lcnM7XG4gICAgICAgIGlmIChmZWVQYXllcikge1xuICAgIC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BhaXIoeyBzZWNyZXQ6IGZlZVBheWVyIH0pLnB1YmtleSxcbiAgICAgICAgYWxsb3dPd25lck9mZkN1cnZlLFxuICAgICAgKTtcblxuICAgICAgaWYgKCFyZXMuaW5zdCkge1xuICAgICAgICByZXR1cm4gcmVzLnRva2VuQWNjb3VudDtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uPFB1YmtleT4oXG4gICAgICAgIFtyZXMuaW5zdF0sXG4gICAgICAgIFtdLFxuICAgICAgICBmZWVQYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgcmVzLnRva2VuQWNjb3VudCEsXG4gICAgICApO1xuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiBSZXRyeSBmdW5jdGlvbiBpZiBjcmVhdGUgbmV3IHRva2VuIGFjY291aW50XG4gICAgICpcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gbWludFxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBvd25lclxuICAgICAqIEBwYXJhbSB7U2VjcmV0fSBmZWVQYXllclxuICAgICAqIEByZXR1cm5zIFByb21pc2U8c3RyaW5nPlxuICAgICAqL1xuICAgIGV4cG9ydCBjb25zdCByZXRyeUdldE9yQ3JlYXRlID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyOiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxzdHJpbmc+ID0+IHtcbiAgICAgIGxldCBjb3VudGVyID0gMTtcbiAgICAgIHdoaWxlIChjb3VudGVyIDwgUkVUUllfT1ZFUl9MSU1JVCkge1xuICAgICAgICB0cnkge1xuICAgICAgICAgIGNvbnN0IGluc3QgPSBhd2FpdCBnZXQobWludCwgb3duZXIsIGZlZVBheWVyLCB0cnVlKTtcblxuICAgICAgICAgIGlmIChpbnN0ICYmIHR5cGVvZiBpbnN0ID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgaW5zdCk7XG4gICAgICAgICAgICByZXR1cm4gaW5zdDtcbiAgICAgICAgICB9IGVsc2UgaWYgKGluc3QgaW5zdGFuY2VvZiBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uKSB7XG4gICAgICAgICAgICAoYXdhaXQgaW5zdC5zdWJtaXQoKSkubWFwKFxuICAgICAgICAgICAgICBhc3luYyAob2s6IHN0cmluZykgPT4ge1xuICAgICAgICAgICAgICAgIGF3YWl0IE5vZGUuY29uZmlybWVkU2lnKG9rKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gaW5zdC5kYXRhO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAoZXJyOiBFcnJvcikgPT4ge1xuICAgICAgICAgICAgICAgIGRlYnVnTG9nKCcjIEVycm9yIHN1Ym1pdCByZXRyeUdldE9yQ3JlYXRlOiAnLCBlcnIpO1xuICAgICAgICAgICAgICAgIHRocm93IGVycjtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgZGVidWdMb2coYCMgcmV0cnk6ICR7Y291bnRlcn0gY3JlYXRlIHRva2VuIGFjY291bnQ6IGAsIGUpO1xuICAgICAgICAgIGRlYnVnTG9nKGAjIG1pbnQ6ICR7bWludH0sIG93bmVyOiAke293bmVyfSwgZmVlUGF5ZXI6ICR7ZmVlUGF5ZXJ9YCk7XG4gICAgICAgIH1cbiAgICAgICAgYXdhaXQgc2xlZXAoUkVUUllfU0xFRVBfVElNRSk7XG4gICAgICAgIGNvdW50ZXIrKztcbiAgICAgIH1cbiAgICAgIHRocm93IEVycm9yKGByZXRyeSBhY3Rpb24gaXMgb3ZlciBsaW1pdCAke1JFVFJZX09WRVJfTElNSVR9YCk7XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIFtNYWluIGxvZ2ljXUdldCBBc3NvY2lhdGVkIHRva2VuIEFjY291bnQuXG4gICAgICogaWYgbm90IGNyZWF0ZWQsIGNyZWF0ZSBuZXcgdG9rZW4gYWNjb3VpbnRcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBtaW50XG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAgICogQHBhcmFtIHtQdWJrZXl9IGZlZVBheWVyXG4gICAgICogQHJldHVybnMgUHJvbWlzZTxzdHJpbmc+XG4gICAgICovXG4gICAgZXhwb3J0IGNvbnN0IG1ha2VPckNyZWF0ZUluc3RydWN0aW9uID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyPzogUHVia2V5LFxuICAgICAgYWxsb3dPd25lck9mZkN1cnZlID0gZmFsc2UsXG4gICAgKTogUHJvbWlzZTx7XG4gICAgICB0b2tlbkFjY291bnQ6IHN0cmluZztcbiAgICAgIGluc3Q6IFRyYW5zYWN0aW9uSW5zdHJ1Y3Rpb24gfCB1bmRlZmluZWQ7XG4gICAgfT4gPT4ge1xuICAgICAgY29uc3QgYXNzb2NpYXRlZFRva2VuQWNjb3VudCA9IGdldEFzc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jKFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSxcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRC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3BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJGZWVCYXNpc1BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0YWRhdGEubmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzeW1ib2wnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLnN5bWJvbCkge1xuICAgICAgICAgICAgICByZXMgPSBpc1N5bWJvbChtZXRhZGF0YS5zeW1ib2wpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHJlcyAmJiByZXMuaXNFcnIpIHtcbiAgICAgICAgICByZXN1bHRzLnB1c2goLi4ucmVzLmVycm9yLmRldGFpbHMpO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIGlmIChyZXN1bHRzLmxlbmd0aCA+IDApIHtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9XG4gICAgICAgICAgJ0NhdWdodCBpbiB0aGUgdmFsaWRhdGlvbiBlcnJvcnMuIHNlZSBpbmZvcm1hdGlvbiBlLmc6IGVycjxWYWxpZGF0b3JFcnJvcj4uZGV0YWlscyc7XG4gICAgICAgIHRocm93IG5ldyBWYWxpZGF0b3JFcnJvcihtZXNzYWdlLCByZXN1bHRzKTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBNZXNzYWdl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ZmlsZVBhdGg6IEZpbGVUeXBlLFxuICAgICAgICBzdG9yYWdlVHlwZTogU3RvcmFnZVR5cGUsXG4gICAgICAgIGZlZVBheWVyPzogU2VjcmV0LFxuICAgICAgKSA9PiBQcm9taXNlPFJlc3VsdDxzdHJpbmcsIEVycm9yPj4sXG4gICAgICBzdG9yYWdlVHlwZTogU3RvcmFnZVR5cGUsXG4gICAgICBmZWVQYXllcj86IFNlY3JldCxcbiAgICApOiBQcm9taXNlPFByb3BlcnRpZXM+ID0+IHtcbiAgICAgIGlmICghaW5wdXQgfHwgIWlucHV0LmZpbGVzKSB7XG4gICAgICAgIHJldHVybiB7fTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgZmlsZXMgPSBhd2FpdCBQcm9taXNlLmFsbChcbiAgICAgICAgaW5wdXQuZmlsZXMubWFwKGFzeW5jIChmaWxlKSA9PiB7XG4gICAgICAgICAgaWYgKCFmaWxlLmZpbGVQYXRoKSB7XG4gICAgICAgICAgICByZXR1cm4ge307XG4gICAgICAgICAgfVxuICAgICAgICAgIGNvbnN0IHJlcyA9IGF3YWl0IGNhbGxiYWNrRnVuYyhmaWxlLmZpbGVQYXRoLCBzdG9yYWdlVHlwZSwgZmVlUGF5ZXIpO1xuICAgICAgICAgIGlmIChyZXMuaXNFcnIpIHtcbiAgICAgICAgICAgIHRocm93IEVycm9yKHJlcy5lcnJvci5tZXNzYWdlKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgcmV0dXJuIG92ZXJ3cml0ZU9iamVjdChmaWxlLCBbXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGV4aXN0c0tleTogJ2ZpbGVQYXRoJyxcbiAgICAgICAgICAgICAgd2lsbDogeyBrZXk6ICd1cmknLCB2YWx1ZTogcmVzLnZhbHVlIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgIF0pO1xuICAgICAgICB9KSxcbiAgICAgICk7XG4gICAgICByZXR1cm4geyAuLi5pbnB1dCwgZmlsZXMgfSBhcy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uICAgIHJldHVybiBUcnkoKCkgPT4ge1xuICAgICAgY29uc3Qga2V5cyA9IE9iamVjdC5rZXlzKG1ldGFkYXRhKTtcbiAgICAgIGNvbnN0IHJlc3VsdHM6IERldGFpbHNbXSA9IFtdO1xuICAgICAga2V5cy5tYXAoKGtleSkgPT4ge1xuICAgICAgICBsZXQgcmVzITogUmVzdWx0PHN0cmluZywgVmFsaWRhdG9yRXJyb3I+O1xuICAgICAgICBzd2l0Y2ggKGtleSkge1xuICAgICAgICAgIGNhc2UgJ2ltYWdlJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuaW1hZ2UpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNJbWFnZVVybChtZXRhZGF0YS5pbWFnZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdyb3lhbHR5JzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEucm95YWx0eSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1JveWFsdHkobWV0YWRhdGEucm95YWx0eSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSkge1xuICAgICAgICAgICAg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 No newline at end of file diff --git a/packages/transaction-filter/dist/index.js b/packages/transaction-filter/dist/index.js index d69f95971..d1eed68b3 100644 --- a/packages/transaction-filter/dist/index.js +++ b/packages/transaction-filter/dist/index.js @@ -415,14 +415,11 @@ var TransactionBuilder5; // ../global/src/index.ts var import_web38 = require("@solana/web3.js"); -// ../account/src/associated.ts -var import_spl_token = require("@solana/spl-token"); - // ../account/src/keypair.ts var import_web36 = require("@solana/web3.js"); var import_bs58 = __toESM(require("bs58")); var Account; -((Account5) => { +((Account4) => { class Keypair4 { secret; pubkey; @@ -458,111 +455,16 @@ var Account; }); }; } - Account5.Keypair = Keypair4; + Account4.Keypair = Keypair4; })(Account || (Account = {})); -// ../account/src/associated.ts -var Account2; -((Account5) => { - let Associated; - ((Associated2) => { - const RETRY_OVER_LIMIT = 10; - const RETRY_SLEEP_TIME = 3; - const get = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const res = await (0, Associated2.makeOrCreateInstruction)( - mint, - owner, - new Account.Keypair({ secret: feePayer }).pubkey, - allowOwnerOffCurve - ); - if (!res.inst) { - return res.tokenAccount; - } - return new TransactionBuilder6.Common( - [res.inst], - [], - feePayer.toKeypair(), - res.tokenAccount - ); - }; - Associated2.retryGetOrCreate = async (mint, owner, feePayer) => { - let counter = 1; - while (counter < RETRY_OVER_LIMIT) { - try { - const inst = await get(mint, owner, feePayer, true); - if (inst && typeof inst === "string") { - debugLog("# associatedTokenAccount: ", inst); - return inst; - } else if (inst instanceof TransactionBuilder6.Common) { - (await inst.submit()).map( - async (ok) => { - await Node.confirmedSig(ok); - return inst.data; - }, - (err) => { - debugLog("# Error submit retryGetOrCreate: ", err); - throw err; - } - ); - } - } catch (e) { - debugLog(`# retry: ${counter} create token account: `, e); - debugLog(`# mint: ${mint}, owner: ${owner}, feePayer: ${feePayer}`); - } - await sleep(RETRY_SLEEP_TIME); - counter++; - } - throw Error(`retry action is over limit ${RETRY_OVER_LIMIT}`); - }; - Associated2.makeOrCreateInstruction = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const associatedTokenAccount = (0, import_spl_token.getAssociatedTokenAddressSync)( - mint.toPublicKey(), - owner.toPublicKey(), - allowOwnerOffCurve, - import_spl_token.TOKEN_PROGRAM_ID, - import_spl_token.ASSOCIATED_TOKEN_PROGRAM_ID - ); - debugLog("# associatedTokenAccount: ", associatedTokenAccount.toString()); - try { - await (0, import_spl_token.getAccount)( - Node.getConnection(), - associatedTokenAccount, - Node.getConnection().commitment, - import_spl_token.TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst: void 0 - }; - } catch (error) { - if (!(error instanceof import_spl_token.TokenAccountNotFoundError) && !(error instanceof import_spl_token.TokenInvalidAccountOwnerError)) { - throw Error("Unexpected error"); - } - const payer = !feePayer ? owner : feePayer; - const inst = (0, import_spl_token.createAssociatedTokenAccountInstruction)( - payer.toPublicKey(), - associatedTokenAccount, - owner.toPublicKey(), - mint.toPublicKey(), - import_spl_token.TOKEN_PROGRAM_ID, - import_spl_token.ASSOCIATED_TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst - }; - } - }; - })(Associated = Account5.Associated || (Account5.Associated = {})); -})(Account2 || (Account2 = {})); - // ../account/src/pda.ts var import_web37 = require("@solana/web3.js"); var import_mpl_token_metadata = require("@metaplex-foundation/mpl-token-metadata"); var import_mpl_bubblegum = require("@metaplex-foundation/mpl-bubblegum"); var import_bn = __toESM(require("bn.js")); -var Account3; -((Account5) => { +var Account2; +((Account4) => { let Pda; ((Pda2) => { Pda2.getMetadata = (address) => { @@ -614,14 +516,13 @@ var Account3; ); return assetId.toString(); }; - })(Pda = Account5.Pda || (Account5.Pda = {})); -})(Account3 || (Account3 = {})); + })(Pda = Account4.Pda || (Account4.Pda = {})); +})(Account2 || (Account2 = {})); // ../account/src/index.ts -var Account4 = { - ...Account2, +var Account3 = { ...Account, - ...Account3 + ...Account2 }; // ../global/src/index.ts @@ -652,7 +553,7 @@ String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, op } return url; } - if (Account4.Keypair.isPubkey(addressOrSignature)) { + if (Account3.Keypair.isPubkey(addressOrSignature)) { if (explorer === "solanafm" /* SolanaFM */) { url = `${Constants.EXPLORER_SOLANAFM_URL}/address/${addressOrSignature}?cluster=${cluster}`; } else if (explorer === "xray" /* Xray */) { @@ -672,13 +573,13 @@ String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, op return url; }; String.prototype.toPublicKey = function() { - if (!Account4.Keypair.isPubkey(this.toString())) { + if (!Account3.Keypair.isPubkey(this.toString())) { throw Error(`No match KeyPair.PubKey: ${this.toString()}`); } return new import_web38.PublicKey(this.toString()); }; String.prototype.toKeypair = function() { - if (!Account4.Keypair.isSecret(this.toString())) { + if (!Account3.Keypair.isSecret(this.toString())) { throw Error(`No match KeyPair.Secret: ${this.toString()}`); } const decoded = import_bs582.default.decode(this.toString()); @@ -1693,4 +1594,4 @@ var TransactionFilter; Signatures, TransactionFilter }); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uLy4uL3N1aXRlLXV0aWxzL3NyYy9jb25zdGFudHMudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvYmF0Y2gudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY29tbW9uLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL21pbnQudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvcGFydGlhbC1zaWduLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2NhbGN1bGF0ZS10eHNpemUudHMiLCAiLi4vLi4vZ2xvYmFsL3NyYy9pbmRleC50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9hc3NvY2lhdGVkLnRzIiw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WxkZXIge1xuICBleHBvcnQgY2xhc3MgQmF0Y2gge1xuICAgIHN1Ym1pdCA9IGFzeW5jIChcbiAgICAgIGFycjogQ29tbW9uLkNvbW1vbltdIHwgTWludC5NaW50W10sXG4gICAgKTogUHJvbWlzZTxSZXN1bHQ8VHJhbnNhY3Rpb25TaWduYXR1cmUsIEVycm9yPj4gPT4ge1xuICAgICAgcmV0dXJuIFRyeShhc3luYyAoKSA9PiB7XG4gICAgICAgIGxldCBpID0gMDtcbiAgICAgICAgZm9yIChjb25zdCBhIG9mIGFycikge1xuICAgICAgICAgIGlmICghYS5pbnN0cnVjdGlvbnMgJiYgIWEuc2lnbmVycykge1xuICAgICAgICAgICAgdGhyb3cgRXJyb3IoXG4gICAgICAgICAgICAgIGBvbmx5IEluc3RydWN0aW9uIG9iamVjdCB0aGF0IGNhbiB1c2UgYmF0Y2hTdWJtaXQoKS5cbiAgICAgICAgICAgIEluZGV4OiAke2l9LCBTZXQgdmFsdWU6ICR7SlNPTi5zdHJpbmdpZnkoYSl9YCxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIGkrKztcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IGluc3RydWN0aW9ucyA9IGFyci5mbGF0TWFwKChhKSA9PiBhLmluc3RydWN0aW9ucyk7XG4gICAgICAgIGNvbnN0IHNpZ25lcnMgPSBhcnIuZmxhdE1hcCgoYSkgPT4gYS5zaWduZXJzKTtcbiAgICAgICAgY29uc3QgZmVlUGF5ZXJzID0gYXJyLmZpbHRlcigoYSkgPT4gYS5mZWVQYXllciAhPT0gdW5kZWZpbmVkKTtcbiAgICAgICAgbGV0IGZlZVBheWVyID0gc2lnbmVyc1swXTtcbiAgICAgICAgaWYgKGZlZVBheWVycy5sZW5ndGggPiAwICYmIGZlZVBheWVyc1swXS5mZWVQYXllcikge1xuICAgICAgICAgIGZlZVBheWVyID0gZmVlUGF5ZXJzWzBdLmZlZVBheWVyO1xuICAgICAgICB9XG5c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AgICAgIHJldHVybiByZXMudG9rZW5BY2NvdW50O1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb248UHVia2V5PihcbiAgICAgICAgW3Jlcy5pbnN0XSxcbiAgICAgICAgW10sXG4gICAgICAgIGZlZVBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICByZXMudG9rZW5BY2NvdW50ISxcbiAgICAgICk7XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIFJldHJ5IGZ1bmN0aW9uIGlmIGNyZWF0ZSBuZXcgdG9rZW4gYWNjb3VpbnRcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBtaW50XG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAgICogQHBhcmFtIHtTZWNyZXR9IGZlZVBheWVyXG4gICAgICogQHJldHVybnMgUHJvbWlzZTxzdHJpbmc+XG4gICAgICovXG4gICAgZXhwb3J0IGNvbnN0IHJldHJ5R2V0T3JDcmVhdGUgPSBhc3luYyAoXG4gICAgICBtaW50OiBQdWJrZXksXG4gICAgICBvd25lcjogUHVia2V5LFxuICAgICAgZmVlUGF5ZXI6IFNlY3JldCxcbiAgICApOiBQcm9taXNlPHN0cmluZz4gPT4ge1xuICAgICAgbGV0IGNvdW50ZXIgPSAxO1xuICAgICAgd2hpbGUgKGNvdW50ZXIgPCBSRVRSWV9PVkVSX0xJTUlUKSB7XG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgY29uc3QgaW5zdCA9IGF3YWl0IGdldChtaW50LCBvd25lciwgZmVlUGF5ZXIsIHRydWUpO1xuXG4gICAgICAgICAgaWYgKGluc3QgJiYgdHlwZW9mIGluc3QgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICBkZWJ1Z0xvZygnIyBhc3NvY2lhdGVkVG9rZW5BY2NvdW50OiAnLCBpbnN0KTtcbiAgICAgICAgICAgIHJldHVybiBpbnN0O1xuICAgICAgICAgIH0gZWxzZSBpZiAoaW5zdCBpbnN0YW5jZW9mIFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb24pIHtcbiAgICAgICAgICAgIChhd2FpdCBpbnN0LnN1Ym1pdCgpKS5tYXAoXG4gICAgICAgICAgICAgIGFzeW5jIChvazogc3RyaW5nKSA9PiB7XG4gICAgICAgICAgICAgICAgYXdhaXQgTm9kZS5jb25maXJtZWRTaWcob2spO1xuICAgICAgICAgICAgICAgIHJldHVybiBpbnN0LmRhdGE7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIChlcnI6IEVycm9yKSA9PiB7XG4gICAgICAgICAgICAgICAgZGVidWdMb2coJyMgRXJyb3Igc3VibWl0IHJldHJ5R2V0T3JDcmVhdGU6ICcsIGVycik7XG4gICAgICAgICAgICAgICAgdGhyb3cgZXJyO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICBkZWJ1Z0xvZyhgIyByZXRyeTogJHtjb3VudGVyfSBjcmVhdGUgdG9rZW4gYWNjb3VudDogYCwgZSk7XG4gICAgICAgICAgZGVidWdMb2coYCMgbWludDogJHttaW50fSwgb3duZXI6ICR7b3duZXJ9LCBmZWVQYXllcjogJHtmZWVQYXllcn1gKTtcbiAgICAgICAgfVxuICAgICAgICBhd2FpdCBzbGVlcChSRVRSWV9TTEVFUF9USU1FKTtcbiAgICAgICAgY291bnRlcisrO1xuICAgICAgfVxuICAgICAgdGhyb3cgRXJyb3IoYHJldHJ5IGFjdGlvbiBpcyBvdmVyIGxpbWl0ICR7UkVUUllfT1ZFUl9MSU1JVH1gKTtcbiAgICB9O1xuXG4gICAgLyoqXG4gICAgICogW01haW4gbG9naWNdR2V0IEFzc29jaWF0ZWQgdG9rZW4gQWNjb3VudC5cbiAgICAgKiBpZiBub3QgY3JlYXRlZCwgY3JlYXRlIG5ldyB0b2tlbiBhY2NvdWludFxuIC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gICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLmNvbW1pdG1lbnQsXG4gICAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICB0b2tlbkFjY291bnQ6IGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSxcbiAgICAgICAgICBpbnN0OiB1bmRlZmluZWQsXG4gICAgICAgIH07XG4gICAgICB9IGNhdGNoIChlcnJvcjogdW5rbm93bikge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuQWNjb3VudE5vdEZvdW5kRXJyb3IpICYmXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuSW52YWxpZEFjY291bnRPd25lckVycm9yKVxuICAgICAgICApIHtcbiAgICAgICAgICB0aHJvdyBFcnJvcignVW5leHBlY3RlZCBlcnJvcicpO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgcGF5ZXIgPSAhZmVlUGF5ZXIgPyBvd25lciA6IGZlZVBheWVyO1xuXG4gICAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVBc3NvY2lhdGVkVG9rZW5BY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgcGF5ZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9r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O1xuICAgICAgICBpZiAoc2lnLmlzRXJyKSB7XG4gICAgICAgICAgcmV0dXJuIHNpZztcbiAgICAgICAgfVxuICAgICAgICBhd2FpdCBOb2RlLmNvbmZpcm1lZFNpZyhzaWcudmFsdWUpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgZGVidWdMb2coJyMgUmVzdWx0IGJhdGNoIG90aGVyIHRoYW4gY2FuU3VibWl0Jyk7XG4gICAgICAgIGlmICh0aGlzLmxlbmd0aCA9PSBpKSB7XG4gICAgICAgICAgLy8gbGFzdCBvYmplY3RcbiAgICAgICAgICByZXR1cm4gb2JqLnN1Ym1pdChmZWVQYXllcik7XG4gICAgICAgIH1cbiAgICAgICAgb2JqLnN1Ym1pdChmZWVQYXllcik7XG4gICAgICB9XG4gICAgICBpKys7XG4gICAgfVxuICB9IGVsc2Uge1xuICAgIGNvbnN0IGluc3RydWN0aW9uczogQ29tbW9uU3RydWN0dXJlIHwgTWludFN0cnVjdHVyZVtdID0gW107XG4gICAgZm9yIChjb25zdCBvYmogb2YgdGhpcykge1xuICAgICAgaWYgKG9iai5pc0Vycikge1xuICAgICAgICByZXR1cm4gb2JqO1xuICAgICAgfSBlbHNlIGlmIChvYmouaXNPaykge1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChvYmoudmFsdWUpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgcmV0dXJuIFJlc3VsdC5lcnIoRXJyb3IoJ09ubHkgQXJyYXkgSW5zdHJ1Y3Rpb24gb2JqZWN0JykpO1xuICAgICAgfVxuICAgIH1cbiAgICBkZWJ1Z0xvZygnIyBSZXN1bHQgYmF0Y2ggc3VibWl0OiAnLCBpbnN0cnVjdGlvbnMpO1xuICAgIHJldHVybiBuZXcgVHJhbnNhY3Rpb25CdWlsZGVyLkJhdGNoKCkuc3VibWl0KGluc3RydWN0aW9ucyk7XG4gIH1cbn07XG5cbmNsYXNzIEludGVybmFsT2s8VCwgRSBleHRlbmRzIEVycm9yPiBleHR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IGlucHV0OiBPcHRpb248SW5wdXRDb2xsZWN0aW9uPiB8IHVuZGVmaW5lZCxcbiAgICApOiBPcHRpb248SW50ZXJuYWxDb2xsZWN0aW9uPiA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBudWxsO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4ge1xuICAgICAgICBrZXk6IGlucHV0LnRvUHVibGljS2V5KCksXG4gICAgICAgIHZlcmlmaWVkOiBmYWxzZSxcbiAgICAgIH07XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlciA9IChcbiAgICAgIG91dHB1dDogT3B0aW9uPEludGVybmFsQ29sbGVjdGlvbj4sXG4gICAgKTogQ29sbGVjdGlvblR5cGUgfCB1bmRlZmluZWQgPT4ge1xuICAgICAgaWYgKCFvdXRwdXQpIHtcbiAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIHtcbiAgICAgICAgYWRkcmVzczogb3V0cHV0LmtleS50b1N0cmluZygpLFxuICAgICAgICB2ZXJpZmllZDogb3V0cHV0LnZlcmlmaWVkLFxuICAgICAgfTtcbiAgICB9O1xuICB9XG5cbiAgZXhwb3J0IG5hbWVzcGFjZSBDb2xsZWN0aW9uTWludCB7XG4gICAgZXhwb3J0IGNvbnN0IGludG9Vc2VyID0gKG91dHB1dDogR3JvdXBpbmdbXSk6IFB1YmtleSA9PiB7XG4gICAgICBjb25zdCByZXMgPSBvdXRwdXQuZmluZCgodmFsdWUpID0+IHtcbiAgICAgICAgaWYgKHZhbHVlLmdyb3VwX2tleSA9PT0gJ2NvbGxlY3Rpb24nKSB7XG4gICAgICAgICAgcmV0dXJuIHZhbHVlLmdyb3VwX3ZhbHVlO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIHJldHVybiByZXMgPyByZXMuZ3JvdXBfdmFsdWUgOiAnJztcbiAgICB9O1xuICB9XG59XG4iLCAiLyog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gICBjYXNlICdzZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ25hbWUnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLm5hbWUpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNOYW1lKG1ldGFkYXRhLm5hbWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc3ltYm9sJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5zeW1ib2wpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTeW1ib2wobWV0YWRhdGEuc3ltYm9sKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgICAgIGlmIChyZXMgJiYgcmVzLmlzRXJyKSB7XG4gICAgICAgICAgcmVzdWx0cy5wdXNoKC4uLnJlcy5lcnJvci5kZXRhaWxzKTtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgICBpZiAocmVzdWx0cy5sZW5ndGggPiAwKSB7XG4gICAgICAgIGNvb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IHtcbiAgICAgICAgICBzd2l0Y2ggKGZpbHRlclR5cGUpIHtcbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5NZW1vOiB7XG4gICAgICAgICAgICAgIGlmIChGaWx0ZXJPcHRpb25zLk1lbW8ucHJvZ3JhbS5pbmNsdWRlcyhpbnN0cnVjdGlvbi5wcm9ncmFtKSkge1xuICAgICAgICAgICAgICAgIGxldCBpbnN0cnVjdGlvblRyYW5zZmVyO1xuXG4gICAgICAgICAgICAgICAgLy8gZmV0Y2ggIHRyYW5zZmVyIHRyYW5zYWN0aW9uIGZvciByZWxhdGlvbmFsIG1lbW9cbiAgICAgICAgICAgICAgICB0eE1ldGEudHJhbnNhY3Rpb24ubWVzc2FnZS5pbnN0cnVjdGlvbnMuZm9yRWFjaChcbiAgICAgICAgICAgICAgICAgIChpbnN0cnVjdGlvbikgPT4ge1xuICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgaXNQYXJzZWRJbnN0cnVjdGlvbihpbnN0cnVjdGlvbikgJiZcbiAgICAgICAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLlRyYW5zZmVyLnByb2dyYW0uaW5jbHVkZXMoXG4gICAgICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbi5wcm9ncmFtLFxuICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlciA9IGluc3RydWN0aW9uO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICk7XG5cbiAgICAgICAgICAgICAgICAvLyBzcGwtdG9rZW4gb3Igc3lzdGVtXG4gICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlciAmJlxuICAgICAgICAgICAgICAgICAgbW9kdWxlTmFtZSAhPT0gaW5zdHJ1Y3Rpb25UcmFuc2ZlclsncHJvZ3JhbSddXG4gICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICBkZWJ1Z0xvZyhcbiAgICAgICAgICAgICAgICAgICAgJyMgRmlsdGVyVHlwZS5NZW1vIGJyZWFrIGluc3RydWN0aW9uOiAnLFxuICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyLFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vIGZldGNoIG1lbW8gb25seSB0cmFuc2FjdGlvblxuICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuTWVtby5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIsXG4gICAgICAgICAgICAgICAgICBwb3N0VG9rZW5BY2NvdW50LFxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXNlIEZpbHRlclR5cGUuT25seU1lbW86IHtcbiAgICAgICAgICAgICAgaWYgKEZpbHRlck9wdGlvbnMuTWVtby5wcm9ncmFtLmluY2x1ZGVzKGluc3RydWN0aW9uLnByb2dyYW0pKSB7XG4gICAgICAgICAgICAgICAgbGV0IGluc3RydWN0aW9uVHJhbnNmZXI7XG5cbiAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLk1lbW8uaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyLFxuICAgICAgICAgICAgICAgICAgcG9zdFRva2VuQWNjb3VudCxcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLk1pbnQ6IHtcbiAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuTWludC5wcm9ncmFtLmluY2x1ZGVzKGluc3RydWN0aW9uLnByb2dyYW0pICYmXG4gICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5NaW50LmFjdGlvbi5pbmNsdWRlcyhcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLnBhcnNlZC50eXBlIGFzIHN0cmluZyxcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuTWludC5pbnRvVXNlclNpZGUoaW5zdHJ1Y3Rpb24sIHR4TWV0YSk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXNlIEZpbHRlclR5cGUuVHJhbnNmZXI6XG4gICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICBtb2R1bGVOYW1lID09PSBpbnN0cnVjdGlvbi5wcm9ncmFtICYmXG4gICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5UcmFuc2Zlci5hY3Rpb24uaW5jbHVkZXMoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbi5wYXJzZWQudHlwZSBhcyBzdHJpbmcsXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICBpZiAoaW5zdHJ1Y3Rpb24ucGFyc2VkLnR5cGUgPT09ICd0cmFuc2ZlckNoZWNrZWQnK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b3J0IGNsYXNzIEJhdGNoIHtcbiAgICBzdWJtaXQgPSBhc3luYyAoXG4gICAgICBhcnI6IENvbW1vbi5Db21tb25bXSB8IE1pbnQuTWludFtdLFxuICAgICk6IFByb21pc2U8UmVzdWx0PFRyYW5zYWN0aW9uU2lnbmF0dXJlLCBFcnJvcj4+ID0+IHtcbiAgICAgIHJldHVybiBUcnkoYXN5bmMgKCkgPT4ge1xuICAgICAgICBsZXQgaSA9IDA7XG4gICAgICAgIGZvciAoY29uc3QgYSBvZiBhcnIpIHtcbiAgICAgICAgICBpZiAoIWEuaW5zdHJ1Y3Rpb25zICYmICFhLnNpZ25lcnMpIHtcbiAgICAgICAgICAgIHRocm93IEVycm9yKFxuICAgICAgICAgICAgICBgb25seSBJbnN0cnVjdGlvbiBvYmplY3QgdGhhdCBjYW4gdXNlIGJhdGNoU3VibWl0KCkuXG4gICAgICAgICAgICBJbmRleDogJHtpfSwgU2V0IHZhbHVlOiAke0pTT04uc3RyaW5naWZ5KGEpfWAsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICBpKys7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBpbnN0cnVjdGlvbnMgPSBhcnIuZmxhdE1hcCgoYSkgPT4gYS5pbnN0cnVjdGlvbnMpO1xuICAgICAgICBjb25zdCBzaWduZXJzID0gYXJyLmZsYXRNYXAoKGEpID0+IGEuc2lnbmVycyk7XG4gICAgICAgIGNvbnN0IGZlZVBheWVycyA9IGFyci5maWx0ZXIoKGEpID0+IGEuZmVlUGF5ZXIgIT09IHVuZGVmaW5lZCk7XG4gICAgICAgIGxldCBmZWVQYXllciA9IHNpZ25lcnNbMF07XG4gICAgICAgIGlmIChmZWVQYXllcnMubGVuZ3RoID4gMCAmJiBmZWVQYXllcnNbMF0uZmVlUGF5ZXIpIHtcbiAgICAgICAgICBmZWVQYXllciA9IGZlZVBheWVyc1swXS5mZWVQYXllcjtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvb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Y2NvdW50cyA9IG5ldyBTZXQ8c3RyaW5nPihmZWVQYXllclBrKTtcblxuICAgIGNvbnN0IGl4c1NpemUgPSB0cmFuc2FjdGlvbi5pbnN0cnVjdGlvbnMucmVkdWNlKChhY2MsIGl4KSA9PiB7XG4gICAgICBpeC5rZXlzLmZvckVhY2goKHsgcHVia2V5LCBpc1NpZ25lciB9KSA9PiB7XG4gICAgICAgIGNvbnN0IHBrID0gcHVia2V5LnRvQmFzZTU4KCk7XG4gICAgICAgIGlmIChpc1NpZ25lcikgc2lnbmVycy5hZGQocGspO1xuICAgICAgICBhY2NvdW50cy5hZGQocGspO1xuICAgICAgfSk7XG5cbiAgICAgIGFjY291bnRzLmFkZChpeC5wcm9ncmFtSWQudG9CYXNlNTgoKSk7XG5cbiAgICAgIGNvbnN0IG5JbmRleGVzID0gaXgua2V5cy5sZW5ndGg7XG4gICAgICBjb25zdCBvcGFxdWVEYXRhID0gaXguZGF0YS5sZW5ndGg7XG5cbiAgICAgIHJldHVybiAoXG4gICAgICAgIGFjYyArXG4gICAgICAgIDEgKyAvLyBQSUQgaW5kZXhcbiAgICAgICAgY29tcGFjdEFycmF5U2l6ZShuSW5kZXhlcywgMSkgK1xuICAgICAgICBjb21wYWN0QXJyYXlTaXplKG9wYXF1ZURhdGEsIDEpXG4gICAgICApO1xuICAgIH0sIDApO1xuXG4gICAgcmV0dXJuIChcbiAgICAgIGNvbXBhY3RBcnJheVNpemUoc2lnbmVycy5zaXplLCA2NCkgKyAvLyBzaWduYXR1cmVzXG4gICAgICAzICsgLy8gaGVhZGVyXG4gICAgICBjb21wYWN0QXJyYXlTaXplKGFjY291bnRzLnNpemUsIDMyKSArIC8vIGFjY291bnRzXG4gICAgICAzMiArIC8vIGJsb2NraGFzaFxuICAgICAgY29tcGFjdEhlYWRlcih0cmFuc2FjdGlvbi5pbnN0cnVjdGlvbnMubGVuZ3RoKSArIC8vIGluc3RydWN0aW9uc1xuICAgICAgaXhzU2l6ZVxuICAgICk7XG4gI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gaXNSb3lhbHR5KG1ldGFkYXRhLnJveWFsdHkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEuc3ltYm9sKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU3ltYm9sKG1ldGFkYXRhLnN5bWJvbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAocmVzICYmIHJlcy5pc0Vycikge1xuICAgICAgICAgIHJlc3VsdHMucHVzaCguLi5yZXMuZXJyb3IuZGV0YWlscyk7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AgICAgc3dpdGNoIChmaWx0ZXJUeXBlKSB7XG4gICAgICAgICAgICBjYXNlIEZpbHRlclR5cGUuTWVtbzoge1xuICAgICAgICAgICAgICBpZiAoRmlsdGVyT3B0aW9ucy5NZW1vLnByb2dyYW0uaW5jbHVkZXMoaW5zdHJ1Y3Rpb24ucHJvZ3JhbSkpIHtcbiAgICAgICAgICAgICAgICBsZXQgaW5zdHJ1Y3Rpb25UcmFuc2ZlcjtcblxuICAgICAgICAgICAgICAgIC8vIGZldGNoICB0cmFuc2ZlciB0cmFuc2FjdGlvbiBmb3IgcmVsYXRpb25hbCBtZW1vXG4gICAgICAgICAgICAgICAgdHhNZXRhLnRyYW5zYWN0aW9uLm1lc3NhZ2UuaW5zdHJ1Y3Rpb25zLmZvckVhY2goXG4gICAgICAgICAgICAgICAgICAoaW5zdHJ1Y3Rpb24pID0+IHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgIGlzUGFyc2VkSW5zdHJ1Y3Rpb24oaW5zdHJ1Y3Rpb24pICYmXG4gICAgICAgICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5UcmFuc2Zlci5wcm9ncmFtLmluY2x1ZGVzKFxuICAgICAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24ucHJvZ3JhbSxcbiAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIgPSBpbnN0cnVjdGlvbjtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICApO1xuXG4gICAgICAgICAgICAgICAgLy8gc3BsLXRva2VuIG9yIHN5c3RlbVxuICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIgJiZcbiAgICAgICAgICAgICAgICAgIG1vZHVsZU5hbWUgIT09IGluc3RydWN0aW9uVHJhbnNmZXJbJ3Byb2dyYW0nXVxuICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgZGVidWdMb2coXG4gICAgICAgICAgICAgICAgICAgICcjIEZpbHRlclR5cGUuTWVtbyBicmVhayBpbnN0cnVjdGlvbjogJyxcbiAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlcixcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAvLyBmZXRjaCBtZW1vIG9ubHkgdHJhbnNhY3Rpb25cbiAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLk1lbW8uaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyLFxuICAgICAgICAgICAgICAgICAgcG9zdFRva2VuQWNjb3VudCxcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLk9ubHlNZW1vOiB7XG4gICAgICAgICAgICAgIGlmIChGaWx0ZXJPcHRpb25zLk1lbW8ucHJvZ3JhbS5pbmNsdWRlcyhpbnN0cnVjdGlvbi5wcm9ncmFtKSkge1xuICAgICAgICAgICAgICAgIGxldCBpbnN0cnVjdGlvblRyYW5zZmVyO1xuXG4gICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5NZW1vLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlcixcbiAgICAgICAgICAgICAgICAgIHBvc3RUb2tlbkFjY291bnQsXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5NaW50OiB7XG4gICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLk1pbnQucHJvZ3JhbS5pbmNsdWRlcyhpbnN0cnVjdGlvbi5wcm9ncmFtKSAmJlxuICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuTWludC5hY3Rpb24uaW5jbHVkZXMoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbi5wYXJzZWQudHlwZSBhcyBzdHJpbmcsXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLk1pbnQuaW50b1VzZXJTaWRlKGluc3RydWN0aW9uLCB0eE1ldGEpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLlRyYW5zZmVyOlxuICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgbW9kdWxlTmFtZSA9PT0gaW5zdHJ1Y3Rpb24ucHJvZ3JhbSAmJlxuICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuVHJhbnNmZXIuYWN0aW9uLmluY2x1ZGVzKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24ucGFyc2VkLnR5cGUgYXMgc3RyaW5nLFxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgaWYgKGluc3RydWN0aW9uLnBhcnNlZC50eXBlID09PSAndHJhbnNmZXJDaGVja2VkJ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W5zYWN0aW9uRmlsdGVyIiwgImluc3RydWN0aW9uIiwgIkNvbnZlcnRlciJdCn0K \ No newline at end of file diff --git a/packages/transaction-filter/dist/index.mjs b/packages/transaction-filter/dist/index.mjs index 167047027..c032f35e3 100644 --- a/packages/transaction-filter/dist/index.mjs +++ b/packages/transaction-filter/dist/index.mjs @@ -389,22 +389,11 @@ var TransactionBuilder5; // ../global/src/index.ts import { Keypair as Keypair3, LAMPORTS_PER_SOL, PublicKey as PublicKey4 } from "@solana/web3.js"; -// ../account/src/associated.ts -import { - ASSOCIATED_TOKEN_PROGRAM_ID, - createAssociatedTokenAccountInstruction, - getAccount, - getAssociatedTokenAddressSync, - TOKEN_PROGRAM_ID, - TokenAccountNotFoundError, - TokenInvalidAccountOwnerError -} from "@solana/spl-token"; - // ../account/src/keypair.ts import { Keypair as Original, PublicKey as PublicKey2 } from "@solana/web3.js"; import bs from "bs58"; var Account; -((Account5) => { +((Account4) => { class Keypair4 { secret; pubkey; @@ -440,111 +429,16 @@ var Account; }); }; } - Account5.Keypair = Keypair4; + Account4.Keypair = Keypair4; })(Account || (Account = {})); -// ../account/src/associated.ts -var Account2; -((Account5) => { - let Associated; - ((Associated2) => { - const RETRY_OVER_LIMIT = 10; - const RETRY_SLEEP_TIME = 3; - const get = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const res = await (0, Associated2.makeOrCreateInstruction)( - mint, - owner, - new Account.Keypair({ secret: feePayer }).pubkey, - allowOwnerOffCurve - ); - if (!res.inst) { - return res.tokenAccount; - } - return new TransactionBuilder6.Common( - [res.inst], - [], - feePayer.toKeypair(), - res.tokenAccount - ); - }; - Associated2.retryGetOrCreate = async (mint, owner, feePayer) => { - let counter = 1; - while (counter < RETRY_OVER_LIMIT) { - try { - const inst = await get(mint, owner, feePayer, true); - if (inst && typeof inst === "string") { - debugLog("# associatedTokenAccount: ", inst); - return inst; - } else if (inst instanceof TransactionBuilder6.Common) { - (await inst.submit()).map( - async (ok) => { - await Node.confirmedSig(ok); - return inst.data; - }, - (err) => { - debugLog("# Error submit retryGetOrCreate: ", err); - throw err; - } - ); - } - } catch (e) { - debugLog(`# retry: ${counter} create token account: `, e); - debugLog(`# mint: ${mint}, owner: ${owner}, feePayer: ${feePayer}`); - } - await sleep(RETRY_SLEEP_TIME); - counter++; - } - throw Error(`retry action is over limit ${RETRY_OVER_LIMIT}`); - }; - Associated2.makeOrCreateInstruction = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const associatedTokenAccount = getAssociatedTokenAddressSync( - mint.toPublicKey(), - owner.toPublicKey(), - allowOwnerOffCurve, - TOKEN_PROGRAM_ID, - ASSOCIATED_TOKEN_PROGRAM_ID - ); - debugLog("# associatedTokenAccount: ", associatedTokenAccount.toString()); - try { - await getAccount( - Node.getConnection(), - associatedTokenAccount, - Node.getConnection().commitment, - TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst: void 0 - }; - } catch (error) { - if (!(error instanceof TokenAccountNotFoundError) && !(error instanceof TokenInvalidAccountOwnerError)) { - throw Error("Unexpected error"); - } - const payer = !feePayer ? owner : feePayer; - const inst = createAssociatedTokenAccountInstruction( - payer.toPublicKey(), - associatedTokenAccount, - owner.toPublicKey(), - mint.toPublicKey(), - TOKEN_PROGRAM_ID, - ASSOCIATED_TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst - }; - } - }; - })(Associated = Account5.Associated || (Account5.Associated = {})); -})(Account2 || (Account2 = {})); - // ../account/src/pda.ts import { PublicKey as PublicKey3 } from "@solana/web3.js"; import { PROGRAM_ID } from "@metaplex-foundation/mpl-token-metadata"; import { MPL_BUBBLEGUM_PROGRAM_ID } from "@metaplex-foundation/mpl-bubblegum"; import BN from "bn.js"; -var Account3; -((Account5) => { +var Account2; +((Account4) => { let Pda; ((Pda2) => { Pda2.getMetadata = (address) => { @@ -596,14 +490,13 @@ var Account3; ); return assetId.toString(); }; - })(Pda = Account5.Pda || (Account5.Pda = {})); -})(Account3 || (Account3 = {})); + })(Pda = Account4.Pda || (Account4.Pda = {})); +})(Account2 || (Account2 = {})); // ../account/src/index.ts -var Account4 = { - ...Account2, +var Account3 = { ...Account, - ...Account3 + ...Account2 }; // ../global/src/index.ts @@ -634,7 +527,7 @@ String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, op } return url; } - if (Account4.Keypair.isPubkey(addressOrSignature)) { + if (Account3.Keypair.isPubkey(addressOrSignature)) { if (explorer === "solanafm" /* SolanaFM */) { url = `${Constants.EXPLORER_SOLANAFM_URL}/address/${addressOrSignature}?cluster=${cluster}`; } else if (explorer === "xray" /* Xray */) { @@ -654,13 +547,13 @@ String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, op return url; }; String.prototype.toPublicKey = function() { - if (!Account4.Keypair.isPubkey(this.toString())) { + if (!Account3.Keypair.isPubkey(this.toString())) { throw Error(`No match KeyPair.PubKey: ${this.toString()}`); } return new PublicKey4(this.toString()); }; String.prototype.toKeypair = function() { - if (!Account4.Keypair.isSecret(this.toString())) { + if (!Account3.Keypair.isSecret(this.toString())) { throw Error(`No match KeyPair.Secret: ${this.toString()}`); } const decoded = bs2.decode(this.toString()); @@ -1677,4 +1570,4 @@ export { Signatures, TransactionFilter }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9iYXRjaC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jb21tb24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvbWludC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9wYXJ0aWFsLXNpZ24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY2FsY3VsYXR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XIge1xuICBleHBvcnQgY2xhc3MgQmF0Y2gge1xuICAgIHN1Ym1pdCA9IGFzeW5jIChcbiAgICAgIGFycjogQ29tbW9uLkNvbW1vbltdIHwgTWludC5NaW50W10sXG4gICAgKTogUHJvbWlzZTxSZXN1bHQ8VHJhbnNhY3Rpb25TaWduYXR1cmUsIEVycm9yPj4gPT4ge1xuICAgICAgcmV0dXJuIFRyeShhc3luYyAoKSA9PiB7XG4gICAgICAgIGxldCBpID0gMDtcbiAgICAgICAgZm9yIChjb25zdCBhIG9mIGFycikge1xuICAgICAgICAgIGlmICghYS5pbnN0cnVjdGlvbnMgJiYgIWEuc2lnbmVycykge1xuICAgICAgICAgICAgdGhyb3cgRXJyb3IoXG4gICAgICAgICAgICAgIGBvbmx5IEluc3RydWN0aW9uIG9iamVjdCB0aGF0IGNhbiB1c2UgYmF0Y2hTdWJtaXQoKS5cbiAgICAgICAgICAgIEluZGV4OiAke2l9LCBTZXQgdmFsdWU6ICR7SlNPTi5zdHJpbmdpZnkoYSl9YCxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIGkrKztcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IGluc3RydWN0aW9ucyA9IGFyci5mbGF0TWFwKChhKSA9PiBhLmluc3RydWN0aW9ucyk7XG4gICAgICAgIGNvbnN0IHNpZ25lcnMgPSBhcnIuZmxhdE1hcCgoYSkgPT4gYS5zaWduZXJzKTtcbiAgICAgICAgY29uc3QgZmVlUGF5ZXJzID0gYXJyLmZpbHRlcigoYSkgPT4gYS5mZWVQYXllciAhPT0gdW5kZWZpbmVkKTtcbiAgICAgICAgbGV0IGZlZVBheWVyID0gc2lnbmVyc1swXTtcbiAgICAgICAgaWYgKGZlZVBheWVycy5sZW5ndGggPiAwICYmIGZlZVBheWVyc1swXS5mZWVQYXllcikge1xuICAgICAgICAgIGZlZVBheWVyID0gZmVlUGF5ZXJzWzBdLmZlZVBheWVyO1xuICAgICAgICB9XG5cbiAg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gIHJldHVybiByZXMudG9rZW5BY2NvdW50O1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb248UHVia2V5PihcbiAgICAgICAgW3Jlcy5pbnN0XSxcbiAgICAgICAgW10sXG4gICAgICAgIGZlZVBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICByZXMudG9rZW5BY2NvdW50ISxcbiAgICAgICk7XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIFJldHJ5IGZ1bmN0aW9uIGlmIGNyZWF0ZSBuZXcgdG9rZW4gYWNjb3VpbnRcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBtaW50XG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAgICogQHBhcmFtIHtTZWNyZXR9IGZlZVBheWVyXG4gICAgICogQHJldHVybnMgUHJvbWlzZTxzdHJpbmc+XG4gICAgICovXG4gICAgZXhwb3J0IGNvbnN0IHJldHJ5R2V0T3JDcmVhdGUgPSBhc3luYyAoXG4gICAgICBtaW50OiBQdWJrZXksXG4gICAgICBvd25lcjogUHVia2V5LFxuICAgICAgZmVlUGF5ZXI6IFNlY3JldCxcbiAgICApOiBQcm9taXNlPHN0cmluZz4gPT4ge1xuICAgICAgbGV0IGNvdW50ZXIgPSAxO1xuICAgICAgd2hpbGUgKGNvdW50ZXIgPCBSRVRSWV9PVkVSX0xJTUlUKSB7XG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgY29uc3QgaW5zdCA9IGF3YWl0IGdldChtaW50LCBvd25lciwgZmVlUGF5ZXIsIHRydWUpO1xuXG4gICAgICAgICAgaWYgKGluc3QgJiYgdHlwZW9mIGluc3QgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICBkZWJ1Z0xvZygnIyBhc3NvY2lhdGVkVG9rZW5BY2NvdW50OiAnLCBpbnN0KTtcbiAgICAgICAgICAgIHJldHVybiBpbnN0O1xuICAgICAgICAgIH0gZWxzZSBpZiAoaW5zdCBpbnN0YW5jZW9mIFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb24pIHtcbiAgICAgICAgICAgIChhd2FpdCBpbnN0LnN1Ym1pdCgpKS5tYXAoXG4gICAgICAgICAgICAgIGFzeW5jIChvazogc3RyaW5nKSA9PiB7XG4gICAgICAgICAgICAgICAgYXdhaXQgTm9kZS5jb25maXJtZWRTaWcob2spO1xuICAgICAgICAgICAgICAgIHJldHVybiBpbnN0LmRhdGE7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIChlcnI6IEVycm9yKSA9PiB7XG4gICAgICAgICAgICAgICAgZGVidWdMb2coJyMgRXJyb3Igc3VibWl0IHJldHJ5R2V0T3JDcmVhdGU6ICcsIGVycik7XG4gICAgICAgICAgICAgICAgdGhyb3cgZXJyO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICBkZWJ1Z0xvZyhgIyByZXRyeTogJHtjb3VudGVyfSBjcmVhdGUgdG9rZW4gYWNjb3VudDogYCwgZSk7XG4gICAgICAgICAgZGVidWdMb2coYCMgbWludDogJHttaW50fSwgb3duZXI6ICR7b3duZXJ9LCBmZWVQYXllcjogJHtmZWVQYXllcn1gKTtcbiAgICAgICAgfVxuICAgICAgICBhd2FpdCBzbGVlcChSRVRSWV9TTEVFUF9USU1FKTtcbiAgICAgICAgY291bnRlcisrO1xuICAgICAgfVxuICAgICAgdGhyb3cgRXJyb3IoYHJldHJ5IGFjdGlvbiBpcyBvdmVyIGxpbWl0ICR7UkVUUllfT1ZFUl9MSU1JVH1gKTtcbiAgICB9O1xuXG4gICAgLyoqXG4gICAgICogW01haW4gbG9naWNdR2V0IEFzc29jaWF0ZWQgdG9rZW4gQWNjb3VudC5cbiAgICAgKiBpZiBub3QgY3JlYXRlZCwgY3JlYXRlIG5ldyB0b2tlbiBhY2NvdWludFxuICAgICA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c3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLmNvbW1pdG1lbnQsXG4gICAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICB0b2tlbkFjY291bnQ6IGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSxcbiAgICAgICAgICBpbnN0OiB1bmRlZmluZWQsXG4gICAgICAgIH07XG4gICAgICB9IGNhdGNoIChlcnJvcjogdW5rbm93bikge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuQWNjb3VudE5vdEZvdW5kRXJyb3IpICYmXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuSW52YWxpZEFjY291bnRPd25lckVycm9yKVxuICAgICAgICApIHtcbiAgICAgICAgICB0aHJvdyBFcnJvcignVW5leHBlY3RlZCBlcnJvcicpO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgcGF5ZXIgPSAhZmVlUGF5ZXIgPyBvd25lciA6IGZlZVBheWVyO1xuXG4gICAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVBc3NvY2lhdGVkVG9rZW5BY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgcGF5ZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5B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ICAgICAgICBpZiAoc2lnLmlzRXJyKSB7XG4gICAgICAgICAgcmV0dXJuIHNpZztcbiAgICAgICAgfVxuICAgICAgICBhd2FpdCBOb2RlLmNvbmZpcm1lZFNpZyhzaWcudmFsdWUpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgZGVidWdMb2coJyMgUmVzdWx0IGJhdGNoIG90aGVyIHRoYW4gY2FuU3VibWl0Jyk7XG4gICAgICAgIGlmICh0aGlzLmxlbmd0aCA9PSBpKSB7XG4gICAgICAgICAgLy8gbGFzdCBvYmplY3RcbiAgICAgICAgICByZXR1cm4gb2JqLnN1Ym1pdChmZWVQYXllcik7XG4gICAgICAgIH1cbiAgICAgICAgb2JqLnN1Ym1pdChmZWVQYXllcik7XG4gICAgICB9XG4gICAgICBpKys7XG4gICAgfVxuICB9IGVsc2Uge1xuICAgIGNvbnN0IGluc3RydWN0aW9uczogQ29tbW9uU3RydWN0dXJlIHwgTWludFN0cnVjdHVyZVtdID0gW107XG4gICAgZm9yIChjb25zdCBvYmogb2YgdGhpcykge1xuICAgICAgaWYgKG9iai5pc0Vycikge1xuICAgICAgICByZXR1cm4gb2JqO1xuICAgICAgfSBlbHNlIGlmIChvYmouaXNPaykge1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChvYmoudmFsdWUpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgcmV0dXJuIFJlc3VsdC5lcnIoRXJyb3IoJ09ubHkgQXJyYXkgSW5zdHJ1Y3Rpb24gb2JqZWN0JykpO1xuICAgICAgfVxuICAgIH1cbiAgICBkZWJ1Z0xvZygnIyBSZXN1bHQgYmF0Y2ggc3VibWl0OiAnLCBpbnN0cnVjdGlvbnMpO1xuICAgIHJldHVybiBuZXcgVHJhbnNhY3Rpb25CdWlsZGVyLkJhdGNoKCkuc3VibWl0KGluc3RydWN0aW9ucyk7XG4gIH1cbn07XG5cbmNsYXNzIEludGVybmFsT2s8VCwgRSBleHRlbmRzIEVycm9yPiBleHRlbmR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HV0OiBPcHRpb248SW5wdXRDb2xsZWN0aW9uPiB8IHVuZGVmaW5lZCxcbiAgICApOiBPcHRpb248SW50ZXJuYWxDb2xsZWN0aW9uPiA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBudWxsO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4ge1xuICAgICAgICBrZXk6IGlucHV0LnRvUHVibGljS2V5KCksXG4gICAgICAgIHZlcmlmaWVkOiBmYWxzZSxcbiAgICAgIH07XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlciA9IChcbiAgICAgIG91dHB1dDogT3B0aW9uPEludGVybmFsQ29sbGVjdGlvbj4sXG4gICAgKTogQ29sbGVjdGlvblR5cGUgfCB1bmRlZmluZWQgPT4ge1xuICAgICAgaWYgKCFvdXRwdXQpIHtcbiAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIHtcbiAgICAgICAgYWRkcmVzczogb3V0cHV0LmtleS50b1N0cmluZygpLFxuICAgICAgICB2ZXJpZmllZDogb3V0cHV0LnZlcmlmaWVkLFxuICAgICAgfTtcbiAgICB9O1xuICB9XG5cbiAgZXhwb3J0IG5hbWVzcGFjZSBDb2xsZWN0aW9uTWludCB7XG4gICAgZXhwb3J0IGNvbnN0IGludG9Vc2VyID0gKG91dHB1dDogR3JvdXBpbmdbXSk6IFB1YmtleSA9PiB7XG4gICAgICBjb25zdCByZXMgPSBvdXRwdXQuZmluZCgodmFsdWUpID0+IHtcbiAgICAgICAgaWYgKHZhbHVlLmdyb3VwX2tleSA9PT0gJ2NvbGxlY3Rpb24nKSB7XG4gICAgICAgICAgcmV0dXJuIHZhbHVlLmdyb3VwX3ZhbHVlO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIHJldHVybiByZXMgPyByZXMuZ3JvdXBfdmFsdWUgOiAnJztcbiAgICB9O1xuICB9XG59XG4iLCAiLyogZXNs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YXNlICdzZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ25hbWUnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLm5hbWUpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNOYW1lKG1ldGFkYXRhLm5hbWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc3ltYm9sJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5zeW1ib2wpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTeW1ib2wobWV0YWRhdGEuc3ltYm9sKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgICAgIGlmIChyZXMgJiYgcmVzLmlzRXJyKSB7XG4gICAgICAgICAgcmVzdWx0cy5wdXNoKC4uLnJlcy5lcnJvci5kZXRhaWxzKTtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgICBpZiAocmVzdWx0cy5sZW5ndGggPiAwKSB7XG4gICAgICAgIGNvbnN0I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biAgICAgICAgICBzd2l0Y2ggKGZpbHRlclR5cGUpIHtcbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5NZW1vOiB7XG4gICAgICAgICAgICAgIGlmIChGaWx0ZXJPcHRpb25zLk1lbW8ucHJvZ3JhbS5pbmNsdWRlcyhpbnN0cnVjdGlvbi5wcm9ncmFtKSkge1xuICAgICAgICAgICAgICAgIGxldCBpbnN0cnVjdGlvblRyYW5zZmVyO1xuXG4gICAgICAgICAgICAgICAgLy8gZmV0Y2ggIHRyYW5zZmVyIHRyYW5zYWN0aW9uIGZvciByZWxhdGlvbmFsIG1lbW9cbiAgICAgICAgICAgICAgICB0eE1ldGEudHJhbnNhY3Rpb24ubWVzc2FnZS5pbnN0cnVjdGlvbnMuZm9yRWFjaChcbiAgICAgICAgICAgICAgICAgIChpbnN0cnVjdGlvbikgPT4ge1xuICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgaXNQYXJzZWRJbnN0cnVjdGlvbihpbnN0cnVjdGlvbikgJiZcbiAgICAgICAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLlRyYW5zZmVyLnByb2dyYW0uaW5jbHVkZXMoXG4gICAgICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbi5wcm9ncmFtLFxuICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlciA9IGluc3RydWN0aW9uO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICk7XG5cbiAgICAgICAgICAgICAgICAvLyBzcGwtdG9rZW4gb3Igc3lzdGVtXG4gICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlciAmJlxuICAgICAgICAgICAgICAgICAgbW9kdWxlTmFtZSAhPT0gaW5zdHJ1Y3Rpb25UcmFuc2ZlclsncHJvZ3JhbSddXG4gICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICBkZWJ1Z0xvZyhcbiAgICAgICAgICAgICAgICAgICAgJyMgRmlsdGVyVHlwZS5NZW1vIGJyZWFrIGluc3RydWN0aW9uOiAnLFxuICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyLFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vIGZldGNoIG1lbW8gb25seSB0cmFuc2FjdGlvblxuICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuTWVtby5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIsXG4gICAgICAgICAgICAgICAgICBwb3N0VG9rZW5BY2NvdW50LFxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXNlIEZpbHRlclR5cGUuT25seU1lbW86IHtcbiAgICAgICAgICAgICAgaWYgKEZpbHRlck9wdGlvbnMuTWVtby5wcm9ncmFtLmluY2x1ZGVzKGluc3RydWN0aW9uLnByb2dyYW0pKSB7XG4gICAgICAgICAgICAgICAgbGV0IGluc3RydWN0aW9uVHJhbnNmZXI7XG5cbiAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLk1lbW8uaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyLFxuICAgICAgICAgICAgICAgICAgcG9zdFRva2VuQWNjb3VudCxcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLk1pbnQ6IHtcbiAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuTWludC5wcm9ncmFtLmluY2x1ZGVzKGluc3RydWN0aW9uLnByb2dyYW0pICYmXG4gICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5NaW50LmFjdGlvbi5pbmNsdWRlcyhcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLnBhcnNlZC50eXBlIGFzIHN0cmluZyxcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuTWludC5pbnRvVXNlclNpZGUoaW5zdHJ1Y3Rpb24sIHR4TWV0YSk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXNlIEZpbHRlclR5cGUuVHJhbnNmZXI6XG4gICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICBtb2R1bGVOYW1lID09PSBpbnN0cnVjdGlvbi5wcm9ncmFtICYmXG4gICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5UcmFuc2Zlci5hY3Rpb24uaW5jbHVkZXMoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbi5wYXJzZWQudHlwZSBhcyBzdHJpbmcsXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICBpZiAoaW5zdHJ1Y3Rpb24ucGFyc2VkLnR5cGUgPT09ICd0cmFuc2ZlckNoZWNrZWQnKSB7X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gfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvQ29tcHJlc3NlZE5mdEluZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IEludGVybmFsQ3JlYXRvcnNbXSA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBbXTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBpbnB1dCEubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlciA9IChcbiAgICAgIG91dHB1dDogT3B0aW9uPEludGVybmFsQ3JlYXRvcnNbXT4sXG4gICAgKTogQ3JlYXRvcnNbXSB8IHVuZGVmaW5lZCA9PiB7XG4gICAgICBpZiAoIW91dHB1dCkge1xuICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gb3V0cHV0Lm1hcCgoZGF0YSkgPT4ge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIGFkZHJlc3M6IGRhdGEuYWRkcmVzcy50b1N0cmluZygpLFxuICAgICAgICAgIHNoYXJlOiBkYXRhLnNoYXJlLFxuICAgICAgICAgIHZlcmlmaWVkOiBkYXRhLnZlcmlmaWVkLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IENvbnZlcnRlciBhcyBDb2xsZWN0aW9uIH0gZnJvbSAnLi9jb2xsZWN0aW9uJztcbmltcG9ydCB7IENvbnZlcnRlciBhcy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N0IGZpbGVzID0gYXdhaXQgUHJvbWlzZS5hbGwoXG4gICAgICAgIGlucHV0LmZpbGVzLm1hcChhc3luYyAoZmlsZSkgPT4ge1xuICAgICAgICAgIGlmICghZmlsZS5maWxlUGF0aCkge1xuICAgICAgICAgICAgcmV0dXJuIHt9O1xuICAgICAgICAgIH1cbiAgICAgICAgICBjb25zdCByZXMgPSBhd2FpdCBjYWxsYmFja0Z1bmMoZmlsZS5maWxlUGF0aCwgc3RvcmFnZVR5cGUsIGZlZVBheWVyKTtcbiAgICAgICAgICBpZiAocmVzLmlzRXJyKSB7XG4gICAgICAgICAgICB0aHJvdyBFcnJvcihyZXMuZXJyb3IubWVzc2FnZSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBvdmVyd3JpdGVPYmplY3QoZmlsZSwgW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBleGlzdHNLZXk6ICdmaWxlUGF0aCcsXG4gICAgICAgICAgICAgIHdpbGw6IHsga2V5OiAndXJpJywgdmFsdWU6IHJlcy52YWx1ZSB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICBdKTtcbiAgICAgICAgfSksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHsgLi4uaW5wdXQsIGZpbGVzIH0gYXMgUHJvcGVydGllcztcbiAgICB9O1xuICB9XG59XG4iLCAiLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLXVudXNlZC12YXJzICovXG5pbXBvcnQgeyBPcHRpb24sIFVzZXMgfSBmcm9tICd+L3R5cGVzL3JlZ3VsYXItbmZ0JztcblxuZXhwb3J0IG5hbWVzcGFjZSBDb252ZXJ0ZXIge1xuICBleHBvcnQgbmFtZXNwYWNlIFVzZXMge1xuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlclNpZGUgPSAob3V0cHV0OiBPcHRpb248VXNlcz4pOiBVc2VzIHwgdW5kZWZpbmVkID0+IHtcbiAgICAgIGlmICghb3V0cHV0KSB7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yA9IGlzSW1hZ2VVcmwobWV0YWRhdGEuaW1hZ2UpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAncm95YWx0eSc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnJveWFsdHkpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNSb3lhbHR5KG1ldGFkYXRhLnJveWFsdHkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEuc3ltYm9sKSB7X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AgICAgfVxuICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICApO1xuXG4gICAgICAgICAgICAgICAgLy8gc3BsLXRva2VuIG9yIHN5c3RlbVxuICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIgJiZcbiAgICAgICAgICAgICAgICAgIG1vZHVsZU5hbWUgIT09IGluc3RydWN0aW9uVHJhbnNmZXJbJ3Byb2dyYW0nXVxuICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgZGVidWdMb2coXG4gICAgICAgICAgICAgICAgICAgICcjIEZpbHRlclR5cGUuTWVtbyBicmVhayBpbnN0cnVjdGlvbjogJyxcbiAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlcixcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAvLyBmZXRjaCBtZW1vIG9ubHkgdHJhbnNhY3Rpb25cbiAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLk1lbW8uaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyLFxuICAgICAgICAgICAgICAgICAgcG9zdFRva2VuQWNjb3VudCxcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLk9ubHlNZW1vOiB7XG4gICAgICAgICAgICAgIGlmIChGaWx0ZXJPcHRpb25zLk1lbW8ucHJvZ3JhbS5pbmNsdWRlcyhpbnN0cnVjdGlvbi5wcm9ncmFtKSkge1xuICAgICAgICAgICAgICAgIGxldCBpbnN0cnVjdGlvblRyYW5zZmVyO1xuXG4gICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5NZW1vLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlcixcbiAgICAgICAgICAgICAgICAgIHBvc3RUb2tlbkFjY291bnQsXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5NaW50OiB7XG4gICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLk1pbnQucHJvZ3JhbS5pbmNsdWRlcyhpbnN0cnVjdGlvbi5wcm9ncmFtKSAmJlxuICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuTWludC5hY3Rpb24uaW5jbHVkZXMoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbi5wYXJzZWQudHlwZSBhcyBzdHJpbmcsXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLk1pbnQuaW50b1VzZXJTaWRlKGluc3RydWN0aW9uLCB0eE1ldGEpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLlRyYW5zZmVyOlxuICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgbW9kdWxlTmFtZSA9PT0gaW5zdHJ1Y3Rpb24ucHJvZ3JhbSAmJlxuICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuVHJhbnNmZXIuYWN0aW9uLmluY2x1ZGVzKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24ucGFyc2VkLnR5cGUgYXMgc3RyaW5nLFxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgaWYgKGluc3RydWN0aW9uLnBhcnNlZC50eXBlID09PSAndHJhbnNmZXJDaGVja2VkJykge1xuICAgICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5UcmFuc2ZlckNoZWNrZWQuaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgICBwb3N0VG9rZW5BY2NvdW50LFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5UcmFuc2Zlci5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgICByZXR1cm4gaGlzdG9yeTtcbiAgICB9O1xufVxuIl0sCiAgIm1hcHBpbmdzIjogIjtBQUFBLFNBQXFCLGlCQUFpQjtBQUN0QyxPQUFPLHNCQUFzQjtBQUU3QixJQUFJLFNBQVM7QUFFTixJQUFVO0FBQUEsQ0FBVixDQUFVQSxlQUFWO0FBQ0UsTUFBVTtBQUFWLElBQVVDLHFCQUFWO0FBQ0wsVUFBTSxhQUFhO0FBQ25CLFFBQUksWUFBWTtBQUNULElBQU1BLGlCQUFBLHNCQUFzQjtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtB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udmVydGVyIiwgIlJveWFsdHkiLCAiQ29udmVydGVyIiwgIk5mdCIsICJDb252ZXJ0ZXIiLCAiTWVtbyIsICJDb252ZXJ0ZXIiLCAiTWludCIsICJDb252ZXJ0ZXIiLCAiUmVndWxhck5mdE1ldGFkYXRhIiwgIkNvbnZlcnRlciIsICJQcm9wZXJ0aWVzIiwgIkNvbnZlcnRlciIsICJVc2VzIiwgIkNvbnZlcnRlciIsICJUb2tlbk1ldGFkYXRhIiwgIkNvbnZlcnRlciIsICJUcmFuc2ZlckNoZWNrZWQiLCAiQ29udmVydGVyIiwgIlRyYW5zZmVyIiwgIkNvbnZlcnRlciIsICJWYWxpZGF0b3IiLCAiTWVzc2FnZSIsICJDb252ZXJ0ZXIiLCAiTm9kZSIsICJSZXN1bHQiLCAiU2lnbmF0dXJlcyIsICJSZXN1bHQiLCAiVHJhbnNhY3Rpb25GaWx0ZXIiLCAiaW5zdHJ1Y3Rpb24iLCAiQ29udmVydGVyIl0KfQo= \ No newline at end of file diff --git a/packages/types/dist/account.d.mts b/packages/types/dist/account.d.mts deleted file mode 100644 index 4b6a54e14..000000000 --- a/packages/types/dist/account.d.mts +++ /dev/null @@ -1,19 +0,0 @@ -declare const pubKeyNominality: unique symbol; -declare const secretNominality: unique symbol; -type Pubkey = (string & { - [pubKeyNominality]: never; -}) | string; -type Secret = (string & { - [secretNominality]: never; -}) | string; -type KeypairAccount = { - pubkey: Pubkey; - secret: Secret; -}; -type OwnerInfo = { - sol: number; - lamports: number; - owner: string; -}; - -export { KeypairAccount, OwnerInfo, Pubkey, Secret }; diff --git a/packages/types/dist/account.d.ts b/packages/types/dist/account.d.ts deleted file mode 100644 index 4b6a54e14..000000000 --- a/packages/types/dist/account.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -declare const pubKeyNominality: unique symbol; -declare const secretNominality: unique symbol; -type Pubkey = (string & { - [pubKeyNominality]: never; -}) | string; -type Secret = (string & { - [secretNominality]: never; -}) | string; -type KeypairAccount = { - pubkey: Pubkey; - secret: Secret; -}; -type OwnerInfo = { - sol: number; - lamports: number; - owner: string; -}; - -export { KeypairAccount, OwnerInfo, Pubkey, Secret }; diff --git a/packages/types/dist/airdrop.d.mts b/packages/types/dist/airdrop.d.mts deleted file mode 100644 index 80c79f26c..000000000 --- a/packages/types/dist/airdrop.d.mts +++ /dev/null @@ -1,5 +0,0 @@ -type AirdropOptions = { - dropAmount: number; -}; - -export { AirdropOptions }; diff --git a/packages/types/dist/airdrop.d.ts b/packages/types/dist/airdrop.d.ts deleted file mode 100644 index 80c79f26c..000000000 --- a/packages/types/dist/airdrop.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -type AirdropOptions = { - dropAmount: number; -}; - -export { AirdropOptions }; diff --git a/packages/types/dist/compressed-nft.d.mts b/packages/types/dist/compressed-nft.d.mts deleted file mode 100644 index 0194bff4c..000000000 --- a/packages/types/dist/compressed-nft.d.mts +++ /dev/null @@ -1,23 +0,0 @@ -import { Pubkey, Secret } from './account.mjs'; - -type DelegateOptions = { - delegate: Pubkey; -}; - -type MintOptions = { - receiver: Pubkey; - delegate: Pubkey; - feePayer: Secret; -}; - -type MintCollectionOptions = { - freezeAuthority: Pubkey; - feePayer: Secret; -}; - -type SpaceOptions = { - feePayer: Secret; -}; -type SpaceNumber = 8 | 16000 | 100000 | 16700000 | 67000000 | 1000000000; - -export { DelegateOptions, MintCollectionOptions, MintOptions, SpaceNumber, SpaceOptions }; diff --git a/packages/types/dist/compressed-nft.d.ts b/packages/types/dist/compressed-nft.d.ts deleted file mode 100644 index 4c617b1b8..000000000 --- a/packages/types/dist/compressed-nft.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { Pubkey, Secret } from './account.js'; - -type DelegateOptions = { - delegate: Pubkey; -}; - -type MintOptions = { - receiver: Pubkey; - delegate: Pubkey; - feePayer: Secret; -}; - -type MintCollectionOptions = { - freezeAuthority: Pubkey; - feePayer: Secret; -}; - -type SpaceOptions = { - feePayer: Secret; -}; -type SpaceNumber = 8 | 16000 | 100000 | 16700000 | 67000000 | 1000000000; - -export { DelegateOptions, MintCollectionOptions, MintOptions, SpaceNumber, SpaceOptions }; diff --git a/packages/types/dist/converter.d.mts b/packages/types/dist/converter.d.mts deleted file mode 100644 index 3ded3deb6..000000000 --- a/packages/types/dist/converter.d.mts +++ /dev/null @@ -1,13 +0,0 @@ -import { PublicKey } from '@solana/web3.js'; - -type InternalCollection = { - key: PublicKey; - verified: boolean; -}; -type InternalCreators = { - address: PublicKey; - verified: boolean; - share: number; -}; - -export { InternalCollection, InternalCreators }; diff --git a/packages/types/dist/converter.d.ts b/packages/types/dist/converter.d.ts deleted file mode 100644 index 3ded3deb6..000000000 --- a/packages/types/dist/converter.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { PublicKey } from '@solana/web3.js'; - -type InternalCollection = { - key: PublicKey; - verified: boolean; -}; -type InternalCreators = { - address: PublicKey; - verified: boolean; - share: number; -}; - -export { InternalCollection, InternalCreators }; diff --git a/packages/types/dist/das-api.d.mts b/packages/types/dist/das-api.d.mts deleted file mode 100644 index ad274718d..000000000 --- a/packages/types/dist/das-api.d.mts +++ /dev/null @@ -1,76 +0,0 @@ -import { InternalCreators } from './converter.mjs'; -import { Pubkey } from './account.mjs'; -import '@solana/web3.js'; - -type AssetProof = { - leaf: Pubkey; - node_index: number; - proof: Pubkey[]; - root: Pubkey; - tree_id: Pubkey; -}; -type Metadata = { - name: string; - symbol: string; - token_standard: string; -}; -type Grouping = { - group_key: string; - group_value: string; -}; -type Asset = { - interface: string; - id: Pubkey; - content: { - json_uri: string; - files: string[]; - metadata: Metadata; - links: string[]; - }; - authorities: { - address: Pubkey; - scopes: string[]; - }[]; - compression: { - eligible: boolean; - compressed: boolean; - data_hash: Pubkey; - creator_hash: Pubkey; - asset_hash: Pubkey; - tree: Pubkey; - seq: number; - leaf_id: number; - }; - grouping: Grouping[]; - royalty: { - royalty_model: 'creators' | 'fanout' | 'single'; - target: null; - percent: number; - basis_points: number; - primary_sale_happened: boolean; - locked: boolean; - }; - creators: InternalCreators[]; - ownership: { - frozen: boolean; - delegated: boolean; - delegate: Pubkey; - ownership_model: 'single' | 'token'; - owner: Pubkey; - }; - supply: { - print_max_supply: number; - print_current_supply: number; - edition_nonce: number; - }; - mutable: boolean; - burnt: boolean; -}; -type Assets = { - total: number; - limit: number; - page: number; - items: Asset[]; -}; - -export { Asset, AssetProof, Assets, Grouping, Metadata }; diff --git a/packages/types/dist/das-api.d.ts b/packages/types/dist/das-api.d.ts deleted file mode 100644 index d96adbe9f..000000000 --- a/packages/types/dist/das-api.d.ts +++ /dev/null @@ -1,76 +0,0 @@ -import { InternalCreators } from './converter.js'; -import { Pubkey } from './account.js'; -import '@solana/web3.js'; - -type AssetProof = { - leaf: Pubkey; - node_index: number; - proof: Pubkey[]; - root: Pubkey; - tree_id: Pubkey; -}; -type Metadata = { - name: string; - symbol: string; - token_standard: string; -}; -type Grouping = { - group_key: string; - group_value: string; -}; -type Asset = { - interface: string; - id: Pubkey; - content: { - json_uri: string; - files: string[]; - metadata: Metadata; - links: string[]; - }; - authorities: { - address: Pubkey; - scopes: string[]; - }[]; - compression: { - eligible: boolean; - compressed: boolean; - data_hash: Pubkey; - creator_hash: Pubkey; - asset_hash: Pubkey; - tree: Pubkey; - seq: number; - leaf_id: number; - }; - grouping: Grouping[]; - royalty: { - royalty_model: 'creators' | 'fanout' | 'single'; - target: null; - percent: number; - basis_points: number; - primary_sale_happened: boolean; - locked: boolean; - }; - creators: InternalCreators[]; - ownership: { - frozen: boolean; - delegated: boolean; - delegate: Pubkey; - ownership_model: 'single' | 'token'; - owner: Pubkey; - }; - supply: { - print_max_supply: number; - print_current_supply: number; - edition_nonce: number; - }; - mutable: boolean; - burnt: boolean; -}; -type Assets = { - total: number; - limit: number; - page: number; - items: Asset[]; -}; - -export { Asset, AssetProof, Assets, Grouping, Metadata }; diff --git a/packages/types/dist/find.d.mts b/packages/types/dist/find.d.mts deleted file mode 100644 index a717edb8d..000000000 --- a/packages/types/dist/find.d.mts +++ /dev/null @@ -1,41 +0,0 @@ -import { Pubkey } from './account.mjs'; - -declare enum SortDirection { - Asc = "asc", - Desc = "desc" -} -declare enum SortBy { - Created = "created", - Updated = "updated", - Recent = "recent_action" -} -type Sortable = { - sortBy: SortBy; - sortDirection: SortDirection; -}; -type FindOptions = { - limit: number; - page: number; - sortBy: Sortable; - before: string; - after: string; -}; -type Find = { - sol?: string; - account?: string; - destination?: Pubkey; - source?: Pubkey; - authority?: Pubkey; - multisigAuthority?: Pubkey; - signers?: Pubkey[]; - mint?: Pubkey; - mintAuthority?: Pubkey; - tokenAmount?: string; - memo?: string; - dateTime?: Date; - type?: string; - sig?: string; - innerInstruction?: boolean; -}; - -export { Find, FindOptions, SortBy, SortDirection, Sortable }; diff --git a/packages/types/dist/find.d.ts b/packages/types/dist/find.d.ts deleted file mode 100644 index 43350cc69..000000000 --- a/packages/types/dist/find.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { Pubkey } from './account.js'; - -declare enum SortDirection { - Asc = "asc", - Desc = "desc" -} -declare enum SortBy { - Created = "created", - Updated = "updated", - Recent = "recent_action" -} -type Sortable = { - sortBy: SortBy; - sortDirection: SortDirection; -}; -type FindOptions = { - limit: number; - page: number; - sortBy: Sortable; - before: string; - after: string; -}; -type Find = { - sol?: string; - account?: string; - destination?: Pubkey; - source?: Pubkey; - authority?: Pubkey; - multisigAuthority?: Pubkey; - signers?: Pubkey[]; - mint?: Pubkey; - mintAuthority?: Pubkey; - tokenAmount?: string; - memo?: string; - dateTime?: Date; - type?: string; - sig?: string; - innerInstruction?: boolean; -}; - -export { Find, FindOptions, SortBy, SortDirection, Sortable }; diff --git a/packages/types/dist/global.d.mts b/packages/types/dist/global.d.mts deleted file mode 100644 index bffa1a7fa..000000000 --- a/packages/types/dist/global.d.mts +++ /dev/null @@ -1,32 +0,0 @@ -import { PublicKey, Keypair } from '@solana/web3.js'; - -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; -}; - -export { Explorer, ExplorerOptions }; diff --git a/packages/types/dist/global.d.ts b/packages/types/dist/global.d.ts deleted file mode 100644 index bffa1a7fa..000000000 --- a/packages/types/dist/global.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { PublicKey, Keypair } from '@solana/web3.js'; - -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; -}; - -export { Explorer, ExplorerOptions }; diff --git a/packages/types/dist/history.d.mts b/packages/types/dist/history.d.mts deleted file mode 100644 index 8071fda16..000000000 --- a/packages/types/dist/history.d.mts +++ /dev/null @@ -1,25 +0,0 @@ -import { Pubkey } from './account.mjs'; - -type History = { - sol?: string; - account?: string; - destination?: Pubkey; - source?: Pubkey; - authority?: Pubkey; - multisigAuthority?: Pubkey; - signers?: Pubkey[]; - mint?: Pubkey; - mintAuthority?: Pubkey; - tokenAmount?: string; - memo?: string; - dateTime?: Date; - type?: string; - sig?: string; - innerInstruction?: boolean; -}; -type FindOptions = { - waitTime: number; - narrowDown: number; -}; - -export { FindOptions, History }; diff --git a/packages/types/dist/history.d.ts b/packages/types/dist/history.d.ts deleted file mode 100644 index bbccb381b..000000000 --- a/packages/types/dist/history.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { Pubkey } from './account.js'; - -type History = { - sol?: string; - account?: string; - destination?: Pubkey; - source?: Pubkey; - authority?: Pubkey; - multisigAuthority?: Pubkey; - signers?: Pubkey[]; - mint?: Pubkey; - mintAuthority?: Pubkey; - tokenAmount?: string; - memo?: string; - dateTime?: Date; - type?: string; - sig?: string; - innerInstruction?: boolean; -}; -type FindOptions = { - waitTime: number; - narrowDown: number; -}; - -export { FindOptions, History }; diff --git a/packages/types/dist/memo.d.mts b/packages/types/dist/memo.d.mts deleted file mode 100644 index 3d3bb48ce..000000000 --- a/packages/types/dist/memo.d.mts +++ /dev/null @@ -1,7 +0,0 @@ -import { Secret } from './account.mjs'; - -type MemoOptions = { - feePayer: Secret; -}; - -export { MemoOptions }; diff --git a/packages/types/dist/memo.d.ts b/packages/types/dist/memo.d.ts deleted file mode 100644 index e7c2bbf75..000000000 --- a/packages/types/dist/memo.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { Secret } from './account.js'; - -type MemoOptions = { - feePayer: Secret; -}; - -export { MemoOptions }; diff --git a/packages/types/dist/mint-08f26d69.d.ts b/packages/types/dist/mint-08f26d69.d.ts deleted file mode 100644 index a4ef3afad..000000000 --- a/packages/types/dist/mint-08f26d69.d.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { Pubkey, Secret } from './account.js'; -import { StorageType, FileType, Attribute, Properties } from './storage.js'; -import BN from 'bn.js'; - -type bignum = number | BN; -type Option = T | null; -declare enum UseMethod { - Burn = 0, - Multiple = 1, - Single = 2 -} -type Uses = { - useMethod: UseMethod; - remaining: bignum; - total: bignum; -}; -type Creators = { - address: Pubkey; - share: number; - verified: boolean; -}; -type InputCreators = { - address: Pubkey; - secret: Secret; - share: number; -}; - -type InputCollection = Pubkey; -type Options = { - [key: string]: unknown; -}; -type InputNftMetadata = { - name: string; - symbol: string; - royalty?: number; - storageType?: StorageType; - filePath?: FileType; - uri?: string; - isMutable?: boolean; - description?: string; - external_url?: string; - attributes?: Attribute[]; - properties?: Properties; - maxSupply?: bignum; - creators?: InputCreators[]; - uses?: Uses; - collection?: InputCollection; - options?: Options; -}; -type MintOptions = { - freezeAuthority: Pubkey; - feePayer: Secret; -}; - -export { Creators as C, InputCreators as I, MintOptions as M, Options as O, Uses as U, Option as a, bignum as b, UseMethod as c, InputCollection as d, InputNftMetadata as e }; diff --git a/packages/types/dist/mint-74b505a0.d.ts b/packages/types/dist/mint-74b505a0.d.ts deleted file mode 100644 index 9cc11e20c..000000000 --- a/packages/types/dist/mint-74b505a0.d.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { Pubkey, Secret } from './account.mjs'; -import { StorageType, FileType, Attribute, Properties } from './storage.mjs'; -import BN from 'bn.js'; - -type bignum = number | BN; -type Option = T | null; -declare enum UseMethod { - Burn = 0, - Multiple = 1, - Single = 2 -} -type Uses = { - useMethod: UseMethod; - remaining: bignum; - total: bignum; -}; -type Creators = { - address: Pubkey; - share: number; - verified: boolean; -}; -type InputCreators = { - address: Pubkey; - secret: Secret; - share: number; -}; - -type InputCollection = Pubkey; -type Options = { - [key: string]: unknown; -}; -type InputNftMetadata = { - name: string; - symbol: string; - royalty?: number; - storageType?: StorageType; - filePath?: FileType; - uri?: string; - isMutable?: boolean; - description?: string; - external_url?: string; - attributes?: Attribute[]; - properties?: Properties; - maxSupply?: bignum; - creators?: InputCreators[]; - uses?: Uses; - collection?: InputCollection; - options?: Options; -}; -type MintOptions = { - freezeAuthority: Pubkey; - feePayer: Secret; -}; - -export { Creators as C, InputCreators as I, MintOptions as M, Options as O, Uses as U, Option as a, bignum as b, UseMethod as c, InputCollection as d, InputNftMetadata as e }; diff --git a/packages/types/dist/nft.d.mts b/packages/types/dist/nft.d.mts deleted file mode 100644 index 49d0f6a0a..000000000 --- a/packages/types/dist/nft.d.mts +++ /dev/null @@ -1,43 +0,0 @@ -import { Pubkey } from './account.mjs'; -import { Offchain } from './storage.mjs'; -import '@solana/web3.js'; -import './phantom-e9a40784.js'; -import './das-api.mjs'; -import './converter.mjs'; -import '@metaplex-foundation/mpl-token-metadata'; - -type Authority = { - address: Pubkey; - scopes: string[]; -}; -type Creators = { - address: Pubkey; - share: number; - verified: boolean; -}[]; -type Metadata = { - mint: Pubkey; - collectionMint: Pubkey; - authorities: Authority[]; - royalty: number; - name: string; - symbol: string; - uri: string; - creators: Creators; - treeAddress: Pubkey; - isCompressed: boolean; - isMutable: boolean; - isBurn: boolean; - editionNonce: number; - primarySaleHappened: boolean; - dateTime: Date; - offchain: Offchain; -}; -type NftMetadata = { - page: number; - total: number; - limit: number; - metadatas: Metadata[]; -}; - -export { Authority, Creators, Metadata, NftMetadata }; diff --git a/packages/types/dist/nft.d.ts b/packages/types/dist/nft.d.ts deleted file mode 100644 index 124ec7896..000000000 --- a/packages/types/dist/nft.d.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { Pubkey } from './account.js'; -import { Offchain } from './storage.js'; -import '@solana/web3.js'; -import './phantom-e9a40784.js'; -import './das-api.js'; -import './converter.js'; -import '@metaplex-foundation/mpl-token-metadata'; - -type Authority = { - address: Pubkey; - scopes: string[]; -}; -type Creators = { - address: Pubkey; - share: number; - verified: boolean; -}[]; -type Metadata = { - mint: Pubkey; - collectionMint: Pubkey; - authorities: Authority[]; - royalty: number; - name: string; - symbol: string; - uri: string; - creators: Creators; - treeAddress: Pubkey; - isCompressed: boolean; - isMutable: boolean; - isBurn: boolean; - editionNonce: number; - primarySaleHappened: boolean; - dateTime: Date; - offchain: Offchain; -}; -type NftMetadata = { - page: number; - total: number; - limit: number; - metadatas: Metadata[]; -}; - -export { Authority, Creators, Metadata, NftMetadata }; diff --git a/packages/types/dist/phantom-e9a40784.d.ts b/packages/types/dist/phantom-e9a40784.d.ts deleted file mode 100644 index 820828ce4..000000000 --- a/packages/types/dist/phantom-e9a40784.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { PublicKey, Transaction } from '@solana/web3.js'; - -type connectOption = { - onlyIfTrusted: false; -}; -type PhantomProvider = { - isPhantom?: boolean; - publicKey: PublicKey | null; - signTransaction(transaction: Transaction): Promise; - signAllTransactions(transactions: Transaction[]): Promise; - signMessage(message: Uint8Array): Promise; - connect(): Promise; - disconnect(): Promise; -}; - -export { PhantomProvider as P, connectOption as c }; diff --git a/packages/types/dist/phantom.d.mts b/packages/types/dist/phantom.d.mts deleted file mode 100644 index 5846ba175..000000000 --- a/packages/types/dist/phantom.d.mts +++ /dev/null @@ -1,9 +0,0 @@ -import { Keypair, Transaction } from '@solana/web3.js'; -export { P as PhantomProvider, c as connectOption } from './phantom-e9a40784.js'; - -type InitializeMint = { - mint: Keypair; - tx: Transaction; -}; - -export { InitializeMint }; diff --git a/packages/types/dist/phantom.d.ts b/packages/types/dist/phantom.d.ts deleted file mode 100644 index 5846ba175..000000000 --- a/packages/types/dist/phantom.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Keypair, Transaction } from '@solana/web3.js'; -export { P as PhantomProvider, c as connectOption } from './phantom-e9a40784.js'; - -type InitializeMint = { - mint: Keypair; - tx: Transaction; -}; - -export { InitializeMint }; diff --git a/packages/types/dist/regular-nft.d.mts b/packages/types/dist/regular-nft.d.mts deleted file mode 100644 index 9eb67573f..000000000 --- a/packages/types/dist/regular-nft.d.mts +++ /dev/null @@ -1,41 +0,0 @@ -import { Secret, Pubkey } from './account.mjs'; -export { C as Creators, d as InputCollection, I as InputCreators, e as InputNftMetadata, M as MintOptions, a as Option, O as Options, c as UseMethod, U as Uses, b as bignum } from './mint-74b505a0.js'; -import './storage.mjs'; -import '@solana/web3.js'; -import './phantom-e9a40784.js'; -import './das-api.mjs'; -import './converter.mjs'; -import '@metaplex-foundation/mpl-token-metadata'; -import 'bn.js'; - -type BurnOptions = { - feePayer: Secret; -}; - -type ThawOptions = { - feePayer: Secret; -}; - -type GasLessMintOptions = { - freezeAuthority: Pubkey; -}; - -type MintCollectionOptions = { - feePayer: Secret; - freezeAuthority: Pubkey; - collectionSize: number; -}; -type Collection = { - address: Pubkey; - verified: boolean; -}; - -type FreezeOptions = { - feePayer: Secret; -}; - -type TransferOptions = { - feePayer: Secret; -}; - -export { BurnOptions, Collection, FreezeOptions, GasLessMintOptions, MintCollectionOptions, ThawOptions, TransferOptions }; diff --git a/packages/types/dist/regular-nft.d.ts b/packages/types/dist/regular-nft.d.ts deleted file mode 100644 index 6cdbceb5d..000000000 --- a/packages/types/dist/regular-nft.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { Secret, Pubkey } from './account.js'; -export { C as Creators, d as InputCollection, I as InputCreators, e as InputNftMetadata, M as MintOptions, a as Option, O as Options, c as UseMethod, U as Uses, b as bignum } from './mint-08f26d69.js'; -import './storage.js'; -import '@solana/web3.js'; -import './phantom-e9a40784.js'; -import './das-api.js'; -import './converter.js'; -import '@metaplex-foundation/mpl-token-metadata'; -import 'bn.js'; - -type BurnOptions = { - feePayer: Secret; -}; - -type ThawOptions = { - feePayer: Secret; -}; - -type GasLessMintOptions = { - freezeAuthority: Pubkey; -}; - -type MintCollectionOptions = { - feePayer: Secret; - freezeAuthority: Pubkey; - collectionSize: number; -}; -type Collection = { - address: Pubkey; - verified: boolean; -}; - -type FreezeOptions = { - feePayer: Secret; -}; - -type TransferOptions = { - feePayer: Secret; -}; - -export { BurnOptions, Collection, FreezeOptions, GasLessMintOptions, MintCollectionOptions, ThawOptions, TransferOptions }; diff --git a/packages/types/dist/sol-native.d.mts b/packages/types/dist/sol-native.d.mts deleted file mode 100644 index 29d86c67c..000000000 --- a/packages/types/dist/sol-native.d.mts +++ /dev/null @@ -1,7 +0,0 @@ -import { Secret } from './account.mjs'; - -type TransferOptions = { - feePayer: Secret; -}; - -export { TransferOptions }; diff --git a/packages/types/dist/sol-native.d.ts b/packages/types/dist/sol-native.d.ts deleted file mode 100644 index a076dc08f..000000000 --- a/packages/types/dist/sol-native.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { Secret } from './account.js'; - -type TransferOptions = { - feePayer: Secret; -}; - -export { TransferOptions }; diff --git a/packages/types/dist/spl-token.d.mts b/packages/types/dist/spl-token.d.mts deleted file mode 100644 index ec6fb174b..000000000 --- a/packages/types/dist/spl-token.d.mts +++ /dev/null @@ -1,55 +0,0 @@ -import { Secret, Pubkey } from './account.mjs'; -import { Offchain, Attribute, FileType, StorageType } from './storage.mjs'; -import { C as Creators, U as Uses, I as InputCreators, O as Options } from './mint-74b505a0.js'; -import '@solana/web3.js'; -import './phantom-e9a40784.js'; -import './das-api.mjs'; -import './converter.mjs'; -import '@metaplex-foundation/mpl-token-metadata'; -import 'bn.js'; - -type BurnOptions = { - feePayer: Secret; -}; - -type TokenMetadata = { - mint: string; - name: string; - symbol: string; - uri: string; - royalty: number; - offchain: Offchain; - tokenAmount: string; - attributes?: Attribute | undefined; - creators?: Creators[] | undefined; - uses?: Uses | undefined; - dateTime?: Date | undefined; -}; - -type FreezeOptions = { - feePayer: Secret; -}; - -type MintOptions = { - feePayer: Secret; - freezeAuthority: Pubkey; -}; -type InputTokenMetadata = { - name: string; - symbol: string; - filePath?: FileType; - uri?: string; - storageType?: StorageType; - description?: string; - royalty?: number; - uses?: Uses; - creators?: InputCreators[]; - attributes?: Attribute[]; - options?: Options; -}; - -type ThawOptions = { - feePayer: Secret; -}; - -export { BurnOptions, FreezeOptions, InputTokenMetadata, MintOptions, ThawOptions, TokenMetadata }; diff --git a/packages/types/dist/spl-token.d.ts b/packages/types/dist/spl-token.d.ts deleted file mode 100644 index b4b87c8b6..000000000 --- a/packages/types/dist/spl-token.d.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { Secret, Pubkey } from './account.js'; -import { Offchain, Attribute, FileType, StorageType } from './storage.js'; -import { C as Creators, U as Uses, I as InputCreators, O as Options } from './mint-08f26d69.js'; -import '@solana/web3.js'; -import './phantom-e9a40784.js'; -import './das-api.js'; -import './converter.js'; -import '@metaplex-foundation/mpl-token-metadata'; -import 'bn.js'; - -type BurnOptions = { - feePayer: Secret; -}; - -type TokenMetadata = { - mint: string; - name: string; - symbol: string; - uri: string; - royalty: number; - offchain: Offchain; - tokenAmount: string; - attributes?: Attribute | undefined; - creators?: Creators[] | undefined; - uses?: Uses | undefined; - dateTime?: Date | undefined; -}; - -type FreezeOptions = { - feePayer: Secret; -}; - -type MintOptions = { - feePayer: Secret; - freezeAuthority: Pubkey; -}; -type InputTokenMetadata = { - name: string; - symbol: string; - filePath?: FileType; - uri?: string; - storageType?: StorageType; - description?: string; - royalty?: number; - uses?: Uses; - creators?: InputCreators[]; - attributes?: Attribute[]; - options?: Options; -}; - -type ThawOptions = { - feePayer: Secret; -}; - -export { BurnOptions, FreezeOptions, InputTokenMetadata, MintOptions, ThawOptions, TokenMetadata }; diff --git a/packages/types/dist/storage.d.mts b/packages/types/dist/storage.d.mts deleted file mode 100644 index a40c52e01..000000000 --- a/packages/types/dist/storage.d.mts +++ /dev/null @@ -1,68 +0,0 @@ -import { Keypair, PublicKey } from '@solana/web3.js'; -import { P as PhantomProvider } from './phantom-e9a40784.js'; -import { Secret } from './account.mjs'; -import { Asset } from './das-api.mjs'; -import { Metadata } from '@metaplex-foundation/mpl-token-metadata'; -import './converter.mjs'; - -type BundlrSigner = Keypair | PhantomWallet | undefined; -type PhantomWallet = { - publicKey: PublicKey; -}; -type FileType = string | File; -type UploadableFileType = string & File; -type Identity = Secret | PhantomProvider; -type Tags = [{ - name: string; - value: string; -}]; - -type StorageType = 'nftStorage' | 'arweave' | string; -type MetadataAndOffchain = { - onchain: Metadata; - offchain: Offchain; -}; -type AssetAndOffchain = { - onchain: Asset; - offchain: Offchain; -}; -type Offchain = { - name?: string; - symbol?: string; - description?: string; - seller_fee_basis_points?: number; - image?: string; - external_url?: string; - attributes?: Attribute[]; - properties?: Properties; - collection?: { - name?: string; - family?: string; - [key: string]: unknown; - }; - collectionDetails?: { - kind: string; - size: number; - }; - created_at?: number; -}; -type Properties = { - creators?: { - address?: string; - share?: number; - [key: string]: unknown; - }[]; - files?: { - type?: string; - filePath?: FileType; - [key: string]: unknown; - }[]; - [key: string]: unknown; -}; -type Attribute = { - trait_type?: string; - value?: string; - [key: string]: unknown; -}; - -export { AssetAndOffchain, Attribute, BundlrSigner, FileType, Identity, MetadataAndOffchain, Offchain, PhantomWallet, Properties, StorageType, Tags, UploadableFileType }; diff --git a/packages/types/dist/storage.d.ts b/packages/types/dist/storage.d.ts deleted file mode 100644 index 368f5dcb4..000000000 --- a/packages/types/dist/storage.d.ts +++ /dev/null @@ -1,68 +0,0 @@ -import { Keypair, PublicKey } from '@solana/web3.js'; -import { P as PhantomProvider } from './phantom-e9a40784.js'; -import { Secret } from './account.js'; -import { Asset } from './das-api.js'; -import { Metadata } from '@metaplex-foundation/mpl-token-metadata'; -import './converter.js'; - -type BundlrSigner = Keypair | PhantomWallet | undefined; -type PhantomWallet = { - publicKey: PublicKey; -}; -type FileType = string | File; -type UploadableFileType = string & File; -type Identity = Secret | PhantomProvider; -type Tags = [{ - name: string; - value: string; -}]; - -type StorageType = 'nftStorage' | 'arweave' | string; -type MetadataAndOffchain = { - onchain: Metadata; - offchain: Offchain; -}; -type AssetAndOffchain = { - onchain: Asset; - offchain: Offchain; -}; -type Offchain = { - name?: string; - symbol?: string; - description?: string; - seller_fee_basis_points?: number; - image?: string; - external_url?: string; - attributes?: Attribute[]; - properties?: Properties; - collection?: { - name?: string; - family?: string; - [key: string]: unknown; - }; - collectionDetails?: { - kind: string; - size: number; - }; - created_at?: number; -}; -type Properties = { - creators?: { - address?: string; - share?: number; - [key: string]: unknown; - }[]; - files?: { - type?: string; - filePath?: FileType; - [key: string]: unknown; - }[]; - [key: string]: unknown; -}; -type Attribute = { - trait_type?: string; - value?: string; - [key: string]: unknown; -}; - -export { AssetAndOffchain, Attribute, BundlrSigner, FileType, Identity, MetadataAndOffchain, Offchain, PhantomWallet, Properties, StorageType, Tags, UploadableFileType }; diff --git a/packages/types/dist/transaction-builder.d.mts b/packages/types/dist/transaction-builder.d.mts deleted file mode 100644 index 9c50b58e5..000000000 --- a/packages/types/dist/transaction-builder.d.mts +++ /dev/null @@ -1,237 +0,0 @@ -import { Secret, Pubkey } from './account.mjs'; -import { TransactionSignature, TransactionInstruction, Keypair } from '@solana/web3.js'; -import './global.mjs'; - -declare abstract class AbstractResult { - protected abstract _chain(ok: (value: T) => Result, err: (error: E) => Result): Result; - unwrap(): T; - unwrap(ok: (value: T) => U): U; - unwrap(ok: (value: T) => U, err: (error: E) => V): U | V; - unwrap(ok: (value: T) => U, err: (error: E) => U): U; - map(ok: (value: T) => U): Result; - map(ok: (value: T) => U, err: (error: E) => F): Result; - chain(ok: (value: T) => Result): Result; - chain(ok: (value: T) => Result): Result; - chain(ok: (value: T) => Result, err: (error: E) => Result): Result; - match(ok: (value: T) => U, err: (error: E) => F): void | Promise; - submit(feePayer?: Secret): Promise>; -} -declare global { - interface Array { - submit(feePayer?: Secret): Promise>; - } -} -declare class InternalOk extends AbstractResult { - readonly value: T; - readonly isOk = true; - readonly isErr = false; - constructor(value: T); - protected _chain(ok: (value: T) => Result, _err: (error: E) => Result): Result; -} -declare class InternalErr extends AbstractResult { - readonly error: E; - readonly isOk = false; - readonly isErr = true; - constructor(error: E); - protected _chain(_ok: (value: T) => Result, err: (error: E) => Result): Result; -} -declare namespace Result { - export type Ok = InternalOk; - export type Err = InternalErr; - export function ok(value: T): Result; - export function err(error?: E): Result; - type U = Result; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3]): Result<[ - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2]): Result<[OkType, OkType, OkType], ErrType>; - export function all(obj: [R0, R1]): Result<[OkType, OkType], ErrType>; - export function all(obj: [R0]): Result<[OkType], ErrType>; - export function all(obj: []): Result<[]>; - export function all>(obj: T): Result<{ - [K in keyof T]: T[K] extends Result ? I : never; - }, { - [K in keyof T]: T[K] extends Result ? E : never; - }[keyof T]>; - export {}; -} -type Result = Result.Ok | Result.Err; -type OkType> = R extends Result ? O : never; -type ErrType> = R extends Result ? E : never; - -type CommonStructure = { - instructions: TransactionInstruction[]; - signers: Keypair[]; - feePayer?: Keypair; - canSubmit?: boolean; - data?: T; - submit: () => Promise>; -}; -type MintStructure = { - instructions: TransactionInstruction[]; - signers: Keypair[]; - data: T; - feePayer: Keypair; - canSubmit?: boolean; - submit: () => Promise>; -}; -type PartialSignStructure = { - hexInstruction: string; - canSubmit?: boolean; - data?: T; - submit: (feePayer: Secret) => Promise>; -}; - -export { CommonStructure, MintStructure, PartialSignStructure }; diff --git a/packages/types/dist/transaction-builder.d.ts b/packages/types/dist/transaction-builder.d.ts deleted file mode 100644 index d04e5b9dc..000000000 --- a/packages/types/dist/transaction-builder.d.ts +++ /dev/null @@ -1,237 +0,0 @@ -import { Secret, Pubkey } from './account.js'; -import { TransactionSignature, TransactionInstruction, Keypair } from '@solana/web3.js'; -import './global.js'; - -declare abstract class AbstractResult { - protected abstract _chain(ok: (value: T) => Result, err: (error: E) => Result): Result; - unwrap(): T; - unwrap(ok: (value: T) => U): U; - unwrap(ok: (value: T) => U, err: (error: E) => V): U | V; - unwrap(ok: (value: T) => U, err: (error: E) => U): U; - map(ok: (value: T) => U): Result; - map(ok: (value: T) => U, err: (error: E) => F): Result; - chain(ok: (value: T) => Result): Result; - chain(ok: (value: T) => Result): Result; - chain(ok: (value: T) => Result, err: (error: E) => Result): Result; - match(ok: (value: T) => U, err: (error: E) => F): void | Promise; - submit(feePayer?: Secret): Promise>; -} -declare global { - interface Array { - submit(feePayer?: Secret): Promise>; - } -} -declare class InternalOk extends AbstractResult { - readonly value: T; - readonly isOk = true; - readonly isErr = false; - constructor(value: T); - protected _chain(ok: (value: T) => Result, _err: (error: E) => Result): Result; -} -declare class InternalErr extends AbstractResult { - readonly error: E; - readonly isOk = false; - readonly isErr = true; - constructor(error: E); - protected _chain(_ok: (value: T) => Result, err: (error: E) => Result): Result; -} -declare namespace Result { - export type Ok = InternalOk; - export type Err = InternalErr; - export function ok(value: T): Result; - export function err(error?: E): Result; - type U = Result; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3]): Result<[ - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2]): Result<[OkType, OkType, OkType], ErrType>; - export function all(obj: [R0, R1]): Result<[OkType, OkType], ErrType>; - export function all(obj: [R0]): Result<[OkType], ErrType>; - export function all(obj: []): Result<[]>; - export function all>(obj: T): Result<{ - [K in keyof T]: T[K] extends Result ? I : never; - }, { - [K in keyof T]: T[K] extends Result ? E : never; - }[keyof T]>; - export {}; -} -type Result = Result.Ok | Result.Err; -type OkType> = R extends Result ? O : never; -type ErrType> = R extends Result ? E : never; - -type CommonStructure = { - instructions: TransactionInstruction[]; - signers: Keypair[]; - feePayer?: Keypair; - canSubmit?: boolean; - data?: T; - submit: () => Promise>; -}; -type MintStructure = { - instructions: TransactionInstruction[]; - signers: Keypair[]; - data: T; - feePayer: Keypair; - canSubmit?: boolean; - submit: () => Promise>; -}; -type PartialSignStructure = { - hexInstruction: string; - canSubmit?: boolean; - data?: T; - submit: (feePayer: Secret) => Promise>; -}; - -export { CommonStructure, MintStructure, PartialSignStructure }; diff --git a/packages/types/dist/transaction-filter.d.mts b/packages/types/dist/transaction-filter.d.mts deleted file mode 100644 index 66687a3e0..000000000 --- a/packages/types/dist/transaction-filter.d.mts +++ /dev/null @@ -1,83 +0,0 @@ -import { PublicKey } from '@solana/web3.js'; -import { Pubkey } from './account.mjs'; - -declare enum FilterType { - Memo = "memo", - Mint = "mint", - OnlyMemo = "only-memo", - Transfer = "transfer" -} -declare enum ModuleName { - SolNative = "system", - SplToken = "spl-token" -} -declare const FilterOptions: { - Transfer: { - program: string[]; - action: string[]; - }; - Memo: { - program: string[]; - action: string[]; - }; - Mint: { - program: string[]; - action: string[]; - }; -}; -type PostTokenAccount = { - account: string; - owner: string; -}; -type WithMemo = { - sig: string[]; - memo: string; -}; -type Transfer = { - parsed: { - info: { - destination: Pubkey; - source: Pubkey; - lamports: number; - }; - type: string; - }; - program: string; - programId?: PublicKey; -}; -type MintTo = { - parsed: { - info: { - account: Pubkey; - mint: Pubkey; - mintAuthority: Pubkey; - tokenAmount: string; - }; - type: string; - }; - program: string; - programId?: PublicKey; -}; -type MintToChecked = MintTo; -type TransferChecked = { - parsed: { - info: { - destination: Pubkey; - mint: Pubkey; - multisigAuthority: Pubkey; - signers: Pubkey[]; - source: Pubkey; - tokenAmount: string; - }; - type: string; - }; - program: string; - programId?: PublicKey; -}; -type Memo = { - parsed: string; - program: string; - programId: PublicKey; -}; - -export { FilterOptions, FilterType, Memo, MintTo, MintToChecked, ModuleName, PostTokenAccount, Transfer, TransferChecked, WithMemo }; diff --git a/packages/types/dist/transaction-filter.d.ts b/packages/types/dist/transaction-filter.d.ts deleted file mode 100644 index ea9a6f24b..000000000 --- a/packages/types/dist/transaction-filter.d.ts +++ /dev/null @@ -1,83 +0,0 @@ -import { PublicKey } from '@solana/web3.js'; -import { Pubkey } from './account.js'; - -declare enum FilterType { - Memo = "memo", - Mint = "mint", - OnlyMemo = "only-memo", - Transfer = "transfer" -} -declare enum ModuleName { - SolNative = "system", - SplToken = "spl-token" -} -declare const FilterOptions: { - Transfer: { - program: string[]; - action: string[]; - }; - Memo: { - program: string[]; - action: string[]; - }; - Mint: { - program: string[]; - action: string[]; - }; -}; -type PostTokenAccount = { - account: string; - owner: string; -}; -type WithMemo = { - sig: string[]; - memo: string; -}; -type Transfer = { - parsed: { - info: { - destination: Pubkey; - source: Pubkey; - lamports: number; - }; - type: string; - }; - program: string; - programId?: PublicKey; -}; -type MintTo = { - parsed: { - info: { - account: Pubkey; - mint: Pubkey; - mintAuthority: Pubkey; - tokenAmount: string; - }; - type: string; - }; - program: string; - programId?: PublicKey; -}; -type MintToChecked = MintTo; -type TransferChecked = { - parsed: { - info: { - destination: Pubkey; - mint: Pubkey; - multisigAuthority: Pubkey; - signers: Pubkey[]; - source: Pubkey; - tokenAmount: string; - }; - type: string; - }; - program: string; - programId?: PublicKey; -}; -type Memo = { - parsed: string; - program: string; - programId: PublicKey; -}; - -export { FilterOptions, FilterType, Memo, MintTo, MintToChecked, ModuleName, PostTokenAccount, Transfer, TransferChecked, WithMemo }; diff --git a/packages/types/dist/utils.d.mts b/packages/types/dist/utils.d.mts deleted file mode 100644 index 3f1949a22..000000000 --- a/packages/types/dist/utils.d.mts +++ /dev/null @@ -1,18 +0,0 @@ -import { Find } from './find.mjs'; -import { History } from './history.mjs'; -import './account.mjs'; - -type AnyObject = { - [key: string]: unknown; -}; -type OverwriteObject = { - existsKey: string; - will: { - key: string; - value: unknown; - }; -}; -type OnOk = (ok: T[]) => void; -type OnErr = (err: Error) => void; - -export { AnyObject, OnErr, OnOk, OverwriteObject }; diff --git a/packages/types/dist/utils.d.ts b/packages/types/dist/utils.d.ts deleted file mode 100644 index 602b6828e..000000000 --- a/packages/types/dist/utils.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { Find } from './find.js'; -import { History } from './history.js'; -import './account.js'; - -type AnyObject = { - [key: string]: unknown; -}; -type OverwriteObject = { - existsKey: string; - will: { - key: string; - value: unknown; - }; -}; -type OnOk = (ok: T[]) => void; -type OnErr = (err: Error) => void; - -export { AnyObject, OnErr, OnOk, OverwriteObject }; diff --git a/packages/types/dist/validator.d.mts b/packages/types/dist/validator.d.mts deleted file mode 100644 index c56cc1dc3..000000000 --- a/packages/types/dist/validator.d.mts +++ /dev/null @@ -1,13 +0,0 @@ -type Condition = 'overMax' | 'underMin'; -interface Limit { - threshold: number; - condition: Condition; -} -interface Details { - key: string; - message: string; - actual: string | number; - limit?: Limit; -} - -export { Condition, Details, Limit }; diff --git a/packages/types/dist/validator.d.ts b/packages/types/dist/validator.d.ts deleted file mode 100644 index c56cc1dc3..000000000 --- a/packages/types/dist/validator.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -type Condition = 'overMax' | 'underMin'; -interface Limit { - threshold: number; - condition: Condition; -} -interface Details { - key: string; - message: string; - actual: string | number; - limit?: Limit; -} - -export { Condition, Details, Limit }; diff --git a/packages/validator/dist/index.js b/packages/validator/dist/index.js index ebdd781ce..dd94bf695 100644 --- a/packages/validator/dist/index.js +++ b/packages/validator/dist/index.js @@ -480,14 +480,11 @@ var TransactionBuilder5; // ../global/src/index.ts var import_web39 = require("@solana/web3.js"); -// ../account/src/associated.ts -var import_spl_token = require("@solana/spl-token"); - // ../account/src/keypair.ts var import_web37 = require("@solana/web3.js"); var import_bs58 = __toESM(require("bs58")); var Account; -((Account5) => { +((Account4) => { class Keypair4 { secret; pubkey; @@ -523,111 +520,16 @@ var Account; }); }; } - Account5.Keypair = Keypair4; + Account4.Keypair = Keypair4; })(Account || (Account = {})); -// ../account/src/associated.ts -var Account2; -((Account5) => { - let Associated; - ((Associated2) => { - const RETRY_OVER_LIMIT = 10; - const RETRY_SLEEP_TIME = 3; - const get = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const res = await (0, Associated2.makeOrCreateInstruction)( - mint, - owner, - new Account.Keypair({ secret: feePayer }).pubkey, - allowOwnerOffCurve - ); - if (!res.inst) { - return res.tokenAccount; - } - return new TransactionBuilder6.Common( - [res.inst], - [], - feePayer.toKeypair(), - res.tokenAccount - ); - }; - Associated2.retryGetOrCreate = async (mint, owner, feePayer) => { - let counter = 1; - while (counter < RETRY_OVER_LIMIT) { - try { - const inst = await get(mint, owner, feePayer, true); - if (inst && typeof inst === "string") { - debugLog("# associatedTokenAccount: ", inst); - return inst; - } else if (inst instanceof TransactionBuilder6.Common) { - (await inst.submit()).map( - async (ok) => { - await Node.confirmedSig(ok); - return inst.data; - }, - (err) => { - debugLog("# Error submit retryGetOrCreate: ", err); - throw err; - } - ); - } - } catch (e) { - debugLog(`# retry: ${counter} create token account: `, e); - debugLog(`# mint: ${mint}, owner: ${owner}, feePayer: ${feePayer}`); - } - await sleep(RETRY_SLEEP_TIME); - counter++; - } - throw Error(`retry action is over limit ${RETRY_OVER_LIMIT}`); - }; - Associated2.makeOrCreateInstruction = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const associatedTokenAccount = (0, import_spl_token.getAssociatedTokenAddressSync)( - mint.toPublicKey(), - owner.toPublicKey(), - allowOwnerOffCurve, - import_spl_token.TOKEN_PROGRAM_ID, - import_spl_token.ASSOCIATED_TOKEN_PROGRAM_ID - ); - debugLog("# associatedTokenAccount: ", associatedTokenAccount.toString()); - try { - await (0, import_spl_token.getAccount)( - Node.getConnection(), - associatedTokenAccount, - Node.getConnection().commitment, - import_spl_token.TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst: void 0 - }; - } catch (error) { - if (!(error instanceof import_spl_token.TokenAccountNotFoundError) && !(error instanceof import_spl_token.TokenInvalidAccountOwnerError)) { - throw Error("Unexpected error"); - } - const payer = !feePayer ? owner : feePayer; - const inst = (0, import_spl_token.createAssociatedTokenAccountInstruction)( - payer.toPublicKey(), - associatedTokenAccount, - owner.toPublicKey(), - mint.toPublicKey(), - import_spl_token.TOKEN_PROGRAM_ID, - import_spl_token.ASSOCIATED_TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst - }; - } - }; - })(Associated = Account5.Associated || (Account5.Associated = {})); -})(Account2 || (Account2 = {})); - // ../account/src/pda.ts var import_web38 = require("@solana/web3.js"); var import_mpl_token_metadata = require("@metaplex-foundation/mpl-token-metadata"); var import_mpl_bubblegum = require("@metaplex-foundation/mpl-bubblegum"); var import_bn = __toESM(require("bn.js")); -var Account3; -((Account5) => { +var Account2; +((Account4) => { let Pda; ((Pda2) => { Pda2.getMetadata = (address) => { @@ -679,14 +581,13 @@ var Account3; ); return assetId.toString(); }; - })(Pda = Account5.Pda || (Account5.Pda = {})); -})(Account3 || (Account3 = {})); + })(Pda = Account4.Pda || (Account4.Pda = {})); +})(Account2 || (Account2 = {})); // ../account/src/index.ts -var Account4 = { - ...Account2, +var Account3 = { ...Account, - ...Account3 + ...Account2 }; // ../global/src/index.ts @@ -717,7 +618,7 @@ String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, op } return url; } - if (Account4.Keypair.isPubkey(addressOrSignature)) { + if (Account3.Keypair.isPubkey(addressOrSignature)) { if (explorer === "solanafm" /* SolanaFM */) { url = `${Constants.EXPLORER_SOLANAFM_URL}/address/${addressOrSignature}?cluster=${cluster}`; } else if (explorer === "xray" /* Xray */) { @@ -737,13 +638,13 @@ String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, op return url; }; String.prototype.toPublicKey = function() { - if (!Account4.Keypair.isPubkey(this.toString())) { + if (!Account3.Keypair.isPubkey(this.toString())) { throw Error(`No match KeyPair.PubKey: ${this.toString()}`); } return new import_web39.PublicKey(this.toString()); }; String.prototype.toKeypair = function() { - if (!Account4.Keypair.isSecret(this.toString())) { + if (!Account3.Keypair.isSecret(this.toString())) { throw Error(`No match KeyPair.Secret: ${this.toString()}`); } const decoded = import_bs582.default.decode(this.toString()); @@ -779,9 +680,6 @@ var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { console.log("[DEBUG]", data1, data2, data3, data4); } }; -var sleep = async (sec) => { - return new Promise((r) => setTimeout(r, sec * 1e3)); -}; var isPromise = (obj) => { return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; }; @@ -1528,4 +1426,4 @@ var ValidatorError = class extends Error { Validator, ValidatorError }); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uLy4uL3N1aXRlLXV0aWxzL3NyYy9jb25zdGFudHMudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvYmF0Y2gudHMiLCAiLi4vLi4vbm9kZS9zcmMvaW5kZXgudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY29tbW9uLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL21pbnQudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvcGFydGlhbC1zaWduLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2NhbGN1bGF0ZS10eHNpemUudHMiLCAiLi4vLi4vZ2xvYmFsL3NyYy9pbmRleC50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9hc3NvY2lhdGVkLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2tleXBhaXIudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvcGRhLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3N1aXRlLXV0aWxzL3NyYy9zaGFyZWQudHMiLCAiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL3Jlc3VsdC50cyIsICIuLi8uLi9jb252ZXJ0ZXIvc3JjL2NvbGxlY3Rpb24udHMiLCAiLi4vLi4vY29udmVydGVyL3NyYy9jcmVhdG9ycy50cyIsICIuLi8uLi9jb252ZXJ0ZXIvc3JjL2NvbXByZXNzZ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YXRhKTtcbiAgICAgIGNvbnN0IHJlc3VsdHM6IERldGFpbHNbXSA9IFtdO1xuICAgICAga2V5cy5tYXAoKGtleSkgPT4ge1xuICAgICAgICBsZXQgcmVzITogUmVzdWx0PHN0cmluZywgVmFsaWRhdG9yRXJyb3I+O1xuICAgICAgICBzd2l0Y2ggKGtleSkge1xuICAgICAgICAgIGNhc2UgJ2ltYWdlJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuaW1hZ2UpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNJbWFnZVVybChtZXRhZGF0YS5pbWFnZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdyb3lhbHR5JzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEucm95YWx0eSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1JveWFsdHkobWV0YWRhdGEucm95YWx0eSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlckZlZUJhc2lzUG9pbn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rpb25zICYmICFhLnNpZ25lcnMpIHtcbiAgICAgICAgICAgIHRocm93IEVycm9yKFxuICAgICAgICAgICAgICBgb25seSBJbnN0cnVjdGlvbiBvYmplY3QgdGhhdCBjYW4gdXNlIGJhdGNoU3VibWl0KCkuXG4gICAgICAgICAgICBJbmRleDogJHtpfSwgU2V0IHZhbHVlOiAke0pTT04uc3RyaW5naWZ5KGEpfWAsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICBpKys7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBpbnN0cnVjdGlvbnMgPSBhcnIuZmxhdE1hcCgoYSkgPT4gYS5pbnN0cnVjdGlvbnMpO1xuICAgICAgICBjb25zdCBzaWduZXJzID0gYXJyLmZsYXRNYXAoKGEpID0+IGEuc2lnbmVycyk7XG4gICAgICAgIGNvbnN0IGZlZVBheWVycyA9IGFyci5maWx0ZXIoKGEpID0+IGEuZmVlUGF5ZXIgIT09IHVuZGVmaW5lZCk7XG4gICAgICAgIGxldCBmZWVQYXllciA9IHNpZ25lcnNbMF07XG4gICAgICAgIGlmIChmZWVQYXllcnMubGVuZ3RoID4gMCAmJiBmZWVQYXllcnNbMF0uZmVlUGF5ZXIpIHtcbiAgICAgICAgICBmZWVQYXllciA9IGZlZVBheWVyc1swXS5mZWVQYXllcjtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHRyYW5zYWN0aW9uID0gbmV3IFRyYW5zYWN0aW9uKCk7XG4gICAgICAgIGxldCBmaW5hbFNpZ25lcnMgPSBzaWduZXJzO1xuICAgICAgICBpZiAoZmVlUGF5ZXIpIHtcbiAgICAgICAgICB0cmFuc2FjdGlvbi5mZWVQYXllciA9IGZlZVBheWVyLnB1YmxpY0tleTtcbiAgICAgICAgICBmaW5hbFNpZ25lcnMgPSBbZmVlUGF5ZXIsIC4uLnNpZ25lcnNdO1xuICAgICAgICB9XG4gICAgICAgIGluc3RydWN0aW9ucy5tYXAoKGluc3QpID0+IHRyY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KS5tYXAoXG4gICAgICAgICAgICAgIGFzeW5jIChvazogc3RyaW5nKSA9PiB7XG4gICAgICAgICAgICAgICAgYXdhaXQgTm9kZS5jb25maXJtZWRTaWcob2spO1xuICAgICAgICAgICAgICAgIHJldHVybiBpbnN0LmRhdGE7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIChlcnI6IEVycm9yKSA9PiB7XG4gICAgICAgICAgICAgICAgZGVidWdMb2coJyMgRXJyb3Igc3VibWl0IHJldHJ5R2V0T3JDcmVhdGU6ICcsIGVycik7XG4gICAgICAgICAgICAgICAgdGhyb3cgZXJyO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICBkZWJ1Z0xvZyhgIyByZXRyeTogJHtjb3VudGVyfSBjcmVhdGUgdG9rZW4gYWNjb3VudDogYCwgZSk7XG4gICAgICAgICAgZGVidWdMb2coYCMgbWludDogJHttaW50fSwgb3duZXI6ICR7b3duZXJ9LCBmZWVQYXllcjogJHtmZWVQYXllcn1gKTtcbiAgICAgICAgfVxuICAgICAgICBhd2FpdCBzbGVlcChSRVRSWV9TTEVFUF9USU1FKTtcbiAgICAgICAgY291bnRlcisrO1xuICAgICAgfVxuICAgICAgdGhyb3cgRXJyb3IoYHJldHJ5IGFjdGlvbiBpcyBvdmVyIGxpbWl0ICR7UkVUUllfT1ZFUl9MSU1JVH1gKTtcbiAgICB9O1xuXG4gICAgLyoqXG4gICAgICogW01haW4gbG9naWNdR2V0IEFzc29jaWF0ZWQgdG9rZW4gQWNjb3VudC5cbiAgICAgKiBpZiBub3QgY3JlYXRlZCwgY3JlYXRlIG5ldyB0b2tlbiBhY2NvdWludFxuICAgICAqXG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG1pbnRcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gb3duZXJcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gZmVl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R1JBTV9JRCxcbiAgICAgICAgKTtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICB0b2tlbkFjY291bnQ6IGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSxcbiAgICAgICAgICBpbnN0OiB1bmRlZmluZWQsXG4gICAgICAgIH07XG4gICAgICB9IGNhdGNoIChlcnJvcjogdW5rbm93bikge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuQWNjb3VudE5vdEZvdW5kRXJyb3IpICYmXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuSW52YWxpZEFjY291bnRPd25lckVycm9yKVxuICAgICAgICApIHtcbiAgICAgICAgICB0aHJvdyBFcnJvcignVW5leHBlY3RlZCBlcnJvcicpO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgcGF5ZXIgPSAhZmVlUGF5ZXIgPyBvd25lciA6IGZlZVBheWVyO1xuXG4gICAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVBc3NvY2lhdGVkVG9rZW5BY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgcGF5ZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdCxcbiAgICAgICAgfTtcbiAgICAgIH1cbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHsgS2V5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BpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBudWxsO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4ge1xuICAgICAgICBrZXk6IGlucHV0LnRvUHVibGljS2V5KCksXG4gICAgICAgIHZlcmlmaWVkOiBmYWxzZSxcbiAgICAgIH07XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlciA9IChcbiAgICAgIG91dHB1dDogT3B0aW9uPEludGVybmFsQ29sbGVjdGlvbj4sXG4gICAgKTogQ29sbGVjdGlvblR5cGUgfCB1bmRlZmluZWQgPT4ge1xuICAgICAgaWYgKCFvdXRwdXQpIHtcbiAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIHtcbiAgICAgICAgYWRkcmVzczogb3V0cHV0LmtleS50b1N0cmluZygpLFxuICAgICAgICB2ZXJpZmllZDogb3V0cHV0LnZlcmlmaWVkLFxuICAgICAgfTtcbiAgICB9O1xuICB9XG5cbiAgZXhwb3J0IG5hbWVzcGFjZSBDb2xsZWN0aW9uTWludCB7XG4gICAgZXhwb3J0IGNvbnN0IGludG9Vc2VyID0gKG91dHB1dDogR3JvdXBpbmdbXSk6IFB1YmtleSA9PiB7XG4gICAgICBjb25zdCByZXMgPSBvdXRwdXQuZmluZCgodmFsdWUpID0+IHtcbiAgICAgICAgaWYgKHZhbHVlLmdyb3VwX2tleSA9PT0gJ2NvbGxlY3Rpb24nKSB7XG4gICAgICAgICAgcmV0dXJuIHZhbHVlLmdyb3VwX3ZhbHVlO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIHJldHVybiByZXMgPyByZXMuZ3JvdXBfdmFsdWUgOiAnJztcbiAgICB9O1xuICB9XG59XG4iLCAiLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLXVudXNlZC12YXJzICovXG5pbXBvcnQgeyBDcmVhdG9ycywgSW5wdXRDcmVhdG9ycywgT3B0aW9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AgICAgcmVzID0gaXNSb3lhbHR5KG1ldGFkYXRhLnJveWFsdHkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEuc3ltYm9sKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU3ltYm9sKG1ldGFkYXRhLnN5bWJvbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAocmVzICYmIHJlcy5pc0Vycikge1xuICAgICAgICAgIHJlc3VsdHMucHVzaCguLi5yZXMuZXJyb3Iu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Db25zdGFudHMuRW5kUG9pbnRVcmwubG9jYWxob3N0O1xuICAgIH1cbiAgfTtcblxuICBleHBvcnQgY29uc3Qgc3dpdGNoQnVuZGxyID0gKGVudjogc3RyaW5nKTogc3RyaW5nID0+IHtcbiAgICBzd2l0Y2ggKGVudikge1xuICAgICAgY2FzZSBDb25zdGFudHMuQ2x1c3Rlci5wcmQ6IHtcbiAgICAgICAgY29uc3QgdXJscyA9IENvbnN0YW50cy5CdW5kbHJVcmwucHJkLnNwbGl0KCcsJyk7XG4gICAgICAgIGNvbnN0IGluZGV4ID0gRGF0ZS5ub3coKSAlIHVybHMubGVuZ3RoO1xuICAgICAgICByZXR1cm4gdXJsc1tpbmRleF07XG4gICAgICB9XG4gICAgICBkZWZhdWx0OiB7XG4gICAgICAgIHJldHVybiBDb25zdGFudHMuQnVuZGxyVXJsLmRldjtcbiAgICAgIH1cbiAgICB9XG4gIH07XG5cbiAgZXhwb3J0IGNvbnN0IHN3aXRjaERhc0FwaSA9IChlbnY6IHN0cmluZyk6IHN0cmluZyA9PiB7XG4gICAgc3dpdGNoIChlbnYpIHtcbiAgICAgIGNhc2UgQ29uc3RhbnRzLkNsdXN0ZXIucHJkOiB7XG4gICAgICAgIGlmIChkYXNBcGlVcmwubGVuZ3RoIDwgMSkge1xuICAgICAgICAgIHRocm93IEVycm9yKENvbnN0YW50cy5XYXJubmluZ01lc3NhZ2UuREFTX0FQSV9VUkwpO1xuICAgICAgICB9XG4gICAgICAgIGNvbnN0IHVybHMgPSBDb25zdGFudHMuQnVuZGxyVXJsLnByZC5zcGxpdCgnLCcpO1xuICAgICAgICBjb25zdCBpbmRleCA9IERhdGUubm93KCkgJSB1cmxzLmxlbmd0aDtcbiAgICAgICAgcmV0dXJuIHVybHNbaW5kZXhdO1xuICAgICAgfVxuICAgICAgZGVmYXVsdDoge1xuICAgICAgICBjb25zdCB1cmxzID0gQ29uc3RhbnRzLkRhc0FwaVVybC5kZXYuc3BsaXQoJywnKTtcbiAgICAgICA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0dXJuIG51bGw7XG4gICAgICB9XG4gICAgICByZXR1cm4gaW5wdXQubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvQ29tcHJlc3NlZE5mdEluZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IEludGVybmFsQ3JlYXRvcnNbXSA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBbXTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBpbnB1dCEubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlciA9IChcbiAgICAgIG91dHB1dDogT3B0aW9uPEludGVybmFsQ3JlYXRvcnNbXT4sXG4gICAgKTogQ3JlYXRvcnNbXSB8IHVuZGVmaW5lZCA9PiB7XG4gICAgICBpZiAoIW91dHB1dCkge1xuICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gb3V0cHV0Lm1hcCgoZGF0YSkgPT4ge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIGFkZHJlc3M6IGRhdGEuYWRkcmVzcy50b1N0cmluZyg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8c3RyaW5nLCBFcnJvcj4+LFxuICAgICAgc3RvcmFnZVR5cGU6IFN0b3JhZ2VUeXBlLFxuICAgICAgZmVlUGF5ZXI/OiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxQcm9wZXJ0aWVzPiA9PiB7XG4gICAgICBpZiAoIWlucHV0IHx8ICFpbnB1dC5maWxlcykge1xuICAgICAgICByZXR1cm4ge307XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGZpbGVzID0gYXdhaXQgUHJvbWlzZS5hbGwoXG4gICAgICAgIGlucHV0LmZpbGVzLm1hcChhc3luYyAoZmlsZSkgPT4ge1xuICAgICAgICAgIGlmICghZmlsZS5maWxlUGF0aCkge1xuICAgICAgICAgICAgcmV0dXJuIHt9O1xuICAgICAgICAgIH1cbiAgICAgICAgICBjb25zdCByZXMgPSBhd2FpdCBjYWxsYmFja0Z1bmMoZmlsZS5maWxlUGF0aCwgc3RvcmFnZVR5cGUsIGZlZVBheWVyKTtcbiAgICAgICAgICBpZiAocmVzLmlzRXJyKSB7XG4gICAgICAgICAgICB0aHJvdyBFcnJvcihyZXMuZXJyb3IubWVzc2FnZSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBvdmVyd3JpdGVPYmplY3QoZmlsZSwgW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBleGlzdHNLZXk6ICdmaWxlUGF0aCcsXG4gICAgICAgICAgICAgIHdpbGw6IHsga2V5OiAndXJpJywgdmFsdWU6IHJlcy52YWx1ZSB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICBdKTtcbiAgICAgICAgfSksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHsgLi4uaW5wdXQsIGZpbGVzIH0gYXMgUHJvcGVydGllcztcbiAgICB9O1xuICB9XG59XG4iLCAiLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLXVudXNlZC12YXJzICovXG5pbXBvcnQgeyBPcHRpb24sIFVzZXMgfSB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gImltcG9ydF93ZWIzIiwgImltcG9ydF93ZWIzIiwgIkFjY291bnQiLCAiS2V5cGFpciIsICJicyIsICJPcmlnaW5hbCIsICJpbXBvcnRfd2ViMyIsICJBY2NvdW50IiwgIlBkYSIsICJCTiIsICJBY2NvdW50IiwgImltcG9ydF9iczU4IiwgIkFjY291bnQiLCAiYnMiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJSZXN1bHQiLCAiQ29udmVydGVyIiwgIkNvbGxlY3Rpb24iLCAiQ29sbGVjdGlvbk1pbnQiLCAiQ29udmVydGVyIiwgIkNyZWF0b3JzIiwgIkNvbnZlcnRlciIsICJDb21wcmVzc2VkTmZ0TWV0YWRhdGEiLCAiQ29udmVydGVyIiwgIlJveWFsdHkiLCAiQ29udmVydGVyIiwgIk5mdCIsICJDb252ZXJ0ZXIiLCAiTWVtbyIsICJDb252ZXJ0ZXIiLCAiTWludCIsICJDb252ZXJ0ZXIiLCAiUmVndWxhck5mdE1ldGFkYXRhIiwgIkNvbnZlcnRlciIsICJQcm9wZXJ0aWVzIiwgIkNvbnZlcnRlciIsICJVc2VzIiwgIkNvbnZlcnRlciIsICJUb2tlbk1ldGFkYXRhIiwgIkNvbnZlcnRlciIsICJUcmFuc2ZlckNoZWNrZWQiLCAiQ29udmVydGVyIiwgIlRyYW5zZmVyIiwgIkNvbnZlcnRlciIsICJWYWxpZGF0b3IiLCAiTWVzc2FnZSIsICJDb252ZXJ0ZXIiXQp9Cg== \ No newline at end of file diff --git a/packages/validator/dist/index.mjs b/packages/validator/dist/index.mjs index ca4a01434..dfd47dcf6 100644 --- a/packages/validator/dist/index.mjs +++ b/packages/validator/dist/index.mjs @@ -454,22 +454,11 @@ var TransactionBuilder5; // ../global/src/index.ts import { Keypair as Keypair3, LAMPORTS_PER_SOL, PublicKey as PublicKey4 } from "@solana/web3.js"; -// ../account/src/associated.ts -import { - ASSOCIATED_TOKEN_PROGRAM_ID, - createAssociatedTokenAccountInstruction, - getAccount, - getAssociatedTokenAddressSync, - TOKEN_PROGRAM_ID, - TokenAccountNotFoundError, - TokenInvalidAccountOwnerError -} from "@solana/spl-token"; - // ../account/src/keypair.ts import { Keypair as Original, PublicKey as PublicKey2 } from "@solana/web3.js"; import bs from "bs58"; var Account; -((Account5) => { +((Account4) => { class Keypair4 { secret; pubkey; @@ -505,111 +494,16 @@ var Account; }); }; } - Account5.Keypair = Keypair4; + Account4.Keypair = Keypair4; })(Account || (Account = {})); -// ../account/src/associated.ts -var Account2; -((Account5) => { - let Associated; - ((Associated2) => { - const RETRY_OVER_LIMIT = 10; - const RETRY_SLEEP_TIME = 3; - const get = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const res = await (0, Associated2.makeOrCreateInstruction)( - mint, - owner, - new Account.Keypair({ secret: feePayer }).pubkey, - allowOwnerOffCurve - ); - if (!res.inst) { - return res.tokenAccount; - } - return new TransactionBuilder6.Common( - [res.inst], - [], - feePayer.toKeypair(), - res.tokenAccount - ); - }; - Associated2.retryGetOrCreate = async (mint, owner, feePayer) => { - let counter = 1; - while (counter < RETRY_OVER_LIMIT) { - try { - const inst = await get(mint, owner, feePayer, true); - if (inst && typeof inst === "string") { - debugLog("# associatedTokenAccount: ", inst); - return inst; - } else if (inst instanceof TransactionBuilder6.Common) { - (await inst.submit()).map( - async (ok) => { - await Node.confirmedSig(ok); - return inst.data; - }, - (err) => { - debugLog("# Error submit retryGetOrCreate: ", err); - throw err; - } - ); - } - } catch (e) { - debugLog(`# retry: ${counter} create token account: `, e); - debugLog(`# mint: ${mint}, owner: ${owner}, feePayer: ${feePayer}`); - } - await sleep(RETRY_SLEEP_TIME); - counter++; - } - throw Error(`retry action is over limit ${RETRY_OVER_LIMIT}`); - }; - Associated2.makeOrCreateInstruction = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const associatedTokenAccount = getAssociatedTokenAddressSync( - mint.toPublicKey(), - owner.toPublicKey(), - allowOwnerOffCurve, - TOKEN_PROGRAM_ID, - ASSOCIATED_TOKEN_PROGRAM_ID - ); - debugLog("# associatedTokenAccount: ", associatedTokenAccount.toString()); - try { - await getAccount( - Node.getConnection(), - associatedTokenAccount, - Node.getConnection().commitment, - TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst: void 0 - }; - } catch (error) { - if (!(error instanceof TokenAccountNotFoundError) && !(error instanceof TokenInvalidAccountOwnerError)) { - throw Error("Unexpected error"); - } - const payer = !feePayer ? owner : feePayer; - const inst = createAssociatedTokenAccountInstruction( - payer.toPublicKey(), - associatedTokenAccount, - owner.toPublicKey(), - mint.toPublicKey(), - TOKEN_PROGRAM_ID, - ASSOCIATED_TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst - }; - } - }; - })(Associated = Account5.Associated || (Account5.Associated = {})); -})(Account2 || (Account2 = {})); - // ../account/src/pda.ts import { PublicKey as PublicKey3 } from "@solana/web3.js"; import { PROGRAM_ID } from "@metaplex-foundation/mpl-token-metadata"; import { MPL_BUBBLEGUM_PROGRAM_ID } from "@metaplex-foundation/mpl-bubblegum"; import BN from "bn.js"; -var Account3; -((Account5) => { +var Account2; +((Account4) => { let Pda; ((Pda2) => { Pda2.getMetadata = (address) => { @@ -661,14 +555,13 @@ var Account3; ); return assetId.toString(); }; - })(Pda = Account5.Pda || (Account5.Pda = {})); -})(Account3 || (Account3 = {})); + })(Pda = Account4.Pda || (Account4.Pda = {})); +})(Account2 || (Account2 = {})); // ../account/src/index.ts -var Account4 = { - ...Account2, +var Account3 = { ...Account, - ...Account3 + ...Account2 }; // ../global/src/index.ts @@ -699,7 +592,7 @@ String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, op } return url; } - if (Account4.Keypair.isPubkey(addressOrSignature)) { + if (Account3.Keypair.isPubkey(addressOrSignature)) { if (explorer === "solanafm" /* SolanaFM */) { url = `${Constants.EXPLORER_SOLANAFM_URL}/address/${addressOrSignature}?cluster=${cluster}`; } else if (explorer === "xray" /* Xray */) { @@ -719,13 +612,13 @@ String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, op return url; }; String.prototype.toPublicKey = function() { - if (!Account4.Keypair.isPubkey(this.toString())) { + if (!Account3.Keypair.isPubkey(this.toString())) { throw Error(`No match KeyPair.PubKey: ${this.toString()}`); } return new PublicKey4(this.toString()); }; String.prototype.toKeypair = function() { - if (!Account4.Keypair.isSecret(this.toString())) { + if (!Account3.Keypair.isSecret(this.toString())) { throw Error(`No match KeyPair.Secret: ${this.toString()}`); } const decoded = bs2.decode(this.toString()); @@ -761,9 +654,6 @@ var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { console.log("[DEBUG]", data1, data2, data3, data4); } }; -var sleep = async (sec) => { - return new Promise((r) => setTimeout(r, sec * 1e3)); -}; var isPromise = (obj) => { return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; }; @@ -1512,4 +1402,4 @@ export { Validator, ValidatorError }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9iYXRjaC50cyIsICIuLi8uLi9ub2RlL3NyYy9pbmRleC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jb21tb24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvbWludC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9wYXJ0aWFsLXNpZ24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY2FsY3VsYXRlLXR4c2l6ZS50cyIsICIuLi8uLi9nbG9iYWwvc3JjL2luZGV4LnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2Fzc29jaWF0ZWQudHMiLCAiLi4vLi4vYW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AgICAgICAgICBpZiAoIWEuaW5zdHJ1Y3Rpb25zICYmICFhLnNpZ25lcnMpIHtcbiAgICAgICAgICAgIHRocm93IEVycm9yKFxuICAgICAgICAgICAgICBgb25seSBJbnN0cnVjdGlvbiBvYmplY3QgdGhhdCBjYW4gdXNlIGJhdGNoU3VibWl0KCkuXG4gICAgICAgICAgICBJbmRleDogJHtpfSwgU2V0IHZhbHVlOiAke0pTT04uc3RyaW5naWZ5KGEpfWAsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICBpKys7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBpbnN0cnVjdGlvbnMgPSBhcnIuZmxhdE1hcCgoYSkgPT4gYS5pbnN0cnVjdGlvbnMpO1xuICAgICAgICBjb25zdCBzaWduZXJzID0gYXJyLmZsYXRNYXAoKGEpID0+IGEuc2lnbmVycyk7XG4gICAgICAgIGNvbnN0IGZlZVBheWVycyA9IGFyci5maWx0ZXIoKGEpID0+IGEuZmVlUGF5ZXIgIT09IHVuZGVmaW5lZCk7XG4gICAgICAgIGxldCBmZWVQYXllciA9IHNpZ25lcnNbMF07XG4gICAgICAgIGlmIChmZWVQYXllcnMubGVuZ3RoID4gMCAmJiBmZWVQYXllcnNbMF0uZmVlUGF5ZXIpIHtcbiAgICAgICAgICBmZWVQYXllciA9IGZlZVBheWVyc1swXS5mZWVQYXllcjtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHRyYW5zYWN0aW9uID0gbmV3IFRyYW5zYWN0aW9uKCk7XG4gICAgICAgIGxldCBmaW5hbFNpZ25lcnMgPSBzaWduZXJzO1xuICAgICAgICBpZiAoZmVlUGF5ZXIpIHtcbiAgICAgICAgICB0cmFuc2FjdGlvbi5mZWVQYXllciA9IGZlZVBheWVyLnB1YmxpY0tleTtcbiAgICAgICAgICBmaW5hbFNpZ25lcnMgPSBbZmVlUGF5ZXIsIC4uLnNpZ25lcnNdO1xuICAgICAgICB9XG4gICAgICAgIGluc3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gICAgIChhd2FpdCBpbnN0LnN1Ym1pdCgpKS5tYXAoXG4gICAgICAgICAgICAgIGFzeW5jIChvazogc3RyaW5nKSA9PiB7XG4gICAgICAgICAgICAgICAgYXdhaXQgTm9kZS5jb25maXJtZWRTaWcob2spO1xuICAgICAgICAgICAgICAgIHJldHVybiBpbnN0LmRhdGE7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIChlcnI6IEVycm9yKSA9PiB7XG4gICAgICAgICAgICAgICAgZGVidWdMb2coJyMgRXJyb3Igc3VibWl0IHJldHJ5R2V0T3JDcmVhdGU6ICcsIGVycik7XG4gICAgICAgICAgICAgICAgdGhyb3cgZXJyO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICBkZWJ1Z0xvZyhgIyByZXRyeTogJHtjb3VudGVyfSBjcmVhdGUgdG9rZW4gYWNjb3VudDogYCwgZSk7XG4gICAgICAgICAgZGVidWdMb2coYCMgbWludDogJHttaW50fSwgb3duZXI6ICR7b3duZXJ9LCBmZWVQYXllcjogJHtmZWVQYXllcn1gKTtcbiAgICAgICAgfVxuICAgICAgICBhd2FpdCBzbGVlcChSRVRSWV9TTEVFUF9USU1FKTtcbiAgICAgICAgY291bnRlcisrO1xuICAgICAgfVxuICAgICAgdGhyb3cgRXJyb3IoYHJldHJ5IGFjdGlvbiBpcyBvdmVyIGxpbWl0ICR7UkVUUllfT1ZFUl9MSU1JVH1gKTtcbiAgICB9O1xuXG4gICAgLyoqXG4gICAgICogW01haW4gbG9naWNdR2V0IEFzc29jaWF0ZWQgdG9rZW4gQWNjb3VudC5cbiAgICAgKiBpZiBub3QgY3JlYXRlZCwgY3JlYXRlIG5ldyB0b2tlbiBhY2NvdWludFxuICAgICAqXG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG1pbnRcbiAgICAgKiBAcGFyYW0ge1B1YmtleX0gb3duZXJcbi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G1lbnQsXG4gICAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICB0b2tlbkFjY291bnQ6IGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSxcbiAgICAgICAgICBpbnN0OiB1bmRlZmluZWQsXG4gICAgICAgIH07XG4gICAgICB9IGNhdGNoIChlcnJvcjogdW5rbm93bikge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuQWNjb3VudE5vdEZvdW5kRXJyb3IpICYmXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuSW52YWxpZEFjY291bnRPd25lckVycm9yKVxuICAgICAgICApIHtcbiAgICAgICAgICB0aHJvdyBFcnJvcignVW5leHBlY3RlZCBlcnJvcicpO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgcGF5ZXIgPSAhZmVlUGF5ZXIgPyBvd25lciA6IGZlZVBheWVyO1xuXG4gICAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVBc3NvY2lhdGVkVG9rZW5BY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgcGF5ZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdCxcbiAgICAgICAgfTtcbiAgICAgIH1cbiAgICB9O1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YWxDb2xsZWN0aW9uPiA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBudWxsO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4ge1xuICAgICAgICBrZXk6IGlucHV0LnRvUHVibGljS2V5KCksXG4gICAgICAgIHZlcmlmaWVkOiBmYWxzZSxcbiAgICAgIH07XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlciA9IChcbiAgICAgIG91dHB1dDogT3B0aW9uPEludGVybmFsQ29sbGVjdGlvbj4sXG4gICAgKTogQ29sbGVjdGlvblR5cGUgfCB1bmRlZmluZWQgPT4ge1xuICAgICAgaWYgKCFvdXRwdXQpIHtcbiAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIHtcbiAgICAgICAgYWRkcmVzczogb3V0cHV0LmtleS50b1N0cmluZygpLFxuICAgICAgICB2ZXJpZmllZDogb3V0cHV0LnZlcmlmaWVkLFxuICAgICAgfTtcbiAgICB9O1xuICB9XG5cbiAgZXhwb3J0IG5hbWVzcGFjZSBDb2xsZWN0aW9uTWludCB7XG4gICAgZXhwb3J0IGNvbnN0IGludG9Vc2VyID0gKG91dHB1dDogR3JvdXBpbmdbXSk6IFB1YmtleSA9PiB7XG4gICAgICBjb25zdCByZXMgPSBvdXRwdXQuZmluZCgodmFsdWUpID0+IHtcbiAgICAgICAgaWYgKHZhbHVlLmdyb3VwX2tleSA9PT0gJ2NvbGxlY3Rpb24nKSB7XG4gICAgICAgICAgcmV0dXJuIHZhbHVlLmdyb3VwX3ZhbHVlO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIHJldHVybiByZXMgPyByZXMuZ3JvdXBfdmFsdWUgOiAnJztcbiAgICB9O1xuICB9XG59XG4iLCAiLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLXVudXNlZC12YXJzICovXG5pbXBvcnQgeyBDcmVhd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hICYmIG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ25hbWUnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLm5hbWUpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNOYW1lKG1ldGFkYXRhLm5hbWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc3ltYm9sJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5zeW1ib2wpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTeW1ib2wobWV0YWRhdGEuc3ltYm9sKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgICAgIGlmIChyZXMgJiYgcmVzLmlzRXJyKSB7XG4gICAgICAgICAgcmVzdWx0cy5wdXNoKC4uLnJlcy5lcnJvci5kZXRhaWxzKTtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgICBpZiAocmVzdWx0cy5sZW5ndGggPiAwKSB7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPVxuICAgICAgICAgICdDYXVnaHQgaW4gdGhlIHZhbGlkYXRpb24gZXJyb3JzLiBzZWUgaW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0YWRhdGEiLCAiQ29udmVydGVyIiwgIlJveWFsdHkiLCAiQ29udmVydGVyIiwgIk5mdCIsICJDb252ZXJ0ZXIiLCAiTWVtbyIsICJDb252ZXJ0ZXIiLCAiTWludCIsICJDb252ZXJ0ZXIiLCAiUmVndWxhck5mdE1ldGFkYXRhIiwgIkNvbnZlcnRlciIsICJQcm9wZXJ0aWVzIiwgIkNvbnZlcnRlciIsICJVc2VzIiwgIkNvbnZlcnRlciIsICJUb2tlbk1ldGFkYXRhIiwgIkNvbnZlcnRlciIsICJUcmFuc2ZlckNoZWNrZWQiLCAiQ29udmVydGVyIiwgIlRyYW5zZmVyIiwgIkNvbnZlcnRlciIsICJWYWxpZGF0b3IiLCAiTWVzc2FnZSIsICJDb252ZXJ0ZXIiXQp9Cg== \ No newline at end of file +//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9iYXRjaC50cyIsICIuLi8uLi9ub2RlL3NyYy9pbmRleC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jb21tb24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvbWludC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9wYXJ0aWFsLXNpZ24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY2FsY3VsYXRlLXR4c2l6ZS50cyIsICIuLi8uLi9nbG9iYWwvc3JjL2luZGV4LnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2tleXBhaXIudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvcGRhLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXI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gICAgICAgIGNvbnN0IGJsb2NraGFzaE9iaiA9IGF3YWl0IE5vZGUuZ2V0Q29ubmVjdGlvbigpLmdldExhdGVzdEJsb2NraGFzaCgpO1xuICAgICAgICB0cmFuc2FjdGlvbi5sYXN0VmFsaWRCbG9ja0hlaWdodCA9IGJsb2NraGFzaE9iai5sYXN0VmFsaWRCbG9ja0hlaWdodDtcbiAgICAgICAgdHJhbnNhY3Rpb24ucmVjZW50QmxvY2toYXNoID0gYmxvY2toYXNoT2JqLmJsb2NraGFzaDtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHRoaXMuc2lnbmVycztcblxuICAgICAgICBpZiAodGhpcy5mZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gdGhpcy5mZWVQYXllci5wdWJsaWNLZXk7XG4gICAgICAgICAgZmluYWxTaWduZXJzID0gW3RoaXMuZmVlUGF5ZXIsIC4uLnRoaXMuc2lnbmVyc107XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLmluc3RydWN0aW9ucy5mb3JFYWNoKChpbnN0KSA9PiB0cmFuc2FjdGlvbi5hZGQoaW5zdCkpO1xuXG4gICAgICAgIGNvbnN0IG9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IE1BWF9SRVRSSUVTLFxuICAgICAgICB9O1xuXG4gICAgICAgIHJldHVybiBhd2FpdCBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uKFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICBvcHRpb25zLFxuICAgICAgICApO1xuICAgICAgfSk7XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7XG4gIENvbmZpcm1PcHRpb25zLFxuICBLZXlwYWlyLFxuICBzZW5kQW5kQ29uZmlybVRyYW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sIE9wdGlvbiB9IGZyb20gJ34vdHlwZXMvcmVndWxhci1uZnQnO1xuaW1wb3J0IHsgSW50ZXJuYWxDcmVhdG9ycyB9IGZyb20gJ34vdHlwZXMvY29udmVydGVyJztcblxuZXhwb3J0IG5hbWVzcGFjZSBDb252ZXJ0ZXIge1xuICBleHBvcnQgbmFtZXNwYWNlIENyZWF0b3JzIHtcbiAgICBleHBvcnQgY29uc3QgaW50b0luZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IE9wdGlvbjxJbnRlcm5hbENyZWF0b3JzW10+ID0+IHtcbiAgICAgIGlmICghaW5wdXQpIHtcbiAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICB9XG4gICAgICByZXR1cm4gaW5wdXQubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvQ29tcHJlc3NlZE5mdEluZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IEludGVybmFsQ3JlYXRvcnNbXSA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBbXTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBpbnB1dCEubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICA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jhc2lzX3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEuc3ltYm9sKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU3ltYm9sKG1ldGFkYXRhLnN5bWJvbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAocmVzICYmIHJlcy5pc0Vycikge1xuICAgICAgICAgIHJlc3VsdHMucHVzaCguLi5yZXMuZXJyb3IuZGV0YWlscyk7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgICAgaWYgKHJlc3VsdHMubGVuZ3RoID4gMCkge1xuICAgICAgICBjb25zdCBtZXNzYWdlID1cbiAgICAgICAgICAnQ2F1Z2h0IGluIHRoZSB2YWxpZGF0aW9uIGVycm9ycy4gc2VlIGluZm9ybWF0aW9uIGUuZzogZXJyPFZhbGlkYXRvckVycm9yP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kJ1aWxkZXIiLCAiS2V5cGFpciIsICJQdWJsaWNLZXkiLCAiUHVibGljS2V5IiwgIkFjY291bnQiLCAiS2V5cGFpciIsICJQdWJsaWNLZXkiLCAiQWNjb3VudCIsICJQZGEiLCAiQWNjb3VudCIsICJicyIsICJBY2NvdW50IiwgIlB1YmxpY0tleSIsICJLZXlwYWlyIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiUmVzdWx0IiwgIkNvbnZlcnRlciIsICJDb2xsZWN0aW9uIiwgIkNvbGxlY3Rpb25NaW50IiwgIkNvbnZlcnRlciIsICJDcmVhdG9ycyIsICJDb252ZXJ0ZXIiLCAiQ29tcHJlc3NlZE5mdE1ldGFkYXRhIiwgIkNvbnZlcnRlciIsICJSb3lhbHR5IiwgIkNvbnZlcnRlciIsICJOZnQiLCAiQ29udmVydGVyIiwgIk1lbW8iLCAiQ29udmVydGVyIiwgIk1pbnQiLCAiQ29udmVydGVyIiwgIlJlZ3VsYXJOZnRNZXRhZGF0YSIsICJDb252ZXJ0ZXIiLCAiUHJvcGVydGllcyIsICJDb252ZXJ0ZXIiLCAiVXNlcyIsICJDb252ZXJ0ZXIiLCAiVG9rZW5NZXRhZGF0YSIsICJDb252ZXJ0ZXIiLCAiVHJhbnNmZXJDaGVja2VkIiwgIkNvbnZlcnRlciIsICJUcmFuc2ZlciIsICJDb252ZXJ0ZXIiLCAiVmFsaWRhdG9yIiwgIk1lc3NhZ2UiLCAiQ29udmVydGVyIl0KfQo= \ No newline at end of file From a4cc1414439a47a91db1de7a350f51c80613a568 Mon Sep 17 00:00:00 2001 From: fukaoi Date: Sat, 3 Feb 2024 21:58:48 +0900 Subject: [PATCH 12/15] Fix prepublish --- packages/account/dist/index.js | 1287 +--------------- packages/account/dist/index.mjs | 1301 +---------------- packages/account/package.json | 1 - packages/account/src/index.ts | 3 +- packages/converter/dist/index.d.mts | 615 ++++++++ packages/converter/dist/index.d.ts | 615 ++++++++ packages/converter/dist/index.js | 2 +- packages/converter/dist/index.mjs | 2 +- packages/converter/src/collection-details.ts | 20 - packages/das-api/dist/index.js | 2 +- packages/das-api/dist/index.mjs | 2 +- packages/global/dist/index.js | 2 +- packages/global/dist/index.mjs | 2 +- packages/node/dist/index.js | 2 +- packages/node/dist/index.mjs | 2 +- packages/storage/dist/index.d.mts | 60 +- packages/storage/dist/index.d.ts | 60 +- packages/storage/dist/index.js | 2 +- packages/storage/dist/index.mjs | 2 +- packages/suite-airdrop/dist/index.js | 2 +- packages/suite-airdrop/dist/index.mjs | 2 +- packages/suite-airdrop/package.json | 9 +- .../suite-compressed-nft/dist/index.d.mts | 483 ++++++ packages/suite-compressed-nft/dist/index.d.ts | 483 ++++++ packages/suite-compressed-nft/dist/index.js | 2 +- packages/suite-compressed-nft/dist/index.mjs | 2 +- packages/suite-compressed-nft/src/delegate.ts | 1 - packages/suite-memo/dist/index.js | 2 +- packages/suite-memo/dist/index.mjs | 2 +- packages/suite-memo/package.json | 1 - packages/suite-multisig/dist/index.js | 2 +- packages/suite-multisig/dist/index.mjs | 2 +- packages/suite-phantom/dist/index.d.mts | 60 +- packages/suite-phantom/dist/index.mjs | 2 +- packages/suite-regular-nft/dist/index.d.mts | 58 +- packages/suite-regular-nft/dist/index.d.ts | 58 +- packages/suite-regular-nft/dist/index.js | 2 +- packages/suite-regular-nft/dist/index.mjs | 2 +- packages/suite-sol-native/dist/index.js | 2 +- packages/suite-sol-native/dist/index.mjs | 2 +- packages/suite-spl-token/dist/index.d.mts | 58 +- packages/suite-spl-token/dist/index.d.ts | 58 +- packages/suite-spl-token/dist/index.js | 5 +- packages/suite-spl-token/dist/index.mjs | 5 +- .../suite-spl-token/src/gas-less-transfer.ts | 3 +- .../test/gas-less-transfer.test.ts | 1 - ...ts-248b9ab6.d.ts => exports-c05c52f7.d.ts} | 58 +- packages/suite-utils/dist/exports.d.mts | 2 +- packages/suite-utils/dist/exports.d.ts | 2 +- packages/suite-utils/dist/exports.js | 2 +- packages/suite-utils/dist/exports.mjs | 2 +- packages/suite-utils/dist/index.d.mts | 2 +- packages/suite-utils/dist/index.d.ts | 2 +- packages/suite-utils/dist/index.js | 2 +- packages/suite-utils/dist/index.mjs | 2 +- packages/test-tools/dist/index.js | 822 ++++++----- packages/test-tools/dist/index.mjs | 784 +++++----- packages/test-tools/tsconfig.json | 2 +- packages/transaction-builder/dist/index.js | 2 +- packages/transaction-builder/dist/index.mjs | 2 +- packages/transaction-filter/dist/index.js | 2 +- packages/transaction-filter/dist/index.mjs | 2 +- packages/types/dist/account.d.mts | 19 + packages/types/dist/account.d.ts | 19 + packages/types/dist/airdrop.d.mts | 5 + packages/types/dist/airdrop.d.ts | 5 + packages/types/dist/compressed-nft.d.mts | 23 + packages/types/dist/compressed-nft.d.ts | 23 + packages/types/dist/converter.d.mts | 13 + packages/types/dist/converter.d.ts | 13 + packages/types/dist/das-api.d.mts | 76 + packages/types/dist/das-api.d.ts | 76 + packages/types/dist/find.d.mts | 41 + packages/types/dist/find.d.ts | 41 + packages/types/dist/global.d.mts | 32 + packages/types/dist/global.d.ts | 32 + packages/types/dist/history.d.mts | 25 + packages/types/dist/history.d.ts | 25 + packages/types/dist/memo.d.mts | 7 + packages/types/dist/memo.d.ts | 7 + packages/types/dist/mint-08f26d69.d.ts | 55 + packages/types/dist/mint-74b505a0.d.ts | 55 + packages/types/dist/nft.d.mts | 43 + packages/types/dist/nft.d.ts | 43 + packages/types/dist/phantom-e9a40784.d.ts | 16 + packages/types/dist/phantom.d.mts | 9 + packages/types/dist/phantom.d.ts | 9 + packages/types/dist/regular-nft.d.mts | 41 + packages/types/dist/regular-nft.d.ts | 41 + packages/types/dist/sol-native.d.mts | 7 + packages/types/dist/sol-native.d.ts | 7 + packages/types/dist/spl-token.d.mts | 55 + packages/types/dist/spl-token.d.ts | 55 + packages/types/dist/storage.d.mts | 68 + packages/types/dist/storage.d.ts | 68 + packages/types/dist/transaction-builder.d.mts | 237 +++ packages/types/dist/transaction-builder.d.ts | 237 +++ packages/types/dist/transaction-filter.d.mts | 83 ++ packages/types/dist/transaction-filter.d.ts | 83 ++ packages/types/dist/utils.d.mts | 18 + packages/types/dist/utils.d.ts | 18 + packages/types/dist/validator.d.mts | 13 + packages/types/dist/validator.d.ts | 13 + packages/validator/dist/index.js | 2 +- packages/validator/dist/index.mjs | 2 +- pnpm-lock.yaml | 26 +- turbo.json | 2 +- 107 files changed, 5206 insertions(+), 3563 deletions(-) create mode 100644 packages/converter/dist/index.d.mts create mode 100644 packages/converter/dist/index.d.ts delete mode 100644 packages/converter/src/collection-details.ts create mode 100644 packages/suite-compressed-nft/dist/index.d.mts create mode 100644 packages/suite-compressed-nft/dist/index.d.ts rename packages/suite-utils/dist/{exports-248b9ab6.d.ts => exports-c05c52f7.d.ts} (100%) create mode 100644 packages/types/dist/account.d.mts create mode 100644 packages/types/dist/account.d.ts create mode 100644 packages/types/dist/airdrop.d.mts create mode 100644 packages/types/dist/airdrop.d.ts create mode 100644 packages/types/dist/compressed-nft.d.mts create mode 100644 packages/types/dist/compressed-nft.d.ts create mode 100644 packages/types/dist/converter.d.mts create mode 100644 packages/types/dist/converter.d.ts create mode 100644 packages/types/dist/das-api.d.mts create mode 100644 packages/types/dist/das-api.d.ts create mode 100644 packages/types/dist/find.d.mts create mode 100644 packages/types/dist/find.d.ts create mode 100644 packages/types/dist/global.d.mts create mode 100644 packages/types/dist/global.d.ts create mode 100644 packages/types/dist/history.d.mts create mode 100644 packages/types/dist/history.d.ts create mode 100644 packages/types/dist/memo.d.mts create mode 100644 packages/types/dist/memo.d.ts create mode 100644 packages/types/dist/mint-08f26d69.d.ts create mode 100644 packages/types/dist/mint-74b505a0.d.ts create mode 100644 packages/types/dist/nft.d.mts create mode 100644 packages/types/dist/nft.d.ts create mode 100644 packages/types/dist/phantom-e9a40784.d.ts create mode 100644 packages/types/dist/phantom.d.mts create mode 100644 packages/types/dist/phantom.d.ts create mode 100644 packages/types/dist/regular-nft.d.mts create mode 100644 packages/types/dist/regular-nft.d.ts create mode 100644 packages/types/dist/sol-native.d.mts create mode 100644 packages/types/dist/sol-native.d.ts create mode 100644 packages/types/dist/spl-token.d.mts create mode 100644 packages/types/dist/spl-token.d.ts create mode 100644 packages/types/dist/storage.d.mts create mode 100644 packages/types/dist/storage.d.ts create mode 100644 packages/types/dist/transaction-builder.d.mts create mode 100644 packages/types/dist/transaction-builder.d.ts create mode 100644 packages/types/dist/transaction-filter.d.mts create mode 100644 packages/types/dist/transaction-filter.d.ts create mode 100644 packages/types/dist/utils.d.mts create mode 100644 packages/types/dist/utils.d.ts create mode 100644 packages/types/dist/validator.d.mts create mode 100644 packages/types/dist/validator.d.ts diff --git a/packages/account/dist/index.js b/packages/account/dist/index.js index 3b427126d..9b457e026 100644 --- a/packages/account/dist/index.js +++ b/packages/account/dist/index.js @@ -39,7 +39,7 @@ var import_web3 = require("@solana/web3.js"); var import_bs58 = __toESM(require("bs58")); var Account; ((Account4) => { - class Keypair4 { + class Keypair { secret; pubkey; constructor(params) { @@ -62,19 +62,19 @@ var Account; static isSecret = (value) => /^[0-9a-zA-Z]{87,88}$/.test(value); static create = () => { const keypair = import_web3.Keypair.generate(); - return new Keypair4({ + return new Keypair({ pubkey: keypair.publicKey.toString(), secret: import_bs58.default.encode(keypair.secretKey) }); }; static toKeyPair = (keypair) => { - return new Keypair4({ + return new Keypair({ pubkey: keypair.publicKey.toString(), secret: import_bs58.default.encode(keypair.secretKey) }); }; } - Account4.Keypair = Keypair4; + Account4.Keypair = Keypair; })(Account || (Account = {})); // src/pda.ts @@ -138,1283 +138,6 @@ var Account2; })(Pda = Account4.Pda || (Account4.Pda = {})); })(Account2 || (Account2 = {})); -// ../global/src/index.ts -var import_web39 = require("@solana/web3.js"); - -// ../suite-utils/src/constants.ts -var import_web33 = require("@solana/web3.js"); -var import_load = __toESM(require("@solana-suite/config/load")); -var Config = import_load.default; -var Constants; -((Constants2) => { - let WarnningMessage; - ((WarnningMessage2) => { - const THRESHHOLD = 50; - let isDisplay = false; - WarnningMessage2.NFT_STORAGE_API_KEY = ` - [YOU HAVE TO DO] - -------------------------------------- - You need to update nftStorageApiKey define parameter in solana-suite.json. - Can get api key from https://nft.storage/ - -------------------------------------- - `; - WarnningMessage2.DAS_API_URL = ` - [YOU HAVE TO DO] - -------------------------------------- - You need to update dasApiUrl define parameter in solana-suite.json. - can get api url from https://www.helius.dev/ - -------------------------------------- - `; - WarnningMessage2.ANNOUNCE = ` - [DEPRECATED] - -------------------------------------- - Account, Node, toExplorer, Pubkey, Secret have been moved to - @solana-suite/utils - ------------------------------------- - `; - WarnningMessage2.calculateProbability = () => { - const randomValue = Math.random(); - const probability = 1 / THRESHHOLD; - if (!isDisplay && randomValue < probability) { - isDisplay = true; - return true; - } - return false; - }; - })(WarnningMessage = Constants2.WarnningMessage || (Constants2.WarnningMessage = {})); -})(Constants || (Constants = {})); -((Constants2) => { - Constants2.currentCluster = Config.cluster.type; - Constants2.customClusterUrl = Config.cluster.customClusterUrl; - Constants2.isDebugging = Config.debugging; - Constants2.nftStorageApiKey = Config.nftStorageApiKey; - Constants2.dasApiUrl = Config.dasApiUrl; - let Cluster; - ((Cluster2) => { - Cluster2["prd"] = "mainnet-beta"; - Cluster2["prdMetaplex"] = "mainnet-beta-metaplex"; - Cluster2["dev"] = "devnet"; - Cluster2["test"] = "testnet"; - Cluster2["localhost"] = "localhost-devnet"; - })(Cluster = Constants2.Cluster || (Constants2.Cluster = {})); - let EndPointUrl; - ((EndPointUrl2) => { - EndPointUrl2["prd"] = "https://api.mainnet-beta.solana.com"; - EndPointUrl2["prdMetaplex"] = "https://api.metaplex.solana.com"; - EndPointUrl2["dev"] = "https://api.devnet.solana.com"; - EndPointUrl2["test"] = "https://api.testnet.solana.com"; - EndPointUrl2["localhost"] = "http://api.devnet.solana.com"; - })(EndPointUrl = Constants2.EndPointUrl || (Constants2.EndPointUrl = {})); - let BundlrUrl; - ((BundlrUrl2) => { - BundlrUrl2["prd"] = "https://node1.irys.xyz,https://node2.irys.xyz"; - BundlrUrl2["dev"] = "https://devnet.irys.xyz"; - })(BundlrUrl = Constants2.BundlrUrl || (Constants2.BundlrUrl = {})); - let DasApiUrl; - ((DasApiUrl2) => { - DasApiUrl2["dev"] = "https://devnet.helius-rpc.com/?api-key=15319bf4-5b40-4958-ac8d-6313aa55eb92,https://rpc-devnet.helius.xyz?api-key=9f70a843-3274-4ffd-a0a9-323f8b7c0639"; - })(DasApiUrl = Constants2.DasApiUrl || (Constants2.DasApiUrl = {})); - let NftstorageApiKey; - ((NftstorageApiKey2) => { - NftstorageApiKey2["dev"] = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJkaWQ6ZXRocjoweERGMjcyN2VkODZhRGU1RTMyZDZDZEJlODc0YzRFNDlEODY1OWZmOEMiLCJpc3MiOiJuZnQtc3RvcmFnZSIsImlhdCI6MTYyMDI2NDk0MzcwNiwibmFtZSI6ImRlbW8ifQ.d4J70mikxRB8a5vwNu6SO5HDA8JaueuseAj7Q_ytMCE"; - })(NftstorageApiKey = Constants2.NftstorageApiKey || (Constants2.NftstorageApiKey = {})); - Constants2.loadConfig = async () => { - Config = await import("@solana-suite/config/load"); - }; - Constants2.switchCluster = (param) => { - const { cluster: env, customClusterUrl: customClusterUrl2 } = param; - if (customClusterUrl2 && customClusterUrl2.length > 0) { - const index = Date.now() % customClusterUrl2.length; - return customClusterUrl2[index]; - } - switch (env) { - case "mainnet-beta" /* prd */: - return "https://api.mainnet-beta.solana.com" /* prd */; - case "mainnet-beta-metaplex" /* prdMetaplex */: - return "https://api.metaplex.solana.com" /* prdMetaplex */; - case "testnet" /* test */: - return "https://api.testnet.solana.com" /* test */; - case "devnet" /* dev */: - return "https://api.devnet.solana.com" /* dev */; - default: - return "http://api.devnet.solana.com" /* localhost */; - } - }; - Constants2.switchBundlr = (env) => { - switch (env) { - case "mainnet-beta" /* prd */: { - const urls = "https://node1.irys.xyz,https://node2.irys.xyz" /* prd */.split(","); - const index = Date.now() % urls.length; - return urls[index]; - } - default: { - return "https://devnet.irys.xyz" /* dev */; - } - } - }; - Constants2.switchDasApi = (env) => { - switch (env) { - case "mainnet-beta" /* prd */: { - if (Constants2.dasApiUrl.length < 1) { - throw Error(Constants2.WarnningMessage.DAS_API_URL); - } - const urls = "https://node1.irys.xyz,https://node2.irys.xyz" /* prd */.split(","); - const index = Date.now() % urls.length; - return urls[index]; - } - default: { - const urls = "https://devnet.helius-rpc.com/?api-key=15319bf4-5b40-4958-ac8d-6313aa55eb92,https://rpc-devnet.helius.xyz?api-key=9f70a843-3274-4ffd-a0a9-323f8b7c0639" /* dev */.split(","); - const index = Date.now() % urls.length; - return urls[index]; - } - } - }; - Constants2.switchNftStorage = (env) => { - switch (env) { - case "mainnet-beta" /* prd */: - if (!Constants2.nftStorageApiKey) { - throw Error(Constants2.WarnningMessage.NFT_STORAGE_API_KEY); - } - return Constants2.nftStorageApiKey; - default: { - return "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJkaWQ6ZXRocjoweERGMjcyN2VkODZhRGU1RTMyZDZDZEJlODc0YzRFNDlEODY1OWZmOEMiLCJpc3MiOiJuZnQtc3RvcmFnZSIsImlhdCI6MTYyMDI2NDk0MzcwNiwibmFtZSI6ImRlbW8ifQ.d4J70mikxRB8a5vwNu6SO5HDA8JaueuseAj7Q_ytMCE" /* dev */; - } - } - }; - Constants2.WRAPPED_TOKEN_PROGRAM_ID = new import_web33.PublicKey( - "So11111111111111111111111111111111111111112" - ); - Constants2.MEMO_PROGRAM_ID = new import_web33.PublicKey( - "Memo1UhkJRfHyvLMcVucJwxXeuD728EqVDDwQDxFMNo" - ); - Constants2.METAPLEX_PROGRAM_ID = new import_web33.PublicKey( - "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s" - ); - Constants2.COMMITMENT = "confirmed"; - Constants2.NFT_STORAGE_GATEWAY_URL = "https://ipfs.io/ipfs"; - Constants2.IRYS_GATEWAY_URL = "https://gateway.irys.xyz"; - Constants2.BUNDLR_NETWORK_URL = (0, Constants2.switchBundlr)(Config.cluster.type); - Constants2.DAS_API_URL = (0, Constants2.switchDasApi)(Config.cluster.type); - Constants2.NFT_STORAGE_API_KEY = (0, Constants2.switchNftStorage)(Config.cluster.type); - Constants2.EXPLORER_SOLSCAN_URL = "https://solscan.io"; - Constants2.EXPLORER_SOLANAFM_URL = "https://solana.fm"; - Constants2.EXPLORER_XRAY_URL = "https://xray.helius.xyz"; -})(Constants || (Constants = {})); -console.log(Constants.WarnningMessage.ANNOUNCE); - -// ../transaction-builder/src/batch.ts -var import_web35 = require("@solana/web3.js"); - -// ../transaction-builder/src/common.ts -var import_web34 = require("@solana/web3.js"); -var MAX_RETRIES = 3; -var TransactionBuilder; -((TransactionBuilder7) => { - class Common2 { - static MAX_TRANSACTION_SIZE = 1232; - instructions; - signers; - feePayer; - data; - constructor(instructions, signers, feePayer, data) { - this.instructions = instructions; - this.signers = signers; - this.feePayer = feePayer; - this.data = data; - } - submit = async () => { - return Try(async () => { - if (!(this instanceof Common2)) { - throw Error("only Instruction object that can use this"); - } - const transaction = new import_web34.Transaction(); - const blockhashObj = await Node.getConnection().getLatestBlockhash(); - transaction.lastValidBlockHeight = blockhashObj.lastValidBlockHeight; - transaction.recentBlockhash = blockhashObj.blockhash; - let finalSigners = this.signers; - if (this.feePayer) { - transaction.feePayer = this.feePayer.publicKey; - finalSigners = [this.feePayer, ...this.signers]; - } - this.instructions.forEach((inst) => transaction.add(inst)); - const options = { - maxRetries: MAX_RETRIES - }; - return await (0, import_web34.sendAndConfirmTransaction)( - Node.getConnection(), - transaction, - finalSigners, - options - ); - }); - }; - } - TransactionBuilder7.Common = Common2; -})(TransactionBuilder || (TransactionBuilder = {})); - -// ../transaction-builder/src/batch.ts -var TransactionBuilder2; -((TransactionBuilder7) => { - class Batch { - submit = async (arr) => { - return Try(async () => { - let i = 0; - for (const a of arr) { - if (!a.instructions && !a.signers) { - throw Error( - `only Instruction object that can use batchSubmit(). - Index: ${i}, Set value: ${JSON.stringify(a)}` - ); - } - i++; - } - const instructions = arr.flatMap((a) => a.instructions); - const signers = arr.flatMap((a) => a.signers); - const feePayers = arr.filter((a) => a.feePayer !== void 0); - let feePayer = signers[0]; - if (feePayers.length > 0 && feePayers[0].feePayer) { - feePayer = feePayers[0].feePayer; - } - const transaction = new import_web35.Transaction(); - let finalSigners = signers; - if (feePayer) { - transaction.feePayer = feePayer.publicKey; - finalSigners = [feePayer, ...signers]; - } - instructions.map((inst) => transaction.add(inst)); - const options = { - maxRetries: MAX_RETRIES - }; - return await (0, import_web35.sendAndConfirmTransaction)( - Node.getConnection(), - transaction, - finalSigners, - options - ); - }); - }; - } - TransactionBuilder7.Batch = Batch; -})(TransactionBuilder2 || (TransactionBuilder2 = {})); - -// ../transaction-builder/src/mint.ts -var import_web36 = require("@solana/web3.js"); -var TransactionBuilder3; -((TransactionBuilder7) => { - class Mint { - instructions; - signers; - feePayer; - data; - constructor(instructions, signers, feePayer, data) { - this.instructions = instructions; - this.signers = signers; - this.data = data; - this.feePayer = feePayer; - } - submit = async () => { - return Try(async () => { - if (!(this instanceof Mint)) { - throw Error("only MintInstruction object that can use this"); - } - const transaction = new import_web36.Transaction(); - const blockhashObj = await Node.getConnection().getLatestBlockhash(); - transaction.lastValidBlockHeight = blockhashObj.lastValidBlockHeight; - transaction.recentBlockhash = blockhashObj.blockhash; - let finalSigners = this.signers; - if (this.feePayer) { - transaction.feePayer = this.feePayer.publicKey; - finalSigners = [this.feePayer, ...this.signers]; - } - this.instructions.forEach((inst) => transaction.add(inst)); - const options = { - maxRetries: MAX_RETRIES - }; - if (Node.getConnection().rpcEndpoint === Constants.EndPointUrl.prd) { - debugLog("# Change metaplex cluster on mainnet-beta"); - Node.changeConnection({ cluster: Constants.Cluster.prdMetaplex }); - } - return await (0, import_web36.sendAndConfirmTransaction)( - Node.getConnection(), - transaction, - finalSigners, - options - ); - }); - }; - } - TransactionBuilder7.Mint = Mint; -})(TransactionBuilder3 || (TransactionBuilder3 = {})); - -// ../transaction-builder/src/partial-sign.ts -var import_web37 = require("@solana/web3.js"); -var TransactionBuilder4; -((TransactionBuilder7) => { - class PartialSign { - hexInstruction; - data; - canSubmit; - constructor(instructions, mint, canSubmit = false) { - this.hexInstruction = instructions; - this.data = mint; - this.canSubmit = canSubmit; - } - submit = async (feePayer) => { - return Try(async () => { - if (!(this instanceof PartialSign)) { - throw Error("only PartialSignInstruction object that can use this"); - } - const decode = Buffer.from(this.hexInstruction, "hex"); - const transactionFromJson = import_web37.Transaction.from(decode); - transactionFromJson.partialSign(feePayer.toKeypair()); - const options = { - maxRetries: MAX_RETRIES - }; - const wireTransaction = transactionFromJson.serialize(); - return await Node.getConnection().sendRawTransaction( - wireTransaction, - options - ); - }); - }; - } - TransactionBuilder7.PartialSign = PartialSign; -})(TransactionBuilder4 || (TransactionBuilder4 = {})); - -// ../transaction-builder/src/calculate-txsize.ts -var TransactionBuilder5; -((TransactionBuilder7) => { - const LOW_VALUE = 127; - const HIGH_VALUE = 16383; - const MAX_TRANSACTION_SIZE = 1232; - const compactHeader = (n) => n <= LOW_VALUE ? 1 : n <= HIGH_VALUE ? 2 : 3; - const compactArraySize = (n, size) => compactHeader(n) + n * size; - TransactionBuilder7.calculateTxSize = (transaction, feePayer) => { - const feePayerPk = [feePayer.toBase58()]; - const signers = new Set(feePayerPk); - const accounts = new Set(feePayerPk); - const ixsSize = transaction.instructions.reduce((acc, ix) => { - ix.keys.forEach(({ pubkey, isSigner }) => { - const pk = pubkey.toBase58(); - if (isSigner) - signers.add(pk); - accounts.add(pk); - }); - accounts.add(ix.programId.toBase58()); - const nIndexes = ix.keys.length; - const opaqueData = ix.data.length; - return acc + 1 + // PID index - compactArraySize(nIndexes, 1) + compactArraySize(opaqueData, 1); - }, 0); - return compactArraySize(signers.size, 64) + // signatures - 3 + // header - compactArraySize(accounts.size, 32) + // accounts - 32 + // blockhash - compactHeader(transaction.instructions.length) + // instructions - ixsSize; - }; - TransactionBuilder7.isOverTransactionSize = (transaction, feePayer) => { - return (0, TransactionBuilder7.calculateTxSize)(transaction, feePayer) > MAX_TRANSACTION_SIZE; - }; -})(TransactionBuilder5 || (TransactionBuilder5 = {})); - -// ../transaction-builder/src/index.ts -var TransactionBuilder6 = { - ...TransactionBuilder2, - ...TransactionBuilder5, - ...TransactionBuilder3, - ...TransactionBuilder, - ...TransactionBuilder4 -}; - -// ../suite-utils/src/shared.ts -var overwriteObject = (object, targets) => { - const that = object; - targets.forEach((target) => { - delete that[target.existsKey]; - that[target.will.key] = target.will.value; - }); - return that; -}; -var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { - if (Constants.isDebugging === "true" || process.env.DEBUG === "true") { - console.log("[DEBUG]", data1, data2, data3, data4); - } -}; -var isPromise = (obj) => { - return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; -}; -function Try(input, finallyInput) { - try { - const v = input(); - if (isPromise(v)) { - return v.then( - (x) => Result5.ok(x), - (err) => Result5.err(err) - ); - } else { - return Result5.ok(v); - } - } catch (e) { - if (e instanceof Error) { - return Result5.err(e); - } - return Result5.err(Error(e)); - } finally { - if (finallyInput) { - debugLog("# finally input:", finallyInput); - finallyInput(); - } - } -} -var convertTimestampToDateTime = (created_at) => { - if (created_at) { - return new Date(created_at * 1e3); - } - return; -}; - -// ../suite-utils/src/result.ts -var AbstractResult = class { - unwrap(ok, err) { - const r = this._chain( - (value) => Result5.ok(ok ? ok(value) : value), - (error) => err ? Result5.ok(err(error)) : Result5.err(error) - ); - if (r.isErr) { - throw r.error; - } - return r.value; - } - map(ok, err) { - return this._chain( - (value) => Result5.ok(ok(value)), - (error) => Result5.err(err ? err(error) : error) - ); - } - chain(ok, err) { - return this._chain(ok, err || ((error) => Result5.err(error))); - } - match(ok, err) { - this._chain( - (value) => Result5.ok(ok(value)), - (error) => Result5.err(err(error)) - ); - } - /// single TransactionBuilder //// - /* eslint-disable @typescript-eslint/no-explicit-any */ - async submit(feePayer) { - const res = this.map( - async (ok) => { - debugLog("# result single submit: ", ok); - if (feePayer) { - const obj = ok; - return await obj.submit(feePayer); - } else { - const obj = ok; - return await obj.submit(); - } - }, - (err) => { - return err; - } - ); - if (res.isErr) { - return Result5.err(res.error); - } - return res.value; - } -}; -Array.prototype.submit = async function(feePayer) { - if (feePayer) { - let i = 1; - for await (const obj of this) { - if (obj.isErr) { - return obj; - } else if (obj.value.canSubmit) { - debugLog("# Result batch canSubmit"); - const sig = await obj.submit(feePayer); - if (sig.isErr) { - return sig; - } - await Node.confirmedSig(sig.value); - } else { - debugLog("# Result batch other than canSubmit"); - if (this.length == i) { - return obj.submit(feePayer); - } - obj.submit(feePayer); - } - i++; - } - } else { - const instructions = []; - for (const obj of this) { - if (obj.isErr) { - return obj; - } else if (obj.isOk) { - instructions.push(obj.value); - } else { - return Result5.err(Error("Only Array Instruction object")); - } - } - debugLog("# Result batch submit: ", instructions); - return new TransactionBuilder6.Batch().submit(instructions); - } -}; -var InternalOk = class extends AbstractResult { - constructor(value) { - super(); - this.value = value; - } - isOk = true; - isErr = false; - /* eslint-disable @typescript-eslint/no-unused-vars */ - _chain(ok, _err) { - return ok(this.value); - } -}; -var InternalErr = class extends AbstractResult { - constructor(error) { - super(); - this.error = error; - } - isOk = false; - isErr = true; - _chain(_ok, err) { - return err(this.error); - } -}; -var Result5; -((Result8) => { - function ok(value) { - return new InternalOk(value); - } - Result8.ok = ok; - function err(error) { - return new InternalErr(error || Error()); - } - Result8.err = err; - function all(obj) { - if (Array.isArray(obj)) { - const resArr = []; - for (const item of obj) { - if (item.isErr) { - return item; - } - resArr.push(item.value); - } - return Result8.ok(resArr); - } - const res = {}; - const keys = Object.keys(obj); - for (const key of keys) { - const item = obj[key]; - if (item.isErr) { - return item; - } - res[key] = item.value; - } - return Result8.ok(res); - } - Result8.all = all; -})(Result5 || (Result5 = {})); - -// ../converter/src/collection.ts -var Converter; -((Converter15) => { - let Collection; - ((Collection2) => { - Collection2.intoInfra = (input) => { - if (!input) { - return null; - } - return { - key: input.toPublicKey(), - verified: false - }; - }; - Collection2.intoUser = (output) => { - if (!output) { - return void 0; - } - return { - address: output.key.toString(), - verified: output.verified - }; - }; - })(Collection = Converter15.Collection || (Converter15.Collection = {})); - let CollectionMint; - ((CollectionMint2) => { - CollectionMint2.intoUser = (output) => { - const res = output.find((value) => { - if (value.group_key === "collection") { - return value.group_value; - } - }); - return res ? res.group_value : ""; - }; - })(CollectionMint = Converter15.CollectionMint || (Converter15.CollectionMint = {})); -})(Converter || (Converter = {})); - -// ../converter/src/creators.ts -var Converter2; -((Converter15) => { - let Creators; - ((Creators2) => { - Creators2.intoInfra = (input) => { - if (!input) { - return null; - } - return input.map((data) => { - return { - address: data.address.toPublicKey(), - share: data.share, - verified: false - }; - }); - }; - Creators2.intoCompressedNftInfra = (input) => { - if (!input) { - return []; - } - return input.map((data) => { - return { - address: data.address.toPublicKey(), - share: data.share, - verified: false - }; - }); - }; - Creators2.intoUser = (output) => { - if (!output) { - return void 0; - } - return output.map((data) => { - return { - address: data.address.toString(), - share: data.share, - verified: data.verified - }; - }); - }; - })(Creators = Converter15.Creators || (Converter15.Creators = {})); -})(Converter2 || (Converter2 = {})); - -// ../converter/src/compressed-nft-metadata.ts -var import_mpl_bubblegum_instruction = require("mpl-bubblegum-instruction"); -var Converter3; -((Converter15) => { - let CompressedNftMetadata; - ((CompressedNftMetadata2) => { - CompressedNftMetadata2.intoInfra = (input, uri, sellerFeeBasisPoints) => { - return { - name: input.name, - symbol: input.symbol, - uri, - sellerFeeBasisPoints, - creators: Converter2.Creators.intoCompressedNftInfra(input.creators), - collection: Converter.Collection.intoInfra(input.collection), - uses: input.uses || null, - primarySaleHappened: false, - isMutable: input.isMutable ?? false, - editionNonce: 0, - tokenStandard: import_mpl_bubblegum_instruction.TokenStandard.NonFungible, - tokenProgramVersion: import_mpl_bubblegum_instruction.TokenProgramVersion.Original - }; - }; - })(CompressedNftMetadata = Converter15.CompressedNftMetadata || (Converter15.CompressedNftMetadata = {})); -})(Converter3 || (Converter3 = {})); - -// ../converter/src/royalty.ts -var Converter4; -((Converter15) => { - let Royalty; - ((Royalty2) => { - Royalty2.THRESHOLD = 100; - Royalty2.intoInfra = (percentage) => { - return percentage * Royalty2.THRESHOLD; - }; - Royalty2.intoUser = (percentage) => { - return percentage * Royalty2.THRESHOLD; - }; - })(Royalty = Converter15.Royalty || (Converter15.Royalty = {})); -})(Converter4 || (Converter4 = {})); - -// ../converter/src/nft.ts -var Converter5; -((Converter15) => { - let Nft; - ((Nft2) => { - Nft2.intoUser = (output) => { - return { - mint: output.onchain.id.toString(), - collectionMint: Converter.CollectionMint.intoUser( - output.onchain.grouping - ), - authorities: output.onchain.authorities, - royalty: Converter4.Royalty.intoUser(output.onchain.royalty.percent), - name: output.onchain.content.metadata.name, - symbol: output.onchain.content.metadata.symbol, - uri: output.onchain.content.json_uri, - creators: Converter2.Creators.intoUser(output.onchain.creators), - treeAddress: output.onchain.compression.tree, - isCompressed: output.onchain.compression.compressed, - isMutable: output.onchain.mutable, - isBurn: output.onchain.burnt, - editionNonce: output.onchain.supply.edition_nonce, - primarySaleHappened: output.onchain.royalty.primary_sale_happened, - dateTime: convertTimestampToDateTime(output.offchain.created_at), - offchain: output.offchain - }; - }; - })(Nft = Converter15.Nft || (Converter15.Nft = {})); -})(Converter5 || (Converter5 = {})); - -// ../converter/src/memo.ts -var Converter6; -((Converter15) => { - let Memo; - ((Memo2) => { - Memo2.intoUserSide = (output, meta, outputTransfer, mappingTokenAccount) => { - const history = {}; - if (outputTransfer && outputTransfer.program !== "") { - if (mappingTokenAccount && outputTransfer.program === "spl-token") { - const foundSource = mappingTokenAccount.find( - (m) => m.account === outputTransfer.parsed.info.source - ); - const foundDest = mappingTokenAccount.find( - (m) => m.account === outputTransfer.parsed.info.destination - ); - history.mint = outputTransfer.parsed.info.mint; - foundSource && (history.source = foundSource.owner); - foundDest && (history.destination = foundDest.owner); - } else { - history.source = outputTransfer.parsed.info.source; - history.destination = outputTransfer.parsed.info.destination; - } - } - history.memo = output.parsed; - history.type = output.program; - history.dateTime = convertTimestampToDateTime(meta.blockTime); - history.sig = meta.transaction.signatures[0]; - history.innerInstruction = false; - if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { - history.innerInstruction = true; - } - return history; - }; - })(Memo = Converter15.Memo || (Converter15.Memo = {})); -})(Converter6 || (Converter6 = {})); - -// ../converter/src/mint.ts -var Converter7; -((Converter15) => { - let Mint; - ((Mint2) => { - Mint2.intoUserSide = (output, meta) => { - const history = {}; - history.mint = output.parsed.info.mint; - history.mintAuthority = output.parsed.info.mintAuthority; - history.tokenAmount = output.parsed.info.tokenAmount; - history.account = output.parsed.info.account; - history.type = output.program; - history.dateTime = convertTimestampToDateTime(meta.blockTime); - history.sig = meta.transaction.signatures[0]; - history.innerInstruction = false; - if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { - history.innerInstruction = true; - } - return history; - }; - })(Mint = Converter15.Mint || (Converter15.Mint = {})); -})(Converter7 || (Converter7 = {})); - -// ../converter/src/regular-nft-metadata.ts -var Converter8; -((Converter15) => { - let RegularNftMetadata; - ((RegularNftMetadata2) => { - RegularNftMetadata2.intoInfra = (input, uri, sellerFeeBasisPoints) => { - return { - name: input.name, - symbol: input.symbol, - uri, - sellerFeeBasisPoints, - creators: Converter2.Creators.intoInfra(input.creators), - collection: Converter.Collection.intoInfra(input.collection), - uses: input.uses || null - }; - }; - })(RegularNftMetadata = Converter15.RegularNftMetadata || (Converter15.RegularNftMetadata = {})); -})(Converter8 || (Converter8 = {})); - -// ../converter/src/properties.ts -var Converter9; -((Converter15) => { - let Properties; - ((Properties2) => { - Properties2.intoInfra = async (input, callbackFunc, storageType, feePayer) => { - if (!input || !input.files) { - return {}; - } - const files = await Promise.all( - input.files.map(async (file) => { - if (!file.filePath) { - return {}; - } - const res = await callbackFunc(file.filePath, storageType, feePayer); - if (res.isErr) { - throw Error(res.error.message); - } - return overwriteObject(file, [ - { - existsKey: "filePath", - will: { key: "uri", value: res.value } - } - ]); - }) - ); - return { ...input, files }; - }; - })(Properties = Converter15.Properties || (Converter15.Properties = {})); -})(Converter9 || (Converter9 = {})); - -// ../converter/src/uses.ts -var Converter10; -((Converter15) => { - let Uses; - ((Uses2) => { - Uses2.intoUserSide = (output) => { - if (!output) { - return void 0; - } - return output; - }; - })(Uses = Converter15.Uses || (Converter15.Uses = {})); -})(Converter10 || (Converter10 = {})); - -// ../converter/src/token-metadata.ts -var Converter11; -((Converter15) => { - let TokenMetadata; - ((TokenMetadata2) => { - TokenMetadata2.intoInfra = (input, uri, sellerFeeBasisPoints) => { - return { - name: input.name, - symbol: input.symbol, - uri, - sellerFeeBasisPoints, - creators: Converter2.Creators.intoInfra(input.creators), - collection: null, - uses: input.uses || null - }; - }; - TokenMetadata2.intoUser = (output, tokenAmount) => { - return { - mint: output.onchain.mint.toString(), - royalty: output.onchain.data.sellerFeeBasisPoints, - name: (0, TokenMetadata2.deleteNullStrings)(output.onchain.data.name), - symbol: (0, TokenMetadata2.deleteNullStrings)(output.onchain.data.symbol), - tokenAmount, - uri: (0, TokenMetadata2.deleteNullStrings)(output.onchain.data.uri), - creators: Converter2.Creators.intoUser(output.onchain.data.creators), - uses: Converter10.Uses.intoUserSide(output.onchain.uses), - dateTime: convertTimestampToDateTime(output.offchain.created_at), - offchain: output.offchain - }; - }; - TokenMetadata2.deleteNullStrings = (str) => { - return str.replace(/\0/g, ""); - }; - })(TokenMetadata = Converter15.TokenMetadata || (Converter15.TokenMetadata = {})); -})(Converter11 || (Converter11 = {})); - -// ../converter/src/transfer-checked.ts -var Converter12; -((Converter15) => { - let TransferChecked; - ((TransferChecked2) => { - TransferChecked2.intoUserSide = (output, meta, mappingTokenAccount) => { - const history = {}; - if (mappingTokenAccount) { - const foundSource = mappingTokenAccount.find( - (m) => m.account === output.parsed.info.source - ); - const foundDest = mappingTokenAccount.find( - (m) => m.account === output.parsed.info.destination - ); - foundSource && (history.source = foundSource.owner); - foundDest && (history.destination = foundDest.owner); - } - history.tokenAmount = output.parsed.info.tokenAmount; - history.mint = output.parsed.info.mint; - history.multisigAuthority = output.parsed.info.multisigAuthority; - history.signers = output.parsed.info.signers; - history.type = output.program; - history.dateTime = convertTimestampToDateTime(meta.blockTime); - history.sig = meta.transaction.signatures[0]; - history.innerInstruction = false; - if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { - history.innerInstruction = true; - } - return history; - }; - })(TransferChecked = Converter15.TransferChecked || (Converter15.TransferChecked = {})); -})(Converter12 || (Converter12 = {})); - -// ../converter/src/transfer.ts -var Converter13; -((Converter15) => { - let Transfer; - ((Transfer2) => { - Transfer2.intoUserSide = (output, meta) => { - const history = {}; - if (!output.parsed.info.destination || !output.parsed.info.lamports) { - return; - } - history.source = output.parsed.info.source; - history.destination = output.parsed.info.destination; - history.sol = output.parsed.info.lamports?.toSol().toString(); - history.type = output.program; - history.dateTime = convertTimestampToDateTime(meta.blockTime); - history.sig = meta.transaction.signatures[0]; - history.innerInstruction = false; - if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { - history.innerInstruction = true; - } - return history; - }; - })(Transfer = Converter15.Transfer || (Converter15.Transfer = {})); -})(Converter13 || (Converter13 = {})); - -// ../converter/src/index.ts -var Converter14 = { - ...Converter3, - ...Converter, - ...Converter2, - ...Converter5, - ...Converter6, - ...Converter7, - ...Converter8, - ...Converter9, - ...Converter4, - ...Converter11, - ...Converter12, - ...Converter13, - ...Converter10 -}; - -// ../validator/src/index.ts -var Validator; -((Validator2) => { - let Message; - ((Message2) => { - Message2.SUCCESS = "success"; - Message2.SMALL_NUMBER = "too small"; - Message2.BIG_NUMBER = "too big"; - Message2.LONG_LENGTH = "too long"; - Message2.EMPTY = "invalid empty value"; - Message2.INVALID_URL = "invalid url"; - Message2.ONLY_NODE_JS = "`string` type is only Node.js"; - })(Message = Validator2.Message || (Validator2.Message = {})); - Validator2.NAME_LENGTH = 32; - Validator2.SYMBOL_LENGTH = 10; - Validator2.URL_LENGTH = 200; - Validator2.ROYALTY_MAX = 100; - Validator2.SELLER_FEE_BASIS_POINTS_MAX = 1e4; - Validator2.ROYALTY_MIN = 0; - Validator2.isRoyalty = (royalty) => { - return Try(() => { - const key = "royalty"; - if (royalty !== 0 && !royalty) { - throw createError(key, Message.EMPTY, royalty); - } - if (royalty < Validator2.ROYALTY_MIN) { - throw createError(key, Message.SMALL_NUMBER, royalty, { - threshold: Validator2.ROYALTY_MIN, - condition: "underMin" - }); - } else if (royalty > Validator2.ROYALTY_MAX) { - throw createError(key, Message.BIG_NUMBER, royalty, { - threshold: Validator2.ROYALTY_MAX, - condition: "overMax" - }); - } - return Message.SUCCESS; - }); - }; - Validator2.isSellerFeeBasisPoints = (royalty) => { - return Try(() => { - const key = "sellerFeeBasisPoints/seller_fee_basis_points"; - if (royalty !== 0 && !royalty) { - throw createError(key, Message.EMPTY, royalty); - } - if (royalty < Validator2.ROYALTY_MIN) { - throw createError(key, Message.SMALL_NUMBER, royalty, { - threshold: Validator2.ROYALTY_MIN, - condition: "underMin" - }); - } else if (royalty > Validator2.ROYALTY_MAX * Converter14.Royalty.THRESHOLD) { - throw createError(key, Message.BIG_NUMBER, royalty, { - threshold: Validator2.SELLER_FEE_BASIS_POINTS_MAX, - condition: "overMax" - }); - } - return Message.SUCCESS; - }); - }; - Validator2.isName = (name) => { - return Try(() => { - const key = "name"; - if (!name) { - throw createError(key, Message.EMPTY, name); - } - if (byteLength(name) > Validator2.NAME_LENGTH) { - throw createError(key, Message.LONG_LENGTH, name, { - threshold: Validator2.NAME_LENGTH, - condition: "overMax" - }); - } - return Message.SUCCESS; - }); - }; - Validator2.isSymbol = (symbol) => { - return Try(() => { - const key = "symbol"; - if (!symbol) { - throw createError(key, Message.EMPTY, symbol); - } - if (byteLength(symbol) > Validator2.SYMBOL_LENGTH) { - throw createError(key, Message.LONG_LENGTH, symbol, { - threshold: Validator2.SYMBOL_LENGTH, - condition: "overMax" - }); - } - return Message.SUCCESS; - }); - }; - Validator2.isImageUrl = (image) => isUriOrImage(image, "image"); - Validator2.checkAll = (metadata) => { - return Try(() => { - const keys = Object.keys(metadata); - const results = []; - keys.map((key) => { - let res; - switch (key) { - case "image": - if (key in metadata && metadata.image) { - res = (0, Validator2.isImageUrl)(metadata.image); - } - break; - case "royalty": - if (key in metadata && metadata.royalty) { - res = (0, Validator2.isRoyalty)(metadata.royalty); - } - break; - case "seller_fee_basis_points": - if (key in metadata && metadata.seller_fee_basis_points) { - res = (0, Validator2.isSellerFeeBasisPoints)(metadata.seller_fee_basis_points); - } - break; - case "sellerFeeBasisPoints": - if (key in metadata) { - res = (0, Validator2.isSellerFeeBasisPoints)(metadata.sellerFeeBasisPoints); - } - break; - case "name": - if (metadata.name) { - res = (0, Validator2.isName)(metadata.name); - } - break; - case "symbol": - if (metadata.symbol) { - res = (0, Validator2.isSymbol)(metadata.symbol); - } - break; - } - if (res && res.isErr) { - results.push(...res.error.details); - } - }); - if (results.length > 0) { - const message = "Caught in the validation errors. see information e.g: err.details"; - throw new ValidatorError(message, results); - } - return Message.SUCCESS; - }); - }; - const byteLength = (value) => { - const text = new TextEncoder(); - return text.encode(value).length; - }; - const createError = (key, message, actual, limit) => { - let error; - if (limit) { - error = new ValidatorError(message, [{ key, message, actual, limit }]); - } else { - error = new ValidatorError(message, [{ key, message, actual }]); - } - return error; - }; - const isUriOrImage = (imageOrUri, key) => { - return Try(() => { - if (!imageOrUri) { - throw createError(key, Message.EMPTY, imageOrUri); - } - if (byteLength(imageOrUri) > Validator2.URL_LENGTH) { - throw createError(key, Message.LONG_LENGTH, imageOrUri, { - threshold: Validator2.URL_LENGTH, - condition: "overMax" - }); - } - if (!/https?:\/\/[-_.!~*\\()a-zA-Z0-9;?:&=+,%#]+/g.test(imageOrUri)) { - throw createError(key, Message.INVALID_URL, imageOrUri); - } - return Message.SUCCESS; - }); - }; -})(Validator || (Validator = {})); -var ValidatorError = class extends Error { - details; - constructor(message, details) { - super(message); - this.details = details; - } -}; - -// ../node/src/index.ts -var import_web38 = require("@solana/web3.js"); -var Node; -((Node2) => { - const setted = { - clusterUrl: "", - commitment: Constants.COMMITMENT, - customClusterUrl: [] - }; - Node2.getConnection = () => { - if (setted.customClusterUrl.length > 0) { - setted.clusterUrl = Constants.switchCluster({ - customClusterUrl: setted.customClusterUrl - }); - } else if (Constants.customClusterUrl.length > 0) { - setted.clusterUrl = Constants.switchCluster({ - customClusterUrl: Constants.customClusterUrl - }); - } else if (!setted.clusterUrl) { - setted.clusterUrl = Constants.switchCluster({ - cluster: Constants.currentCluster - }); - } - if (!setted.commitment) { - setted.commitment = Constants.COMMITMENT; - } - return new import_web38.Connection(setted.clusterUrl, setted.commitment); - }; - Node2.changeConnection = (param) => { - setted.clusterUrl = ""; - setted.customClusterUrl = []; - setted.commitment = Constants.COMMITMENT; - const { cluster, commitment, customClusterUrl } = param; - if (commitment) { - setted.commitment = commitment; - debugLog("# Node change commitment: ", setted.commitment); - } - if (cluster) { - setted.clusterUrl = Constants.switchCluster({ cluster }); - debugLog("# Node change clusterUrl: ", setted.clusterUrl); - } - if (customClusterUrl) { - debugLog("# customClusterUrl: ", customClusterUrl); - setted.clusterUrl = Constants.switchCluster({ customClusterUrl }); - setted.customClusterUrl = customClusterUrl; - debugLog( - "# Node change cluster, custom cluster url: ", - setted.clusterUrl - ); - } - }; - Node2.confirmedSig = async (signature, commitment = Constants.COMMITMENT) => { - const connection = Node2.getConnection(); - const latestBlockhash = await connection.getLatestBlockhash(); - return await connection.confirmTransaction( - { - blockhash: latestBlockhash.blockhash, - lastValidBlockHeight: latestBlockhash.lastValidBlockHeight, - signature - }, - commitment - ).then(Result5.ok).catch(Result5.err); - }; -})(Node || (Node = {})); - -// ../global/src/index.ts -var import_bignumber = require("bignumber.js"); -var import_bs582 = __toESM(require("bs58")); -String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, options = {}) { - const endPointUrl = Node.getConnection().rpcEndpoint; - debugLog("# toExplorerUrl rpcEndpoint:", endPointUrl); - let cluster = ""; - if (endPointUrl === Constants.EndPointUrl.prd) { - cluster = Constants.Cluster.prd; - } else if (endPointUrl === Constants.EndPointUrl.test) { - cluster = Constants.Cluster.test; - } else if (endPointUrl === Constants.EndPointUrl.dev) { - cluster = Constants.Cluster.dev; - } else { - cluster = Constants.Cluster.dev; - } - const addressOrSignature = this.toString(); - let url = ""; - if (options.replacePath) { - if (explorer === "solanafm" /* SolanaFM */) { - url = `${Constants.EXPLORER_SOLANAFM_URL}/${options.replacePath}/${addressOrSignature}?cluster=${cluster}`; - } else if (explorer === "xray" /* Xray */) { - url = `${Constants.EXPLORER_XRAY_URL}/${options.replacePath}/${addressOrSignature}?network=${cluster}`; - } else { - url = `${Constants.EXPLORER_SOLSCAN_URL}/${options.replacePath}/${addressOrSignature}?cluster=${cluster}`; - } - return url; - } - if (Account3.Keypair.isPubkey(addressOrSignature)) { - if (explorer === "solanafm" /* SolanaFM */) { - url = `${Constants.EXPLORER_SOLANAFM_URL}/address/${addressOrSignature}?cluster=${cluster}`; - } else if (explorer === "xray" /* Xray */) { - url = `${Constants.EXPLORER_XRAY_URL}/account/${addressOrSignature}?network=${cluster}`; - } else { - url = `${Constants.EXPLORER_SOLSCAN_URL}/account/${addressOrSignature}?cluster=${cluster}`; - } - } else { - if (explorer === "solanafm" /* SolanaFM */) { - url = `${Constants.EXPLORER_SOLANAFM_URL}/tx/${addressOrSignature}?cluster=${cluster}`; - } else if (explorer === "xray" /* Xray */) { - url = `${Constants.EXPLORER_XRAY_URL}/tx/${addressOrSignature}?network=${cluster}`; - } else { - url = `${Constants.EXPLORER_SOLSCAN_URL}/tx/${addressOrSignature}?cluster=${cluster}`; - } - } - return url; -}; -String.prototype.toPublicKey = function() { - if (!Account3.Keypair.isPubkey(this.toString())) { - throw Error(`No match KeyPair.PubKey: ${this.toString()}`); - } - return new import_web39.PublicKey(this.toString()); -}; -String.prototype.toKeypair = function() { - if (!Account3.Keypair.isSecret(this.toString())) { - throw Error(`No match KeyPair.Secret: ${this.toString()}`); - } - const decoded = import_bs582.default.decode(this.toString()); - return import_web39.Keypair.fromSecretKey(decoded); -}; -Number.prototype.toSol = function() { - return (0, import_bignumber.BigNumber)(this).div(import_web39.LAMPORTS_PER_SOL).toNumber(); -}; -Number.prototype.toLamports = function() { - return (0, import_bignumber.BigNumber)(this).times(import_web39.LAMPORTS_PER_SOL).toNumber(); -}; - // src/index.ts var Account3 = { ...Account, @@ -1424,4 +147,4 @@ var Account3 = { 0 && (module.exports = { Account }); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uL3NyYy9rZXlwYWlyLnRzIiwgIi4uL3NyYy9wZGEudHMiLCAiLi4vLi4vZ2xvYmFsL3NyYy9pbmRleC50cyIsICIuLi8uLi9zdWl0ZS11dGlscy9zcmMvY29uc3RhbnRzLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2JhdGNoLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2NvbW1vbi50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9taW50LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL3BhcnRpYWwtc2lnbi50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jYWxjdWxhdGUtdHhzaXplLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3N1aXRlLXV0aWxzL3NyYy9zaGFyZWQudHMiLCAiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL3Jlc3VsdC50cyIsICIuLi8uLi9jb252ZXJ0ZXIvc3JjL2NvbGxlY3Rpb24udHMiLCAiLi4vLi4vY29udmVydGVyL3NyYy9jcmVhdG9ycy50cyIsICIuLi8uLi9jb252ZXJ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AgICAgICBzdG9yYWdlVHlwZTogU3RvcmFnZVR5cGUsXG4gICAgICAgIGZlZVBheWVyPzogU2VjcmV0LFxuICAgICAgKSA9PiBQcm9taXNlPFJlc3VsdDxzdHJpbmcsIEVycm9yPj4sXG4gICAgICBzdG9yYWdlVHlwZTogU3RvcmFnZVR5cGUsXG4gICAgICBmZWVQYXllcj86IFNlY3JldCxcbiAgICApOiBQcm9taXNlPFByb3BlcnRpZXM+ID0+IHtcbiAgICAgIGlmICghaW5wdXQgfHwgIWlucHV0LmZpbGVzKSB7XG4gICAgICAgIHJldHVybiB7fTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgZmlsZXMgPSBhd2FpdCBQcm9taXNlLmFsbChcbiAgICAgICAgaW5wdXQuZmlsZXMubWFwKGFzeW5jIChmaWxlKSA9PiB7XG4gICAgICAgICAgaWYgKCFmaWxlLmZpbGVQYXRoKSB7XG4gICAgICAgICAgICByZXR1cm4ge307XG4gICAgICAgICAgfVxuICAgICAgICAgIGNvbnN0IHJlcyA9IGF3YWl0IGNhbGxiYWNrRnVuYyhmaWxlLmZpbGVQYXRoLCBzdG9yYWdlVHlwZSwgZmVlUGF5ZXIpO1xuICAgICAgICAgIGlmIChyZXMuaXNFcnIpIHtcbiAgICAgICAgICAgIHRocm93IEVycm9yKHJlcy5lcnJvci5tZXNzYWdlKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgcmV0dXJuIG92ZXJ3cml0ZU9iamVjdChmaWxlLCBbXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGV4aXN0c0tleTogJ2ZpbGVQYXRoJyxcbiAgICAgICAgICAgICAgd2lsbDogeyBrZXk6ICd1cmknLCB2YWx1ZTogcmVzLnZhbHVlIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgIF0pO1xuICAgICAgICB9KSxcbiAgICAgICk7XG4gICAgICByZXR1cm4geyAuLi5pbnB1dCwgZmlsZXMgfSBhcyBQcm9wZXJ0aWVzO1xuICAgIH07XG4g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uICAgICAgY29uc3Qga2V5cyA9IE9iamVjdC5rZXlzKG1ldGFkYXRhKTtcbiAgICAgIGNvbnN0IHJlc3VsdHM6IERldGFpbHNbXSA9IFtdO1xuICAgICAga2V5cy5tYXAoKGtleSkgPT4ge1xuICAgICAgICBsZXQgcmVzITogUmVzdWx0PHN0cmluZywgVmFsaWRhdG9yRXJyb3I+O1xuICAgICAgICBzd2l0Y2ggKGtleSkge1xuICAgICAgICAgIGNhc2UgJ2ltYWdlJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuaW1hZ2UpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNJbWFnZVVybChtZXRhZGF0YS5pbWFnZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdyb3lhbHR5JzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEucm95YWx0eSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1JveWFsdHkobWV0YWRhdGEucm95YWx0eSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lz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nRNZXRhZGF0YSIsICJDb252ZXJ0ZXIiLCAiUm95YWx0eSIsICJDb252ZXJ0ZXIiLCAiTmZ0IiwgIkNvbnZlcnRlciIsICJNZW1vIiwgIkNvbnZlcnRlciIsICJNaW50IiwgIkNvbnZlcnRlciIsICJSZWd1bGFyTmZ0TWV0YWRhdGEiLCAiQ29udmVydGVyIiwgIlByb3BlcnRpZXMiLCAiQ29udmVydGVyIiwgIlVzZXMiLCAiQ29udmVydGVyIiwgIlRva2VuTWV0YWRhdGEiLCAiQ29udmVydGVyIiwgIlRyYW5zZmVyQ2hlY2tlZCIsICJDb252ZXJ0ZXIiLCAiVHJhbnNmZXIiLCAiQ29udmVydGVyIiwgIlZhbGlkYXRvciIsICJNZXNzYWdlIiwgIkNvbnZlcnRlciIsICJpbXBvcnRfd2ViMyIsICJOb2RlIiwgIlJlc3VsdCIsICJpbXBvcnRfYnM1OCIsICJBY2NvdW50IiwgImJzIiwgIkFjY291bnQiXQp9Cg== \ No newline at end of file +//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uL3NyYy9rZXlwYWlyLnRzIiwgIi4uL3NyYy9wZGEudHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImltcG9ydCB7IEFjY291bnQgYXMgS2V5cGFpciB9IGZyb20gJy4va2V5cGFpcic7XG5pbXBvcnQgeyBBY2NvdW50IGFzIFBkYSB9IGZyb20gJy4vcGRhJztcbmltcG9ydCAnfi90eXBlcy9nbG9iYWwnO1xuLy8gaW1wb3J0ICd+L2dsb2JhbCc7XG5cbmV4cG9ydCBjb25zdCBBY2NvdW50ID0ge1xuICAuLi5LZXlwYWlyLFxuICAuLi5QZGEsXG59O1xuIiwgImltcG9ydCB7IEtleXBhaXIgYXMgT3JpZ2luYWwsIFB1YmxpY0tleSB9IGZyb20gJ0Bzb2xhbmEvd2ViMy5qcyc7XG5pbXBvcnQgeyBQdWJr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iOiBbIkFjY291bnQiLCAiQWNjb3VudCIsICJicyIsICJPcmlnaW5hbCIsICJpbXBvcnRfd2ViMyIsICJBY2NvdW50IiwgIlBkYSIsICJCTiIsICJBY2NvdW50Il0KfQo= \ No newline at end of file diff --git a/packages/account/dist/index.mjs b/packages/account/dist/index.mjs index 8a4fab0ce..67526f336 100644 --- a/packages/account/dist/index.mjs +++ b/packages/account/dist/index.mjs @@ -3,7 +3,7 @@ import { Keypair as Original, PublicKey } from "@solana/web3.js"; import bs from "bs58"; var Account; ((Account4) => { - class Keypair4 { + class Keypair { secret; pubkey; constructor(params) { @@ -26,19 +26,19 @@ var Account; static isSecret = (value) => /^[0-9a-zA-Z]{87,88}$/.test(value); static create = () => { const keypair = Original.generate(); - return new Keypair4({ + return new Keypair({ pubkey: keypair.publicKey.toString(), secret: bs.encode(keypair.secretKey) }); }; static toKeyPair = (keypair) => { - return new Keypair4({ + return new Keypair({ pubkey: keypair.publicKey.toString(), secret: bs.encode(keypair.secretKey) }); }; } - Account4.Keypair = Keypair4; + Account4.Keypair = Keypair; })(Account || (Account = {})); // src/pda.ts @@ -102,1297 +102,6 @@ var Account2; })(Pda = Account4.Pda || (Account4.Pda = {})); })(Account2 || (Account2 = {})); -// ../global/src/index.ts -import { Keypair as Keypair3, LAMPORTS_PER_SOL, PublicKey as PublicKey4 } from "@solana/web3.js"; - -// ../suite-utils/src/constants.ts -import { PublicKey as PublicKey3 } from "@solana/web3.js"; -import SolanaJsonConfig from "@solana-suite/config/load"; -var Config = SolanaJsonConfig; -var Constants; -((Constants2) => { - let WarnningMessage; - ((WarnningMessage2) => { - const THRESHHOLD = 50; - let isDisplay = false; - WarnningMessage2.NFT_STORAGE_API_KEY = ` - [YOU HAVE TO DO] - -------------------------------------- - You need to update nftStorageApiKey define parameter in solana-suite.json. - Can get api key from https://nft.storage/ - -------------------------------------- - `; - WarnningMessage2.DAS_API_URL = ` - [YOU HAVE TO DO] - -------------------------------------- - You need to update dasApiUrl define parameter in solana-suite.json. - can get api url from https://www.helius.dev/ - -------------------------------------- - `; - WarnningMessage2.ANNOUNCE = ` - [DEPRECATED] - -------------------------------------- - Account, Node, toExplorer, Pubkey, Secret have been moved to - @solana-suite/utils - ------------------------------------- - `; - WarnningMessage2.calculateProbability = () => { - const randomValue = Math.random(); - const probability = 1 / THRESHHOLD; - if (!isDisplay && randomValue < probability) { - isDisplay = true; - return true; - } - return false; - }; - })(WarnningMessage = Constants2.WarnningMessage || (Constants2.WarnningMessage = {})); -})(Constants || (Constants = {})); -((Constants2) => { - Constants2.currentCluster = Config.cluster.type; - Constants2.customClusterUrl = Config.cluster.customClusterUrl; - Constants2.isDebugging = Config.debugging; - Constants2.nftStorageApiKey = Config.nftStorageApiKey; - Constants2.dasApiUrl = Config.dasApiUrl; - let Cluster; - ((Cluster2) => { - Cluster2["prd"] = "mainnet-beta"; - Cluster2["prdMetaplex"] = "mainnet-beta-metaplex"; - Cluster2["dev"] = "devnet"; - Cluster2["test"] = "testnet"; - Cluster2["localhost"] = "localhost-devnet"; - })(Cluster = Constants2.Cluster || (Constants2.Cluster = {})); - let EndPointUrl; - ((EndPointUrl2) => { - EndPointUrl2["prd"] = "https://api.mainnet-beta.solana.com"; - EndPointUrl2["prdMetaplex"] = "https://api.metaplex.solana.com"; - EndPointUrl2["dev"] = "https://api.devnet.solana.com"; - EndPointUrl2["test"] = "https://api.testnet.solana.com"; - EndPointUrl2["localhost"] = "http://api.devnet.solana.com"; - })(EndPointUrl = Constants2.EndPointUrl || (Constants2.EndPointUrl = {})); - let BundlrUrl; - ((BundlrUrl2) => { - BundlrUrl2["prd"] = "https://node1.irys.xyz,https://node2.irys.xyz"; - BundlrUrl2["dev"] = "https://devnet.irys.xyz"; - })(BundlrUrl = Constants2.BundlrUrl || (Constants2.BundlrUrl = {})); - let DasApiUrl; - ((DasApiUrl2) => { - DasApiUrl2["dev"] = "https://devnet.helius-rpc.com/?api-key=15319bf4-5b40-4958-ac8d-6313aa55eb92,https://rpc-devnet.helius.xyz?api-key=9f70a843-3274-4ffd-a0a9-323f8b7c0639"; - })(DasApiUrl = Constants2.DasApiUrl || (Constants2.DasApiUrl = {})); - let NftstorageApiKey; - ((NftstorageApiKey2) => { - NftstorageApiKey2["dev"] = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJkaWQ6ZXRocjoweERGMjcyN2VkODZhRGU1RTMyZDZDZEJlODc0YzRFNDlEODY1OWZmOEMiLCJpc3MiOiJuZnQtc3RvcmFnZSIsImlhdCI6MTYyMDI2NDk0MzcwNiwibmFtZSI6ImRlbW8ifQ.d4J70mikxRB8a5vwNu6SO5HDA8JaueuseAj7Q_ytMCE"; - })(NftstorageApiKey = Constants2.NftstorageApiKey || (Constants2.NftstorageApiKey = {})); - Constants2.loadConfig = async () => { - Config = await import("@solana-suite/config/load"); - }; - Constants2.switchCluster = (param) => { - const { cluster: env, customClusterUrl: customClusterUrl2 } = param; - if (customClusterUrl2 && customClusterUrl2.length > 0) { - const index = Date.now() % customClusterUrl2.length; - return customClusterUrl2[index]; - } - switch (env) { - case "mainnet-beta" /* prd */: - return "https://api.mainnet-beta.solana.com" /* prd */; - case "mainnet-beta-metaplex" /* prdMetaplex */: - return "https://api.metaplex.solana.com" /* prdMetaplex */; - case "testnet" /* test */: - return "https://api.testnet.solana.com" /* test */; - case "devnet" /* dev */: - return "https://api.devnet.solana.com" /* dev */; - default: - return "http://api.devnet.solana.com" /* localhost */; - } - }; - Constants2.switchBundlr = (env) => { - switch (env) { - case "mainnet-beta" /* prd */: { - const urls = "https://node1.irys.xyz,https://node2.irys.xyz" /* prd */.split(","); - const index = Date.now() % urls.length; - return urls[index]; - } - default: { - return "https://devnet.irys.xyz" /* dev */; - } - } - }; - Constants2.switchDasApi = (env) => { - switch (env) { - case "mainnet-beta" /* prd */: { - if (Constants2.dasApiUrl.length < 1) { - throw Error(Constants2.WarnningMessage.DAS_API_URL); - } - const urls = "https://node1.irys.xyz,https://node2.irys.xyz" /* prd */.split(","); - const index = Date.now() % urls.length; - return urls[index]; - } - default: { - const urls = "https://devnet.helius-rpc.com/?api-key=15319bf4-5b40-4958-ac8d-6313aa55eb92,https://rpc-devnet.helius.xyz?api-key=9f70a843-3274-4ffd-a0a9-323f8b7c0639" /* dev */.split(","); - const index = Date.now() % urls.length; - return urls[index]; - } - } - }; - Constants2.switchNftStorage = (env) => { - switch (env) { - case "mainnet-beta" /* prd */: - if (!Constants2.nftStorageApiKey) { - throw Error(Constants2.WarnningMessage.NFT_STORAGE_API_KEY); - } - return Constants2.nftStorageApiKey; - default: { - return "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJkaWQ6ZXRocjoweERGMjcyN2VkODZhRGU1RTMyZDZDZEJlODc0YzRFNDlEODY1OWZmOEMiLCJpc3MiOiJuZnQtc3RvcmFnZSIsImlhdCI6MTYyMDI2NDk0MzcwNiwibmFtZSI6ImRlbW8ifQ.d4J70mikxRB8a5vwNu6SO5HDA8JaueuseAj7Q_ytMCE" /* dev */; - } - } - }; - Constants2.WRAPPED_TOKEN_PROGRAM_ID = new PublicKey3( - "So11111111111111111111111111111111111111112" - ); - Constants2.MEMO_PROGRAM_ID = new PublicKey3( - "Memo1UhkJRfHyvLMcVucJwxXeuD728EqVDDwQDxFMNo" - ); - Constants2.METAPLEX_PROGRAM_ID = new PublicKey3( - "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s" - ); - Constants2.COMMITMENT = "confirmed"; - Constants2.NFT_STORAGE_GATEWAY_URL = "https://ipfs.io/ipfs"; - Constants2.IRYS_GATEWAY_URL = "https://gateway.irys.xyz"; - Constants2.BUNDLR_NETWORK_URL = (0, Constants2.switchBundlr)(Config.cluster.type); - Constants2.DAS_API_URL = (0, Constants2.switchDasApi)(Config.cluster.type); - Constants2.NFT_STORAGE_API_KEY = (0, Constants2.switchNftStorage)(Config.cluster.type); - Constants2.EXPLORER_SOLSCAN_URL = "https://solscan.io"; - Constants2.EXPLORER_SOLANAFM_URL = "https://solana.fm"; - Constants2.EXPLORER_XRAY_URL = "https://xray.helius.xyz"; -})(Constants || (Constants = {})); -console.log(Constants.WarnningMessage.ANNOUNCE); - -// ../transaction-builder/src/batch.ts -import { - sendAndConfirmTransaction as sendAndConfirmTransaction2, - Transaction as Transaction2 -} from "@solana/web3.js"; - -// ../transaction-builder/src/common.ts -import { - sendAndConfirmTransaction, - Transaction -} from "@solana/web3.js"; -var MAX_RETRIES = 3; -var TransactionBuilder; -((TransactionBuilder7) => { - class Common2 { - static MAX_TRANSACTION_SIZE = 1232; - instructions; - signers; - feePayer; - data; - constructor(instructions, signers, feePayer, data) { - this.instructions = instructions; - this.signers = signers; - this.feePayer = feePayer; - this.data = data; - } - submit = async () => { - return Try(async () => { - if (!(this instanceof Common2)) { - throw Error("only Instruction object that can use this"); - } - const transaction = new Transaction(); - const blockhashObj = await Node.getConnection().getLatestBlockhash(); - transaction.lastValidBlockHeight = blockhashObj.lastValidBlockHeight; - transaction.recentBlockhash = blockhashObj.blockhash; - let finalSigners = this.signers; - if (this.feePayer) { - transaction.feePayer = this.feePayer.publicKey; - finalSigners = [this.feePayer, ...this.signers]; - } - this.instructions.forEach((inst) => transaction.add(inst)); - const options = { - maxRetries: MAX_RETRIES - }; - return await sendAndConfirmTransaction( - Node.getConnection(), - transaction, - finalSigners, - options - ); - }); - }; - } - TransactionBuilder7.Common = Common2; -})(TransactionBuilder || (TransactionBuilder = {})); - -// ../transaction-builder/src/batch.ts -var TransactionBuilder2; -((TransactionBuilder7) => { - class Batch { - submit = async (arr) => { - return Try(async () => { - let i = 0; - for (const a of arr) { - if (!a.instructions && !a.signers) { - throw Error( - `only Instruction object that can use batchSubmit(). - Index: ${i}, Set value: ${JSON.stringify(a)}` - ); - } - i++; - } - const instructions = arr.flatMap((a) => a.instructions); - const signers = arr.flatMap((a) => a.signers); - const feePayers = arr.filter((a) => a.feePayer !== void 0); - let feePayer = signers[0]; - if (feePayers.length > 0 && feePayers[0].feePayer) { - feePayer = feePayers[0].feePayer; - } - const transaction = new Transaction2(); - let finalSigners = signers; - if (feePayer) { - transaction.feePayer = feePayer.publicKey; - finalSigners = [feePayer, ...signers]; - } - instructions.map((inst) => transaction.add(inst)); - const options = { - maxRetries: MAX_RETRIES - }; - return await sendAndConfirmTransaction2( - Node.getConnection(), - transaction, - finalSigners, - options - ); - }); - }; - } - TransactionBuilder7.Batch = Batch; -})(TransactionBuilder2 || (TransactionBuilder2 = {})); - -// ../transaction-builder/src/mint.ts -import { - sendAndConfirmTransaction as sendAndConfirmTransaction3, - Transaction as Transaction3 -} from "@solana/web3.js"; -var TransactionBuilder3; -((TransactionBuilder7) => { - class Mint { - instructions; - signers; - feePayer; - data; - constructor(instructions, signers, feePayer, data) { - this.instructions = instructions; - this.signers = signers; - this.data = data; - this.feePayer = feePayer; - } - submit = async () => { - return Try(async () => { - if (!(this instanceof Mint)) { - throw Error("only MintInstruction object that can use this"); - } - const transaction = new Transaction3(); - const blockhashObj = await Node.getConnection().getLatestBlockhash(); - transaction.lastValidBlockHeight = blockhashObj.lastValidBlockHeight; - transaction.recentBlockhash = blockhashObj.blockhash; - let finalSigners = this.signers; - if (this.feePayer) { - transaction.feePayer = this.feePayer.publicKey; - finalSigners = [this.feePayer, ...this.signers]; - } - this.instructions.forEach((inst) => transaction.add(inst)); - const options = { - maxRetries: MAX_RETRIES - }; - if (Node.getConnection().rpcEndpoint === Constants.EndPointUrl.prd) { - debugLog("# Change metaplex cluster on mainnet-beta"); - Node.changeConnection({ cluster: Constants.Cluster.prdMetaplex }); - } - return await sendAndConfirmTransaction3( - Node.getConnection(), - transaction, - finalSigners, - options - ); - }); - }; - } - TransactionBuilder7.Mint = Mint; -})(TransactionBuilder3 || (TransactionBuilder3 = {})); - -// ../transaction-builder/src/partial-sign.ts -import { - Transaction as Transaction4 -} from "@solana/web3.js"; -var TransactionBuilder4; -((TransactionBuilder7) => { - class PartialSign { - hexInstruction; - data; - canSubmit; - constructor(instructions, mint, canSubmit = false) { - this.hexInstruction = instructions; - this.data = mint; - this.canSubmit = canSubmit; - } - submit = async (feePayer) => { - return Try(async () => { - if (!(this instanceof PartialSign)) { - throw Error("only PartialSignInstruction object that can use this"); - } - const decode = Buffer.from(this.hexInstruction, "hex"); - const transactionFromJson = Transaction4.from(decode); - transactionFromJson.partialSign(feePayer.toKeypair()); - const options = { - maxRetries: MAX_RETRIES - }; - const wireTransaction = transactionFromJson.serialize(); - return await Node.getConnection().sendRawTransaction( - wireTransaction, - options - ); - }); - }; - } - TransactionBuilder7.PartialSign = PartialSign; -})(TransactionBuilder4 || (TransactionBuilder4 = {})); - -// ../transaction-builder/src/calculate-txsize.ts -var TransactionBuilder5; -((TransactionBuilder7) => { - const LOW_VALUE = 127; - const HIGH_VALUE = 16383; - const MAX_TRANSACTION_SIZE = 1232; - const compactHeader = (n) => n <= LOW_VALUE ? 1 : n <= HIGH_VALUE ? 2 : 3; - const compactArraySize = (n, size) => compactHeader(n) + n * size; - TransactionBuilder7.calculateTxSize = (transaction, feePayer) => { - const feePayerPk = [feePayer.toBase58()]; - const signers = new Set(feePayerPk); - const accounts = new Set(feePayerPk); - const ixsSize = transaction.instructions.reduce((acc, ix) => { - ix.keys.forEach(({ pubkey, isSigner }) => { - const pk = pubkey.toBase58(); - if (isSigner) - signers.add(pk); - accounts.add(pk); - }); - accounts.add(ix.programId.toBase58()); - const nIndexes = ix.keys.length; - const opaqueData = ix.data.length; - return acc + 1 + // PID index - compactArraySize(nIndexes, 1) + compactArraySize(opaqueData, 1); - }, 0); - return compactArraySize(signers.size, 64) + // signatures - 3 + // header - compactArraySize(accounts.size, 32) + // accounts - 32 + // blockhash - compactHeader(transaction.instructions.length) + // instructions - ixsSize; - }; - TransactionBuilder7.isOverTransactionSize = (transaction, feePayer) => { - return (0, TransactionBuilder7.calculateTxSize)(transaction, feePayer) > MAX_TRANSACTION_SIZE; - }; -})(TransactionBuilder5 || (TransactionBuilder5 = {})); - -// ../transaction-builder/src/index.ts -var TransactionBuilder6 = { - ...TransactionBuilder2, - ...TransactionBuilder5, - ...TransactionBuilder3, - ...TransactionBuilder, - ...TransactionBuilder4 -}; - -// ../suite-utils/src/shared.ts -var overwriteObject = (object, targets) => { - const that = object; - targets.forEach((target) => { - delete that[target.existsKey]; - that[target.will.key] = target.will.value; - }); - return that; -}; -var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { - if (Constants.isDebugging === "true" || process.env.DEBUG === "true") { - console.log("[DEBUG]", data1, data2, data3, data4); - } -}; -var isPromise = (obj) => { - return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; -}; -function Try(input, finallyInput) { - try { - const v = input(); - if (isPromise(v)) { - return v.then( - (x) => Result5.ok(x), - (err) => Result5.err(err) - ); - } else { - return Result5.ok(v); - } - } catch (e) { - if (e instanceof Error) { - return Result5.err(e); - } - return Result5.err(Error(e)); - } finally { - if (finallyInput) { - debugLog("# finally input:", finallyInput); - finallyInput(); - } - } -} -var convertTimestampToDateTime = (created_at) => { - if (created_at) { - return new Date(created_at * 1e3); - } - return; -}; - -// ../suite-utils/src/result.ts -var AbstractResult = class { - unwrap(ok, err) { - const r = this._chain( - (value) => Result5.ok(ok ? ok(value) : value), - (error) => err ? Result5.ok(err(error)) : Result5.err(error) - ); - if (r.isErr) { - throw r.error; - } - return r.value; - } - map(ok, err) { - return this._chain( - (value) => Result5.ok(ok(value)), - (error) => Result5.err(err ? err(error) : error) - ); - } - chain(ok, err) { - return this._chain(ok, err || ((error) => Result5.err(error))); - } - match(ok, err) { - this._chain( - (value) => Result5.ok(ok(value)), - (error) => Result5.err(err(error)) - ); - } - /// single TransactionBuilder //// - /* eslint-disable @typescript-eslint/no-explicit-any */ - async submit(feePayer) { - const res = this.map( - async (ok) => { - debugLog("# result single submit: ", ok); - if (feePayer) { - const obj = ok; - return await obj.submit(feePayer); - } else { - const obj = ok; - return await obj.submit(); - } - }, - (err) => { - return err; - } - ); - if (res.isErr) { - return Result5.err(res.error); - } - return res.value; - } -}; -Array.prototype.submit = async function(feePayer) { - if (feePayer) { - let i = 1; - for await (const obj of this) { - if (obj.isErr) { - return obj; - } else if (obj.value.canSubmit) { - debugLog("# Result batch canSubmit"); - const sig = await obj.submit(feePayer); - if (sig.isErr) { - return sig; - } - await Node.confirmedSig(sig.value); - } else { - debugLog("# Result batch other than canSubmit"); - if (this.length == i) { - return obj.submit(feePayer); - } - obj.submit(feePayer); - } - i++; - } - } else { - const instructions = []; - for (const obj of this) { - if (obj.isErr) { - return obj; - } else if (obj.isOk) { - instructions.push(obj.value); - } else { - return Result5.err(Error("Only Array Instruction object")); - } - } - debugLog("# Result batch submit: ", instructions); - return new TransactionBuilder6.Batch().submit(instructions); - } -}; -var InternalOk = class extends AbstractResult { - constructor(value) { - super(); - this.value = value; - } - isOk = true; - isErr = false; - /* eslint-disable @typescript-eslint/no-unused-vars */ - _chain(ok, _err) { - return ok(this.value); - } -}; -var InternalErr = class extends AbstractResult { - constructor(error) { - super(); - this.error = error; - } - isOk = false; - isErr = true; - _chain(_ok, err) { - return err(this.error); - } -}; -var Result5; -((Result8) => { - function ok(value) { - return new InternalOk(value); - } - Result8.ok = ok; - function err(error) { - return new InternalErr(error || Error()); - } - Result8.err = err; - function all(obj) { - if (Array.isArray(obj)) { - const resArr = []; - for (const item of obj) { - if (item.isErr) { - return item; - } - resArr.push(item.value); - } - return Result8.ok(resArr); - } - const res = {}; - const keys = Object.keys(obj); - for (const key of keys) { - const item = obj[key]; - if (item.isErr) { - return item; - } - res[key] = item.value; - } - return Result8.ok(res); - } - Result8.all = all; -})(Result5 || (Result5 = {})); - -// ../converter/src/collection.ts -var Converter; -((Converter15) => { - let Collection; - ((Collection2) => { - Collection2.intoInfra = (input) => { - if (!input) { - return null; - } - return { - key: input.toPublicKey(), - verified: false - }; - }; - Collection2.intoUser = (output) => { - if (!output) { - return void 0; - } - return { - address: output.key.toString(), - verified: output.verified - }; - }; - })(Collection = Converter15.Collection || (Converter15.Collection = {})); - let CollectionMint; - ((CollectionMint2) => { - CollectionMint2.intoUser = (output) => { - const res = output.find((value) => { - if (value.group_key === "collection") { - return value.group_value; - } - }); - return res ? res.group_value : ""; - }; - })(CollectionMint = Converter15.CollectionMint || (Converter15.CollectionMint = {})); -})(Converter || (Converter = {})); - -// ../converter/src/creators.ts -var Converter2; -((Converter15) => { - let Creators; - ((Creators2) => { - Creators2.intoInfra = (input) => { - if (!input) { - return null; - } - return input.map((data) => { - return { - address: data.address.toPublicKey(), - share: data.share, - verified: false - }; - }); - }; - Creators2.intoCompressedNftInfra = (input) => { - if (!input) { - return []; - } - return input.map((data) => { - return { - address: data.address.toPublicKey(), - share: data.share, - verified: false - }; - }); - }; - Creators2.intoUser = (output) => { - if (!output) { - return void 0; - } - return output.map((data) => { - return { - address: data.address.toString(), - share: data.share, - verified: data.verified - }; - }); - }; - })(Creators = Converter15.Creators || (Converter15.Creators = {})); -})(Converter2 || (Converter2 = {})); - -// ../converter/src/compressed-nft-metadata.ts -import { - TokenProgramVersion, - TokenStandard -} from "mpl-bubblegum-instruction"; -var Converter3; -((Converter15) => { - let CompressedNftMetadata; - ((CompressedNftMetadata2) => { - CompressedNftMetadata2.intoInfra = (input, uri, sellerFeeBasisPoints) => { - return { - name: input.name, - symbol: input.symbol, - uri, - sellerFeeBasisPoints, - creators: Converter2.Creators.intoCompressedNftInfra(input.creators), - collection: Converter.Collection.intoInfra(input.collection), - uses: input.uses || null, - primarySaleHappened: false, - isMutable: input.isMutable ?? false, - editionNonce: 0, - tokenStandard: TokenStandard.NonFungible, - tokenProgramVersion: TokenProgramVersion.Original - }; - }; - })(CompressedNftMetadata = Converter15.CompressedNftMetadata || (Converter15.CompressedNftMetadata = {})); -})(Converter3 || (Converter3 = {})); - -// ../converter/src/royalty.ts -var Converter4; -((Converter15) => { - let Royalty; - ((Royalty2) => { - Royalty2.THRESHOLD = 100; - Royalty2.intoInfra = (percentage) => { - return percentage * Royalty2.THRESHOLD; - }; - Royalty2.intoUser = (percentage) => { - return percentage * Royalty2.THRESHOLD; - }; - })(Royalty = Converter15.Royalty || (Converter15.Royalty = {})); -})(Converter4 || (Converter4 = {})); - -// ../converter/src/nft.ts -var Converter5; -((Converter15) => { - let Nft; - ((Nft2) => { - Nft2.intoUser = (output) => { - return { - mint: output.onchain.id.toString(), - collectionMint: Converter.CollectionMint.intoUser( - output.onchain.grouping - ), - authorities: output.onchain.authorities, - royalty: Converter4.Royalty.intoUser(output.onchain.royalty.percent), - name: output.onchain.content.metadata.name, - symbol: output.onchain.content.metadata.symbol, - uri: output.onchain.content.json_uri, - creators: Converter2.Creators.intoUser(output.onchain.creators), - treeAddress: output.onchain.compression.tree, - isCompressed: output.onchain.compression.compressed, - isMutable: output.onchain.mutable, - isBurn: output.onchain.burnt, - editionNonce: output.onchain.supply.edition_nonce, - primarySaleHappened: output.onchain.royalty.primary_sale_happened, - dateTime: convertTimestampToDateTime(output.offchain.created_at), - offchain: output.offchain - }; - }; - })(Nft = Converter15.Nft || (Converter15.Nft = {})); -})(Converter5 || (Converter5 = {})); - -// ../converter/src/memo.ts -var Converter6; -((Converter15) => { - let Memo; - ((Memo2) => { - Memo2.intoUserSide = (output, meta, outputTransfer, mappingTokenAccount) => { - const history = {}; - if (outputTransfer && outputTransfer.program !== "") { - if (mappingTokenAccount && outputTransfer.program === "spl-token") { - const foundSource = mappingTokenAccount.find( - (m) => m.account === outputTransfer.parsed.info.source - ); - const foundDest = mappingTokenAccount.find( - (m) => m.account === outputTransfer.parsed.info.destination - ); - history.mint = outputTransfer.parsed.info.mint; - foundSource && (history.source = foundSource.owner); - foundDest && (history.destination = foundDest.owner); - } else { - history.source = outputTransfer.parsed.info.source; - history.destination = outputTransfer.parsed.info.destination; - } - } - history.memo = output.parsed; - history.type = output.program; - history.dateTime = convertTimestampToDateTime(meta.blockTime); - history.sig = meta.transaction.signatures[0]; - history.innerInstruction = false; - if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { - history.innerInstruction = true; - } - return history; - }; - })(Memo = Converter15.Memo || (Converter15.Memo = {})); -})(Converter6 || (Converter6 = {})); - -// ../converter/src/mint.ts -var Converter7; -((Converter15) => { - let Mint; - ((Mint2) => { - Mint2.intoUserSide = (output, meta) => { - const history = {}; - history.mint = output.parsed.info.mint; - history.mintAuthority = output.parsed.info.mintAuthority; - history.tokenAmount = output.parsed.info.tokenAmount; - history.account = output.parsed.info.account; - history.type = output.program; - history.dateTime = convertTimestampToDateTime(meta.blockTime); - history.sig = meta.transaction.signatures[0]; - history.innerInstruction = false; - if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { - history.innerInstruction = true; - } - return history; - }; - })(Mint = Converter15.Mint || (Converter15.Mint = {})); -})(Converter7 || (Converter7 = {})); - -// ../converter/src/regular-nft-metadata.ts -var Converter8; -((Converter15) => { - let RegularNftMetadata; - ((RegularNftMetadata2) => { - RegularNftMetadata2.intoInfra = (input, uri, sellerFeeBasisPoints) => { - return { - name: input.name, - symbol: input.symbol, - uri, - sellerFeeBasisPoints, - creators: Converter2.Creators.intoInfra(input.creators), - collection: Converter.Collection.intoInfra(input.collection), - uses: input.uses || null - }; - }; - })(RegularNftMetadata = Converter15.RegularNftMetadata || (Converter15.RegularNftMetadata = {})); -})(Converter8 || (Converter8 = {})); - -// ../converter/src/properties.ts -var Converter9; -((Converter15) => { - let Properties; - ((Properties2) => { - Properties2.intoInfra = async (input, callbackFunc, storageType, feePayer) => { - if (!input || !input.files) { - return {}; - } - const files = await Promise.all( - input.files.map(async (file) => { - if (!file.filePath) { - return {}; - } - const res = await callbackFunc(file.filePath, storageType, feePayer); - if (res.isErr) { - throw Error(res.error.message); - } - return overwriteObject(file, [ - { - existsKey: "filePath", - will: { key: "uri", value: res.value } - } - ]); - }) - ); - return { ...input, files }; - }; - })(Properties = Converter15.Properties || (Converter15.Properties = {})); -})(Converter9 || (Converter9 = {})); - -// ../converter/src/uses.ts -var Converter10; -((Converter15) => { - let Uses; - ((Uses2) => { - Uses2.intoUserSide = (output) => { - if (!output) { - return void 0; - } - return output; - }; - })(Uses = Converter15.Uses || (Converter15.Uses = {})); -})(Converter10 || (Converter10 = {})); - -// ../converter/src/token-metadata.ts -var Converter11; -((Converter15) => { - let TokenMetadata; - ((TokenMetadata2) => { - TokenMetadata2.intoInfra = (input, uri, sellerFeeBasisPoints) => { - return { - name: input.name, - symbol: input.symbol, - uri, - sellerFeeBasisPoints, - creators: Converter2.Creators.intoInfra(input.creators), - collection: null, - uses: input.uses || null - }; - }; - TokenMetadata2.intoUser = (output, tokenAmount) => { - return { - mint: output.onchain.mint.toString(), - royalty: output.onchain.data.sellerFeeBasisPoints, - name: (0, TokenMetadata2.deleteNullStrings)(output.onchain.data.name), - symbol: (0, TokenMetadata2.deleteNullStrings)(output.onchain.data.symbol), - tokenAmount, - uri: (0, TokenMetadata2.deleteNullStrings)(output.onchain.data.uri), - creators: Converter2.Creators.intoUser(output.onchain.data.creators), - uses: Converter10.Uses.intoUserSide(output.onchain.uses), - dateTime: convertTimestampToDateTime(output.offchain.created_at), - offchain: output.offchain - }; - }; - TokenMetadata2.deleteNullStrings = (str) => { - return str.replace(/\0/g, ""); - }; - })(TokenMetadata = Converter15.TokenMetadata || (Converter15.TokenMetadata = {})); -})(Converter11 || (Converter11 = {})); - -// ../converter/src/transfer-checked.ts -var Converter12; -((Converter15) => { - let TransferChecked; - ((TransferChecked2) => { - TransferChecked2.intoUserSide = (output, meta, mappingTokenAccount) => { - const history = {}; - if (mappingTokenAccount) { - const foundSource = mappingTokenAccount.find( - (m) => m.account === output.parsed.info.source - ); - const foundDest = mappingTokenAccount.find( - (m) => m.account === output.parsed.info.destination - ); - foundSource && (history.source = foundSource.owner); - foundDest && (history.destination = foundDest.owner); - } - history.tokenAmount = output.parsed.info.tokenAmount; - history.mint = output.parsed.info.mint; - history.multisigAuthority = output.parsed.info.multisigAuthority; - history.signers = output.parsed.info.signers; - history.type = output.program; - history.dateTime = convertTimestampToDateTime(meta.blockTime); - history.sig = meta.transaction.signatures[0]; - history.innerInstruction = false; - if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { - history.innerInstruction = true; - } - return history; - }; - })(TransferChecked = Converter15.TransferChecked || (Converter15.TransferChecked = {})); -})(Converter12 || (Converter12 = {})); - -// ../converter/src/transfer.ts -var Converter13; -((Converter15) => { - let Transfer; - ((Transfer2) => { - Transfer2.intoUserSide = (output, meta) => { - const history = {}; - if (!output.parsed.info.destination || !output.parsed.info.lamports) { - return; - } - history.source = output.parsed.info.source; - history.destination = output.parsed.info.destination; - history.sol = output.parsed.info.lamports?.toSol().toString(); - history.type = output.program; - history.dateTime = convertTimestampToDateTime(meta.blockTime); - history.sig = meta.transaction.signatures[0]; - history.innerInstruction = false; - if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { - history.innerInstruction = true; - } - return history; - }; - })(Transfer = Converter15.Transfer || (Converter15.Transfer = {})); -})(Converter13 || (Converter13 = {})); - -// ../converter/src/index.ts -var Converter14 = { - ...Converter3, - ...Converter, - ...Converter2, - ...Converter5, - ...Converter6, - ...Converter7, - ...Converter8, - ...Converter9, - ...Converter4, - ...Converter11, - ...Converter12, - ...Converter13, - ...Converter10 -}; - -// ../validator/src/index.ts -var Validator; -((Validator2) => { - let Message; - ((Message2) => { - Message2.SUCCESS = "success"; - Message2.SMALL_NUMBER = "too small"; - Message2.BIG_NUMBER = "too big"; - Message2.LONG_LENGTH = "too long"; - Message2.EMPTY = "invalid empty value"; - Message2.INVALID_URL = "invalid url"; - Message2.ONLY_NODE_JS = "`string` type is only Node.js"; - })(Message = Validator2.Message || (Validator2.Message = {})); - Validator2.NAME_LENGTH = 32; - Validator2.SYMBOL_LENGTH = 10; - Validator2.URL_LENGTH = 200; - Validator2.ROYALTY_MAX = 100; - Validator2.SELLER_FEE_BASIS_POINTS_MAX = 1e4; - Validator2.ROYALTY_MIN = 0; - Validator2.isRoyalty = (royalty) => { - return Try(() => { - const key = "royalty"; - if (royalty !== 0 && !royalty) { - throw createError(key, Message.EMPTY, royalty); - } - if (royalty < Validator2.ROYALTY_MIN) { - throw createError(key, Message.SMALL_NUMBER, royalty, { - threshold: Validator2.ROYALTY_MIN, - condition: "underMin" - }); - } else if (royalty > Validator2.ROYALTY_MAX) { - throw createError(key, Message.BIG_NUMBER, royalty, { - threshold: Validator2.ROYALTY_MAX, - condition: "overMax" - }); - } - return Message.SUCCESS; - }); - }; - Validator2.isSellerFeeBasisPoints = (royalty) => { - return Try(() => { - const key = "sellerFeeBasisPoints/seller_fee_basis_points"; - if (royalty !== 0 && !royalty) { - throw createError(key, Message.EMPTY, royalty); - } - if (royalty < Validator2.ROYALTY_MIN) { - throw createError(key, Message.SMALL_NUMBER, royalty, { - threshold: Validator2.ROYALTY_MIN, - condition: "underMin" - }); - } else if (royalty > Validator2.ROYALTY_MAX * Converter14.Royalty.THRESHOLD) { - throw createError(key, Message.BIG_NUMBER, royalty, { - threshold: Validator2.SELLER_FEE_BASIS_POINTS_MAX, - condition: "overMax" - }); - } - return Message.SUCCESS; - }); - }; - Validator2.isName = (name) => { - return Try(() => { - const key = "name"; - if (!name) { - throw createError(key, Message.EMPTY, name); - } - if (byteLength(name) > Validator2.NAME_LENGTH) { - throw createError(key, Message.LONG_LENGTH, name, { - threshold: Validator2.NAME_LENGTH, - condition: "overMax" - }); - } - return Message.SUCCESS; - }); - }; - Validator2.isSymbol = (symbol) => { - return Try(() => { - const key = "symbol"; - if (!symbol) { - throw createError(key, Message.EMPTY, symbol); - } - if (byteLength(symbol) > Validator2.SYMBOL_LENGTH) { - throw createError(key, Message.LONG_LENGTH, symbol, { - threshold: Validator2.SYMBOL_LENGTH, - condition: "overMax" - }); - } - return Message.SUCCESS; - }); - }; - Validator2.isImageUrl = (image) => isUriOrImage(image, "image"); - Validator2.checkAll = (metadata) => { - return Try(() => { - const keys = Object.keys(metadata); - const results = []; - keys.map((key) => { - let res; - switch (key) { - case "image": - if (key in metadata && metadata.image) { - res = (0, Validator2.isImageUrl)(metadata.image); - } - break; - case "royalty": - if (key in metadata && metadata.royalty) { - res = (0, Validator2.isRoyalty)(metadata.royalty); - } - break; - case "seller_fee_basis_points": - if (key in metadata && metadata.seller_fee_basis_points) { - res = (0, Validator2.isSellerFeeBasisPoints)(metadata.seller_fee_basis_points); - } - break; - case "sellerFeeBasisPoints": - if (key in metadata) { - res = (0, Validator2.isSellerFeeBasisPoints)(metadata.sellerFeeBasisPoints); - } - break; - case "name": - if (metadata.name) { - res = (0, Validator2.isName)(metadata.name); - } - break; - case "symbol": - if (metadata.symbol) { - res = (0, Validator2.isSymbol)(metadata.symbol); - } - break; - } - if (res && res.isErr) { - results.push(...res.error.details); - } - }); - if (results.length > 0) { - const message = "Caught in the validation errors. see information e.g: err.details"; - throw new ValidatorError(message, results); - } - return Message.SUCCESS; - }); - }; - const byteLength = (value) => { - const text = new TextEncoder(); - return text.encode(value).length; - }; - const createError = (key, message, actual, limit) => { - let error; - if (limit) { - error = new ValidatorError(message, [{ key, message, actual, limit }]); - } else { - error = new ValidatorError(message, [{ key, message, actual }]); - } - return error; - }; - const isUriOrImage = (imageOrUri, key) => { - return Try(() => { - if (!imageOrUri) { - throw createError(key, Message.EMPTY, imageOrUri); - } - if (byteLength(imageOrUri) > Validator2.URL_LENGTH) { - throw createError(key, Message.LONG_LENGTH, imageOrUri, { - threshold: Validator2.URL_LENGTH, - condition: "overMax" - }); - } - if (!/https?:\/\/[-_.!~*\\()a-zA-Z0-9;?:&=+,%#]+/g.test(imageOrUri)) { - throw createError(key, Message.INVALID_URL, imageOrUri); - } - return Message.SUCCESS; - }); - }; -})(Validator || (Validator = {})); -var ValidatorError = class extends Error { - details; - constructor(message, details) { - super(message); - this.details = details; - } -}; - -// ../node/src/index.ts -import { Connection } from "@solana/web3.js"; -var Node; -((Node2) => { - const setted = { - clusterUrl: "", - commitment: Constants.COMMITMENT, - customClusterUrl: [] - }; - Node2.getConnection = () => { - if (setted.customClusterUrl.length > 0) { - setted.clusterUrl = Constants.switchCluster({ - customClusterUrl: setted.customClusterUrl - }); - } else if (Constants.customClusterUrl.length > 0) { - setted.clusterUrl = Constants.switchCluster({ - customClusterUrl: Constants.customClusterUrl - }); - } else if (!setted.clusterUrl) { - setted.clusterUrl = Constants.switchCluster({ - cluster: Constants.currentCluster - }); - } - if (!setted.commitment) { - setted.commitment = Constants.COMMITMENT; - } - return new Connection(setted.clusterUrl, setted.commitment); - }; - Node2.changeConnection = (param) => { - setted.clusterUrl = ""; - setted.customClusterUrl = []; - setted.commitment = Constants.COMMITMENT; - const { cluster, commitment, customClusterUrl } = param; - if (commitment) { - setted.commitment = commitment; - debugLog("# Node change commitment: ", setted.commitment); - } - if (cluster) { - setted.clusterUrl = Constants.switchCluster({ cluster }); - debugLog("# Node change clusterUrl: ", setted.clusterUrl); - } - if (customClusterUrl) { - debugLog("# customClusterUrl: ", customClusterUrl); - setted.clusterUrl = Constants.switchCluster({ customClusterUrl }); - setted.customClusterUrl = customClusterUrl; - debugLog( - "# Node change cluster, custom cluster url: ", - setted.clusterUrl - ); - } - }; - Node2.confirmedSig = async (signature, commitment = Constants.COMMITMENT) => { - const connection = Node2.getConnection(); - const latestBlockhash = await connection.getLatestBlockhash(); - return await connection.confirmTransaction( - { - blockhash: latestBlockhash.blockhash, - lastValidBlockHeight: latestBlockhash.lastValidBlockHeight, - signature - }, - commitment - ).then(Result5.ok).catch(Result5.err); - }; -})(Node || (Node = {})); - -// ../global/src/index.ts -import { BigNumber } from "bignumber.js"; -import bs2 from "bs58"; -String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, options = {}) { - const endPointUrl = Node.getConnection().rpcEndpoint; - debugLog("# toExplorerUrl rpcEndpoint:", endPointUrl); - let cluster = ""; - if (endPointUrl === Constants.EndPointUrl.prd) { - cluster = Constants.Cluster.prd; - } else if (endPointUrl === Constants.EndPointUrl.test) { - cluster = Constants.Cluster.test; - } else if (endPointUrl === Constants.EndPointUrl.dev) { - cluster = Constants.Cluster.dev; - } else { - cluster = Constants.Cluster.dev; - } - const addressOrSignature = this.toString(); - let url = ""; - if (options.replacePath) { - if (explorer === "solanafm" /* SolanaFM */) { - url = `${Constants.EXPLORER_SOLANAFM_URL}/${options.replacePath}/${addressOrSignature}?cluster=${cluster}`; - } else if (explorer === "xray" /* Xray */) { - url = `${Constants.EXPLORER_XRAY_URL}/${options.replacePath}/${addressOrSignature}?network=${cluster}`; - } else { - url = `${Constants.EXPLORER_SOLSCAN_URL}/${options.replacePath}/${addressOrSignature}?cluster=${cluster}`; - } - return url; - } - if (Account3.Keypair.isPubkey(addressOrSignature)) { - if (explorer === "solanafm" /* SolanaFM */) { - url = `${Constants.EXPLORER_SOLANAFM_URL}/address/${addressOrSignature}?cluster=${cluster}`; - } else if (explorer === "xray" /* Xray */) { - url = `${Constants.EXPLORER_XRAY_URL}/account/${addressOrSignature}?network=${cluster}`; - } else { - url = `${Constants.EXPLORER_SOLSCAN_URL}/account/${addressOrSignature}?cluster=${cluster}`; - } - } else { - if (explorer === "solanafm" /* SolanaFM */) { - url = `${Constants.EXPLORER_SOLANAFM_URL}/tx/${addressOrSignature}?cluster=${cluster}`; - } else if (explorer === "xray" /* Xray */) { - url = `${Constants.EXPLORER_XRAY_URL}/tx/${addressOrSignature}?network=${cluster}`; - } else { - url = `${Constants.EXPLORER_SOLSCAN_URL}/tx/${addressOrSignature}?cluster=${cluster}`; - } - } - return url; -}; -String.prototype.toPublicKey = function() { - if (!Account3.Keypair.isPubkey(this.toString())) { - throw Error(`No match KeyPair.PubKey: ${this.toString()}`); - } - return new PublicKey4(this.toString()); -}; -String.prototype.toKeypair = function() { - if (!Account3.Keypair.isSecret(this.toString())) { - throw Error(`No match KeyPair.Secret: ${this.toString()}`); - } - const decoded = bs2.decode(this.toString()); - return Keypair3.fromSecretKey(decoded); -}; -Number.prototype.toSol = function() { - return BigNumber(this).div(LAMPORTS_PER_SOL).toNumber(); -}; -Number.prototype.toLamports = function() { - return BigNumber(this).times(LAMPORTS_PER_SOL).toNumber(); -}; - // src/index.ts var Account3 = { ...Account, @@ -1401,4 +110,4 @@ var Account3 = { export { Account3 as Account }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2tleXBhaXIudHMiLCAiLi4vc3JjL3BkYS50cyIsICIuLi8uLi9nbG9iYWwvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3N1aXRlLXV0aWxzL3NyYy9jb25zdGFudHMudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvYmF0Y2gudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY29tbW9uLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL21pbnQudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvcGFydGlhbC1zaWduLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2NhbGN1bGF0ZS10eHNpemUudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvaW5kZXgudHMiLCAiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL3NoYXJlZC50cyIsICIuLi8uLi9zdWl0ZS11dGlscy9zcmMvcmVzdWx0LnRzIiwgIi4uLy4uL2NvbnZlcnRlci9zcmMvY29sbGVjdGlvbi50cyIsICIuLi8uLi9jb252ZXJ0ZXIvc3JjL2NyZWF0b3JzLnRzIiwgIi4uLy4uL2NvbnZlcnRlci9zcmMvY29tcHJlc3NlZC1uZnQtbWV0YWRhdGEudHMiLCAiLi4vLi4vY29udmVydGVyL3NyYy9yb3lhbHR5LnRzIiwgIi4uLy4uL2NvbnZlcnRlci9zcmMvbmZ0LnRzIiwgIi4uLy4uL2NvbnZlcnRlci9zcmMvbWVtby50cyIsICIuLi8uLi9jb252ZXJ0ZXIvc3JjL21pbnQudHMiLCAiLi4vLi4vY29udmVydGVyL3NyYy9yZWd1bGFyLW5mdC1tZXR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zdCBmZWVQYXllclBrID0gW2ZlZVBheWVyLnRvQmFzZTU4KCldO1xuXG4gICAgY29uc3Qgc2lnbmVycyA9IG5ldyBTZXQ8c3RyaW5nPihmZWVQYXllclBrKTtcbiAgICBjb25zdCBhY2NvdW50cyA9IG5ldyBTZXQ8c3RyaW5nPihmZWVQYXllclBrKTtcblxuICAgIGNvbnN0IGl4c1NpemUgPSB0cmFuc2FjdGlvbi5pbnN0cnVjdGlvbnMucmVkdWNlKChhY2MsIGl4KSA9PiB7XG4gICAgICBpeC5rZXlzLmZvckVhY2goKHsgcHVia2V5LCBpc1NpZ25lciB9KSA9PiB7XG4gICAgICAgIGNvbnN0IHBrID0gcHVia2V5LnRvQmFzZTU4KCk7XG4gICAgICAgIGlmIChpc1NpZ25lcikgc2lnbmVycy5hZGQocGspO1xuICAgICAgICBhY2NvdW50cy5hZGQocGspO1xuICAgICAgfSk7XG5cbiAgICAgIGFjY291bnRzLmFkZChpeC5wcm9ncmFtSWQudG9CYXNlNTgoKSk7XG5cbiAgICAgIGNvbnN0IG5JbmRleGVzID0gaXgua2V5cy5sZW5ndGg7XG4gICAgICBjb25zdCBvcGFxdWVEYXRhID0gaXguZGF0YS5sZW5ndGg7XG5cbiAgICAgIHJldHVybiAoXG4gICAgICAgIGFjYyArXG4gICAgICAgIDEgKyAvLyBQSUQgaW5kZXhcbiAgICAgICAgY29tcGFjdEFycmF5U2l6ZShuSW5kZXhlcywgMSkgK1xuICAgICAgICBjb21wYWN0QXJyYXlTaXplKG9wYXF1ZURhdGEsIDEpXG4gICAgICApO1xuICAgIH0sIDApO1xuXG4gICAgcmV0dXJuIChcbiAgICAgIGNvbXBhY3RBcnJheVNpemUoc2lnbmVycy5zaXplLCA2NCkgKyAvLyBzaWduYXR1cmVzXG4gICAgICAzICsgLy8gaGVhZGVyXG4gICAgICBjb21wYWN0QXJyYXlTaXplKGFjY291bnRzLnNpemUsIDMyKSArIC8vIGFjY291bnRzXG4gICAgICAzMiArIC8vIGJsb2N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iAgICAgICAgICAgICAgcmVzID0gaXNSb3lhbHR5KG1ldGFkYXRhLnJveWFsdHkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEuc3ltYm9sKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU3ltYm9sKG1ldGFkYXRhLnN5bWJvbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAocmVzICYmIHJlcy5pc0Vycikge1xuICAgICAgICAgIHJlc3VsdHMucHVzaCguLi5yZX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XJ0ZXIiLCAiTWVtbyIsICJDb252ZXJ0ZXIiLCAiTWludCIsICJDb252ZXJ0ZXIiLCAiUmVndWxhck5mdE1ldGFkYXRhIiwgIkNvbnZlcnRlciIsICJQcm9wZXJ0aWVzIiwgIkNvbnZlcnRlciIsICJVc2VzIiwgIkNvbnZlcnRlciIsICJUb2tlbk1ldGFkYXRhIiwgIkNvbnZlcnRlciIsICJUcmFuc2ZlckNoZWNrZWQiLCAiQ29udmVydGVyIiwgIlRyYW5zZmVyIiwgIkNvbnZlcnRlciIsICJWYWxpZGF0b3IiLCAiTWVzc2FnZSIsICJDb252ZXJ0ZXIiLCAiTm9kZSIsICJSZXN1bHQiLCAiYnMiLCAiQWNjb3VudCIsICJQdWJsaWNLZXkiLCAiS2V5cGFpciIsICJBY2NvdW50Il0KfQo= \ No newline at end of file +//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2tleXBhaXIudHMiLCAiLi4vc3JjL3BkYS50cyIsICIuLi9zcmMvaW5kZXgudHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImltcG9ydCB7IEtleXBhaXIgYXMgT3JpZ2luYWwsIFB1YmxpY0tleSB9IGZyb20gJ0Bzb2xhbmEvd2ViMy5qcyc7XG5pbXBvcnQgeyBQdWJrZXksIFNlY3JldCB9IGZyb20gJ34vdHlwZXMvYWNjb3VudCc7XG5pbXBvcnQgYnMgZnJvbSAnYnM1OCc7XG5cbmV4cG9ydCBuYW1lc3BhY2UgQWNjb3VudCB7XG4gIGV4cG9ydCBjbGFzcyBLZXlwYWlyIHtcbiAgICBzZWNyZXQ6IFNlY3JldDtcbiAgICBwdWJrZXk6IFB1YmtleTtcblxuICAgIGNvbnN0cnVjdG9yKHBhcmFtczogeyBwdWJrZXk/OiBQdWJrZXk7IHNlY3JldDogU2VjcmV0IH0pIHtcbiAgICAgIGlmICghcGFyYW1zLnB1YmtleSkge1xuICAgICAgICBjb25zdCB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BQVEsWUFBWSxFQUFFLFNBQVMsQ0FBQztBQUFBLFFBQ2pDLHlCQUF5QixZQUFZO0FBQUEsTUFDdkM7QUFDQSxhQUFPO0FBQUEsSUFDVDtBQUVPLElBQU1FLEtBQUEsZ0JBQWdCLE1BQWlCO0FBQzVDLFlBQU0sQ0FBQyxTQUFTLElBQUlGLFdBQVU7QUFBQSxRQUM1QixDQUFDLE9BQU8sS0FBSyxrQkFBa0IsTUFBTSxDQUFDO0FBQUEsUUFDdEMseUJBQXlCLFlBQVk7QUFBQSxNQUN2QztBQUNBLGFBQU87QUFBQSxJQUNUO0FBRU8sSUFBTUUsS0FBQSxhQUFhLENBQUMsU0FBaUIsY0FBOEI7QUFDeEUsWUFBTSxPQUFPLElBQUksR0FBRyxHQUFHLFNBQVM7QUFDaEMsWUFBTSxDQUFDLE9BQU8sSUFBSUYsV0FBVTtBQUFBLFFBQzFCO0FBQUEsVUFDRSxPQUFPLEtBQUssU0FBUyxNQUFNO0FBQUEsVUFDM0IsUUFBUSxZQUFZLEVBQUUsU0FBUztBQUFBLFVBQy9CLFdBQVcsS0FBSyxLQUFLLFFBQVEsTUFBTSxDQUFDLENBQUM7QUFBQSxRQUN2QztBQUFBLFFBQ0EseUJBQXlCLFlBQVk7QUFBQSxNQUN2QztBQUNBLGFBQU8sUUFBUSxTQUFTO0FBQUEsSUFDMUI7QUFBQSxLQXJEZSxNQUFBQyxTQUFBLFFBQUFBLFNBQUE7QUFBQSxHQURGQSx3QkFBQTs7O0FDRFYsSUFBTUUsV0FBVTtBQUFBLEVBQ3JCLEdBQUc7QUFBQSxFQUNILEdBQUdBO0FBQ0w7IiwKICAibmFtZXMiOiBbIkFjY291bnQiLCAiUHVibGljS2V5IiwgIkFjY291bnQiLCAiUGRhIiwgIkFjY291bnQiXQp9Cg== \ No newline at end of file diff --git a/packages/account/package.json b/packages/account/package.json index bd9f9d6fd..f2b3cfc8f 100644 --- a/packages/account/package.json +++ b/packages/account/package.json @@ -18,7 +18,6 @@ "@solana-suite/config": "workspace:*", "@metaplex-foundation/mpl-bubblegum": "^3.0.0", "@metaplex-foundation/mpl-token-metadata": "^2.13.0", - "@solana/spl-token": "^0.3.8", "bn.js": "^5.2.1", "bs58": "^4.0.1" }, diff --git a/packages/account/src/index.ts b/packages/account/src/index.ts index 31fc9969e..b1993f83e 100644 --- a/packages/account/src/index.ts +++ b/packages/account/src/index.ts @@ -1,8 +1,7 @@ import { Account as Keypair } from './keypair'; import { Account as Pda } from './pda'; - import '~/types/global'; -import '~/global'; +// import '~/global'; export const Account = { ...Keypair, diff --git a/packages/converter/dist/index.d.mts b/packages/converter/dist/index.d.mts new file mode 100644 index 000000000..b9bcdf6f8 --- /dev/null +++ b/packages/converter/dist/index.d.mts @@ -0,0 +1,615 @@ +import { PublicKey, ParsedTransactionWithMeta, TransactionSignature, Keypair } from '@solana/web3.js'; +import { Metadata as Metadata$2, DataV2 } from '@metaplex-foundation/mpl-token-metadata'; +import BN from 'bn.js'; +import { MetadataArgs } from 'mpl-bubblegum-instruction'; + +declare const pubKeyNominality: unique symbol; +declare const secretNominality: unique symbol; +type Pubkey$1 = (string & { + [pubKeyNominality]: never; +}) | string; +type Secret = (string & { + [secretNominality]: never; +}) | string; + +type bignum = number | BN; +type Option = T | null; +declare enum UseMethod { + Burn = 0, + Multiple = 1, + Single = 2 +} +type Uses = { + useMethod: UseMethod; + remaining: bignum; + total: bignum; +}; +type InputCreators = { + address: Pubkey$1; + secret: Secret; + share: number; +}; + +type FileType = string | File; + +type InternalCollection = { + key: PublicKey; + verified: boolean; +}; +type InternalCreators = { + address: PublicKey; + verified: boolean; + share: number; +}; + +type Metadata$1 = { + name: string; + symbol: string; + token_standard: string; +}; +type Grouping = { + group_key: string; + group_value: string; +}; +type Asset = { + interface: string; + id: Pubkey$1; + content: { + json_uri: string; + files: string[]; + metadata: Metadata$1; + links: string[]; + }; + authorities: { + address: Pubkey$1; + scopes: string[]; + }[]; + compression: { + eligible: boolean; + compressed: boolean; + data_hash: Pubkey$1; + creator_hash: Pubkey$1; + asset_hash: Pubkey$1; + tree: Pubkey$1; + seq: number; + leaf_id: number; + }; + grouping: Grouping[]; + royalty: { + royalty_model: 'creators' | 'fanout' | 'single'; + target: null; + percent: number; + basis_points: number; + primary_sale_happened: boolean; + locked: boolean; + }; + creators: InternalCreators[]; + ownership: { + frozen: boolean; + delegated: boolean; + delegate: Pubkey$1; + ownership_model: 'single' | 'token'; + owner: Pubkey$1; + }; + supply: { + print_max_supply: number; + print_current_supply: number; + edition_nonce: number; + }; + mutable: boolean; + burnt: boolean; +}; + +type StorageType = 'nftStorage' | 'arweave' | string; +type MetadataAndOffchain = { + onchain: Metadata$2; + offchain: Offchain; +}; +type AssetAndOffchain = { + onchain: Asset; + offchain: Offchain; +}; +type Offchain = { + name?: string; + symbol?: string; + description?: string; + seller_fee_basis_points?: number; + image?: string; + external_url?: string; + attributes?: Attribute[]; + properties?: Properties; + collection?: { + name?: string; + family?: string; + [key: string]: unknown; + }; + collectionDetails?: { + kind: string; + size: number; + }; + created_at?: number; +}; +type Properties = { + creators?: { + address?: string; + share?: number; + [key: string]: unknown; + }[]; + files?: { + type?: string; + filePath?: FileType; + [key: string]: unknown; + }[]; + [key: string]: unknown; +}; +type Attribute = { + trait_type?: string; + value?: string; + [key: string]: unknown; +}; + +type InputCollection = Pubkey$1; +type Options = { + [key: string]: unknown; +}; +type InputNftMetadata = { + name: string; + symbol: string; + royalty?: number; + storageType?: StorageType; + filePath?: FileType; + uri?: string; + isMutable?: boolean; + description?: string; + external_url?: string; + attributes?: Attribute[]; + properties?: Properties; + maxSupply?: bignum; + creators?: InputCreators[]; + uses?: Uses; + collection?: InputCollection; + options?: Options; +}; + +type Collection = { + address: Pubkey$1; + verified: boolean; +}; + +declare namespace Converter$d { + namespace CompressedNftMetadata { + const intoInfra: (input: InputNftMetadata, uri: string, sellerFeeBasisPoints: number) => MetadataArgs; + } +} + +declare namespace Converter$c { + namespace Collection { + const intoInfra: (input: Option | undefined) => Option; + const intoUser: (output: Option) => Collection | undefined; + } + namespace CollectionMint { + const intoUser: (output: Grouping[]) => Pubkey; + } +} + +declare namespace Converter$b { + namespace Creators { + const intoInfra: (input: Option | undefined) => Option; + const intoCompressedNftInfra: (input: Option | undefined) => InternalCreators[]; + const intoUser: (output: Option) => Creators[] | undefined; + } +} + +type Authority = { + address: Pubkey$1; + scopes: string[]; +}; +type Creators = { + address: Pubkey$1; + share: number; + verified: boolean; +}[]; +type Metadata = { + mint: Pubkey$1; + collectionMint: Pubkey$1; + authorities: Authority[]; + royalty: number; + name: string; + symbol: string; + uri: string; + creators: Creators; + treeAddress: Pubkey$1; + isCompressed: boolean; + isMutable: boolean; + isBurn: boolean; + editionNonce: number; + primarySaleHappened: boolean; + dateTime: Date; + offchain: Offchain; +}; + +declare namespace Converter$a { + namespace Nft { + const intoUser: (output: AssetAndOffchain) => Metadata; + } +} + +type PostTokenAccount = { + account: string; + owner: string; +}; +type MintTo = { + parsed: { + info: { + account: Pubkey$1; + mint: Pubkey$1; + mintAuthority: Pubkey$1; + tokenAmount: string; + }; + type: string; + }; + program: string; + programId?: PublicKey; +}; +type TransferChecked = { + parsed: { + info: { + destination: Pubkey$1; + mint: Pubkey$1; + multisigAuthority: Pubkey$1; + signers: Pubkey$1[]; + source: Pubkey$1; + tokenAmount: string; + }; + type: string; + }; + program: string; + programId?: PublicKey; +}; + +type History = { + sol?: string; + account?: string; + destination?: Pubkey$1; + source?: Pubkey$1; + authority?: Pubkey$1; + multisigAuthority?: Pubkey$1; + signers?: Pubkey$1[]; + mint?: Pubkey$1; + mintAuthority?: Pubkey$1; + tokenAmount?: string; + memo?: string; + dateTime?: Date; + type?: string; + sig?: string; + innerInstruction?: boolean; +}; + +declare namespace Converter$9 { + namespace Memo { + const intoUserSide: (output: Memo, meta: ParsedTransactionWithMeta, outputTransfer?: TransferChecked, mappingTokenAccount?: PostTokenAccount[]) => History | undefined; + } +} + +declare namespace Converter$8 { + namespace Mint { + const intoUserSide: (output: MintTo, meta: ParsedTransactionWithMeta) => History | undefined; + } +} + +declare namespace Converter$7 { + namespace RegularNftMetadata { + const intoInfra: (input: InputNftMetadata, uri: string, sellerFeeBasisPoints: number) => DataV2; + } +} + +declare abstract class AbstractResult { + protected abstract _chain(ok: (value: T) => Result, err: (error: E) => Result): Result; + unwrap(): T; + unwrap(ok: (value: T) => U): U; + unwrap(ok: (value: T) => U, err: (error: E) => V): U | V; + unwrap(ok: (value: T) => U, err: (error: E) => U): U; + map(ok: (value: T) => U): Result; + map(ok: (value: T) => U, err: (error: E) => F): Result; + chain(ok: (value: T) => Result): Result; + chain(ok: (value: T) => Result): Result; + chain(ok: (value: T) => Result, err: (error: E) => Result): Result; + match(ok: (value: T) => U, err: (error: E) => F): void | Promise; + submit(feePayer?: Secret): Promise>; +} +declare global { + interface Array { + submit(feePayer?: Secret): Promise>; + } +} +declare class InternalOk extends AbstractResult { + readonly value: T; + readonly isOk = true; + readonly isErr = false; + constructor(value: T); + protected _chain(ok: (value: T) => Result, _err: (error: E) => Result): Result; +} +declare class InternalErr extends AbstractResult { + readonly error: E; + readonly isOk = false; + readonly isErr = true; + constructor(error: E); + protected _chain(_ok: (value: T) => Result, err: (error: E) => Result): Result; +} +declare namespace Result { + export type Ok = InternalOk; + export type Err = InternalErr; + export function ok(value: T): Result; + export function err(error?: E): Result; + type U = Result; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3]): Result<[ + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2]): Result<[OkType, OkType, OkType], ErrType>; + export function all(obj: [R0, R1]): Result<[OkType, OkType], ErrType>; + export function all(obj: [R0]): Result<[OkType], ErrType>; + export function all(obj: []): Result<[]>; + export function all>(obj: T): Result<{ + [K in keyof T]: T[K] extends Result ? I : never; + }, { + [K in keyof T]: T[K] extends Result ? E : never; + }[keyof T]>; + export {}; +} +type Result = Result.Ok | Result.Err; +type OkType> = R extends Result ? O : never; +type ErrType> = R extends Result ? E : never; + +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 namespace Converter$6 { + namespace Properties { + const intoInfra: (input: Properties | undefined, callbackFunc: (filePath: FileType, storageType: StorageType, feePayer?: Secret) => Promise>, storageType: StorageType, feePayer?: Secret) => Promise; + } +} + +declare namespace Converter$5 { + namespace Royalty { + const THRESHOLD = 100; + const intoInfra: (percentage: number) => number; + const intoUser: (percentage: number) => number; + } +} + +type InputTokenMetadata = { + name: string; + symbol: string; + filePath?: FileType; + uri?: string; + storageType?: StorageType; + description?: string; + royalty?: number; + uses?: Uses; + creators?: InputCreators[]; + attributes?: Attribute[]; + options?: Options; +}; + +declare namespace Converter$4 { + namespace TokenMetadata { + const intoInfra: (input: InputTokenMetadata, uri: string, sellerFeeBasisPoints: number) => DataV2; + const intoUser: (output: MetadataAndOffchain, tokenAmount: string) => TokenMetadata; + const deleteNullStrings: (str: string) => string; + } +} + +declare namespace Converter$3 { + namespace TransferChecked { + const intoUserSide: (output: TransferChecked, meta: ParsedTransactionWithMeta, mappingTokenAccount?: PostTokenAccount[]) => History | undefined; + } +} + +declare namespace Converter$2 { + namespace Transfer { + const intoUserSide: (output: Transfer, meta: ParsedTransactionWithMeta) => History | undefined; + } +} + +declare namespace Converter$1 { + namespace Uses { + const intoUserSide: (output: Option) => Uses | undefined; + } +} + +declare const Converter: { + Uses: typeof Converter$1.Uses; + Transfer: typeof Converter$2.Transfer; + TransferChecked: typeof Converter$3.TransferChecked; + TokenMetadata: typeof Converter$4.TokenMetadata; + Royalty: typeof Converter$5.Royalty; + Properties: typeof Converter$6.Properties; + RegularNftMetadata: typeof Converter$7.RegularNftMetadata; + Mint: typeof Converter$8.Mint; + Memo: typeof Converter$9.Memo; + Nft: typeof Converter$a.Nft; + Creators: typeof Converter$b.Creators; + Collection: typeof Converter$c.Collection; + CollectionMint: typeof Converter$c.CollectionMint; + CompressedNftMetadata: typeof Converter$d.CompressedNftMetadata; +}; + +export { Converter }; diff --git a/packages/converter/dist/index.d.ts b/packages/converter/dist/index.d.ts new file mode 100644 index 000000000..b9bcdf6f8 --- /dev/null +++ b/packages/converter/dist/index.d.ts @@ -0,0 +1,615 @@ +import { PublicKey, ParsedTransactionWithMeta, TransactionSignature, Keypair } from '@solana/web3.js'; +import { Metadata as Metadata$2, DataV2 } from '@metaplex-foundation/mpl-token-metadata'; +import BN from 'bn.js'; +import { MetadataArgs } from 'mpl-bubblegum-instruction'; + +declare const pubKeyNominality: unique symbol; +declare const secretNominality: unique symbol; +type Pubkey$1 = (string & { + [pubKeyNominality]: never; +}) | string; +type Secret = (string & { + [secretNominality]: never; +}) | string; + +type bignum = number | BN; +type Option = T | null; +declare enum UseMethod { + Burn = 0, + Multiple = 1, + Single = 2 +} +type Uses = { + useMethod: UseMethod; + remaining: bignum; + total: bignum; +}; +type InputCreators = { + address: Pubkey$1; + secret: Secret; + share: number; +}; + +type FileType = string | File; + +type InternalCollection = { + key: PublicKey; + verified: boolean; +}; +type InternalCreators = { + address: PublicKey; + verified: boolean; + share: number; +}; + +type Metadata$1 = { + name: string; + symbol: string; + token_standard: string; +}; +type Grouping = { + group_key: string; + group_value: string; +}; +type Asset = { + interface: string; + id: Pubkey$1; + content: { + json_uri: string; + files: string[]; + metadata: Metadata$1; + links: string[]; + }; + authorities: { + address: Pubkey$1; + scopes: string[]; + }[]; + compression: { + eligible: boolean; + compressed: boolean; + data_hash: Pubkey$1; + creator_hash: Pubkey$1; + asset_hash: Pubkey$1; + tree: Pubkey$1; + seq: number; + leaf_id: number; + }; + grouping: Grouping[]; + royalty: { + royalty_model: 'creators' | 'fanout' | 'single'; + target: null; + percent: number; + basis_points: number; + primary_sale_happened: boolean; + locked: boolean; + }; + creators: InternalCreators[]; + ownership: { + frozen: boolean; + delegated: boolean; + delegate: Pubkey$1; + ownership_model: 'single' | 'token'; + owner: Pubkey$1; + }; + supply: { + print_max_supply: number; + print_current_supply: number; + edition_nonce: number; + }; + mutable: boolean; + burnt: boolean; +}; + +type StorageType = 'nftStorage' | 'arweave' | string; +type MetadataAndOffchain = { + onchain: Metadata$2; + offchain: Offchain; +}; +type AssetAndOffchain = { + onchain: Asset; + offchain: Offchain; +}; +type Offchain = { + name?: string; + symbol?: string; + description?: string; + seller_fee_basis_points?: number; + image?: string; + external_url?: string; + attributes?: Attribute[]; + properties?: Properties; + collection?: { + name?: string; + family?: string; + [key: string]: unknown; + }; + collectionDetails?: { + kind: string; + size: number; + }; + created_at?: number; +}; +type Properties = { + creators?: { + address?: string; + share?: number; + [key: string]: unknown; + }[]; + files?: { + type?: string; + filePath?: FileType; + [key: string]: unknown; + }[]; + [key: string]: unknown; +}; +type Attribute = { + trait_type?: string; + value?: string; + [key: string]: unknown; +}; + +type InputCollection = Pubkey$1; +type Options = { + [key: string]: unknown; +}; +type InputNftMetadata = { + name: string; + symbol: string; + royalty?: number; + storageType?: StorageType; + filePath?: FileType; + uri?: string; + isMutable?: boolean; + description?: string; + external_url?: string; + attributes?: Attribute[]; + properties?: Properties; + maxSupply?: bignum; + creators?: InputCreators[]; + uses?: Uses; + collection?: InputCollection; + options?: Options; +}; + +type Collection = { + address: Pubkey$1; + verified: boolean; +}; + +declare namespace Converter$d { + namespace CompressedNftMetadata { + const intoInfra: (input: InputNftMetadata, uri: string, sellerFeeBasisPoints: number) => MetadataArgs; + } +} + +declare namespace Converter$c { + namespace Collection { + const intoInfra: (input: Option | undefined) => Option; + const intoUser: (output: Option) => Collection | undefined; + } + namespace CollectionMint { + const intoUser: (output: Grouping[]) => Pubkey; + } +} + +declare namespace Converter$b { + namespace Creators { + const intoInfra: (input: Option | undefined) => Option; + const intoCompressedNftInfra: (input: Option | undefined) => InternalCreators[]; + const intoUser: (output: Option) => Creators[] | undefined; + } +} + +type Authority = { + address: Pubkey$1; + scopes: string[]; +}; +type Creators = { + address: Pubkey$1; + share: number; + verified: boolean; +}[]; +type Metadata = { + mint: Pubkey$1; + collectionMint: Pubkey$1; + authorities: Authority[]; + royalty: number; + name: string; + symbol: string; + uri: string; + creators: Creators; + treeAddress: Pubkey$1; + isCompressed: boolean; + isMutable: boolean; + isBurn: boolean; + editionNonce: number; + primarySaleHappened: boolean; + dateTime: Date; + offchain: Offchain; +}; + +declare namespace Converter$a { + namespace Nft { + const intoUser: (output: AssetAndOffchain) => Metadata; + } +} + +type PostTokenAccount = { + account: string; + owner: string; +}; +type MintTo = { + parsed: { + info: { + account: Pubkey$1; + mint: Pubkey$1; + mintAuthority: Pubkey$1; + tokenAmount: string; + }; + type: string; + }; + program: string; + programId?: PublicKey; +}; +type TransferChecked = { + parsed: { + info: { + destination: Pubkey$1; + mint: Pubkey$1; + multisigAuthority: Pubkey$1; + signers: Pubkey$1[]; + source: Pubkey$1; + tokenAmount: string; + }; + type: string; + }; + program: string; + programId?: PublicKey; +}; + +type History = { + sol?: string; + account?: string; + destination?: Pubkey$1; + source?: Pubkey$1; + authority?: Pubkey$1; + multisigAuthority?: Pubkey$1; + signers?: Pubkey$1[]; + mint?: Pubkey$1; + mintAuthority?: Pubkey$1; + tokenAmount?: string; + memo?: string; + dateTime?: Date; + type?: string; + sig?: string; + innerInstruction?: boolean; +}; + +declare namespace Converter$9 { + namespace Memo { + const intoUserSide: (output: Memo, meta: ParsedTransactionWithMeta, outputTransfer?: TransferChecked, mappingTokenAccount?: PostTokenAccount[]) => History | undefined; + } +} + +declare namespace Converter$8 { + namespace Mint { + const intoUserSide: (output: MintTo, meta: ParsedTransactionWithMeta) => History | undefined; + } +} + +declare namespace Converter$7 { + namespace RegularNftMetadata { + const intoInfra: (input: InputNftMetadata, uri: string, sellerFeeBasisPoints: number) => DataV2; + } +} + +declare abstract class AbstractResult { + protected abstract _chain(ok: (value: T) => Result, err: (error: E) => Result): Result; + unwrap(): T; + unwrap(ok: (value: T) => U): U; + unwrap(ok: (value: T) => U, err: (error: E) => V): U | V; + unwrap(ok: (value: T) => U, err: (error: E) => U): U; + map(ok: (value: T) => U): Result; + map(ok: (value: T) => U, err: (error: E) => F): Result; + chain(ok: (value: T) => Result): Result; + chain(ok: (value: T) => Result): Result; + chain(ok: (value: T) => Result, err: (error: E) => Result): Result; + match(ok: (value: T) => U, err: (error: E) => F): void | Promise; + submit(feePayer?: Secret): Promise>; +} +declare global { + interface Array { + submit(feePayer?: Secret): Promise>; + } +} +declare class InternalOk extends AbstractResult { + readonly value: T; + readonly isOk = true; + readonly isErr = false; + constructor(value: T); + protected _chain(ok: (value: T) => Result, _err: (error: E) => Result): Result; +} +declare class InternalErr extends AbstractResult { + readonly error: E; + readonly isOk = false; + readonly isErr = true; + constructor(error: E); + protected _chain(_ok: (value: T) => Result, err: (error: E) => Result): Result; +} +declare namespace Result { + export type Ok = InternalOk; + export type Err = InternalErr; + export function ok(value: T): Result; + export function err(error?: E): Result; + type U = Result; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3]): Result<[ + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2]): Result<[OkType, OkType, OkType], ErrType>; + export function all(obj: [R0, R1]): Result<[OkType, OkType], ErrType>; + export function all(obj: [R0]): Result<[OkType], ErrType>; + export function all(obj: []): Result<[]>; + export function all>(obj: T): Result<{ + [K in keyof T]: T[K] extends Result ? I : never; + }, { + [K in keyof T]: T[K] extends Result ? E : never; + }[keyof T]>; + export {}; +} +type Result = Result.Ok | Result.Err; +type OkType> = R extends Result ? O : never; +type ErrType> = R extends Result ? E : never; + +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 namespace Converter$6 { + namespace Properties { + const intoInfra: (input: Properties | undefined, callbackFunc: (filePath: FileType, storageType: StorageType, feePayer?: Secret) => Promise>, storageType: StorageType, feePayer?: Secret) => Promise; + } +} + +declare namespace Converter$5 { + namespace Royalty { + const THRESHOLD = 100; + const intoInfra: (percentage: number) => number; + const intoUser: (percentage: number) => number; + } +} + +type InputTokenMetadata = { + name: string; + symbol: string; + filePath?: FileType; + uri?: string; + storageType?: StorageType; + description?: string; + royalty?: number; + uses?: Uses; + creators?: InputCreators[]; + attributes?: Attribute[]; + options?: Options; +}; + +declare namespace Converter$4 { + namespace TokenMetadata { + const intoInfra: (input: InputTokenMetadata, uri: string, sellerFeeBasisPoints: number) => DataV2; + const intoUser: (output: MetadataAndOffchain, tokenAmount: string) => TokenMetadata; + const deleteNullStrings: (str: string) => string; + } +} + +declare namespace Converter$3 { + namespace TransferChecked { + const intoUserSide: (output: TransferChecked, meta: ParsedTransactionWithMeta, mappingTokenAccount?: PostTokenAccount[]) => History | undefined; + } +} + +declare namespace Converter$2 { + namespace Transfer { + const intoUserSide: (output: Transfer, meta: ParsedTransactionWithMeta) => History | undefined; + } +} + +declare namespace Converter$1 { + namespace Uses { + const intoUserSide: (output: Option) => Uses | undefined; + } +} + +declare const Converter: { + Uses: typeof Converter$1.Uses; + Transfer: typeof Converter$2.Transfer; + TransferChecked: typeof Converter$3.TransferChecked; + TokenMetadata: typeof Converter$4.TokenMetadata; + Royalty: typeof Converter$5.Royalty; + Properties: typeof Converter$6.Properties; + RegularNftMetadata: typeof Converter$7.RegularNftMetadata; + Mint: typeof Converter$8.Mint; + Memo: typeof Converter$9.Memo; + Nft: typeof Converter$a.Nft; + Creators: typeof Converter$b.Creators; + Collection: typeof Converter$c.Collection; + CollectionMint: typeof Converter$c.CollectionMint; + CompressedNftMetadata: typeof Converter$d.CompressedNftMetadata; +}; + +export { Converter }; diff --git a/packages/converter/dist/index.js b/packages/converter/dist/index.js index 51b874e20..fe6d96536 100644 --- a/packages/converter/dist/index.js +++ b/packages/converter/dist/index.js @@ -1424,4 +1424,4 @@ var Converter5 = { 0 && (module.exports = { Converter }); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uL3NyYy9jb2xsZWN0aW9uLnRzIiwgIi4uL3NyYy9jcmVhdG9ycy50cyIsICIuLi9zcmMvY29tcHJlc3NlZC1uZnQtbWV0YWRhdGEudHMiLCAiLi4vc3JjL3JveWFsdHkudHMiLCAiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9iYXRjaC50cyIsICIuLi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3RoIDwgMSkge1xuICAgICAgICAgIHRocm93IEVycm9yKENvbnN0YW50cy5XYXJubmluZ01lc3NhZ2UuREFTX0FQSV9VUkwpO1xuICAgICAgICB9XG4gICAgICAgIGNvbnN0IHVybHMgPSBDb25zdGFudHMuQnVuZGxyVXJsLnByZC5zcGxpdCgnLCcpO1xuICAgICAgICBjb25zdCBpbmRleCA9IERhdGUubm93KCkgJSB1cmxzLmxlbmd0aDtcbiAgICAgICAgcmV0dXJuIHVybHNbaW5kZXhdO1xuICAgICAgfVxuICAgICAgZGVmYXVsdDoge1xuICAgICAgICBjb25zdCB1cmxzID0gQ29uc3RhbnRzLkRhc0FwaVVybC5kZXYuc3BsaXQoJywnKTtcbiAgICAgICAgY29uc3QgaW5kZXggPSBEYXRlLm5vdygpICUgdXJscy5sZW5ndGg7XG4gICAgICAgIHJldHVybiB1cmxzW2luZGV4XTtcbiAgICAgIH1cbiAgICB9XG4gIH07XG5cbiAgZXhwb3J0IGNvbnN0IHN3aXRjaE5mdFN0b3JhZ2UgPSAoZW52OiBzdHJpbmcpOiBzdHJpbmcgPT4ge1xuICAgIHN3aXRjaCAoZW52KSB7XG4gICAgICBjYXNlIENvbnN0YW50cy5DbHVzdGVyLnByZDpcbiAgICAgICAgaWYgKCFuZnRTdG9yYWdlQXBpS2V5KSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoV2Fybm5pbmdNZXNzYWdlLk5GVF9TVE9SQUdFX0FQSV9LRVkpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBuZnRTdG9yYWdlQXBpS2V5O1xuICAgICAgZGVmYXVsdDoge1xuICAgICAgICByZXR1cm4gQ29uc3RhbnRzLk5mdHN0b3JhZ2VBcGlLZXkuZGV2O1xuICAgICAgfVxuICAgIH1cbiAgfTtcblxuICBleHBvcnQgY29uc3QgV1JBUFBFRF9UT0tFTl9QUk9HUkFNX0lEID0gbmV3IFB1YmxpY0tleShcbiAgICAnU28xMTExMTExMTExMTExMTExMTExMTExMTEx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pbHNbXSA9IFtdO1xuICAgICAga2V5cy5tYXAoKGtleSkgPT4ge1xuICAgICAgICBsZXQgcmVzITogUmVzdWx0PHN0cmluZywgVmFsaWRhdG9yRXJyb3I+O1xuICAgICAgICBzd2l0Y2ggKGtleSkge1xuICAgICAgICAgIGNhc2UgJ2ltYWdlJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuaW1hZ2UpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNJbWFnZVVybChtZXRhZGF0YS5pbWFnZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdyb3lhbHR5JzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEucm95YWx0eSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1JveWFsdHkobWV0YWRhdGEucm95YWx0eSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJy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cbiAgICAgICAgZmVlUGF5ZXI/OiBTZWNyZXQsXG4gICAgICApID0+IFByb21pc2U8UmVzdWx0PHN0cmluZywgRXJyb3I+PixcbiAgICAgIHN0b3JhZ2VUeXBlOiBTdG9yYWdlVHlwZSxcbiAgICAgIGZlZVBheWVyPzogU2VjcmV0LFxuICAgICk6IFByb21pc2U8UHJvcGVydGllcz4gPT4ge1xuICAgICAgaWYgKCFpbnB1dCB8fCAhaW5wdXQuZmlsZXMpIHtcbiAgICAgICAgcmV0dXJuIHt9O1xuICAgICAgfVxuXG4gICAgICBjb25zdCBmaWxlcyA9IGF3YWl0IFByb21pc2UuYWxsKFxuICAgICAgICBpbnB1dC5maWxlcy5tYXAoYXN5bmMgKGZpbGUpID0+IHtcbiAgICAgICAgICBpZiAoIWZpbGUuZmlsZVBhdGgpIHtcbiAgICAgICAgICAgIHJldHVybiB7fTtcbiAgICAgICAgICB9XG4gICAgICAgICAgY29uc3QgcmVzID0gYXdhaXQgY2FsbGJhY2tGdW5jKGZpbGUuZmlsZVBhdGgsIHN0b3JhZ2VUeXBlLCBmZWVQYXllcik7XG4gICAgICAgICAgaWYgKHJlcy5pc0Vycikge1xuICAgICAgICAgICAgdGhyb3cgRXJyb3IocmVzLmVycm9yLm1lc3NhZ2UpO1xuICAgICAgICAgIH1cbiAgICAgICAgICByZXR1cm4gb3ZlcndyaXRlT2JqZWN0KGZpbGUsIFtcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgZXhpc3RzS2V5OiAnZmlsZVBhdGgnLFxuICAgICAgICAgICAgICB3aWxsOiB7IGtleTogJ3VyaScsIHZhbHVlOiByZXMudmFsdWUgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgXSk7XG4gICAgICAgIH0pLFxuICAgICAgKTtcbiAgICAgIHJldHVybiB7IC4uLmlucHV0LCBmaWxlcyB9IGFzIFByb3BlcnRpZXM7XG4gICAgfTtcbiAgfVxufVxuIiwgIi8qIGVzbGludC1kaXNhYmxlIEB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hbCIsICJpbXBvcnRfd2ViMyIsICJBY2NvdW50IiwgIlBkYSIsICJCTiIsICJBY2NvdW50IiwgImltcG9ydF9iczU4IiwgIkFjY291bnQiLCAiYnMiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJSZXN1bHQiLCAiVmFsaWRhdG9yIiwgIk1lc3NhZ2UiLCAiQ29udmVydGVyIiwgIkNvbnZlcnRlciIsICJOZnQiLCAiQ29udmVydGVyIiwgIk1lbW8iLCAiQ29udmVydGVyIiwgIk1pbnQiLCAiQ29udmVydGVyIiwgIlJlZ3VsYXJOZnRNZXRhZGF0YSIsICJDb252ZXJ0ZXIiLCAiUHJvcGVydGllcyIsICJDb252ZXJ0ZXIiLCAiVXNlcyIsICJDb252ZXJ0ZXIiLCAiVG9rZW5NZXRhZGF0YSIsICJDb252ZXJ0ZXIiLCAiVHJhbnNmZXJDaGVja2VkIiwgIkNvbnZlcnRlciIsICJUcmFuc2ZlciIsICJDb252ZXJ0ZXIiXQp9Cg== \ No newline at end of file +//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uL3NyYy9jb2xsZWN0aW9uLnRzIiwgIi4uL3NyYy9jcmVhdG9ycy50cyIsICIuLi9zcmMvY29tcHJlc3NlZC1uZnQtbWV0YWRhdGEudHMiLCAiLi4vc3JjL3JveWFsdHkudHMiLCAiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9iYXRjaC50cyIsICIuLi8uLi9ub2RlL3NyYy9pbmRleC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jb21tb24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvbWludC50cyIsICIuLi8uLi90cmFuc2FjdGlvb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zaGFyZTogZGF0YS5zaGFyZSxcbiAgICAgICAgICB2ZXJpZmllZDogZmFsc2UsXG4gICAgICAgIH07XG4gICAgICB9KTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGludG9Db21wcmVzc2VkTmZ0SW5mcmEgPSAoXG4gICAgICBpbnB1dDogT3B0aW9uPElucHV0Q3JlYXRvcnNbXT4gfCB1bmRlZmluZWQsXG4gICAgKTogSW50ZXJuYWxDcmVhdG9yc1tdID0+IHtcbiAgICAgIGlmICghaW5wdXQpIHtcbiAgICAgICAgcmV0dXJuIFtdO1xuICAgICAgfVxuICAgICAgcmV0dXJuIGlucHV0IS5tYXAoKGRhdGEpID0+IHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICBhZGRyZXNzOiBkYXRhLmFkZHJlc3MudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBzaGFyZTogZGF0YS5zaGFyZSxcbiAgICAgICAgICB2ZXJpZmllZDogZmFsc2UsXG4gICAgICAgIH07XG4gICAgICB9KTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGludG9Vc2VyID0gKFxuICAgICAgb3V0cHV0OiBPcHRpb248SW50ZXJuYWxDcmVhdG9yc1tdPixcbiAgICApOiBDcmVhdG9yc1tdIHwgdW5kZWZpbmVkID0+IHtcbiAgICAgIGlmICghb3V0cHV0KSB7XG4gICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBvdXRwdXQubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvU3RyaW5nKCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGRhdGEudmVyaWZpZWQsXG4gICAgICAgIH07XG4gICAgICB9KTtcbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHsgQ29udm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AgICBjYXNlICdpbWFnZSc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLmltYWdlKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzSW1hZ2VVcmwobWV0YWRhdGEuaW1hZ2UpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAncm95YWx0eSc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnJveWFsdHkpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNSb3lhbHR5KG1ldGFkYXRhLnJveWFsdHkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAg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CIsICJpbXBvcnRfYnM1OCIsICJBY2NvdW50IiwgImJzIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiUmVzdWx0IiwgIlZhbGlkYXRvciIsICJNZXNzYWdlIiwgIkNvbnZlcnRlciIsICJDb252ZXJ0ZXIiLCAiTmZ0IiwgIkNvbnZlcnRlciIsICJNZW1vIiwgIkNvbnZlcnRlciIsICJNaW50IiwgIkNvbnZlcnRlciIsICJSZWd1bGFyTmZ0TWV0YWRhdGEiLCAiQ29udmVydGVyIiwgIlByb3BlcnRpZXMiLCAiQ29udmVydGVyIiwgIlVzZXMiLCAiQ29udmVydGVyIiwgIlRva2VuTWV0YWRhdGEiLCAiQ29udmVydGVyIiwgIlRyYW5zZmVyQ2hlY2tlZCIsICJDb252ZXJ0ZXIiLCAiVHJhbnNmZXIiLCAiQ29udmVydGVyIl0KfQo= \ No newline at end of file diff --git a/packages/converter/dist/index.mjs b/packages/converter/dist/index.mjs index 19015e079..ef5e80de3 100644 --- a/packages/converter/dist/index.mjs +++ b/packages/converter/dist/index.mjs @@ -1401,4 +1401,4 @@ var Converter5 = { export { Converter5 as Converter }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2NvbGxlY3Rpb24udHMiLCAiLi4vc3JjL2NyZWF0b3JzLnRzIiwgIi4uL3NyYy9jb21wcmVzc2VkLW5mdC1tZXRhZGF0YS50cyIsICIuLi9zcmMvcm95YWx0eS50cyIsICIuLi8uLi9zdWl0ZS11dGlscy9zcmMvY29uc3RhbnRzLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2JhdGNoLnRzIiwgIi4uLy4uL25vZGUvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2NvbW1vbi50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1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QYXllciAhPT0gdW5kZWZpbmVkKTtcbiAgICAgICAgbGV0IGZlZVBheWVyID0gc2lnbmVyc1swXTtcbiAgICAgICAgaWYgKGZlZVBheWVycy5sZW5ndGggPiAwICYmIGZlZVBheWVyc1swXS5mZWVQYXllcikge1xuICAgICAgICAgIGZlZVBheWVyID0gZmVlUGF5ZXJzWzBdLmZlZVBheWVyO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgdHJhbnNhY3Rpb24gPSBuZXcgVHJhbnNhY3Rpb24oKTtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHNpZ25lcnM7XG4gICAgICAgIGlmIChmZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gZmVlUGF5ZXIucHVibGljS2V5O1xuICAgICAgICAgIGZpbmFsU2lnbmVycyA9IFtmZWVQYXllciwgLi4uc2lnbmVyc107XG4gICAgICAgIH1cbiAgICAgICAgaW5zdHJ1Y3Rpb25zLm1hcCgoaW5zdCkgPT4gdHJhbnNhY3Rpb24uYWRkKGluc3QpKTtcblxuICAgICAgICAvLyBDYWxjdWxhdGVUeHNpemUuaXNNYXhUcmFuc2FjdGlvblNpemUodHJhbnNhY3Rpb24sIGZlZVBheWVyLnB1YmxpY0tleSk7XG5cbiAgICAgICAgY29uc3Qgb3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogTUFYX1JFVFJJRVMsXG4gICAgICAgIH07XG5cbiAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgIG9wdGlvbnMsXG4gICAgICAgICk7XG4gICAgICB9KTtcbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHsgQ29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0lELnRvUHVibGljS2V5KCksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGdldEJndW1TaWduZXIgPSAoKTogUHVibGljS2V5ID0+IHtcbiAgICAgIGNvbnN0IFtwdWJsaWNLZXldID0gUHVibGljS2V5LmZpbmRQcm9ncmFtQWRkcmVzc1N5bmMoXG4gICAgICAgIFtCdWZmZXIuZnJvbSgnY29sbGVjdGlvbl9jcGknLCAndXRmOCcpXSxcbiAgICAgICAgTVBMX0JVQkJMRUdVTV9QUk9HUkFNX0lELnRvUHVibGljS2V5KCksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGdldEFzc2V0SWQgPSAoYWRkcmVzczogUHVia2V5LCBsZWFmSW5kZXg6IG51bWJlcik6IFB1YmtleSA9PiB7XG4gICAgICBjb25zdCBub2RlID0gbmV3IEJOLkJOKGxlYWZJbmRleCk7XG4gICAgICBjb25zdCBbYXNzZXRJZF0gPSBQdWJsaWNLZXkuZmluZFByb2dyYW1BZGRyZXNzU3luYyhcbiAgICAgICAgW1xuICAgICAgICAgIEJ1ZmZlci5mcm9tKCdhc3NldCcsICd1dGY4JyksXG4gICAgICAgICAgYWRkcmVzcy50b1B1YmxpY0tleSgpLnRvQnVmZmVyKCksXG4gICAgICAgICAgVWludDhBcnJheS5mcm9tKG5vZGUudG9BcnJheSgnbGUnLCA4KSksXG4gICAgICAgIF0sXG4gICAgICAgIE1QTF9CVUJCTEVHVU1fUFJPR1JBTV9JRC50b1B1YmxpY0tleSgpLFxuICAgICAgKTtcbiAgICAgIHJldHVybiBhc3NldElkLnRvU3RyaW5nKCk7XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IEFjY291bnQgYXMgS2V5cGFpciB9IGZyb20gJy4va2V5cGFpcic7XG5pbXBvcnQgeyBBY2NvdW50IGFzIFBk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zZSAncm95YWx0eSc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnJveWFsdHkpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNSb3lhbHR5KG1ldGFkYXRhLnJveWFsdHkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEuc3ltYm9sKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU3ltYm9sKG1ldGFkYXRhLnN5bWJvbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhazt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W5zYWN0aW9uQnVpbGRlciIsICJUcmFuc2FjdGlvbiIsICJzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uIiwgIlRyYW5zYWN0aW9uIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJUcmFuc2FjdGlvbiIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiS2V5cGFpciIsICJQdWJsaWNLZXkiLCAiUHVibGljS2V5IiwgIkFjY291bnQiLCAiS2V5cGFpciIsICJQdWJsaWNLZXkiLCAiQWNjb3VudCIsICJQZGEiLCAiQWNjb3VudCIsICJicyIsICJBY2NvdW50IiwgIlB1YmxpY0tleSIsICJLZXlwYWlyIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiUmVzdWx0IiwgIlZhbGlkYXRvciIsICJNZXNzYWdlIiwgIkNvbnZlcnRlciIsICJDb252ZXJ0ZXIiLCAiTmZ0IiwgIkNvbnZlcnRlciIsICJNZW1vIiwgIkNvbnZlcnRlciIsICJNaW50IiwgIkNvbnZlcnRlciIsICJSZWd1bGFyTmZ0TWV0YWRhdGEiLCAiQ29udmVydGVyIiwgIlByb3BlcnRpZXMiLCAiQ29udmVydGVyIiwgIlVzZXMiLCAiQ29udmVydGVyIiwgIlRva2VuTWV0YWRhdGEiLCAiQ29udmVydGVyIiwgIlRyYW5zZmVyQ2hlY2tlZCIsICJDb252ZXJ0ZXIiLCAiVHJhbnNmZXIiLCAiQ29udmVydGVyIl0KfQo= \ No newline at end of file +//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2NvbGxlY3Rpb24udHMiLCAiLi4vc3JjL2NyZWF0b3JzLnRzIiwgIi4uL3NyYy9jb21wcmVzc2VkLW5mdC1tZXRhZGF0YS50cyIsICIuLi9zcmMvcm95YWx0eS50cyIsICIuLi8uLi9zdWl0ZS11dGlscy9zcmMvY29uc3RhbnRzLnRzI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AgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvQ29tcHJlc3NlZE5mdEluZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IEludGVybmFsQ3JlYXRvcnNbXSA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBbXTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBpbnB1dCEubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlciA9IChcbiAgICAgIG91dHB1dDogT3B0aW9uPEludGVybmFsQ3JlYXRvcnNbXT4sXG4gICAgKTogQ3JlYXRvcnNbXSB8IHVuZGVmaW5lZCA9PiB7XG4gICAgICBpZiAoIW91dHB1dCkge1xuICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gb3V0cHV0Lm1hcCgoZGF0YSkgPT4ge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIGFkZHJlc3M6IGRhdGEuYWRkcmVzcy50b1N0cmluZygpLFxuICAgICAgICAgIHNoYXJlOiBkYXRhLnNoYXJlLFxuICAgICAgICAgIHZlcmlmaWVkOiBkYXRhLnZlcmlmaWVkLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IENvbnZlcnRlciBhcyBDb2xsZWN0aW9uIH0gZnJvbS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cj86IFNlY3JldCxcbiAgICAgICkgPT4gUHJvbWlzZTxSZXN1bHQ8c3RyaW5nLCBFcnJvcj4+LFxuICAgICAgc3RvcmFnZVR5cGU6IFN0b3JhZ2VUeXBlLFxuICAgICAgZmVlUGF5ZXI/OiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxQcm9wZXJ0aWVzPiA9PiB7XG4gICAgICBpZiAoIWlucHV0IHx8ICFpbnB1dC5maWxlcykge1xuICAgICAgICByZXR1cm4ge307XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGZpbGVzID0gYXdhaXQgUHJvbWlzZS5hbGwoXG4gICAgICAgIGlucHV0LmZpbGVzLm1hcChhc3luYyAoZmlsZSkgPT4ge1xuICAgICAgICAgIGlmICghZmlsZS5maWxlUGF0aCkge1xuICAgICAgICAgICAgcmV0dXJuIHt9O1xuICAgICAgICAgIH1cbiAgICAgICAgICBjb25zdCByZXMgPSBhd2FpdCBjYWxsYmFja0Z1bmMoZmlsZS5maWxlUGF0aCwgc3RvcmFnZVR5cGUsIGZlZVBheWVyKTtcbiAgICAgICAgICBpZiAocmVzLmlzRXJyKSB7XG4gICAgICAgICAgICB0aHJvdyBFcnJvcihyZXMuZXJyb3IubWVzc2FnZSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBvdmVyd3JpdGVPYmplY3QoZmlsZSwgW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBleGlzdHNLZXk6ICdmaWxlUGF0aCcsXG4gICAgICAgICAgICAgIHdpbGw6IHsga2V5OiAndXJpJywgdmFsdWU6IHJlcy52YWx1ZSB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICBdKTtcbiAgICAgICAgfSksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHsgLi4uaW5wdXQsIGZpbGVzIH0gYXMgUHJvcGVydGllcztcbiAgICB9O1xuICB9XG59XG4iLCAiLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLXV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RlciIsICJUcmFuc2ZlckNoZWNrZWQiLCAiQ29udmVydGVyIiwgIlRyYW5zZmVyIiwgIkNvbnZlcnRlciJdCn0K \ No newline at end of file diff --git a/packages/converter/src/collection-details.ts b/packages/converter/src/collection-details.ts deleted file mode 100644 index fd3f410d0..000000000 --- a/packages/converter/src/collection-details.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { CollectionDetails as MetaplexCollectionDetails } from '@metaplex-foundation/mpl-token-metadata'; -/* eslint-disable @typescript-eslint/no-unused-vars */ -// import { CollectionDetails, Option } from '~/types/regular-nft'; - -export namespace Converter { - // export namespace CollectionDetails { - // export const intoUser = ( - // output: Option, - // ): CollectionDetails | undefined => { - // if (!output) { - // return undefined; - // } - // - // return { - // __kind: output.__kind, - // size: parseInt(output.size.toString(10)), - // }; - // }; - // } -} diff --git a/packages/das-api/dist/index.js b/packages/das-api/dist/index.js index 131c3b918..360aa3c90 100644 --- a/packages/das-api/dist/index.js +++ b/packages/das-api/dist/index.js @@ -1607,4 +1607,4 @@ var DasApi3 = { 0 && (module.exports = { DasApi }); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uLy4uL3N1aXRlLXV0aWxzL3NyYy9jb25zdGFudHMudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvYmF0Y2gudHMiLCAiLi4vLi4vbm9kZS9zcmMvaW5kZXgudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY29tbW9uLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL21pbnQudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvcGFydGlhbC1zaWduLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2NhbGN1bGF0ZS10eHNpemUudHMiLCAiLi4vLi4v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ICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvQ29tcHJlc3NlZE5mdEluZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IEludGVybmFsQ3JlYXRvcnNbXSA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBbXTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBpbnB1dCEubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlciA9IChcbiAgICAgIG91dHB1dDogT3B0aW9uPEludGVybmFsQ3JlYXRvcnNbXT4sXG4gICAgKTogQ3JlYXRvcnNbXSB8IHVuZGVmaW5lZCA9PiB7XG4gICAgICBpZiAoIW91dHB1dCkge1xuICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gb3V0cHV0Lm1hcCgoZGF0YSkgPT4ge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIGFkZHJlc3M6IGRhdGEuYWRkcmVzcy50b1N0cmluZygpLFxuICAgICAgICAgIHNoYXJlOiBkYXRhLnNoYXJlLFxuICAgICAgICAgIHZlcmlmaWVkOiBkYXRhLnZlcmlmaWVkLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IENvbnZlcnRlciBhcyBDb2xsZWN0aW9uIH0gZnJvbSAnLi9jb2xsZWN0aW9uJztcbmltcG9ydCB7IENvbnZlcnRlciBhcyBDcmVhdG9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zID0gYXdhaXQgUHJvbWlzZS5hbGwoXG4gICAgICAgIGlucHV0LmZpbGVzLm1hcChhc3luYyAoZmlsZSkgPT4ge1xuICAgICAgICAgIGlmICghZmlsZS5maWxlUGF0aCkge1xuICAgICAgICAgICAgcmV0dXJuIHt9O1xuICAgICAgICAgIH1cbiAgICAgICAgICBjb25zdCByZXMgPSBhd2FpdCBjYWxsYmFja0Z1bmMoZmlsZS5maWxlUGF0aCwgc3RvcmFnZVR5cGUsIGZlZVBheWVyKTtcbiAgICAgICAgICBpZiAocmVzLmlzRXJyKSB7XG4gICAgICAgICAgICB0aHJvdyBFcnJvcihyZXMuZXJyb3IubWVzc2FnZSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBvdmVyd3JpdGVPYmplY3QoZmlsZSwgW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBleGlzdHNLZXk6ICdmaWxlUGF0aCcsXG4gICAgICAgICAgICAgIHdpbGw6IHsga2V5OiAndXJpJywgdmFsdWU6IHJlcy52YWx1ZSB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICBdKTtcbiAgICAgICAgfSksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHsgLi4uaW5wdXQsIGZpbGVzIH0gYXMgUHJvcGVydGllcztcbiAgICB9O1xuICB9XG59XG4iLCAiLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLXVudXNlZC12YXJzICovXG5pbXBvcnQgeyBPcHRpb24sIFVzZXMgfSBmcm9tICd+L3R5cGVzL3JlZ3VsYXItbmZ0JztcblxuZXhwb3J0IG5hbWVzcGFjZSBDb252ZXJ0ZXIge1xuICBleHBvcnQgbmFtZXNwYWNlIFVzZXMge1xuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlclNpZGUgPSAob3V0cHV0OiBPcHRpb248VXNlcz4pOiBVc2VzIHwgdW5kZWZpbmVkID0+IHtcbiAgICAgIGlmICghb3V0cHV0KSB7XG4gICAgICA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1hZ2VVcmwobWV0YWRhdGEuaW1hZ2UpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAncm95YWx0eSc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnJveWFsdHkpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNSb3lhbHR5KG1ldGFkYXRhLnJveWFsdHkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEuc3ltYm9sKSB7XG4gICAgICAg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9taXNlLmFsbChcbiAgICAgIGl0ZW1zXG4gICAgICAgIC5maWx0ZXIoKGl0ZW0pID0+IGl0ZW0uY29tcHJlc3Npb24uY29tcHJlc3NlZCA9PT0gaXNDb21wcmVzc2VkKVxuICAgICAgICAubWFwKGFzeW5jIChpdGVtKSA9PiB7XG4gICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgIGNvbnN0IG9mZmNoYWluOiBPZmZjaGFpbiA9IGF3YWl0IGZldGNoT2ZmY2hhaW4oXG4gICAgICAgICAgICAgIGl0ZW0uY29udGVudC5qc29uX3VyaSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgICBjb25zdCBtZXJnZWQgPSB7XG4gICAgICAgICAgICAgIG9uY2hhaW46IGl0ZW0sXG4gICAgICAgICAgICAgIG9mZmNoYWluOiBvZmZjaGFpbixcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICByZXR1cm4gQ29udmVydGVyLk5mdC5pbnRvVXNlcihtZXJnZWQpO1xuICAgICAgICAgIH0gY2F0Y2ggKGVycikge1xuICAgICAgICAgICAgZGVidWdMb2coJyMgRmFpbGVkIGZldGNoIG9mZmNoYWluIHVybDogJywgaXRlbS5jb250ZW50Lmpzb25fdXJpKTtcbiAgICAgICAgICAgIHJldHVybiBDb252ZXJ0ZXIuTmZ0LmludG9Vc2VyKHtcbiAgICAgICAgICAgICAgb25jaGFpbjogaXRlbSxcbiAgICAgICAgICAgICAgb2ZmY2hhaW46IHt9LFxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfVxuICAgICAgICB9KSxcbiAgICApO1xuICAgIHJldHVybiB7XG4gICAgICBwYWdlOiBhc3NldHMudmFsdWUucGFnZSxcbiAgICAgIHRvdGFsOiBhc3NldHMudmFsdWUudG90YWwsXG4gICAgICBsaW1pdDogYXNzZXRzLnZhbHVlLmxpbWl0LFxuICAgICAgbWV0YWRhdGFzLFxuICAgIH07XG4gIH07XG5cbiAgLyoqXG4gICAqIEZpbmQgbmZ0IGJ5IG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XRhZGF0YS5pbWFnZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc0ltYWdlVXJsKG1ldGFkYXRhLmltYWdlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3JveWFsdHknOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5yb3lhbHR5KSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzUm95YWx0eShtZXRhZGF0YS5yb3lhbHR5KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlcl9mZWVfYmFzaXNfcG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJGZWVCYXNpc1BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0YWRhdGEubmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzeW1ib2wnOlxuICAgICAgICAg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uICAgIGNvbnN0IGl0ZW1zID0gYXNzZXRzLnZhbHVlLml0ZW1zO1xuXG4gICAgY29uc3QgbWV0YWRhdGFzID0gYXdhaXQgUHJvbWlzZS5hbGwoXG4gICAgICBpdGVtc1xuICAgICAgICAuZmlsdGVyKChpdGVtKSA9PiBpdGVtLmNvbXByZXNzaW9uLmNvbXByZXNzZWQgPT09IGlzQ29tcHJlc3NlZClcbiAgICAgICAgLm1hcChhc3luYyAoaXRlbSkgPT4ge1xuICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICBjb25zdCBvZmZjaGFpbjogT2ZmY2hhaW4gPSBhd2FpdCBmZXRjaE9mZmNoYWluKFxuICAgICAgICAgICAgICBpdGVtLmNvbnRlbnQuanNvbl91cmksXG4gICAgICAgICAgICApO1xuICAgICAgICAgICAgY29uc3QgbWVyZ2VkID0ge1xuICAgICAgICAgICAgICBvbmNoYWluOiBpdGVtLFxuICAgICAgICAgICAgICBvZmZjaGFpbjogb2ZmY2hhaW4sXG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgcmV0dXJuIENvbnZlcnRlci5OZnQuaW50b1VzZXIobWVyZ2VkKTtcbiAgICAgICAgICB9IGNhdGNoIChlcnIpIHtcbiAgICAgICAgICAgIGRlYnVnTG9nKCcjIEZhaWxlZCBmZXRjaCBvZmZjaGFpbiB1cmw6ICcsIGl0ZW0uY29udGVudC5qc29uX3VyaSk7XG4gICAgICAgICAgICByZXR1cm4gQ29udmVydGVyLk5mdC5pbnRvVXNlcih7XG4gICAgICAgICAgICAgIG9uY2hhaW46IGl0ZW0sXG4gICAgICAgICAgICAgIG9mZmNoYWluOiB7fSxcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgIH1cbiAgICAgICAgfSksXG4gICAgKTtcbiAgICByZXR1cm4ge1xuICAgICAgcGFnZTogYXNzZXRzLnZhbHVlLnBhZ2UsXG4gICAgICB0b3RhbDogYXNzZXRzLnZhbHVlLnRvdGFsLFxuICAgICAgbGltaXQ6IGFz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gIkJOIiwgIkFjY291bnQiLCAiaW1wb3J0X2JzNTgiLCAiQWNjb3VudCIsICJicyIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlJlc3VsdCIsICJDb252ZXJ0ZXIiLCAiQ29sbGVjdGlvbiIsICJDb2xsZWN0aW9uTWludCIsICJDb252ZXJ0ZXIiLCAiQ3JlYXRvcnMiLCAiQ29udmVydGVyIiwgIkNvbXByZXNzZWROZnRNZXRhZGF0YSIsICJDb252ZXJ0ZXIiLCAiUm95YWx0eSIsICJDb252ZXJ0ZXIiLCAiTmZ0IiwgIkNvbnZlcnRlciIsICJNZW1vIiwgIkNvbnZlcnRlciIsICJNaW50IiwgIkNvbnZlcnRlciIsICJSZWd1bGFyTmZ0TWV0YWRhdGEiLCAiQ29udmVydGVyIiwgIlByb3BlcnRpZXMiLCAiQ29udmVydGVyIiwgIlVzZXMiLCAiQ29udmVydGVyIiwgIlRva2VuTWV0YWRhdGEiLCAiQ29udmVydGVyIiwgIlRyYW5zZmVyQ2hlY2tlZCIsICJDb252ZXJ0ZXIiLCAiVHJhbnNmZXIiLCAiQ29udmVydGVyIiwgIlZhbGlkYXRvciIsICJNZXNzYWdlIiwgIkNvbnZlcnRlciIsICJEYXNBcGkiLCAiRGFzQXBpIiwgIkNvbnZlcnRlciIsICJEYXNBcGkiXQp9Cg== \ No newline at end of file diff --git a/packages/das-api/dist/index.mjs b/packages/das-api/dist/index.mjs index ad68faaeb..45ecf2806 100644 --- a/packages/das-api/dist/index.mjs +++ b/packages/das-api/dist/index.mjs @@ -1584,4 +1584,4 @@ var DasApi3 = { export { DasApi3 as DasApi }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9iYXRjaC50cyIsIC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dldEJndW1TaWduZXIgPSAoKTogUHVibGljS2V5ID0+IHtcbiAgICAgIGNvbnN0IFtwdWJsaWNLZXldID0gUHVibGljS2V5LmZpbmRQcm9ncmFtQWRkcmVzc1N5bmMoXG4gICAgICAgIFtCdWZmZXIuZnJvbSgnY29sbGVjdGlvbl9jcGknLCAndXRmOCcpXSxcbiAgICAgICAgTVBMX0JVQkJMRUdVTV9QUk9HUkFNX0lELnRvUHVibGljS2V5KCksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGdldEFzc2V0SWQgPSAoYWRkcmVzczogUHVia2V5LCBsZWFmSW5kZXg6IG51bWJlcik6IFB1YmtleSA9PiB7XG4gICAgICBjb25zdCBub2RlID0gbmV3IEJOLkJOKGxlYWZJbmRleCk7XG4gICAgICBjb25zdCBbYXNzZXRJZF0gPSBQdWJsaWNLZXkuZmluZFByb2dyYW1BZGRyZXNzU3luYyhcbiAgICAgICAgW1xuICAgICAgICAgIEJ1ZmZlci5mcm9tKCdhc3NldCcsICd1dGY4JyksXG4gICAgICAgICAgYWRkcmVzcy50b1B1YmxpY0tleSgpLnRvQnVmZmVyKCksXG4gICAgICAgICAgVWludDhBcnJheS5mcm9tKG5vZGUudG9BcnJheSgnbGUnLCA4KSksXG4gICAgICAgIF0sXG4gICAgICAgIE1QTF9CVUJCTEVHVU1fUFJPR1JBTV9JRC50b1B1YmxpY0tleSgpLFxuICAgICAgKTtcbiAgICAgIHJldHVybiBhc3NldElkLnRvU3RyaW5nKCk7XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IEFjY291bnQgYXMgS2V5cGFpciB9IGZyb20gJy4va2V5cGFpcic7XG5pbXBvcnQgeyBBY2NvdW50IGFzIFBkYSB9IGZyb20gJy4vcGRhJztcblxuZXhwb3J0IGNvbnN0IEFjY291bnQgPSB7XG4gIC4uLktleXBhaXIsXG4gIC4uLlBkYSxcbn07XG4iL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AgICAgICByZXR1cm4ge1xuICAgICAgICAgIGFkZHJlc3M6IGRhdGEuYWRkcmVzcy50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIHNoYXJlOiBkYXRhLnNoYXJlLFxuICAgICAgICAgIHZlcmlmaWVkOiBmYWxzZSxcbiAgICAgICAgfTtcbiAgICAgIH0pO1xuICAgIH07XG5cbiAgICBleHBvcnQgY29uc3QgaW50b0NvbXByZXNzZWROZnRJbmZyYSA9IChcbiAgICAgIGlucHV0OiBPcHRpb248SW5wdXRDcmVhdG9yc1tdPiB8IHVuZGVmaW5lZCxcbiAgICApOiBJbnRlcm5hbENyZWF0b3JzW10gPT4ge1xuICAgICAgaWYgKCFpbnB1dCkge1xuICAgICAgICByZXR1cm4gW107XG4gICAgICB9XG4gICAgICByZXR1cm4gaW5wdXQhLm1hcCgoZGF0YSkgPT4ge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIGFkZHJlc3M6IGRhdGEuYWRkcmVzcy50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIHNoYXJlOiBkYXRhLnNoYXJlLFxuICAgICAgICAgIHZlcmlmaWVkOiBmYWxzZSxcbiAgICAgICAgfTtcbiAgICAgIH0pO1xuICAgIH07XG5cbiAgICBleHBvcnQgY29uc3QgaW50b1VzZXIgPSAoXG4gICAgICBvdXRwdXQ6IE9wdGlvbjxJbnRlcm5hbENyZWF0b3JzW10+LFxuICAgICk6IENyZWF0b3JzW10gfCB1bmRlZmluZWQgPT4ge1xuICAgICAgaWYgKCFvdXRwdXQpIHtcbiAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG91dHB1dC5tYXAoKGRhdGEpID0+IHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICBhZGRyZXNzOiBkYXRhLmFkZHJlc3MudG9TdHJpbmcoKSxcbiAgICAgICAgICBzaGFyZTogZGF0YS5zaGFyZSxcbiAgICAgICAgICB2ZXJpZmllZ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HNvcnRCeSxcbiAgICAgIGJlZm9yZSxcbiAgICAgIGFmdGVyLFxuICAgICk7XG4gICAgaWYgKGFzc2V0cy5pc0Vycikge1xuICAgICAgdGhyb3cgYXNzZXRzLmVycm9yO1xuICAgIH1cblxuICAgIGNvbnN0IGl0ZW1zID0gYXNzZXRzLnZhbHVlLml0ZW1zO1xuXG4gICAgY29uc3QgbWV0YWRhdGFzID0gYXdhaXQgUHJvbWlzZS5hbGwoXG4gICAgICBpdGVtc1xuICAgICAgICAuZmlsdGVyKChpdGVtKSA9PiBpdGVtLmNvbXByZXNzaW9uLmNvbXByZXNzZWQgPT09IGlzQ29tcHJlc3NlZClcbiAgICAgICAgLm1hcChhc3luYyAoaXRlbSkgPT4ge1xuICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICBjb25zdCBvZmZjaGFpbjogT2ZmY2hhaW4gPSBhd2FpdCBmZXRjaE9mZmNoYWluKFxuICAgICAgICAgICAgICBpdGVtLmNvbnRlbnQuanNvbl91cmksXG4gICAgICAgICAgICApO1xuICAgICAgICAgICAgY29uc3QgbWVyZ2VkID0ge1xuICAgICAgICAgICAgICBvbmNoYWluOiBpdGVtLFxuICAgICAgICAgICAgICBvZmZjaGFpbjogb2ZmY2hhaW4sXG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgcmV0dXJuIENvbnZlcnRlci5OZnQuaW50b1VzZXIobWVyZ2VkKTtcbiAgICAgICAgICB9IGNhdGNoIChlcnIpIHtcbiAgICAgICAgICAgIGRlYnVnTG9nKCcjIEZhaWxlZCBmZXRjaCBvZmZjaGFpbiB1cmw6ICcsIGl0ZW0uY29udGVudC5qc29uX3VyaSk7XG4gICAgICAgICAgICByZXR1cm4gQ29udmVydGVyLk5mdC5pbnRvVXNlcih7XG4gICAgICAgICAgICAgIG9uY2hhaW46IGl0ZW0sXG4gICAgICAgICAgICAgIG9mZmNoYWluOiB7fSxcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgIH1cbiAgICAgICAgfSks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2hlY2tlZCIsICJDb252ZXJ0ZXIiLCAiVHJhbnNmZXIiLCAiQ29udmVydGVyIiwgIlZhbGlkYXRvciIsICJNZXNzYWdlIiwgIkNvbnZlcnRlciIsICJEYXNBcGkiLCAiRGFzQXBpIiwgIkNvbnZlcnRlciIsICJEYXNBcGkiXQp9Cg== \ No newline at end of file +//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9iYXRjaC50cyIsICIuLi8uLi9ub2RlL3NyYy9pbmRleC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jb21tb24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvbWludC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9wYXJ0aWFsLXNpZ24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY2FsY3VsYXRlLXR4c2l6ZS50cyIsICIuLi8uLi9nbG9iYWwvc3JjL2luZGV4LnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2tleXBhaXIudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvcGRhLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3N1aXRlLXV0aWxzL3NyYy9zaGFyZWQudHMiLCAiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL3Jlc3VsdC50cyIsICIuLi8uLi9jb252ZXJ0ZXIvc3JjL2NvbGxlY3Rpb24udHMiLCAiLi4vLi4vY29udmVydGVyL3NyYy9jcmVhdG9ycy50cyIsICIuLi8uLi9jb252ZXJ0ZXIvc3JjL2NvbXByZ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gICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBudWxsO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4ge1xuICAgICAgICBrZXk6IGlucHV0LnRvUHVibGljS2V5KCksXG4gICAgICAgIHZlcmlmaWVkOiBmYWxzZSxcbiAgICAgIH07XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlciA9IChcbiAgICAgIG91dHB1dDogT3B0aW9uPEludGVybmFsQ29sbGVjdGlvbj4sXG4gICAgKTogQ29sbGVjdGlvblR5cGUgfCB1bmRlZmluZWQgPT4ge1xuICAgICAgaWYgKCFvdXRwdXQpIHtcbiAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIHtcbiAgICAgICAgYWRkcmVzczogb3V0cHV0LmtleS50b1N0cmluZygpLFxuICAgICAgICB2ZXJpZmllZDogb3V0cHV0LnZlcmlmaWVkLFxuICAgICAgfTtcbiAgICB9O1xuICB9XG5cbiAgZXhwb3J0IG5hbWVzcGFjZSBDb2xsZWN0aW9uTWludCB7XG4gICAgZXhwb3J0IGNvbnN0IGludG9Vc2VyID0gKG91dHB1dDogR3JvdXBpbmdbXSk6IFB1YmtleSA9PiB7XG4gICAgICBjb25zdCByZXMgPSBvdXRwdXQuZmluZCgodmFsdWUpID0+IHtcbiAgICAgICAgaWYgKHZhbHVlLmdyb3VwX2tleSA9PT0gJ2NvbGxlY3Rpb24nKSB7XG4gICAgICAgICAgcmV0dXJuIHZhbHVlLmdyb3VwX3ZhbHVlO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIHJldHVybiByZXMgPyByZXMuZ3JvdXBfdmFsdWUgOiAnJztcbiAgICB9O1xuICB9XG59XG4iLCAiLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLXVudXNlZC12YXJzICovXG5pbXBvcnQgeyBDcmVhdG9ycywgSW5wdXRDcmVhdG9ycywgT3B0a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VfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ25hbWUnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLm5hbWUpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNOYW1lKG1ldGFkYXRhLm5hbWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc3ltYm9sJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5zeW1ib2wpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTeW1ib2wobWV0YWRhdGEuc3ltYm9sKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgICAgIGlmIChyZXMgJiYgcmVzLmlzRXJyKSB7XG4gICAgICAgICAgcmVzdWx0cy5wdXNoKC4uLnJlcy5lcnJvci5kZXRhaWxzKTtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgICBpZiAocmVzdWx0cy5sZW5ndGggPiAwKSB7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPVxuICAgICAgICAgICdDYXVnaHQgaW4gdGhlIHZhbGlkYXRpb24gZXJyb3JzLiBzZWUgaW5mb3JtYXRpb24gZS5nOiBlcnI8VmFsa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9uQnVpbGRlciIsICJSZXN1bHQiLCAiQ29udmVydGVyIiwgIkNvbGxlY3Rpb24iLCAiQ29sbGVjdGlvbk1pbnQiLCAiQ29udmVydGVyIiwgIkNyZWF0b3JzIiwgIkNvbnZlcnRlciIsICJDb21wcmVzc2VkTmZ0TWV0YWRhdGEiLCAiQ29udmVydGVyIiwgIlJveWFsdHkiLCAiQ29udmVydGVyIiwgIk5mdCIsICJDb252ZXJ0ZXIiLCAiTWVtbyIsICJDb252ZXJ0ZXIiLCAiTWludCIsICJDb252ZXJ0ZXIiLCAiUmVndWxhck5mdE1ldGFkYXRhIiwgIkNvbnZlcnRlciIsICJQcm9wZXJ0aWVzIiwgIkNvbnZlcnRlciIsICJVc2VzIiwgIkNvbnZlcnRlciIsICJUb2tlbk1ldGFkYXRhIiwgIkNvbnZlcnRlciIsICJUcmFuc2ZlckNoZWNrZWQiLCAiQ29udmVydGVyIiwgIlRyYW5zZmVyIiwgIkNvbnZlcnRlciIsICJWYWxpZGF0b3IiLCAiTWVzc2FnZSIsICJDb252ZXJ0ZXIiLCAiRGFzQXBpIiwgIkRhc0FwaSIsICJDb252ZXJ0ZXIiLCAiRGFzQXBpIl0KfQo= \ No newline at end of file diff --git a/packages/global/dist/index.js b/packages/global/dist/index.js index f0aeb840f..9853c9367 100644 --- a/packages/global/dist/index.js +++ b/packages/global/dist/index.js @@ -1408,4 +1408,4 @@ Number.prototype.toSol = function() { Number.prototype.toLamports = function() { return (0, import_bignumber.BigNumber)(this).times(import_web39.LAMPORTS_PER_SOL).toNumber(); }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uLy4uL3N1aXRlLXV0aWxzL3NyYy9jb25zdGFudHMudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvYmF0Y2gudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMv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hZGF0YS5yb3lhbHR5KSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzUm95YWx0eShtZXRhZGF0YS5yb3lhbHR5KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlcl9mZWVfYmFzaXNfcG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJGZWVCYXNpc1BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0YWRhdGEubmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzeW1ib2wnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLnN5bWJvbCkge1xuICAgICAgICAgICAgICByZXMgPSBpc1N5bWJvbChtZXRhZGF0YS5zeW1ib2wpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHJlcyAmJiByZXMuaXNFcnIpIHtcbiAgICAgICAgICByZXN1b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iAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICBhZGRyZXNzOiBkYXRhLmFkZHJlc3MudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBzaGFyZTogZGF0YS5zaGFyZSxcbiAgICAgICAgICB2ZXJpZmllZDogZmFsc2UsXG4gICAgICAgIH07XG4gICAgICB9KTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGludG9Db21wcmVzc2VkTmZ0SW5mcmEgPSAoXG4gICAgICBpbnB1dDogT3B0aW9uPElucHV0Q3JlYXRvcnNbXT4gfCB1bmRlZmluZWQsXG4gICAgKTogSW50ZXJuYWxDcmVhdG9yc1tdID0+IHtcbiAgICAgIGlmICghaW5wdXQpIHtcbiAgICAgICAgcmV0dXJuIFtdO1xuICAgICAgfVxuICAgICAgcmV0dXJuIGlucHV0IS5tYXAoKGRhdGEpID0+IHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICBhZGRyZXNzOiBkYXRhLmFkZHJlc3MudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBzaGFyZTogZGF0YS5zaGFyZSxcbiAgICAgICAgICB2ZXJpZmllZDogZmFsc2UsXG4gICAgICAgIH07XG4gICAgICB9KTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGludG9Vc2VyID0gKFxuICAgICAgb3V0cHV0OiBPcHRpb248SW50ZXJuYWxDcmVhdG9yc1tdPixcbiAgICApOiBDcmVhdG9yc1tdIHwgdW5kZWZpbmVkID0+IHtcbiAgICAgIGlmICghb3V0cHV0KSB7XG4gICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBvdXRwdXQubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvU3RyaW5nKCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZp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PHN0cmluZywgVmFsaWRhdG9yRXJyb3I+O1xuICAgICAgICBzd2l0Y2ggKGtleSkge1xuICAgICAgICAgIGNhc2UgJ2ltYWdlJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuaW1hZ2UpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNJbWFnZVVybChtZXRhZGF0YS5pbWFnZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdyb3lhbHR5JzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEucm95YWx0eSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1JveWFsdHkobWV0YWRhdGEucm95YWx0eSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ25hbWUnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLm5hbWUpIHt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0ZXIiLCAiVG9rZW5NZXRhZGF0YSIsICJDb252ZXJ0ZXIiLCAiVHJhbnNmZXJDaGVja2VkIiwgIkNvbnZlcnRlciIsICJUcmFuc2ZlciIsICJDb252ZXJ0ZXIiLCAiVmFsaWRhdG9yIiwgIk1lc3NhZ2UiLCAiQ29udmVydGVyIiwgImltcG9ydF93ZWIzIiwgIk5vZGUiLCAiUmVzdWx0IiwgImltcG9ydF9iczU4IiwgIkFjY291bnQiLCAiYnMiXQp9Cg== \ No newline at end of file diff --git a/packages/global/dist/index.mjs b/packages/global/dist/index.mjs index 3f7e246e1..577837122 100644 --- a/packages/global/dist/index.mjs +++ b/packages/global/dist/index.mjs @@ -1398,4 +1398,4 @@ Number.prototype.toSol = function() { Number.prototype.toLamports = function() { return BigNumber(this).times(LAMPORTS_PER_SOL).toNumber(); }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uLy4uL3N1aXRlLXV0aWxzL3NyYy9jb25zdGFudHMudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvYmF0Y2gudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY29tbW9uLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL21pbnQudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvcGFydGlhbC1zaWduLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2NhbGN1bGF0ZS10eHNpemUudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvaW5kZXgudHMiLCAiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL3NoYXJlZC50cyIsICIuLi8uLi9zdWl0ZS11dGlscy9zcmMvcmVzdWx0LnRzIiwgIi4uLy4uL2FjY291bnQvc3Jj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7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJGZWVCYXNpc1BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0YWRhdGEubmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzeW1ib2wnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLnN5bWJvbCkge1xuICAgICAgICAgICAgICByZXMgPSBpc1N5bWJvbChtZXRhZGF0YS5zeW1ib2wpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHJlcyAmJiByZXMuaXNFcnIpIHtcbiAgICAgICAgICByZXN1bHRzLnB1c2goLi4ucmVzLmVycm9yLmRldGFpbHMpO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIGlmIChyZXN1bHRzLmxlbmd0aCA+IDApIHtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9XG4gICAgICAgICAgJ0NhdWdodCBpbiB0aGUgdmFsaWRhdGlvbiBlcnJvcnMuIHNlZSBpbmZvcm1hdGlvbiBlLmc6IGVycjxWYWxpZGF0b3JFcnJvcj4uZGV0YWlscyc7XG4gICAgICAgIHRocm93IG5ldyBWYWxpZGF0b3JFcnJvcihtZXNzYWdlLCByZXN1bHRzKTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBNZXNzYWdlLlNVQ0NF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0aW9uQnVpbGRlciIsICJUcmFuc2FjdGlvbiIsICJzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uIiwgIlRyYW5zYWN0aW9uIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJUcmFuc2FjdGlvbiIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlJlc3VsdCIsICJSZXN1bHQiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlB1YmxpY0tleSIsICJBY2NvdW50IiwgIktleXBhaXIiLCAiUHVibGljS2V5IiwgIkFjY291bnQiLCAiUGRhIiwgIkFjY291bnQiLCAiQ29udmVydGVyIiwgIkNvbGxlY3Rpb24iLCAiQ29sbGVjdGlvbk1pbnQiLCAiQ29udmVydGVyIiwgIkNyZWF0b3JzIiwgIkNvbnZlcnRlciIsICJDb21wcmVzc2VkTmZ0TWV0YWRhdGEiLCAiQ29udmVydGVyIiwgIlJveWFsdHkiLCAiQ29udmVydGVyIiwgIk5mdCIsICJDb252ZXJ0ZXIiLCAiTWVtbyIsICJDb252ZXJ0ZXIiLCAiTWludCIsICJDb252ZXJ0ZXIiLCAiUmVndWxhck5mdE1ldGFkYXRhIiwgIkNvbnZlcnRlciIsICJQcm9wZXJ0aWVzIiwgIkNvbnZlcnRlciIsICJVc2VzIiwgIkNvbnZlcnRlciIsICJUb2tlbk1ldGFkYXRhIiwgIkNvbnZlcnRlciIsICJUcmFuc2ZlckNoZWNrZWQiLCAiQ29udmVydGVyIiwgIlRyYW5zZmVyIiwgIkNvbnZlcnRlciIsICJWYWxpZGF0b3IiLCAiTWVzc2FnZSIsICJDb252ZXJ0ZXIiLCAiTm9kZSIsICJSZXN1bHQiLCAiYnMiLCAiQWNjb3VudCIsICJQdWJsaWNLZXkiLCAiS2V5cGFpciJdCn0K \ No newline at end of file +//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3J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SxcbiAgICAgICAgICB2ZXJpZmllZDogZmFsc2UsXG4gICAgICAgIH07XG4gICAgICB9KTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGludG9Db21wcmVzc2VkTmZ0SW5mcmEgPSAoXG4gICAgICBpbnB1dDogT3B0aW9uPElucHV0Q3JlYXRvcnNbXT4gfCB1bmRlZmluZWQsXG4gICAgKTogSW50ZXJuYWxDcmVhdG9yc1tdID0+IHtcbiAgICAgIGlmICghaW5wdXQpIHtcbiAgICAgICAgcmV0dXJuIFtdO1xuICAgICAgfVxuICAgICAgcmV0dXJuIGlucHV0IS5tYXAoKGRhdGEpID0+IHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICBhZGRyZXNzOiBkYXRhLmFkZHJlc3MudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBzaGFyZTogZGF0YS5zaGFyZSxcbiAgICAgICAgICB2ZXJpZmllZDogZmFsc2UsXG4gICAgICAgIH07XG4gICAgICB9KTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGludG9Vc2VyID0gKFxuICAgICAgb3V0cHV0OiBPcHRpb248SW50ZXJuYWxDcmVhdG9yc1tdPixcbiAgICApOiBDcmVhdG9yc1tdIHwgdW5kZWZpbmVkID0+IHtcbiAgICAgIGlmICghb3V0cHV0KSB7XG4gICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBvdXRwdXQubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvU3RyaW5nKCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGRhdGEudmVyaWZpZWQsXG4gICAgICAgIH07XG4gICAgICB9KTtcbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHsgQ29udmVydGVyIGFzIENvbGxlY3Rp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oTWV0YSxcbiAgICAgIG1hcHBpbmdUb2tlbkFjY291bnQ/OiBQb3N0VG9rZW5BY2NvdW50W10sXG4gICAgKTogSGlzdG9yeSB8IHVuZGVmaW5lZCA9PiB7XG4gICAgICBjb25zdCBoaXN0b3J5OiBIaXN0b3J5ID0ge307XG5cbiAgICAgIGlmIChtYXBwaW5nVG9rZW5BY2NvdW50KSB7XG4gICAgICAgIGNvbnN0IGZvdW5kU291cmNlID0gbWFwcGluZ1Rva2VuQWNjb3VudC5maW5kKFxuICAgICAgICAgIChtKSA9PiBtLmFjY291bnQgPT09IG91dHB1dC5wYXJzZWQuaW5mby5zb3VyY2UsXG4gICAgICAgICk7XG4gICAgICAgIGNvbnN0IGZvdW5kRGVzdCA9IG1hcHBpbmdUb2tlbkFjY291bnQuZmluZChcbiAgICAgICAgICAobSkgPT4gbS5hY2NvdW50ID09PSBvdXRwdXQucGFyc2VkLmluZm8uZGVzdGluYXRpb24sXG4gICAgICAgICk7XG4gICAgICAgIGZvdW5kU291cmNlICYmIChoaXN0b3J5LnNvdXJjZSA9IGZvdW5kU291cmNlLm93bmVyKTtcbiAgICAgICAgZm91bmREZXN0ICYmIChoaXN0b3J5LmRlc3RpbmF0aW9uID0gZm91bmREZXN0Lm93bmVyKTtcbiAgICAgIH1cblxuICAgICAgaGlzdG9yeS50b2tlbkFtb3VudCA9IG91dHB1dC5wYXJzZWQuaW5mby50b2tlbkFtb3VudDtcbiAgICAgIGhpc3RvcnkubWludCA9IG91dHB1dC5wYXJzZWQuaW5mby5taW50O1xuICAgICAgaGlzdG9yeS5tdWx0aXNpZ0F1dGhvcml0eSA9IG91dHB1dC5wYXJzZWQuaW5mby5tdWx0aXNpZ0F1dGhvcml0eTtcbiAgICAgIGhpc3Rvcnkuc2lnbmVycyA9IG91dHB1dC5wYXJzZWQuaW5mby5zaWduZXJzO1xuICAgICAgaGlzdG9yeS50eXBlID0gb3V0cHV0LnByb2dyYW07XG4gICAgICBoaXN0b3J5LmRhdGVUaW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kgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuaW1hZ2UpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNJbWFnZVVybChtZXRhZGF0YS5pbWFnZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdyb3lhbHR5JzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEucm95YWx0eSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1JveWFsdHkobWV0YWRhdGEucm95YWx0eSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ25hbWUnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLm5hbWUpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNOYW1lKG1ldGFkYXRhLm5hbWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc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ldGFkYXRhIiwgIkNvbnZlcnRlciIsICJSb3lhbHR5IiwgIkNvbnZlcnRlciIsICJOZnQiLCAiQ29udmVydGVyIiwgIk1lbW8iLCAiQ29udmVydGVyIiwgIk1pbnQiLCAiQ29udmVydGVyIiwgIlJlZ3VsYXJOZnRNZXRhZGF0YSIsICJDb252ZXJ0ZXIiLCAiUHJvcGVydGllcyIsICJDb252ZXJ0ZXIiLCAiVXNlcyIsICJDb252ZXJ0ZXIiLCAiVG9rZW5NZXRhZGF0YSIsICJDb252ZXJ0ZXIiLCAiVHJhbnNmZXJDaGVja2VkIiwgIkNvbnZlcnRlciIsICJUcmFuc2ZlciIsICJDb252ZXJ0ZXIiLCAiVmFsaWRhdG9yIiwgIk1lc3NhZ2UiLCAiQ29udmVydGVyIiwgIk5vZGUiLCAiUmVzdWx0IiwgImJzIiwgIkFjY291bnQiLCAiUHVibGljS2V5IiwgIktleXBhaXIiXQp9Cg== \ No newline at end of file diff --git a/packages/node/dist/index.js b/packages/node/dist/index.js index 83d701cdd..653eacaee 100644 --- a/packages/node/dist/index.js +++ b/packages/node/dist/index.js @@ -1424,4 +1424,4 @@ var Node; 0 && (module.exports = { Node }); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uLy4uL3N1aXRlLXV0aWxzL3NyYy9jb25zdGFudHMudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvYmF0Y2gudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY29tbW9uLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL21pbnQudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvcGFydGlhbC1zaWduLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2NhbGN1bGF0ZS10eHN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c3MgQmF0Y2gge1xuICAgIHN1Ym1pdCA9IGFzeW5jIChcbiAgICAgIGFycjogQ29tbW9uLkNvbW1vbltdIHwgTWludC5NaW50W10sXG4gICAgKTogUHJvbWlzZTxSZXN1bHQ8VHJhbnNhY3Rpb25TaWduYXR1cmUsIEVycm9yPj4gPT4ge1xuICAgICAgcmV0dXJuIFRyeShhc3luYyAoKSA9PiB7XG4gICAgICAgIGxldCBpID0gMDtcbiAgICAgICAgZm9yIChjb25zdCBhIG9mIGFycikge1xuICAgICAgICAgIGlmICghYS5pbnN0cnVjdGlvbnMgJiYgIWEuc2lnbmVycykge1xuICAgICAgICAgICAgdGhyb3cgRXJyb3IoXG4gICAgICAgICAgICAgIGBvbmx5IEluc3RydWN0aW9uIG9iamVjdCB0aGF0IGNhbiB1c2UgYmF0Y2hTdWJtaXQoKS5cbiAgICAgICAgICAgIEluZGV4OiAke2l9LCBTZXQgdmFsdWU6ICR7SlNPTi5zdHJpbmdpZnkoYSl9YCxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIGkrKztcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IGluc3RydWN0aW9ucyA9IGFyci5mbGF0TWFwKChhKSA9PiBhLmluc3RydWN0aW9ucyk7XG4gICAgICAgIGNvbnN0IHNpZ25lcnMgPSBhcnIuZmxhdE1hcCgoYSkgPT4gYS5zaWduZXJzKTtcbiAgICAgICAgY29uc3QgZmVlUGF5ZXJzID0gYXJyLmZpbHRlcigoYSkgPT4gYS5mZWVQYXllciAhPT0gdW5kZWZpbmVkKTtcbiAgICAgICAgbGV0IGZlZVBheWVyID0gc2lnbmVyc1swXTtcbiAgICAgICAgaWYgKGZlZVBheWVycy5sZW5ndGggPiAwICYmIGZlZVBheWVyc1swXS5mZWVQYXllcikge1xuICAgICAgICAgIGZlZVBheWVyID0gZmVlUGF5ZXJzWzBdLmZlZVBheWVyO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgdHJhbnN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bWFnZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdyb3lhbHR5JzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEucm95YWx0eSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1JveWFsdHkobWV0YWRhdGEucm95YWx0eSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ25hbWUnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLm5hbWUpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNOYW1lKG1ldGFkYXRhLm5hbWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc3ltYm9sJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5zeW1ib2wpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTeW1ib2wobWV0YWR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ICAgICB9XG4gICAgICByZXR1cm4gaW5wdXQubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvQ29tcHJlc3NlZE5mdEluZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IEludGVybmFsQ3JlYXRvcnNbXSA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBbXTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBpbnB1dCEubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlciA9IChcbiAgICAgIG91dHB1dDogT3B0aW9uPEludGVybmFsQ3JlYXRvcnNbXT4sXG4gICAgKTogQ3JlYXRvcnNbXSB8IHVuZGVmaW5lZCA9PiB7XG4gICAgICBpZiAoIW91dHB1dCkge1xuICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gb3V0cHV0Lm1hcCgoZGF0YSkgPT4ge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIGFkZHJlc3M6IGRhdGEuYWRkcmVzcy50b1N0cmluZygpLFxuICAgICAgICAgIH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Jvcj4+LFxuICAgICAgc3RvcmFnZVR5cGU6IFN0b3JhZ2VUeXBlLFxuICAgICAgZmVlUGF5ZXI/OiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxQcm9wZXJ0aWVzPiA9PiB7XG4gICAgICBpZiAoIWlucHV0IHx8ICFpbnB1dC5maWxlcykge1xuICAgICAgICByZXR1cm4ge307XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGZpbGVzID0gYXdhaXQgUHJvbWlzZS5hbGwoXG4gICAgICAgIGlucHV0LmZpbGVzLm1hcChhc3luYyAoZmlsZSkgPT4ge1xuICAgICAgICAgIGlmICghZmlsZS5maWxlUGF0aCkge1xuICAgICAgICAgICAgcmV0dXJuIHt9O1xuICAgICAgICAgIH1cbiAgICAgICAgICBjb25zdCByZXMgPSBhd2FpdCBjYWxsYmFja0Z1bmMoZmlsZS5maWxlUGF0aCwgc3RvcmFnZVR5cGUsIGZlZVBheWVyKTtcbiAgICAgICAgICBpZiAocmVzLmlzRXJyKSB7XG4gICAgICAgICAgICB0aHJvdyBFcnJvcihyZXMuZXJyb3IubWVzc2FnZSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBvdmVyd3JpdGVPYmplY3QoZmlsZSwgW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBleGlzdHNLZXk6ICdmaWxlUGF0aCcsXG4gICAgICAgICAgICAgIHdpbGw6IHsga2V5OiAndXJpJywgdmFsdWU6IHJlcy52YWx1ZSB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICBdKTtcbiAgICAgICAgfSksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHsgLi4uaW5wdXQsIGZpbGVzIH0gYXMgUHJvcGVydGllcztcbiAgICB9O1xuICB9XG59XG4iLCAiLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLXVudXNlZC12YXJzICovXG5pbXBvcnQgeyBPcHRpb24sIFVzZXMgfSBmcm9tICd+L3R5cGVz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ZXkpID0+IHtcbiAgICAgICAgbGV0IHJlcyE6IFJlc3VsdDxzdHJpbmcsIFZhbGlkYXRvckVycm9yPjtcbiAgICAgICAgc3dpdGNoIChrZXkpIHtcbiAgICAgICAgICBjYXNlICdpbWFnZSc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLmltYWdlKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzSW1hZ2VVcmwobWV0YWRhdGEuaW1hZ2UpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAncm95YWx0eSc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnJveWFsdHkpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNSb3lhbHR5KG1ldGFkYXRhLnJveWFsdHkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduY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ICJDb252ZXJ0ZXIiLCAiVHJhbnNmZXJDaGVja2VkIiwgIkNvbnZlcnRlciIsICJUcmFuc2ZlciIsICJDb252ZXJ0ZXIiLCAiVmFsaWRhdG9yIiwgIk1lc3NhZ2UiLCAiQ29udmVydGVyIiwgImltcG9ydF93ZWIzIiwgIk5vZGUiLCAiUmVzdWx0Il0KfQo= \ No newline at end of file diff --git a/packages/node/dist/index.mjs b/packages/node/dist/index.mjs index 31328fa59..6e2c15245 100644 --- a/packages/node/dist/index.mjs +++ b/packages/node/dist/index.mjs @@ -1401,4 +1401,4 @@ var Node; export { Node }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9iYXRjaC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jb21tb24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvbWludC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9wYXJ0aWFsLXNpZ24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY2FsY3VsYXRlLXR4c2l6ZS50cyIsICIuLi8uLi9nbG9iYWwvc3JjL2luZGV4LnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2tleXBhaXIudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvcGRhLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3N1aXRlLXV0aWxzL3NyYy9zaGFyZWQudHMiLCAiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL3Jlc3VsdC50cyIsICIuLi8uLi9jb252ZXJ0ZXIvc3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xuICAgICk6IE9wdGlvbjxJbnRlcm5hbENyZWF0b3JzW10+ID0+IHtcbiAgICAgIGlmICghaW5wdXQpIHtcbiAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICB9XG4gICAgICByZXR1cm4gaW5wdXQubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvQ29tcHJlc3NlZE5mdEluZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IEludGVybmFsQ3JlYXRvcnNbXSA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBbXTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBpbnB1dCEubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlciA9IChcbiAgICAgIG91dHB1dDogT3B0aW9uPEludGVybmFsQ3JlYXRvcnNbXT4sXG4gICAgKTogQ3JlYXRvcnNbXSB8IHVuZGVmaW5lZCA9PiB7XG4gICAgICBpZiAoIW91dHB1dCkge1xuICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gb3V0cHV0Lm1hc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cGU6IFN0b3JhZ2VUeXBlLFxuICAgICAgICBmZWVQYXllcj86IFNlY3JldCxcbiAgICAgICkgPT4gUHJvbWlzZTxSZXN1bHQ8c3RyaW5nLCBFcnJvcj4+LFxuICAgICAgc3RvcmFnZVR5cGU6IFN0b3JhZ2VUeXBlLFxuICAgICAgZmVlUGF5ZXI/OiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxQcm9wZXJ0aWVzPiA9PiB7XG4gICAgICBpZiAoIWlucHV0IHx8ICFpbnB1dC5maWxlcykge1xuICAgICAgICByZXR1cm4ge307XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGZpbGVzID0gYXdhaXQgUHJvbWlzZS5hbGwoXG4gICAgICAgIGlucHV0LmZpbGVzLm1hcChhc3luYyAoZmlsZSkgPT4ge1xuICAgICAgICAgIGlmICghZmlsZS5maWxlUGF0aCkge1xuICAgICAgICAgICAgcmV0dXJuIHt9O1xuICAgICAgICAgIH1cbiAgICAgICAgICBjb25zdCByZXMgPSBhd2FpdCBjYWxsYmFja0Z1bmMoZmlsZS5maWxlUGF0aCwgc3RvcmFnZVR5cGUsIGZlZVBheWVyKTtcbiAgICAgICAgICBpZiAocmVzLmlzRXJyKSB7XG4gICAgICAgICAgICB0aHJvdyBFcnJvcihyZXMuZXJyb3IubWVzc2FnZSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBvdmVyd3JpdGVPYmplY3QoZmlsZSwgW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBleGlzdHNLZXk6ICdmaWxlUGF0aCcsXG4gICAgICAgICAgICAgIHdpbGw6IHsga2V5OiAndXJpJywgdmFsdWU6IHJlcy52YWx1ZSB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICBdKTtcbiAgICAgICAgfSksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHsgLi4uaW5wdXQsIGZpbGVzIH0gYXMgUHJvcGVydGllcztcbiAgICB9O1xuICB9XG59XG4iLCAiLyogZXNsaW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GtleXMgPSBPYmplY3Qua2V5cyhtZXRhZGF0YSk7XG4gICAgICBjb25zdCByZXN1bHRzOiBEZXRhaWxzW10gPSBbXTtcbiAgICAgIGtleXMubWFwKChrZXkpID0+IHtcbiAgICAgICAgbGV0IHJlcyE6IFJlc3VsdDxzdHJpbmcsIFZhbGlkYXRvckVycm9yPjtcbiAgICAgICAgc3dpdGNoIChrZXkpIHtcbiAgICAgICAgICBjYXNlICdpbWFnZSc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLmltYWdlKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzSW1hZ2VVcmwobWV0YWRhdGEuaW1hZ2UpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAncm95YWx0eSc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnJveWFsdHkpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNSb3lhbHR5KG1ldGFkYXRhLnJveWFsdHkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEuc3ltYm9sKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU3ltYm9sKG1ldGFkYXRhLnN5bWJvbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAocmVzICYmIHJlcy5pc0Vycikge1xuICAgICAgICAgIHJlc3VsdHMucHVzaCguLi5yZXMuZXJyb3IuZGV0YWlscyk7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgICAgaWYgKHJlc3VsdHMubGVuZ3RoID4gMCkge1xuICAgICAgICBjb25zdCBtZXNzYWdlID1cbiAgICAgICAgICAnQ2F1Z2h0IGluIHRoZSB2YWxpZGF0aW9uIGVycm9ycy4gc2VlIGluZm9ybWF0aW9uIGUuZzogZXJyPFZhbGlkYXRvckVycm9yPi5kZXRhaWxzJztcbiAgICAgICAgdGhyb3cgbmV3IFZhbGlkYXRvckVycm9yKG1lc3NhZ2UsIHJlc3VsdHMpO1xuICAgICAgfVxuICAgICAgcmV0dXJuIE1lc3NhZ2UuU1VDQ0VTUztcbiAgICB9KTtcbiAgfTtcblxuICB0eXBlIFBpY2tOZnRTdG9yYWdlID0gUGljazxcbiAgICBPZmZjaGFpbixcbiAgICAnbmFtZScgfCAnc3ltYm9sJyB8ICdpbWFnZScgfCAnc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMnXG4gID47XG4gIHR5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CAiQWNjb3VudCIsICJQdWJsaWNLZXkiLCAiS2V5cGFpciIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiUmVzdWx0IiwgIlJlc3VsdCIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiQ29udmVydGVyIiwgIkNvbGxlY3Rpb24iLCAiQ29sbGVjdGlvbk1pbnQiLCAiQ29udmVydGVyIiwgIkNyZWF0b3JzIiwgIkNvbnZlcnRlciIsICJDb21wcmVzc2VkTmZ0TWV0YWRhdGEiLCAiQ29udmVydGVyIiwgIlJveWFsdHkiLCAiQ29udmVydGVyIiwgIk5mdCIsICJDb252ZXJ0ZXIiLCAiTWVtbyIsICJDb252ZXJ0ZXIiLCAiTWludCIsICJDb252ZXJ0ZXIiLCAiUmVndWxhck5mdE1ldGFkYXRhIiwgIkNvbnZlcnRlciIsICJQcm9wZXJ0aWVzIiwgIkNvbnZlcnRlciIsICJVc2VzIiwgIkNvbnZlcnRlciIsICJUb2tlbk1ldGFkYXRhIiwgIkNvbnZlcnRlciIsICJUcmFuc2ZlckNoZWNrZWQiLCAiQ29udmVydGVyIiwgIlRyYW5zZmVyIiwgIkNvbnZlcnRlciIsICJWYWxpZGF0b3IiLCAiTWVzc2FnZSIsICJDb252ZXJ0ZXIiLCAiTm9kZSIsICJSZXN1bHQiXQp9Cg== \ No newline at end of file +//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9iYXRjaC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jb21tb24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvbWludC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9wYXJ0aWFsLXNpZ24udHMiLCAiLi4vLi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lKChhY2MsIGl4KSA9PiB7XG4gICAgICBpeC5rZXlzLmZvckVhY2goKHsgcHVia2V5LCBpc1NpZ25lciB9KSA9PiB7XG4gICAgICAgIGNvbnN0IHBrID0gcHVia2V5LnRvQmFzZTU4KCk7XG4gICAgICAgIGlmIChpc1NpZ25lcikgc2lnbmVycy5hZGQocGspO1xuICAgICAgICBhY2NvdW50cy5hZGQocGspO1xuICAgICAgfSk7XG5cbiAgICAgIGFjY291bnRzLmFkZChpeC5wcm9ncmFtSWQudG9CYXNlNTgoKSk7XG5cbiAgICAgIGNvbnN0IG5JbmRleGVzID0gaXgua2V5cy5sZW5ndGg7XG4gICAgICBjb25zdCBvcGFxdWVEYXRhID0gaXguZGF0YS5sZW5ndGg7XG5cbiAgICAgIHJldHVybiAoXG4gICAgICAgIGFjYyArXG4gICAgICAgIDEgKyAvLyBQSUQgaW5kZXhcbiAgICAgICAgY29tcGFjdEFycmF5U2l6ZShuSW5kZXhlcywgMSkgK1xuICAgICAgICBjb21wYWN0QXJyYXlTaXplKG9wYXF1ZURhdGEsIDEpXG4gICAgICApO1xuICAgIH0sIDApO1xuXG4gICAgcmV0dXJuIChcbiAgICAgIGNvbXBhY3RBcnJheVNpemUoc2lnbmVycy5zaXplLCA2NCkgKyAvLyBzaWduYXR1cmVzXG4gICAgICAzICsgLy8gaGVhZGVyXG4gICAgICBjb21wYWN0QXJyYXlTaXplKGFjY291bnRzLnNpemUsIDMyKSArIC8vIGFjY291bnRzXG4gICAgICAzMiArIC8vIGJsb2NraGFzaFxuICAgICAgY29tcGFjdEhlYWRlcih0cmFuc2FjdGlvbi5pbnN0cnVjdGlvbnMubGVuZ3RoKSArIC8vIGluc3RydWN0aW9uc1xuICAgICAgaXhzU2l6ZVxuICAgICk7XG4gIH07XG5cbiAgLyoqXG4gICAqIElzIG1heCB0cmFuc2FjdGlvbiBzaXplXG4gICAqIEBwYXJhbSB0cmFuc2FjdGlvbiBhIHNvbGFuYSB0cmFuc2FjdGlvblxuICAgK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3NlbGxlcl9mZWVfYmFzaXNfcG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJGZWVCYXNpc1BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0YWRhdGEubmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzeW1ib2wnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLnN5bWJvbCkge1xuICAgICAgICAgICAgICByZXMgPSBpc1N5bWJvbChtZXRhZGF0YS5zeW1ib2wpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHJlcyAmJiByZXMuaXNFcnIpIHtcbiAgICAgICAgICByZXN1bHRzLnB1c2goLi4ucmVzLmVycm9yLmRldGFpbHMpO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIGlmIChyZXN1bHRzLmxlbmd0aCA+IDApIHtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9XG4gICAgICAgIC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kNvbnZlcnRlciIsICJUcmFuc2ZlciIsICJDb252ZXJ0ZXIiLCAiVmFsaWRhdG9yIiwgIk1lc3NhZ2UiLCAiQ29udmVydGVyIiwgIk5vZGUiLCAiUmVzdWx0Il0KfQo= \ No newline at end of file diff --git a/packages/storage/dist/index.d.mts b/packages/storage/dist/index.d.mts index 68b0d04e4..c912cc899 100644 --- a/packages/storage/dist/index.d.mts +++ b/packages/storage/dist/index.d.mts @@ -1,4 +1,4 @@ -import { TransactionSignature, PublicKey, Transaction, Keypair } from '@solana/web3.js'; +import { TransactionSignature, PublicKey, Keypair, Transaction } from '@solana/web3.js'; import BN from 'bn.js'; declare const pubKeyNominality: unique symbol; @@ -219,6 +219,35 @@ type Result = Result.Ok | Result.Err; type OkType> = R extends Result ? O : never; type ErrType> = R extends Result ? E : never; +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; +}; + type bignum = number | BN; declare enum UseMethod { Burn = 0, @@ -317,35 +346,6 @@ type InputNftMetadata = { options?: Options; }; -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 namespace Arweave { const uploadFile: (filePath: FileType, feePayer: Secret) => Promise>; const uploadData: (metadata: Offchain, feePayer: Secret) => Promise>; diff --git a/packages/storage/dist/index.d.ts b/packages/storage/dist/index.d.ts index 68b0d04e4..c912cc899 100644 --- a/packages/storage/dist/index.d.ts +++ b/packages/storage/dist/index.d.ts @@ -1,4 +1,4 @@ -import { TransactionSignature, PublicKey, Transaction, Keypair } from '@solana/web3.js'; +import { TransactionSignature, PublicKey, Keypair, Transaction } from '@solana/web3.js'; import BN from 'bn.js'; declare const pubKeyNominality: unique symbol; @@ -219,6 +219,35 @@ type Result = Result.Ok | Result.Err; type OkType> = R extends Result ? O : never; type ErrType> = R extends Result ? E : never; +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; +}; + type bignum = number | BN; declare enum UseMethod { Burn = 0, @@ -317,35 +346,6 @@ type InputNftMetadata = { options?: Options; }; -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 namespace Arweave { const uploadFile: (filePath: FileType, feePayer: Secret) => Promise>; const uploadData: (metadata: Offchain, feePayer: Secret) => Promise>; diff --git a/packages/storage/dist/index.js b/packages/storage/dist/index.js index f45eaad40..9cbc047c1 100644 --- a/packages/storage/dist/index.js +++ b/packages/storage/dist/index.js @@ -1656,4 +1656,4 @@ var Storage; ProvenanceLayer, Storage }); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uLy4uL3N1aXRlLXV0aWxzL3NyYy9jb25zdGFudHMudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvYmF0Y2gudHMiLCAiLi4vLi4vbm9kZS9zcmMvaW5kZXgudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY29tbW9uLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL21pbnQudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvcGFydGlhbC1zaWduLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2NhbGN1bGF0ZS10eHNpemUudHMiLCAiLi4vLi4vZ2xvYmFsL3NyYy9pbmRleC50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9rZXlwYWlyLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL3BkYS50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9pbmRleC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9pbmRleC50cyIsICIuLi8uLi9zdWl0ZS11dGlscy9zcmMvc2hhcmVkLnRzIiwgIi4uLy4uL3N1aXRlLXV0aWxzL3NyYy9yZXN1bHQudHMiLCAiLi4vLi4vY29udmVydGVyL3NyYy9jb2xsZWN0aW9uLnRzIiwgIi4uLy4uL2NvbnZlcnRlci9zcmMvY3JlYXRvcnMudHMiLCAiLi4vLi4vY29udmVydGVyL3NyYy9jb21wcmVzc2VkLW5mdC1tZXRhZGF0YS50cyIsICIuLi8uLi9jb252ZXJ0ZXIvc3JjL3JveWFsdHkudHMiLCAiLi4vL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B9IGZyb20gJ34vdHlwZXMvcmVndWxhci1uZnQnO1xuaW1wb3J0IHsgSW50ZXJuYWxDcmVhdG9ycyB9IGZyb20gJ34vdHlwZXMvY29udmVydGVyJztcblxuZXhwb3J0IG5hbWVzcGFjZSBDb252ZXJ0ZXIge1xuICBleHBvcnQgbmFtZXNwYWNlIENyZWF0b3JzIHtcbiAgICBleHBvcnQgY29uc3QgaW50b0luZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IE9wdGlvbjxJbnRlcm5hbENyZWF0b3JzW10+ID0+IHtcbiAgICAgIGlmICghaW5wdXQpIHtcbiAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICB9XG4gICAgICByZXR1cm4gaW5wdXQubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvQ29tcHJlc3NlZE5mdEluZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IEludGVybmFsQ3JlYXRvcnNbXSA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBbXTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBpbnB1dCEubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZW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W50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEuc3ltYm9sKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU3ltYm9sKG1ldGFkYXRhLnN5bWJvbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAocmVzICYmIHJlcy5pc0Vycikge1xuICAgICAgICAgIHJlc3VsdHMucHVzaCguLi5yZXMuZXJyb3IuZGV0YWlscyk7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgICAgaWYgKHJlc3VsdHMubGVuZ3RoID4gMCkge1xuICAgICAgICBjb25zdCBtZXNzYWdlID1cbiAgICAgICAgICAnQ2F1Z2h0IGluIHRoZSB2YWxpZGF0aW9uIGVycm9ycy4gc2VlIGluZm9ybWF0aW9uIGUuZzogZXJyPFZhbGlkYXRvckVycm9yPi5kZXRhaWxz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dGFudHMuRW5kUG9pbnRVcmwubG9jYWxob3N0O1xuICAgIH1cbiAgfTtcblxuICBleHBvcnQgY29uc3Qgc3dpdGNoQnVuZGxyID0gKGVudjogc3RyaW5nKTogc3RyaW5nID0+IHtcbiAgICBzd2l0Y2ggKGVudikge1xuICAgICAgY2FzZSBDb25zdGFudHMuQ2x1c3Rlci5wcmQ6IHtcbiAgICAgICAgY29uc3QgdXJscyA9IENvbnN0YW50cy5CdW5kbHJVcmwucHJkLnNwbGl0KCcsJyk7XG4gICAgICAgIGNvbnN0IGluZGV4ID0gRGF0ZS5ub3coKSAlIHVybHMubGVuZ3RoO1xuICAgICAgICByZXR1cm4gdXJsc1tpbmRleF07XG4gICAgICB9XG4gICAgICBkZWZhdWx0OiB7XG4gICAgICAgIHJldHVybiBDb25zdGFudHMuQnVuZGxyVXJsLmRldjtcbiAgICAgIH1cbiAgICB9XG4gIH07XG5cbiAgZXhwb3J0IGNvbnN0IHN3aXRjaERhc0FwaSA9IChlbnY6IHN0cmluZyk6IHN0cmluZyA9PiB7XG4gICAgc3dpdGNoIChlbnYpIHtcbiAgICAgIGNhc2UgQ29uc3RhbnRzLkNsdXN0ZXIucHJkOiB7XG4gICAgICAgIGlmIChkYXNBcGlVcmwubGVuZ3RoIDwgMSkge1xuICAgICAgICAgIHRocm93IEVycm9yKENvbnN0YW50cy5XYXJubmluZ01lc3NhZ2UuREFTX0FQSV9VUkwpO1xuICAgICAgICB9XG4gICAgICAgIGNvbnN0IHVybHMgPSBDb25zdGFudHMuQnVuZGxyVXJsLnByZC5zcGxpdCgnLCcpO1xuICAgICAgICBjb25zdCBpbmRleCA9IERhdGUubm93KCkgJSB1cmxzLmxlbmd0aDtcbiAgICAgICAgcmV0dXJuIHVybHNbaW5kZXhdO1xuICAgICAgfVxuICAgICAgZGVmYXVsdDoge1xuICAgICAgICBjb25zdCB1cmxzID0gQ29uc3RhbnRzLkRhc0FwaVVybC5kZXYuc3BsaXQoJywnKTtcbiAgICAgICAgY29u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gIHJldHVybiBudWxsO1xuICAgICAgfVxuICAgICAgcmV0dXJuIGlucHV0Lm1hcCgoZGF0YSkgPT4ge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIGFkZHJlc3M6IGRhdGEuYWRkcmVzcy50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIHNoYXJlOiBkYXRhLnNoYXJlLFxuICAgICAgICAgIHZlcmlmaWVkOiBmYWxzZSxcbiAgICAgICAgfTtcbiAgICAgIH0pO1xuICAgIH07XG5cbiAgICBleHBvcnQgY29uc3QgaW50b0NvbXByZXNzZWROZnRJbmZyYSA9IChcbiAgICAgIGlucHV0OiBPcHRpb248SW5wdXRDcmVhdG9yc1tdPiB8IHVuZGVmaW5lZCxcbiAgICApOiBJbnRlcm5hbENyZWF0b3JzW10gPT4ge1xuICAgICAgaWYgKCFpbnB1dCkge1xuICAgICAgICByZXR1cm4gW107XG4gICAgICB9XG4gICAgICByZXR1cm4gaW5wdXQhLm1hcCgoZGF0YSkgPT4ge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIGFkZHJlc3M6IGRhdGEuYWRkcmVzcy50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIHNoYXJlOiBkYXRhLnNoYXJlLFxuICAgICAgICAgIHZlcmlmaWVkOiBmYWxzZSxcbiAgICAgICAgfTtcbiAgICAgIH0pO1xuICAgIH07XG5cbiAgICBleHBvcnQgY29uc3QgaW50b1VzZXIgPSAoXG4gICAgICBvdXRwdXQ6IE9wdGlvbjxJbnRlcm5hbENyZWF0b3JzW10+LFxuICAgICk6IENyZWF0b3JzW10gfCB1bmRlZmluZWQgPT4ge1xuICAgICAgaWYgKCFvdXRwdXQpIHtcbiAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG91dHB1dC5tYXAoKGRhdGEpID0+IHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICBhZGRyZXNzOiBkYXRhLmFkZHJlc3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WNyZXQsXG4gICAgICApID0+IFByb21pc2U8UmVzdWx0PHN0cmluZywgRXJyb3I+PixcbiAgICAgIHN0b3JhZ2VUeXBlOiBTdG9yYWdlVHlwZSxcbiAgICAgIGZlZVBheWVyPzogU2VjcmV0LFxuICAgICk6IFByb21pc2U8UHJvcGVydGllcz4gPT4ge1xuICAgICAgaWYgKCFpbnB1dCB8fCAhaW5wdXQuZmlsZXMpIHtcbiAgICAgICAgcmV0dXJuIHt9O1xuICAgICAgfVxuXG4gICAgICBjb25zdCBmaWxlcyA9IGF3YWl0IFByb21pc2UuYWxsKFxuICAgICAgICBpbnB1dC5maWxlcy5tYXAoYXN5bmMgKGZpbGUpID0+IHtcbiAgICAgICAgICBpZiAoIWZpbGUuZmlsZVBhdGgpIHtcbiAgICAgICAgICAgIHJldHVybiB7fTtcbiAgICAgICAgICB9XG4gICAgICAgICAgY29uc3QgcmVzID0gYXdhaXQgY2FsbGJhY2tGdW5jKGZpbGUuZmlsZVBhdGgsIHN0b3JhZ2VUeXBlLCBmZWVQYXllcik7XG4gICAgICAgICAgaWYgKHJlcy5pc0Vycikge1xuICAgICAgICAgICAgdGhyb3cgRXJyb3IocmVzLmVycm9yLm1lc3NhZ2UpO1xuICAgICAgICAgIH1cbiAgICAgICAgICByZXR1cm4gb3ZlcndyaXRlT2JqZWN0KGZpbGUsIFtcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgZXhpc3RzS2V5OiAnZmlsZVBhdGgnLFxuICAgICAgICAgICAgICB3aWxsOiB7IGtleTogJ3VyaScsIHZhbHVlOiByZXMudmFsdWUgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgXSk7XG4gICAgICAgIH0pLFxuICAgICAgKTtcbiAgICAgIHJldHVybiB7IC4uLmlucHV0LCBmaWxlcyB9IGFzIFByb3BlcnRpZXM7XG4gICAgfTtcbiAgfVxufVxuIiwgIi8qIGVzbGludC1kaXNhYmxlIEB0eXBlc2NyaXB0LWVzbGludC9uby11bnVz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iwgIlRyYW5zZmVyQ2hlY2tlZCIsICJDb252ZXJ0ZXIiLCAiVHJhbnNmZXIiLCAiQ29udmVydGVyIiwgIlZhbGlkYXRvciIsICJNZXNzYWdlIiwgIkNvbnZlcnRlciIsICJQcm92ZW5hbmNlTGF5ZXIiLCAidXBsb2FkRmlsZSIsICJJcnlzIiwgIkFyd2VhdmUiLCAiaW1wb3J0X25mdCIsICJOZnRTdG9yYWdlIiwgIlN0b3JhZ2UiXQp9Cg== \ No newline at end of file diff --git a/packages/storage/dist/index.mjs b/packages/storage/dist/index.mjs index 5ad45dea9..fb15eb868 100644 --- a/packages/storage/dist/index.mjs +++ b/packages/storage/dist/index.mjs @@ -1630,4 +1630,4 @@ export { ProvenanceLayer, Storage }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9iYXRjaC50cyIsICIuLi8uLi9ub2RlL3NyYy9pbmRleC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jb21tb24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvbWludC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9wYXJ0aWFsLXNpZ24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY2FsY3VsYXRlLXR4c2l6ZS50cyIsICIuLi8uLi9nbG9iYWwvc3JjL2luZGV4LnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2tleXBhaXIudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvcGRhLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2luZGV4LnRzIiwgIi4uLy4uL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4gICAgZXhwb3J0IGNvbnN0IGludG9JbmZyYSA9IChcbiAgICAgIGlucHV0OiBPcHRpb248SW5wdXRDb2xsZWN0aW9uPiB8IHVuZGVmaW5lZCxcbiAgICApOiBPcHRpb248SW50ZXJuYWxDb2xsZWN0aW9uPiA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBudWxsO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4ge1xuICAgICAgICBrZXk6IGlucHV0LnRvUHVibGljS2V5KCksXG4gICAgICAgIHZlcmlmaWVkOiBmYWxzZSxcbiAgICAgIH07XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlciA9IChcbiAgICAgIG91dHB1dDogT3B0aW9uPEludGVybmFsQ29sbGVjdGlvbj4sXG4gICAgKTogQ29sbGVjdGlvblR5cGUgfCB1bmRlZmluZWQgPT4ge1xuICAgICAgaWYgKCFvdXRwdXQpIHtcbiAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIHtcbiAgICAgICAgYWRkcmVzczogb3V0cHV0LmtleS50b1N0cmluZygpLFxuICAgICAgICB2ZXJpZmllZDogb3V0cHV0LnZlcmlmaWVkLFxuICAgICAgfTtcbiAgICB9O1xuICB9XG5cbiAgZXhwb3J0IG5hbWVzcGFjZSBDb2xsZWN0aW9uTWludCB7XG4gICAgZXhwb3J0IGNvbnN0IGludG9Vc2VyID0gKG91dHB1dDogR3JvdXBpbmdbXSk6IFB1YmtleSA9PiB7XG4gICAgICBjb25zdCByZXMgPSBvdXRwdXQuZmluZCgodmFsdWUpID0+IHtcbiAgICAgICAgaWYgKHZhbHVlLmdyb3VwX2tleSA9PT0gJ2NvbGxlY3Rpb24nKSB7XG4gICAgICAgICAgcmV0dXJuIHZhbHVlLmdyb3VwX3ZhbHVlO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIHJldHVybiByZXMgPyByZXMuZ3JvdX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4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ25hbWUnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLm5hbWUpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNOYW1lKG1ldGFkYXRhLm5hbWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc3ltYm9sJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5zeW1ib2wpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTeW1ib2wobWV0YWRhdGEuc3ltYm9sKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgICAgIGlmIChyZXMgJiYgcmVzLmlzRXJyKSB7XG4gICAgICAgICAgcmVzdWx0cy5wdXNoKC4uLnJlcy5lcnJvci5kZXRhaWxzKTtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgICBp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jY291bnQge1xuICBleHBvcnQgbmFtZXNwYWNlIFBkYSB7XG4gICAgZXhwb3J0IGNvbnN0IGdldE1ldGFkYXRhID0gKGFkZHJlc3M6IFB1YmtleSk6IFB1YmxpY0tleSA9PiB7XG4gICAgICBjb25zdCBbcHVibGljS2V5XSA9IFB1YmxpY0tleS5maW5kUHJvZ3JhbUFkZHJlc3NTeW5jKFxuICAgICAgICBbXG4gICAgICAgICAgQnVmZmVyLmZyb20oJ21ldGFkYXRhJyksXG4gICAgICAgICAgUFJPR1JBTV9JRC50b0J1ZmZlcigpLFxuICAgICAgICAgIGFkZHJlc3MudG9QdWJsaWNLZXkoKS50b0J1ZmZlcigpLFxuICAgICAgICBdLFxuICAgICAgICBQUk9HUkFNX0lELFxuICAgICAgKTtcbiAgICAgIHJldHVybiBwdWJsaWNLZXk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBnZXRNYXN0ZXJFZGl0aW9uID0gKGFkZHJlc3M6IFB1YmtleSk6IFB1YmxpY0tleSA9PiB7XG4gICAgICBjb25zdCBbcHVibGljS2V5XSA9IFB1YmxpY0tleS5maW5kUHJvZ3JhbUFkZHJlc3NTeW5jKFxuICAgICAgICBbXG4gICAgICAgICAgQnVmZmVyLmZyb20oJ21ldGFkYXRhJyksXG4gICAgICAgICAgUFJPR1JBTV9JRC50b0J1ZmZlcigpLFxuICAgICAgICAgIGFkZHJlc3MudG9QdWJsaWNLZXkoKS50b0J1ZmZlcigpLFxuICAgICAgICAgIEJ1ZmZlci5mcm9tKCdlZGl0aW9uJyksXG4gICAgICAgIF0sXG4gICAgICAgIFBST0dSQU1fSUQsXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGdldFRyZWVBdXRob3JpdHkgPSAoYWRkcmVzczogUHVia2V5KTogUHVibGljS2V5ID0+IHtcbiAgICAgIGNvbnN0IFtwdWJsaWNLZXldID0gUHVibGljS2V5Lm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34vdHlwZXMvY29udmVydGVyJztcblxuZXhwb3J0IG5hbWVzcGFjZSBDb252ZXJ0ZXIge1xuICBleHBvcnQgbmFtZXNwYWNlIENyZWF0b3JzIHtcbiAgICBleHBvcnQgY29uc3QgaW50b0luZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IE9wdGlvbjxJbnRlcm5hbENyZWF0b3JzW10+ID0+IHtcbiAgICAgIGlmICghaW5wdXQpIHtcbiAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICB9XG4gICAgICByZXR1cm4gaW5wdXQubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvQ29tcHJlc3NlZE5mdEluZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IEludGVybmFsQ3JlYXRvcnNbXSA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBbXTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBpbnB1dCEubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlci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VfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEuc3ltYm9sKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU3ltYm9sKG1ldGFkYXRhLnN5bWJvbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAocmVzICYmIHJlcy5pc0Vycikge1xuICAgICAgICAgIHJlc3VsdHMucHVzaCguLi5yZXMuZXJyb3IuZGV0YWlscyk7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgICAgaWYgKHJlc3VsdHMubGVuZ3RoID4gMCkge1xuICAgICAgICBjb25zdCBtZXNzYWdlID1cbiAgICAgICAgICAnQ2F1Z2h0IGluIHRoZSB2YWxpZGF0aW9uIGVycm9ycy4gc2VlIGluZm9ybWF0aW9uIGUuZzogZXJyPFZhbGlkYXRvckVycm9yPi5kZXRhaWxzJztcbiAgICAgICAgdGhyb3cgbmV3IFZhbGlkYXRvckVycm9yKG1lc3NhZ2UsIHJlc3VsdHMpO1xuICAgICAgfVxuIC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VibGljS2V5IiwgIkFjY291bnQiLCAiUGRhIiwgIkFjY291bnQiLCAiYnMiLCAiQWNjb3VudCIsICJQdWJsaWNLZXkiLCAiS2V5cGFpciIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlJlc3VsdCIsICJDb252ZXJ0ZXIiLCAiQ29sbGVjdGlvbiIsICJDb2xsZWN0aW9uTWludCIsICJDb252ZXJ0ZXIiLCAiQ3JlYXRvcnMiLCAiQ29udmVydGVyIiwgIkNvbXByZXNzZWROZnRNZXRhZGF0YSIsICJDb252ZXJ0ZXIiLCAiUm95YWx0eSIsICJDb252ZXJ0ZXIiLCAiTmZ0IiwgIkNvbnZlcnRlciIsICJNZW1vIiwgIkNvbnZlcnRlciIsICJNaW50IiwgIkNvbnZlcnRlciIsICJSZWd1bGFyTmZ0TWV0YWRhdGEiLCAiQ29udmVydGVyIiwgIlByb3BlcnRpZXMiLCAiQ29udmVydGVyIiwgIlVzZXMiLCAiQ29udmVydGVyIiwgIlRva2VuTWV0YWRhdGEiLCAiQ29udmVydGVyIiwgIlRyYW5zZmVyQ2hlY2tlZCIsICJDb252ZXJ0ZXIiLCAiVHJhbnNmZXIiLCAiQ29udmVydGVyIiwgIlZhbGlkYXRvciIsICJNZXNzYWdlIiwgIkNvbnZlcnRlciIsICJQcm92ZW5hbmNlTGF5ZXIiLCAidXBsb2FkRmlsZSIsICJBcndlYXZlIiwgIk5mdFN0b3JhZ2UiLCAiU3RvcmFnZSJdCn0K \ No newline at end of file diff --git a/packages/suite-airdrop/dist/index.js b/packages/suite-airdrop/dist/index.js index c5a756576..ee74cd879 100644 --- a/packages/suite-airdrop/dist/index.js +++ b/packages/suite-airdrop/dist/index.js @@ -1448,4 +1448,4 @@ var Airdrop; 0 && (module.exports = { Airdrop }); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiw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T0gJycpIHtcbiAgICAgICAgaWYgKG1hcHBpbmdUb2tlbkFjY291bnQgJiYgb3V0cHV0VHJhbnNmZXIucHJvZ3JhbSA9PT0gJ3NwbC10b2tlbicpIHtcbiAgICAgICAgICBjb25zdCBmb3VuZFNvdXJjZSA9IG1hcHBpbmdUb2tlbkFjY291bnQuZmluZChcbiAgICAgICAgICAgIChtKSA9PiBtLmFjY291bnQgPT09IG91dHB1dFRyYW5zZmVyLnBhcnNlZC5pbmZvLnNvdXJjZSxcbiAgICAgICAgICApO1xuICAgICAgICAgIGNvbnN0IGZvdW5kRGVzdCA9IG1hcHBpbmdUb2tlbkFjY291bnQuZmluZChcbiAgICAgICAgICAgIChtKSA9PiBtLmFjY291bnQgPT09IG91dHB1dFRyYW5zZmVyLnBhcnNlZC5pbmZvLmRlc3RpbmF0aW9uLFxuICAgICAgICAgICk7XG5cbiAgICAgICAgICBoaXN0b3J5Lm1pbnQgPSBvdXRwdXRUcmFuc2Zlci5wYXJzZWQuaW5mby5taW50O1xuICAgICAgICAgIGZvdW5kU291cmNlICYmIChoaXN0b3J5LnNvdXJjZSA9IGZvdW5kU291cmNlLm93bmVyKTtcbiAgICAgICAgICBmb3VuZERlc3QgJiYgKGhpc3RvcnkuZGVzdGluYXRpb24gPSBmb3VuZERlc3Qub3duZXIpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIGhpc3Rvcnkuc291cmNlID0gb3V0cHV0VHJhbnNmZXIucGFyc2VkLmluZm8uc291cmNlO1xuICAgICAgICAgIGhpc3RvcnkuZGVzdGluYXRpb24gPSBvdXRwdXRUcmFuc2Zlci5wYXJzZWQuaW5mby5kZXN0aW5hdGlvbjtcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICBoaXN0b3J5Lm1lbW8gPSBvdXRwdXQucGFyc2VkO1xuICAgICAgaGlzdG9yeS50eXBlID0gb3V0cHV0LnByb2dyYW07XG4gICAgICBoaXN0b3J5LmRhdGVUaW1lID0gY29udmVydFRpb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ZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJGZWVCYXNpc1BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0YWRhdGEubmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzeW1ib2wnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLnN5bWJvbCkge1xuICAgICAgICAgICAgICByZXMgPSBpc1N5bWJvbChtZXRhZGF0YS5zeW1ib2wpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHJlcyAmJiByZXMuaXNFcnIpIHtcbiAgICAgICAgICByZXN1bHRzLnB1c2goLi4ucmVzLmVycm9yLmRldGFpbHMpO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIGlmIChyZXN1bHRzLmxlbmd0aCA+IDApIHtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9XG4gICAgICAgICAgJ0NhdWdodCBpbiB0aGUgdmFsaWRhdGlvbiBlcnJvcnMuIHNlZSBpb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Pj4gPT4ge1xuICAgICAgcmV0dXJuIFRyeShhc3luYyAoKSA9PiB7XG4gICAgICAgIGxldCBpID0gMDtcbiAgICAgICAgZm9yIChjb25zdCBhIG9mIGFycikge1xuICAgICAgICAgIGlmICghYS5pbnN0cnVjdGlvbnMgJiYgIWEuc2lnbmVycykge1xuICAgICAgICAgICAgdGhyb3cgRXJyb3IoXG4gICAgICAgICAgICAgIGBvbmx5IEluc3RydWN0aW9uIG9iamVjdCB0aGF0IGNhbiB1c2UgYmF0Y2hTdWJtaXQoKS5cbiAgICAgICAgICAgIEluZGV4OiAke2l9LCBTZXQgdmFsdWU6ICR7SlNPTi5zdHJpbmdpZnkoYSl9YCxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIGkrKztcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IGluc3RydWN0aW9ucyA9IGFyci5mbGF0TWFwKChhKSA9PiBhLmluc3RydWN0aW9ucyk7XG4gICAgICAgIGNvbnN0IHNpZ25lcnMgPSBhcnIuZmxhdE1hcCgoYSkgPT4gYS5zaWduZXJzKTtcbiAgICAgICAgY29uc3QgZmVlUGF5ZXJzID0gYXJyLmZpbHRlcigoYSkgPT4gYS5mZWVQYXllciAhPT0gdW5kZWZpbmVkKTtcbiAgICAgICAgbGV0IGZlZVBheWVyID0gc2lnbmVyc1swXTtcbiAgICAgICAgaWYgKGZlZVBheWVycy5sZW5ndGggPiAwICYmIGZlZVBheWVyc1swXS5mZWVQYXllcikge1xuICAgICAgICAgIGZlZVBheWVyID0gZmVlUGF5ZXJzWzBdLmZlZVBheWVyO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgdHJhbnNhY3Rpb24gPSBuZXcgVHJhbnNhY3Rpb24oKTtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHNpZ25lcnM7XG4gICAgICAgIGlmIChmZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gZmVlU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gKGNvbnN0IG9iaiBvZiB0aGlzKSB7XG4gICAgICBpZiAob2JqLmlzRXJyKSB7XG4gICAgICAgIHJldHVybiBvYmo7XG4gICAgICB9IGVsc2UgaWYgKG9iai52YWx1ZS5jYW5TdWJtaXQpIHtcbiAgICAgICAgZGVidWdMb2coJyMgUmVzdWx0IGJhdGNoIGNhblN1Ym1pdCcpO1xuICAgICAgICBjb25zdCBzaWcgPSBhd2FpdCAob2JqIGFzIFBhcnRpYWxTaWduU3RydWN0dXJlKS5zdWJtaXQoZmVlUGF5ZXIpO1xuICAgICAgICBpZiAoc2lnLmlzRXJyKSB7XG4gICAgICAgICAgcmV0dXJuIHNpZztcbiAgICAgICAgfVxuICAgICAgICBhd2FpdCBOb2RlLmNvbmZpcm1lZFNpZyhzaWcudmFsdWUpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgZGVidWdMb2coJyMgUmVzdWx0IGJhdGNoIG90aGVyIHRoYW4gY2FuU3VibWl0Jyk7XG4gICAgICAgIGlmICh0aGlzLmxlbmd0aCA9PSBpKSB7XG4gICAgICAgICAgLy8gbGFzdCBvYmplY3RcbiAgICAgICAgICByZXR1cm4gb2JqLnN1Ym1pdChmZWVQYXllcik7XG4gICAgICAgIH1cbiAgICAgICAgb2JqLnN1Ym1pdChmZWVQYXllcik7XG4gICAgICB9XG4gICAgICBpKys7XG4gICAgfVxuICB9IGVsc2Uge1xuICAgIGNvbnN0IGluc3RydWN0aW9uczogQ29tbW9uU3RydWN0dXJlIHwgTWludFN0cnVjdHVyZVtdID0gW107XG4gICAgZm9yIChjb25zdCBvYmogb2YgdGhpcykge1xuICAgICAgaWYgKG9iai5pc0Vycikge1xuICAgICAgICByZXR1cm4gb2JqO1xuICAgICAgfSBlbHNlIGlmIChvYmouaXNPaykge1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChvYmoudmFsdWUpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgcmV0dXJuIFJlc3VsdC5lcnIoRXJyb3I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Y2NvdW50W10sXG4gICAgKTogSGlzdG9yeSB8IHVuZGVmaW5lZCA9PiB7XG4gICAgICBjb25zdCBoaXN0b3J5OiBIaXN0b3J5ID0ge307XG5cbiAgICAgIGlmIChtYXBwaW5nVG9rZW5BY2NvdW50KSB7XG4gICAgICAgIGNvbnN0IGZvdW5kU291cmNlID0gbWFwcGluZ1Rva2VuQWNjb3VudC5maW5kKFxuICAgICAgICAgIChtKSA9PiBtLmFjY291bnQgPT09IG91dHB1dC5wYXJzZWQuaW5mby5zb3VyY2UsXG4gICAgICAgICk7XG4gICAgICAgIGNvbnN0IGZvdW5kRGVzdCA9IG1hcHBpbmdUb2tlbkFjY291bnQuZmluZChcbiAgICAgICAgICAobSkgPT4gbS5hY2NvdW50ID09PSBvdXRwdXQucGFyc2VkLmluZm8uZGVzdGluYXRpb24sXG4gICAgICAgICk7XG4gICAgICAgIGZvdW5kU291cmNlICYmIChoaXN0b3J5LnNvdXJjZSA9IGZvdW5kU291cmNlLm93bmVyKTtcbiAgICAgICAgZm91bmREZXN0ICYmIChoaXN0b3J5LmRlc3RpbmF0aW9uID0gZm91bmREZXN0Lm93bmVyKTtcbiAgICAgIH1cblxuICAgICAgaGlzdG9yeS50b2tlbkFtb3VudCA9IG91dHB1dC5wYXJzZWQuaW5mby50b2tlbkFtb3VudDtcbiAgICAgIGhpc3RvcnkubWludCA9IG91dHB1dC5wYXJzZWQuaW5mby5taW50O1xuICAgICAgaGlzdG9yeS5tdWx0aXNpZ0F1dGhvcml0eSA9IG91dHB1dC5wYXJzZWQuaW5mby5tdWx0aXNpZ0F1dGhvcml0eTtcbiAgICAgIGhpc3Rvcnkuc2lnbmVycyA9IG91dHB1dC5wYXJzZWQuaW5mby5zaWduZXJzO1xuICAgICAgaGlzdG9yeS50eXBlID0gb3V0cHV0LnByb2dyYW07XG4gICAgICBoaXN0b3J5LmRhdGVUaW1lID0gY29udmVydFRpbWVzdGFtcFRvRGF0ZVRpbWUobWV0YS5ibG9ja1RpbWUgY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gICAgcmVzID0gaXNJbWFnZVVybChtZXRhZGF0YS5pbWFnZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdyb3lhbHR5JzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEucm95YWx0eSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1JveWFsdHkobWV0YWRhdGEucm95YWx0eSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ25hbWUnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLm5hbWUpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNOYW1lKG1ldGFkYXRhLm5hbWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc3ltYm9sJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5zeW1ib2wpIHtcbiAg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x0IiwgIkNvbnZlcnRlciIsICJDb2xsZWN0aW9uIiwgIkNvbGxlY3Rpb25NaW50IiwgIkNvbnZlcnRlciIsICJDcmVhdG9ycyIsICJDb252ZXJ0ZXIiLCAiQ29tcHJlc3NlZE5mdE1ldGFkYXRhIiwgIkNvbnZlcnRlciIsICJSb3lhbHR5IiwgIkNvbnZlcnRlciIsICJOZnQiLCAiQ29udmVydGVyIiwgIk1lbW8iLCAiQ29udmVydGVyIiwgIk1pbnQiLCAiQ29udmVydGVyIiwgIlJlZ3VsYXJOZnRNZXRhZGF0YSIsICJDb252ZXJ0ZXIiLCAiUHJvcGVydGllcyIsICJDb252ZXJ0ZXIiLCAiVXNlcyIsICJDb252ZXJ0ZXIiLCAiVG9rZW5NZXRhZGF0YSIsICJDb252ZXJ0ZXIiLCAiVHJhbnNmZXJDaGVja2VkIiwgIkNvbnZlcnRlciIsICJUcmFuc2ZlciIsICJDb252ZXJ0ZXIiLCAiVmFsaWRhdG9yIiwgIk1lc3NhZ2UiLCAiQ29udmVydGVyIiwgIkFpcmRyb3AiXQp9Cg== \ No newline at end of file diff --git a/packages/suite-airdrop/dist/index.mjs b/packages/suite-airdrop/dist/index.mjs index c4c138e0b..89db08a6c 100644 --- a/packages/suite-airdrop/dist/index.mjs +++ b/packages/suite-airdrop/dist/index.mjs @@ -1425,4 +1425,4 @@ var Airdrop; export { Airdrop }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9iYXRjaC50cyIsICIuLi8uLi9ub2RlL3NyYy9pbmRleC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jb21tb24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvbWludC50cyIsICIuLi8uLi90cmFuc2Fjd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IENvbW1vbi5Db21tb25bXSB8IE1pbnQuTWludFtdLFxuICAgICk6IFByb21pc2U8UmVzdWx0PFRyYW5zYWN0aW9uU2lnbmF0dXJlLCBFcnJvcj4+ID0+IHtcbiAgICAgIHJldHVybiBUcnkoYXN5bmMgKCkgPT4ge1xuICAgICAgICBsZXQgaSA9IDA7XG4gICAgICAgIGZvciAoY29uc3QgYSBvZiBhcnIpIHtcbiAgICAgICAgICBpZiAoIWEuaW5zdHJ1Y3Rpb25zICYmICFhLnNpZ25lcnMpIHtcbiAgICAgICAgICAgIHRocm93IEVycm9yKFxuICAgICAgICAgICAgICBgb25seSBJbnN0cnVjdGlvbiBvYmplY3QgdGhhdCBjYW4gdXNlIGJhdGNoU3VibWl0KCkuXG4gICAgICAgICAgICBJbmRleDogJHtpfSwgU2V0IHZhbHVlOiAke0pTT04uc3RyaW5naWZ5KGEpfWAsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICBpKys7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBpbnN0cnVjdGlvbnMgPSBhcnIuZmxhdE1hcCgoYSkgPT4gYS5pbnN0cnVjdGlvbnMpO1xuICAgICAgICBjb25zdCBzaWduZXJzID0gYXJyLmZsYXRNYXAoKGEpID0+IGEuc2lnbmVycyk7XG4gICAgICAgIGNvbnN0IGZlZVBheWVycyA9IGFyci5maWx0ZXIoKGEpID0+IGEuZmVlUGF5ZXIgIT09IHVuZGVmaW5lZCk7XG4gICAgICAgIGxldCBmZWVQYXllciA9IHNpZ25lcnNbMF07XG4gICAgICAgIGlmIChmZWVQYXllcnMubGVuZ3RoID4gMCAmJiBmZWVQYXllcnNbMF0uZmVlUGF5ZXIpIHtcbiAgICAgICAgICBmZWVQYXllciA9IGZlZVBheWVyc1swXS5mZWVQYXllcjtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHRyYW5zYWN0aW9uID0gbmV3IFRyYW5zYWN0aW9uKCk7XG4gICAgICAgIGxldCBma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zaDtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHRoaXMuc2lnbmVycztcblxuICAgICAgICBpZiAodGhpcy5mZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gdGhpcy5mZWVQYXllci5wdWJsaWNLZXk7XG4gICAgICAgICAgZmluYWxTaWduZXJzID0gW3RoaXMuZmVlUGF5ZXIsIC4uLnRoaXMuc2lnbmVyc107XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLmluc3RydWN0aW9ucy5mb3JFYWNoKChpbnN0KSA9PiB0cmFuc2FjdGlvbi5hZGQoaW5zdCkpO1xuXG4gICAgICAgIGNvbnN0IG9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IE1BWF9SRVRSSUVTLFxuICAgICAgICB9O1xuXG4gICAgICAgIGlmIChOb2RlLmdldENvbm5lY3Rpb24oKS5ycGNFbmRwb2ludCA9PT0gQ29uc3RhbnRzLkVuZFBvaW50VXJsLnByZCkge1xuICAgICAgICAgIGRlYnVnTG9nKCcjIENoYW5nZSBtZXRhcGxleCBjbHVzdGVyIG9uIG1haW5uZXQtYmV0YScpO1xuICAgICAgICAgIE5vZGUuY2hhbmdlQ29ubmVjdGlvbih7IGNsdXN0ZXI6IENvbnN0YW50cy5DbHVzdGVyLnByZE1ldGFwbGV4IH0pO1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgIG9wdGlvbnMsXG4gICAgICAgICk7XG4gICAgICB9KTtcbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHtcbiAgQ29uZmlybU9wdGlvbnMsXG4gIFRyYW5zYWN0aW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BvZiB0aGlzKSB7XG4gICAgICBpZiAob2JqLmlzRXJyKSB7XG4gICAgICAgIHJldHVybiBvYmo7XG4gICAgICB9IGVsc2UgaWYgKG9iai52YWx1ZS5jYW5TdWJtaXQpIHtcbiAgICAgICAgZGVidWdMb2coJyMgUmVzdWx0IGJhdGNoIGNhblN1Ym1pdCcpO1xuICAgICAgICBjb25zdCBzaWcgPSBhd2FpdCAob2JqIGFzIFBhcnRpYWxTaWduU3RydWN0dXJlKS5zdWJtaXQoZmVlUGF5ZXIpO1xuICAgICAgICBpZiAoc2lnLmlzRXJyKSB7XG4gICAgICAgICAgcmV0dXJuIHNpZztcbiAgICAgICAgfVxuICAgICAgICBhd2FpdCBOb2RlLmNvbmZpcm1lZFNpZyhzaWcudmFsdWUpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgZGVidWdMb2coJyMgUmVzdWx0IGJhdGNoIG90aGVyIHRoYW4gY2FuU3VibWl0Jyk7XG4gICAgICAgIGlmICh0aGlzLmxlbmd0aCA9PSBpKSB7XG4gICAgICAgICAgLy8gbGFzdCBvYmplY3RcbiAgICAgICAgICByZXR1cm4gb2JqLnN1Ym1pdChmZWVQYXllcik7XG4gICAgICAgIH1cbiAgICAgICAgb2JqLnN1Ym1pdChmZWVQYXllcik7XG4gICAgICB9XG4gICAgICBpKys7XG4gICAgfVxuICB9IGVsc2Uge1xuICAgIGNvbnN0IGluc3RydWN0aW9uczogQ29tbW9uU3RydWN0dXJlIHwgTWludFN0cnVjdHVyZVtdID0gW107XG4gICAgZm9yIChjb25zdCBvYmogb2YgdGhpcykge1xuICAgICAgaWYgKG9iai5pc0Vycikge1xuICAgICAgICByZXR1cm4gb2JqO1xuICAgICAgfSBlbHNlIGlmIChvYmouaXNPaykge1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChvYmoudmFsdWUpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgcmV0dXJuIFJlc3VsdC5lcnIoRXJyb3IoJ09ubHkgQXJyYX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bWFnZVVybChtZXRhZGF0YS5pbWFnZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdyb3lhbHR5JzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEucm95YWx0eSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1JveWFsdHkobWV0YWRhdGEucm95YWx0eSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ25hbWUnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLm5hbWUpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNOYW1lKG1ldGFkYXRhLm5hbWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc3ltYm9sJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5zeW1ib2wpIHtcbiAgICAgICAgICAgICAgcmV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ICJVc2VzIiwgIkNvbnZlcnRlciIsICJUb2tlbk1ldGFkYXRhIiwgIkNvbnZlcnRlciIsICJUcmFuc2ZlckNoZWNrZWQiLCAiQ29udmVydGVyIiwgIlRyYW5zZmVyIiwgIkNvbnZlcnRlciIsICJWYWxpZGF0b3IiLCAiTWVzc2FnZSIsICJDb252ZXJ0ZXIiLCAiQWlyZHJvcCJdCn0K \ No newline at end of file +//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9iYXRjaC50cyIsICIuLi8uLi9ub2RlL3NyYy9pbmRleC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jb21tb24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvbWludC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9wYXJ0aWFsLXNpZ24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY2FsY3VsYXRlLXR4c2l6ZS50cyIsICIuLi8uLi9nbG9iYWwvc3JjL2luZGV4LnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2tleXBhaXIudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvcGRhLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3N1aXRlLXV0aWxzL3NyYy9zaGFyZWQudHMiLCAiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL3Jlc3VsdC50cyIsICIuLi8uLi9jb252ZXJ0ZXIvc3JjL2NvbGxlY3Rpb24udHMiLCAiLi4vLi4vY29udmVydGVyL3NyYy9jcmVhdG9ycy50cyIs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IHsgSW50ZXJuYWxDcmVhdG9ycyB9IGZyb20gJ34vdHlwZXMvY29udmVydGVyJztcblxuZXhwb3J0IG5hbWVzcGFjZSBDb252ZXJ0ZXIge1xuICBleHBvcnQgbmFtZXNwYWNlIENyZWF0b3JzIHtcbiAgICBleHBvcnQgY29uc3QgaW50b0luZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IE9wdGlvbjxJbnRlcm5hbENyZWF0b3JzW10+ID0+IHtcbiAgICAgIGlmICghaW5wdXQpIHtcbiAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICB9XG4gICAgICByZXR1cm4gaW5wdXQubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvQ29tcHJlc3NlZE5mdEluZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IEludGVybmFsQ3JlYXRvcnNbXSA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBbXTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBpbnB1dCEubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfT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lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEuc3ltYm9sKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU3ltYm9sKG1ldGFkYXRhLnN5bWJvbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAocmVzICYmIHJlcy5pc0Vycikge1xuICAgICAgICAgIHJlc3VsdHMucHVzaCguLi5yZXMuZXJyb3IuZGV0YWlscyk7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgICAgaWYgKHJlc3VsdHMubGVuZ3RoID4gMCkge1xuICAgICAgICBjb25zdCBtZXNzYWdlID1cbiAgICAgICAgICAnQ2F1Z2h0IGluIHRoZSB2YWxpZGF0aW9uIGVycm9ycy4gc2VlIGluZm9ybWF0aW9uIGUuZzogZXJyPFZhbGlkYXRvckVycm9yPi5kZXRhaWxzJztcbiAgICAgICAgdGhyb3cgbmV3IFZhbGlkYXRvckVycm9yKG1l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dGlvbkJ1aWxkZXIiLCAiS2V5cGFpciIsICJQdWJsaWNLZXkiLCAiUHVibGljS2V5IiwgIkFjY291bnQiLCAiS2V5cGFpciIsICJQdWJsaWNLZXkiLCAiQWNjb3VudCIsICJQZGEiLCAiQWNjb3VudCIsICJicyIsICJBY2NvdW50IiwgIlB1YmxpY0tleSIsICJLZXlwYWlyIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiUmVzdWx0IiwgIkNvbnZlcnRlciIsICJDb2xsZWN0aW9uIiwgIkNvbGxlY3Rpb25NaW50IiwgIkNvbnZlcnRlciIsICJDcmVhdG9ycyIsICJDb252ZXJ0ZXIiLCAiQ29tcHJlc3NlZE5mdE1ldGFkYXRhIiwgIkNvbnZlcnRlciIsICJSb3lhbHR5IiwgIkNvbnZlcnRlciIsICJOZnQiLCAiQ29udmVydGVyIiwgIk1lbW8iLCAiQ29udmVydGVyIiwgIk1pbnQiLCAiQ29udmVydGVyIiwgIlJlZ3VsYXJOZnRNZXRhZGF0YSIsICJDb252ZXJ0ZXIiLCAiUHJvcGVydGllcyIsICJDb252ZXJ0ZXIiLCAiVXNlcyIsICJDb252ZXJ0ZXIiLCAiVG9rZW5NZXRhZGF0YSIsICJDb252ZXJ0ZXIiLCAiVHJhbnNmZXJDaGVja2VkIiwgIkNvbnZlcnRlciIsICJUcmFuc2ZlciIsICJDb252ZXJ0ZXIiLCAiVmFsaWRhdG9yIiwgIk1lc3NhZ2UiLCAiQ29udmVydGVyIiwgIkFpcmRyb3AiXQp9Cg== \ No newline at end of file diff --git a/packages/suite-airdrop/package.json b/packages/suite-airdrop/package.json index 599694109..e28d71132 100644 --- a/packages/suite-airdrop/package.json +++ b/packages/suite-airdrop/package.json @@ -44,7 +44,14 @@ "publish": "../../scripts/after-publish.mjs" }, "dependencies": { - "@solana/web3.js": "^1.78.5" + "@metaplex-foundation/mpl-token-metadata": "^2.13.0", + "@solana/web3.js": "^1.78.5", + "@solana-suite/config": "workspace:^", + "bignumber.js": "^9.1.2", + "@metaplex-foundation/mpl-bubblegum": "^3.0.0", + "mpl-bubblegum-instruction": "github:atonoy/mpl-bubblegum-instructions", + "bn.js": "^5.2.1", + "bs58": "^4.0.1" }, "devDependencies": { "build-configs/eslint": "workspace:*", diff --git a/packages/suite-compressed-nft/dist/index.d.mts b/packages/suite-compressed-nft/dist/index.d.mts new file mode 100644 index 000000000..4a39b8aa5 --- /dev/null +++ b/packages/suite-compressed-nft/dist/index.d.mts @@ -0,0 +1,483 @@ +import * as mpl_bubblegum_instruction from 'mpl-bubblegum-instruction'; +import BN from 'bn.js'; +import * as _solana_web3_js from '@solana/web3.js'; +import { TransactionSignature, PublicKey, Keypair, TransactionInstruction } from '@solana/web3.js'; + +declare const pubKeyNominality: unique symbol; +declare const secretNominality: unique symbol; +type Pubkey = (string & { + [pubKeyNominality]: never; +}) | string; +type Secret$1 = (string & { + [secretNominality]: never; +}) | string; + +type FileType = string | File; + +type StorageType = 'nftStorage' | 'arweave' | string; +type Offchain = { + name?: string; + symbol?: string; + description?: string; + seller_fee_basis_points?: number; + image?: string; + external_url?: string; + attributes?: Attribute[]; + properties?: Properties; + collection?: { + name?: string; + family?: string; + [key: string]: unknown; + }; + collectionDetails?: { + kind: string; + size: number; + }; + created_at?: number; +}; +type Properties = { + creators?: { + address?: string; + share?: number; + [key: string]: unknown; + }[]; + files?: { + type?: string; + filePath?: FileType; + [key: string]: unknown; + }[]; + [key: string]: unknown; +}; +type Attribute = { + trait_type?: string; + value?: string; + [key: string]: unknown; +}; + +type Authority = { + address: Pubkey; + scopes: string[]; +}; +type Creators = { + address: Pubkey; + share: number; + verified: boolean; +}[]; +type Metadata = { + mint: Pubkey; + collectionMint: Pubkey; + authorities: Authority[]; + royalty: number; + name: string; + symbol: string; + uri: string; + creators: Creators; + treeAddress: Pubkey; + isCompressed: boolean; + isMutable: boolean; + isBurn: boolean; + editionNonce: number; + primarySaleHappened: boolean; + dateTime: Date; + offchain: Offchain; +}; +type NftMetadata = { + page: number; + total: number; + limit: number; + metadatas: Metadata[]; +}; + +declare enum SortDirection { + Asc = "asc", + Desc = "desc" +} +declare enum SortBy { + Created = "created", + Updated = "updated", + Recent = "recent_action" +} +type Sortable = { + sortBy: SortBy; + sortDirection: SortDirection; +}; +type FindOptions = { + limit: number; + page: number; + sortBy: Sortable; + before: string; + after: string; +}; + +type DelegateOptions = { + delegate: Pubkey; +}; + +type MintOptions = { + receiver: Pubkey; + delegate: Pubkey; + feePayer: Secret$1; +}; + +type MintCollectionOptions = { + freezeAuthority: Pubkey; + feePayer: Secret$1; +}; + +type SpaceOptions = { + feePayer: Secret$1; +}; +type SpaceNumber = 8 | 16000 | 100000 | 16700000 | 67000000 | 1000000000; + +type bignum = number | BN; +declare enum UseMethod { + Burn = 0, + Multiple = 1, + Single = 2 +} +type Uses = { + useMethod: UseMethod; + remaining: bignum; + total: bignum; +}; +type InputCreators = { + address: Pubkey; + secret: Secret$1; + share: number; +}; + +type InputCollection = Pubkey; +type Options = { + [key: string]: unknown; +}; +type InputNftMetadata = { + name: string; + symbol: string; + royalty?: number; + storageType?: StorageType; + filePath?: FileType; + uri?: string; + isMutable?: boolean; + description?: string; + external_url?: string; + attributes?: Attribute[]; + properties?: Properties; + maxSupply?: bignum; + creators?: InputCreators[]; + uses?: Uses; + collection?: InputCollection; + options?: Options; +}; + +declare abstract class AbstractResult { + protected abstract _chain(ok: (value: T) => Result, err: (error: E) => Result): Result; + unwrap(): T; + unwrap(ok: (value: T) => U): U; + unwrap(ok: (value: T) => U, err: (error: E) => V): U | V; + unwrap(ok: (value: T) => U, err: (error: E) => U): U; + map(ok: (value: T) => U): Result; + map(ok: (value: T) => U, err: (error: E) => F): Result; + chain(ok: (value: T) => Result): Result; + chain(ok: (value: T) => Result): Result; + chain(ok: (value: T) => Result, err: (error: E) => Result): Result; + match(ok: (value: T) => U, err: (error: E) => F): void | Promise; + submit(feePayer?: Secret$1): Promise>; +} +declare global { + interface Array { + submit(feePayer?: Secret$1): Promise>; + } +} +declare class InternalOk extends AbstractResult { + readonly value: T; + readonly isOk = true; + readonly isErr = false; + constructor(value: T); + protected _chain(ok: (value: T) => Result, _err: (error: E) => Result): Result; +} +declare class InternalErr extends AbstractResult { + readonly error: E; + readonly isOk = false; + readonly isErr = true; + constructor(error: E); + protected _chain(_ok: (value: T) => Result, err: (error: E) => Result): Result; +} +declare namespace Result { + export type Ok = InternalOk; + export type Err = InternalErr; + export function ok(value: T): Result; + export function err(error?: E): Result; + type U = Result; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3]): Result<[ + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2]): Result<[OkType, OkType, OkType], ErrType>; + export function all(obj: [R0, R1]): Result<[OkType, OkType], ErrType>; + export function all(obj: [R0]): Result<[OkType], ErrType>; + export function all(obj: []): Result<[]>; + export function all>(obj: T): Result<{ + [K in keyof T]: T[K] extends Result ? I : never; + }, { + [K in keyof T]: T[K] extends Result ? E : never; + }[keyof T]>; + export {}; +} +type Result = Result.Ok | Result.Err; +type OkType> = R extends Result ? O : never; +type ErrType> = R extends Result ? E : never; + +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; +}; + +type CommonStructure = { + instructions: TransactionInstruction[]; + signers: Keypair[]; + feePayer?: Keypair; + canSubmit?: boolean; + data?: T; + submit: () => Promise>; +}; +type MintStructure = { + instructions: TransactionInstruction[]; + signers: Keypair[]; + data: T; + feePayer: Keypair; + canSubmit?: boolean; + submit: () => Promise>; +}; +type PartialSignStructure = { + hexInstruction: string; + canSubmit?: boolean; + data?: T; + submit: (feePayer: Secret$1) => Promise>; +}; + +declare namespace CompressedNft$1 { + class Space { + spaceOwner: Pubkey; + constructor(spaceOwner: Pubkey); + getAssetId: () => Promise; + } + /** + * create a new nft space + * This function needs only 1 call + * + * @param {Secret} owner + * @param {SpaceNumber} spaceSize + * @param {Partial} options + * + * @return Promise> + */ + const createSpace: (owner: Secret, spaceSize: SpaceNumber, options?: Partial) => Promise>; + /** + * Calculate space cost + * + * @param {number} spaceSize + * @return Promise<{sol: number}> + */ + const calculateSpaceCost: (spaceSize: number) => Promise<{ + sol: number; + }>; +} + +/** @namespace */ +declare const CompressedNft: { + createTransfer: (assetId: Pubkey, assetIdOwner: Pubkey, dest: Pubkey, delegate?: Pubkey | undefined) => Promise<_solana_web3_js.TransactionInstruction>; + transfer: (mint: Pubkey, owner: Pubkey, dest: Pubkey, ownerOrMultisig: Secret[]) => Promise>; + mintCollection: (owner: Secret$1, input: InputNftMetadata, options?: Partial) => Promise>; + Space: typeof CompressedNft$1.Space; + initSpace: (owner: Secret, maxDepth: number, maxBufferSize: number, canopyDepth: number, options?: Partial) => Promise>; + createSpace: (owner: Secret, spaceSize: SpaceNumber, options?: Partial) => Promise>; + calculateSpaceCost: (spaceSize: number) => Promise<{ + sol: number; + }>; + createVerifyCreator: (creators: mpl_bubblegum_instruction.Creator[], assetId: _solana_web3_js.PublicKey, treeOwner: _solana_web3_js.PublicKey, metadata: mpl_bubblegum_instruction.MetadataArgs, feePayer: _solana_web3_js.PublicKey) => Promise<_solana_web3_js.TransactionInstruction>; + mint: (owner: Secret$1, input: InputNftMetadata, treeOwner: Pubkey, collectionMint: Pubkey, options?: Partial) => Promise, Error>>; + gasLessTransfer: (mint: Pubkey, owner: Secret$1, dest: Pubkey, feePayer: Pubkey) => Promise[]>; + gasLessDelegate: (mint: Pubkey, owner: Secret$1, newDelegate: Pubkey) => Promise>; + findByOwner: (owner: Pubkey, options?: Partial) => Promise>; + findByMint: (mint: Pubkey) => Promise, Error>>; + findByCollection: (collectionMint: Pubkey, options?: Partial) => Promise>; + createDeleagate: (assetId: _solana_web3_js.PublicKey, newDelegate: _solana_web3_js.PublicKey | null) => Promise<_solana_web3_js.TransactionInstruction>; + setDelegate: (mint: Pubkey, owner: Secret$1, options?: Partial) => Promise>; +}; + +export { CompressedNft }; diff --git a/packages/suite-compressed-nft/dist/index.d.ts b/packages/suite-compressed-nft/dist/index.d.ts new file mode 100644 index 000000000..4a39b8aa5 --- /dev/null +++ b/packages/suite-compressed-nft/dist/index.d.ts @@ -0,0 +1,483 @@ +import * as mpl_bubblegum_instruction from 'mpl-bubblegum-instruction'; +import BN from 'bn.js'; +import * as _solana_web3_js from '@solana/web3.js'; +import { TransactionSignature, PublicKey, Keypair, TransactionInstruction } from '@solana/web3.js'; + +declare const pubKeyNominality: unique symbol; +declare const secretNominality: unique symbol; +type Pubkey = (string & { + [pubKeyNominality]: never; +}) | string; +type Secret$1 = (string & { + [secretNominality]: never; +}) | string; + +type FileType = string | File; + +type StorageType = 'nftStorage' | 'arweave' | string; +type Offchain = { + name?: string; + symbol?: string; + description?: string; + seller_fee_basis_points?: number; + image?: string; + external_url?: string; + attributes?: Attribute[]; + properties?: Properties; + collection?: { + name?: string; + family?: string; + [key: string]: unknown; + }; + collectionDetails?: { + kind: string; + size: number; + }; + created_at?: number; +}; +type Properties = { + creators?: { + address?: string; + share?: number; + [key: string]: unknown; + }[]; + files?: { + type?: string; + filePath?: FileType; + [key: string]: unknown; + }[]; + [key: string]: unknown; +}; +type Attribute = { + trait_type?: string; + value?: string; + [key: string]: unknown; +}; + +type Authority = { + address: Pubkey; + scopes: string[]; +}; +type Creators = { + address: Pubkey; + share: number; + verified: boolean; +}[]; +type Metadata = { + mint: Pubkey; + collectionMint: Pubkey; + authorities: Authority[]; + royalty: number; + name: string; + symbol: string; + uri: string; + creators: Creators; + treeAddress: Pubkey; + isCompressed: boolean; + isMutable: boolean; + isBurn: boolean; + editionNonce: number; + primarySaleHappened: boolean; + dateTime: Date; + offchain: Offchain; +}; +type NftMetadata = { + page: number; + total: number; + limit: number; + metadatas: Metadata[]; +}; + +declare enum SortDirection { + Asc = "asc", + Desc = "desc" +} +declare enum SortBy { + Created = "created", + Updated = "updated", + Recent = "recent_action" +} +type Sortable = { + sortBy: SortBy; + sortDirection: SortDirection; +}; +type FindOptions = { + limit: number; + page: number; + sortBy: Sortable; + before: string; + after: string; +}; + +type DelegateOptions = { + delegate: Pubkey; +}; + +type MintOptions = { + receiver: Pubkey; + delegate: Pubkey; + feePayer: Secret$1; +}; + +type MintCollectionOptions = { + freezeAuthority: Pubkey; + feePayer: Secret$1; +}; + +type SpaceOptions = { + feePayer: Secret$1; +}; +type SpaceNumber = 8 | 16000 | 100000 | 16700000 | 67000000 | 1000000000; + +type bignum = number | BN; +declare enum UseMethod { + Burn = 0, + Multiple = 1, + Single = 2 +} +type Uses = { + useMethod: UseMethod; + remaining: bignum; + total: bignum; +}; +type InputCreators = { + address: Pubkey; + secret: Secret$1; + share: number; +}; + +type InputCollection = Pubkey; +type Options = { + [key: string]: unknown; +}; +type InputNftMetadata = { + name: string; + symbol: string; + royalty?: number; + storageType?: StorageType; + filePath?: FileType; + uri?: string; + isMutable?: boolean; + description?: string; + external_url?: string; + attributes?: Attribute[]; + properties?: Properties; + maxSupply?: bignum; + creators?: InputCreators[]; + uses?: Uses; + collection?: InputCollection; + options?: Options; +}; + +declare abstract class AbstractResult { + protected abstract _chain(ok: (value: T) => Result, err: (error: E) => Result): Result; + unwrap(): T; + unwrap(ok: (value: T) => U): U; + unwrap(ok: (value: T) => U, err: (error: E) => V): U | V; + unwrap(ok: (value: T) => U, err: (error: E) => U): U; + map(ok: (value: T) => U): Result; + map(ok: (value: T) => U, err: (error: E) => F): Result; + chain(ok: (value: T) => Result): Result; + chain(ok: (value: T) => Result): Result; + chain(ok: (value: T) => Result, err: (error: E) => Result): Result; + match(ok: (value: T) => U, err: (error: E) => F): void | Promise; + submit(feePayer?: Secret$1): Promise>; +} +declare global { + interface Array { + submit(feePayer?: Secret$1): Promise>; + } +} +declare class InternalOk extends AbstractResult { + readonly value: T; + readonly isOk = true; + readonly isErr = false; + constructor(value: T); + protected _chain(ok: (value: T) => Result, _err: (error: E) => Result): Result; +} +declare class InternalErr extends AbstractResult { + readonly error: E; + readonly isOk = false; + readonly isErr = true; + constructor(error: E); + protected _chain(_ok: (value: T) => Result, err: (error: E) => Result): Result; +} +declare namespace Result { + export type Ok = InternalOk; + export type Err = InternalErr; + export function ok(value: T): Result; + export function err(error?: E): Result; + type U = Result; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3]): Result<[ + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2]): Result<[OkType, OkType, OkType], ErrType>; + export function all(obj: [R0, R1]): Result<[OkType, OkType], ErrType>; + export function all(obj: [R0]): Result<[OkType], ErrType>; + export function all(obj: []): Result<[]>; + export function all>(obj: T): Result<{ + [K in keyof T]: T[K] extends Result ? I : never; + }, { + [K in keyof T]: T[K] extends Result ? E : never; + }[keyof T]>; + export {}; +} +type Result = Result.Ok | Result.Err; +type OkType> = R extends Result ? O : never; +type ErrType> = R extends Result ? E : never; + +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; +}; + +type CommonStructure = { + instructions: TransactionInstruction[]; + signers: Keypair[]; + feePayer?: Keypair; + canSubmit?: boolean; + data?: T; + submit: () => Promise>; +}; +type MintStructure = { + instructions: TransactionInstruction[]; + signers: Keypair[]; + data: T; + feePayer: Keypair; + canSubmit?: boolean; + submit: () => Promise>; +}; +type PartialSignStructure = { + hexInstruction: string; + canSubmit?: boolean; + data?: T; + submit: (feePayer: Secret$1) => Promise>; +}; + +declare namespace CompressedNft$1 { + class Space { + spaceOwner: Pubkey; + constructor(spaceOwner: Pubkey); + getAssetId: () => Promise; + } + /** + * create a new nft space + * This function needs only 1 call + * + * @param {Secret} owner + * @param {SpaceNumber} spaceSize + * @param {Partial} options + * + * @return Promise> + */ + const createSpace: (owner: Secret, spaceSize: SpaceNumber, options?: Partial) => Promise>; + /** + * Calculate space cost + * + * @param {number} spaceSize + * @return Promise<{sol: number}> + */ + const calculateSpaceCost: (spaceSize: number) => Promise<{ + sol: number; + }>; +} + +/** @namespace */ +declare const CompressedNft: { + createTransfer: (assetId: Pubkey, assetIdOwner: Pubkey, dest: Pubkey, delegate?: Pubkey | undefined) => Promise<_solana_web3_js.TransactionInstruction>; + transfer: (mint: Pubkey, owner: Pubkey, dest: Pubkey, ownerOrMultisig: Secret[]) => Promise>; + mintCollection: (owner: Secret$1, input: InputNftMetadata, options?: Partial) => Promise>; + Space: typeof CompressedNft$1.Space; + initSpace: (owner: Secret, maxDepth: number, maxBufferSize: number, canopyDepth: number, options?: Partial) => Promise>; + createSpace: (owner: Secret, spaceSize: SpaceNumber, options?: Partial) => Promise>; + calculateSpaceCost: (spaceSize: number) => Promise<{ + sol: number; + }>; + createVerifyCreator: (creators: mpl_bubblegum_instruction.Creator[], assetId: _solana_web3_js.PublicKey, treeOwner: _solana_web3_js.PublicKey, metadata: mpl_bubblegum_instruction.MetadataArgs, feePayer: _solana_web3_js.PublicKey) => Promise<_solana_web3_js.TransactionInstruction>; + mint: (owner: Secret$1, input: InputNftMetadata, treeOwner: Pubkey, collectionMint: Pubkey, options?: Partial) => Promise, Error>>; + gasLessTransfer: (mint: Pubkey, owner: Secret$1, dest: Pubkey, feePayer: Pubkey) => Promise[]>; + gasLessDelegate: (mint: Pubkey, owner: Secret$1, newDelegate: Pubkey) => Promise>; + findByOwner: (owner: Pubkey, options?: Partial) => Promise>; + findByMint: (mint: Pubkey) => Promise, Error>>; + findByCollection: (collectionMint: Pubkey, options?: Partial) => Promise>; + createDeleagate: (assetId: _solana_web3_js.PublicKey, newDelegate: _solana_web3_js.PublicKey | null) => Promise<_solana_web3_js.TransactionInstruction>; + setDelegate: (mint: Pubkey, owner: Secret$1, options?: Partial) => Promise>; +}; + +export { CompressedNft }; diff --git a/packages/suite-compressed-nft/dist/index.js b/packages/suite-compressed-nft/dist/index.js index 5b200fcc8..28a7b3ab4 100644 --- a/packages/suite-compressed-nft/dist/index.js +++ b/packages/suite-compressed-nft/dist/index.js @@ -3380,4 +3380,4 @@ var CompressedNft9 = { 0 && (module.exports = { CompressedNft }); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uLy4uL3N1aXRlLXV0aWxzL3NyYy9jb25zdGFudHMudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9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cmluZywgVT4+KFxuICAgIG9iajogVCxcbiAgKTogUmVzdWx0PFxuICAgIHsgW0sgaW4ga2V5b2YgVF06IFRbS10gZXh0ZW5kcyBSZXN1bHQ8aW5mZXIgST4gPyBJIDogbmV2ZXIgfSxcbiAgICB7XG4gICAgICBbSyBpbiBrZXlvZiBUXTogVFtLXSBleHRlbmRzIFJlc3VsdDx1bmtub3duLCBpbmZlciBFPiA/IEUgOiBuZXZlcjtcbiAgICB9W2tleW9mIFRdXG4gID47XG4gIGV4cG9ydCBmdW5jdGlvbiBhbGwob2JqOiB1bmtub3duKTogdW5rbm93biB7XG4gICAgaWYgKEFycmF5LmlzQXJyYXkob2JqKSkge1xuICAgICAgY29uc3QgcmVzQXJyID0gW107XG4gICAgICBmb3IgKGNvbnN0IGl0ZW0gb2Ygb2JqKSB7XG4gICAgICAgIGlmIChpdGVtLmlzRXJyKSB7XG4gICAgICAgICAgcmV0dXJuIGl0ZW0gYXMgdW5rbm93bjtcbiAgICAgICAgfVxuICAgICAgICByZXNBcnIucHVzaChpdGVtLnZhbHVlKTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBSZXN1bHQub2socmVzQXJyKTtcbiAgICB9XG5cbiAgICBjb25zdCByZXM6IFJlY29yZDxzdHJpbmcsIHVua25vd24+ID0ge307XG4gICAgY29uc3Qga2V5cyA9IE9iamVjdC5rZXlzKG9iaiBhcyBSZWNvcmQ8c3RyaW5nLCBVPik7XG4gICAgZm9yIChjb25zdCBrZXkgb2Yga2V5cykge1xuICAgICAgY29uc3QgaXRlbSA9IChvYmogYXMgUmVjb3JkPHN0cmluZywgVT4pW2tleV07XG4gICAgICBpZiAoaXRlbS5pc0Vycikge1xuICAgICAgICByZXR1cm4gaXRlbTtcbiAgICAgIH1cbiAgICAgIHJlc1trZXldID0gaXRlbS52YWx1ZTtcbiAgICB9XG4gICAgcmV0dXJuIFJlc3VsdC5vayhyZXMpO1xuICB9XG59XG5cbmV4cG9ydCB0eXBlIFJlc3VsdDxULCB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KFxuICAgIG1ldGFkYXRhOiBULFxuICApOiBSZXN1bHQ8c3RyaW5nLCBWYWxpZGF0b3JFcnJvcj4gPT4ge1xuICAgIHJldHVybiBUcnkoKCkgPT4ge1xuICAgICAgY29uc3Qga2V5cyA9IE9iamVjdC5rZXlzKG1ldGFkYXRhKTtcbiAgICAgIGNvbnN0IHJlc3VsdHM6IERldGFpbHNbXSA9IFtdO1xuICAgICAga2V5cy5tYXAoKGtleSkgPT4ge1xuICAgICAgICBsZXQgcmVzITogUmVzdWx0PHN0cmluZywgVmFsaWRhdG9yRXJyb3I+O1xuICAgICAgICBzd2l0Y2ggKGtleSkge1xuICAgICAgICAgIGNhc2UgJ2ltYWdlJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuaW1hZ2UpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNJbWFnZVVybChtZXRhZGF0YS5pbWFnZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdyb3lhbHR5JzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEucm95YWx0eSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1JveWFsdHkobWV0YWRhdGEucm95YWx0eSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2Vsb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cmtsZVRyZWU6IHRyZWVPd25lci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgICAgICB0cmVlQXV0aG9yaXR5LFxuICAgICAgICAgICAgdHJlZUNyZWF0b3I6IG93bmVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgICAgIHBheWVyOiBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgICAgICBsb2dXcmFwcGVyOiBTUExfTk9PUF9QUk9HUkFNX0lELFxuICAgICAgICAgICAgY29tcHJlc3Npb25Qcm9ncmFtOiBTUExfQUNDT1VOVF9DT01QUkVTU0lPTl9QUk9HUkFNX0lELFxuICAgICAgICAgIH0sXG4gICAgICAgICAge1xuICAgICAgICAgICAgbWF4QnVmZmVyU2l6ZSxcbiAgICAgICAgICAgIG1heERlcHRoLFxuICAgICAgICAgICAgcHVibGljOiBmYWxzZSxcbiAgICAgICAgICB9LFxuICAgICAgICAgIE1QTF9CVUJCTEVHVU1fUFJPR1JBTV9JRC50b1B1YmxpY0tleSgpLFxuICAgICAgICApLFxuICAgICAgKTtcblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuTWludChcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLFxuICAgICAgICBbdHJlZU93bmVyLnRvS2V5cGFpcigpLCBvd25lci50b0tleXBhaXIoKV0sXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICB0cmVlT3duZXIucHVia2V5LFxuICAgICAgKTtcbiAgICB9KTtcbiAgfTtcblxuICAvKipcbiAgICogY3JlYXRlIGEgbmV3IG5mdCBzcGFjZVxuICAgKiBUaGlzIGZ1bmN0aW9uIG5lZWRzIG9ubHkgMSBjYWxsXG4gICAqXG4gICAqIEBwYXJhbSB7U2VjcmV0fSBvd25lclxuICAgKiBAcGFyYW0ge1NwYWNlTnVtYmVyfSBzcGFjZVNpemVcbiAgICogQHBhcmFtIHtQYXJ0aWFsP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nJvbUFjY291bnRBZGRyZXNzKFxuICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICB0cmVlT3duZXIsXG4gICAgKTtcbiAgICBjb25zdCBjYW5vcHlEZXB0aCA9IHRyZWVBY2NvdW50LmdldENhbm9weURlcHRoKCk7XG4gICAgY29uc3Qgc2xpY2VkUHJvb2Y6IEFjY291bnRNZXRhW10gPSBhc3NldFByb29mLnByb29mXG4gICAgICAubWFwKChub2RlOiBzdHJpbmcpID0+ICh7XG4gICAgICAgIHB1YmtleTogbm9kZS50b1B1YmxpY0tleSgpLFxuICAgICAgICBpc1NpZ25lcjogZmFsc2UsXG4gICAgICAgIGlzV3JpdGFibGU6IGZhbHNlLFxuICAgICAgfSkpXG4gICAgICAuc2xpY2UoMCwgYXNzZXRQcm9vZi5wcm9vZi5sZW5ndGggLSAoY2Fub3B5RGVwdGggPyBjYW5vcHlEZXB0aCA6IDApKTtcblxuICAgIHJldHVybiBjcmVhdGVWZXJpZnlDcmVhdG9ySW5zdHJ1Y3Rpb24oXG4gICAgICB7XG4gICAgICAgIHRyZWVBdXRob3JpdHk6IHRyZWVPd25lcixcbiAgICAgICAgbGVhZk93bmVyOiBvd25lcnNoaXAub3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgbGVhZkRlbGVnYXRlOiAob3duZXJzaGlwLmRlbGVnYXRlIHx8IG93bmVyc2hpcC5vd25lcikudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgbWVya2xlVHJlZTogYXNzZXRQcm9vZi50cmVlX2lkLnRvUHVibGljS2V5KCksXG4gICAgICAgIHBheWVyOiBmZWVQYXllcixcblxuICAgICAgICBsb2dXcmFwcGVyOiBTUExfTk9PUF9QUk9HUkFNX0lELFxuICAgICAgICBjb21wcmVzc2lvblByb2dyYW06IFNQTF9BQ0NPVU5UX0NPTVBSRVNTSU9OX1BST0dSQU1fSUQsXG4gICAgICAgIGNyZWF0b3I6IGZlZVBheWVyLFxuXG4gICAgICAgIC8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291bnQuS2V5cGFpcih7IHNlY3JldDogcGF5ZXIhIH0pLnB1YmtleTtcblxuICAgICAgY29uc3QgdHJlZUF1dGhvcml0eSA9IEFjY291bnQuUGRhLmdldFRyZWVBdXRob3JpdHkoXG4gICAgICAgIHRyZWVPd25lci50b1B1YmxpY0tleSgpLnRvU3RyaW5nKCksXG4gICAgICApO1xuICAgICAgY29uc3QgY29sbGVjdGlvbk1ldGFkYXRhID0gQWNjb3VudC5QZGEuZ2V0TWV0YWRhdGEoXG4gICAgICAgIGNvbGxlY3Rpb25NaW50LnRvU3RyaW5nKCksXG4gICAgICApO1xuICAgICAgY29uc3QgY29sbGVjdGlvbk1hc3RlckVkaXRpb25BY2NvdW50ID0gQWNjb3VudC5QZGEuZ2V0TWFzdGVyRWRpdGlvbihcbiAgICAgICAgY29sbGVjdGlvbk1pbnQudG9TdHJpbmcoKSxcbiAgICAgICk7XG4gICAgICBjb25zdCBidWJibGVndW1TaWduZXIgPSBBY2NvdW50LlBkYS5nZXRCZ3VtU2lnbmVyKCk7XG5cbiAgICAgIC8vIHBvcnBlcnRpZXMsIFVwbG9hZCBjb250ZW50XG4gICAgICBsZXQgcHJvcGVydGllcztcbiAgICAgIGlmIChpbnB1dC5wcm9wZXJ0aWVzKSB7XG4gICAgICAgIHByb3BlcnRpZXMgPSBhd2FpdCBDb252ZXJ0ZXIuUHJvcGVydGllcy5pbnRvSW5mcmEoXG4gICAgICAgICAgaW5wdXQucHJvcGVydGllcyxcbiAgICAgICAgICBTdG9yYWdlLnVwbG9hZEZpbGUsXG4gICAgICAgICAgc3RvcmFnZVR5cGUsXG4gICAgICAgICAgcGF5ZXIsXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIGlucHV0ID0ge1xuICAgICAgICAuLi5pbnB1dCxcbiAgICAgICAgcHJvcGVydGllcyxcbiAgICAgICAgc3RvcmFnZVR5cGUsXG4gICAgICB9O1xuXG4gICAgICBjb25zdCByb3lhbHR5ID0gaW5wdXQucm95YWx0e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U3RvcmFnZS51cGxvYWREYXRhKFxuICAgICAgICAgIHsgLi4uc3RvcmFnZU1ldGFkYXRhLCAuLi5pbWFnZSB9LFxuICAgICAgICAgIHN0b3JhZ2VUeXBlLFxuICAgICAgICAgIHBheWVyLFxuICAgICAgICApO1xuICAgICAgICBpZiAodXBsb2FkZWQuaXNFcnIpIHtcbiAgICAgICAgICB0aHJvdyB1cGxvYWRlZDtcbiAgICAgICAgfVxuICAgICAgICB1cmkgPSB1cGxvYWRlZC52YWx1ZTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHRocm93IEVycm9yKGBNdXN0IHNldCBmaWxlUGF0aCcgb3IgJ3VyaSdgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgY29udmVydGVkID0gQ29udmVydGVyLkNvbXByZXNzZWROZnRNZXRhZGF0YS5pbnRvSW5mcmEoXG4gICAgICAgIGlucHV0LFxuICAgICAgICB1cmksXG4gICAgICAgIHNlbGxlckZlZUJhc2lzUG9pbnRzLFxuICAgICAgKTtcblxuICAgICAgY29uc3QgbWV0YWRhdGFBcmdzOiBNZXRhZGF0YUFyZ3MgPSB7XG4gICAgICAgIC4uLmNvbnZlcnRlZCxcbiAgICAgICAgY29sbGVjdGlvbjogeyBrZXk6IGNvbGxlY3Rpb25NaW50LnRvUHVibGljS2V5KCksIHZlcmlmaWVkOiBmYWxzZSB9LFxuICAgICAgfTtcblxuICAgICAgZGVidWdMb2coJyMgaW5wdXQ6ICcsIGlucHV0KTtcbiAgICAgIGRlYnVnTG9nKCcjIG1ldGFkYXRhQXJnczogJywgbWV0YWRhdGFBcmdzKTtcblxuICAgICAgY29uc3QgaW5zdHJ1Y3Rpb25zID0gW107XG4gICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgY3JlYXRlTWludFRvQ29sbGVjdGlvblYxSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAge1xuICAgICAgICAgICAgbWVya2xlVHJlZTogdHJlZU93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICB0cmVlQXV0aG9yaXR5LFxuICAgICAgICAgICAgdHJlZURlbGVnYXRlOiBvd25lclB1YmxpY0tleSxcbiAgICAgICAgICAgIHBheWVyOiBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgICAgICBsZWFmT3duZXI6IGxlYWZPd25lciwgLy8gcmVjZWl2ZXJcbiAgICAgICAgICAgIGxlYWZEZWxlZ2F0ZTogbGVhZkRlbGVnYXRlLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBjb2xsZWN0aW9uQXV0aG9yaXR5OiBvd25lclB1YmxpY0tleSxcbiAgICAgICAgICAgIGNvbGxlY3Rpb25NaW50OiBjb2xsZWN0aW9uTWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgY29sbGVjdGlvbk1ldGFkYXRhLFxuICAgICAgICAgICAgZWRpdGlvbkFjY291bnQ6IGNvbGxlY3Rpb25NYXN0ZXJFZGl0aW9uQWNjb3VudCxcbiAgICAgICAgICAgIGJ1YmJsZWd1bVNpZ25lcixcbiAgICAgICAgICAgIGxvZ1dyYXBwZXI6IFNQTF9OT09QX1BST0dSQU1fSUQsXG4gICAgICAgICAgICBjb2xsZWN0aW9uQXV0aG9yaXR5UmVjb3JkUGRhOiBCVUJCTEVHVU1fUFJPR1JBTV9JRCxcbiAgICAgICAgICAgIGNvbXByZXNzaW9uUHJvZ3JhbTogU1BMX0FDQ09VTlRfQ09NUFJFU1NJT05fUFJPR1JBTV9JRCxcbiAgICAgICAgICAgIHRva2VuTWV0YWRhdGFQcm9ncmFtOiBUT0tFTl9NRVRBREFUQV9QUk9HUkFNX0lELFxuICAgICAgICAgIH0sXG4gICAgICAgICAge1xuICAgICAgICAgICAgbWV0YWRhdGFBcmdzLFxuICAgICAgICAgIH0sXG4gICAgICAgICksXG4gICAgICApO1xuXG4gICAgICBpZiAoaW5wdXQuY3JlYXRvcnMpIHtcbiAgICAgICAgY29uc3QgYXNzZXRJZCA9I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Dogb3duZXJPck11bHRpc2lnWzBdO1xuICAgICAgY29uc3Qga2V5cGFpcnMgPSBvd25lck9yTXVsdGlzaWcubWFwKChzKSA9PiBzLnRvS2V5cGFpcigpKTtcblxuICAgICAgY29uc3QgdG9rZW5Bc3NvY2lhdGVkID0gYXdhaXQgQWNjb3VudC5Bc3NvY2lhdGVkLnJldHJ5R2V0T3JDcmVhdGUoXG4gICAgICAgIHRva2VuLFxuICAgICAgICBvd25lcixcbiAgICAgICAgcGF5ZXIsXG4gICAgICApO1xuXG4gICAgICBjb25zdCBpbnN0ID0gY3JlYXRlTWludFRvQ2hlY2tlZEluc3RydWN0aW9uKFxuICAgICAgICB0b2tlbi50b1B1YmxpY0tleSgpLFxuICAgICAgICB0b2tlbkFzc29jaWF0ZWQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgQ2FsY3VsYXRlLmNhbGN1bGF0ZUFtb3VudCh0b3RhbEFtb3VudCwgbWludERlY2ltYWwpLFxuICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICAga2V5cGFpcnMsXG4gICAgICApO1xuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb248UHVia2V5PihcbiAgICAgICAgW2luc3RdLFxuICAgICAgICBrZXlwYWlycyxcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCksXG4gICAgICAgIHRva2VuLFxuICAgICAgKTtcbiAgICB9KTtcbiAgfTtcbn1cbiIsICIvL0BpbnRlcm5hbFxuZXhwb3J0IG5hbWVzcGFjZSBTcGxUb2tlbiB7XG4gIGV4cG9ydCBjb25zdCBjYWxjdWxhdGVBbW91bnQgPSAoXG4gICAgYW1vdW50OiBudW1iZXIsXG4gICAgbWludERlY2ltYWw6IG51bWJlcixcbiAgKTogbnVtYmVyID0+IHtcbiAgICByZXR1cm4gYW1vdW50ICogMTAgKiogbWludERlY2ltYWw7XG4gIH07XG59XG4i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KlxuICAgKiBGZXRjaCBtaW50ZWQgbWV0YWRhdGEgYnkgb3duZXIgUHVia2V5XG4gICAqXG4gICAqIEBwYXJhbSB7UHVia2V5fSBvd25lclxuICAgKiBAcmV0dXJuIHtQcm9taXNlPFJlc3VsdDxUb2tlbk1ldGFkYXRhW118IEVycm9yPj59XG4gICAqL1xuICBleHBvcnQgY29uc3QgZmluZEJ5T3duZXIgPSBhc3luYyAoXG4gICAgb3duZXI6IFB1YmtleSxcbiAgKTogUHJvbWlzZTxSZXN1bHQ8VG9rZW5NZXRhZGF0YVtdLCBFcnJvcj4+ID0+IHtcbiAgICByZXR1cm4gVHJ5KGFzeW5jICgpID0+IHtcbiAgICAgIGNvbnN0IGNvbm5lY3Rpb24gPSBOb2RlLmdldENvbm5lY3Rpb24oKTtcbiAgICAgIGNvbnN0IGluZm8gPSBhd2FpdCBjb25uZWN0aW9uLmdldFBhcnNlZFRva2VuQWNjb3VudHNCeU93bmVyKFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICB7XG4gICAgICAgICAgcHJvZ3JhbUlkOiBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICB9LFxuICAgICAgKTtcblxuICAgICAgY29uc3QgZGF0YXMgPSBpbmZvLnZhbHVlLm1hcChhc3luYyAoZCkgPT4ge1xuICAgICAgICBjb25zdCBtaW50ID0gZC5hY2NvdW50LmRhdGEucGFyc2VkLmluZm8ubWludCBhcyBQdWJrZXk7XG4gICAgICAgIGNvbnN0IHRva2VuQW1vdW50ID0gZC5hY2NvdW50LmRhdGEucGFyc2VkLmluZm8udG9rZW5BbW91bnRcbiAgICAgICAgICAuYW1vdW50IGFzIHN0cmluZztcbiAgICAgICAgaWYgKHRva2VuQW1vdW50ID09PSAnMScpIHtcbiAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIE1ldGFkYXRhLmZyb21BY2NvdW50QWRkcmVzcyhcbiAgICAgICAgICBjb25uZWN0aW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BkZXN0OiBQdWJrZXksXG4gICAgYW1vdW50OiBudW1iZXIsXG4gICAgbWludERlY2ltYWw6IG51bWJlcixcbiAgICBmZWVQYXllcjogUHVia2V5LFxuICApOiBQcm9taXNlPFJlc3VsdDxQYXJ0aWFsU2lnblN0cnVjdHVyZSwgRXJyb3I+PiA9PiB7XG4gICAgcmV0dXJuIFRyeShhc3luYyAoKSA9PiB7XG4gICAgICBjb25zdCBvd25lclB1YmxpY0tleSA9IG93bmVyLnRvS2V5cGFpcigpLnB1YmxpY0tleTtcbiAgICAgIGNvbnN0IHNvdXJjZVRva2VuID0gYXdhaXQgQWNjb3VudC5Bc3NvY2lhdGVkLm1ha2VPckNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICBtaW50LFxuICAgICAgICBvd25lclB1YmxpY0tleS50b1N0cmluZygpLFxuICAgICAgICBmZWVQYXllcixcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IGRlc3RUb2tlbiA9IGF3YWl0IEFjY291bnQuQXNzb2NpYXRlZC5tYWtlT3JDcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgZGVzdCxcbiAgICAgICAgZmVlUGF5ZXIsXG4gICAgICApO1xuXG4gICAgICBsZXQgaW5zdDI7XG4gICAgICBjb25zdCBibG9ja2hhc2hPYmogPSBhd2FpdCBOb2RlLmdldENvbm5lY3Rpb24oKS5nZXRMYXRlc3RCbG9ja2hhc2goKTtcblxuICAgICAgY29uc3QgdHggPSBuZXcgVHJhbnNhY3Rpb24oe1xuICAgICAgICBsYXN0VmFsaWRCbG9ja0hlaWdodDogYmxvY2toYXNoT2JqLmxhc3RWYWxpZEJsb2NrSGVpZ2h0LFxuICAgICAgICBibG9ja2hhc2g6IGJsb2NraGFzaE9iai5ibG9ja2hhc2gsXG4gICAgICAgIGZlZVBheWVyOiBmZWVQYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgfSk7XG5cbiAgICAgIGluc3QyID0gY3JlYXRlVHJh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AgICAgICAgb3duZXIsXG4gICAgICAgIG93bmVyLFxuICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKSxcbiAgICApO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVBc3NvY2lhdGVkVG9rZW5BY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgIGZlZVBheWVyLFxuICAgICAgICB0b2tlbkFzc29jaWF0ZWQsXG4gICAgICAgIG93bmVyLFxuICAgICAgICBtaW50LFxuICAgICAgKSxcbiAgICApO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVNaW50VG9DaGVja2VkSW5zdHJ1Y3Rpb24oXG4gICAgICAgIG1pbnQsXG4gICAgICAgIHRva2VuQXNzb2NpYXRlZCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIENhbGN1bGF0ZS5jYWxjdWxhdGVBbW91bnQodG90YWxBbW91bnQsIG1pbnREZWNpbWFsKSxcbiAgICAgICAgbWludERlY2ltYWwsXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUNyZWF0ZU1ldGFkYXRhQWNjb3VudFYzSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHtcbiAgICAgICAgICBtZXRhZGF0YTogbWV0YWRhdGFQZGEsXG4gICAgICAgICAgbWludCxcbiAgICAgICAgICBtaW50QXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBwYXllcjogZmVlUGF5ZXIsXG4gICAgICAgICAgdXBkYXRlQXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgIGNyZWF0ZU1ldGFkYXRhQWNjb3VudEFyZ3NWMzoge1xuICAgICAgICAgICAgZGF0YTogdG9rZW5NZXRhZGF0YSxcbiAgICAgICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICAgICAgIGNvbGxlY3Rpb25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HVibGljS2V5LFxuICAgICAgICB0b3RhbEFtb3VudCxcbiAgICAgICAgbWludERlY2ltYWwsXG4gICAgICAgIGRhdGF2MixcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICBpc011dGFibGUsXG4gICAgICApO1xuXG4gICAgICAvLyBmcmVlemVBdXRob3JpdHlcbiAgICAgIGlmIChmcmVlemVBdXRob3JpdHkpIHtcbiAgICAgICAgaW5zdHMucHVzaChcbiAgICAgICAgICBjcmVhdGVGcmVlemVBdXRob3JpdHkoXG4gICAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgICAgIGZyZWV6ZUF1dGhvcml0eS50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBuZXcgVHJhbnNhY3Rpb25CdWlsZGVyLk1pbnQoXG4gICAgICAgIGluc3RzLFxuICAgICAgICBbb3duZXIudG9LZXlwYWlyKCksIG1pbnQudG9LZXlwYWlyKCldLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgbWludC5wdWJrZXksXG4gICAgICApO1xuICAgIH0pO1xuICB9O1xufVxuIiwgImltcG9ydCB7IFJlc3VsdCwgVHJ5IH0gZnJvbSAnfi9zdWl0ZS11dGlscyc7XG5pbXBvcnQgeyBUcmFuc2FjdGlvbkJ1aWxkZXIgfSBmcm9tICd+L3RyYW5zYWN0aW9uLWJ1aWxkZXInO1xuaW1wb3J0IHsgUHVia2V5LCBTZWNyZXQgfSBmcm9tICd+L3R5cGVzL2FjY291bnQnO1xuaW1wb3J0IHsgQWNjb3VudCB9IGZyb20gJ34vYWNjb3VudCc7XG5pbXBvcnQge1xuICBjcmVhdGVUaGF3QWNjb3VudEluc3RydWN0aW9uLFxuICBnZXRBc3NvY2lhdGVkVG9rZW5BZGRyZXNzU3luYyxcbn0g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dWJrZXksXG4gICAgICAgICAgbWludCxcbiAgICAgICAgICBtaW50QXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBwYXllcjogZmVlUGF5ZXIsXG4gICAgICAgICAgdXBkYXRlQXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgIGNyZWF0ZU1ldGFkYXRhQWNjb3VudEFyZ3NWMzoge1xuICAgICAgICAgICAgZGF0YTogbmZ0TWV0YWRhdGEsXG4gICAgICAgICAgICBpc011dGFibGUsXG4gICAgICAgICAgICBjb2xsZWN0aW9uRGV0YWlsczogbnVsbCxcbiAgICAgICAgICB9LFxuICAgICAgICB9LFxuICAgICAgKSxcbiAgICApO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVDcmVhdGVNYXN0ZXJFZGl0aW9uVjNJbnN0cnVjdGlvbihcbiAgICAgICAge1xuICAgICAgICAgIGVkaXRpb246IG1hc3RlckVkaXRpb25QdWJrZXksXG4gICAgICAgICAgbWludCxcbiAgICAgICAgICB1cGRhdGVBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICAgIG1pbnRBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICAgIHBheWVyOiBmZWVQYXllcixcbiAgICAgICAgICBtZXRhZGF0YTogdG9rZW5NZXRhZGF0YVB1YmtleSxcbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgIGNyZWF0ZU1hc3RlckVkaXRpb25BcmdzOiB7XG4gICAgICAgICAgICBtYXhTdXBwbHk6IDAsXG4gICAgICAgICAgfSxcbiAgICAgICAgfSxcbiAgICAgICksXG4gICAgKTtcbiAgICByZXR1cm4gaW5zdHJ1Y3Rpb25zO1xuICB9O1xuXG4gIC8qKlxuICAgKiBVcGxvYWQgY29udGVudCBhbmQgTkZUIG1pbnRcbiAgICpcbiAgICogQHBhcmFtIHtTZWNyZXR9IG93bmVyICAgICAgICAgLy8gb3duZXIncyBTZWN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0YWRhdGEuaW50b0luZnJhKFxuICAgICAgICBpbnB1dCxcbiAgICAgICAgdXJpLFxuICAgICAgICBzZWxsZXJGZWVCYXNpc1BvaW50cyxcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IGlzTXV0YWJsZSA9IGlucHV0LmlzTXV0YWJsZSA9PT0gdW5kZWZpbmVkID8gdHJ1ZSA6IGlucHV0LmlzTXV0YWJsZTtcblxuICAgICAgZGVidWdMb2coJyMgaW5wdXQ6ICcsIGlucHV0KTtcbiAgICAgIGRlYnVnTG9nKCcjIGRhdGF2MjogJywgZGF0YXYyKTtcblxuICAgICAgY29uc3QgbWludCA9IEFjY291bnQuS2V5cGFpci5jcmVhdGUoKTtcblxuICAgICAgY29uc3QgaW5zdHJ1Y3Rpb25zID0gYXdhaXQgY3JlYXRlTWludChcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgZGF0YXYyLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICk7XG5cbiAgICAgIC8vIGZyZWV6ZUF1dGhvcml0eVxuICAgICAgaWYgKGZyZWV6ZUF1dGhvcml0eSkge1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgICBjcmVhdGVEZWxlYWdhdGUoXG4gICAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgICAgIGZyZWV6ZUF1dGhvcml0eS50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIC8vIGNvbGxlY3Rpb24gLS0tXG4gICAgICBpZiAoaW5wdXQuY29sbGVjdGlvbikge1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgICBjcmVhdGVWZXJpZnlTaXplZENvbGxlY3Rpb24oXG4gICAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBpbnB1dC5jb2xsZWN0aW9uLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3Qga2V5cGFpcnMgPSBbb3duZXIudG9LZXlwYWlyKCksIG1pbnQudG9LZXlwYWlyKCldO1xuXG4gICAgICAvLyBjcmVhdG9yIC0tLVxuICAgICAgaWYgKGlucHV0LmNyZWF0b3JzKSB7XG4gICAgICAgIGlucHV0LmNyZWF0b3JzLmZvckVhY2goKGNyZWF0b3IpID0+IHtcbiAgICAgICAgICBpZiAoQWNjb3VudC5LZXlwYWlyLmlzU2VjcmV0KGNyZWF0b3Iuc2VjcmV0KSkge1xuICAgICAgICAgICAgY29uc3QgY3JlYXRvclB1YmtleSA9IGNyZWF0b3IuYWRkcmVzcy50b1B1YmxpY0tleSgpO1xuICAgICAgICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZVZlcmlmeUNyZWF0b3IobWludC50b1B1YmxpY0tleSgpLCBjcmVhdG9yUHVia2V5KTtcbiAgICAgICAgICAgIGluc3RydWN0aW9ucy5wdXNoKGluc3QpO1xuICAgICAgICAgICAga2V5cGFpcnMucHVzaChjcmVhdG9yLnNlY3JldC50b0tleXBhaXIoKSk7XG4gICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuTWludChcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLFxuICAgICAgICBrZXlwYWlycyxcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCksXG4gICAgICAgIG1pbnQucHVia2V5LFxuICAgICAgKTtcbiAgICB9KTtcbiAgfTtcbn1cbiIsICJpbXBvcnQgeyBkZWJ1Z0xvZywgUmVz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5wdXQpO1xuICAgICAgZGVidWdMb2coJyMgc2VsbGVyRmVlQmFzaXNQb2ludHM6ICcsIHNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgIGRlYnVnTG9nKCcjIGRhdGF2MjogJywgZGF0YXYyKTtcblxuICAgICAgY29uc3QgbWludCA9IEFjY291bnQuS2V5cGFpci5jcmVhdGUoKTtcbiAgICAgIGNvbnN0IGluc3RzID0gYXdhaXQgTWludC5jcmVhdGVNaW50KFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyUHVibGlja2V5LFxuICAgICAgICBkYXRhdjIsXG4gICAgICAgIGZlZVBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICk7XG5cbiAgICAgIC8vIGZyZWV6ZUF1dGhvcml0eVxuICAgICAgaWYgKG9wdGlvbnMuZnJlZXplQXV0aG9yaXR5KSB7XG4gICAgICAgIGluc3RzLnB1c2goXG4gICAgICAgICAgTWludC5jcmVhdGVEZWxlYWdhdGUoXG4gICAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBvd25lclB1YmxpY2tleSxcbiAgICAgICAgICAgIG9wdGlvbnMuZnJlZXplQXV0aG9yaXR5LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgYmxvY2toYXNoT2JqID0gYXdhaXQgTm9kZS5nZXRDb25uZWN0aW9uKCkuZ2V0TGF0ZXN0QmxvY2toYXNoKCk7XG4gICAgICBjb25zdCB0eCA9IG5ldyBUcmFuc2FjdGlvbih7XG4gICAgICAgIGxhc3RWYWxpZEJsb2NrSGVpZ2h0OiBibG9ja2hhc2hPYmoubGFzdFZhbGlkQmxvY2tIZWlnaHQsXG4gICAgICAgIGJsb2NraGFzaDogYmxvY2toYXNoT2JqLmJsb2NraGFzaCxcbiAgICAgICAgZmVlUGF5ZXI6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JpdHlcbiAgICAgIGlmIChmcmVlemVBdXRob3JpdHkpIHtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgICAgTWludC5jcmVhdGVEZWxlYWdhdGUoXG4gICAgICAgICAgICBjb2xsZWN0aW9uTWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgICAgICBmcmVlemVBdXRob3JpdHkudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBjb2xsZWN0aW9ucyA9IHtcbiAgICAgICAgY29sbGVjdGlvbk1ldGFkYXRhOiBjb2xsZWN0aW9uTWV0YWRhdGFBY2NvdW50LFxuICAgICAgICBjb2xsZWN0aW9uQXV0aG9yaXR5OiBvd25lci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgIGNvbGxlY3Rpb25NaW50OiBjb2xsZWN0aW9uTWludC50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICB9O1xuXG4gICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgY3JlYXRlU2V0Q29sbGVjdGlvblNpemVJbnN0cnVjdGlvbihjb2xsZWN0aW9ucywge1xuICAgICAgICAgIHNldENvbGxlY3Rpb25TaXplQXJnczoge1xuICAgICAgICAgICAgc2l6ZTogY29sbGVjdGlvblNpemUgfHwgREVGQVVMVF9DT0xMRUNUSU9OX1NJWkUsXG4gICAgICAgICAgfSxcbiAgICAgICAgfSksXG4gICAgICApO1xuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5NaW50KFxuICAgICAgICBpbnN0cnVjdGlvbnMsXG4gICAgICAgIFtvd25lci50b0tleXBhaXIoKSwgY29sbGVjdGlvbk1pbnQudG9LZXlwYWlyKCldLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgY29sbGVjdGlvbk1pbnQ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vcnMsIE9wdGlvbiB9IGZyb20gJ34vdHlwZXMvcmVndWxhci1uZnQnO1xuaW1wb3J0IHsgSW50ZXJuYWxDcmVhdG9ycyB9IGZyb20gJ34vdHlwZXMvY29udmVydGVyJztcblxuZXhwb3J0IG5hbWVzcGFjZSBDb252ZXJ0ZXIge1xuICBleHBvcnQgbmFtZXNwYWNlIENyZWF0b3JzIHtcbiAgICBleHBvcnQgY29uc3QgaW50b0luZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IE9wdGlvbjxJbnRlcm5hbENyZWF0b3JzW10+ID0+IHtcbiAgICAgIGlmICghaW5wdXQpIHtcbiAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICB9XG4gICAgICByZXR1cm4gaW5wdXQubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvQ29tcHJlc3NlZE5mdEluZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IEludGVybmFsQ3JlYXRvcnNbXSA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBbXTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBpbnB1dCEubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgIC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lX2Jhc2lzX3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEuc3ltYm9sKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU3ltYm9sKG1ldGFkYXRhLnN5bWJvbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAocmVzICYmIHJlcy5pc0Vycikge1xuICAgICAgICAgIHJlc3VsdHMucHVzaCguLi5yZXMuZXJyb3IuZGV0YWlscyk7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgICAgaWYgKHJlc3VsdHMubGVuZ3RoID4gMCkge1xuICAgICAgICBjb25zdCBtZXNzYWdlID1cbiAgICAgICAgICAnQ2F1Z2h0IGluIHRoZSB2YWxpZGF0aW9uIGVycm9ycy4gc2VlIGluZm9ybWF0aW9uIGUuZzogZXJyPFZhbGlkYXRvckVyc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UGF5ZXIpO1xuICAgIGRlbGVnYXRlLnVud3JhcCgpLmNhblN1Ym1pdCA9IHRydWU7XG5cbiAgICBjb25zdCB0cmFuc2ZlciA9IGF3YWl0IFRyeShhc3luYyAoKSA9PiB7XG4gICAgICBjb25zdCBibG9ja2hhc2hPYmogPSBhd2FpdCBOb2RlLmdldENvbm5lY3Rpb24oKS5nZXRMYXRlc3RCbG9ja2hhc2goKTtcbiAgICAgIGNvbnN0IGluc3QgPSBuZXcgVHJhbnNhY3Rpb24oe1xuICAgICAgICBsYXN0VmFsaWRCbG9ja0hlaWdodDogYmxvY2toYXNoT2JqLmxhc3RWYWxpZEJsb2NrSGVpZ2h0LFxuICAgICAgICBibG9ja2hhc2g6IGJsb2NraGFzaE9iai5ibG9ja2hhc2gsXG4gICAgICAgIGZlZVBheWVyOiBmZWVQYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgfSk7XG5cbiAgICAgIGluc3QuYWRkKFxuICAgICAgICBhd2FpdCBUcmFuc2Zlci5jcmVhdGVUcmFuc2ZlcihcbiAgICAgICAgICBtaW50LFxuICAgICAgICAgIG5ldyBBY2NvdW50LktleXBhaXIoeyBzZWNyZXQ6IG93bmVyIH0pLnB1YmtleSxcbiAgICAgICAgICBkZXN0LFxuICAgICAgICAgIGZlZVBheWVyLFxuICAgICAgICApLFxuICAgICAgKTtcbiAgICAgIGluc3QucmVjZW50QmxvY2toYXNoID0gYmxvY2toYXNoT2JqLmJsb2NraGFzaDtcblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuUGFydGlhbFNpZ24oXG4gICAgICAgIGluc3RcbiAgICAgICAgICAuc2VyaWFsaXplKHtcbiAgICAgICAgICAgIHJlcXVpcmVBbGxTaWduYXR1cmVzOiBmYWxzZSxcbiAgICAgICAgICB9KVxuICAgICAgICAgIC50b1N0cmluZygnaGV4JyksXG4gICAgICApO1xuICAgIH0pO1xuICAgIHJldHVybiBbZGVsZWdhdGUsIHRyYW5z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1c2goXG4gICAgICAgIGNyZWF0ZUNyZWF0ZVRyZWVJbnN0cnVjdGlvbihcbiAgICAgICAgICB7XG4gICAgICAgICAgICBtZXJrbGVUcmVlOiB0cmVlT3duZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICAgICAgdHJlZUF1dGhvcml0eSxcbiAgICAgICAgICAgIHRyZWVDcmVhdG9yOiBvd25lci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgICAgICBwYXllcjogcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICAgICAgbG9nV3JhcHBlcjogU1BMX05PT1BfUFJPR1JBTV9JRCxcbiAgICAgICAgICAgIGNvbXByZXNzaW9uUHJvZ3JhbTogU1BMX0FDQ09VTlRfQ09NUFJFU1NJT05fUFJPR1JBTV9JRCxcbiAgICAgICAgICB9LFxuICAgICAgICAgIHtcbiAgICAgICAgICAgIG1heEJ1ZmZlclNpemUsXG4gICAgICAgICAgICBtYXhEZXB0aCxcbiAgICAgICAgICAgIHB1YmxpYzogZmFsc2UsXG4gICAgICAgICAgfSxcbiAgICAgICAgICBNUExfQlVCQkxFR1VNX1BST0dSQU1fSUQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgKSxcbiAgICAgICk7XG5cbiAgICAgIHJldHVybiBuZXcgVHJhbnNhY3Rpb25CdWlsZGVyLk1pbnQoXG4gICAgICAgIGluc3RydWN0aW9ucyxcbiAgICAgICAgW3RyZWVPd25lci50b0tleXBhaXIoKSwgb3duZXIudG9LZXlwYWlyKCldLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgdHJlZU93bmVyLnB1YmtleSxcbiAgICAgICk7XG4gICAgfSk7XG4gIH07XG5cbiAgLyoqXG4gICAqIGNyZWF0ZSBhIG5ldyBuZnQgc3BhY2VcbiAgICogVGhpcyBmdW5jdGlvbiBuZWVkcyBvbmx5IDEgY2FsbFxuICAgKlxuICAgKiBAcGFyYW0ge1Nl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qcm9ncmFtOiBTUExfQUNDT1VOVF9DT01QUkVTU0lPTl9QUk9HUkFNX0lELFxuICAgICAgICBjcmVhdG9yOiBmZWVQYXllcixcblxuICAgICAgICAvLyBwcm92aWRlIHRoZSBzbGljZWQgcHJvb2ZcbiAgICAgICAgYW5jaG9yUmVtYWluaW5nQWNjb3VudHM6IHNsaWNlZFByb29mLFxuICAgICAgfSxcbiAgICAgIHtcbiAgICAgICAgcm9vdDogWy4uLmFzc2V0UHJvb2Yucm9vdC50cmltKCkudG9QdWJsaWNLZXkoKS50b0J5dGVzKCldLFxuICAgICAgICBjcmVhdG9ySGFzaDogWy4uLmNvbXB1dGVDcmVhdG9ySGFzaChjcmVhdG9ycyldLFxuICAgICAgICBkYXRhSGFzaDogWy4uLmNvbXB1dGVEYXRhSGFzaChtZXRhZGF0YSldLFxuICAgICAgICBub25jZTogY29tcHJlc3Npb24ubGVhZl9pZCxcbiAgICAgICAgaW5kZXg6IGNvbXByZXNzaW9uLmxlYWZfaWQsXG4gICAgICAgIG1lc3NhZ2U6IG1ldGFkYXRhLFxuICAgICAgfSxcbiAgICApO1xuICB9O1xuXG4gIC8qKlxuICAgKiBVcGxvYWQgY29udGVudCBhbmQgQ29tcHJlc3NlZCBORlQgbWludFxuICAgKlxuICAgKiBAcGFyYW0ge1NlY3JldH0gb3duZXIgICAgICAgICAvLyBvd25lcidzIFNlY3JldFxuICAgKiBAcGFyYW0ge0lucHV0TmZ0TWV0YWRhdGF9IGlucHV0XG4gICAqIHtcbiAgICogICBuYW1lOiBzdHJpbmcgICAgICAgICAgICAgICAvLyBuZnQgY29udGVudCBuYW1lXG4gICAqICAgc3ltYm9sOiBzdHJpbmcgICAgICAgICAgICAgLy8gbmZ0IHRpY2tlciBzeW1ib2xcbiAgICogICBmaWxlUGF0aDogc3RyaW5nIHwgRmlsZSAgICAvLyBuZnQgdGlja2VyIHN5bWJvbFxuICAgKiAgIHJveWFsdHk6IG51bWJlciAgICAgICAgICAgIC8vIHJveWFsd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ICAgICAgY29uc3QgbGVhZkRlbGVnYXRlID0gZGVsZWdhdGVcbiAgICAgICAgPyBkZWxlZ2F0ZVxuICAgICAgICA6IG5ldyBBY2NvdW50LktleXBhaXIoeyBzZWNyZXQ6IHBheWVyISB9KS5wdWJrZXk7XG5cbiAgICAgIGNvbnN0IHRyZWVBdXRob3JpdHkgPSBBY2NvdW50LlBkYS5nZXRUcmVlQXV0aG9yaXR5KFxuICAgICAgICB0cmVlT3duZXIudG9QdWJsaWNLZXkoKS50b1N0cmluZygpLFxuICAgICAgKTtcbiAgICAgIGNvbnN0IGNvbGxlY3Rpb25NZXRhZGF0YSA9IEFjY291bnQuUGRhLmdldE1ldGFkYXRhKFxuICAgICAgICBjb2xsZWN0aW9uTWludC50b1N0cmluZygpLFxuICAgICAgKTtcbiAgICAgIGNvbnN0IGNvbGxlY3Rpb25NYXN0ZXJFZGl0aW9uQWNjb3VudCA9IEFjY291bnQuUGRhLmdldE1hc3RlckVkaXRpb24oXG4gICAgICAgIGNvbGxlY3Rpb25NaW50LnRvU3RyaW5nKCksXG4gICAgICApO1xuICAgICAgY29uc3QgYnViYmxlZ3VtU2lnbmVyID0gQWNjb3VudC5QZGEuZ2V0Qmd1bVNpZ25lcigpO1xuXG4gICAgICAvLyBwb3JwZXJ0aWVzLCBVcGxvYWQgY29udGVudFxuICAgICAgbGV0IHByb3BlcnRpZXM7XG4gICAgICBpZiAoaW5wdXQucHJvcGVydGllcykge1xuICAgICAgICBwcm9wZXJ0aWVzID0gYXdhaXQgQ29udmVydGVyLlByb3BlcnRpZXMuaW50b0luZnJhKFxuICAgICAgICAgIGlucHV0LnByb3BlcnRpZXMsXG4gICAgICAgICAgU3RvcmFnZS51cGxvYWRGaWxlLFxuICAgICAgICAgIHN0b3JhZ2VUeXBlLFxuICAgICAgICAgIHBheWVyLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICBpbnB1dCA9IHtcbiAgICAgICAgLi4uaW5wdXQsXG4gICAgICAgIHByb3Blc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WF0ZU1pbnRUb0NvbGxlY3Rpb25WMUluc3RydWN0aW9uKFxuICAgICAgICAgIHtcbiAgICAgICAgICAgIG1lcmtsZVRyZWU6IHRyZWVPd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgdHJlZUF1dGhvcml0eSxcbiAgICAgICAgICAgIHRyZWVEZWxlZ2F0ZTogb3duZXJQdWJsaWNLZXksXG4gICAgICAgICAgICBwYXllcjogcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICAgICAgbGVhZk93bmVyOiBsZWFmT3duZXIsIC8vIHJlY2VpdmVyXG4gICAgICAgICAgICBsZWFmRGVsZWdhdGU6IGxlYWZEZWxlZ2F0ZS50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgY29sbGVjdGlvbkF1dGhvcml0eTogb3duZXJQdWJsaWNLZXksXG4gICAgICAgICAgICBjb2xsZWN0aW9uTWludDogY29sbGVjdGlvbk1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIGNvbGxlY3Rpb25NZXRhZGF0YSxcbiAgICAgICAgICAgIGVkaXRpb25BY2NvdW50OiBjb2xsZWN0aW9uTWFzdGVyRWRpdGlvbkFjY291bnQsXG4gICAgICAgICAgICBidWJibGVndW1TaWduZXIsXG4gICAgICAgICAgICBsb2dXcmFwcGVyOiBTUExfTk9PUF9QUk9HUkFNX0lELFxuICAgICAgICAgICAgY29sbGVjdGlvbkF1dGhvcml0eVJlY29yZFBkYTogQlVCQkxFR1VNX1BST0dSQU1fSUQsXG4gICAgICAgICAgICBjb21wcmVzc2lvblByb2dyYW06IFNQTF9BQ0NPVU5UX0NPTVBSRVNTSU9OX1BST0dSQU1fSUQsXG4gICAgICAgICAgICB0b2tlbk1ldGFkYXRhUHJvZ3JhbTogVE9LRU5fTUVUQURBVEFfUFJPR1JBTV9JRCxcbiAgICAgICAgICB9LFxuICAgICAgICAgIHtcbiAgICAgICAgICAgIG1ldGFkYXRhQXJncyxcbiAgICAgICAgICB9LFxuICAgICAgICApLFxuICAgICAgKTtcblxuICAgICAgaWYgKGlucHV0LmNyZWF0b3JzKSB7XG4gICAgICAgIGNvbnN0IGFzc2V0SWQgPSBhd2FpdCBuZXcgU3BhY2UuU3BhY2UodHJlZU93bmVyKS5nZXRBc3NldElkKCk7XG4gICAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICAgIGF3YWl0IGNyZWF0ZVZlcmlmeUNyZWF0b3IoXG4gICAgICAgICAgICBtZXRhZGF0YUFyZ3MuY3JlYXRvcnMsXG4gICAgICAgICAgICBhc3NldElkLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICB0cmVlT3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIG1ldGFkYXRhQXJncyxcbiAgICAgICAgICAgIHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5NaW50KFxuICAgICAgICBpbnN0cnVjdGlvbnMsXG4gICAgICAgIFtvd25lci50b0tleXBhaXIoKV0sXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICBuZXcgU3BhY2UuU3BhY2UodHJlZU93bmVyKSxcbiAgICAgICk7XG4gICAgfSk7XG4gIH07XG59XG4iLCAiaW1wb3J0IHsgY3JlYXRlTWludFRvQ2hlY2tlZEluc3RydWN0aW9uIH0gZnJvbSAnQHNvbGFuYS9zcGwtdG9rZW4nO1xuaW1wb3J0IHsgUmVzdWx0LCBUcnkgfSBmcm9tICd+L3N1aXRlLXV0aWxzJztcbmltcG9ydCB7IFB1YmtleSwgU2VjcmV0IH0gZnJvbSAnfi90eXBlcy9hY2NvdW50JztcbmltcG9ydCB7IFRyYW5zYWN0aW9uQnVpbGRlciB9IGZyb20gJ34vdHJhbnNhY3Rpb24tYnVpbGRlcic7XG5pbXBvcnQgeyB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0dXJuO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBNZXRhZGF0YS5mcm9tQWNjb3VudEFkZHJlc3MoXG4gICAgICAgICAgY29ubmVjdGlvbixcbiAgICAgICAgICBBY2NvdW50LlBkYS5nZXRNZXRhZGF0YShtaW50KSxcbiAgICAgICAgKVxuICAgICAgICAgIC50aGVuKGFzeW5jIChtZXRhZGF0YSkgPT4ge1xuICAgICAgICAgICAgLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLWV4cGxpY2l0LWFueSAqL1xuICAgICAgICAgICAgcmV0dXJuIGZldGNoUmV0cnkobWV0YWRhdGEuZGF0YS51cmkpLnRoZW4oKGpzb246IGFueSkgPT4ge1xuICAgICAgICAgICAgICByZXR1cm4gY29udmVydGVyKG1ldGFkYXRhLCBqc29uLCB0b2tlbkFtb3VudCk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICB9KVxuICAgICAgICAgIC5jYXRjaCgoZXJyKSA9PiBkZWJ1Z0xvZygnIyBbRmV0Y2ggZXJyb3JdJywgZXJyKSk7XG4gICAgICB9KTtcblxuICAgICAgY29uc3QgZmlsdGVycyA9IChhd2FpdCBQcm9taXNlLmFsbChkYXRhcykpLmZpbHRlcihcbiAgICAgICAgKGRhdGEpID0+IGRhdGEgIT09IHVuZGVmaW5lZCxcbiAgICAgICk7XG4gICAgICByZXR1cm4gZmlsdGVycyBhcyBUb2tlbk1ldGFkYXRhW107XG4gICAgfSk7XG4gIH07XG5cbiAgLyoqXG4gICAqIEZldGNoIG1pbnRlZCBtZXRhZGF0YSBieSBtaW50IGFkZHJlc3NcbiAgICpcbiAgICogQHBhcmFtIHtQdWJrZXl9IG1pbnRcbiAgICogQHJldHVybiBQcm9taXNlPFJlc3VsdDxVc2VyU2lkZU91dHB1dC5Ub2tlbk1ldGFkYXRhLCBFcnJvcj4+XG4gICAqL1xuICBleHBvcnQgY29uc3QgZmluZEJ5TWludCA9IGFzeW5jIChcbiAgICB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W9ucy5wdXNoKFxuICAgICAgY3JlYXRlSW5pdGlhbGl6ZU1pbnRJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgbWludERlY2ltYWwsXG4gICAgICAgIG93bmVyLFxuICAgICAgICBvd25lcixcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICBmZWVQYXllcixcbiAgICAgICAgdG9rZW5Bc3NvY2lhdGVkLFxuICAgICAgICBvd25lcixcbiAgICAgICAgbWludCxcbiAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlTWludFRvQ2hlY2tlZEluc3RydWN0aW9uKFxuICAgICAgICBtaW50LFxuICAgICAgICB0b2tlbkFzc29jaWF0ZWQsXG4gICAgICAgIG93bmVyLFxuICAgICAgICBDYWxjdWxhdGUuY2FsY3VsYXRlQW1vdW50KHRvdGFsQW1vdW50LCBtaW50RGVjaW1hbCksXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgKSxcbiAgICApO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVDcmVhdGVNZXRhZGF0YUFjY291bnRWM0luc3RydWN0aW9uKFxuICAgICAgICB7XG4gICAgICAgICAgbWV0YWRhdGE6IG1ldGFkYXRhUGRhLFxuICAgICAgICAgIG1pbnQsXG4gICAgICAgICAgbWludEF1dGhvcml0eTogb3duZXIsXG4gICAgICAgICAgcGF5ZXI6IGZlZVBheWVyLFxuICAgICAgICAgIHVwZGF0ZUF1dGhvcml0eTogb3duZXIsXG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICBjcmVhdGVNZXRhZGF0YUFjY291bnRBcmdzVjM6IHtcbiAgICAgICAgICA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AgICBwYXllcixcbiAgICAgICAgKTtcblxuICAgICAgICBpZiAodXBsb2FkZWQuaXNFcnIpIHtcbiAgICAgICAgICB0aHJvdyB1cGxvYWRlZDtcbiAgICAgICAgfVxuICAgICAgICB1cmkgPSB1cGxvYWRlZC52YWx1ZTtcbiAgICAgIH0gZWxzZSBpZiAoaW5wdXQudXJpKSB7XG4gICAgICAgIGNvbnN0IGltYWdlID0geyBpbWFnZTogaW5wdXQudXJpIH07XG4gICAgICAgIGNvbnN0IHVwbG9hZGVkID0gYXdhaXQgU3RvcmFnZS51cGxvYWREYXRhKFxuICAgICAgICAgIHsgLi4uc3RvcmFnZU1ldGFkYXRhLCAuLi5pbWFnZSB9LFxuICAgICAgICAgIHN0b3JhZ2VUeXBlLFxuICAgICAgICAgIHBheWVyLFxuICAgICAgICApO1xuICAgICAgICBpZiAodXBsb2FkZWQuaXNFcnIpIHtcbiAgICAgICAgICB0aHJvdyB1cGxvYWRlZDtcbiAgICAgICAgfVxuICAgICAgICB1cmkgPSB1cGxvYWRlZC52YWx1ZTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHRocm93IEVycm9yKGBNdXN0IHNldCBmaWxlUGF0aCcgb3IgJ3VyaSdgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgaXNNdXRhYmxlID0gdHJ1ZTtcblxuICAgICAgY29uc3QgZGF0YXYyID0gQ29udmVydGVyLlRva2VuTWV0YWRhdGEuaW50b0luZnJhKFxuICAgICAgICBpbnB1dCxcbiAgICAgICAgdXJpLFxuICAgICAgICBzZWxsZXJGZWVCYXNpc1BvaW50cyxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGRhdGF2MjogJywgZGF0YXYyKTtcbiAgICAgIGRlYnVnTG9nKCcjIHVwbG9hZCBjb250ZW50IHVybDogJywgdXJpKTtcblxuICAgICAgY29uc3QgbWludCA9IEFjY291bnQuS2V5cGFpci5jcmVhdGUoKTtcbiAgICAgIGNvbnN0IGluc3RzID0gYXdhaXQgY3JlYXRlTWludChcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgdG90YWxBbW91bnQsXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICBkYXRhdjIsXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgKTtcblxuICAgICAgLy8gZnJlZXplQXV0aG9yaXR5XG4gICAgICBpZiAoZnJlZXplQXV0aG9yaXR5KSB7XG4gICAgICAgIGluc3RzLnB1c2goXG4gICAgICAgICAgY3JlYXRlRnJlZXplQXV0aG9yaXR5KFxuICAgICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgICAgICBmcmVlemVBdXRob3JpdHkudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5NaW50KFxuICAgICAgICBpbnN0cyxcbiAgICAgICAgW293bmVyLnRvS2V5cGFpcigpLCBtaW50LnRvS2V5cGFpcigpXSxcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCksXG4gICAgICAgIG1pbnQucHVia2V5LFxuICAgICAgKTtcbiAgICB9KTtcbiAgfTtcbn1cbiIsICJpbXBvcnQgeyBSZXN1bHQsIFRyeSB9IGZyb20gJ34vc3VpdGUtdXRpbHMnO1xuaW1wb3J0IHsgVHJhbnNhY3Rpb25CdWlsZGVyIH0gZnJvbSAnfi90cmFuc2FjdGlvbi1idWlsZGVyJztcbmltcG9ydCB7IFB1YmtleSwgU2VjcmV0IH0gZnJvbSAnfi90eXBlcy9hY2NvdW50JztcbmltcG9ydCB7IEFjY291bnQgfSBmcm9tICd+L2FjY291bnQnO1xuaW1wb3J0IHtcbiAgY3JlY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4gICAgb3duZXI6IFB1YmtleSxcbiAgICBkZXN0OiBQdWJrZXksXG4gICAgb3duZXJPck11bHRpc2lnOiBTZWNyZXRbXSxcbiAgICBhbW91bnQ6IG51bWJlcixcbiAgICBtaW50RGVjaW1hbDogbnVtYmVyLFxuICAgIG9wdGlvbnM6IFBhcnRpYWw8TWludE9wdGlvbnM+ID0ge30sXG4gICk6IFByb21pc2U8UmVzdWx0PENvbW1vblN0cnVjdHVyZSwgRXJyb3I+PiA9PiB7XG4gICAgcmV0dXJuIFRyeShhc3luYyAoKSA9PiB7XG4gICAgICBjb25zdCBwYXllciA9IG9wdGlvbnMuZmVlUGF5ZXIgPyBvcHRpb25zLmZlZVBheWVyIDogb3duZXJPck11bHRpc2lnWzBdO1xuICAgICAgY29uc3QgcGF5ZXJQdWJrZXkgPSBuZXcgQWNjb3VudC5LZXlwYWlyKHsgc2VjcmV0OiBwYXllciB9KTtcbiAgICAgIGNvbnN0IGtleXBhaXJzID0gb3duZXJPck11bHRpc2lnLm1hcCgocykgPT4gcy50b0tleXBhaXIoKSk7XG4gICAgICBjb25zdCBzb3VyY2VUb2tlbiA9IGF3YWl0IEFjY291bnQuQXNzb2NpYXRlZC5tYWtlT3JDcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgb3duZXIudG9TdHJpbmcoKSxcbiAgICAgICAgcGF5ZXJQdWJrZXkucHVia2V5LFxuICAgICAgKTtcblxuICAgICAgY29uc3QgZGVzdFRva2VuID0gYXdhaXQgQWNjb3VudC5Bc3NvY2lhdGVkLm1ha2VPckNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICBtaW50LFxuICAgICAgICBkZXN0LFxuICAgICAgICBwYXllclB1YmtleS5wdWJrZXksXG4gICAgICApO1xuXG4gICAgICBjb25zdCBpbnN0ID0gY3JlYXRlVHJhbnNmZXJDaGVja2VkSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHNvdXJjZVRva2VuLnRva2VuQWNjb3Vud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RhdGFBY2NvdW50VjNJbnN0cnVjdGlvbihcbiAgICAgICAge1xuICAgICAgICAgIG1ldGFkYXRhOiB0b2tlbk1ldGFkYXRhUHVia2V5LFxuICAgICAgICAgIG1pbnQsXG4gICAgICAgICAgbWludEF1dGhvcml0eTogb3duZXIsXG4gICAgICAgICAgcGF5ZXI6IGZlZVBheWVyLFxuICAgICAgICAgIHVwZGF0ZUF1dGhvcml0eTogb3duZXIsXG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICBjcmVhdGVNZXRhZGF0YUFjY291bnRBcmdzVjM6IHtcbiAgICAgICAgICAgIGRhdGE6IG5mdE1ldGFkYXRhLFxuICAgICAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgICAgICAgY29sbGVjdGlvbkRldGFpbHM6IG51bGwsXG4gICAgICAgICAgfSxcbiAgICAgICAgfSxcbiAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlQ3JlYXRlTWFzdGVyRWRpdGlvblYzSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHtcbiAgICAgICAgICBlZGl0aW9uOiBtYXN0ZXJFZGl0aW9uUHVia2V5LFxuICAgICAgICAgIG1pbnQsXG4gICAgICAgICAgdXBkYXRlQXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBtaW50QXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBwYXllcjogZmVlUGF5ZXIsXG4gICAgICAgICAgbWV0YWRhdGE6IHRva2VuTWV0YWRhdGFQdWJrZXksXG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICBjcmVhdGVNYXN0ZXJFZGl0aW9uQXJnczoge1xuICAgICAgICAgICAgbWF4U3VwcGx5OiAwLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICApLFxuICAgICk7XG4gICAgcmV0dXJuIGluc3RydWN0aW9ucztcbiAgfTtcblxuICAvKipcbiAgICogVXBsb2FkI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bGVQYXRoJyBvciAndXJpJ2ApO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBkYXRhdjIgPSBDb252ZXJ0ZXIuUmVndWxhck5mdE1ldGFkYXRhLmludG9JbmZyYShcbiAgICAgICAgaW5wdXQsXG4gICAgICAgIHVyaSxcbiAgICAgICAgc2VsbGVyRmVlQmFzaXNQb2ludHMsXG4gICAgICApO1xuXG4gICAgICBjb25zdCBpc011dGFibGUgPSBpbnB1dC5pc011dGFibGUgPT09IHVuZGVmaW5lZCA/IHRydWUgOiBpbnB1dC5pc011dGFibGU7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGlucHV0OiAnLCBpbnB1dCk7XG4gICAgICBkZWJ1Z0xvZygnIyBkYXRhdjI6ICcsIGRhdGF2Mik7XG5cbiAgICAgIGNvbnN0IG1pbnQgPSBBY2NvdW50LktleXBhaXIuY3JlYXRlKCk7XG5cbiAgICAgIGNvbnN0IGluc3RydWN0aW9ucyA9IGF3YWl0IGNyZWF0ZU1pbnQoXG4gICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgIGRhdGF2MixcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICBpc011dGFibGUsXG4gICAgICApO1xuXG4gICAgICAvLyBmcmVlemVBdXRob3JpdHlcbiAgICAgIGlmIChmcmVlemVBdXRob3JpdHkpIHtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgICAgY3JlYXRlRGVsZWFnYXRlKFxuICAgICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgICAgICBmcmVlemVBdXRob3JpdHkudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICAvLyBjb2xsZWN0aW9uIC0tLVxuICAgICAgaWYgKGlucHV0LmNvbGxlY3Rpb24pIHtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgICAgY3JlYXRlVmVyaWZ5U2l6ZWRDb2xsZWN0aW9uKFxuICAgICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgaW5wdXQuY29sbGVjdGlvbi50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGtleXBhaXJzID0gW293bmVyLnRvS2V5cGFpcigpLCBtaW50LnRvS2V5cGFpcigpXTtcblxuICAgICAgLy8gY3JlYXRvciAtLS1cbiAgICAgIGlmIChpbnB1dC5jcmVhdG9ycykge1xuICAgICAgICBpbnB1dC5jcmVhdG9ycy5mb3JFYWNoKChjcmVhdG9yKSA9PiB7XG4gICAgICAgICAgaWYgKEFjY291bnQuS2V5cGFpci5pc1NlY3JldChjcmVhdG9yLnNlY3JldCkpIHtcbiAgICAgICAgICAgIGNvbnN0IGNyZWF0b3JQdWJrZXkgPSBjcmVhdG9yLmFkZHJlc3MudG9QdWJsaWNLZXkoKTtcbiAgICAgICAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVWZXJpZnlDcmVhdG9yKG1pbnQudG9QdWJsaWNLZXkoKSwgY3JlYXRvclB1YmtleSk7XG4gICAgICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChpbnN0KTtcbiAgICAgICAgICAgIGtleXBhaXJzLnB1c2goY3JlYXRvci5zZWNyZXQudG9LZXlwYWlyKCkpO1xuICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBuZXcgVHJhbnNhY3Rpb25CdWlsZGVyLk1pbnQoXG4gICAgICAgIGluc3RydWN0aW9ucyxcbiAgICAgICAga2V5cGFpcnMsXG4gICAgICAgIHBheWVyLnRvS2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9IGlucHV0LmlzTXV0YWJsZSA9PT0gdW5kZWZpbmVkID8gdHJ1ZSA6IGlucHV0LmlzTXV0YWJsZTtcblxuICAgICAgZGVidWdMb2coJyMgaW5wdXQ6ICcsIGlucHV0KTtcbiAgICAgIGRlYnVnTG9nKCcjIHNlbGxlckZlZUJhc2lzUG9pbnRzOiAnLCBzZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICBkZWJ1Z0xvZygnIyBkYXRhdjI6ICcsIGRhdGF2Mik7XG5cbiAgICAgIGNvbnN0IG1pbnQgPSBBY2NvdW50LktleXBhaXIuY3JlYXRlKCk7XG4gICAgICBjb25zdCBpbnN0cyA9IGF3YWl0IE1pbnQuY3JlYXRlTWludChcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lclB1YmxpY2tleSxcbiAgICAgICAgZGF0YXYyLFxuICAgICAgICBmZWVQYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgICBpc011dGFibGUsXG4gICAgICApO1xuXG4gICAgICAvLyBmcmVlemVBdXRob3JpdHlcbiAgICAgIGlmIChvcHRpb25zLmZyZWV6ZUF1dGhvcml0eSkge1xuICAgICAgICBpbnN0cy5wdXNoKFxuICAgICAgICAgIE1pbnQuY3JlYXRlRGVsZWFnYXRlKFxuICAgICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgb3duZXJQdWJsaWNrZXksXG4gICAgICAgICAgICBvcHRpb25zLmZyZWV6ZUF1dGhvcml0eS50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGJsb2NraGFzaE9iaiA9IGF3YWl0IE5vZGUuZ2V0Q29ubmVjdGlvbigpLmdldExhdGVzdEJsb2NraGFzaCgpO1xuICAgICAgY29uc3QgdHggPSBuZXcgVHJhbnNhY3Rpb24oe1xuICAgICAgICBsYXN0VmFsaWRCbG9ja0hlaWdodDogYmxvY2toY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mxpY0tleSxcbiAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgKTtcblxuICAgICAgLy8gZnJlZXplQXV0aG9yaXR5XG4gICAgICBpZiAoZnJlZXplQXV0aG9yaXR5KSB7XG4gICAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICAgIE1pbnQuY3JlYXRlRGVsZWFnYXRlKFxuICAgICAgICAgICAgY29sbGVjdGlvbk1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICAgICAgZnJlZXplQXV0aG9yaXR5LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgY29sbGVjdGlvbnMgPSB7XG4gICAgICAgIGNvbGxlY3Rpb25NZXRhZGF0YTogY29sbGVjdGlvbk1ldGFkYXRhQWNjb3VudCxcbiAgICAgICAgY29sbGVjdGlvbkF1dGhvcml0eTogb3duZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICBjb2xsZWN0aW9uTWludDogY29sbGVjdGlvbk1pbnQudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgfTtcblxuICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgIGNyZWF0ZVNldENvbGxlY3Rpb25TaXplSW5zdHJ1Y3Rpb24oY29sbGVjdGlvbnMsIHtcbiAgICAgICAgICBzZXRDb2xsZWN0aW9uU2l6ZUFyZ3M6IHtcbiAgICAgICAgICAgIHNpemU6IGNvbGxlY3Rpb25TaXplIHx8IERFRkFVTFRfQ09MTEVDVElPTl9TSVpFLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0pLFxuICAgICAgKTtcblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuTWludChcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLFxuICAgICAgICBbb3duZXIudG9LZXlwYWlyKCksIGNvbG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iIsICJpbXBvcnRfbXBsX3Rva2VuX21ldGFkYXRhIiwgIlJlZ3VsYXJOZnQiLCAiQWNjb3VudCIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiUmVndWxhck5mdCIsICJTcGxUb2tlbiIsICJSZWd1bGFyTmZ0IiwgIkNvbXByZXNzZWROZnQiLCAiUmVndWxhck5mdCIsICJDb21wcmVzc2VkTmZ0Il0KfQo= \ No newline at end of file diff --git a/packages/suite-compressed-nft/dist/index.mjs b/packages/suite-compressed-nft/dist/index.mjs index c1f556c7c..adae6a9f5 100644 --- a/packages/suite-compressed-nft/dist/index.mjs +++ b/packages/suite-compressed-nft/dist/index.mjs @@ -3420,4 +3420,4 @@ var CompressedNft9 = { export { CompressedNft9 as CompressedNft }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9iYXRjaC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jb21tb24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvbWludC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9wYXJ0aWFsLXNpZ24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY2FsY3VsYXRlLXR4c2l6ZS50cyIsICIuLi8uLi9nbG9iYWwvc3JjL2luZGV4LnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2tleXBhaXIudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvcGRhLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3N1aXRlLXV0aWxzL3NyYy9z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ob3N0O1xuICAgIH1cbiAgfTtcblxuICBleHBvcnQgY29uc3Qgc3dpdGNoQnVuZGxyID0gKGVudjogc3RyaW5nKTogc3RyaW5nID0+IHtcbiAgICBzd2l0Y2ggKGVudikge1xuICAgICAgY2FzZSBDb25zdGFudHMuQ2x1c3Rlci5wcmQ6IHtcbiAgICAgICAgY29uc3QgdXJscyA9IENvbnN0YW50cy5CdW5kbHJVcmwucHJkLnNwbGl0KCcsJyk7XG4gICAgICAgIGNvbnN0IGluZGV4ID0gRGF0ZS5ub3coKSAlIHVybHMubGVuZ3RoO1xuICAgICAgICByZXR1cm4gdXJsc1tpbmRleF07XG4gICAgICB9XG4gICAgICBkZWZhdWx0OiB7XG4gICAgICAgIHJldHVybiBDb25zdGFudHMuQnVuZGxyVXJsLmRldjtcbiAgICAgIH1cbiAgICB9XG4gIH07XG5cbiAgZXhwb3J0IGNvbnN0IHN3aXRjaERhc0FwaSA9IChlbnY6IHN0cmluZyk6IHN0cmluZyA9PiB7XG4gICAgc3dpdGNoIChlbnYpIHtcbiAgICAgIGNhc2UgQ29uc3RhbnRzLkNsdXN0ZXIucHJkOiB7XG4gICAgICAgIGlmIChkYXNBcGlVcmwubGVuZ3RoIDwgMSkge1xuICAgICAgICAgIHRocm93IEVycm9yKENvbnN0YW50cy5XYXJubmluZ01lc3NhZ2UuREFTX0FQSV9VUkwpO1xuICAgICAgICB9XG4gICAgICAgIGNvbnN0IHVybHMgPSBDb25zdGFudHMuQnVuZGxyVXJsLnByZC5zcGxpdCgnLCcpO1xuICAgICAgICBjb25zdCBpbmRleCA9IERhdGUubm93KCkgJSB1cmxzLmxlbmd0aDtcbiAgICAgICAgcmV0dXJuIHVybHNbaW5kZXhdO1xuICAgICAgfVxuICAgICAgZGVmYXVsdDoge1xuICAgICAgICBjb25zdCB1cmxzID0gQ29uc3RhbnRzLkRhc0FwaVVybC5kZXYuc3BsaXQoJywnKTtcbiAgICAgICAgY29uc3QgaW5kZXggPSBEYXRlLm5vdygpICUg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GF0YSAmJiBtZXRhZGF0YS5pbWFnZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc0ltYWdlVXJsKG1ldGFkYXRhLmltYWdlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3JveWFsdHknOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5yb3lhbHR5KSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzUm95YWx0eShtZXRhZGF0YS5yb3lhbHR5KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlcl9mZWVfYmFzaXNfcG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJGZWVCYXNpc1BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0YWRhdGEubmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzeW1ib2wnO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ZXRzQnlPd25lcihcbiAgICAgIG93bmVyLFxuICAgICAgbGltaXQsXG4gICAgICBwYWdlLFxuICAgICAgc29ydEJ5LFxuICAgICAgYmVmb3JlLFxuICAgICAgYWZ0ZXIsXG4gICAgKTtcbiAgICBpZiAoYXNzZXRzLmlzRXJyKSB7XG4gICAgICB0aHJvdyBhc3NldHMuZXJyb3I7XG4gICAgfVxuXG4gICAgY29uc3QgaXRlbXMgPSBhc3NldHMudmFsdWUuaXRlbXM7XG5cbiAgICBjb25zdCBtZXRhZGF0YXMgPSBhd2FpdCBQcm9taXNlLmFsbChcbiAgICAgIGl0ZW1zXG4gICAgICAgIC5maWx0ZXIoKGl0ZW0pID0+IGl0ZW0uY29tcHJlc3Npb24uY29tcHJlc3NlZCA9PT0gaXNDb21wcmVzc2VkKVxuICAgICAgICAubWFwKGFzeW5jIChpdGVtKSA9PiB7XG4gICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgIGNvbnN0IG9mZmNoYWluOiBPZmZjaGFpbiA9IGF3YWl0IGZldGNoT2ZmY2hhaW4oXG4gICAgICAgICAgICAgIGl0ZW0uY29udGVudC5qc29uX3VyaSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgICBjb25zdCBtZXJnZWQgPSB7XG4gICAgICAgICAgICAgIG9uY2hhaW46IGl0ZW0sXG4gICAgICAgICAgICAgIG9mZmNoYWluOiBvZmZjaGFpbixcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICByZXR1cm4gQ29udmVydGVyLk5mdC5pbnRvVXNlcihtZXJnZWQpO1xuICAgICAgICAgIH0gY2F0Y2ggKGVycikge1xuICAgICAgICAgICAgZGVidWdMb2coJyMgRmFpbGVkIGZldGNoIG9mZmNoYWluIHVybDogJywgaXRlbS5jb250ZW50Lmpzb25fdXJpKTtcbiAgICAgICAgICAgIHJldHVybiBDb252ZXJ0ZXIuTmZ0LmludG9Vc2VyKHtcbiAgICAgICAgICAgICAgb25jaGFpbjogaXRlbSxcbiAgICAgICA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oKFxuICAgICAgICBTeXN0ZW1Qcm9ncmFtLmNyZWF0ZUFjY291bnQoe1xuICAgICAgICAgIGZyb21QdWJrZXk6IHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgICBuZXdBY2NvdW50UHVia2V5OiB0cmVlT3duZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICAgIGxhbXBvcnRzOlxuICAgICAgICAgICAgYXdhaXQgTm9kZS5nZXRDb25uZWN0aW9uKCkuZ2V0TWluaW11bUJhbGFuY2VGb3JSZW50RXhlbXB0aW9uKHNwYWNlKSxcbiAgICAgICAgICBzcGFjZTogc3BhY2UsXG4gICAgICAgICAgcHJvZ3JhbUlkOiBTUExfQUNDT1VOVF9DT01QUkVTU0lPTl9QUk9HUkFNX0lELFxuICAgICAgICB9KSxcbiAgICAgICk7XG5cbiAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICBjcmVhdGVDcmVhdGVUcmVlSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAge1xuICAgICAgICAgICAgbWVya2xlVHJlZTogdHJlZU93bmVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgICAgIHRyZWVBdXRob3JpdHksXG4gICAgICAgICAgICB0cmVlQ3JlYXRvcjogb3duZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICAgICAgcGF5ZXI6IHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgICAgIGxvZ1dyYXBwZXI6IFNQTF9OT09QX1BST0dSQU1fSUQsXG4gICAgICAgICAgICBjb21wcmVzc2lvblByb2dyYW06IFNQTF9BQ0NPVU5UX0NPTVBSRVNTSU9OX1BST0dSQU1fSUQsXG4gICAgICAgICAgfSxcbiAgICAgICAgICB7XG4gICAgICAgICAgICBtYXhCdWZmZXJTaXplLFxuICAgICAgICAgICAgbWF4RGVwdGgsXG4gICAgICAgICAgICBwdWJsaWM6IGZhbH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EsXG4gICAgICAgICAgICBlZGl0aW9uQWNjb3VudDogY29sbGVjdGlvbk1hc3RlckVkaXRpb25BY2NvdW50LFxuICAgICAgICAgICAgYnViYmxlZ3VtU2lnbmVyLFxuICAgICAgICAgICAgbG9nV3JhcHBlcjogU1BMX05PT1BfUFJPR1JBTV9JRCxcbiAgICAgICAgICAgIGNvbGxlY3Rpb25BdXRob3JpdHlSZWNvcmRQZGE6IEJVQkJMRUdVTV9QUk9HUkFNX0lELFxuICAgICAgICAgICAgY29tcHJlc3Npb25Qcm9ncmFtOiBTUExfQUNDT1VOVF9DT01QUkVTU0lPTl9QUk9HUkFNX0lELFxuICAgICAgICAgICAgdG9rZW5NZXRhZGF0YVByb2dyYW06IFRPS0VOX01FVEFEQVRBX1BST0dSQU1fSUQsXG4gICAgICAgICAgfSxcbiAgICAgICAgICB7XG4gICAgICAgICAgICBtZXRhZGF0YUFyZ3MsXG4gICAgICAgICAgfSxcbiAgICAgICAgKSxcbiAgICAgICk7XG5cbiAgICAgIGlmIChpbnB1dC5jcmVhdG9ycykge1xuICAgICAgICBjb25zdCBhc3NldElkID0gYXdhaXQgbmV3IFNwYWNlLlNwYWNlKHRyZWVPd25lcikuZ2V0QXNzZXRJZCgpO1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgICBhd2FpdCBjcmVhdGVWZXJpZnlDcmVhdG9yKFxuICAgICAgICAgICAgbWV0YWRhdGFBcmdzLmNyZWF0b3JzLFxuICAgICAgICAgICAgYXNzZXRJZC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgdHJlZU93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBtZXRhZGF0YUFyZ3MsXG4gICAgICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuTWludChcbiAg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l0IGNvbm5lY3Rpb24uZ2V0UGFyc2VkVG9rZW5BY2NvdW50c0J5T3duZXIoXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIHtcbiAgICAgICAgICBwcm9ncmFtSWQ6IFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgIH0sXG4gICAgICApO1xuXG4gICAgICBjb25zdCBkYXRhcyA9IGluZm8udmFsdWUubWFwKGFzeW5jIChkKSA9PiB7XG4gICAgICAgIGNvbnN0IG1pbnQgPSBkLmFjY291bnQuZGF0YS5wYXJzZWQuaW5mby5taW50IGFzIFB1YmtleTtcbiAgICAgICAgY29uc3QgdG9rZW5BbW91bnQgPSBkLmFjY291bnQuZGF0YS5wYXJzZWQuaW5mby50b2tlbkFtb3VudFxuICAgICAgICAgIC5hbW91bnQgYXMgc3RyaW5nO1xuICAgICAgICBpZiAodG9rZW5BbW91bnQgPT09ICcxJykge1xuICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gTWV0YWRhdGEuZnJvbUFjY291bnRBZGRyZXNzKFxuICAgICAgICAgIGNvbm5lY3Rpb24sXG4gICAgICAgICAgQWNjb3VudC5QZGEuZ2V0TWV0YWRhdGEobWludCksXG4gICAgICAgIClcbiAgICAgICAgICAudGhlbihhc3luYyAobWV0YWRhdGEpID0+IHtcbiAgICAgICAgICAgIC8qIGVzbGludC1kaXNhYmxlIEB0eXBlc2NyaXB0LWVzbGludC9uby1leHBsaWNpdC1hbnkgKi9cbiAgICAgICAgICAgIHJldHVybiBmZXRjaFJldHJ5KG1ldGFkYXRhLmRhdGEudXJpKS50aGVuKChqc29uOiBhbnkpID0+IHtcbiAgICAgICAgICAgICAgcmV0dXJuIGNvbnZlcnRlcihtZXRhZGF0YSwganNvbiwgdG9rZW5BbW91bnQpO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfSlcbiAgICAgICAgICAuY2F0Y2goKGVycikgPT4gZGVidWdMb2coJyMgW0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3RyaW5nKCksXG4gICAgICAgIGZlZVBheWVyLFxuICAgICAgKTtcblxuICAgICAgY29uc3QgZGVzdFRva2VuID0gYXdhaXQgQWNjb3VudC5Bc3NvY2lhdGVkLm1ha2VPckNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICBtaW50LFxuICAgICAgICBkZXN0LFxuICAgICAgICBmZWVQYXllcixcbiAgICAgICk7XG5cbiAgICAgIGxldCBpbnN0MjtcbiAgICAgIGNvbnN0IGJsb2NraGFzaE9iaiA9IGF3YWl0IE5vZGUuZ2V0Q29ubmVjdGlvbigpLmdldExhdGVzdEJsb2NraGFzaCgpO1xuXG4gICAgICBjb25zdCB0eCA9IG5ldyBUcmFuc2FjdGlvbih7XG4gICAgICAgIGxhc3RWYWxpZEJsb2NrSGVpZ2h0OiBibG9ja2hhc2hPYmoubGFzdFZhbGlkQmxvY2tIZWlnaHQsXG4gICAgICAgIGJsb2NraGFzaDogYmxvY2toYXNoT2JqLmJsb2NraGFzaCxcbiAgICAgICAgZmVlUGF5ZXI6IGZlZVBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICB9KTtcblxuICAgICAgaW5zdDIgPSBjcmVhdGVUcmFuc2ZlckNoZWNrZWRJbnN0cnVjdGlvbihcbiAgICAgICAgc291cmNlVG9rZW4udG9rZW5BY2NvdW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgZGVzdFRva2VuLnRva2VuQWNjb3VudC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgQ2FsY3VsYXRvci5jYWxjdWxhdGVBbW91bnQoYW1vdW50LCBtaW50RGVjaW1hbCksXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICBbb3duZXIudG9LZXlwYWlyKCldLFxuICAgICAgKTtcblxuICAgICAgLy8gcmV0dXJuIGFzc29jaWF0ZWQgdG9rZW4gYWNjb3VudFxuICAgICAgaWYg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uICAgIGNvbnN0IG1ldGFkYXRhUGRhID0gQWNjb3VudC5QZGEuZ2V0TWV0YWRhdGEobWludC50b1N0cmluZygpKTtcbiAgICBjb25zdCB0b2tlbkFzc29jaWF0ZWQgPSBnZXRBc3NvY2lhdGVkVG9rZW5BZGRyZXNzU3luYyhtaW50LCBvd25lcik7XG4gICAgY29uc3QgaW5zdHJ1Y3Rpb25zID0gW107XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIFN5c3RlbVByb2dyYW0uY3JlYXRlQWNjb3VudCh7XG4gICAgICAgIGZyb21QdWJrZXk6IGZlZVBheWVyLFxuICAgICAgICBuZXdBY2NvdW50UHVia2V5OiBtaW50LFxuICAgICAgICBzcGFjZTogTUlOVF9TSVpFLFxuICAgICAgICBsYW1wb3J0czogbGFtcG9ydHMsXG4gICAgICAgIHByb2dyYW1JZDogVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgIH0pLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUluaXRpYWxpemVNaW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgIG1pbnQsXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICBvd25lcixcbiAgICAgICAgb3duZXIsXG4gICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgZmVlUGF5ZXIsXG4gICAgICAgIHRva2VuQXNzb2NpYXRlZCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIG1pbnQsXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZU1pbnRUb0NoZWNrZWRJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgdG9rZW5Bc3NvY2lhdGVkLFxuICAgICAgICBvd25lcixcbiAgICAgICAgQ2FsY3VsYXRlLmNhbGN1bGF0ZUFtb3VudCh0b3RhbEFtb3VudCwgbWludERlY2ltYWwpLFxuICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlQ3JlYXRlTWV0YWRhdGFBY2NvdW50VjNJbnN0cnVjdGlvbihcbiAgICAgICAge1xuICAgICAgICAgIG1ldGFkYXRhOiBtZXRhZGF0YVBkYSxcbiAgICAgICAgICBtaW50LFxuICAgICAgICAgIG1pbnRBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICAgIHBheWVyOiBmZWVQYXllcixcbiAgICAgICAgICB1cGRhdGVBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICB9LFxuICAgICAgICB7XG4gICAgICAgICAgY3JlYXRlTWV0YWRhdGFBY2NvdW50QXJnc1YzOiB7XG4gICAgICAgICAgICBkYXRhOiB0b2tlbk1ldGFkYXRhLFxuICAgICAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgICAgICAgY29sbGVjdGlvbkRldGFpbHM6IG51bGwsXG4gICAgICAgICAgfSxcbiAgICAgICAgfSxcbiAgICAgICksXG4gICAgKTtcbiAgICByZXR1cm4gaW5zdHJ1Y3Rpb25zO1xuICB9O1xuXG4gIC8qKlxuICAgKiBTUEwtVE9LRU4gbWludFxuICAgKlxuICAgKiBAcGFyYW0ge1NlY3JldH0gb3duZXIgICAgICAvLyB0b2tlbiBvd25lciBTZWNyZXRcbiAgICogQHBhcmFtIHtudW1iZXJ9IHRvdGFsQW1vdW50IC8vIHRvdGFsIG51bWJlclxuICAgKiBAcGFyYW0ge251bWJlcn0gbWludERlY2ltYWwgLy8gdG9rZW4gZGVjaW1hbFxuICAgKiBAcGFyYW0ge0lucHV0VG9rZW5NZXRhZGF0YX0gaW5wdXQgICAgICAgLy8gdG9rZW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gIGNyZWF0ZUNyZWF0ZU1hc3RlckVkaXRpb25WM0luc3RydWN0aW9uKFxuICAgICAgICB7XG4gICAgICAgICAgZWRpdGlvbjogbWFzdGVyRWRpdGlvblB1YmtleSxcbiAgICAgICAgICBtaW50LFxuICAgICAgICAgIHVwZGF0ZUF1dGhvcml0eTogb3duZXIsXG4gICAgICAgICAgbWludEF1dGhvcml0eTogb3duZXIsXG4gICAgICAgICAgcGF5ZXI6IGZlZVBheWVyLFxuICAgICAgICAgIG1ldGFkYXRhOiB0b2tlbk1ldGFkYXRhUHVia2V5LFxuICAgICAgICB9LFxuICAgICAgICB7XG4gICAgICAgICAgY3JlYXRlTWFzdGVyRWRpdGlvbkFyZ3M6IHtcbiAgICAgICAgICAgIG1heFN1cHBseTogMCxcbiAgICAgICAgICB9LFxuICAgICAgICB9LFxuICAgICAgKSxcbiAgICApO1xuICAgIHJldHVybiBpbnN0cnVjdGlvbnM7XG4gIH07XG5cbiAgLyoqXG4gICAqIFVwbG9hZCBjb250ZW50IGFuZCBORlQgbWludFxuICAgKlxuICAgKiBAcGFyYW0ge1NlY3JldH0gb3duZXIgICAgICAgICAvLyBvd25lcidzIFNlY3JldFxuICAgKiBAcGFyYW0ge0lucHV0TmZ0TWV0YWRhdGF9IGlucHV0XG4gICAqIHtcbiAgICogICBuYW1lOiBzdHJpbmcgICAgICAgICAgICAgICAvLyBuZnQgY29udGVudCBuYW1lXG4gICAqICAgc3ltYm9sOiBzdHJpbmcgICAgICAgICAgICAgLy8gbmZ0IHRpY2tlciBzeW1ib2xcbiAgICogICBmaWxlUGF0aDogc3RyaW5nIHwgRmlsZSAgICAvLyBuZnQgdGlja2VyIHN5bWJvbFxuICAgKiAgIHJveWFsdHk6IG51bWJlciAgICAgICAgICAgIC8vIHJveWFsdHkgcGVyY2VudGFnZVxuICAgKiAgIHN0b3JhZ2VUeXBlOiAnYXJ3ZWF2ZSd8J25mdFN0b3JhZ2UnIC8vIERlY2VudHJhbGl6ZWQgc3RvcmF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mVhdGVNaW50KFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICBkYXRhdjIsXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgKTtcblxuICAgICAgLy8gZnJlZXplQXV0aG9yaXR5XG4gICAgICBpZiAoZnJlZXplQXV0aG9yaXR5KSB7XG4gICAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICAgIGNyZWF0ZURlbGVhZ2F0ZShcbiAgICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICAgICAgZnJlZXplQXV0aG9yaXR5LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgLy8gY29sbGVjdGlvbiAtLS1cbiAgICAgIGlmIChpbnB1dC5jb2xsZWN0aW9uKSB7XG4gICAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICAgIGNyZWF0ZVZlcmlmeVNpemVkQ29sbGVjdGlvbihcbiAgICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIGlucHV0LmNvbGxlY3Rpb24udG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBrZXlwYWlycyA9IFtvd25lci50b0tleXBhaXIoKSwgbWludC50b0tleXBhaXIoKV07XG5cbiAgICAgIC8vIGNyZWF0b3IgLS0tXG4gICAgICBpZiAoaW5wdXQuY3JlYXRvcnMpIHtcbiAgICAgICAgaW5wdXQuY3JlYXRvcnMuZm9yRWFjaCgoY3JlYXRvcikgPT4ge1xuICAgICAgICAg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RhYmxlID09PSB1bmRlZmluZWQgPyB0cnVlIDogaW5wdXQuaXNNdXRhYmxlO1xuXG4gICAgICBkZWJ1Z0xvZygnIyBpbnB1dDogJywgaW5wdXQpO1xuICAgICAgZGVidWdMb2coJyMgZGF0YXYyOiAnLCBkYXRhdjIpO1xuXG4gICAgICBjb25zdCBjb2xsZWN0aW9uTWludCA9IEFjY291bnQuS2V5cGFpci5jcmVhdGUoKTtcbiAgICAgIGNvbnN0IGNvbGxlY3Rpb25NZXRhZGF0YUFjY291bnQgPSBBY2NvdW50LlBkYS5nZXRNZXRhZGF0YShcbiAgICAgICAgY29sbGVjdGlvbk1pbnQucHVia2V5LFxuICAgICAgKTtcblxuICAgICAgY29uc3QgaW5zdHJ1Y3Rpb25zID0gYXdhaXQgTWludC5jcmVhdGVNaW50KFxuICAgICAgICBjb2xsZWN0aW9uTWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgZGF0YXYyLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICk7XG5cbiAgICAgIC8vIGZyZWV6ZUF1dGhvcml0eVxuICAgICAgaWYgKGZyZWV6ZUF1dGhvcml0eSkge1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgICBNaW50LmNyZWF0ZURlbGVhZ2F0ZShcbiAgICAgICAgICAgIGNvbGxlY3Rpb25NaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgICAgIGZyZWV6ZUF1dGhvcml0eS50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGNvbGxlY3Rpb25zID0ge1xuICAgICAgICBjb2xsZWN0aW9uTWV0YWRhdGE6IGNvbGxlY3Rpb25NZXRhZGF0YUFjY291bnQsXG4gICA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XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBudWxsO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4ge1xuICAgICAgICBrZXk6IGlucHV0LnRvUHVibGljS2V5KCksXG4gICAgICAgIHZlcmlmaWVkOiBmYWxzZSxcbiAgICAgIH07XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlciA9IChcbiAgICAgIG91dHB1dDogT3B0aW9uPEludGVybmFsQ29sbGVjdGlvbj4sXG4gICAgKTogQ29sbGVjdGlvblR5cGUgfCB1bmRlZmluZWQgPT4ge1xuICAgICAgaWYgKCFvdXRwdXQpIHtcbiAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIHtcbiAgICAgICAgYWRkcmVzczogb3V0cHV0LmtleS50b1N0cmluZygpLFxuICAgICAgICB2ZXJpZmllZDogb3V0cHV0LnZlcmlmaWVkLFxuICAgICAgfTtcbiAgICB9O1xuICB9XG5cbiAgZXhwb3J0IG5hbWVzcGFjZSBDb2xsZWN0aW9uTWludCB7XG4gICAgZXhwb3J0IGNvbnN0IGludG9Vc2VyID0gKG91dHB1dDogR3JvdXBpbmdbXSk6IFB1YmtleSA9PiB7XG4gICAgICBjb25zdCByZXMgPSBvdXRwdXQuZmluZCgodmFsdWUpID0+IHtcbiAgICAgICAgaWYgKHZhbHVlLmdyb3VwX2tleSA9PT0gJ2NvbGxlY3Rpb24nKSB7XG4gICAgICAgICAgcmV0dXJuIHZhbHVlLmdyb3VwX3ZhbHVlO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIHJldHVybiByZXMgPyByZXMuZ3JvdXBfdmFsdWUgOiAnJztcbiAgICB9O1xuICB9XG59XG4iLCAiLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLXVudXNlZC12YXJzICovXG5pbXBvcnQgeyBDcmVhdG9ycywgSW5wdXRDcmVhdG9ycyw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cl9mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ25hbWUnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLm5hbWUpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNOYW1lKG1ldGFkYXRhLm5hbWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc3ltYm9sJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5zeW1ib2wpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTeW1ib2wobWV0YWRhdGEuc3ltYm9sKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgICAgIGlmIChyZXMgJiYgcmVzLmlzRXJyKSB7XG4gICAgICAgICAgcmVzdWx0cy5wdXNoKC4uLnJlcy5lcnJvci5kZXRhaWxzKTtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgICBpZiAocmVzdWx0cy5sZW5ndGggPiAwKSB7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPVxuICAgICAgICAgICdDYXVnaHQgaW4gdGhlIHZhbGlkYXRpb24gZXJyb3JzLiBzZWUgaW5mb3JtYXRpb24gZS5nOiBlcnI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XRlbSkgPT4ge1xuICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICBjb25zdCBvZmZjaGFpbjogT2ZmY2hhaW4gPSBhd2FpdCBmZXRjaE9mZmNoYWluKFxuICAgICAgICAgICAgICBpdGVtLmNvbnRlbnQuanNvbl91cmksXG4gICAgICAgICAgICApO1xuICAgICAgICAgICAgY29uc3QgbWVyZ2VkID0ge1xuICAgICAgICAgICAgICBvbmNoYWluOiBpdGVtLFxuICAgICAgICAgICAgICBvZmZjaGFpbjogb2ZmY2hhaW4sXG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgcmV0dXJuIENvbnZlcnRlci5OZnQuaW50b1VzZXIobWVyZ2VkKTtcbiAgICAgICAgICB9IGNhdGNoIChlcnIpIHtcbiAgICAgICAgICAgIGRlYnVnTG9nKCcjIEZhaWxlZCBmZXRjaCBvZmZjaGFpbiB1cmw6ICcsIGl0ZW0uY29udGVudC5qc29uX3VyaSk7XG4gICAgICAgICAgICByZXR1cm4gQ29udmVydGVyLk5mdC5pbnRvVXNlcih7XG4gICAgICAgICAgICAgIG9uY2hhaW46IGl0ZW0sXG4gICAgICAgICAgICAgIG9mZmNoYWluOiB7fSxcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgIH1cbiAgICAgICAgfSksXG4gICAgKTtcbiAgICByZXR1cm4ge1xuICAgICAgcGFnZTogYXNzZXRzLnZhbHVlLnBhZ2UsXG4gICAgICB0b3RhbDogYXNzZXRzLnZhbHVlLnRvdGFsLFxuICAgICAgbGltaXQ6IGFzc2V0cy52YWx1ZS5saW1pdCxcbiAgICAgIG1ldGFkYXRhcyxcbiAgICB9O1xuICB9O1xuXG4gIC8qKlxuICAgKiBGaW5kIG5mdCBieSBjb2xsZWN0aW9uIG1pbnRcbiAgICpcbiAgICogQHBhcmFtIHtQdWJrZXl9IGNvbGxlY3Rpb25NaW50XG4gICAqIEBwYXJhbSB7Ym9vbGVhbn0gaXNDb21wcmVzc2VkLFxuICAgKiBAcGFyYW0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YW1JZDogU1BMX0FDQ09VTlRfQ09NUFJFU1NJT05fUFJPR1JBTV9JRCxcbiAgICAgICAgfSksXG4gICAgICApO1xuXG4gICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgY3JlYXRlQ3JlYXRlVHJlZUluc3RydWN0aW9uKFxuICAgICAgICAgIHtcbiAgICAgICAgICAgIG1lcmtsZVRyZWU6IHRyZWVPd25lci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgICAgICB0cmVlQXV0aG9yaXR5LFxuICAgICAgICAgICAgdHJlZUNyZWF0b3I6IG93bmVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgICAgIHBheWVyOiBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgICAgICBsb2dXcmFwcGVyOiBTUExfTk9PUF9QUk9HUkFNX0lELFxuICAgICAgICAgICAgY29tcHJlc3Npb25Qcm9ncmFtOiBTUExfQUNDT1VOVF9DT01QUkVTU0lPTl9QUk9HUkFNX0lELFxuICAgICAgICAgIH0sXG4gICAgICAgICAge1xuICAgICAgICAgICAgbWF4QnVmZmVyU2l6ZSxcbiAgICAgICAgICAgIG1heERlcHRoLFxuICAgICAgICAgICAgcHVibGljOiBmYWxzZSxcbiAgICAgICAgICB9LFxuICAgICAgICAgIE1QTF9CVUJCTEVHVU1fUFJPR1JBTV9JRC50b1B1YmxpY0tleSgpLFxuICAgICAgICApLFxuICAgICAgKTtcblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuTWludChcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLFxuICAgICAgICBbdHJlZU93bmVyLnRvS2V5cGFpcigpLCBvd25lci50b0tleXBhaXIoKV0sXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICB0cmVlT3duZXIucHVia2V5LFxuICAgICAgKTtcbiAgICB9KTtcbiAgfTtcblxuICAvKipcbiAgICogY3JlYXR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b247XG4gICAgY29uc3Qgb3duZXJzaGlwID0gcnBjQXNzZXQudmFsdWUub3duZXJzaGlwO1xuICAgIGNvbnN0IGFzc2V0UHJvb2YgPSBycGNBc3NldFByb29mLnZhbHVlO1xuXG4gICAgY29uc3QgdHJlZUFjY291bnQgPSBhd2FpdCBDb25jdXJyZW50TWVya2xlVHJlZUFjY291bnQuZnJvbUFjY291bnRBZGRyZXNzKFxuICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICB0cmVlT3duZXIsXG4gICAgKTtcbiAgICBjb25zdCBjYW5vcHlEZXB0aCA9IHRyZWVBY2NvdW50LmdldENhbm9weURlcHRoKCk7XG4gICAgY29uc3Qgc2xpY2VkUHJvb2Y6IEFjY291bnRNZXRhW10gPSBhc3NldFByb29mLnByb29mXG4gICAgICAubWFwKChub2RlOiBzdHJpbmcpID0+ICh7XG4gICAgICAgIHB1YmtleTogbm9kZS50b1B1YmxpY0tleSgpLFxuICAgICAgICBpc1NpZ25lcjogZmFsc2UsXG4gICAgICAgIGlzV3JpdGFibGU6IGZhbHNlLFxuICAgICAgfSkpXG4gICAgICAuc2xpY2UoMCwgYXNzZXRQcm9vZi5wcm9vZi5sZW5ndGggLSAoY2Fub3B5RGVwdGggPyBjYW5vcHlEZXB0aCA6IDApKTtcblxuICAgIHJldHVybiBjcmVhdGVWZXJpZnlDcmVhdG9ySW5zdHJ1Y3Rpb24oXG4gICAgICB7XG4gICAgICAgIHRyZWVBdXRob3JpdHk6IHRyZWVPd25lcixcbiAgICAgICAgbGVhZk93bmVyOiBvd25lcnNoaXAub3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgbGVhZkRlbGVnYXRlOiAob3duZXJzaGlwLmRlbGVnYXRlIHx8IG93bmVyc2hpcC5vd25lcikudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgbWVya2xlVHJlZTogYXNzZXRQcm9vZi50cmVlX2lkLnRvUHVibGljS2V5KCksXG4gICAgICAgIHBheWVyOiBm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bnRcbiAgICAgICAgICAuYW1vdW50IGFzIHN0cmluZztcbiAgICAgICAgaWYgKHRva2VuQW1vdW50ID09PSAnMScpIHtcbiAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIE1ldGFkYXRhLmZyb21BY2NvdW50QWRkcmVzcyhcbiAgICAgICAgICBjb25uZWN0aW9uLFxuICAgICAgICAgIEFjY291bnQuUGRhLmdldE1ldGFkYXRhKG1pbnQpLFxuICAgICAgICApXG4gICAgICAgICAgLnRoZW4oYXN5bmMgKG1ldGFkYXRhKSA9PiB7XG4gICAgICAgICAgICAvKiBlc2xpbnQtZGlzYWJsZSBAdHlwZXNjcmlwdC1lc2xpbnQvbm8tZXhwbGljaXQtYW55ICovXG4gICAgICAgICAgICByZXR1cm4gZmV0Y2hSZXRyeShtZXRhZGF0YS5kYXRhLnVyaSkudGhlbigoanNvbjogYW55KSA9PiB7XG4gICAgICAgICAgICAgIHJldHVybiBjb252ZXJ0ZXIobWV0YWRhdGEsIGpzb24sIHRva2VuQW1vdW50KTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgIH0pXG4gICAgICAgICAgLmNhdGNoKChlcnIpID0+IGRlYnVnTG9nKCcjIFtGZXRjaCBlcnJvcl0nLCBlcnIpKTtcbiAgICAgIH0pO1xuXG4gICAgICBjb25zdCBmaWx0ZXJzID0gKGF3YWl0IFByb21pc2UuYWxsKGRhdGFzKSkuZmlsdGVyKFxuICAgICAgICAoZGF0YSkgPT4gZGF0YSAhPT0gdW5kZWZpbmVkLFxuICAgICAgKTtcbiAgICAgIHJldHVybiBmaWx0ZXJzIGFzIFRva2VuTWV0YWRhdGFbXTtcbiAgICB9KTtcbiAgfTtcblxuICAvKipcbiAgICogRmV0Y2ggbWludGVkIG1ldGFkYXRhIGJ5IG1pbnQgYWRkcmVzc1xuICAgKlxuICAgKiBAcGFyYW0ge1B1YmtleX0gbWludFxuICAgKiBAcmV0dXJuIFByb21pc2U8UmVzdWx0P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ICAgICAgICBwcm9ncmFtSWQ6IFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICB9KSxcbiAgICApO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVJbml0aWFsaXplTWludEluc3RydWN0aW9uKFxuICAgICAgICBtaW50LFxuICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIG93bmVyLFxuICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKSxcbiAgICApO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVBc3NvY2lhdGVkVG9rZW5BY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgIGZlZVBheWVyLFxuICAgICAgICB0b2tlbkFzc29jaWF0ZWQsXG4gICAgICAgIG93bmVyLFxuICAgICAgICBtaW50LFxuICAgICAgKSxcbiAgICApO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVNaW50VG9DaGVja2VkSW5zdHJ1Y3Rpb24oXG4gICAgICAgIG1pbnQsXG4gICAgICAgIHRva2VuQXNzb2NpYXRlZCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIENhbGN1bGF0ZS5jYWxjdWxhdGVBbW91bnQodG90YWxBbW91bnQsIG1pbnREZWNpbWFsKSxcbiAgICAgICAgbWludERlY2ltYWwsXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUNyZWF0ZU1ldGFkYXRhQWNjb3VudFYzSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHtcbiAgICAgICAgICBtZXRhZGF0YTogbWV0YWRhdGFQZGEsXG4gICAgICAgICAgbWludCxcbiAgICAgICAgICBtaW50QXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBwYXllcjogZmVlUGF5ZXIsXG4gICAgICAgICAgdXBkYXRlQXV0aG9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GxvYWQoXG4gICAgICAgICAgc3RvcmFnZU1ldGFkYXRhLFxuICAgICAgICAgIGlucHV0LmZpbGVQYXRoLFxuICAgICAgICAgIHN0b3JhZ2VUeXBlLFxuICAgICAgICAgIHBheWVyLFxuICAgICAgICApO1xuXG4gICAgICAgIGlmICh1cGxvYWRlZC5pc0Vycikge1xuICAgICAgICAgIHRocm93IHVwbG9hZGVkO1xuICAgICAgICB9XG4gICAgICAgIHVyaSA9IHVwbG9hZGVkLnZhbHVlO1xuICAgICAgfSBlbHNlIGlmIChpbnB1dC51cmkpIHtcbiAgICAgICAgY29uc3QgaW1hZ2UgPSB7IGltYWdlOiBpbnB1dC51cmkgfTtcbiAgICAgICAgY29uc3QgdXBsb2FkZWQgPSBhd2FpdCBTdG9yYWdlLnVwbG9hZERhdGEoXG4gICAgICAgICAgeyAuLi5zdG9yYWdlTWV0YWRhdGEsIC4uLmltYWdlIH0sXG4gICAgICAgICAgc3RvcmFnZVR5cGUsXG4gICAgICAgICAgcGF5ZXIsXG4gICAgICAgICk7XG4gICAgICAgIGlmICh1cGxvYWRlZC5pc0Vycikge1xuICAgICAgICAgIHRocm93IHVwbG9hZGVkO1xuICAgICAgICB9XG4gICAgICAgIHVyaSA9IHVwbG9hZGVkLnZhbHVlO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgdGhyb3cgRXJyb3IoYE11c3Qgc2V0IGZpbGVQYXRoJyBvciAndXJpJ2ApO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBpc011dGFibGUgPSB0cnVlO1xuXG4gICAgICBjb25zdCBkYXRhdjIgPSBDb252ZXJ0ZXIuVG9rZW5NZXRhZGF0YS5pbnRvSW5mcmEoXG4gICAgICAgIGlucHV0LFxuICAgICAgICB1cmksXG4gICAgICAgIHNlbGxlckZlZUJhc2lzUG9pbnRzLFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgZGF0YXYyOiAnLCBkYXRhdjIpO1xuICAgICAgZGVidWdMb2coJyMgdXBsb2FkIGNvbnRlbnQgdXJsOiAnLCB1cmkpO1xuXG4gICAgICBjb25zdCBtaW50ID0gQWNjb3VudC5LZXlwYWlyLmNyZWF0ZSgpO1xuICAgICAgY29uc3QgaW5zdHMgPSBhd2FpdCBjcmVhdGVNaW50KFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICB0b3RhbEFtb3VudCxcbiAgICAgICAgbWludERlY2ltYWwsXG4gICAgICAgIGRhdGF2MixcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICBpc011dGFibGUsXG4gICAgICApO1xuXG4gICAgICAvLyBmcmVlemVBdXRob3JpdHlcbiAgICAgIGlmIChmcmVlemVBdXRob3JpdHkpIHtcbiAgICAgICAgaW5zdHMucHVzaChcbiAgICAgICAgICBjcmVhdGVGcmVlemVBdXRob3JpdHkoXG4gICAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgICAgIGZyZWV6ZUF1dGhvcml0eS50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBuZXcgVHJhbnNhY3Rpb25CdWlsZGVyLk1pbnQoXG4gICAgICAgIGluc3RzLFxuICAgICAgICBbb3duZXIudG9LZXlwYWlyKCksIG1pbnQudG9LZXlwYWlyKCldLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgbWludC5wdWJrZXksXG4gICAgICApO1xuICAgIH0pO1xuICB9O1xufVxuIiwgImltcG9ydCB7IFJlc3VsdCwgVHJ5IH0gZnJvbSAnfi9zdWl0ZS11dGlscyc7XG5pbXBvcnQgeyBUcmFuc2FjdGlvbkJ1aWxkZXIgfSBmcm9tICd+L3RyYW5zYWN0aW9uLWJ1aWxkZXInO1xuaW1wb3J0IHsgUHVia2V5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HJ1Y3Rpb24obWludCwgYXRhLCBvd25lciwgMSwgMCkpO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVDcmVhdGVNZXRhZGF0YUFjY291bnRWM0luc3RydWN0aW9uKFxuICAgICAgICB7XG4gICAgICAgICAgbWV0YWRhdGE6IHRva2VuTWV0YWRhdGFQdWJrZXksXG4gICAgICAgICAgbWludCxcbiAgICAgICAgICBtaW50QXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBwYXllcjogZmVlUGF5ZXIsXG4gICAgICAgICAgdXBkYXRlQXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgIGNyZWF0ZU1ldGFkYXRhQWNjb3VudEFyZ3NWMzoge1xuICAgICAgICAgICAgZGF0YTogbmZ0TWV0YWRhdGEsXG4gICAgICAgICAgICBpc011dGFibGUsXG4gICAgICAgICAgICBjb2xsZWN0aW9uRGV0YWlsczogbnVsbCxcbiAgICAgICAgICB9LFxuICAgICAgICB9LFxuICAgICAgKSxcbiAgICApO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVDcmVhdGVNYXN0ZXJFZGl0aW9uVjNJbnN0cnVjdGlvbihcbiAgICAgICAge1xuICAgICAgICAgIGVkaXRpb246IG1hc3RlckVkaXRpb25QdWJrZXksXG4gICAgICAgICAgbWludCxcbiAgICAgICAgICB1cGRhdGVBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICAgIG1pbnRBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICAgIHBheWVyOiBmZWVQYXllcixcbiAgICAgICAgICBtZXRhZGF0YTogdG9rZW5NZXRhZGF0YVB1YmtleSxcbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgIGNyZWF0ZU1hc3RlckVkaXRpb25BcmdzOiB7XG4gICAgICAgICAgICBtYXhTdXBwbHk6IDAsXG4gICAgICAgICAgfSxcbiAg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biAgICAgICAgdXJpID0gdXBsb2FkZWQudmFsdWU7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICB0aHJvdyBFcnJvcihgTXVzdCBzZXQgZmlsZVBhdGgnIG9yICd1cmknYCk7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGRhdGF2MiA9IENvbnZlcnRlci5SZWd1bGFyTmZ0TWV0YWRhdGEuaW50b0luZnJhKFxuICAgICAgICBpbnB1dCxcbiAgICAgICAgdXJpLFxuICAgICAgICBzZWxsZXJGZWVCYXNpc1BvaW50cyxcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IGlzTXV0YWJsZSA9IGlucHV0LmlzTXV0YWJsZSA9PT0gdW5kZWZpbmVkID8gdHJ1ZSA6IGlucHV0LmlzTXV0YWJsZTtcblxuICAgICAgZGVidWdMb2coJyMgaW5wdXQ6ICcsIGlucHV0KTtcbiAgICAgIGRlYnVnTG9nKCcjIGRhdGF2MjogJywgZGF0YXYyKTtcblxuICAgICAgY29uc3QgbWludCA9IEFjY291bnQuS2V5cGFpci5jcmVhdGUoKTtcblxuICAgICAgY29uc3QgaW5zdHJ1Y3Rpb25zID0gYXdhaXQgY3JlYXRlTWludChcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgZGF0YXYyLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICk7XG5cbiAgICAgIC8vIGZyZWV6ZUF1dGhvcml0eVxuICAgICAgaWYgKGZyZWV6ZUF1dGhvcml0eSkge1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgICBjcmVhdGVEZWxlYWdhdGUoXG4gICAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgICAgIGZyZWV6ZUF1dGhvcml0eS50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIC8vIGNvbGxlY3Rpb24gLS0tXG4gICAgICBpZiAoaW5wdXQuY29sbGVjdGlvbikge1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgICBjcmVhdGVWZXJpZnlTaXplZENvbGxlY3Rpb24oXG4gICAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBpbnB1dC5jb2xsZWN0aW9uLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3Qga2V5cGFpcnMgPSBbb3duZXIudG9LZXlwYWlyKCksIG1pbnQudG9LZXlwYWlyKCldO1xuXG4gICAgICAvLyBjcmVhdG9yIC0tLVxuICAgICAgaWYgKGlucHV0LmNyZWF0b3JzKSB7XG4gICAgICAgIGlucHV0LmNyZWF0b3JzLmZvckVhY2goKGNyZWF0b3IpID0+IHtcbiAgICAgICAgICBpZiAoQWNjb3VudC5LZXlwYWlyLmlzU2VjcmV0KGNyZWF0b3Iuc2VjcmV0KSkge1xuICAgICAgICAgICAgY29uc3QgY3JlYXRvclB1YmtleSA9IGNyZWF0b3IuYWRkcmVzcy50b1B1YmxpY0tleSgpO1xuICAgICAgICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZVZlcmlmeUNyZWF0b3IobWludC50b1B1YmxpY0tleSgpLCBjcmVhdG9yUHVia2V5KTtcbiAgICAgICAgICAgIGluc3RydWN0aW9ucy5wdXNoKGluc3QpO1xuICAgICAgICAgICAga2V5cGFpcnMucHVzaChjcmVhdG9yLnNlY3JldC50b0tleXBhaXIoKSk7XG4gICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxk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B9O1xuICAgICAgfVxuICAgICAgLy8tLS0gY29sbGVjdGlvbiAtLS1cblxuICAgICAgY29uc3QgaXNNdXRhYmxlID0gaW5wdXQuaXNNdXRhYmxlID09PSB1bmRlZmluZWQgPyB0cnVlIDogaW5wdXQuaXNNdXRhYmxlO1xuXG4gICAgICBkZWJ1Z0xvZygnIyBpbnB1dDogJywgaW5wdXQpO1xuICAgICAgZGVidWdMb2coJyMgc2VsbGVyRmVlQmFzaXNQb2ludHM6ICcsIHNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgIGRlYnVnTG9nKCcjIGRhdGF2MjogJywgZGF0YXYyKTtcblxuICAgICAgY29uc3QgbWludCA9IEFjY291bnQuS2V5cGFpci5jcmVhdGUoKTtcbiAgICAgIGNvbnN0IGluc3RzID0gYXdhaXQgTWludC5jcmVhdGVNaW50KFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyUHVibGlja2V5LFxuICAgICAgICBkYXRhdjIsXG4gICAgICAgIGZlZVBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICk7XG5cbiAgICAgIC8vIGZyZWV6ZUF1dGhvcml0eVxuICAgICAgaWYgKG9wdGlvbnMuZnJlZXplQXV0aG9yaXR5KSB7XG4gICAgICAgIGluc3RzLnB1c2goXG4gICAgICAgICAgTWludC5jcmVhdGVEZWxlYWdhdGUoXG4gICAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBvd25lclB1YmxpY2tleSxcbiAgICAgICAgICAgIG9wdGlvbnMuZnJlZXplQXV0aG9yaXR5LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgYmxvY2toYXNoT2JqID0gYXdhaXQgTm9kZS5nZXRDb25uZWN0aW9uKCkuZ2V0TGF0ZXN0QmxvY2toYXNoKCk7XG4gICAgICBjb25zdC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Y29sbGVjdGlvbk1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgIGRhdGF2MixcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICBpc011dGFibGUsXG4gICAgICApO1xuXG4gICAgICAvLyBmcmVlemVBdXRob3JpdHlcbiAgICAgIGlmIChmcmVlemVBdXRob3JpdHkpIHtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgICAgTWludC5jcmVhdGVEZWxlYWdhdGUoXG4gICAgICAgICAgICBjb2xsZWN0aW9uTWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgICAgICBmcmVlemVBdXRob3JpdHkudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBjb2xsZWN0aW9ucyA9IHtcbiAgICAgICAgY29sbGVjdGlvbk1ldGFkYXRhOiBjb2xsZWN0aW9uTWV0YWRhdGFBY2NvdW50LFxuICAgICAgICBjb2xsZWN0aW9uQXV0aG9yaXR5OiBvd25lci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgIGNvbGxlY3Rpb25NaW50OiBjb2xsZWN0aW9uTWludC50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICB9O1xuXG4gICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgY3JlYXRlU2V0Q29sbGVjdGlvblNpemVJbnN0cnVjdGlvbihjb2xsZWN0aW9ucywge1xuICAgICAgICAgIHNldENvbGxlY3Rpb25TaXplQXJnczoge1xuICAgICAgICAgICAgc2l6ZTogY29sbGVjdGlvblNpemUgfHwgREVGQVVMVF9DT0xMRUNUSU9OX1NJWkUsXG4gICAgICAgICAgfSxcbiAgICAgICAgfSksXG4gICAgICApO1xuXG4gICAgICByZXR1cm4g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XJ0ZXIiLCAiQWNjb3VudCIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiZ2V0QXNzb2NpYXRlZFRva2VuQWRkcmVzc1N5bmMiLCAiUmVndWxhck5mdCIsICJBY2NvdW50IiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJSZWd1bGFyTmZ0IiwgIlNwbFRva2VuIiwgIlJlZ3VsYXJOZnQiLCAiQ29tcHJlc3NlZE5mdCIsICJSZWd1bGFyTmZ0IiwgIkNvbXByZXNzZWROZnQiXQp9Cg== \ No newline at end of file diff --git a/packages/suite-compressed-nft/src/delegate.ts b/packages/suite-compressed-nft/src/delegate.ts index b55149559..c02294c46 100644 --- a/packages/suite-compressed-nft/src/delegate.ts +++ b/packages/suite-compressed-nft/src/delegate.ts @@ -19,7 +19,6 @@ import { Pubkey, Secret } from '~/types/account'; import { CommonStructure } from '~/types/transaction-builder'; export namespace CompressedNft { - /** * @internal */ diff --git a/packages/suite-memo/dist/index.js b/packages/suite-memo/dist/index.js index 0e24a6c0c..a22b8ce64 100644 --- a/packages/suite-memo/dist/index.js +++ b/packages/suite-memo/dist/index.js @@ -1655,4 +1655,4 @@ var Memo3 = { ...Memo, ...Memo2 }; 0 && (module.exports = { Memo }); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uL3NyYy9jcmVhdGUudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvYmF0Y2gudHMiLCAiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi9zdWl0ZS11dGlscy9zcmMvc2hhcmVkLnRzIiwgIi4uLy4uL3N1aXRlLXV0aWxzL3NyYy9yZXN1bHQudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMva2V5cGFpci50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9wZGEudHMiLCAiLi4vLi4vYW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kpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEuc3ltYm9sKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU3ltYm9sKG1ldGFkYXRhLnN5bWJvbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAocmVzICYmIHJlcy5pc0Vycikge1xuICAgICAgICAgIHJlc3VsdHMucHVzaCguLi5yZXMuZXJyb3IuZGV0YWlscyk7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgICA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HJvZ3JhbSxcbiAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIgPSBpbnN0cnVjdGlvbjtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICApO1xuXG4gICAgICAgICAgICAgICAgLy8gc3BsLXRva2VuIG9yIHN5c3RlbVxuICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIgJiZcbiAgICAgICAgICAgICAgICAgIG1vZHVsZU5hbWUgIT09IGluc3RydWN0aW9uVHJhbnNmZXJbJ3Byb2dyYW0nXVxuICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgZGVidWdMb2coXG4gICAgICAgICAgICAgICAgICAgICcjIEZpbHRlclR5cGUuTWVtbyBicmVhayBpbnN0cnVjdGlvbjogJyxcbiAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlcixcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAvLyBmZXRjaCBtZW1vIG9ubHkgdHJhbnNhY3Rpb25cbiAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLk1lbW8uaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyLFxuICAgICAgICAgICAgICAgICAgcG9zdFRva2VuQWNjb3VudCxcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLk9ubHlNZW1vOiB7XG4gICAgICAgICAgICAgIGlmIChGaWx0ZXJPcHRpb25zLk1lbW8ucHJvZ3JhbS5pbmNsdWRlcyhpbnN0cnVjdGlvbi5wcm9ncmFtKSkge1xuICAgICAgICAgICAgICAgIGxldCBpbnN0cnVjdGlvblRyYW5zZmVyO1xuXG4gICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5NZW1vLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlcixcbiAgICAgICAgICAgICAgICAgIHBvc3RUb2tlbkFjY291bnQsXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5NaW50OiB7XG4gICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLk1pbnQucHJvZ3JhbS5pbmNsdWRlcyhpbnN0cnVjdGlvbi5wcm9ncmFtKSAmJlxuICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuTWludC5hY3Rpb24uaW5jbHVkZXMoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbi5wYXJzZWQudHlwZSBhcyBzdHJpbmcsXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLk1pbnQuaW50b1VzZXJTaWRlKGluc3RydWN0aW9uLCB0eE1ldGEpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLlRyYW5zZmVyOlxuICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgbW9kdWxlTmFtZSA9PT0gaW5zdHJ1Y3Rpb24ucHJvZ3JhbSAmJlxuICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuVHJhbnNmZXIuYWN0aW9uLmluY2x1ZGVzKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24ucGFyc2VkLnR5cGUgYXMgc3RyaW5nLFxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgaWYgKGluc3RydWN0aW9uLnBhcnNlZC50eXBlID09PSAndHJhbnNmZXJDaGVja2VkJykge1xuICAgICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5UcmFuc2ZlckNoZWNrZWQuaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgICBwb3N0VG9rZW5BY2NvdW50LFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5UcmFuc2Zlci5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgICByZXR1cm4gaGlzdG9yeTtcbiAgICB9O1xufVxuIiwgImltcG9ydCB7IFB1YmtleSB9IGZyb20gJ34vdHlwZXMvYWNjb3VudCc7XG5pbXBvcnQgeyBGaW5kT3B0aW9ucywgSGlzdG9yeSB9IGZyb20gJ34vdHlwZXMvaGlzdG9yeSc7XG5pbX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tcblxuICBleHBvcnQgY29uc3Qgc3dpdGNoQnVuZGxyID0gKGVudjogc3RyaW5nKTogc3RyaW5nID0+IHtcbiAgICBzd2l0Y2ggKGVudikge1xuICAgICAgY2FzZSBDb25zdGFudHMuQ2x1c3Rlci5wcmQ6IHtcbiAgICAgICAgY29uc3QgdXJscyA9IENvbnN0YW50cy5CdW5kbHJVcmwucHJkLnNwbGl0KCcsJyk7XG4gICAgICAgIGNvbnN0IGluZGV4ID0gRGF0ZS5ub3coKSAlIHVybHMubGVuZ3RoO1xuICAgICAgICByZXR1cm4gdXJsc1tpbmRleF07XG4gICAgICB9XG4gICAgICBkZWZhdWx0OiB7XG4gICAgICAgIHJldHVybiBDb25zdGFudHMuQnVuZGxyVXJsLmRldjtcbiAgICAgIH1cbiAgICB9XG4gIH07XG5cbiAgZXhwb3J0IGNvbnN0IHN3aXRjaERhc0FwaSA9IChlbnY6IHN0cmluZyk6IHN0cmluZyA9PiB7XG4gICAgc3dpdGNoIChlbnYpIHtcbiAgICAgIGNhc2UgQ29uc3RhbnRzLkNsdXN0ZXIucHJkOiB7XG4gICAgICAgIGlmIChkYXNBcGlVcmwubGVuZ3RoIDwgMSkge1xuICAgICAgICAgIHRocm93IEVycm9yKENvbnN0YW50cy5XYXJubmluZ01lc3NhZ2UuREFTX0FQSV9VUkwpO1xuICAgICAgICB9XG4gICAgICAgIGNvbnN0IHVybHMgPSBDb25zdGFudHMuQnVuZGxyVXJsLnByZC5zcGxpdCgnLCcpO1xuICAgICAgICBjb25zdCBpbmRleCA9IERhdGUubm93KCkgJSB1cmxzLmxlbmd0aDtcbiAgICAgICAgcmV0dXJuIHVybHNbaW5kZXhdO1xuICAgICAgfVxuICAgICAgZGVmYXVsdDoge1xuICAgICAgICBjb25zdCB1cmxzID0gQ29uc3RhbnRzLkRhc0FwaVVybC5kZXYuc3BsaXQoJywnKTtcbiAgICAgICAgY29uc3QgaW5kZXggPSBEYXRlLm5vdygpICUgdXJscy5sZW5ndGg7XG4gICA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fZmVlX2Jhc2lzX3BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJGZWVCYXNpc1BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0YWRhdGEubmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzeW1ib2wnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLnN5bWJvbCkge1xuICAgICAgICAgICAgICByZXMgPSBpc1N5bWJvbChtZXRhZGF0YS5zeW1ib2wpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHJlcyAmJiByZXMuaXNFcnIpIHtcbiAgICAgICAgICByZXN1bHRzLnB1c2goLi4ucmVzLmVycm9yLmRldGFpbHMpO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIGlmIChyZXN1bHRzLmxlbmd0aCA+IDApIHtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9XG4gICAgICAgICAgJ0NhdWdodCBpbiB0aGUgdmFsaWRhdGlvbiBlcnJvcnMuIHNlZSBpbmZvcm1hdGlvbiBlLmc6IGVycjxWYWxpZGF0b3JFcnJvcj4uZGV0YWlscyc7XG4gICAgICAgIHRocm93IG5ldyBWYWxpZGF0b3JFcnJvcihtZXNzYWdlLCByZXN1bHRzKTtcbiAgICAgIH1cbiAgICAgIHJ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b3N0VG9rZW5BY2NvdW50TGlzdCh0eE1ldGEpO1xuICAgICAgdHhNZXRhLnRyYW5zYWN0aW9uLm1lc3NhZ2UuaW5zdHJ1Y3Rpb25zLmZvckVhY2goKGluc3RydWN0aW9uKSA9PiB7XG4gICAgICAgIGlmIChpc1BhcnNlZEluc3RydWN0aW9uKGluc3RydWN0aW9uKSkge1xuICAgICAgICAgIHN3aXRjaCAoZmlsdGVyVHlwZSkge1xuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLk1lbW86IHtcbiAgICAgICAgICAgICAgaWYgKEZpbHRlck9wdGlvbnMuTWVtby5wcm9ncmFtLmluY2x1ZGVzKGluc3RydWN0aW9uLnByb2dyYW0pKSB7XG4gICAgICAgICAgICAgICAgbGV0IGluc3RydWN0aW9uVHJhbnNmZXI7XG5cbiAgICAgICAgICAgICAgICAvLyBmZXRjaCAgdHJhbnNmZXIgdHJhbnNhY3Rpb24gZm9yIHJlbGF0aW9uYWwgbWVtb1xuICAgICAgICAgICAgICAgIHR4TWV0YS50cmFuc2FjdGlvbi5tZXNzYWdlLmluc3RydWN0aW9ucy5mb3JFYWNoKFxuICAgICAgICAgICAgICAgICAgKGluc3RydWN0aW9uKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICBpc1BhcnNlZEluc3RydWN0aW9uKGluc3RydWN0aW9uKSAmJlxuICAgICAgICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuVHJhbnNmZXIucHJvZ3JhbS5pbmNsdWRlcyhcbiAgICAgICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLnByb2dyYW0sXG4gICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyID0gaW5zdHJ1Y3Rpb247XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgKTtcblxuICAgICAgICAgICAgICAgIC8vIHNwbC10b2tlbiBvciBzeXN0ZW1cbiAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyICYmXG4gICAgICAgICAgICAgICAgICBtb2R1bGVOYW1lICE9PSBpbnN0cnVjdGlvblRyYW5zZmVyWydwcm9ncmFtJ11cbiAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgIGRlYnVnTG9nKFxuICAgICAgICAgICAgICAgICAgICAnIyBGaWx0ZXJUeXBlLk1lbW8gYnJlYWsgaW5zdHJ1Y3Rpb246ICcsXG4gICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIsXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgLy8gZmV0Y2ggbWVtbyBvbmx5IHRyYW5zYWN0aW9uXG4gICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5NZW1vLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlcixcbiAgICAgICAgICAgICAgICAgIHBvc3RUb2tlbkFjY291bnQsXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5Pbmx5TWVtbzoge1xuICAgICAgICAgICAgICBpZiAoRmlsdGVyT3B0aW9ucy5NZW1vLnByb2dyYW0uaW5jbHVkZXMoaW5zdHJ1Y3Rpb24ucHJvZ3JhbSkpIHtcbiAgICAgICAgICAgICAgICBsZXQgaW5zdHJ1Y3Rpb25UcmFuc2ZlcjtcblxuICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuTWVtby5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIsXG4gICAgICAgICAgICAgICAgICBwb3N0VG9rZW5BY2NvdW50LFxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXNlIEZpbHRlclR5cGUuTWludDoge1xuICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5NaW50LnByb2dyYW0uaW5jbHVkZXMoaW5zdHJ1Y3Rpb24ucHJvZ3JhbSkgJiZcbiAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLk1pbnQuYWN0aW9uLmluY2x1ZGVzKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24ucGFyc2VkLnR5cGUgYXMgc3RyaW5nLFxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5NaW50LmludG9Vc2VyU2lkZShpbnN0cnVjdGlvbiwgdHhNZXRhKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5UcmFuc2ZlcjpcbiAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgIG1vZHVsZU5hbWUgPT09IGluc3RydWN0aW9uLnByb2dyYW0gJiZcbiAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLlRyYW5zZmVyLmFjdGlvbi5pbmNsdWRlcyhcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLnBhcnNlZC50eXBlIGFzIHN0cmluZyxcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgIGlmIChpbnN0cnVjdGlvbi5wYXJzZWQudHlwZSA9PT0gJ3RyYW5zZmVyQ2hlY2tlZCcpIHtcbiAgICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuVHJhbnNmZXJDaGVja2VkLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgICAgcG9zdFRva2VuQWNjb3VudCxcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuVHJhbnNmZXIuaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgICAgcmV0dXJuIGhpc3Rvcnk7XG4gICAgfTtcbn1cbiIsICJpbXBvcnQgeyBQdWJrZXkgfSBmcm9tICd+L3R5cGVzL2FjY291bnQnO1xuaW1wb3J0IHsgRmluZE9wdGlvbnMsIEhpc3RvcnkgfSBmcm9tICd+L3R5cGVzL2hpc3RvcnknO1xuaW1wb3J0IHsgT25FcnIsIE9uT2sgfSBmcm9tICd+L3R5cGVzL3N1aXRlLXV0aWxzJztcbmltcG9ydCB7IEZpbHRlclR5cGUsIE1vZHVsZU5hbWUgfSBmcm9tICd+L3R5cGVzL3RyYW5zYWN0aW9uLWZpbHR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iczU4IiwgIk1lbW8iLCAiYnMiLCAiU2lnbmF0dXJlcyIsICJUcmFuc2FjdGlvbkZpbHRlciIsICJpbnN0cnVjdGlvbiIsICJDb252ZXJ0ZXIiLCAiTWVtbyIsICJNZW1vIl0KfQo= \ No newline at end of file diff --git a/packages/suite-memo/dist/index.mjs b/packages/suite-memo/dist/index.mjs index 6d92cff6a..6fccfb393 100644 --- a/packages/suite-memo/dist/index.mjs +++ b/packages/suite-memo/dist/index.mjs @@ -1632,4 +1632,4 @@ var Memo3 = { ...Memo, ...Memo2 }; export { Memo3 as Memo }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2NyZWF0ZS50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9iYXRjaC50cyIsICIuLi8uLi9zdWl0ZS11dGlscy9zcmMvY29uc3RhbnRzLnRzIiwgIi4uLy4uL3N1aXRlLXV0aWxzL3NyYy9zaGFyZWQudHMiLCAiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL3Jlc3VsdC50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9rZXlwYWlyLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL3BkYS50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9pbmRleC50cyIsICIuLi8uLi9nbG9iYWwvc3JjL2luZGV4LnRzIiwgIi4uLy4uL2NvbnZlcnRlci9zcmMvY29sbGVjdGlvbi50cyIsICIuLi8uLi9jb252ZXJ0ZXIvc3JjL2NyZWF0b3JzLnRzIiwgIi4uLy4uL2NvbnZlcnRlci9zcmMvY29tcHJlc3NlZC1uZnQtbWV0YWRhdGEudHMiLCAiLi4vLi4vY29udmVydGVyL3NyYy9yb3lhbHR5LnRzIiwgIi4uLy4uL2NvbnZlcnRlci9zcmMvbmZ0LnRzIiwgIi4uLy4uL2NvbnZlcnRlci9zcmMvbWVtby50cyIsICIuLi8uLi9jb252ZXJ0ZXIv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IG93bmVyOiBTZWNyZXQsXG4gICAgb3B0aW9uczogUGFydGlhbDxNZW1vT3B0aW9ucz4gPSB7fSxcbiAgKTogUmVzdWx0PENvbW1vblN0cnVjdHVyZSwgRXJyb3I+ID0+IHtcbiAgICByZXR1cm4gVHJ5KCgpID0+IHtcbiAgICAgIGNvbnN0IGZlZVBheWVyID0gb3B0aW9ucy5mZWVQYXllcjtcblxuICAgICAgY29uc3Qga2V5ID0gb3duZXIudG9LZXlwYWlyKCkucHVibGljS2V5XG4gICAgICAgID8gW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBwdWJrZXk6IG93bmVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgICAgICAgaXNTaWduZXI6IHRydWUsXG4gICAgICAgICAgICAgIGlzV3JpdGFibGU6IHRydWUsXG4gICAgICAgICAgICB9LFxuICAgICAgICAgIF1cbiAgICAgICAgOiBbXTtcblxuICAgICAgY29uc3QgaW5zdHJ1Y3Rpb24gPSBuZXcgVHJhbnNhY3Rpb25JbnN0cnVjdGlvbih7XG4gICAgICAgIHByb2dyYW1JZDogQ29uc3RhbnRzLk1FTU9fUFJPR1JBTV9JRCxcbiAgICAgICAgZGF0YTogZW5jb2RlKGRhdGEpLFxuICAgICAgICBrZXlzOiBrZXksXG4gICAgICB9KTtcblxuICAgICAgY29uc3QgcGF5ZXIgPSBmZWVQYXllciB8fCBvd25lcjtcblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uKFxuICAgICAgICBbaW5zdHJ1Y3Rpb25dLFxuICAgICAgICBbb3duZXIudG9LZXlwYWlyKCldLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKSxcbiAgICAgICk7XG4gICAgfSk7XG4gIH07XG59XG4iLCAiaW1wb3J0IHtcbiAgQ29uZmlybU9wdGlvbnMsXG4gIHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24sXG4gIFRyYW5zYWN0aW9uLFxuICB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MgZnVuY3Rpb24gKGZlZVBheWVyPzogU2VjcmV0KSB7XG4gIGlmIChmZWVQYXllcikge1xuICAgIGxldCBpID0gMTtcbiAgICBmb3IgYXdhaXQgKGNvbnN0IG9iaiBvZiB0aGlzKSB7XG4gICAgICBpZiAob2JqLmlzRXJyKSB7XG4gICAgICAgIHJldHVybiBvYmo7XG4gICAgICB9IGVsc2UgaWYgKG9iai52YWx1ZS5jYW5TdWJtaXQpIHtcbiAgICAgICAgZGVidWdMb2coJyMgUmVzdWx0IGJhdGNoIGNhblN1Ym1pdCcpO1xuICAgICAgICBjb25zdCBzaWcgPSBhd2FpdCAob2JqIGFzIFBhcnRpYWxTaWduU3RydWN0dXJlKS5zdWJtaXQoZmVlUGF5ZXIpO1xuICAgICAgICBpZiAoc2lnLmlzRXJyKSB7XG4gICAgICAgICAgcmV0dXJuIHNpZztcbiAgICAgICAgfVxuICAgICAgICBhd2FpdCBOb2RlLmNvbmZpcm1lZFNpZyhzaWcudmFsdWUpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgZGVidWdMb2coJyMgUmVzdWx0IGJhdGNoIG90aGVyIHRoYW4gY2FuU3VibWl0Jyk7XG4gICAgICAgIGlmICh0aGlzLmxlbmd0aCA9PSBpKSB7XG4gICAgICAgICAgLy8gbGFzdCBvYmplY3RcbiAgICAgICAgICByZXR1cm4gb2JqLnN1Ym1pdChmZWVQYXllcik7XG4gICAgICAgIH1cbiAgICAgICAgb2JqLnN1Ym1pdChmZWVQYXllcik7XG4gICAgICB9XG4gICAgICBpKys7XG4gICAgfVxuICB9IGVsc2Uge1xuICAgIGNvbnN0IGluc3RydWN0aW9uczogQ29tbW9uU3RydWN0dXJlIHwgTWludFN0cnVjdHVyZVtdID0gW107XG4gICAgZm9yIChjb25zdCBvYmogb2YgdGhpcykge1xuICAgICAgaWYgKG9iai5pc0Vycikge1xuICAgICAgICByZXR1cm4gb2JqO1xuICAgICAgfSBlbHNlIGlmIChvYmouaXNPaykge1xuICAgICAg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AgICAgICBsZXQgcmVzITogUmVzdWx0PHN0cmluZywgVmFsaWRhdG9yRXJyb3I+O1xuICAgICAgICBzd2l0Y2ggKGtleSkge1xuICAgICAgICAgIGNhc2UgJ2ltYWdlJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuaW1hZ2UpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNJbWFnZVVybChtZXRhZGF0YS5pbWFnZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdyb3lhbHR5JzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEucm95YWx0eSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1JveWFsdHkobWV0YWRhdGEucm95YWx0eSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ25hbWUnOlxuICAgICAgICAgICAga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aWRCbG9ja0hlaWdodDtcbiAgICAgICAgdHJhbnNhY3Rpb24ucmVjZW50QmxvY2toYXNoID0gYmxvY2toYXNoT2JqLmJsb2NraGFzaDtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHRoaXMuc2lnbmVycztcblxuICAgICAgICBpZiAodGhpcy5mZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gdGhpcy5mZWVQYXllci5wdWJsaWNLZXk7XG4gICAgICAgICAgZmluYWxTaWduZXJzID0gW3RoaXMuZmVlUGF5ZXIsIC4uLnRoaXMuc2lnbmVyc107XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLmluc3RydWN0aW9ucy5mb3JFYWNoKChpbnN0KSA9PiB0cmFuc2FjdGlvbi5hZGQoaW5zdCkpO1xuXG4gICAgICAgIGNvbnN0IG9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IE1BWF9SRVRSSUVTLFxuICAgICAgICB9O1xuXG4gICAgICAgIGlmIChOb2RlLmdldENvbm5lY3Rpb24oKS5ycGNFbmRwb2ludCA9PT0gQ29uc3RhbnRzLkVuZFBvaW50VXJsLnByZCkge1xuICAgICAgICAgIGRlYnVnTG9nKCcjIENoYW5nZSBtZXRhcGxleCBjbHVzdGVyIG9uIG1haW5uZXQtYmV0YScpO1xuICAgICAgICAgIE5vZGUuY2hhbmdlQ29ubmVjdGlvbih7IGNsdXN0ZXI6IENvbnN0YW50cy5DbHVzdGVyLnByZE1ldGFwbGV4IH0pO1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgIG9wdGlvbnMsXG4gICAgICAgICk7X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8gZmV0Y2ggIHRyYW5zZmVyIHRyYW5zYWN0aW9uIGZvciByZWxhdGlvbmFsIG1lbW9cbiAgICAgICAgICAgICAgICB0eE1ldGEudHJhbnNhY3Rpb24ubWVzc2FnZS5pbnN0cnVjdGlvbnMuZm9yRWFjaChcbiAgICAgICAgICAgICAgICAgIChpbnN0cnVjdGlvbikgPT4ge1xuICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgaXNQYXJzZWRJbnN0cnVjdGlvbihpbnN0cnVjdGlvbikgJiZcbiAgICAgICAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLlRyYW5zZmVyLnByb2dyYW0uaW5jbHVkZXMoXG4gICAgICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbi5wcm9ncmFtLFxuICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlciA9IGluc3RydWN0aW9uO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICk7XG5cbiAgICAgICAgICAgICAgICAvLyBzcGwtdG9rZW4gb3Igc3lzdGVtXG4gICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlciAmJlxuICAgICAgICAgICAgICAgICAgbW9kdWxlTmFtZSAhPT0gaW5zdHJ1Y3Rpb25UcmFuc2ZlclsncHJvZ3JhbSddXG4gICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICBkZWJ1Z0xvZyhcbiAgICAgICAgICAgICAgICAgICAgJyMgRmlsdGVyVHlwZS5NZW1vIGJyZWFrIGluc3RydWN0aW9uOiAnLFxuICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyLFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vIGZldGNoIG1lbW8gb25seSB0cmFuc2FjdGlvblxuICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuTWVtby5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIsXG4gICAgICAgICAgICAgICAgICBwb3N0VG9rZW5BY2NvdW50LFxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXNlIEZpbHRlclR5cGUuT25seU1lbW86IHtcbiAgICAgICAgICAgICAgaWYgKEZpbHRlck9wdGlvbnMuTWVtby5wcm9ncmFtLmluY2x1ZGVzKGluc3RydWN0aW9uLnByb2dyYW0pKSB7XG4gICAgICAgICAgICAgICAgbGV0IGluc3RydWN0aW9uVHJhbnNmZXI7XG5cbiAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLk1lbW8uaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyLFxuICAgICAgICAgICAgICAgICAgcG9zdFRva2VuQWNjb3VudCxcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLk1pbnQ6IHtcbiAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuTWludC5wcm9ncmFtLmluY2x1ZGVzKGluc3RydWN0aW9uLnByb2dyYW0pICYmXG4gICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5NaW50LmFjdGlvbi5pbmNsdWRlcyhcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLnBhcnNlZC50eXBlIGFzIHN0cmluZyxcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuTWludC5pbnRvVXNlclNpZGUoaW5zdHJ1Y3Rpb24sIHR4TWV0YSk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXNlIEZpbHRlclR5cGUuVHJhbnNmZXI6XG4gICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICBtb2R1bGVOYW1lID09PSBpbnN0cnVjdGlvbi5wcm9ncmFtICYmXG4gICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5UcmFuc2Zlci5hY3Rpb24uaW5jbHVkZXMoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbi5wYXJzZWQudHlwZSBhcyBzdHJpbmcsXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICBpZiAoaW5zdHJ1Y3Rpb24ucGFyc2VkLnR5cGUgPT09ICd0cmFuc2ZlckNoZWNrZWQnKSB7XG4gICAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLlRyYW5zZmVyQ2hlY2tlZC5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICAgIHBvc3RUb2tlbkFjY291bnQsXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgIC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gVHJ5KCgpID0+IHtcbiAgICAgIGNvbnN0IGZlZVBheWVyID0gb3B0aW9ucy5mZWVQYXllcjtcblxuICAgICAgY29uc3Qga2V5ID0gb3duZXIudG9LZXlwYWlyKCkucHVibGljS2V5XG4gICAgICAgID8gW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBwdWJrZXk6IG93bmVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgICAgICAgaXNTaWduZXI6IHRydWUsXG4gICAgICAgICAgICAgIGlzV3JpdGFibGU6IHRydWUsXG4gICAgICAgICAgICB9LFxuICAgICAgICAgIF1cbiAgICAgICAgOiBbXTtcblxuICAgICAgY29uc3QgaW5zdHJ1Y3Rpb24gPSBuZXcgVHJhbnNhY3Rpb25JbnN0cnVjdGlvbih7XG4gICAgICAgIHByb2dyYW1JZDogQ29uc3RhbnRzLk1FTU9fUFJPR1JBTV9JRCxcbiAgICAgICAgZGF0YTogZW5jb2RlKGRhdGEpLFxuICAgICAgICBrZXlzOiBrZXksXG4gICAgICB9KTtcblxuICAgICAgY29uc3QgcGF5ZXIgPSBmZWVQYXllciB8fCBvd25lcjtcblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uKFxuICAgICAgICBbaW5zdHJ1Y3Rpb25dLFxuICAgICAgICBbb3duZXIudG9LZXlwYWlyKCldLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKSxcbiAgICAgICk7XG4gICAgfSk7XG4gIH07XG59XG4iLCAiaW1wb3J0IHtcbiAgQ29uZmlybU9wdGlvbnMsXG4gIHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24sXG4gIFRyYW5zYWN0aW9uLFxuICBUcmFuc2FjdGlvblNpZ25hdHVyZSxcbn0gZnJvbSAnQHNvbGFuYS93ZWIzLmpzJztcblxuaW1wb3J0IHsgTm9kZSB9IGZyb20gJ34vbm9kZSc7XG5pbXBvcnQgeyBNQVhfUkVUUklFUywgVH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pZiAob2JqLmlzRXJyKSB7XG4gICAgICAgIHJldHVybiBvYmo7XG4gICAgICB9IGVsc2UgaWYgKG9iai52YWx1ZS5jYW5TdWJtaXQpIHtcbiAgICAgICAgZGVidWdMb2coJyMgUmVzdWx0IGJhdGNoIGNhblN1Ym1pdCcpO1xuICAgICAgICBjb25zdCBzaWcgPSBhd2FpdCAob2JqIGFzIFBhcnRpYWxTaWduU3RydWN0dXJlKS5zdWJtaXQoZmVlUGF5ZXIpO1xuICAgICAgICBpZiAoc2lnLmlzRXJyKSB7XG4gICAgICAgICAgcmV0dXJuIHNpZztcbiAgICAgICAgfVxuICAgICAgICBhd2FpdCBOb2RlLmNvbmZpcm1lZFNpZyhzaWcudmFsdWUpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgZGVidWdMb2coJyMgUmVzdWx0IGJhdGNoIG90aGVyIHRoYW4gY2FuU3VibWl0Jyk7XG4gICAgICAgIGlmICh0aGlzLmxlbmd0aCA9PSBpKSB7XG4gICAgICAgICAgLy8gbGFzdCBvYmplY3RcbiAgICAgICAgICByZXR1cm4gb2JqLnN1Ym1pdChmZWVQYXllcik7XG4gICAgICAgIH1cbiAgICAgICAgb2JqLnN1Ym1pdChmZWVQYXllcik7XG4gICAgICB9XG4gICAgICBpKys7XG4gICAgfVxuICB9IGVsc2Uge1xuICAgIGNvbnN0IGluc3RydWN0aW9uczogQ29tbW9uU3RydWN0dXJlIHwgTWludFN0cnVjdHVyZVtdID0gW107XG4gICAgZm9yIChjb25zdCBvYmogb2YgdGhpcykge1xuICAgICAgaWYgKG9iai5pc0Vycikge1xuICAgICAgICByZXR1cm4gb2JqO1xuICAgICAgfSBlbHNlIGlmIChvYmouaXNPaykge1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChvYmoudmFsdWUpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgcmV0dXJuIFJlc3VsdC5lcnIoRXJyb3IoJ09ubHkgQXJyYXkgSW5zdHJ1Y3Rpb24gb2J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WJsaWNLZXkoKS50b0J1ZmZlcigpXSxcbiAgICAgICAgTVBMX0JVQkJMRUdVTV9QUk9HUkFNX0lELnRvUHVibGljS2V5KCksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGdldEJndW1TaWduZXIgPSAoKTogUHVibGljS2V5ID0+IHtcbiAgICAgIGNvbnN0IFtwdWJsaWNLZXldID0gUHVibGljS2V5LmZpbmRQcm9ncmFtQWRkcmVzc1N5bmMoXG4gICAgICAgIFtCdWZmZXIuZnJvbSgnY29sbGVjdGlvbl9jcGknLCAndXRmOCcpXSxcbiAgICAgICAgTVBMX0JVQkJMRUdVTV9QUk9HUkFNX0lELnRvUHVibGljS2V5KCksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGdldEFzc2V0SWQgPSAoYWRkcmVzczogUHVia2V5LCBsZWFmSW5kZXg6IG51bWJlcik6IFB1YmtleSA9PiB7XG4gICAgICBjb25zdCBub2RlID0gbmV3IEJOLkJOKGxlYWZJbmRleCk7XG4gICAgICBjb25zdCBbYXNzZXRJZF0gPSBQdWJsaWNLZXkuZmluZFByb2dyYW1BZGRyZXNzU3luYyhcbiAgICAgICAgW1xuICAgICAgICAgIEJ1ZmZlci5mcm9tKCdhc3NldCcsICd1dGY4JyksXG4gICAgICAgICAgYWRkcmVzcy50b1B1YmxpY0tleSgpLnRvQnVmZmVyKCksXG4gICAgICAgICAgVWludDhBcnJheS5mcm9tKG5vZGUudG9BcnJheSgnbGUnLCA4KSksXG4gICAgICAgIF0sXG4gICAgICAgIE1QTF9CVUJCTEVHVU1fUFJPR1JBTV9JRC50b1B1YmxpY0tleSgpLFxuICAgICAgKTtcbiAgICAgIHJldHVybiBhc3NldElkLnRvU3RyaW5nKCk7XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IEFjY291bn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nRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvQ29tcHJlc3NlZE5mdEluZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IEludGVybmFsQ3JlYXRvcnNbXSA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBbXTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBpbnB1dCEubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlciA9IChcbiAgICAgIG91dHB1dDogT3B0aW9uPEludGVybmFsQ3JlYXRvcnNbXT4sXG4gICAgKTogQ3JlYXRvcnNbXSB8IHVuZGVmaW5lZCA9PiB7XG4gICAgICBpZiAoIW91dHB1dCkge1xuICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gb3V0cHV0Lm1hcCgoZGF0YSkgPT4ge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIGFkZHJlc3M6IGRhdGEuYWRkcmVzcy50b1N0cmluZygpLFxuICAgICAgICAgIHNoYXJlOiBkYXRhLnNoYXJlLFxuICAgICAgICAgIHZlcmlmaWVkOiBkYXRhLnZlcmlmaWVkLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcbiAg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wZXJ0aWVzPiA9PiB7XG4gICAgICBpZiAoIWlucHV0IHx8ICFpbnB1dC5maWxlcykge1xuICAgICAgICByZXR1cm4ge307XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGZpbGVzID0gYXdhaXQgUHJvbWlzZS5hbGwoXG4gICAgICAgIGlucHV0LmZpbGVzLm1hcChhc3luYyAoZmlsZSkgPT4ge1xuICAgICAgICAgIGlmICghZmlsZS5maWxlUGF0aCkge1xuICAgICAgICAgICAgcmV0dXJuIHt9O1xuICAgICAgICAgIH1cbiAgICAgICAgICBjb25zdCByZXMgPSBhd2FpdCBjYWxsYmFja0Z1bmMoZmlsZS5maWxlUGF0aCwgc3RvcmFnZVR5cGUsIGZlZVBheWVyKTtcbiAgICAgICAgICBpZiAocmVzLmlzRXJyKSB7XG4gICAgICAgICAgICB0aHJvdyBFcnJvcihyZXMuZXJyb3IubWVzc2FnZSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBvdmVyd3JpdGVPYmplY3QoZmlsZSwgW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBleGlzdHNLZXk6ICdmaWxlUGF0aCcsXG4gICAgICAgICAgICAgIHdpbGw6IHsga2V5OiAndXJpJywgdmFsdWU6IHJlcy52YWx1ZSB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICBdKTtcbiAgICAgICAgfSksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHsgLi4uaW5wdXQsIGZpbGVzIH0gYXMgUHJvcGVydGllcztcbiAgICB9O1xuICB9XG59XG4iLCAiLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLXVudXNlZC12YXJzICovXG5pbXBvcnQgeyBPcHRpb24sIFVzZXMgfSBmcm9tICd+L3R5cGVzL3JlZ3VsYXItbmZ0JztcblxuZXhwb3J0IG5hbWVzcGFjZSBDb252ZXJ0ZXIge1xuICBleHBvcnQgbmFtZXNwYWNlIFVzZXMge1xuICAgIGV4cG9ydC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AgICAgICBjYXNlICdpbWFnZSc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLmltYWdlKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzSW1hZ2VVcmwobWV0YWRhdGEuaW1hZ2UpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAncm95YWx0eSc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnJveWFsdHkpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNSb3lhbHR5KG1ldGFkYXRhLnJveWFsdHkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAg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llclBrID0gW2ZlZVBheWVyLnRvQmFzZTU4KCldO1xuXG4gICAgY29uc3Qgc2lnbmVycyA9IG5ldyBTZXQ8c3RyaW5nPihmZWVQYXllclBrKTtcbiAgICBjb25zdCBhY2NvdW50cyA9IG5ldyBTZXQ8c3RyaW5nPihmZWVQYXllclBrKTtcblxuICAgIGNvbnN0IGl4c1NpemUgPSB0cmFuc2FjdGlvbi5pbnN0cnVjdGlvbnMucmVkdWNlKChhY2MsIGl4KSA9PiB7XG4gICAgICBpeC5rZXlzLmZvckVhY2goKHsgcHVia2V5LCBpc1NpZ25lciB9KSA9PiB7XG4gICAgICAgIGNvbnN0IHBrID0gcHVia2V5LnRvQmFzZTU4KCk7XG4gICAgICAgIGlmIChpc1NpZ25lcikgc2lnbmVycy5hZGQocGspO1xuICAgICAgICBhY2NvdW50cy5hZGQocGspO1xuICAgICAgfSk7XG5cbiAgICAgIGFjY291bnRzLmFkZChpeC5wcm9ncmFtSWQudG9CYXNlNTgoKSk7XG5cbiAgICAgIGNvbnN0IG5JbmRleGVzID0gaXgua2V5cy5sZW5ndGg7XG4gICAgICBjb25zdCBvcGFxdWVEYXRhID0gaXguZGF0YS5sZW5ndGg7XG5cbiAgICAgIHJldHVybiAoXG4gICAgICAgIGFjYyArXG4gICAgICAgIDEgKyAvLyBQSUQgaW5kZXhcbiAgICAgICAgY29tcGFjdEFycmF5U2l6ZShuSW5kZXhlcywgMSkgK1xuICAgICAgICBjb21wYWN0QXJyYXlTaXplKG9wYXF1ZURhdGEsIDEpXG4gICAgICApO1xuICAgIH0sIDApO1xuXG4gICAgcmV0dXJuIChcbiAgICAgIGNvbXBhY3RBcnJheVNpemUoc2lnbmVycy5zaXplLCA2NCkgKyAvLyBzaWduYXR1cmVzXG4gICAgICAzICsgLy8gaGVhZGVyXG4gICAgICBjb21wYWN0QXJyYXlTaXplKGFjY291bnRzLnNpemUsIDMyKSArIC8vIGFjY291bnRzXG4gICAgICAzMiArIC8vIGJsb2NraGFzaFxuICAg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gICAgICAgdHhNZXRhLnRyYW5zYWN0aW9uLm1lc3NhZ2UuaW5zdHJ1Y3Rpb25zLmZvckVhY2goXG4gICAgICAgICAgICAgICAgICAoaW5zdHJ1Y3Rpb24pID0+IHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgIGlzUGFyc2VkSW5zdHJ1Y3Rpb24oaW5zdHJ1Y3Rpb24pICYmXG4gICAgICAgICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5UcmFuc2Zlci5wcm9ncmFtLmluY2x1ZGVzKFxuICAgICAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24ucHJvZ3JhbSxcbiAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIgPSBpbnN0cnVjdGlvbjtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICApO1xuXG4gICAgICAgICAgICAgICAgLy8gc3BsLXRva2VuIG9yIHN5c3RlbVxuICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIgJiZcbiAgICAgICAgICAgICAgICAgIG1vZHVsZU5hbWUgIT09IGluc3RydWN0aW9uVHJhbnNmZXJbJ3Byb2dyYW0nXVxuICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgZGVidWdMb2coXG4gICAgICAgICAgICAgICAgICAgICcjIEZpbHRlclR5cGUuTWVtbyBicmVhayBpbnN0cnVjdGlvbjogJyxcbiAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlcixcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAvLyBmZXRjaCBtZW1vIG9ubHkgdHJhbnNhY3Rpb25cbiAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLk1lbW8uaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyLFxuICAgICAgICAgICAgICAgICAgcG9zdFRva2VuQWNjb3VudCxcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLk9ubHlNZW1vOiB7XG4gICAgICAgICAgICAgIGlmIChGaWx0ZXJPcHRpb25zLk1lbW8ucHJvZ3JhbS5pbmNsdWRlcyhpbnN0cnVjdGlvbi5wcm9ncmFtKSkge1xuICAgICAgICAgICAgICAgIGxldCBpbnN0cnVjdGlvblRyYW5zZmVyO1xuXG4gICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5NZW1vLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlcixcbiAgICAgICAgICAgICAgICAgIHBvc3RUb2tlbkFjY291bnQsXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5NaW50OiB7XG4gICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLk1pbnQucHJvZ3JhbS5pbmNsdWRlcyhpbnN0cnVjdGlvbi5wcm9ncmFtKSAmJlxuICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuTWludC5hY3Rpb24uaW5jbHVkZXMoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbi5wYXJzZWQudHlwZSBhcyBzdHJpbmcsXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLk1pbnQuaW50b1VzZXJTaWRlKGluc3RydWN0aW9uLCB0eE1ldGEpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLlRyYW5zZmVyOlxuICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgbW9kdWxlTmFtZSA9PT0gaW5zdHJ1Y3Rpb24ucHJvZ3JhbSAmJlxuICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuVHJhbnNmZXIuYWN0aW9uLmluY2x1ZGVzKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24ucGFyc2VkLnR5cGUgYXMgc3RyaW5nLFxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgaWYgKGluc3RydWN0aW9uLnBhcnNlZC50eXBlID09PSAndHJhbnNmZXJDaGVja2VkJykge1xuICAgICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5UcmFuc2ZlckNoZWNrZWQuaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgICBwb3N0VG9rZW5BY2NvdW50LFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5UcmFuc2Zlci5pbnRvVXNlclNpZGUoXG4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ydWN0aW9uIiwgIkNvbnZlcnRlciIsICJNZW1vIiwgIk1lbW8iXQp9Cg== \ No newline at end of file diff --git a/packages/suite-memo/package.json b/packages/suite-memo/package.json index 57da99018..967299983 100644 --- a/packages/suite-memo/package.json +++ b/packages/suite-memo/package.json @@ -45,7 +45,6 @@ }, "dependencies": { "@solana/web3.js": "^1.78.5", - "@solana/spl-token": "^0.3.8", "bs58": "^4.0.1", "@metaplex-foundation/mpl-token-metadata": "^2.13.0", "@solana-suite/config": "workspace:^", diff --git a/packages/suite-multisig/dist/index.js b/packages/suite-multisig/dist/index.js index 1343866b3..87cce0952 100644 --- a/packages/suite-multisig/dist/index.js +++ b/packages/suite-multisig/dist/index.js @@ -1585,4 +1585,4 @@ var Multisig4 = { ...Multisig, ...Multisig2, ...Multisig3 }; 0 && (module.exports = { Multisig }); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uL3NyYy9jcmVhdGUudHMiLCAiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9iYXRjaC50cyIsICIuLi8uLi9ub2RlL3NyYy9pbmRleC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jb21tb24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvbWludC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9wYXJ0aWFsLXNpZ24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY2FsY3VsYXRlLXR4c2l6ZS50cyIsICIuLi8uLi9nbG9iYWwvc3JjL2luZGV4LnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2tleXBhaXIudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvcGRhLnRzIiwgIi4uLy4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c3Qgc3dpdGNoQnVuZGxyID0gKGVudjogc3RyaW5nKTogc3RyaW5nID0+IHtcbiAgICBzd2l0Y2ggKGVudikge1xuICAgICAgY2FzZSBDb25zdGFudHMuQ2x1c3Rlci5wcmQ6IHtcbiAgICAgICAgY29uc3QgdXJscyA9IENvbnN0YW50cy5CdW5kbHJVcmwucHJkLnNwbGl0KCcsJyk7XG4gICAgICAgIGNvbnN0IGluZGV4ID0gRGF0ZS5ub3coKSAlIHVybHMubGVuZ3RoO1xuICAgICAgICByZXR1cm4gdXJsc1tpbmRleF07XG4gICAgICB9XG4gICAgICBkZWZhdWx0OiB7XG4gICAgICAgIHJldHVybiBDb25zdGFudHMuQnVuZGxyVXJsLmRldjtcbiAgICAgIH1cbiAgICB9XG4gIH07XG5cbiAgZXhwb3J0IGNvbnN0IHN3aXRjaERhc0FwaSA9IChlbnY6IHN0cmluZyk6IHN0cmluZyA9PiB7XG4gICAgc3dpdGNoIChlbnYpIHtcbiAgICAgIGNhc2UgQ29uc3RhbnRzLkNsdXN0ZXIucHJkOiB7XG4gICAgICAgIGlmIChkYXNBcGlVcmwubGVuZ3RoIDwgMSkge1xuICAgICAgICAgIHRocm93IEVycm9yKENvbnN0YW50cy5XYXJubmluZ01lc3NhZ2UuREFTX0FQSV9VUkwpO1xuICAgICAgICB9XG4gICAgICAgIGNvbnN0IHVybHMgPSBDb25zdGFudHMuQnVuZGxyVXJsLnByZC5zcGxpdCgnLCcpO1xuICAgICAgICBjb25zdCBpbmRleCA9IERhdGUubm93KCkgJSB1cmxzLmxlbmd0aDtcbiAgICAgICAgcmV0dXJuIHVybHNbaW5kZXhdO1xuICAgICAgfVxuICAgICAgZGVmYXVsdDoge1xuICAgICAgICBjb25zdCB1cmxzID0gQ29uc3RhbnRzLkRhc0FwaVVybC5kZXYuc3BsaXQoJywnKTtcbiAgICAgICAgY29uc3QgaW5kZXggPSBEYXRlLm5vdygpICUgdXJscy5sZW5ndGg7XG4gICAgICAgIHJldHVybiB1cmxz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ICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvQ29tcHJlc3NlZE5mdEluZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IEludGVybmFsQ3JlYXRvcnNbXSA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBbXTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBpbnB1dCEubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlciA9IChcbiAgICAgIG91dHB1dDogT3B0aW9uPEludGVybmFsQ3JlYXRvcnNbXT4sXG4gICAgKTogQ3JlYXRvcnNbXSB8IHVuZGVmaW5lZCA9PiB7XG4gICAgICBpZiAoIW91dHB1dCkge1xuICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gb3V0cHV0Lm1hcCgoZGF0YSkgPT4ge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIGFkZHJlc3M6IGRhdGEuYWRkcmVzcy50b1N0cmluZygpLFxuICAgICAgICAgIHNoYXJlOiBkYXRhLnNoYXJlLFxuICAgICAgICAgIHZlcmlmaWVkOiBkYXRhL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ICAgZmVlUGF5ZXI/OiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxQcm9wZXJ0aWVzPiA9PiB7XG4gICAgICBpZiAoIWlucHV0IHx8ICFpbnB1dC5maWxlcykge1xuICAgICAgICByZXR1cm4ge307XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGZpbGVzID0gYXdhaXQgUHJvbWlzZS5hbGwoXG4gICAgICAgIGlucHV0LmZpbGVzLm1hcChhc3luYyAoZmlsZSkgPT4ge1xuICAgICAgICAgIGlmICghZmlsZS5maWxlUGF0aCkge1xuICAgICAgICAgICAgcmV0dXJuIHt9O1xuICAgICAgICAgIH1cbiAgICAgICAgICBjb25zdCByZXMgPSBhd2FpdCBjYWxsYmFja0Z1bmMoZmlsZS5maWxlUGF0aCwgc3RvcmFnZVR5cGUsIGZlZVBheWVyKTtcbiAgICAgICAgICBpZiAocmVzLmlzRXJyKSB7XG4gICAgICAgICAgICB0aHJvdyBFcnJvcihyZXMuZXJyb3IubWVzc2FnZSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBvdmVyd3JpdGVPYmplY3QoZmlsZSwgW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBleGlzdHNLZXk6ICdmaWxlUGF0aCcsXG4gICAgICAgICAgICAgIHdpbGw6IHsga2V5OiAndXJpJywgdmFsdWU6IHJlcy52YWx1ZSB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICBdKTtcbiAgICAgICAgfSksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHsgLi4uaW5wdXQsIGZpbGVzIH0gYXMgUHJvcGVydGllcztcbiAgICB9O1xuICB9XG59XG4iLCAiLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLXVudXNlZC12YXJzICovXG5pbXBvcnQgeyBPcHRpb24sIFVzZXMgfSBmcm9tICd+L3R5cGVzL3JlZ3VsYXItbmZ0JztcblxuZXhwb3J0IG5hbWVzcGFjZSBDb252ZXJ0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wgcm95YWx0eSwge1xuICAgICAgICAgIHRocmVzaG9sZDogUk9ZQUxUWV9NSU4sXG4gICAgICAgICAgY29uZGl0aW9uOiAndW5kZXJNaW4nLFxuICAgICAgICB9KTtcbiAgICAgIH0gZWxzZSBpZiAocm95YWx0eSA+IFJPWUFMVFlfTUFYKSB7XG4gICAgICAgIHRocm93IGNyZWF0ZUVycm9yKGtleSwgTWVzc2FnZS5CSUdfTlVNQkVSLCByb3lhbHR5LCB7XG4gICAgICAgICAgdGhyZXNob2xkOiBST1lBTFRZX01BWCxcbiAgICAgICAgICBjb25kaXRpb246ICdvdmVyTWF4JyxcbiAgICAgICAgfSk7XG4gICAgICB9XG4gICAgICByZXR1cm4gTWVzc2FnZS5TVUNDRVNTO1xuICAgIH0pO1xuICB9O1xuXG4gIGV4cG9ydCBjb25zdCBpc1NlbGxlckZlZUJhc2lzUG9pbnRzID0gKFxuICAgIHJveWFsdHk6IG51bWJlcixcbiAgKTogUmVzdWx0PHN0cmluZywgVmFsaWRhdG9yRXJyb3I+ID0+IHtcbiAgICByZXR1cm4gVHJ5KCgpID0+IHtcbiAgICAgIGNvbnN0IGtleSA9ICdzZWxsZXJGZWVCYXNpc1BvaW50cy9zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyc7XG4gICAgICBpZiAocm95YWx0eSAhPT0gMCAmJiAhcm95YWx0eSkge1xuICAgICAgICB0aHJvdyBjcmVhdGVFcnJvcihrZXksIE1lc3NhZ2UuRU1QVFksIHJveWFsdHkpO1xuICAgICAgfVxuICAgICAgaWYgKHJveWFsdHkgPCBST1lBTFRZX01JTikge1xuICAgICAgICB0aHJvdyBjcmVhdGVFcnJvcihrZXksIE1lc3NhZ2UuU01BTExfTlVNQkVSLCByb3lhbHR5LCB7XG4gICAgICAgICAgdGhyZXNob2xkOiBST1lBTFRZX01JTixcbiAgICAgICAgICBjb25kaXRpb246ICd1bmRlck1pbicsXG4gICAgICAgIH0pO1xuICAgICAgfSBlbHNlIGlmIChyb3lhb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hbGlkYXRvckVycm9yPjtcbiAgICAgICAgc3dpdGNoIChrZXkpIHtcbiAgICAgICAgICBjYXNlICdpbWFnZSc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLmltYWdlKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzSW1hZ2VVcmwobWV0YWRhdGEuaW1hZ2UpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAncm95YWx0eSc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnJveWFsdHkpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNSb3lhbHR5KG1ldGFkYXRhLnJveWFsdHkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICA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AgKTogbnVtYmVyID0+IHtcbiAgICBjb25zdCBmZWVQYXllclBrID0gW2ZlZVBheWVyLnRvQmFzZTU4KCldO1xuXG4gICAgY29uc3Qgc2lnbmVycyA9IG5ldyBTZXQ8c3RyaW5nPihmZWVQYXllclBrKTtcbiAgICBjb25zdCBhY2NvdW50cyA9IG5ldyBTZXQ8c3RyaW5nPihmZWVQYXllclBrKTtcblxuICAgIGNvbnN0IGl4c1NpemUgPSB0cmFuc2FjdGlvbi5pbnN0cnVjdGlvbnMucmVkdWNlKChhY2MsIGl4KSA9PiB7XG4gICAgICBpeC5rZXlzLmZvckVhY2goKHsgcHVia2V5LCBpc1NpZ25lciB9KSA9PiB7XG4gICAgICAgIGNvbnN0IHBrID0gcHVia2V5LnRvQmFzZTU4KCk7XG4gICAgICAgIGlmIChpc1NpZ25lcikgc2lnbmVycy5hZGQocGspO1xuICAgICAgICBhY2NvdW50cy5hZGQocGspO1xuICAgICAgfSk7XG5cbiAgICAgIGFjY291bnRzLmFkZChpeC5wcm9ncmFtSWQudG9CYXNlNTgoKSk7XG5cbiAgICAgIGNvbnN0IG5JbmRleGVzID0gaXgua2V5cy5sZW5ndGg7XG4gICAgICBjb25zdCBvcGFxdWVEYXRhID0gaXguZGF0YS5sZW5ndGg7XG5cbiAgICAgIHJldHVybiAoXG4gICAgICAgIGFjYyArXG4gICAgICAgIDEgKyAvLyBQSUQgaW5kZXhcbiAgICAgICAgY29tcGFjdEFycmF5U2l6ZShuSW5kZXhlcywgMSkgK1xuICAgICAgICBjb21wYWN0QXJyYXlTaXplKG9wYXF1ZURhdGEsIDEpXG4gICAgICApO1xuICAgIH0sIDApO1xuXG4gICAgcmV0dXJuIChcbiAgICAgIGNvbXBhY3RBcnJheVNpemUoc2lnbmVycy5zaXplLCA2NCkgKyAvLyBzaWduYXR1cmVzXG4gICAgICAzICsgLy8gaGVhZGVyXG4gICAgICBjb21wYWN0QXJyYXlTaXplKGFjY291bnRzLnNpemUsIDMyKSArIC8vIGFjY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YWdlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3JveWFsdHknOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5yb3lhbHR5KSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzUm95YWx0eShtZXRhZGF0YS5yb3lhbHR5KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlcl9mZWVfYmFzaXNfcG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJGZWVCYXNpc1BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0YWRhdGEubmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzeW1ib2wnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLnN5bWJvbCkge1xuICAgICAgICAgICAgICByZXMgPSBpc1N5bWJvbChtZXRh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cG9ydF93ZWIzIiwgIk11bHRpc2lnIiwgIk11bHRpc2lnIiwgIk11bHRpc2lnIl0KfQo= \ No newline at end of file diff --git a/packages/suite-multisig/dist/index.mjs b/packages/suite-multisig/dist/index.mjs index 0fdc0a4d0..a534f28d3 100644 --- a/packages/suite-multisig/dist/index.mjs +++ b/packages/suite-multisig/dist/index.mjs @@ -1567,4 +1567,4 @@ var Multisig4 = { ...Multisig, ...Multisig2, ...Multisig3 }; export { Multisig4 as Multisig }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2NyZWF0ZS50cyIsICIuLi8uLi9zdWl0ZS11dGlscy9zcmMvY29uc3RhbnRzLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2JhdGNoLnRzIiwgIi4uLy4uL25vZGUvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2NvbW1vbi50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9taW50LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL3BhcnRpYWwtc2lnbi50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jYWxjdWxhdGUtdHhzaXplLnRzIiwgIi4uLy4uL2dsb2JhbC9zcmMvaW5kZXgudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMva2V5cGFpci50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9wZGEudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvaW5kZXgudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvaW5kZXgudHMiLCAiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL3NoYXJlZC50cyIsICIuLi8uLi9zdWl0ZS11dGlscy9zcmMvcmVzdWx0LnRzIiwgIi4uLy4uL2NvbnZlc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ICAgICAgICAgIGNhc2UgJ3NlbGxlcl9mZWVfYmFzaXNfcG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJGZWVCYXNpc1BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0YWRhdGEubmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzeW1ib2wnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLnN5bWJvbCkge1xuICAgICAgICAgICAgICByZXMgPSBpc1N5bWJvbChtZXRhZGF0YS5zeW1ib2wpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHJlcyAmJiByZXMuaXNFcnIpIHtcbiAgICAgICAgICByZXN1bHRzLnB1c2goLi4ucmVzLmVycm9yLmRldGFpbHMpO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIGlmIChyZXN1bHRzLmxlbmd0aCA+IDApIHtcbiAgICAgICAgY29uc3QgbWVz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ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ25hbWUnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLm5hbWUpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNOYW1lKG1ldGFkYXRhLm5hbWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc3ltYm9sJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5zeW1ib2wpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTeW1ib2wobWV0YWRhdGEuc3ltYm9sKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgICAgIGlmIChyZXMgJiYgcmVzLmlzRXJyKSB7XG4gICAgICAgICAgcmVzdWx0cy5wdXNoKC4uLnJlcy5lcnJvci5kZXRhaWxzKTtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgICBpZiAocmVzdWx0cy5sZW5ndGggPiAwKSB7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPVxuICAgICAgICAgICdDYXVnaHQgaW4gdGhlIHZhbGlkYXRpb24gZXJyb3JzLiBzZWUgaW5mb3JtYXRpb24gZS5nOiBlcnI8VmFsaWRhdG9yRXJyb3I+LmRldGFpbHMnO1xuICAgICAgICB0aHJvdyBuZXcgVmFsaWRhdG9yRXJyb3IobW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VydGVyIiwgIlRyYW5zZmVyQ2hlY2tlZCIsICJDb252ZXJ0ZXIiLCAiVHJhbnNmZXIiLCAiQ29udmVydGVyIiwgIlZhbGlkYXRvciIsICJNZXNzYWdlIiwgIkNvbnZlcnRlciIsICJNdWx0aXNpZyIsICJLZXlwYWlyIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJNdWx0aXNpZ0luc3RydWN0aW9uIiwgIlRyYW5zYWN0aW9uSW5zdHJ1Y3Rpb24iLCAiVE9LRU5fUFJPR1JBTV9JRCIsICJQdWJsaWNLZXkiLCAiTXVsdGlzaWciLCAiVE9LRU5fUFJPR1JBTV9JRCIsICJQdWJsaWNLZXkiLCAiTXVsdGlzaWciLCAiTXVsdGlzaWciXQp9Cg== \ No newline at end of file diff --git a/packages/suite-phantom/dist/index.d.mts b/packages/suite-phantom/dist/index.d.mts index f55a6130d..c936d685e 100644 --- a/packages/suite-phantom/dist/index.d.mts +++ b/packages/suite-phantom/dist/index.d.mts @@ -1,4 +1,4 @@ -import { TransactionSignature, PublicKey, Transaction, Keypair } from '@solana/web3.js'; +import { TransactionSignature, PublicKey, Keypair, Transaction } from '@solana/web3.js'; import BN from 'bn.js'; declare const pubKeyNominality: unique symbol; @@ -219,6 +219,35 @@ type Result = Result.Ok | Result.Err; type OkType> = R extends Result ? O : never; type ErrType> = R extends Result ? E : never; +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; +}; + type Condition = 'overMax' | 'underMin'; interface Limit { threshold: number; @@ -308,35 +337,6 @@ declare class ValidatorError extends Error { constructor(message: string, details: Details[]); } -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; -}; - /** @namespace */ declare const RegularNft: { mint: (input: InputNftMetadata, cluster: string, phantom: PhantomProvider) => Promise>; diff --git a/packages/suite-phantom/dist/index.mjs b/packages/suite-phantom/dist/index.mjs index a61c61115..1e0bce9b7 100644 --- a/packages/suite-phantom/dist/index.mjs +++ b/packages/suite-phantom/dist/index.mjs @@ -3064,4 +3064,4 @@ export { PhantomSplToken3 as PhantomSplToken, RegularNft11 as RegularNft }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL3JlZ3VsYXItbmZ0L21pbnQudHMiLCAiLi4vLi4vc3VpdGUtc3BsLXRva2VuL3NyYy9hZGQudHMiLCAiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9iYXRjaC50cyIsICIuLi8uLi9ub2RlL3NyYy9pbmRleC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jb21tb24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvbWludC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9wYXJ0aWFsLXNpZ24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY2FsY3VsYXRlLXR4c2l6ZS50cyIsICIuLi8uLi9nbG9iYWwvc3JjL2luZGV4Ln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4gICAgICBjb25zdCBjb25uZWN0aW9uID0gTm9kZS5nZXRDb25uZWN0aW9uKCk7XG4gICAgICBjb25zdCBtaW50ID0gQWNjb3VudC5LZXlwYWlyLmNyZWF0ZSgpO1xuICAgICAgY29uc3QgaXNNdXRhYmxlID0gdHJ1ZTtcblxuICAgICAgZGVidWdMb2coJyMgcHJvcGVydGllczogJywgcHJvcGVydGllcyk7XG4gICAgICBkZWJ1Z0xvZygnIyBzZWxsZXJGZWVCYXNpc1BvaW50czogJywgc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgZGVidWdMb2coJyMgbWludDogJywgbWludC5wdWJrZXkpO1xuXG4gICAgICBjb25zdCB0eCA9IG5ldyBUcmFuc2FjdGlvbigpO1xuXG4gICAgICBjb25zdCBpbnN0cyA9IGF3YWl0IFJlZ3VsYXJOZnQuY3JlYXRlTWludChcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBwaGFudG9tLnB1YmxpY0tleSEsXG4gICAgICAgIGRhdGF2MixcbiAgICAgICAgcGhhbnRvbS5wdWJsaWNLZXkhLFxuICAgICAgICBpc011dGFibGUsXG4gICAgICApO1xuXG4gICAgICBpbnN0cy5mb3JFYWNoKChpbnN0OiBUcmFuc2FjdGlvbkluc3RydWN0aW9uKSA9PiB7XG4gICAgICAgIHR4LmFkZChpbnN0KTtcbiAgICAgIH0pO1xuICAgICAgdHguZmVlUGF5ZXIgPSBwaGFudG9tLnB1YmxpY0tleSE7XG4gICAgICBjb25zdCBibG9ja2hhc2hPYmogPSBhd2FpdCBjb25uZWN0aW9uLmdldExhdGVzdEJsb2NraGFzaEFuZENvbnRleHQoKTtcbiAgICAgIHR4LnJlY2VudEJsb2NraGFzaCA9IGJsb2NraGFzaE9iai52YWx1ZS5ibG9ja2hhc2g7XG4gICAgICB0eC5wYXJ0aWFsU2lnbihtaW50LnRvS2V5cGFpcigpKTtcbiAgICAgIGNvbnN0IHNpZ25lZCA9IGF3YWl0IHBoYW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Q6IFByb3BlcnRpZXMgfCB1bmRlZmluZWQsXG4gICAgICBjYWxsYmFja0Z1bmM6IChcbiAgICAgICAgZmlsZVBhdGg6IEZpbGVUeXBlLFxuICAgICAgICBzdG9yYWdlVHlwZTogU3RvcmFnZVR5cGUsXG4gICAgICAgIGZlZVBheWVyPzogU2VjcmV0LFxuICAgICAgKSA9PiBQcm9taXNlPFJlc3VsdDxzdHJpbmcsIEVycm9yPj4sXG4gICAgICBzdG9yYWdlVHlwZTogU3RvcmFnZVR5cGUsXG4gICAgICBmZWVQYXllcj86IFNlY3JldCxcbiAgICApOiBQcm9taXNlPFByb3BlcnRpZXM+ID0+IHtcbiAgICAgIGlmICghaW5wdXQgfHwgIWlucHV0LmZpbGVzKSB7XG4gICAgICAgIHJldHVybiB7fTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgZmlsZXMgPSBhd2FpdCBQcm9taXNlLmFsbChcbiAgICAgICAgaW5wdXQuZmlsZXMubWFwKGFzeW5jIChmaWxlKSA9PiB7XG4gICAgICAgICAgaWYgKCFmaWxlLmZpbGVQYXRoKSB7XG4gICAgICAgICAgICByZXR1cm4ge307XG4gICAgICAgICAgfVxuICAgICAgICAgIGNvbnN0IHJlcyA9IGF3YWl0IGNhbGxiYWNrRnVuYyhmaWxlLmZpbGVQYXRoLCBzdG9yYWdlVHlwZSwgZmVlUGF5ZXIpO1xuICAgICAgICAgIGlmIChyZXMuaXNFcnIpIHtcbiAgICAgICAgICAgIHRocm93IEVycm9yKHJlcy5lcnJvci5tZXNzYWdlKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgcmV0dXJuIG92ZXJ3cml0ZU9iamVjdChmaWxlLCBbXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGV4aXN0c0tleTogJ2ZpbGVQYXRoJyxcbiAgICAgICAgICAgICAgd2lsbDogeyBrZXk6ICd1cmknLCB2YWx1ZTogcmVzLnZhbHVlIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgIF0pO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G1ldGFkYXRhOiBULFxuICApOiBSZXN1bHQ8c3RyaW5nLCBWYWxpZGF0b3JFcnJvcj4gPT4ge1xuICAgIHJldHVybiBUcnkoKCkgPT4ge1xuICAgICAgY29uc3Qga2V5cyA9IE9iamVjdC5rZXlzKG1ldGFkYXRhKTtcbiAgICAgIGNvbnN0IHJlc3VsdHM6IERldGFpbHNbXSA9IFtdO1xuICAgICAga2V5cy5tYXAoKGtleSkgPT4ge1xuICAgICAgICBsZXQgcmVzITogUmVzdWx0PHN0cmluZywgVmFsaWRhdG9yRXJyb3I+O1xuICAgICAgICBzd2l0Y2ggKGtleSkge1xuICAgICAgICAgIGNhc2UgJ2ltYWdlJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuaW1hZ2UpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNJbWFnZVVybChtZXRhZGF0YS5pbWFnZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdyb3lhbHR5JzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEucm95YWx0eSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1JveWFsdHkobWV0YWRhdGEucm95YWx0eSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQ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mby5taW50IGFzIFB1YmtleTtcbiAgICAgICAgY29uc3QgdG9rZW5BbW91bnQgPSBkLmFjY291bnQuZGF0YS5wYXJzZWQuaW5mby50b2tlbkFtb3VudFxuICAgICAgICAgIC5hbW91bnQgYXMgc3RyaW5nO1xuICAgICAgICBpZiAodG9rZW5BbW91bnQgPT09ICcxJykge1xuICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gTWV0YWRhdGEuZnJvbUFjY291bnRBZGRyZXNzKFxuICAgICAgICAgIGNvbm5lY3Rpb24sXG4gICAgICAgICAgQWNjb3VudC5QZGEuZ2V0TWV0YWRhdGEobWludCksXG4gICAgICAgIClcbiAgICAgICAgICAudGhlbihhc3luYyAobWV0YWRhdGEpID0+IHtcbiAgICAgICAgICAgIC8qIGVzbGludC1kaXNhYmxlIEB0eXBlc2NyaXB0LWVzbGludC9uby1leHBsaWNpdC1hbnkgKi9cbiAgICAgICAgICAgIHJldHVybiBmZXRjaFJldHJ5KG1ldGFkYXRhLmRhdGEudXJpKS50aGVuKChqc29uOiBhbnkpID0+IHtcbiAgICAgICAgICAgICAgcmV0dXJuIGNvbnZlcnRlcihtZXRhZGF0YSwganNvbiwgdG9rZW5BbW91bnQpO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfSlcbiAgICAgICAgICAuY2F0Y2goKGVycikgPT4gZGVidWdMb2coJyMgW0ZldGNoIGVycm9yXScsIGVycikpO1xuICAgICAgfSk7XG5cbiAgICAgIGNvbnN0IGZpbHRlcnMgPSAoYXdhaXQgUHJvbWlzZS5hbGwoZGF0YXMpKS5maWx0ZXIoXG4gICAgICAgIChkYXRhKSA9PiBkYXRhICE9PSB1bmRlZmluZWQsXG4gICAgICApO1xuICAgICAgcmV0dXJuIGZpbHRlcnMgYXMgVG9rZW5NZXRhZGF0YVtdO1xuICAgIH0pO1xuICB9O1xuXG4gIC8qKlxuICAgKiBGZXRjaCBtaW50ZWQgbWV0YWRhdGEgYnkgbWlud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21QdWJrZXk6IGZlZVBheWVyLFxuICAgICAgICBuZXdBY2NvdW50UHVia2V5OiBtaW50LFxuICAgICAgICBzcGFjZTogTUlOVF9TSVpFLFxuICAgICAgICBsYW1wb3J0czogbGFtcG9ydHMsXG4gICAgICAgIHByb2dyYW1JZDogVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgIH0pLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUluaXRpYWxpemVNaW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgIG1pbnQsXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICBvd25lcixcbiAgICAgICAgb3duZXIsXG4gICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgZmVlUGF5ZXIsXG4gICAgICAgIHRva2VuQXNzb2NpYXRlZCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIG1pbnQsXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZU1pbnRUb0NoZWNrZWRJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgdG9rZW5Bc3NvY2lhdGVkLFxuICAgICAgICBvd25lcixcbiAgICAgICAgQ2FsY3VsYXRlLmNhbGN1bGF0ZUFtb3VudCh0b3RhbEFtb3VudCwgbWludERlY2ltYWwpLFxuICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlQ3JlYXRlTWV0YWRhdGFBY2NvdW50VjNJbnN0cnVjdGlvbihcbiAgICAgICAge1xuICAgICAgICAgIG1ldGFkYXRhOiBtZXRhZGF0YVBkYSxcbiAgICAgICAgICBtaW50LFxuICAgICAgICAgIG1pbnRBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICAgIHBheWVyOiBmZWVQYXllcixcbiAgICAgICAgICB1cGRhdGVBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICB9LFxuICAgICAgICB7XG4gICAgICAgICAgY3JlYXRlTWV0YWRhdGFBY2NvdW50QXJnc1YzOiB7XG4gICAgICAgICAgICBkYXRhOiB0b2tlbk1ldGFkYXRhLFxuICAgICAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgICAgICAgY29sbGVjdGlvbkRldGFpbHM6IG51bGwsXG4gICAgICAgICAgfSxcbiAgICAgICAgfSxcbiAgICAgICksXG4gICAgKTtcbiAgICByZXR1cm4gaW5zdHJ1Y3Rpb25zO1xuICB9O1xuXG4gIC8qKlxuICAgKiBTUEwtVE9LRU4gbWludFxuICAgKlxuICAgKiBAcGFyYW0ge1NlY3JldH0gb3duZXIgICAgICAvLyB0b2tlbiBvd25lciBTZWNyZXRcbiAgICogQHBhcmFtIHtudW1iZXJ9IHRvdGFsQW1vdW50IC8vIHRvdGFsIG51bWJlclxuICAgKiBAcGFyYW0ge251bWJlcn0gbWludERlY2ltYWwgLy8gdG9rZW4gZGVjaW1hbFxuICAgKiBAcGFyYW0ge0lucHV0VG9rZW5NZXRhZGF0YX0gaW5wdXQgICAgICAgLy8gdG9rZW4gbWV0YWRhdGFcbiAgICogQHBhcmFtIHtQYXJ0aWFsPE1pbnRPcHRpb25zPn0gb3B0aW9ucyAgIC8vIG9wdGlvbnNcbiAgICogQHJldHVybiBQcm9taXNlPFJlc3VsdDxNaW50SW5zdHJ1Y3Rpb24sIEVycm9yPj5cbiAgICovXG4gIGV4cG9ydCBjb25zdCBtaW50ID0gYXN5bmMgKFxuICAgIG93bmVyOiBTZWNyZXQsXG4gICAgdG90YWxBbW91bnQ6IG51bWJlcixcbiAgICBtaW50RGVjaW1hbDogbnVtYmVyLFxuICAgIGlucHV0O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iAgICAgICAgc2VsbGVyRmVlQmFzaXNQb2ludHMsXG4gICAgICApO1xuXG4gICAgICBkZWJ1Z0xvZygnIyBkYXRhdjI6ICcsIGRhdGF2Mik7XG4gICAgICBkZWJ1Z0xvZygnIyB1cGxvYWQgY29udGVudCB1cmw6ICcsIHVyaSk7XG5cbiAgICAgIGNvbnN0IG1pbnQgPSBBY2NvdW50LktleXBhaXIuY3JlYXRlKCk7XG4gICAgICBjb25zdCBpbnN0cyA9IGF3YWl0IGNyZWF0ZU1pbnQoXG4gICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgIHRvdGFsQW1vdW50LFxuICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICAgZGF0YXYyLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICk7XG5cbiAgICAgIC8vIGZyZWV6ZUF1dGhvcml0eVxuICAgICAgaWYgKGZyZWV6ZUF1dGhvcml0eSkge1xuICAgICAgICBpbnN0cy5wdXNoKFxuICAgICAgICAgIGNyZWF0ZUZyZWV6ZUF1dGhvcml0eShcbiAgICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICAgICAgZnJlZXplQXV0aG9yaXR5LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuTWludChcbiAgICAgICAgaW5zdHMsXG4gICAgICAgIFtvd25lci50b0tleXBhaXIoKSwgbWludC50b0tleXBhaXIoKV0sXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICBtaW50LnB1YmtleSxcbiAgICAgICk7XG4gICAgfSk7XG4gIH07XG59XG4iLCAiaW1wb3J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eShhc3luYyAoKSA9PiB7XG4gICAgICBjb25zdCBwYXllciA9IG9wdGlvbnMuZmVlUGF5ZXIgPyBvcHRpb25zLmZlZVBheWVyIDogb3duZXJPck11bHRpc2lnWzBdO1xuICAgICAgY29uc3QgcGF5ZXJQdWJrZXkgPSBuZXcgQWNjb3VudC5LZXlwYWlyKHsgc2VjcmV0OiBwYXllciB9KTtcbiAgICAgIGNvbnN0IGtleXBhaXJzID0gb3duZXJPck11bHRpc2lnLm1hcCgocykgPT4gcy50b0tleXBhaXIoKSk7XG4gICAgICBjb25zdCBzb3VyY2VUb2tlbiA9IGF3YWl0IEFjY291bnQuQXNzb2NpYXRlZC5tYWtlT3JDcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgb3duZXIudG9TdHJpbmcoKSxcbiAgICAgICAgcGF5ZXJQdWJrZXkucHVia2V5LFxuICAgICAgKTtcblxuICAgICAgY29uc3QgZGVzdFRva2VuID0gYXdhaXQgQWNjb3VudC5Bc3NvY2lhdGVkLm1ha2VPckNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICBtaW50LFxuICAgICAgICBkZXN0LFxuICAgICAgICBwYXllclB1YmtleS5wdWJrZXksXG4gICAgICApO1xuXG4gICAgICBjb25zdCBpbnN0ID0gY3JlYXRlVHJhbnNmZXJDaGVja2VkSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHNvdXJjZVRva2VuLnRva2VuQWNjb3VudC50b1B1YmxpY0tleSgpLFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIGRlc3RUb2tlbi50b2tlbkFjY291bnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgQ2FsY3VsYXRvci5jYWxjdWxhdGVBbW91bnQoYW1vdW50LCBtaW50RGVjaW1hbCksXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICBrZXlwYWlycyxcbiAgICAgICk7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luOiBvZmZjaGFpbixcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICByZXR1cm4gQ29udmVydGVyLk5mdC5pbnRvVXNlcihtZXJnZWQpO1xuICAgICAgICAgIH0gY2F0Y2ggKGVycikge1xuICAgICAgICAgICAgZGVidWdMb2coJyMgRmFpbGVkIGZldGNoIG9mZmNoYWluIHVybDogJywgaXRlbS5jb250ZW50Lmpzb25fdXJpKTtcbiAgICAgICAgICAgIHJldHVybiBDb252ZXJ0ZXIuTmZ0LmludG9Vc2VyKHtcbiAgICAgICAgICAgICAgb25jaGFpbjogaXRlbSxcbiAgICAgICAgICAgICAgb2ZmY2hhaW46IHt9LFxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfVxuICAgICAgICB9KSxcbiAgICApO1xuICAgIHJldHVybiB7XG4gICAgICBwYWdlOiBhc3NldHMudmFsdWUucGFnZSxcbiAgICAgIHRvdGFsOiBhc3NldHMudmFsdWUudG90YWwsXG4gICAgICBsaW1pdDogYXNzZXRzLnZhbHVlLmxpbWl0LFxuICAgICAgbWV0YWRhdGFzLFxuICAgIH07XG4gIH07XG5cbiAgLyoqXG4gICAqIEZpbmQgbmZ0IGJ5IGNvbGxlY3Rpb24gbWludFxuICAgKlxuICAgKiBAcGFyYW0ge1B1YmtleX0gY29sbGVjdGlvbk1pbnRcbiAgICogQHBhcmFtIHtib29sZWFufSBpc0NvbXByZXNzZWQsXG4gICAqIEBwYXJhbSB7UGFydGlhbDxGaW5kT3B0aW9ucz59IG9wdGlvbnNcbiAgICogQHJldHVybiBQcm9taXNlPFJlc3VsdDxDb21wcmVzc2VkTmZ0TWV0YWRhdGEsIEVycm9yPj5cbiAgICovXG4gIGV4cG9ydCBjb25zdCBmaW5kQnlDb2xsZWN0aW9uID0gYXN5bmMgKFxuICAgIGNvbGxlY3Rpb25NaW50OiBQdWJrZXksXG4gICAgaXNDb21wcmVzc2VkOiBib29sZWFuLFxuICAgIG9wdGlvbnM6IFBhcnRpYWw8RmluZE9wdG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AgICAgY3JlYXRlQ3JlYXRlTWV0YWRhdGFBY2NvdW50VjNJbnN0cnVjdGlvbihcbiAgICAgICAge1xuICAgICAgICAgIG1ldGFkYXRhOiB0b2tlbk1ldGFkYXRhUHVia2V5LFxuICAgICAgICAgIG1pbnQsXG4gICAgICAgICAgbWludEF1dGhvcml0eTogb3duZXIsXG4gICAgICAgICAgcGF5ZXI6IGZlZVBheWVyLFxuICAgICAgICAgIHVwZGF0ZUF1dGhvcml0eTogb3duZXIsXG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICBjcmVhdGVNZXRhZGF0YUFjY291bnRBcmdzVjM6IHtcbiAgICAgICAgICAgIGRhdGE6IG5mdE1ldGFkYXRhLFxuICAgICAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgICAgICAgY29sbGVjdGlvbkRldGFpbHM6IG51bGwsXG4gICAgICAgICAgfSxcbiAgICAgICAgfSxcbiAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlQ3JlYXRlTWFzdGVyRWRpdGlvblYzSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHtcbiAgICAgICAgICBlZGl0aW9uOiBtYXN0ZXJFZGl0aW9uUHVia2V5LFxuICAgICAgICAgIG1pbnQsXG4gICAgICAgICAgdXBkYXRlQXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBtaW50QXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBwYXllcjogZmVlUGF5ZXIsXG4gICAgICAgICAgbWV0YWRhdGE6IHRva2VuTWV0YWRhdGFQdWJrZXksXG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICBjcmVhdGVNYXN0ZXJFZGl0aW9uQXJnczoge1xuICAgICAgICAgICAgbWF4U3VwcGx5OiAwLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICApLFxuICAgICk7XG4gICAgcmV0dXJuIGluc3RydWN0aW9ucztcbiAg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b3cgRXJyb3IoYE11c3Qgc2V0IGZpbGVQYXRoJyBvciAndXJpJ2ApO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBkYXRhdjIgPSBDb252ZXJ0ZXIuUmVndWxhck5mdE1ldGFkYXRhLmludG9JbmZyYShcbiAgICAgICAgaW5wdXQsXG4gICAgICAgIHVyaSxcbiAgICAgICAgc2VsbGVyRmVlQmFzaXNQb2ludHMsXG4gICAgICApO1xuXG4gICAgICBjb25zdCBpc011dGFibGUgPSBpbnB1dC5pc011dGFibGUgPT09IHVuZGVmaW5lZCA/IHRydWUgOiBpbnB1dC5pc011dGFibGU7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGlucHV0OiAnLCBpbnB1dCk7XG4gICAgICBkZWJ1Z0xvZygnIyBkYXRhdjI6ICcsIGRhdGF2Mik7XG5cbiAgICAgIGNvbnN0IG1pbnQgPSBBY2NvdW50LktleXBhaXIuY3JlYXRlKCk7XG5cbiAgICAgIGNvbnN0IGluc3RydWN0aW9ucyA9IGF3YWl0IGNyZWF0ZU1pbnQoXG4gICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgIGRhdGF2MixcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICBpc011dGFibGUsXG4gICAgICApO1xuXG4gICAgICAvLyBmcmVlemVBdXRob3JpdHlcbiAgICAgIGlmIChmcmVlemVBdXRob3JpdHkpIHtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgICAgY3JlYXRlRGVsZWFnYXRlKFxuICAgICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgICAgICBmcmVlemVBdXRob3JpdHkudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICAvLyBjb2xsZWN0aW9uIC0tLVxuICAgICAgaWYgKGlucHV0LmNvbGxlY3Rpb24pIHtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgICAgY3JlYXRlVmVyaWZ5U2l6ZWRDb2xsZWN0aW9uKFxuICAgICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgaW5wdXQuY29sbGVjdGlvbi50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGtleXBhaXJzID0gW293bmVyLnRvS2V5cGFpcigpLCBtaW50LnRvS2V5cGFpcigpXTtcblxuICAgICAgLy8gY3JlYXRvciAtLS1cbiAgICAgIGlmIChpbnB1dC5jcmVhdG9ycykge1xuICAgICAgICBpbnB1dC5jcmVhdG9ycy5mb3JFYWNoKChjcmVhdG9yKSA9PiB7XG4gICAgICAgICAgaWYgKEFjY291bnQuS2V5cGFpci5pc1NlY3JldChjcmVhdG9yLnNlY3JldCkpIHtcbiAgICAgICAgICAgIGNvbnN0IGNyZWF0b3JQdWJrZXkgPSBjcmVhdG9yLmFkZHJlc3MudG9QdWJsaWNLZXkoKTtcbiAgICAgICAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVWZXJpZnlDcmVhdG9yKG1pbnQudG9QdWJsaWNLZXkoKSwgY3JlYXRvclB1YmtleSk7XG4gICAgICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChpbnN0KTtcbiAgICAgICAgICAgIGtleXBhaXJzLnB1c2goY3JlYXRvci5zZWNyZXQudG9LZXlwYWlyKCkpO1xuICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBuZXcgVHJhbnNhY3Rpb25CdWlsZGVyLk1pbnQoXG4gICAgICAgIGluc3RydWN0aW9ucyxcbiAgICAgICAga2V5cGF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AgICAgIGNvbnN0IGlzTXV0YWJsZSA9IGlucHV0LmlzTXV0YWJsZSA9PT0gdW5kZWZpbmVkID8gdHJ1ZSA6IGlucHV0LmlzTXV0YWJsZTtcblxuICAgICAgZGVidWdMb2coJyMgaW5wdXQ6ICcsIGlucHV0KTtcbiAgICAgIGRlYnVnTG9nKCcjIHNlbGxlckZlZUJhc2lzUG9pbnRzOiAnLCBzZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICBkZWJ1Z0xvZygnIyBkYXRhdjI6ICcsIGRhdGF2Mik7XG5cbiAgICAgIGNvbnN0IG1pbnQgPSBBY2NvdW50LktleXBhaXIuY3JlYXRlKCk7XG4gICAgICBjb25zdCBpbnN0cyA9IGF3YWl0IE1pbnQuY3JlYXRlTWludChcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lclB1YmxpY2tleSxcbiAgICAgICAgZGF0YXYyLFxuICAgICAgICBmZWVQYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgICBpc011dGFibGUsXG4gICAgICApO1xuXG4gICAgICAvLyBmcmVlemVBdXRob3JpdHlcbiAgICAgIGlmIChvcHRpb25zLmZyZWV6ZUF1dGhvcml0eSkge1xuICAgICAgICBpbnN0cy5wdXNoKFxuICAgICAgICAgIE1pbnQuY3JlYXRlRGVsZWFnYXRlKFxuICAgICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgb3duZXJQdWJsaWNrZXksXG4gICAgICAgICAgICBvcHRpb25zLmZyZWV6ZUF1dGhvcml0eS50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGJsb2NraGFzaE9iaiA9IGF3YWl0IE5vZGUuZ2V0Q29ubmVjdGlvbigpLmdldExhdGVzdEJsb2NraGFzaCgpO1xuICAgICAgY29uc3QgdHggPSBuZXcgVHJhbnNhY3Rpb24oe1xuICAgICAgICBsYXN0Vm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gIHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgKTtcblxuICAgICAgLy8gZnJlZXplQXV0aG9yaXR5XG4gICAgICBpZiAoZnJlZXplQXV0aG9yaXR5KSB7XG4gICAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICAgIE1pbnQuY3JlYXRlRGVsZWFnYXRlKFxuICAgICAgICAgICAgY29sbGVjdGlvbk1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICAgICAgZnJlZXplQXV0aG9yaXR5LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgY29sbGVjdGlvbnMgPSB7XG4gICAgICAgIGNvbGxlY3Rpb25NZXRhZGF0YTogY29sbGVjdGlvbk1ldGFkYXRhQWNjb3VudCxcbiAgICAgICAgY29sbGVjdGlvbkF1dGhvcml0eTogb3duZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICBjb2xsZWN0aW9uTWludDogY29sbGVjdGlvbk1pbnQudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgfTtcblxuICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgIGNyZWF0ZVNldENvbGxlY3Rpb25TaXplSW5zdHJ1Y3Rpb24oY29sbGVjdGlvbnMsIHtcbiAgICAgICAgICBzZXRDb2xsZWN0aW9uU2l6ZUFyZ3M6IHtcbiAgICAgICAgICAgIHNpemU6IGNvbGxlY3Rpb25TaXplIHx8IERFRkFVTFRfQ09MTEVDVElPTl9TSVpFLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0pLFxuICAgICAgKTtcblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuTWludChcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLFxuICAgICAgICB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ZmNoYWluZGF0YShcbiAgICAgICAgeyAuLi5pbnB1dCwgcHJvcGVydGllcyB9LFxuICAgICAgICBzZWxsZXJGZWVCYXNpc1BvaW50cyxcbiAgICAgICk7XG4gICAgICBjb25zdCB1cGxvYWRlZCA9IGF3YWl0IFN0b3JhZ2UudXBsb2FkKFxuICAgICAgICBuZnRTdG9yYWdlTWV0YWRhdGEsXG4gICAgICAgIGlucHV0LmZpbGVQYXRoLFxuICAgICAgICBpbnB1dC5zdG9yYWdlVHlwZSxcbiAgICAgICk7XG5cbiAgICAgIGlmICh1cGxvYWRlZC5pc0Vycikge1xuICAgICAgICB0aHJvdyB1cGxvYWRlZDtcbiAgICAgIH1cbiAgICAgIGNvbnN0IHVyaSA9IHVwbG9hZGVkLnZhbHVlO1xuXG4gICAgICBjb25zdCBkYXRhdjIgPSBDb252ZXJ0ZXIuUmVndWxhck5mdE1ldGFkYXRhLmludG9JbmZyYShcbiAgICAgICAgaW5wdXQsXG4gICAgICAgIHVyaSxcbiAgICAgICAgc2VsbGVyRmVlQmFzaXNQb2ludHMsXG4gICAgICApO1xuXG4gICAgICBjb25zdCBjb25uZWN0aW9uID0gTm9kZS5nZXRDb25uZWN0aW9uKCk7XG4gICAgICBjb25zdCBtaW50ID0gQWNjb3VudC5LZXlwYWlyLmNyZWF0ZSgpO1xuICAgICAgY29uc3QgaXNNdXRhYmxlID0gdHJ1ZTtcblxuICAgICAgZGVidWdMb2coJyMgcHJvcGVydGllczogJywgcHJvcGVydGllcyk7XG4gICAgICBkZWJ1Z0xvZygnIyBzZWxsZXJGZWVCYXNpc1BvaW50czogJywgc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgZGVidWdMb2coJyMgbWludDogJywgbWludC5wdWJrZXkpO1xuXG4gICAgICBjb25zdCB0eCA9IG5ldyBUcmFuc2FjdGlvbigpO1xuXG4gICAgICBjb25zdCBpbnN0cyA9IGF3YWl0IFJlZ3VsYXJOZnQuY3JlYXRlTWludChcbiAgICAgICA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i5Db21tb25bXSB8IE1pbnQuTWludFtdLFxuICAgICk6IFByb21pc2U8UmVzdWx0PFRyYW5zYWN0aW9uU2lnbmF0dXJlLCBFcnJvcj4+ID0+IHtcbiAgICAgIHJldHVybiBUcnkoYXN5bmMgKCkgPT4ge1xuICAgICAgICBsZXQgaSA9IDA7XG4gICAgICAgIGZvciAoY29uc3QgYSBvZiBhcnIpIHtcbiAgICAgICAgICBpZiAoIWEuaW5zdHJ1Y3Rpb25zICYmICFhLnNpZ25lcnMpIHtcbiAgICAgICAgICAgIHRocm93IEVycm9yKFxuICAgICAgICAgICAgICBgb25seSBJbnN0cnVjdGlvbiBvYmplY3QgdGhhdCBjYW4gdXNlIGJhdGNoU3VibWl0KCkuXG4gICAgICAgICAgICBJbmRleDogJHtpfSwgU2V0IHZhbHVlOiAke0pTT04uc3RyaW5naWZ5KGEpfWAsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICBpKys7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBpbnN0cnVjdGlvbnMgPSBhcnIuZmxhdE1hcCgoYSkgPT4gYS5pbnN0cnVjdGlvbnMpO1xuICAgICAgICBjb25zdCBzaWduZXJzID0gYXJyLmZsYXRNYXAoKGEpID0+IGEuc2lnbmVycyk7XG4gICAgICAgIGNvbnN0IGZlZVBheWVycyA9IGFyci5maWx0ZXIoKGEpID0+IGEuZmVlUGF5ZXIgIT09IHVuZGVmaW5lZCk7XG4gICAgICAgIGxldCBmZWVQYXllciA9IHNpZ25lcnNbMF07XG4gICAgICAgIGlmIChmZWVQYXllcnMubGVuZ3RoID4gMCAmJiBmZWVQYXllcnNbMF0uZmVlUGF5ZXIpIHtcbiAgICAgICAgICBmZWVQYXllciA9IGZlZVBheWVyc1swXS5mZWVQYXllcjtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHRyYW5zYWN0aW9uID0gbmV3IFRyYW5zYWN0aW9uKCk7XG4gICAgICAgIGxldCBmaW5hbFNpZ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gICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHRoaXMuc2lnbmVycztcblxuICAgICAgICBpZiAodGhpcy5mZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gdGhpcy5mZWVQYXllci5wdWJsaWNLZXk7XG4gICAgICAgICAgZmluYWxTaWduZXJzID0gW3RoaXMuZmVlUGF5ZXIsIC4uLnRoaXMuc2lnbmVyc107XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLmluc3RydWN0aW9ucy5mb3JFYWNoKChpbnN0KSA9PiB0cmFuc2FjdGlvbi5hZGQoaW5zdCkpO1xuXG4gICAgICAgIGNvbnN0IG9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IE1BWF9SRVRSSUVTLFxuICAgICAgICB9O1xuXG4gICAgICAgIGlmIChOb2RlLmdldENvbm5lY3Rpb24oKS5ycGNFbmRwb2ludCA9PT0gQ29uc3RhbnRzLkVuZFBvaW50VXJsLnByZCkge1xuICAgICAgICAgIGRlYnVnTG9nKCcjIENoYW5nZSBtZXRhcGxleCBjbHVzdGVyIG9uIG1haW5uZXQtYmV0YScpO1xuICAgICAgICAgIE5vZGUuY2hhbmdlQ29ubmVjdGlvbih7IGNsdXN0ZXI6IENvbnN0YW50cy5DbHVzdGVyLnByZE1ldGFwbGV4IH0pO1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgIG9wdGlvbnMsXG4gICAgICAgICk7XG4gICAgICB9KTtcbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHtcbiAgQ29uZmlybU9wdGlvbnMsXG4gIFRyYW5zYWN0aW9uLFxuICB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6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvQ29tcHJlc3NlZE5mdEluZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IEludGVybmFsQ3JlYXRvcnNbXSA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBbXTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBpbnB1dCEubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlciA9IChcbiAgICAgIG91dHB1dDogT3B0aW9uPEludGVybmFsQ3JlYXRvcnNbXT4sXG4gICAgKTogQ3JlYXRvcnNbXSB8IHVuZGVmaW5lZCA9PiB7XG4gICAgICBpZiAoIW91dHB1dCkge1xuICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gb3V0cHV0Lm1hcCgoZGF0YSkgPT4ge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIGFkZHJlc3M6IGRhdGEuYWRkcmVzcy50b1N0cmluZygpLFxuICAgICAgICAgIHNoYXJlOiBkYXRhLnNoYXJlLFxuICAgICAgICAgIHZlcmlmaWVkOiBkYXRhLnZlcmlmaWVkLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IENvbnZlcnRlciBhcyBDb2xsZWN0aW9uIH0gZnJvbSAnLi9jb2xsZWN0aW9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4ge307XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGZpbGVzID0gYXdhaXQgUHJvbWlzZS5hbGwoXG4gICAgICAgIGlucHV0LmZpbGVzLm1hcChhc3luYyAoZmlsZSkgPT4ge1xuICAgICAgICAgIGlmICghZmlsZS5maWxlUGF0aCkge1xuICAgICAgICAgICAgcmV0dXJuIHt9O1xuICAgICAgICAgIH1cbiAgICAgICAgICBjb25zdCByZXMgPSBhd2FpdCBjYWxsYmFja0Z1bmMoZmlsZS5maWxlUGF0aCwgc3RvcmFnZVR5cGUsIGZlZVBheWVyKTtcbiAgICAgICAgICBpZiAocmVzLmlzRXJyKSB7XG4gICAgICAgICAgICB0aHJvdyBFcnJvcihyZXMuZXJyb3IubWVzc2FnZSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBvdmVyd3JpdGVPYmplY3QoZmlsZSwgW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBleGlzdHNLZXk6ICdmaWxlUGF0aCcsXG4gICAgICAgICAgICAgIHdpbGw6IHsga2V5OiAndXJpJywgdmFsdWU6IHJlcy52YWx1ZSB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICBdKTtcbiAgICAgICAgfSksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHsgLi4uaW5wdXQsIGZpbGVzIH0gYXMgUHJvcGVydGllcztcbiAgICB9O1xuICB9XG59XG4iLCAiLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLXVudXNlZC12YXJzICovXG5pbXBvcnQgeyBPcHRpb24sIFVzZXMgfSBmcm9tICd+L3R5cGVzL3JlZ3VsYXItbmZ0JztcblxuZXhwb3J0IG5hbWVzcGFjZSBDb252ZXJ0ZXIge1xuICBleHBvcnQgbmFtZXNwYWNlIFVzZXMge1xuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlclNpZGUgPSAob3V0cHV0OiBPcHRpb248VXNlcz4pOiBVc2VzIHwgdW5kZWZpbmVkID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mltYWdlKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzSW1hZ2VVcmwobWV0YWRhdGEuaW1hZ2UpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAncm95YWx0eSc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnJveWFsdHkpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNSb3lhbHR5KG1ldGFkYXRhLnJveWFsdHkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAg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DxUb2tlbk1ldGFkYXRhW118IEVycm9yPj59XG4gICAqL1xuICBleHBvcnQgY29uc3QgZmluZEJ5T3duZXIgPSBhc3luYyAoXG4gICAgb3duZXI6IFB1YmtleSxcbiAgKTogUHJvbWlzZTxSZXN1bHQ8VG9rZW5NZXRhZGF0YVtdLCBFcnJvcj4+ID0+IHtcbiAgICByZXR1cm4gVHJ5KGFzeW5jICgpID0+IHtcbiAgICAgIGNvbnN0IGNvbm5lY3Rpb24gPSBOb2RlLmdldENvbm5lY3Rpb24oKTtcbiAgICAgIGNvbnN0IGluZm8gPSBhd2FpdCBjb25uZWN0aW9uLmdldFBhcnNlZFRva2VuQWNjb3VudHNCeU93bmVyKFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICB7XG4gICAgICAgICAgcHJvZ3JhbUlkOiBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICB9LFxuICAgICAgKTtcblxuICAgICAgY29uc3QgZGF0YXMgPSBpbmZvLnZhbHVlLm1hcChhc3luYyAoZCkgPT4ge1xuICAgICAgICBjb25zdCBtaW50ID0gZC5hY2NvdW50LmRhdGEucGFyc2VkLmluZm8ubWludCBhcyBQdWJrZXk7XG4gICAgICAgIGNvbnN0IHRva2VuQW1vdW50ID0gZC5hY2NvdW50LmRhdGEucGFyc2VkLmluZm8udG9rZW5BbW91bnRcbiAgICAgICAgICAuYW1vdW50IGFzIHN0cmluZztcbiAgICAgICAgaWYgKHRva2VuQW1vdW50ID09PSAnMScpIHtcbiAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIE1ldGFkYXRhLmZyb21BY2NvdW50QWRkcmVzcyhcbiAgICAgICAgICBjb25uZWN0aW9uLFxuICAgICAgICAgIEFjY291bnQuUGRhLmdldE1ldGFkYXRhKG1pbnQpLFxuICAgICAgICApXG4gICAgICAgICAgLnRoZW4oYXN5bmMgKG1ldGFkYXRhKSA9PiB7XG4gICAgICAgICAgICAvKiBlc2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2lnblN0cnVjdHVyZSwgRXJyb3I+PiA9PiB7XG4gICAgcmV0dXJuIFRyeShhc3luYyAoKSA9PiB7XG4gICAgICBjb25zdCBvd25lclB1YmxpY0tleSA9IG93bmVyLnRvS2V5cGFpcigpLnB1YmxpY0tleTtcbiAgICAgIGNvbnN0IHNvdXJjZVRva2VuID0gYXdhaXQgQWNjb3VudC5Bc3NvY2lhdGVkLm1ha2VPckNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICBtaW50LFxuICAgICAgICBvd25lclB1YmxpY0tleS50b1N0cmluZygpLFxuICAgICAgICBmZWVQYXllcixcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IGRlc3RUb2tlbiA9IGF3YWl0IEFjY291bnQuQXNzb2NpYXRlZC5tYWtlT3JDcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgZGVzdCxcbiAgICAgICAgZmVlUGF5ZXIsXG4gICAgICApO1xuXG4gICAgICBsZXQgaW5zdDI7XG4gICAgICBjb25zdCBibG9ja2hhc2hPYmogPSBhd2FpdCBOb2RlLmdldENvbm5lY3Rpb24oKS5nZXRMYXRlc3RCbG9ja2hhc2goKTtcblxuICAgICAgY29uc3QgdHggPSBuZXcgVHJhbnNhY3Rpb24oe1xuICAgICAgICBsYXN0VmFsaWRCbG9ja0hlaWdodDogYmxvY2toYXNoT2JqLmxhc3RWYWxpZEJsb2NrSGVpZ2h0LFxuICAgICAgICBibG9ja2hhc2g6IGJsb2NraGFzaE9iai5ibG9ja2hhc2gsXG4gICAgICAgIGZlZVBheWVyOiBmZWVQYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgfSk7XG5cbiAgICAgIGluc3QyID0gY3JlYXRlVHJhbnNmZXJDaGVja2VkSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHNvdXJjZVRva2VuLnRva2VuQWNjb3VudC50b1B1YmxpY0tleSgpLFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG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GVBc3NvY2lhdGVkVG9rZW5BY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgIGZlZVBheWVyLFxuICAgICAgICB0b2tlbkFzc29jaWF0ZWQsXG4gICAgICAgIG93bmVyLFxuICAgICAgICBtaW50LFxuICAgICAgKSxcbiAgICApO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVNaW50VG9DaGVja2VkSW5zdHJ1Y3Rpb24oXG4gICAgICAgIG1pbnQsXG4gICAgICAgIHRva2VuQXNzb2NpYXRlZCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIENhbGN1bGF0ZS5jYWxjdWxhdGVBbW91bnQodG90YWxBbW91bnQsIG1pbnREZWNpbWFsKSxcbiAgICAgICAgbWludERlY2ltYWwsXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUNyZWF0ZU1ldGFkYXRhQWNjb3VudFYzSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHtcbiAgICAgICAgICBtZXRhZGF0YTogbWV0YWRhdGFQZGEsXG4gICAgICAgICAgbWludCxcbiAgICAgICAgICBtaW50QXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBwYXllcjogZmVlUGF5ZXIsXG4gICAgICAgICAgdXBkYXRlQXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgIGNyZWF0ZU1ldGFkYXRhQWNjb3VudEFyZ3NWMzoge1xuICAgICAgICAgICAgZGF0YTogdG9rZW5NZXRhZGF0YSxcbiAgICAgICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICAgICAgIGNvbGxlY3Rpb25EZXRhaWxzOiBudWxsLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICApLFxuICAgICk7XG4gICAgcmV0dXJuIGluc3RydWN0aW9ucztcbiAgfTtcblxuICAvKipcbiAgICogU1BMLVRPS0VOIG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GltYWdlOiBpbnB1dC51cmkgfTtcbiAgICAgICAgY29uc3QgdXBsb2FkZWQgPSBhd2FpdCBTdG9yYWdlLnVwbG9hZERhdGEoXG4gICAgICAgICAgeyAuLi5zdG9yYWdlTWV0YWRhdGEsIC4uLmltYWdlIH0sXG4gICAgICAgICAgc3RvcmFnZVR5cGUsXG4gICAgICAgICAgcGF5ZXIsXG4gICAgICAgICk7XG4gICAgICAgIGlmICh1cGxvYWRlZC5pc0Vycikge1xuICAgICAgICAgIHRocm93IHVwbG9hZGVkO1xuICAgICAgICB9XG4gICAgICAgIHVyaSA9IHVwbG9hZGVkLnZhbHVlO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgdGhyb3cgRXJyb3IoYE11c3Qgc2V0IGZpbGVQYXRoJyBvciAndXJpJ2ApO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBpc011dGFibGUgPSB0cnVlO1xuXG4gICAgICBjb25zdCBkYXRhdjIgPSBDb252ZXJ0ZXIuVG9rZW5NZXRhZGF0YS5pbnRvSW5mcmEoXG4gICAgICAgIGlucHV0LFxuICAgICAgICB1cmksXG4gICAgICAgIHNlbGxlckZlZUJhc2lzUG9pbnRzLFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgZGF0YXYyOiAnLCBkYXRhdjIpO1xuICAgICAgZGVidWdMb2coJyMgdXBsb2FkIGNvbnRlbnQgdXJsOiAnLCB1cmkpO1xuXG4gICAgICBjb25zdCBtaW50ID0gQWNjb3VudC5LZXlwYWlyLmNyZWF0ZSgpO1xuICAgICAgY29uc3QgaW5zdHMgPSBhd2FpdCBjcmVhdGVNaW50KFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICB0b3RhbEFtb3VudCxcbiAgICAgICAgbWludERlY2ltYWwsXG4gICAgICAgIGRhdGF2MixcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICBpc011dGFibGUsXG4gICAgICApO1xuXG4gICAgICAvLyBmcmVlemVBdXRob3JpdHlcbiAgICAgIGlmIChmcmVlemVBdXRob3JpdHkpIHtcbiAgICAgICAgaW5zdHMucHVzaChcbiAgICAgICAgICBjcmVhdGVGcmVlemVBdXRob3JpdHkoXG4gICAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgICAgIGZyZWV6ZUF1dGhvcml0eS50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBuZXcgVHJhbnNhY3Rpb25CdWlsZGVyLk1pbnQoXG4gICAgICAgIGluc3RzLFxuICAgICAgICBbb3duZXIudG9LZXlwYWlyKCksIG1pbnQudG9LZXlwYWlyKCldLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgbWludC5wdWJrZXksXG4gICAgICApO1xuICAgIH0pO1xuICB9O1xufVxuIiwgImltcG9ydCB7IENvbnN0YW50cywgZGVidWdMb2csIGlzQnJvd3NlciwgaXNOb2RlIH0gZnJvbSAnfi9zdWl0ZS11dGlscyc7XG5pbXBvcnQgeyBGaWxlVHlwZSwgSWRlbnRpdHksIFRhZ3MsIFVwbG9hZGFibGVGaWxlVHlwZSB9IGZyb20gJ34vdHlwZXMvc3RvcmFnZSc7XG5pbXBvcnQgeyBQaGFudG9tUHJvdmlkZXIgfSBmcm9tICd+L3R5cGVzL3BoYW50b20nO1xuaW1wb3J0IElyeXMsIHsgV2ViSXJ5cyB9IGZyb20gJ0BpcnlzL3Nkayc7XG5pbXBvcnQgeyBVcGxvYWRSZXNwb25zZSB9IGZyb20gJ0BpcnlzL3Nkay9idWlsZC9lc20vY29tbW9uL3R5cGVzJztcblxuZXhwb3J0IG5hbWVzcGFjZSBQcm92ZW5hbmNlTGF5ZXIge1xuICBjb25zdCBUT0tFTiA9ICdzb2xhbmEnO1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LFxuICAgICk7XG4gICAgaWYgKGFzc2V0cy5pc0Vycikge1xuICAgICAgdGhyb3cgYXNzZXRzLmVycm9yO1xuICAgIH1cblxuICAgIGNvbnN0IGl0ZW1zID0gYXNzZXRzLnZhbHVlLml0ZW1zO1xuXG4gICAgY29uc3QgbWV0YWRhdGFzID0gYXdhaXQgUHJvbWlzZS5hbGwoXG4gICAgICBpdGVtc1xuICAgICAgICAuZmlsdGVyKChpdGVtKSA9PiBpdGVtLmNvbXByZXNzaW9uLmNvbXByZXNzZWQgPT09IGlzQ29tcHJlc3NlZClcbiAgICAgICAgLm1hcChhc3luYyAoaXRlbSkgPT4ge1xuICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICBjb25zdCBvZmZjaGFpbjogT2ZmY2hhaW4gPSBhd2FpdCBmZXRjaE9mZmNoYWluKFxuICAgICAgICAgICAgICBpdGVtLmNvbnRlbnQuanNvbl91cmksXG4gICAgICAgICAgICApO1xuICAgICAgICAgICAgY29uc3QgbWVyZ2VkID0ge1xuICAgICAgICAgICAgICBvbmNoYWluOiBpdGVtLFxuICAgICAgICAgICAgICBvZmZjaGFpbjogb2ZmY2hhaW4sXG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgcmV0dXJuIENvbnZlcnRlci5OZnQuaW50b1VzZXIobWVyZ2VkKTtcbiAgICAgICAgICB9IGNhdGNoIChlcnIpIHtcbiAgICAgICAgICAgIGRlYnVnTG9nKCcjIEZhaWxlZCBmZXRjaCBvZmZjaGFpbiB1cmw6ICcsIGl0ZW0uY29udGVudC5qc29uX3VyaSk7XG4gICAgICAgICAgICByZXR1cm4gQ29udmVydGVyLk5mdC5pbnRvVXNlcih7XG4gICAgICAgICAgICAgIG9uY2hhaW46IGl0ZW0sXG4gICAgICAgICAgICAgIG9mZmNoYWluOiB7fSxcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgIH1cbiAgICAgICAgfSksXG4gICAgKTtcbiAgICByZXR1cm4ge1xuICAgICAgcGFnZTogYXN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WxzOiBudWxsLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUNyZWF0ZU1hc3RlckVkaXRpb25WM0luc3RydWN0aW9uKFxuICAgICAgICB7XG4gICAgICAgICAgZWRpdGlvbjogbWFzdGVyRWRpdGlvblB1YmtleSxcbiAgICAgICAgICBtaW50LFxuICAgICAgICAgIHVwZGF0ZUF1dGhvcml0eTogb3duZXIsXG4gICAgICAgICAgbWludEF1dGhvcml0eTogb3duZXIsXG4gICAgICAgICAgcGF5ZXI6IGZlZVBheWVyLFxuICAgICAgICAgIG1ldGFkYXRhOiB0b2tlbk1ldGFkYXRhUHVia2V5LFxuICAgICAgICB9LFxuICAgICAgICB7XG4gICAgICAgICAgY3JlYXRlTWFzdGVyRWRpdGlvbkFyZ3M6IHtcbiAgICAgICAgICAgIG1heFN1cHBseTogMCxcbiAgICAgICAgICB9LFxuICAgICAgICB9LFxuICAgICAgKSxcbiAgICApO1xuICAgIHJldHVybiBpbnN0cnVjdGlvbnM7XG4gIH07XG5cbiAgLyoqXG4gICAqIFVwbG9hZCBjb250ZW50IGFuZCBORlQgbWludFxuICAgKlxuICAgKiBAcGFyYW0ge1NlY3JldH0gb3duZXIgICAgICAgICAvLyBvd25lcidzIFNlY3JldFxuICAgKiBAcGFyYW0ge0lucHV0TmZ0TWV0YWRhdGF9IGlucHV0XG4gICAqIHtcbiAgICogICBuYW1lOiBzdHJpbmcgICAgICAgICAgICAgICAvLyBuZnQgY29udGVudCBuYW1lXG4gICAqICAgc3ltYm9sOiBzdHJpbmcgICAgICAgICAgICAgLy8gbmZ0IHRpY2tlciBzeW1ib2xcbiAgICogICBmaWxlUGF0aDogc3RyaW5nIHwgRmlsZSAgICAvLyBuZnQgdGlja2VyIHN5bWJvbFxuICAgKiAgIHJveWFsdHk6IG51bWJlciAgICAgICAgICAgIC8vIHJveWFsdHkgcGVyY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ICBjb25zdCBtaW50ID0gQWNjb3VudC5LZXlwYWlyLmNyZWF0ZSgpO1xuXG4gICAgICBjb25zdCBpbnN0cnVjdGlvbnMgPSBhd2FpdCBjcmVhdGVNaW50KFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICBkYXRhdjIsXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgKTtcblxuICAgICAgLy8gZnJlZXplQXV0aG9yaXR5XG4gICAgICBpZiAoZnJlZXplQXV0aG9yaXR5KSB7XG4gICAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICAgIGNyZWF0ZURlbGVhZ2F0ZShcbiAgICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICAgICAgZnJlZXplQXV0aG9yaXR5LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgLy8gY29sbGVjdGlvbiAtLS1cbiAgICAgIGlmIChpbnB1dC5jb2xsZWN0aW9uKSB7XG4gICAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICAgIGNyZWF0ZVZlcmlmeVNpemVkQ29sbGVjdGlvbihcbiAgICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIGlucHV0LmNvbGxlY3Rpb24udG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBrZXlwYWlycyA9IFtvd25lci50b0tleXBhaXIoKSwgbWludC50b0tleXBhaXIoKV07XG5cbiAgICAgIC8vIGNyZWF0b3IgLS0tXG4gICAgICB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mVndWxhck5mdE1ldGFkYXRhLmludG9JbmZyYShpbnB1dCwgdXJpLCAwKTtcblxuICAgICAgY29uc3QgaXNNdXRhYmxlID0gaW5wdXQuaXNNdXRhYmxlID09PSB1bmRlZmluZWQgPyB0cnVlIDogaW5wdXQuaXNNdXRhYmxlO1xuXG4gICAgICBkZWJ1Z0xvZygnIyBpbnB1dDogJywgaW5wdXQpO1xuICAgICAgZGVidWdMb2coJyMgZGF0YXYyOiAnLCBkYXRhdjIpO1xuXG4gICAgICBjb25zdCBjb2xsZWN0aW9uTWludCA9IEFjY291bnQuS2V5cGFpci5jcmVhdGUoKTtcbiAgICAgIGNvbnN0IGNvbGxlY3Rpb25NZXRhZGF0YUFjY291bnQgPSBBY2NvdW50LlBkYS5nZXRNZXRhZGF0YShcbiAgICAgICAgY29sbGVjdGlvbk1pbnQucHVia2V5LFxuICAgICAgKTtcblxuICAgICAgY29uc3QgaW5zdHJ1Y3Rpb25zID0gYXdhaXQgTWludC5jcmVhdGVNaW50KFxuICAgICAgICBjb2xsZWN0aW9uTWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgZGF0YXYyLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICk7XG5cbiAgICAgIC8vIGZyZWV6ZUF1dGhvcml0eVxuICAgICAgaWYgKGZyZWV6ZUF1dGhvcml0eSkge1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgICBNaW50LmNyZWF0ZURlbGVhZ2F0ZShcbiAgICAgICAgICAgIGNvbGxlY3Rpb25NaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgICAgIGZyZWV6ZUF1dGhvcml0eS50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIGNvb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3Rpb25CdWlsZGVyIiwgIlJlZ3VsYXJOZnQiLCAiU3BsVG9rZW4iLCAiUmVndWxhck5mdCIsICJQaGFudG9tTWV0YXBsZXgiLCAiQ29udmVydGVyIiwgIm1pbnQiLCAiQWNjb3VudCIsICJUcmFuc2FjdGlvbiIsICJSZWd1bGFyTmZ0IiwgInNpZyIsICJSZWd1bGFyTmZ0IiwgImNyZWF0ZU1pbnRUb0NoZWNrZWRJbnN0cnVjdGlvbiIsICJUT0tFTl9QUk9HUkFNX0lEIiwgIlRyYW5zYWN0aW9uIiwgIlBoYW50b21TcGxUb2tlbiIsICJUcmFuc2FjdGlvbiIsICJBY2NvdW50IiwgImNyZWF0ZU1pbnRUb0NoZWNrZWRJbnN0cnVjdGlvbiIsICJUT0tFTl9QUk9HUkFNX0lEIiwgIktleXBhaXIiLCAiVHJhbnNhY3Rpb24iLCAiUGhhbnRvbVNwbFRva2VuIiwgIlRyYW5zYWN0aW9uIiwgIm1pbnQiLCAiS2V5cGFpciIsICJDb252ZXJ0ZXIiLCAiU3BsVG9rZW4iLCAic2lnIiwgIlBoYW50b21TcGxUb2tlbiJdCn0K \ No newline at end of file diff --git a/packages/suite-regular-nft/dist/index.d.mts b/packages/suite-regular-nft/dist/index.d.mts index 8de488296..62edc096f 100644 --- a/packages/suite-regular-nft/dist/index.d.mts +++ b/packages/suite-regular-nft/dist/index.d.mts @@ -318,6 +318,35 @@ type Result = Result.Ok | Result.Err; type OkType> = R extends Result ? O : never; type ErrType> = R extends Result ? E : never; +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; +}; + type BurnOptions = { feePayer: Secret; }; @@ -388,35 +417,6 @@ type TransferOptions = { feePayer: Secret; }; -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; -}; - type CommonStructure = { instructions: TransactionInstruction[]; signers: Keypair[]; diff --git a/packages/suite-regular-nft/dist/index.d.ts b/packages/suite-regular-nft/dist/index.d.ts index 8de488296..62edc096f 100644 --- a/packages/suite-regular-nft/dist/index.d.ts +++ b/packages/suite-regular-nft/dist/index.d.ts @@ -318,6 +318,35 @@ type Result = Result.Ok | Result.Err; type OkType> = R extends Result ? O : never; type ErrType> = R extends Result ? E : never; +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; +}; + type BurnOptions = { feePayer: Secret; }; @@ -388,35 +417,6 @@ type TransferOptions = { feePayer: Secret; }; -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; -}; - type CommonStructure = { instructions: TransactionInstruction[]; signers: Keypair[]; diff --git a/packages/suite-regular-nft/dist/index.js b/packages/suite-regular-nft/dist/index.js index ae6cc715b..f4ff09766 100644 --- a/packages/suite-regular-nft/dist/index.js +++ b/packages/suite-regular-nft/dist/index.js @@ -2852,4 +2852,4 @@ var RegularNft10 = { 0 && (module.exports = { RegularNft }); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uLy4uL3N1aXRlLXNwbC10b2tlbi9zcmMvYWRkLnRzIiwgIi4uLy4uL3N1aXRlLXV0aWxzL3NyYy9jb25zdGFudHMudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvYmF0Y2gudHMiLCAiLi4vLi4vbm9kZS9zcmMvaW5kZXgudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY29tbW9uLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL21pbnQudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvcGFydGlhbC1zaWduLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2NhbGN1bGF0ZS10eHNpemUudHMiLCAiLi4vLi4vZ2xvYmFsL3NyYy9pbmRleC50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9rZXlwYWlyLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL3BkYS50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9pbmRleC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9pbmRleC50cyIsICIuLi8uLi9zdWl0ZS11dGlscy9zcmMvc2hhcmVkLnRzIiwgIi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biAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJGZWVCYXNpc1BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0YWRhdGEubmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzeW1ib2wnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLnN5bWJvbCkge1xuICAgICAgICAgICAgICByZXMgPSBpc1N5bWJvbChtZXRhZGF0YS5zeW1ib2wpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHJlcyAmJiByZXMuaXNFcnIpIHtcbiAgICAgICAgICByZXN1bHRzLnB1c2goLi4ucmVzLmVycm9yLmRldGFpbHMpO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIGlmIChyZXN1bHRzLmxlbmd0aCA+IDApIHtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9XG4gICAgICAgICAgJ0NhdWdodCBpbiB0aGUgdmFsaWRhdGlvbiBlcnJvcnMuIHNlZSBpbmZvcm1hdGlvbiBlLmc6IGVycjxWYWxpZGF0b3JFcnJvcj4uZGV0YWlscyc7XG4gICAgICAgIHRoc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gICAgICAgfSxcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IGRhdGFzID0gaW5mby52YWx1ZS5tYXAoYXN5bmMgKGQpID0+IHtcbiAgICAgICAgY29uc3QgbWludCA9IGQuYWNjb3VudC5kYXRhLnBhcnNlZC5pbmZvLm1pbnQgYXMgUHVia2V5O1xuICAgICAgICBjb25zdCB0b2tlbkFtb3VudCA9IGQuYWNjb3VudC5kYXRhLnBhcnNlZC5pbmZvLnRva2VuQW1vdW50XG4gICAgICAgICAgLmFtb3VudCBhcyBzdHJpbmc7XG4gICAgICAgIGlmICh0b2tlbkFtb3VudCA9PT0gJzEnKSB7XG4gICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBNZXRhZGF0YS5mcm9tQWNjb3VudEFkZHJlc3MoXG4gICAgICAgICAgY29ubmVjdGlvbixcbiAgICAgICAgICBBY2NvdW50LlBkYS5nZXRNZXRhZGF0YShtaW50KSxcbiAgICAgICAgKVxuICAgICAgICAgIC50aGVuKGFzeW5jIChtZXRhZGF0YSkgPT4ge1xuICAgICAgICAgICAgLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLWV4cGxpY2l0LWFueSAqL1xuICAgICAgICAgICAgcmV0dXJuIGZldGNoUmV0cnkobWV0YWRhdGEuZGF0YS51cmkpLnRoZW4oKGpzb246IGFueSkgPT4ge1xuICAgICAgICAgICAgICByZXR1cm4gY29udmVydGVyKG1ldGFkYXRhLCBqc29uLCB0b2tlbkFtb3VudCk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICB9KVxuICAgICAgICAgIC5jYXRjaCgoZXJyKSA9PiBkZWJ1Z0xvZygnIyBbRmV0Y2ggZXJyb3JdJywgZXJyKSk7XG4gICAgICB9KTtcblxuICAgICAgY29uc3QgZmlsdGVycyA9IChhd2FpdCBQcm9taXNlLmFsbChkYXRhcykpLmZpbHRlcihcbiAgICAgICAgKGRhdGEpID0+IGRhdGEgIT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jb25zdCBpbnN0cnVjdGlvbnMgPSBbXTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgU3lzdGVtUHJvZ3JhbS5jcmVhdGVBY2NvdW50KHtcbiAgICAgICAgZnJvbVB1YmtleTogZmVlUGF5ZXIsXG4gICAgICAgIG5ld0FjY291bnRQdWJrZXk6IG1pbnQsXG4gICAgICAgIHNwYWNlOiBNSU5UX1NJWkUsXG4gICAgICAgIGxhbXBvcnRzOiBsYW1wb3J0cyxcbiAgICAgICAgcHJvZ3JhbUlkOiBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgfSksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlSW5pdGlhbGl6ZU1pbnRJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgbWludERlY2ltYWwsXG4gICAgICAgIG93bmVyLFxuICAgICAgICBvd25lcixcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICBmZWVQYXllcixcbiAgICAgICAgdG9rZW5Bc3NvY2lhdGVkLFxuICAgICAgICBvd25lcixcbiAgICAgICAgbWludCxcbiAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlTWludFRvQ2hlY2tlZEluc3RydWN0aW9uKFxuICAgICAgICBtaW50LFxuICAgICAgICB0b2tlbkFzc29jaWF0ZWQsXG4gICAgICAgIG93bmVyLFxuICAgICAgICBDYWxjdWxhdGUuY2FsY3VsYXRlQW1vdW50KHRvdGFsQW1vdW50LCBtaW50RGVjaW1hbCksXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgKSxcbiAgICApO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVDcmVhdGVNZXRhZGF0YUFjY291bnRWM0luc3RydWN0aW9uKFxuICAgICAgICB7XG4gICAgICAgICAgbWV0YWRhdGE6IG1ldGFkYXRhUGRhLFxuICAgICAgICAgIG1pbnQsXG4gICAgICAgICAgbWludEF1dGhvcml0eTogb3duZXIsXG4gICAgICAgICAgcGF5ZXI6IGZlZVBheWVyLFxuICAgICAgICAgIHVwZGF0ZUF1dGhvcml0eTogb3duZXIsXG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICBjcmVhdGVNZXRhZGF0YUFjY291bnRBcmdzVjM6IHtcbiAgICAgICAgICAgIGRhdGE6IHRva2VuTWV0YWRhdGEsXG4gICAgICAgICAgICBpc011dGFibGUsXG4gICAgICAgICAgICBjb2xsZWN0aW9uRGV0YWlsczogbnVsbCxcbiAgICAgICAgICB9LFxuICAgICAgICB9LFxuICAgICAgKSxcbiAgICApO1xuICAgIHJldHVybiBpbnN0cnVjdGlvbnM7XG4gIH07XG5cbiAgLyoqXG4gICAqIFNQTC1UT0tFTiBtaW50XG4gICAqXG4gICAqIEBwYXJhbSB7U2VjcmV0fSBvd25lciAgICAgIC8vIHRva2VuIG93bmVyIFNlY3JldFxuICAgKiBAcGFyYW0ge251bWJlcn0gdG90YWxBbW91bnQgLy8gdG90YWwgbnVtYmVyXG4gICAqIEBwYXJhbSB7bnVtYmVyfSBtaW50RGVjaW1hbCAvLyB0b2tlbiBkZWNpbWFsXG4gICAqIEBwYXJhbSB7SW5wdXRUb2tlbk1ldGFkYXRhfSBpbnB1dCAgICAgICAvLyB0b2tlbiBtZXRhZGF0YVxuICAgKiBAcGFyYW0ge1BhcnRpYWw8TWludE9wdGlvbnM+fSBvcHRpb25zICAgLy8gb3B0aW9uc1xuICAgKiBAcmV0dXJuIFByb21pc2U8UmVzdWx0PE1pbnRJbnN0cnVjdGlvbiwgRXJyb3I+PlxuICAgKi9cbiAgZXhwb3J0IGNvbnN0IG1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ZTtcblxuICAgICAgY29uc3QgZGF0YXYyID0gQ29udmVydGVyLlRva2VuTWV0YWRhdGEuaW50b0luZnJhKFxuICAgICAgICBpbnB1dCxcbiAgICAgICAgdXJpLFxuICAgICAgICBzZWxsZXJGZWVCYXNpc1BvaW50cyxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGRhdGF2MjogJywgZGF0YXYyKTtcbiAgICAgIGRlYnVnTG9nKCcjIHVwbG9hZCBjb250ZW50IHVybDogJywgdXJpKTtcblxuICAgICAgY29uc3QgbWludCA9IEFjY291bnQuS2V5cGFpci5jcmVhdGUoKTtcbiAgICAgIGNvbnN0IGluc3RzID0gYXdhaXQgY3JlYXRlTWludChcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgdG90YWxBbW91bnQsXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICBkYXRhdjIsXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgKTtcblxuICAgICAgLy8gZnJlZXplQXV0aG9yaXR5XG4gICAgICBpZiAoZnJlZXplQXV0aG9yaXR5KSB7XG4gICAgICAgIGluc3RzLnB1c2goXG4gICAgICAgICAgY3JlYXRlRnJlZXplQXV0aG9yaXR5KFxuICAgICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgICAgICBmcmVlemVBdXRob3JpdHkudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5NaW50KFxuICAgICAgICBpbnN0cyxcbiAgICAgICAgW293bmVyLnRvS2V5cGFpcigpLCBtaW50LnRvS2V5cGFpcigpXSxcbiAgICAgICAgcGF5ZXIudG9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dGlvbnMucHVzaChjcmVhdGVNaW50VG9DaGVja2VkSW5zdHJ1Y3Rpb24obWludCwgYXRhLCBvd25lciwgMSwgMCkpO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVDcmVhdGVNZXRhZGF0YUFjY291bnRWM0luc3RydWN0aW9uKFxuICAgICAgICB7XG4gICAgICAgICAgbWV0YWRhdGE6IHRva2VuTWV0YWRhdGFQdWJrZXksXG4gICAgICAgICAgbWludCxcbiAgICAgICAgICBtaW50QXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBwYXllcjogZmVlUGF5ZXIsXG4gICAgICAgICAgdXBkYXRlQXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgIGNyZWF0ZU1ldGFkYXRhQWNjb3VudEFyZ3NWMzoge1xuICAgICAgICAgICAgZGF0YTogbmZ0TWV0YWRhdGEsXG4gICAgICAgICAgICBpc011dGFibGUsXG4gICAgICAgICAgICBjb2xsZWN0aW9uRGV0YWlsczogbnVsbCxcbiAgICAgICAgICB9LFxuICAgICAgICB9LFxuICAgICAgKSxcbiAgICApO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVDcmVhdGVNYXN0ZXJFZGl0aW9uVjNJbnN0cnVjdGlvbihcbiAgICAgICAge1xuICAgICAgICAgIGVkaXRpb246IG1hc3RlckVkaXRpb25QdWJrZXksXG4gICAgICAgICAgbWludCxcbiAgICAgICAgICB1cGRhdGVBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICAgIG1pbnRBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICAgIHBheWVyOiBmZWVQYXllcixcbiAgICAgICAgICBtZXRhZGF0YTogdG9rZW5NZXRhZGF0YVB1YmtleSxcbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgIGNyZWF0ZU1hc3RlckVkaXRpb25BcmdzOiB7XG4gICAgICAgICA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ICAgICAgdGhyb3cgdXBsb2FkZWQ7XG4gICAgICAgIH1cbiAgICAgICAgdXJpID0gdXBsb2FkZWQudmFsdWU7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICB0aHJvdyBFcnJvcihgTXVzdCBzZXQgZmlsZVBhdGgnIG9yICd1cmknYCk7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGRhdGF2MiA9IENvbnZlcnRlci5SZWd1bGFyTmZ0TWV0YWRhdGEuaW50b0luZnJhKFxuICAgICAgICBpbnB1dCxcbiAgICAgICAgdXJpLFxuICAgICAgICBzZWxsZXJGZWVCYXNpc1BvaW50cyxcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IGlzTXV0YWJsZSA9IGlucHV0LmlzTXV0YWJsZSA9PT0gdW5kZWZpbmVkID8gdHJ1ZSA6IGlucHV0LmlzTXV0YWJsZTtcblxuICAgICAgZGVidWdMb2coJyMgaW5wdXQ6ICcsIGlucHV0KTtcbiAgICAgIGRlYnVnTG9nKCcjIGRhdGF2MjogJywgZGF0YXYyKTtcblxuICAgICAgY29uc3QgbWludCA9IEFjY291bnQuS2V5cGFpci5jcmVhdGUoKTtcblxuICAgICAgY29uc3QgaW5zdHJ1Y3Rpb25zID0gYXdhaXQgY3JlYXRlTWludChcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgZGF0YXYyLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICk7XG5cbiAgICAgIC8vIGZyZWV6ZUF1dGhvcml0eVxuICAgICAgaWYgKGZyZWV6ZUF1dGhvcml0eSkge1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgICBjcmVhdGVEZWxlYWdhdGUoXG4gICAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgICAgIGZyZWV6ZUF1dGhvcml0eS50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIC8vIGNvbGxlY3Rpb24gLS0tXG4gICAgICBpZiAoaW5wdXQuY29sbGVjdGlvbikge1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgICBjcmVhdGVWZXJpZnlTaXplZENvbGxlY3Rpb24oXG4gICAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBpbnB1dC5jb2xsZWN0aW9uLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3Qga2V5cGFpcnMgPSBbb3duZXIudG9LZXlwYWlyKCksIG1pbnQudG9LZXlwYWlyKCldO1xuXG4gICAgICAvLyBjcmVhdG9yIC0tLVxuICAgICAgaWYgKGlucHV0LmNyZWF0b3JzKSB7XG4gICAgICAgIGlucHV0LmNyZWF0b3JzLmZvckVhY2goKGNyZWF0b3IpID0+IHtcbiAgICAgICAgICBpZiAoQWNjb3VudC5LZXlwYWlyLmlzU2VjcmV0KGNyZWF0b3Iuc2VjcmV0KSkge1xuICAgICAgICAgICAgY29uc3QgY3JlYXRvclB1YmtleSA9IGNyZWF0b3IuYWRkcmVzcy50b1B1YmxpY0tleSgpO1xuICAgICAgICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZVZlcmlmeUNyZWF0b3IobWludC50b1B1YmxpY0tleSgpLCBjcmVhdG9yUHVia2V5KTtcbiAgICAgICAgICAgIGluc3RydWN0aW9ucy5wdXNoKGluc3QpO1xuICAgICAgICAgICAga2V5cGFpcnMucHVzaChjcmVhdG9yLnNlY3JldC50b0tleXBhaXIoKSk7XG4gICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICAgIH1cblxuICA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YXRhdjIgPSB7IC4uLmRhdGF2MiwgY29sbGVjdGlvbiB9O1xuICAgICAgfVxuICAgICAgLy8tLS0gY29sbGVjdGlvbiAtLS1cblxuICAgICAgY29uc3QgaXNNdXRhYmxlID0gaW5wdXQuaXNNdXRhYmxlID09PSB1bmRlZmluZWQgPyB0cnVlIDogaW5wdXQuaXNNdXRhYmxlO1xuXG4gICAgICBkZWJ1Z0xvZygnIyBpbnB1dDogJywgaW5wdXQpO1xuICAgICAgZGVidWdMb2coJyMgc2VsbGVyRmVlQmFzaXNQb2ludHM6ICcsIHNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgIGRlYnVnTG9nKCcjIGRhdGF2MjogJywgZGF0YXYyKTtcblxuICAgICAgY29uc3QgbWludCA9IEFjY291bnQuS2V5cGFpci5jcmVhdGUoKTtcbiAgICAgIGNvbnN0IGluc3RzID0gYXdhaXQgTWludC5jcmVhdGVNaW50KFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyUHVibGlja2V5LFxuICAgICAgICBkYXRhdjIsXG4gICAgICAgIGZlZVBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICk7XG5cbiAgICAgIC8vIGZyZWV6ZUF1dGhvcml0eVxuICAgICAgaWYgKG9wdGlvbnMuZnJlZXplQXV0aG9yaXR5KSB7XG4gICAgICAgIGluc3RzLnB1c2goXG4gICAgICAgICAgTWludC5jcmVhdGVEZWxlYWdhdGUoXG4gICAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBvd25lclB1YmxpY2tleSxcbiAgICAgICAgICAgIG9wdGlvbnMuZnJlZXplQXV0aG9yaXR5LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgYmxvY2toYXNoT2JqID0gYXdhaXQgTm9kZS5nZXRDb25uZWN0aW9uKCkuZ2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A9IGF3YWl0IE1pbnQuY3JlYXRlTWludChcbiAgICAgICAgY29sbGVjdGlvbk1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgIGRhdGF2MixcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICBpc011dGFibGUsXG4gICAgICApO1xuXG4gICAgICAvLyBmcmVlemVBdXRob3JpdHlcbiAgICAgIGlmIChmcmVlemVBdXRob3JpdHkpIHtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgICAgTWludC5jcmVhdGVEZWxlYWdhdGUoXG4gICAgICAgICAgICBjb2xsZWN0aW9uTWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgICAgICBmcmVlemVBdXRob3JpdHkudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBjb2xsZWN0aW9ucyA9IHtcbiAgICAgICAgY29sbGVjdGlvbk1ldGFkYXRhOiBjb2xsZWN0aW9uTWV0YWRhdGFBY2NvdW50LFxuICAgICAgICBjb2xsZWN0aW9uQXV0aG9yaXR5OiBvd25lci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgIGNvbGxlY3Rpb25NaW50OiBjb2xsZWN0aW9uTWludC50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICB9O1xuXG4gICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgY3JlYXRlU2V0Q29sbGVjdGlvblNpemVJbnN0cnVjdGlvbihjb2xsZWN0aW9ucywge1xuICAgICAgICAgIHNldENvbGxlY3Rpb25TaXplQXJnczoge1xuICAgICAgICAgICAgc2l6ZTogY29sbGVjdGlvblNpemUgfHwgREVGQVVMVF9DT0xMRUNUSU9OX1NJWkUsXG4gICAgICAgICAgfSxcbi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IHN1Ym1pdCA9IGFzeW5jIChcbiAgICAgIGFycjogQ29tbW9uLkNvbW1vbltdIHwgTWludC5NaW50W10sXG4gICAgKTogUHJvbWlzZTxSZXN1bHQ8VHJhbnNhY3Rpb25TaWduYXR1cmUsIEVycm9yPj4gPT4ge1xuICAgICAgcmV0dXJuIFRyeShhc3luYyAoKSA9PiB7XG4gICAgICAgIGxldCBpID0gMDtcbiAgICAgICAgZm9yIChjb25zdCBhIG9mIGFycikge1xuICAgICAgICAgIGlmICghYS5pbnN0cnVjdGlvbnMgJiYgIWEuc2lnbmVycykge1xuICAgICAgICAgICAgdGhyb3cgRXJyb3IoXG4gICAgICAgICAgICAgIGBvbmx5IEluc3RydWN0aW9uIG9iamVjdCB0aGF0IGNhbiB1c2UgYmF0Y2hTdWJtaXQoKS5cbiAgICAgICAgICAgIEluZGV4OiAke2l9LCBTZXQgdmFsdWU6ICR7SlNPTi5zdHJpbmdpZnkoYSl9YCxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIGkrKztcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IGluc3RydWN0aW9ucyA9IGFyci5mbGF0TWFwKChhKSA9PiBhLmluc3RydWN0aW9ucyk7XG4gICAgICAgIGNvbnN0IHNpZ25lcnMgPSBhcnIuZmxhdE1hcCgoYSkgPT4gYS5zaWduZXJzKTtcbiAgICAgICAgY29uc3QgZmVlUGF5ZXJzID0gYXJyLmZpbHRlcigoYSkgPT4gYS5mZWVQYXllciAhPT0gdW5kZWZpbmVkKTtcbiAgICAgICAgbGV0IGZlZVBheWVyID0gc2lnbmVyc1swXTtcbiAgICAgICAgaWYgKGZlZVBheWVycy5sZW5ndGggPiAwICYmIGZlZVBheWVyc1swXS5mZWVQYXllcikge1xuICAgICAgICAgIGZlZVBheWVyID0gZmVlUGF5ZXJzWzBdLmZlZVBheWVyO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgdHJhbnNhY3Rpb24gPSBuZXcgVH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G5BcnJheS5wcm90b3R5cGUuc3VibWl0ID0gYXN5bmMgZnVuY3Rpb24gKGZlZVBheWVyPzogU2VjcmV0KSB7XG4gIGlmIChmZWVQYXllcikge1xuICAgIGxldCBpID0gMTtcbiAgICBmb3IgYXdhaXQgKGNvbnN0IG9iaiBvZiB0aGlzKSB7XG4gICAgICBpZiAob2JqLmlzRXJyKSB7XG4gICAgICAgIHJldHVybiBvYmo7XG4gICAgICB9IGVsc2UgaWYgKG9iai52YWx1ZS5jYW5TdWJtaXQpIHtcbiAgICAgICAgZGVidWdMb2coJyMgUmVzdWx0IGJhdGNoIGNhblN1Ym1pdCcpO1xuICAgICAgICBjb25zdCBzaWcgPSBhd2FpdCAob2JqIGFzIFBhcnRpYWxTaWduU3RydWN0dXJlKS5zdWJtaXQoZmVlUGF5ZXIpO1xuICAgICAgICBpZiAoc2lnLmlzRXJyKSB7XG4gICAgICAgICAgcmV0dXJuIHNpZztcbiAgICAgICAgfVxuICAgICAgICBhd2FpdCBOb2RlLmNvbmZpcm1lZFNpZyhzaWcudmFsdWUpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgZGVidWdMb2coJyMgUmVzdWx0IGJhdGNoIG90aGVyIHRoYW4gY2FuU3VibWl0Jyk7XG4gICAgICAgIGlmICh0aGlzLmxlbmd0aCA9PSBpKSB7XG4gICAgICAgICAgLy8gbGFzdCBvYmplY3RcbiAgICAgICAgICByZXR1cm4gb2JqLnN1Ym1pdChmZWVQYXllcik7XG4gICAgICAgIH1cbiAgICAgICAgb2JqLnN1Ym1pdChmZWVQYXllcik7XG4gICAgICB9XG4gICAgICBpKys7XG4gICAgfVxuICB9IGVsc2Uge1xuICAgIGNvbnN0IGluc3RydWN0aW9uczogQ29tbW9uU3RydWN0dXJlIHwgTWludFN0cnVjdHVyZVtdID0gW107XG4gICAgZm9yIChjb25zdCBvYmogb2YgdGhpcykge1xuICAgICAgaWYgKG9iai5pc0Vycikge1xuICAgICAgICByZXR1cm4gb2JqO1xuICA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gICAgICBzd2l0Y2ggKGtleSkge1xuICAgICAgICAgIGNhc2UgJ2ltYWdlJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuaW1hZ2UpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNJbWFnZVVybChtZXRhZGF0YS5pbWFnZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdyb3lhbHR5JzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEucm95YWx0eSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1JveWFsdHkobWV0YWRhdGEucm95YWx0eSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ25hbWUnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLm5hbWUpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNOYW1lKG1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EZldGNoIG1pbnRlZCBtZXRhZGF0YSBieSBvd25lciBQdWJrZXlcbiAgICpcbiAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAqIEByZXR1cm4ge1Byb21pc2U8UmVzdWx0PFRva2VuTWV0YWRhdGFbXXwgRXJyb3I+Pn1cbiAgICovXG4gIGV4cG9ydCBjb25zdCBmaW5kQnlPd25lciA9IGFzeW5jIChcbiAgICBvd25lcjogUHVia2V5LFxuICApOiBQcm9taXNlPFJlc3VsdDxUb2tlbk1ldGFkYXRhW10sIEVycm9yPj4gPT4ge1xuICAgIHJldHVybiBUcnkoYXN5bmMgKCkgPT4ge1xuICAgICAgY29uc3QgY29ubmVjdGlvbiA9IE5vZGUuZ2V0Q29ubmVjdGlvbigpO1xuICAgICAgY29uc3QgaW5mbyA9IGF3YWl0IGNvbm5lY3Rpb24uZ2V0UGFyc2VkVG9rZW5BY2NvdW50c0J5T3duZXIoXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIHtcbiAgICAgICAgICBwcm9ncmFtSWQ6IFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgIH0sXG4gICAgICApO1xuXG4gICAgICBjb25zdCBkYXRhcyA9IGluZm8udmFsdWUubWFwKGFzeW5jIChkKSA9PiB7XG4gICAgICAgIGNvbnN0IG1pbnQgPSBkLmFjY291bnQuZGF0YS5wYXJzZWQuaW5mby5taW50IGFzIFB1YmtleTtcbiAgICAgICAgY29uc3QgdG9rZW5BbW91bnQgPSBkLmFjY291bnQuZGF0YS5wYXJzZWQuaW5mby50b2tlbkFtb3VudFxuICAgICAgICAgIC5hbW91bnQgYXMgc3RyaW5nO1xuICAgICAgICBpZiAodG9rZW5BbW91bnQgPT09ICcxJykge1xuICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gTWV0YWRhdGEuZnJvbUFjY291bnRBZGRyZXNzKFxuICAgICAgICAgIGNvbm5lY3Rpb24sXG4gICA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G4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICBvd25lcixcbiAgICAgICAgb3duZXIsXG4gICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgZmVlUGF5ZXIsXG4gICAgICAgIHRva2VuQXNzb2NpYXRlZCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIG1pbnQsXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZU1pbnRUb0NoZWNrZWRJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgdG9rZW5Bc3NvY2lhdGVkLFxuICAgICAgICBvd25lcixcbiAgICAgICAgQ2FsY3VsYXRlLmNhbGN1bGF0ZUFtb3VudCh0b3RhbEFtb3VudCwgbWludERlY2ltYWwpLFxuICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlQ3JlYXRlTWV0YWRhdGFBY2NvdW50VjNJbnN0cnVjdGlvbihcbiAgICAgICAge1xuICAgICAgICAgIG1ldGFkYXRhOiBtZXRhZGF0YVBkYSxcbiAgICAgICAgICBtaW50LFxuICAgICAgICAgIG1pbnRBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICAgIHBheWVyOiBmZWVQYXllcixcbiAgICAgICAgICB1cGRhdGVBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICB9LFxuICAgICAgICB7XG4gICAgICAgICAgY3JlYXRlTWV0YWRhdGFBY2NvdW50QXJnc1YzOiB7XG4gICAgICAgICAgICBkYXRhOiB0b2tlbk1ldGFkYXRhLFxuICAgICAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgICAgIC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LZXkoKSxcbiAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgIHRvdGFsQW1vdW50LFxuICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICAgZGF0YXYyLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICk7XG5cbiAgICAgIC8vIGZyZWV6ZUF1dGhvcml0eVxuICAgICAgaWYgKGZyZWV6ZUF1dGhvcml0eSkge1xuICAgICAgICBpbnN0cy5wdXNoKFxuICAgICAgICAgIGNyZWF0ZUZyZWV6ZUF1dGhvcml0eShcbiAgICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICAgICAgZnJlZXplQXV0aG9yaXR5LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuTWludChcbiAgICAgICAgaW5zdHMsXG4gICAgICAgIFtvd25lci50b0tleXBhaXIoKSwgbWludC50b0tleXBhaXIoKV0sXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICBtaW50LnB1YmtleSxcbiAgICAgICk7XG4gICAgfSk7XG4gIH07XG59XG4iLCAiaW1wb3J0IHsgQ29uc3RhbnRzLCBkZWJ1Z0xvZywgaXNCcm93c2VyLCBpc05vZGUgfSBmcm9tICd+L3N1aXRlLXV0aWxzJztcbmltcG9ydCB7IEZpbGVUeXBlLCBJZGVudGl0eSwgVGFncywgVXBsb2FkYWJsZUZpbGVUeXBlIH0gZnJvbSAnfi90eXBlcy9zdG9yYWdlJztcbmltcG9ydCB7IFBoYW50b21Qcm92aWRlciB9IGZyb20gJ34vdHlwZXMvcGhhbnRvbSc7XG5pbXBvcnQgSXJ5cywgeyBXZWJJcnlzIH0gZnJvbSAnQGl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Y2VUb2tlbiA9IGF3YWl0IEFjY291bnQuQXNzb2NpYXRlZC5tYWtlT3JDcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgb3duZXIudG9TdHJpbmcoKSxcbiAgICAgICAgcGF5ZXJQdWJrZXkucHVia2V5LFxuICAgICAgKTtcblxuICAgICAgY29uc3QgZGVzdFRva2VuID0gYXdhaXQgQWNjb3VudC5Bc3NvY2lhdGVkLm1ha2VPckNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICBtaW50LFxuICAgICAgICBkZXN0LFxuICAgICAgICBwYXllclB1YmtleS5wdWJrZXksXG4gICAgICApO1xuXG4gICAgICBjb25zdCBpbnN0ID0gY3JlYXRlVHJhbnNmZXJDaGVja2VkSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHNvdXJjZVRva2VuLnRva2VuQWNjb3VudC50b1B1YmxpY0tleSgpLFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIGRlc3RUb2tlbi50b2tlbkFjY291bnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgQ2FsY3VsYXRvci5jYWxjdWxhdGVBbW91bnQoYW1vdW50LCBtaW50RGVjaW1hbCksXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICBrZXlwYWlycyxcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IGluc3RydWN0aW9ucyA9IGRlc3RUb2tlbi5pbnN0ID8gW2Rlc3RUb2tlbi5pbnN0LCBpbnN0XSA6IFtpbnN0XTtcblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uKFxuICAgICAgICBpbnN0cnVjdGlvbnMsXG4gICAgICAgIGtleXBhaXJzLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKSxcbiAgICAgICk7XG4gICAgfSk7XG4gIH07XG59XG4iLCAiaW1wb3J0IHsg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FpdCBBcGkuZ2V0QXNzZXRzQnlPd25lcihcbiAgICAgIG93bmVyLFxuICAgICAgbGltaXQsXG4gICAgICBwYWdlLFxuICAgICAgc29ydEJ5LFxuICAgICAgYmVmb3JlLFxuICAgICAgYWZ0ZXIsXG4gICAgKTtcbiAgICBpZiAoYXNzZXRzLmlzRXJyKSB7XG4gICAgICB0aHJvdyBhc3NldHMuZXJyb3I7XG4gICAgfVxuXG4gICAgY29uc3QgaXRlbXMgPSBhc3NldHMudmFsdWUuaXRlbXM7XG5cbiAgICBjb25zdCBtZXRhZGF0YXMgPSBhd2FpdCBQcm9taXNlLmFsbChcbiAgICAgIGl0ZW1zXG4gICAgICAgIC5maWx0ZXIoKGl0ZW0pID0+IGl0ZW0uY29tcHJlc3Npb24uY29tcHJlc3NlZCA9PT0gaXNDb21wcmVzc2VkKVxuICAgICAgICAubWFwKGFzeW5jIChpdGVtKSA9PiB7XG4gICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgIGNvbnN0IG9mZmNoYWluOiBPZmZjaGFpbiA9IGF3YWl0IGZldGNoT2ZmY2hhaW4oXG4gICAgICAgICAgICAgIGl0ZW0uY29udGVudC5qc29uX3VyaSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgICBjb25zdCBtZXJnZWQgPSB7XG4gICAgICAgICAgICAgIG9uY2hhaW46IGl0ZW0sXG4gICAgICAgICAgICAgIG9mZmNoYWluOiBvZmZjaGFpbixcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICByZXR1cm4gQ29udmVydGVyLk5mdC5pbnRvVXNlcihtZXJnZWQpO1xuICAgICAgICAgIH0gY2F0Y2ggKGVycikge1xuICAgICAgICAgICAgZGVidWdMb2coJyMgRmFpbGVkIGZldGNoIG9mZmNoYWluIHVybDogJywgaXRlbS5jb250ZW50Lmpzb25fdXJpKTtcbiAgICAgICAgICAgIHJldHVybiBDb252ZXJ0ZXIuTmZ0LmludG9Vc2VyKHtcbiAgICAgICAgICAgICAgb25jaGFpb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hdGVNZXRhZGF0YUFjY291bnRBcmdzVjM6IHtcbiAgICAgICAgICAgIGRhdGE6IG5mdE1ldGFkYXRhLFxuICAgICAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgICAgICAgY29sbGVjdGlvbkRldGFpbHM6IG51bGwsXG4gICAgICAgICAgfSxcbiAgICAgICAgfSxcbiAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlQ3JlYXRlTWFzdGVyRWRpdGlvblYzSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHtcbiAgICAgICAgICBlZGl0aW9uOiBtYXN0ZXJFZGl0aW9uUHVia2V5LFxuICAgICAgICAgIG1pbnQsXG4gICAgICAgICAgdXBkYXRlQXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBtaW50QXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBwYXllcjogZmVlUGF5ZXIsXG4gICAgICAgICAgbWV0YWRhdGE6IHRva2VuTWV0YWRhdGFQdWJrZXksXG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICBjcmVhdGVNYXN0ZXJFZGl0aW9uQXJnczoge1xuICAgICAgICAgICAgbWF4U3VwcGx5OiAwLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICApLFxuICAgICk7XG4gICAgcmV0dXJuIGluc3RydWN0aW9ucztcbiAgfTtcblxuICAvKipcbiAgICogVXBsb2FkIGNvbnRlbnQgYW5kIE5GVCBtaW50XG4gICAqXG4gICAqIEBwYXJhbSB7U2VjcmV0fSBvd25lciAgICAgICAgIC8vIG93bmVyJ3MgU2VjcmV0XG4gICAqIEBwYXJhbSB7SW5wdXROZnRNZXRhZGF0YX0gaW5wdXRcbiAgICoge1xuICAgKiAgIG5hbWU6IHN0cmluZyAgICAgICAgICAgICAgIC8vIG5mdCBjb250ZW50IG5hbWVcbiAgICogICBzeW1ib2w6IHN0cmluZyAgICAgICAgICAgICAvLyBuZn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lsZVBhdGgsXG4gICAgICAgICAgc3RvcmFnZVR5cGUsXG4gICAgICAgICAgcGF5ZXIsXG4gICAgICAgICk7XG4gICAgICAgIGRlYnVnTG9nKCcjIHVwbG9hZCBjb250ZW50IHVybDogJywgdXBsb2FkZWQpO1xuICAgICAgICBpZiAodXBsb2FkZWQuaXNFcnIpIHtcbiAgICAgICAgICB0aHJvdyB1cGxvYWRlZDtcbiAgICAgICAgfVxuICAgICAgICB1cmkgPSB1cGxvYWRlZC52YWx1ZTtcbiAgICAgICAgLy8gdXBsb2FkZWQgZmlsZVxuICAgICAgfSBlbHNlIGlmIChpbnB1dC51cmkpIHtcbiAgICAgICAgY29uc3QgaW1hZ2UgPSB7IGltYWdlOiBpbnB1dC51cmkgfTtcbiAgICAgICAgY29uc3QgdXBsb2FkZWQgPSBhd2FpdCBTdG9yYWdlLnVwbG9hZERhdGEoXG4gICAgICAgICAgeyAuLi5zdG9yYWdlTWV0YWRhdGEsIC4uLmltYWdlIH0sXG4gICAgICAgICAgc3RvcmFnZVR5cGUsXG4gICAgICAgICAgcGF5ZXIsXG4gICAgICAgICk7XG4gICAgICAgIGlmICh1cGxvYWRlZC5pc0Vycikge1xuICAgICAgICAgIHRocm93IHVwbG9hZGVkO1xuICAgICAgICB9XG4gICAgICAgIHVyaSA9IHVwbG9hZGVkLnZhbHVlO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgdGhyb3cgRXJyb3IoYE11c3Qgc2V0IGZpbGVQYXRoJyBvciAndXJpJ2ApO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBkYXRhdjIgPSBDb252ZXJ0ZXIuUmVndWxhck5mdE1ldGFkYXRhLmludG9JbmZyYShcbiAgICAgICAgaW5wdXQsXG4gICAgICAgIHVyaSxcbiAgICAgICAgc2VsbGVyRmVlQmFzaXNQb2ludHMsXG4gICAgICApO1xuXG4gICAgICBjb25zdCBpc011dGFibGUgPSBpbnB1dC5pc011dGFibGUgPT09IHVuZGVmaW5lZCA/IHRydWUgOiBpbnB1dC5pc011dGFibGU7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGlucHV0OiAnLCBpbnB1dCk7XG4gICAgICBkZWJ1Z0xvZygnIyBkYXRhdjI6ICcsIGRhdGF2Mik7XG5cbiAgICAgIGNvbnN0IG1pbnQgPSBBY2NvdW50LktleXBhaXIuY3JlYXRlKCk7XG5cbiAgICAgIGNvbnN0IGluc3RydWN0aW9ucyA9IGF3YWl0IGNyZWF0ZU1pbnQoXG4gICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgIGRhdGF2MixcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICBpc011dGFibGUsXG4gICAgICApO1xuXG4gICAgICAvLyBmcmVlemVBdXRob3JpdHlcbiAgICAgIGlmIChmcmVlemVBdXRob3JpdHkpIHtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgICAgY3JlYXRlRGVsZWFnYXRlKFxuICAgICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgICAgICBmcmVlemVBdXRob3JpdHkudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICAvLyBjb2xsZWN0aW9uIC0tLVxuICAgICAgaWYgKGlucHV0LmNvbGxlY3Rpb24pIHtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgICAgY3JlYXRlVmVyaWZ5U2l6ZWRDb2xsZWN0aW9uKFxuICAgICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgaW5wdXQuY29sbGVjdGlvbi50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICAgICksXG4gICA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IGNvbnN0IG1pbnQgPSBBY2NvdW50LktleXBhaXIuY3JlYXRlKCk7XG4gICAgICBjb25zdCBpbnN0cyA9IGF3YWl0IE1pbnQuY3JlYXRlTWludChcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lclB1YmxpY2tleSxcbiAgICAgICAgZGF0YXYyLFxuICAgICAgICBmZWVQYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgICBpc011dGFibGUsXG4gICAgICApO1xuXG4gICAgICAvLyBmcmVlemVBdXRob3JpdHlcbiAgICAgIGlmIChvcHRpb25zLmZyZWV6ZUF1dGhvcml0eSkge1xuICAgICAgICBpbnN0cy5wdXNoKFxuICAgICAgICAgIE1pbnQuY3JlYXRlRGVsZWFnYXRlKFxuICAgICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgb3duZXJQdWJsaWNrZXksXG4gICAgICAgICAgICBvcHRpb25zLmZyZWV6ZUF1dGhvcml0eS50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGJsb2NraGFzaE9iaiA9IGF3YWl0IE5vZGUuZ2V0Q29ubmVjdGlvbigpLmdldExhdGVzdEJsb2NraGFzaCgpO1xuICAgICAgY29uc3QgdHggPSBuZXcgVHJhbnNhY3Rpb24oe1xuICAgICAgICBsYXN0VmFsaWRCbG9ja0hlaWdodDogYmxvY2toYXNoT2JqLmxhc3RWYWxpZEJsb2NrSGVpZ2h0LFxuICAgICAgICBibG9ja2hhc2g6IGJsb2NraGFzaE9iai5ibG9ja2hhc2gsXG4gICAgICAgIGZlZVBheWVyOiBmZWVQYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgfSk7XG5cbiAgICAgIGluc3RzLmZvckVhY2goKGluc3QpID0+IHR4LmFkZChpbnN0KSk7XG4gICAgICB0eC5yZWNlbnRCbG9ja2hhc2ggPSBibG9ja2hhc2hPYmouYmxvY2toY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iaW1wb3J0X3NwbF90b2tlbiIsICJpbXBvcnRfbXBsX3Rva2VuX21ldGFkYXRhIiwgIlJlZ3VsYXJOZnQiLCAiQWNjb3VudCIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiUmVndWxhck5mdCIsICJTcGxUb2tlbiIsICJSZWd1bGFyTmZ0Il0KfQo= \ No newline at end of file diff --git a/packages/suite-regular-nft/dist/index.mjs b/packages/suite-regular-nft/dist/index.mjs index 7fc700e5c..9d9b0efd9 100644 --- a/packages/suite-regular-nft/dist/index.mjs +++ b/packages/suite-regular-nft/dist/index.mjs @@ -2868,4 +2868,4 @@ var RegularNft10 = { export { RegularNft10 as RegularNft }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vc3VpdGUtc3BsLXRva2VuL3NyYy9hZGQudHMiLCAiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9iYXRjaC50cyIsICIuLi8uLi9ub2RlL3NyYy9pbmRleC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jb21tb24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvbWludC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9wYXJ0aWFsLXNpZ24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY2FsY3VsYXRlLXR4c2l6ZS50cyIsICIuLi8uLi9nbG9iYWwvc3JjL2luZGV4LnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2tleXBhaXIudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvcGRhLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2luZGV4LnRz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ICAgIGxldCBpID0gMDtcbiAgICAgICAgZm9yIChjb25zdCBhIG9mIGFycikge1xuICAgICAgICAgIGlmICghYS5pbnN0cnVjdGlvbnMgJiYgIWEuc2lnbmVycykge1xuICAgICAgICAgICAgdGhyb3cgRXJyb3IoXG4gICAgICAgICAgICAgIGBvbmx5IEluc3RydWN0aW9uIG9iamVjdCB0aGF0IGNhbiB1c2UgYmF0Y2hTdWJtaXQoKS5cbiAgICAgICAgICAgIEluZGV4OiAke2l9LCBTZXQgdmFsdWU6ICR7SlNPTi5zdHJpbmdpZnkoYSl9YCxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIGkrKztcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IGluc3RydWN0aW9ucyA9IGFyci5mbGF0TWFwKChhKSA9PiBhLmluc3RydWN0aW9ucyk7XG4gICAgICAgIGNvbnN0IHNpZ25lcnMgPSBhcnIuZmxhdE1hcCgoYSkgPT4gYS5zaWduZXJzKTtcbiAgICAgICAgY29uc3QgZmVlUGF5ZXJzID0gYXJyLmZpbHRlcigoYSkgPT4gYS5mZWVQYXllciAhPT0gdW5kZWZpbmVkKTtcbiAgICAgICAgbGV0IGZlZVBheWVyID0gc2lnbmVyc1swXTtcbiAgICAgICAgaWYgKGZlZVBheWVycy5sZW5ndGggPiAwICYmIGZlZVBheWVyc1swXS5mZWVQYXllcikge1xuICAgICAgICAgIGZlZVBheWVyID0gZmVlUGF5ZXJzWzBdLmZlZVBheWVyO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgdHJhbnNhY3Rpb24gPSBuZXcgVHJhbnNhY3Rpb24oKTtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHNpZ25lcnM7XG4gICAgICAgIGlmIChmZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gZmVlUGF5ZXIucHVibGljS2V5O1xuICAgICAgICAgIGZpbmFsU2lnbmVycyA9IFtmZW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7XG4gICAgICAgICAgICAgIHJlcyA9IGlzUm95YWx0eShtZXRhZGF0YS5yb3lhbHR5KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlcl9mZWVfYmFzaXNfcG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJGZWVCYXNpc1BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0YWRhdGEubmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzeW1ib2wnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLnN5bWJvbCkge1xuICAgICAgICAgICAgICByZXMgPSBpc1N5bWJvbChtZXRhZGF0YS5zeW1ib2wpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHJlcyAmJiByZXMuaXNFcnIpIHtcbiAgICAgICAgICByZXN1bHRzLnB1c2goLi4ucmVzLm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AoKSA9PiB7XG4gICAgICBjb25zdCBjb25uZWN0aW9uID0gTm9kZS5nZXRDb25uZWN0aW9uKCk7XG4gICAgICBjb25zdCBpbmZvID0gYXdhaXQgY29ubmVjdGlvbi5nZXRQYXJzZWRUb2tlbkFjY291bnRzQnlPd25lcihcbiAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAge1xuICAgICAgICAgIHByb2dyYW1JZDogVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgfSxcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IGRhdGFzID0gaW5mby52YWx1ZS5tYXAoYXN5bmMgKGQpID0+IHtcbiAgICAgICAgY29uc3QgbWludCA9IGQuYWNjb3VudC5kYXRhLnBhcnNlZC5pbmZvLm1pbnQgYXMgUHVia2V5O1xuICAgICAgICBjb25zdCB0b2tlbkFtb3VudCA9IGQuYWNjb3VudC5kYXRhLnBhcnNlZC5pbmZvLnRva2VuQW1vdW50XG4gICAgICAgICAgLmFtb3VudCBhcyBzdHJpbmc7XG4gICAgICAgIGlmICh0b2tlbkFtb3VudCA9PT0gJzEnKSB7XG4gICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBNZXRhZGF0YS5mcm9tQWNjb3VudEFkZHJlc3MoXG4gICAgICAgICAgY29ubmVjdGlvbixcbiAgICAgICAgICBBY2NvdW50LlBkYS5nZXRNZXRhZGF0YShtaW50KSxcbiAgICAgICAgKVxuICAgICAgICAgIC50aGVuKGFzeW5jIChtZXRhZGF0YSkgPT4ge1xuICAgICAgICAgICAgLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLWV4cGxpY2l0LWFueSAqL1xuICAgICAgICAgICAgcmV0dXJuIGZldGNoUmV0cnkobWV0YWRhdGEuZGF0YS51cmkpLnRoZW4oKGpzb246IGFueSkgPT4ge1xuICAgICAgICAgICAgICByZXR1cm4gY29udmVydGVyKG1ldGFkYXRhLCBqc29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3JlYXRlTWludFRvQ2hlY2tlZEluc3RydWN0aW9uKFxuICAgICAgICBtaW50LFxuICAgICAgICB0b2tlbkFzc29jaWF0ZWQsXG4gICAgICAgIG93bmVyLFxuICAgICAgICBDYWxjdWxhdGUuY2FsY3VsYXRlQW1vdW50KHRvdGFsQW1vdW50LCBtaW50RGVjaW1hbCksXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgKSxcbiAgICApO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVDcmVhdGVNZXRhZGF0YUFjY291bnRWM0luc3RydWN0aW9uKFxuICAgICAgICB7XG4gICAgICAgICAgbWV0YWRhdGE6IG1ldGFkYXRhUGRhLFxuICAgICAgICAgIG1pbnQsXG4gICAgICAgICAgbWludEF1dGhvcml0eTogb3duZXIsXG4gICAgICAgICAgcGF5ZXI6IGZlZVBheWVyLFxuICAgICAgICAgIHVwZGF0ZUF1dGhvcml0eTogb3duZXIsXG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICBjcmVhdGVNZXRhZGF0YUFjY291bnRBcmdzVjM6IHtcbiAgICAgICAgICAgIGRhdGE6IHRva2VuTWV0YWRhdGEsXG4gICAgICAgICAgICBpc011dGFibGUsXG4gICAgICAgICAgICBjb2xsZWN0aW9uRGV0YWlsczogbnVsbCxcbiAgICAgICAgICB9LFxuICAgICAgICB9LFxuICAgICAgKSxcbiAgICApO1xuICAgIHJldHVybiBpbnN0cnVjdGlvbnM7XG4gIH07XG5cbiAgLyoqXG4gICAqIFNQTC1UT0tFTiBtaW50XG4gICAqXG4gICAqIEBwYXJhbSB7U2VjcmV0fSBvd25lciAgICAgIC8vIHRva2VuIG93bmVyIFNlY3JldFxuICAgKiBAcGFyYW0ge251bWJlcn0gdG90YWxBbW91bnQgLy8gdG90YWwgbnVtYmVyXG4gICAqIEBwYXJhbSB7bnVtYmVyfSBtaW50RGVjaW1hbCAvLyB0b2tlbiBkZWNpbWFsXG4gIC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AgICBpZiAodXBsb2FkZWQuaXNFcnIpIHtcbiAgICAgICAgICB0aHJvdyB1cGxvYWRlZDtcbiAgICAgICAgfVxuICAgICAgICB1cmkgPSB1cGxvYWRlZC52YWx1ZTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHRocm93IEVycm9yKGBNdXN0IHNldCBmaWxlUGF0aCcgb3IgJ3VyaSdgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgaXNNdXRhYmxlID0gdHJ1ZTtcblxuICAgICAgY29uc3QgZGF0YXYyID0gQ29udmVydGVyLlRva2VuTWV0YWRhdGEuaW50b0luZnJhKFxuICAgICAgICBpbnB1dCxcbiAgICAgICAgdXJpLFxuICAgICAgICBzZWxsZXJGZWVCYXNpc1BvaW50cyxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGRhdGF2MjogJywgZGF0YXYyKTtcbiAgICAgIGRlYnVnTG9nKCcjIHVwbG9hZCBjb250ZW50IHVybDogJywgdXJpKTtcblxuICAgICAgY29uc3QgbWludCA9IEFjY291bnQuS2V5cGFpci5jcmVhdGUoKTtcbiAgICAgIGNvbnN0IGluc3RzID0gYXdhaXQgY3JlYXRlTWludChcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgdG90YWxBbW91bnQsXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICBkYXRhdjIsXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgKTtcblxuICAgICAgLy8gZnJlZXplQXV0aG9yaXR5XG4gICAgICBpZiAoZnJlZXplQXV0aG9yaXR5KSB7XG4gICAgICAgIGluc3RzLnB1c2goXG4gICAgICAgICAgY3JlYXRlRnJlZXplQXV0aG9yaXR5KFxuICAgICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgb3duZXJQdW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ByZXNzZWQpXG4gICAgICAgIC5tYXAoYXN5bmMgKGl0ZW0pID0+IHtcbiAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgY29uc3Qgb2ZmY2hhaW46IE9mZmNoYWluID0gYXdhaXQgZmV0Y2hPZmZjaGFpbihcbiAgICAgICAgICAgICAgaXRlbS5jb250ZW50Lmpzb25fdXJpLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIGNvbnN0IG1lcmdlZCA9IHtcbiAgICAgICAgICAgICAgb25jaGFpbjogaXRlbSxcbiAgICAgICAgICAgICAgb2ZmY2hhaW46IG9mZmNoYWluLFxuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIHJldHVybiBDb252ZXJ0ZXIuTmZ0LmludG9Vc2VyKG1lcmdlZCk7XG4gICAgICAgICAgfSBjYXRjaCAoZXJyKSB7XG4gICAgICAgICAgICBkZWJ1Z0xvZygnIyBGYWlsZWQgZmV0Y2ggb2ZmY2hhaW4gdXJsOiAnLCBpdGVtLmNvbnRlbnQuanNvbl91cmkpO1xuICAgICAgICAgICAgcmV0dXJuIENvbnZlcnRlci5OZnQuaW50b1VzZXIoe1xuICAgICAgICAgICAgICBvbmNoYWluOiBpdGVtLFxuICAgICAgICAgICAgICBvZmZjaGFpbjoge30sXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICB9XG4gICAgICAgIH0pLFxuICAgICk7XG4gICAgcmV0dXJuIHtcbiAgICAgIHBhZ2U6IGFzc2V0cy52YWx1ZS5wYWdlLFxuICAgICAgdG90YWw6IGFzc2V0cy52YWx1ZS50b3RhbCxcbiAgICAgIGxpbWl0OiBhc3NldHMudmFsdWUubGltaXQsXG4gICAgICBtZXRhZGF0YXMsXG4gICAgfTtcbiAgfTtcblxuICAvKipcbiAgICogRmluZCBuZnQgYnkgY29sbGVjdGlvbiBtaW50XG4gICAqXG4gICAqIEBwYXJhbSB7UHVia2V5fSBjb2xsZWN0aW9uTWludFxuICAgKiBAcGFyYW0ge2Jvb2xlYW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pbnN0cnVjdGlvbnMucHVzaChjcmVhdGVJbml0aWFsaXplTWludEluc3RydWN0aW9uKG1pbnQsIDAsIG93bmVyLCBvd25lcikpO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVBc3NvY2lhdGVkVG9rZW5BY2NvdW50SW5zdHJ1Y3Rpb24oZmVlUGF5ZXIsIGF0YSwgb3duZXIsIG1pbnQpLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChjcmVhdGVNaW50VG9DaGVja2VkSW5zdHJ1Y3Rpb24obWludCwgYXRhLCBvd25lciwgMSwgMCkpO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVDcmVhdGVNZXRhZGF0YUFjY291bnRWM0luc3RydWN0aW9uKFxuICAgICAgICB7XG4gICAgICAgICAgbWV0YWRhdGE6IHRva2VuTWV0YWRhdGFQdWJrZXksXG4gICAgICAgICAgbWludCxcbiAgICAgICAgICBtaW50QXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBwYXllcjogZmVlUGF5ZXIsXG4gICAgICAgICAgdXBkYXRlQXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgIGNyZWF0ZU1ldGFkYXRhQWNjb3VudEFyZ3NWMzoge1xuICAgICAgICAgICAgZGF0YTogbmZ0TWV0YWRhdGEsXG4gICAgICAgICAgICBpc011dGFibGUsXG4gICAgICAgICAgICBjb2xsZWN0aW9uRGV0YWlsczogbnVsbCxcbiAgICAgICAgICB9LFxuICAgICAgICB9LFxuICAgICAgKSxcbiAgICApO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVDcmVhdGVNYXN0ZXJFZGl0aW9uVjNJbnN0cnVjdGlvbihcbiAgICAgICAge1xuICAgICAgICAgIGVkaXRpb246IG1hc3RlckVkaXRpb25QdWJrZXksXG4gICAgICAgICAgbWludCxcbiAgICAgICAgICB1cGRhdGVBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICAgIG1pbnRBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICAgIHBheWVyOiBmZWVQYXllcixcbiAgICAgICAgICBtZXRhZGF0YTogdG9rZW5NZXRhZGF0YVB1YmtleSxcbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgIGNyZWF0ZU1hc3RlckVkaXRpb25BcmdzOiB7XG4gICAgICAgICAgICBtYXhTdXBwbHk6IDAsXG4gICAgICAgICAgfSxcbiAgICAgICAgfSxcbiAgICAgICksXG4gICAgKTtcbiAgICByZXR1cm4gaW5zdHJ1Y3Rpb25zO1xuICB9O1xuXG4gIC8qKlxuICAgKiBVcGxvYWQgY29udGVudCBhbmQgTkZUIG1pbnRcbiAgICpcbiAgICogQHBhcmFtIHtTZWNyZXR9IG93bmVyICAgICAgICAgLy8gb3duZXIncyBTZWNyZXRcbiAgICogQHBhcmFtIHtJbnB1dE5mdE1ldGFkYXRhfSBpbnB1dFxuICAgKiB7XG4gICAqICAgbmFtZTogc3RyaW5nICAgICAgICAgICAgICAgLy8gbmZ0IGNvbnRlbnQgbmFtZVxuICAgKiAgIHN5bWJvbDogc3RyaW5nICAgICAgICAgICAgIC8vIG5mdCB0aWNrZXIgc3ltYm9sXG4gICAqICAgZmlsZVBhdGg6IHN0cmluZyB8IEZpbGUgICAgLy8gbmZ0IHRpY2tlciBzeW1ib2xcbiAgICogICByb3lhbHR5OiBudW1iZXIgICAgICAgICAgICAvLyByb3lhbHR5IHBlcmNlbnRhZ2VcbiAgICogICBzdG9yYWdlVHlwZTogJ2Fyd2VhdmUnfCduZnRTdG9yYWdlJyAvLyBEZWNlbnRyYWxpemVkIHN0b3JhZ2VcbiAgICogICBkZXNjcmlwdGlvbj86IHN0cmluZyAgICAgICAvLyBuZnQgY29udGVudCBkZXNjcmlwdGlvblxuICAgKiAgIGV4dGVybmFsX3VybD86IHN0cmluZyAgICAgIC8vIG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ZXksXG4gICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICk7XG5cbiAgICAgIC8vIGZyZWV6ZUF1dGhvcml0eVxuICAgICAgaWYgKGZyZWV6ZUF1dGhvcml0eSkge1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgICBjcmVhdGVEZWxlYWdhdGUoXG4gICAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgICAgIGZyZWV6ZUF1dGhvcml0eS50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIC8vIGNvbGxlY3Rpb24gLS0tXG4gICAgICBpZiAoaW5wdXQuY29sbGVjdGlvbikge1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgICBjcmVhdGVWZXJpZnlTaXplZENvbGxlY3Rpb24oXG4gICAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBpbnB1dC5jb2xsZWN0aW9uLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3Qga2V5cGFpcnMgPSBbb3duZXIudG9LZXlwYWlyKCksIG1pbnQudG9LZXlwYWlyKCldO1xuXG4gICAgICAvLyBjcmVhdG9yIC0tLVxuICAgICAgaWYgKGlucHV0LmNyZWF0b3JzKSB7XG4gICAgICAgIGlucHV0LmNyZWF0b3JzLmZvckVhY2goKGNyZWF0b3IpID0+IHtcbiAgICAgICAgICBpZiAoQWNjb3VudC5LZXlwYWlyLmlzU2VjcmV0KGNyZWF0b3Iuc2VjcmV0KSkge1xuICAgICAgICAgICAgY29uc3QgY3JlYXRvclB1YmtleSA9IGNyZWF0b3IuYWRkcmVzcy50b1B1YmxpY0tleSgpO1xuICA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c2lzUG9pbnRzLFxuICAgICAgKTtcblxuICAgICAgLy8tLS0gY29sbGVjdGlvbiAtLS1cbiAgICAgIGxldCBjb2xsZWN0aW9uO1xuICAgICAgaWYgKGlucHV0LmNvbGxlY3Rpb24gJiYgaW5wdXQuY29sbGVjdGlvbikge1xuICAgICAgICBjb2xsZWN0aW9uID0gQ29udmVydGVyLkNvbGxlY3Rpb24uaW50b0luZnJhKGlucHV0LmNvbGxlY3Rpb24pO1xuICAgICAgICBkYXRhdjIgPSB7IC4uLmRhdGF2MiwgY29sbGVjdGlvbiB9O1xuICAgICAgfVxuICAgICAgLy8tLS0gY29sbGVjdGlvbiAtLS1cblxuICAgICAgY29uc3QgaXNNdXRhYmxlID0gaW5wdXQuaXNNdXRhYmxlID09PSB1bmRlZmluZWQgPyB0cnVlIDogaW5wdXQuaXNNdXRhYmxlO1xuXG4gICAgICBkZWJ1Z0xvZygnIyBpbnB1dDogJywgaW5wdXQpO1xuICAgICAgZGVidWdMb2coJyMgc2VsbGVyRmVlQmFzaXNQb2ludHM6ICcsIHNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgIGRlYnVnTG9nKCcjIGRhdGF2MjogJywgZGF0YXYyKTtcblxuICAgICAgY29uc3QgbWludCA9IEFjY291bnQuS2V5cGFpci5jcmVhdGUoKTtcbiAgICAgIGNvbnN0IGluc3RzID0gYXdhaXQgTWludC5jcmVhdGVNaW50KFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyUHVibGlja2V5LFxuICAgICAgICBkYXRhdjIsXG4gICAgICAgIGZlZVBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICk7XG5cbiAgICAgIC8vIGZyZWV6ZUF1dGhvcml0eVxuICAgICAgaWYgKG9wdGlvbnMuZnJlZXplQXV0aG9yaXR5KSB7XG4gICAgICAgIGluc3RzLnB1c2goXG4gICAgICAgICAgTWludC5jcmVhdGVEZWxlYW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gZGF0YXYyKTtcblxuICAgICAgY29uc3QgY29sbGVjdGlvbk1pbnQgPSBBY2NvdW50LktleXBhaXIuY3JlYXRlKCk7XG4gICAgICBjb25zdCBjb2xsZWN0aW9uTWV0YWRhdGFBY2NvdW50ID0gQWNjb3VudC5QZGEuZ2V0TWV0YWRhdGEoXG4gICAgICAgIGNvbGxlY3Rpb25NaW50LnB1YmtleSxcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IGluc3RydWN0aW9ucyA9IGF3YWl0IE1pbnQuY3JlYXRlTWludChcbiAgICAgICAgY29sbGVjdGlvbk1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgIGRhdGF2MixcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICBpc011dGFibGUsXG4gICAgICApO1xuXG4gICAgICAvLyBmcmVlemVBdXRob3JpdHlcbiAgICAgIGlmIChmcmVlemVBdXRob3JpdHkpIHtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgICAgTWludC5jcmVhdGVEZWxlYWdhdGUoXG4gICAgICAgICAgICBjb2xsZWN0aW9uTWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgICAgICBmcmVlemVBdXRob3JpdHkudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBjb2xsZWN0aW9ucyA9IHtcbiAgICAgICAgY29sbGVjdGlvbk1ldGFkYXRhOiBjb2xsZWN0aW9uTWV0YWRhdGFBY2NvdW50LFxuICAgICAgICBjb2xsZWN0aW9uQXV0aG9yaXR5OiBvd25lci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgIGNvbGxlY3Rpb25NaW50OiBjb2xsZWN0aW9uTWludC50b0tleXBhaXIoKS5wdWJsaWNLZXks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Nzb2NpYXRlZFRva2VuQWRkcmVzc1N5bmMiLCAiUmVndWxhck5mdCIsICJBY2NvdW50IiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJSZWd1bGFyTmZ0IiwgIlNwbFRva2VuIiwgIlJlZ3VsYXJOZnQiXQp9Cg== \ No newline at end of file +//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vc3VpdGUtc3BsLXRva2VuL3NyYy9hZGQudHMiLCAiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9iYXRjaC50cyIsICIuLi8uLi9ub2RlL3NyYy9pbmRleC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jb21tb24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvbWludC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9wYXJ0aWFsLXNpZ24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY2FsY3VsYXRlLXR4c2l6ZS50cyIsICIuLi8uLi9nbG9iYWwvc3JjL2luZGV4LnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2tleXBhaXIudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvcGRhLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3N1aXRlLXV0aWxzL3NyYy9zaGFyZWQudHMiLCAiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL3Jlc3VsdC50cyIsICIuLi8uLi9jb252ZXJ0ZXIvc3JjL2NvbGxlY3Rpb24udHMiLCAiLi4vLi4vY29udmVydGVyL3NyYy9jcmVhdG9ycy50cyIsICIuLi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Xhwb3J0IGNvbnN0IGludG9JbmZyYSA9IChcbiAgICAgIGlucHV0OiBPcHRpb248SW5wdXRDb2xsZWN0aW9uPiB8IHVuZGVmaW5lZCxcbiAgICApOiBPcHRpb248SW50ZXJuYWxDb2xsZWN0aW9uPiA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBudWxsO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4ge1xuICAgICAgICBrZXk6IGlucHV0LnRvUHVibGljS2V5KCksXG4gICAgICAgIHZlcmlmaWVkOiBmYWxzZSxcbiAgICAgIH07XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlciA9IChcbiAgICAgIG91dHB1dDogT3B0aW9uPEludGVybmFsQ29sbGVjdGlvbj4sXG4gICAgKTogQ29sbGVjdGlvblR5cGUgfCB1bmRlZmluZWQgPT4ge1xuICAgICAgaWYgKCFvdXRwdXQpIHtcbiAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIHtcbiAgICAgICAgYWRkcmVzczogb3V0cHV0LmtleS50b1N0cmluZygpLFxuICAgICAgICB2ZXJpZmllZDogb3V0cHV0LnZlcmlmaWVkLFxuICAgICAgfTtcbiAgICB9O1xuICB9XG5cbiAgZXhwb3J0IG5hbWVzcGFjZSBDb2xsZWN0aW9uTWludCB7XG4gICAgZXhwb3J0IGNvbnN0IGludG9Vc2VyID0gKG91dHB1dDogR3JvdXBpbmdbXSk6IFB1YmtleSA9PiB7XG4gICAgICBjb25zdCByZXMgPSBvdXRwdXQuZmluZCgodmFsdWUpID0+IHtcbiAgICAgICAgaWYgKHZhbHVlLmdyb3VwX2tleSA9PT0gJ2NvbGxlY3Rpb24nKSB7XG4gICAgICAgICAgcmV0dXJuIHZhbHVlLmdyb3VwX3ZhbHVlO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIHJldHVybiByZXMgPyByZXMuZ3JvdXBfdmFs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AgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ25hbWUnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLm5hbWUpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNOYW1lKG1ldGFkYXRhLm5hbWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc3ltYm9sJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5zeW1ib2wpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTeW1ib2wobWV0YWRhdGEuc3ltYm9sKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgICAgIGlmIChyZXMgJiYgcmVzLmlzRXJyKSB7XG4gICAgICAgICAgcmVzdWx0cy5wdXNoKC4uLnJlcy5lcnJvci5kZXRhaWxzKTtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgICBpZiAocmV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ubmVjdGlvbigpO1xuICAgICAgY29uc3QgaW5mbyA9IGF3YWl0IGNvbm5lY3Rpb24uZ2V0UGFyc2VkVG9rZW5BY2NvdW50c0J5T3duZXIoXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIHtcbiAgICAgICAgICBwcm9ncmFtSWQ6IFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgIH0sXG4gICAgICApO1xuXG4gICAgICBjb25zdCBkYXRhcyA9IGluZm8udmFsdWUubWFwKGFzeW5jIChkKSA9PiB7XG4gICAgICAgIGNvbnN0IG1pbnQgPSBkLmFjY291bnQuZGF0YS5wYXJzZWQuaW5mby5taW50IGFzIFB1YmtleTtcbiAgICAgICAgY29uc3QgdG9rZW5BbW91bnQgPSBkLmFjY291bnQuZGF0YS5wYXJzZWQuaW5mby50b2tlbkFtb3VudFxuICAgICAgICAgIC5hbW91bnQgYXMgc3RyaW5nO1xuICAgICAgICBpZiAodG9rZW5BbW91bnQgPT09ICcxJykge1xuICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gTWV0YWRhdGEuZnJvbUFjY291bnRBZGRyZXNzKFxuICAgICAgICAgIGNvbm5lY3Rpb24sXG4gICAgICAgICAgQWNjb3VudC5QZGEuZ2V0TWV0YWRhdGEobWludCksXG4gICAgICAgIClcbiAgICAgICAgICAudGhlbihhc3luYyAobWV0YWRhdGEpID0+IHtcbiAgICAgICAgICAgIC8qIGVzbGludC1kaXNhYmxlIEB0eXBlc2NyaXB0LWVzbGludC9uby1leHBsaWNpdC1hbnkgKi9cbiAgICAgICAgICAgIHJldHVybiBmZXRjaFJldHJ5KG1ldGFkYXRhLmRhdGEudXJpKS50aGVuKChqc29uOiBhbnkpID0+IHtcbiAgICAgICAgICAgICAgcmV0dXJuIGNvbnZlcnRlcihtZXRhZGF0YSwganNvbiwgdG9rZW5BbW91bnQpO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfSlcbiAgIC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AgIG1pbnQsXG4gICAgICAgIG93bmVyUHVibGljS2V5LnRvU3RyaW5nKCksXG4gICAgICAgIGZlZVBheWVyLFxuICAgICAgKTtcblxuICAgICAgY29uc3QgZGVzdFRva2VuID0gYXdhaXQgQWNjb3VudC5Bc3NvY2lhdGVkLm1ha2VPckNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICBtaW50LFxuICAgICAgICBkZXN0LFxuICAgICAgICBmZWVQYXllcixcbiAgICAgICk7XG5cbiAgICAgIGxldCBpbnN0MjtcbiAgICAgIGNvbnN0IGJsb2NraGFzaE9iaiA9IGF3YWl0IE5vZGUuZ2V0Q29ubmVjdGlvbigpLmdldExhdGVzdEJsb2NraGFzaCgpO1xuXG4gICAgICBjb25zdCB0eCA9IG5ldyBUcmFuc2FjdGlvbih7XG4gICAgICAgIGxhc3RWYWxpZEJsb2NrSGVpZ2h0OiBibG9ja2hhc2hPYmoubGFzdFZhbGlkQmxvY2tIZWlnaHQsXG4gICAgICAgIGJsb2NraGFzaDogYmxvY2toYXNoT2JqLmJsb2NraGFzaCxcbiAgICAgICAgZmVlUGF5ZXI6IGZlZVBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICB9KTtcblxuICAgICAgaW5zdDIgPSBjcmVhdGVUcmFuc2ZlckNoZWNrZWRJbnN0cnVjdGlvbihcbiAgICAgICAgc291cmNlVG9rZW4udG9rZW5BY2NvdW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgZGVzdFRva2VuLnRva2VuQWNjb3VudC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgQ2FsY3VsYXRvci5jYWxjdWxhdGVBbW91bnQoYW1vdW50LCBtaW50RGVjaW1hbCksXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICBbb3duZXIudG9LZXlwYWlyKCldLFxuICAgICAgKTtcblxuICAgICAgLy8gcmV0dXJuIGF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RJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgdG9rZW5Bc3NvY2lhdGVkLFxuICAgICAgICBvd25lcixcbiAgICAgICAgQ2FsY3VsYXRlLmNhbGN1bGF0ZUFtb3VudCh0b3RhbEFtb3VudCwgbWludERlY2ltYWwpLFxuICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlQ3JlYXRlTWV0YWRhdGFBY2NvdW50VjNJbnN0cnVjdGlvbihcbiAgICAgICAge1xuICAgICAgICAgIG1ldGFkYXRhOiBtZXRhZGF0YVBkYSxcbiAgICAgICAgICBtaW50LFxuICAgICAgICAgIG1pbnRBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICAgIHBheWVyOiBmZWVQYXllcixcbiAgICAgICAgICB1cGRhdGVBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICB9LFxuICAgICAgICB7XG4gICAgICAgICAgY3JlYXRlTWV0YWRhdGFBY2NvdW50QXJnc1YzOiB7XG4gICAgICAgICAgICBkYXRhOiB0b2tlbk1ldGFkYXRhLFxuICAgICAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgICAgICAgY29sbGVjdGlvbkRldGFpbHM6IG51bGwsXG4gICAgICAgICAgfSxcbiAgICAgICAgfSxcbiAgICAgICksXG4gICAgKTtcbiAgICByZXR1cm4gaW5zdHJ1Y3Rpb25zO1xuICB9O1xuXG4gIC8qKlxuICAgKiBTUEwtVE9LRU4gbWludFxuICAgKlxuICAgKiBAcGFyYW0ge1NlY3JldH0gb3duZXIgICAgICAvLyB0b2tlbiBvd25lciBTZWNyZXRcbiAgICogQHBhcmFtIHtudW1iZXJ9IHRvdGFsQW1vdW50IC8vIHRvdGFsIG51bWJlclxuICAgKiBAcGFyYW0ge251bWJlcn0gbWludERlY2ltYWwgLy8gdG9rZW4gZGVjaW1hbFxuICAgKiBAcGFyYW0ge0lucHV0VG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ovXG4gIGV4cG9ydCBjb25zdCB0cmFuc2ZlciA9IGFzeW5jIChcbiAgICBtaW50OiBQdWJrZXksXG4gICAgb3duZXI6IFB1YmtleSxcbiAgICBkZXN0OiBQdWJrZXksXG4gICAgb3duZXJPck11bHRpc2lnOiBTZWNyZXRbXSxcbiAgICBhbW91bnQ6IG51bWJlcixcbiAgICBtaW50RGVjaW1hbDogbnVtYmVyLFxuICAgIG9wdGlvbnM6IFBhcnRpYWw8TWludE9wdGlvbnM+ID0ge30sXG4gICk6IFByb21pc2U8UmVzdWx0PENvbW1vblN0cnVjdHVyZSwgRXJyb3I+PiA9PiB7XG4gICAgcmV0dXJuIFRyeShhc3luYyAoKSA9PiB7XG4gICAgICBjb25zdCBwYXllciA9IG9wdGlvbnMuZmVlUGF5ZXIgPyBvcHRpb25zLmZlZVBheWVyIDogb3duZXJPck11bHRpc2lnWzBdO1xuICAgICAgY29uc3QgcGF5ZXJQdWJrZXkgPSBuZXcgQWNjb3VudC5LZXlwYWlyKHsgc2VjcmV0OiBwYXllciB9KTtcbiAgICAgIGNvbnN0IGtleXBhaXJzID0gb3duZXJPck11bHRpc2lnLm1hcCgocykgPT4gcy50b0tleXBhaXIoKSk7XG4gICAgICBjb25zdCBzb3VyY2VUb2tlbiA9IGF3YWl0IEFjY291bnQuQXNzb2NpYXRlZC5tYWtlT3JDcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgb3duZXIudG9TdHJpbmcoKSxcbiAgICAgICAgcGF5ZXJQdWJrZXkucHVia2V5LFxuICAgICAgKTtcblxuICAgICAgY29uc3QgZGVzdFRva2VuID0gYXdhaXQgQWNjb3VudC5Bc3NvY2lhdGVkLm1ha2VPckNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICBtaW50LFxuICAgICAgICBkZXN0LFxuICAgICAgICBwYXllclB1YmtleS5wdWJrZXksXG4gICAgICApO1xuXG4gICAgICBjb25zdCBpbnN0ID0gY3JlYXRlVHJhbnN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Y29tcHJlc3Npb24uY29tcHJlc3NlZCA9PT0gaXNDb21wcmVzc2VkKVxuICAgICAgICAubWFwKGFzeW5jIChpdGVtKSA9PiB7XG4gICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgIGNvbnN0IG9mZmNoYWluOiBPZmZjaGFpbiA9IGF3YWl0IGZldGNoT2ZmY2hhaW4oXG4gICAgICAgICAgICAgIGl0ZW0uY29udGVudC5qc29uX3VyaSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgICBjb25zdCBtZXJnZWQgPSB7XG4gICAgICAgICAgICAgIG9uY2hhaW46IGl0ZW0sXG4gICAgICAgICAgICAgIG9mZmNoYWluOiBvZmZjaGFpbixcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICByZXR1cm4gQ29udmVydGVyLk5mdC5pbnRvVXNlcihtZXJnZWQpO1xuICAgICAgICAgIH0gY2F0Y2ggKGVycikge1xuICAgICAgICAgICAgZGVidWdMb2coJyMgRmFpbGVkIGZldGNoIG9mZmNoYWluIHVybDogJywgaXRlbS5jb250ZW50Lmpzb25fdXJpKTtcbiAgICAgICAgICAgIHJldHVybiBDb252ZXJ0ZXIuTmZ0LmludG9Vc2VyKHtcbiAgICAgICAgICAgICAgb25jaGFpbjogaXRlbSxcbiAgICAgICAgICAgICAgb2ZmY2hhaW46IHt9LFxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfVxuICAgICAgICB9KSxcbiAgICApO1xuICAgIHJldHVybiB7XG4gICAgICBwYWdlOiBhc3NldHMudmFsdWUucGFnZSxcbiAgICAgIHRvdGFsOiBhc3NldHMudmFsdWUudG90YWwsXG4gICAgICBsaW1pdDogYXNzZXRzLnZhbHVlLmxpbWl0LFxuICAgICAgbWV0YWRhdGFzLFxuICAgIH07XG4gIH07XG5cbiAgLyoqXG4gICAqIEZpbmQgbmZ0IGJ5IGNvbGxlY3Rpb24gbWludFxuICAgKlxuICAgKiBAcGFyYW0ge1B1YmtleX0gY29sbGVjdGlvbk1pbnR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2goY3JlYXRlSW5pdGlhbGl6ZU1pbnRJbnN0cnVjdGlvbihtaW50LCAwLCBvd25lciwgb3duZXIpKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKGZlZVBheWVyLCBhdGEsIG93bmVyLCBtaW50KSxcbiAgICApO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goY3JlYXRlTWludFRvQ2hlY2tlZEluc3RydWN0aW9uKG1pbnQsIGF0YSwgb3duZXIsIDEsIDApKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlQ3JlYXRlTWV0YWRhdGFBY2NvdW50VjNJbnN0cnVjdGlvbihcbiAgICAgICAge1xuICAgICAgICAgIG1ldGFkYXRhOiB0b2tlbk1ldGFkYXRhUHVia2V5LFxuICAgICAgICAgIG1pbnQsXG4gICAgICAgICAgbWludEF1dGhvcml0eTogb3duZXIsXG4gICAgICAgICAgcGF5ZXI6IGZlZVBheWVyLFxuICAgICAgICAgIHVwZGF0ZUF1dGhvcml0eTogb3duZXIsXG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICBjcmVhdGVNZXRhZGF0YUFjY291bnRBcmdzVjM6IHtcbiAgICAgICAgICAgIGRhdGE6IG5mdE1ldGFkYXRhLFxuICAgICAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgICAgICAgY29sbGVjdGlvbkRldGFpbHM6IG51bGwsXG4gICAgICAgICAgfSxcbiAgICAgICAgfSxcbiAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlQ3JlYXRlTWFzdGVyRWRpdGlvblYzSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHtcbiAgICAgICAgICBlZGl0aW9uOiBtYXN0ZXJFZGl0aW9uUHVia2V5LFxuICAgICAgICAgIG1pbnQsXG4gICAgICAgICAgdXBkYXRlQXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBtaW50QXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBwYXllcjogZmVlUGF5ZXIsXG4gICAgICAgICAgbWV0YWRhdGE6IHRva2VuTWV0YWRhdGFQdWJrZXksXG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICBjcmVhdGVNYXN0ZXJFZGl0aW9uQXJnczoge1xuICAgICAgICAgICAgbWF4U3VwcGx5OiAwLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICApLFxuICAgICk7XG4gICAgcmV0dXJuIGluc3RydWN0aW9ucztcbiAgfTtcblxuICAvKipcbiAgICogVXBsb2FkIGNvbnRlbnQgYW5kIE5GVCBtaW50XG4gICAqXG4gICAqIEBwYXJhbSB7U2VjcmV0fSBvd25lciAgICAgICAgIC8vIG93bmVyJ3MgU2VjcmV0XG4gICAqIEBwYXJhbSB7SW5wdXROZnRNZXRhZGF0YX0gaW5wdXRcbiAgICoge1xuICAgKiAgIG5hbWU6IHN0cmluZyAgICAgICAgICAgICAgIC8vIG5mdCBjb250ZW50IG5hbWVcbiAgICogICBzeW1ib2w6IHN0cmluZyAgICAgICAgICAgICAvLyBuZnQgdGlja2VyIHN5bWJvbFxuICAgKiAgIGZpbGVQYXRoOiBzdHJpbmcgfCBGaWxlICAgIC8vIG5mdCB0aWNrZXIgc3ltYm9sXG4gICAqICAgcm95YWx0eTogbnVtYmVyICAgICAgICAgICAgLy8gcm95YWx0eSBwZXJjZW50YWdlXG4gICAqICAgc3RvcmFnZVR5cGU6ICdhcndlYXZlJ3wnbmZ0U3RvcmFnZScgLy8gRGVjZW50cmFsaXplZCBzdG9yYWdlXG4gICAqICAgZGVzY3JpcHRpb24/OiBzdHJpbmcgICAgICAgLy8gbmZ0IGNvbnRlbnQgZGVzY3JpcHRpb25cbiAgICogICBleHRlcm5hbF91cmw/OiBzdHJpbmcgICAgICAvLyBsYW5kaW5nIHBhZ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ICAgICBpc011dGFibGUsXG4gICAgICApO1xuXG4gICAgICAvLyBmcmVlemVBdXRob3JpdHlcbiAgICAgIGlmIChmcmVlemVBdXRob3JpdHkpIHtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgICAgY3JlYXRlRGVsZWFnYXRlKFxuICAgICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgICAgICBmcmVlemVBdXRob3JpdHkudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICAvLyBjb2xsZWN0aW9uIC0tLVxuICAgICAgaWYgKGlucHV0LmNvbGxlY3Rpb24pIHtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgICAgY3JlYXRlVmVyaWZ5U2l6ZWRDb2xsZWN0aW9uKFxuICAgICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgaW5wdXQuY29sbGVjdGlvbi50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGtleXBhaXJzID0gW293bmVyLnRvS2V5cGFpcigpLCBtaW50LnRvS2V5cGFpcigpXTtcblxuICAgICAgLy8gY3JlYXRvciAtLS1cbiAgICAgIGlmIChpbnB1dC5jcmVhdG9ycykge1xuICAgICAgICBpbnB1dC5jcmVhdG9ycy5mb3JFYWNoKChjcmVhdG9yKSA9PiB7XG4gICAgICAgICAgaWYgKEFjY291bnQuS2V5cGFpci5pc1NlY3JldChjcmVhdG9yLnNlY3JldCkpIHtcbiAgICAgICAgICAgIGNvbnN0IGNyZWF0b3JQdWJrZXkgPSBjcmVhdG9yLmFkZHJlc3MudG9QdWJsaWNLZXkoKTtcbiAgICAgICAgIC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RGVsZWFnYXRlKFxuICAgICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgb3duZXJQdWJsaWNrZXksXG4gICAgICAgICAgICBvcHRpb25zLmZyZWV6ZUF1dGhvcml0eS50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGJsb2NraGFzaE9iaiA9IGF3YWl0IE5vZGUuZ2V0Q29ubmVjdGlvbigpLmdldExhdGVzdEJsb2NraGFzaCgpO1xuICAgICAgY29uc3QgdHggPSBuZXcgVHJhbnNhY3Rpb24oe1xuICAgICAgICBsYXN0VmFsaWRCbG9ja0hlaWdodDogYmxvY2toYXNoT2JqLmxhc3RWYWxpZEJsb2NrSGVpZ2h0LFxuICAgICAgICBibG9ja2hhc2g6IGJsb2NraGFzaE9iai5ibG9ja2hhc2gsXG4gICAgICAgIGZlZVBheWVyOiBmZWVQYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgfSk7XG5cbiAgICAgIGluc3RzLmZvckVhY2goKGluc3QpID0+IHR4LmFkZChpbnN0KSk7XG4gICAgICB0eC5yZWNlbnRCbG9ja2hhc2ggPSBibG9ja2hhc2hPYmouYmxvY2toYXNoO1xuICAgICAgW293bmVyLCBtaW50XS5mb3JFYWNoKChzaWduZXIpID0+IHR4LnBhcnRpYWxTaWduKHNpZ25lci50b0tleXBhaXIoKSkpO1xuXG4gICAgICBjb25zdCBzZXJpYWxpemVkVHggPSB0eC5zZXJpYWxpemUoe1xuICAgICAgICByZXF1aXJlQWxsU2lnbmF0dXJlczogZmFsc2UsXG4gICAgICB9KTtcbiAgICAgIGNvbnN0IGhleCA9IHNlcmlhbGl6ZWRUeC50b1N0cmluZygnaGV4Jyk7XG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5QYXJ0aWFsU2lnbihoZXgsIG1pbnQucHVia2V5KTtcbiAgICB9KTtcbiAgfTtcbn1cbiIs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rpb25NaW50ID0gQWNjb3VudC5LZXlwYWlyLmNyZWF0ZSgpO1xuICAgICAgY29uc3QgY29sbGVjdGlvbk1ldGFkYXRhQWNjb3VudCA9IEFjY291bnQuUGRhLmdldE1ldGFkYXRhKFxuICAgICAgICBjb2xsZWN0aW9uTWludC5wdWJrZXksXG4gICAgICApO1xuXG4gICAgICBjb25zdCBpbnN0cnVjdGlvbnMgPSBhd2FpdCBNaW50LmNyZWF0ZU1pbnQoXG4gICAgICAgIGNvbGxlY3Rpb25NaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICBkYXRhdjIsXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgKTtcblxuICAgICAgLy8gZnJlZXplQXV0aG9yaXR5XG4gICAgICBpZiAoZnJlZXplQXV0aG9yaXR5KSB7XG4gICAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICAgIE1pbnQuY3JlYXRlRGVsZWFnYXRlKFxuICAgICAgICAgICAgY29sbGVjdGlvbk1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICAgICAgZnJlZXplQXV0aG9yaXR5LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgY29sbGVjdGlvbnMgPSB7XG4gICAgICAgIGNvbGxlY3Rpb25NZXRhZGF0YTogY29sbGVjdGlvbk1ldGFkYXRhQWNjb3VudCxcbiAgICAgICAgY29sbGVjdGlvbkF1dGhvcml0eTogb3duZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICBjb2xsZWN0aW9uTWludDogY29sbGVjdGlvbk1pbnQudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgfTtcblxuICAgICAgaW5zdHJ1Y3Rpb25zL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Z3VsYXJOZnQiLCAiQ29udmVydGVyIiwgIkFjY291bnQiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgImdldEFzc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jIiwgIlJlZ3VsYXJOZnQiLCAiQWNjb3VudCIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiUmVndWxhck5mdCIsICJTcGxUb2tlbiIsICJSZWd1bGFyTmZ0Il0KfQo= \ No newline at end of file diff --git a/packages/suite-sol-native/dist/index.js b/packages/suite-sol-native/dist/index.js index 73d0e771d..3d30fc68b 100644 --- a/packages/suite-sol-native/dist/index.js +++ b/packages/suite-sol-native/dist/index.js @@ -1742,4 +1742,4 @@ var SolNative5 = { 0 && (module.exports = { SolNative }); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uLy4uL3N1aXRlLXV0aWxzL3NyYy9jb25zdGFudHMudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvYmF0Y2gudHMiLCAiLi4vLi4vbm9kZS9zcmMvaW5kZXgudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY29tbW9uLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL21pbnQudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvcGFydGlhbC1zaWduLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2NhbGN1bGF0ZS10eHNpemUudHMiLCAiLi4vLi4vZ2xvYmFsL3NyYy9pbmRleC50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9rZXlwYWlyLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL3BkYS50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9pbmRleC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1id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ZSBDcmVhdG9ycyB7XG4gICAgZXhwb3J0IGNvbnN0IGludG9JbmZyYSA9IChcbiAgICAgIGlucHV0OiBPcHRpb248SW5wdXRDcmVhdG9yc1tdPiB8IHVuZGVmaW5lZCxcbiAgICApOiBPcHRpb248SW50ZXJuYWxDcmVhdG9yc1tdPiA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBudWxsO1xuICAgICAgfVxuICAgICAgcmV0dXJuIGlucHV0Lm1hcCgoZGF0YSkgPT4ge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIGFkZHJlc3M6IGRhdGEuYWRkcmVzcy50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIHNoYXJlOiBkYXRhLnNoYXJlLFxuICAgICAgICAgIHZlcmlmaWVkOiBmYWxzZSxcbiAgICAgICAgfTtcbiAgICAgIH0pO1xuICAgIH07XG5cbiAgICBleHBvcnQgY29uc3QgaW50b0NvbXByZXNzZWROZnRJbmZyYSA9IChcbiAgICAgIGlucHV0OiBPcHRpb248SW5wdXRDcmVhdG9yc1tdPiB8IHVuZGVmaW5lZCxcbiAgICApOiBJbnRlcm5hbENyZWF0b3JzW10gPT4ge1xuICAgICAgaWYgKCFpbnB1dCkge1xuICAgICAgICByZXR1cm4gW107XG4gICAgICB9XG4gICAgICByZXR1cm4gaW5wdXQhLm1hcCgoZGF0YSkgPT4ge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIGFkZHJlc3M6IGRhdGEuYWRkcmVzcy50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIHNoYXJlOiBkYXRhLnNoYXJlLFxuICAgICAgICAgIHZlcmlmaWVkOiBmYWxzZSxcbiAgICAgICAgfTtcbiAgICAgIH0pO1xuICAgIH07XG5cbiAgICBleHBvcnQgY29uc3QgaW50b1VzZXIgPSAoXG4gICAgICBvdXRwdXQ6IE9wdGlvbjxJbnRlcm5hbENyZWF0b3JzW10+LFxuICAgICk6IENyZWF0b3JzW10g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jYXNlICdzZWxsZXJGZWVCYXNpc1BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0YWRhdGEubmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzeW1ib2wnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLnN5bWJvbCkge1xuICAgICAgICAgICAgICByZXMgPSBpc1N5bWJvbChtZXRhZGF0YS5zeW1ib2wpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHJlcyAmJiByZXMuaXNFcnIpIHtcbiAgICAgICAgICByZXN1bHRzLnB1c2goLi4ucmVzLmVycm9yLmRldGFpbHMpO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIGlmIChyZXN1bHRzLmxlbmd0aCA+IDApIHtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9XG4gICAgICAgICAgJ0NhdWdodCBpbiB0aGUgdmFsaWRhdGlvbiBlcnJvcnMuIHNlZSBpbmZvcm1hdGlvbiBlLmc6IGVycjxWYWxpZGF0b3JFcnJvcj4uZGV0YWlscyc7XG4gICAgICAgIHRocm93IG5ldyBWYWxpZGF0b3JFcnJvcihtZXNzYWdlLCByZXN1bHRzKTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBNZXNzYWdlLlNVQ0NFU1M7XG4gICAgfSk7XG4gIH07XG5cbiAgdHlwZSBQaWNrTmZ0U3Rv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ICAgICAgICAgICAgICAgICAgaXNQYXJzZWRJbnN0cnVjdGlvbihpbnN0cnVjdGlvbikgJiZcbiAgICAgICAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLlRyYW5zZmVyLnByb2dyYW0uaW5jbHVkZXMoXG4gICAgICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbi5wcm9ncmFtLFxuICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlciA9IGluc3RydWN0aW9uO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICk7XG5cbiAgICAgICAgICAgICAgICAvLyBzcGwtdG9rZW4gb3Igc3lzdGVtXG4gICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlciAmJlxuICAgICAgICAgICAgICAgICAgbW9kdWxlTmFtZSAhPT0gaW5zdHJ1Y3Rpb25UcmFuc2ZlclsncHJvZ3JhbSddXG4gICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICBkZWJ1Z0xvZyhcbiAgICAgICAgICAgICAgICAgICAgJyMgRmlsdGVyVHlwZS5NZW1vIGJyZWFrIGluc3RydWN0aW9uOiAnLFxuICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyLFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vIGZldGNoIG1lbW8gb25seSB0cmFuc2FjdGlvblxuICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuTWVtby5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIsXG4gICAgICAgICAgICAgICAgICBwb3N0VG9rZW5BY2NvdW50LFxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXNlIEZpbHRlclR5cGUuT25seU1lbW86IHtcbiAgICAgICAgICAgICAgaWYgKEZpbHRlck9wdGlvbnMuTWVtby5wcm9ncmFtLmluY2x1ZGVzKGluc3RydWN0aW9uLnByb2dyYW0pKSB7XG4gICAgICAgICAgICAgICAgbGV0IGluc3RydWN0aW9uVHJhbnNmZXI7XG5cbiAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLk1lbW8uaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyLFxuICAgICAgICAgICAgICAgICAgcG9zdFRva2VuQWNjb3VudCxcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLk1pbnQ6IHtcbiAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuTWludC5wcm9ncmFtLmluY2x1ZGVzKGluc3RydWN0aW9uLnByb2dyYW0pICYmXG4gICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5NaW50LmFjdGlvbi5pbmNsdWRlcyhcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLnBhcnNlZC50eXBlIGFzIHN0cmluZyxcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuTWludC5pbnRvVXNlclNpZGUoaW5zdHJ1Y3Rpb24sIHR4TWV0YSk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXNlIEZpbHRlclR5cGUuVHJhbnNmZXI6XG4gICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICBtb2R1bGVOYW1lID09PSBpbnN0cnVjdGlvbi5wcm9ncmFtICYmXG4gICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5UcmFuc2Zlci5hY3Rpb24uaW5jbHVkZXMoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbi5wYXJzZWQudHlwZSBhcyBzdHJpbmcsXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICBpZiAoaW5zdHJ1Y3Rpb24ucGFyc2VkLnR5cGUgPT09ICd0cmFuc2ZlckNoZWNrZWQnKSB7XG4gICAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLlRyYW5zZmVyQ2hlY2tlZC5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICAgIHBvc3RUb2tlbkFjY291bnQsXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLlRyYW5zZmVyLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9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E5vZGUuZ2V0Q29ubmVjdGlvbigpO1xuICAgICAgY29uc3QgcGF5ZXIgPSBvcHRpb25zLmZlZVBheWVyID8gb3B0aW9ucy5mZWVQYXllciA6IG11bHRpc2lnWzBdO1xuICAgICAgY29uc3Qga2V5cGFpcnMgPSBtdWx0aXNpZy5tYXAoKHMpID0+IHMudG9LZXlwYWlyKCkpO1xuICAgICAgY29uc3Qgd3JhcHBlZCA9IGF3YWl0IGNyZWF0ZVdyYXBwZWROYXRpdmVBY2NvdW50KFxuICAgICAgICBjb25uZWN0aW9uLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgcGFyc2VJbnQoYCR7YW1vdW50LnRvTGFtcG9ydHMoKX1gLCBSQURJWCksXG4gICAgICApO1xuXG4gICAgICBkZWJ1Z0xvZygnIyB3cmFwcGVkIHNvbDogJywgd3JhcHBlZC50b0Jhc2U1OCgpKTtcblxuICAgICAgY29uc3QgaW5zdHJ1Y3Rpb25zID0gW107XG5cbiAgICAgIGNvbnN0IHRva2VuID0gYXdhaXQgY3JlYXRlTWludChcbiAgICAgICAgY29ubmVjdGlvbixcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIDAsXG4gICAgICApO1xuXG4gICAgICBjb25zdCBzb3VyY2VUb2tlbiA9IGF3YWl0IEFjY291bnQuQXNzb2NpYXRlZC5yZXRyeUdldE9yQ3JlYXRlKFxuICAgICAgICB0b2tlbi50b1N0cmluZygpLFxuICAgICAgICBvd25lcixcbiAgICAgICAgcGF5ZXIsXG4gICAgICApO1xuXG4gICAgICBkZWJ1Z0xvZygnIyBzb3VyY2VUb2tlbjogJywgc291cmNlVG9rZW4pO1xuXG4gICAgICBjb25zdCBkZXN0VG9rZW4gPSBhd2FpdCBBY2NvdW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uPiB8IHVuZGVmaW5lZCxcbiAgICApOiBPcHRpb248SW50ZXJuYWxDb2xsZWN0aW9uPiA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBudWxsO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4ge1xuICAgICAgICBrZXk6IGlucHV0LnRvUHVibGljS2V5KCksXG4gICAgICAgIHZlcmlmaWVkOiBmYWxzZSxcbiAgICAgIH07XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlciA9IChcbiAgICAgIG91dHB1dDogT3B0aW9uPEludGVybmFsQ29sbGVjdGlvbj4sXG4gICAgKTogQ29sbGVjdGlvblR5cGUgfCB1bmRlZmluZWQgPT4ge1xuICAgICAgaWYgKCFvdXRwdXQpIHtcbiAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIHtcbiAgICAgICAgYWRkcmVzczogb3V0cHV0LmtleS50b1N0cmluZygpLFxuICAgICAgICB2ZXJpZmllZDogb3V0cHV0LnZlcmlmaWVkLFxuICAgICAgfTtcbiAgICB9O1xuICB9XG5cbiAgZXhwb3J0IG5hbWVzcGFjZSBDb2xsZWN0aW9uTWludCB7XG4gICAgZXhwb3J0IGNvbnN0IGludG9Vc2VyID0gKG91dHB1dDogR3JvdXBpbmdbXSk6IFB1YmtleSA9PiB7XG4gICAgICBjb25zdCByZXMgPSBvdXRwdXQuZmluZCgodmFsdWUpID0+IHtcbiAgICAgICAgaWYgKHZhbHVlLmdyb3VwX2tleSA9PT0gJ2NvbGxlY3Rpb24nKSB7XG4gICAgICAgICAgcmV0dXJuIHZhbHVlLmdyb3VwX3ZhbHVlO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIHJldHVybiByZXMgPyByZXMuZ3JvdXBfdmFsdWUgOiAnJztcbiAgICB9O1xuICB9XG59XG4iLCAiLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZX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aW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ25hbWUnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLm5hbWUpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNOYW1lKG1ldGFkYXRhLm5hbWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc3ltYm9sJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5zeW1ib2wpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTeW1ib2wobWV0YWRhdGEuc3ltYm9sKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgICAgIGlmIChyZXMgJiYgcmVzLmlzRXJyKSB7XG4gICAgICAgICAgcmVzdWx0cy5wdXNoKC4uLnJlcy5lcnJvci5kZXRhaWxzKTtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgICBpZiAocmVzdWx0cy5sZW5ndGggPiAwKSB7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPVxuICAgICAgICAgICdDYXVn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cmVsYXRpb25hbCBtZW1vXG4gICAgICAgICAgICAgICAgdHhNZXRhLnRyYW5zYWN0aW9uLm1lc3NhZ2UuaW5zdHJ1Y3Rpb25zLmZvckVhY2goXG4gICAgICAgICAgICAgICAgICAoaW5zdHJ1Y3Rpb24pID0+IHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgIGlzUGFyc2VkSW5zdHJ1Y3Rpb24oaW5zdHJ1Y3Rpb24pICYmXG4gICAgICAgICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5UcmFuc2Zlci5wcm9ncmFtLmluY2x1ZGVzKFxuICAgICAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24ucHJvZ3JhbSxcbiAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIgPSBpbnN0cnVjdGlvbjtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICApO1xuXG4gICAgICAgICAgICAgICAgLy8gc3BsLXRva2VuIG9yIHN5c3RlbVxuICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIgJiZcbiAgICAgICAgICAgICAgICAgIG1vZHVsZU5hbWUgIT09IGluc3RydWN0aW9uVHJhbnNmZXJbJ3Byb2dyYW0nXVxuICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgZGVidWdMb2coXG4gICAgICAgICAgICAgICAgICAgICcjIEZpbHRlclR5cGUuTWVtbyBicmVhayBpbnN0cnVjdGlvbjogJyxcbiAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlcixcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAvLyBmZXRjaCBtZW1vIG9ubHkgdHJhbnNhY3Rpb25cbiAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLk1lbW8uaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyLFxuICAgICAgICAgICAgICAgICAgcG9zdFRva2VuQWNjb3VudCxcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLk9ubHlNZW1vOiB7XG4gICAgICAgICAgICAgIGlmIChGaWx0ZXJPcHRpb25zLk1lbW8ucHJvZ3JhbS5pbmNsdWRlcyhpbnN0cnVjdGlvbi5wcm9ncmFtKSkge1xuICAgICAgICAgICAgICAgIGxldCBpbnN0cnVjdGlvblRyYW5zZmVyO1xuXG4gICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5NZW1vLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlcixcbiAgICAgICAgICAgICAgICAgIHBvc3RUb2tlbkFjY291bnQsXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5NaW50OiB7XG4gICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLk1pbnQucHJvZ3JhbS5pbmNsdWRlcyhpbnN0cnVjdGlvbi5wcm9ncmFtKSAmJlxuICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuTWludC5hY3Rpb24uaW5jbHVkZXMoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbi5wYXJzZWQudHlwZSBhcyBzdHJpbmcsXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLk1pbnQuaW50b1VzZXJTaWRlKGluc3RydWN0aW9uLCB0eE1ldGEpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLlRyYW5zZmVyOlxuICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgbW9kdWxlTmFtZSA9PT0gaW5zdHJ1Y3Rpb24ucHJvZ3JhbSAmJlxuICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuVHJhbnNmZXIuYWN0aW9uLmluY2x1ZGVzKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24ucGFyc2VkLnR5cGUgYXMgc3RyaW5nLFxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgaWYgKGluc3RydWN0aW9uLnBhcnNlZC50eXBlID09PSAndHJhbnNmZXJDaGVja2VkJykge1xuICAgICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5UcmFuc2ZlckNoZWNrZWQuaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgICBwb3N0VG9rZW5BY2NvdW50LFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5UcmFuc2Zlci5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgICByZXR1cm4gaGlzdG9yeTtcbiAgICB9O1xufVxuIiwgImltcG9ydCB7IFBhcnNlZEFjY291bnREYXRhIH0gZnJvbSAnQHNvbGFuYS93ZWIzLmpzJztcbmltcG9ydCB7IFJlc3VsdCwgVHJ5IH0gZnJvbSAnfi9zdWl0ZS11dGlscyc7XG5pbXBvcnQgeyBOb2RlIH0gZnJvbSAnfi9ub2RlJztcbmltcG9ydCB7IE93bmVySW5mbywgUHVia2V5IH0gZnJvbSAnfi90eXBlcy9hY2NvdW50JztcbmltcG9ydCB7IFRyYW5zYWN0aW9uRmlsdGVyIH0gZnJvbSAnfi90cmFuc2FjdGlvbi1maWx0ZXInO1xuXG5leHBvcnQgbmFtZXNwYWNlIFNvbE5hdGl2ZSB7XG4gIC8qKlxuICAgKiBGaW5kIG5mdCBieSBvd25lciBhZGRyZXNzXG4gICAqXG4gICAqIEBwYXJhbSB7UHVia2V5fSBvd25lclxuICAgKiBAcmV0dXJuIFByb21pc2U8UmVzdWx0PE93bmVySW5mbywgRXJyb3I+PlxuICAgKi9cbiAgZXhwb3J0IGNvbnN0IGZpbmRCeU93bmVyID0gYXN5bmMgKFxuICAgIG93bmVyOiBQdWJrZXksXG4gICk6IFByb21pc2U8UmVzdWx0PE93bmVySW5mbywgRXJyb3I+PiA9PiB7XG4gICAgcmV0dXJuIFRyeShhc3luYyAoKSA9PiB7XG4gICAgICBjb25zdCByZXMgPSBhd2FpdCBOb2RlLmdldENvbm5lY3Rpb24oKS5nZXRQYXJzZWRBY2NvdW50SW5mbyhcbiAgICAgICAgb3duZXIudG9QdWJsaWN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NyZWF0ZShcbiAgICAgICAgdG9rZW4udG9TdHJpbmcoKSxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIHBheWVyLFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgc291cmNlVG9rZW46ICcsIHNvdXJjZVRva2VuKTtcblxuICAgICAgY29uc3QgZGVzdFRva2VuID0gYXdhaXQgQWNjb3VudC5Bc3NvY2lhdGVkLnJldHJ5R2V0T3JDcmVhdGUoXG4gICAgICAgIHRva2VuLnRvU3RyaW5nKCksXG4gICAgICAgIHdyYXBwZWQudG9TdHJpbmcoKSxcbiAgICAgICAgcGF5ZXIsXG4gICAgICApO1xuXG4gICAgICBkZWJ1Z0xvZygnIyBkZXN0VG9rZW46ICcsIGRlc3RUb2tlbik7XG5cbiAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICBjcmVhdGVUcmFuc2Zlckluc3RydWN0aW9uKFxuICAgICAgICAgIHNvdXJjZVRva2VuLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgZGVzdFRva2VuLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBwYXJzZUludChgJHthbW91bnR9YCwgUkFESVgpLCAvLyBObyBsYW1wb3J0cywgaXRzIHNvbFxuICAgICAgICAgIGtleXBhaXJzLFxuICAgICAgICApLFxuICAgICAgKTtcblxuICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgIGNyZWF0ZUNsb3NlQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHdyYXBwZWQsXG4gICAgICAgICAgZGVzdC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAga2V5cGFpcnMsXG4gICAgICAgICksXG4gICAgICApO1xuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb24oXG4gICAgICAgIGluc3RydWN0aW9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29udmVydGVyIiwgIk5mdCIsICJDb252ZXJ0ZXIiLCAiTWVtbyIsICJDb252ZXJ0ZXIiLCAiTWludCIsICJDb252ZXJ0ZXIiLCAiUmVndWxhck5mdE1ldGFkYXRhIiwgIkNvbnZlcnRlciIsICJQcm9wZXJ0aWVzIiwgIkNvbnZlcnRlciIsICJVc2VzIiwgIkNvbnZlcnRlciIsICJUb2tlbk1ldGFkYXRhIiwgIkNvbnZlcnRlciIsICJUcmFuc2ZlckNoZWNrZWQiLCAiQ29udmVydGVyIiwgIlRyYW5zZmVyIiwgIkNvbnZlcnRlciIsICJWYWxpZGF0b3IiLCAiTWVzc2FnZSIsICJDb252ZXJ0ZXIiLCAiU2lnbmF0dXJlcyIsICJUcmFuc2FjdGlvbkZpbHRlciIsICJpbnN0cnVjdGlvbiIsICJDb252ZXJ0ZXIiLCAiU29sTmF0aXZlIiwgImltcG9ydF93ZWIzIiwgIlNvbE5hdGl2ZSIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiaW1wb3J0X3dlYjMiLCAiU29sTmF0aXZlIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJTb2xOYXRpdmUiLCAiQWNjb3VudCIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiU29sTmF0aXZlIl0KfQo= \ No newline at end of file diff --git a/packages/suite-sol-native/dist/index.mjs b/packages/suite-sol-native/dist/index.mjs index 318ee6089..4d39814fa 100644 --- a/packages/suite-sol-native/dist/index.mjs +++ b/packages/suite-sol-native/dist/index.mjs @@ -1724,4 +1724,4 @@ var SolNative5 = { export { SolNative5 as SolNative }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9iYXRjaC50cyIsICIuLi8uLi9ub2RlL3NyYy9pbmRleC50cyIsICIuLi8uL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GludG9JbmZyYSA9IChcbiAgICAgIGlucHV0OiBPcHRpb248SW5wdXRDcmVhdG9yc1tdPiB8IHVuZGVmaW5lZCxcbiAgICApOiBPcHRpb248SW50ZXJuYWxDcmVhdG9yc1tdPiA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBudWxsO1xuICAgICAgfVxuICAgICAgcmV0dXJuIGlucHV0Lm1hcCgoZGF0YSkgPT4ge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIGFkZHJlc3M6IGRhdGEuYWRkcmVzcy50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIHNoYXJlOiBkYXRhLnNoYXJlLFxuICAgICAgICAgIHZlcmlmaWVkOiBmYWxzZSxcbiAgICAgICAgfTtcbiAgICAgIH0pO1xuICAgIH07XG5cbiAgICBleHBvcnQgY29uc3QgaW50b0NvbXByZXNzZWROZnRJbmZyYSA9IChcbiAgICAgIGlucHV0OiBPcHRpb248SW5wdXRDcmVhdG9yc1tdPiB8IHVuZGVmaW5lZCxcbiAgICApOiBJbnRlcm5hbENyZWF0b3JzW10gPT4ge1xuICAgICAgaWYgKCFpbnB1dCkge1xuICAgICAgICByZXR1cm4gW107XG4gICAgICB9XG4gICAgICByZXR1cm4gaW5wdXQhLm1hcCgoZGF0YSkgPT4ge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIGFkZHJlc3M6IGRhdGEuYWRkcmVzcy50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIHNoYXJlOiBkYXRhLnNoYXJlLFxuICAgICAgICAgIHZlcmlmaWVkOiBmYWxzZSxcbiAgICAgICAgfTtcbiAgICAgIH0pO1xuICAgIH07XG5cbiAgICBleHBvcnQgY29uc3QgaW50b1VzZXIgPSAoXG4gICAgICBvdXRwdXQ6IE9wdGlvbjxJbnRlcm5hbENyZWF0b3JzW10+LFxuICAgICk6IENyZWF0b3JzW10gfCB1bmRlZmluZWQgPT4ge1xuICAgICAgaWYgKCFvdXR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AgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0YWRhdGEubmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzeW1ib2wnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLnN5bWJvbCkge1xuICAgICAgICAgICAgICByZXMgPSBpc1N5bWJvbChtZXRhZGF0YS5zeW1ib2wpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHJlcyAmJiByZXMuaXNFcnIpIHtcbiAgICAgICAgICByZXN1bHRzLnB1c2goLi4ucmVzLmVycm9yLmRldGFpbHMpO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIGlmIChyZXN1bHRzLmxlbmd0aCA+IDApIHtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9XG4gICAgICAgICAgJ0NhdWdodCBpbiB0aGUgdmFsaWRhdGlvbiBlcnJvcnMuIHNlZSBpbmZvcm1hdGlvbiBlLmc6IGVycjxWYWxpZGF0b3JFcnJvcj4uZGV0YWlscyc7XG4gICAgICAgIHRocm93IG5ldyBWYWxpZGF0b3JFcnJvcihtZXNzYWdlLCByZXN1bHRzKTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBNZXNzYWdlLlNVQ0NFU1M7XG4gICAgfSk7XG4gIH07XG5cbiAgdHlwZSBQaWNrTmZ0U3RvcmFnZSA9IFBpY2s8XG4gICAgT2ZmY2hhaW4sXG4g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lvbihpbnN0cnVjdGlvbikgJiZcbiAgICAgICAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLlRyYW5zZmVyLnByb2dyYW0uaW5jbHVkZXMoXG4gICAgICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbi5wcm9ncmFtLFxuICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlciA9IGluc3RydWN0aW9uO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICk7XG5cbiAgICAgICAgICAgICAgICAvLyBzcGwtdG9rZW4gb3Igc3lzdGVtXG4gICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlciAmJlxuICAgICAgICAgICAgICAgICAgbW9kdWxlTmFtZSAhPT0gaW5zdHJ1Y3Rpb25UcmFuc2ZlclsncHJvZ3JhbSddXG4gICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICBkZWJ1Z0xvZyhcbiAgICAgICAgICAgICAgICAgICAgJyMgRmlsdGVyVHlwZS5NZW1vIGJyZWFrIGluc3RydWN0aW9uOiAnLFxuICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyLFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vIGZldGNoIG1lbW8gb25seSB0cmFuc2FjdGlvblxuICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuTWVtby5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIsXG4gICAgICAgICAgICAgICAgICBwb3N0VG9rZW5BY2NvdW50LFxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXNlIEZpbHRlclR5cGUuT25seU1lbW86IHtcbiAgICAgICAgICAgICAgaWYgKEZpbHRlck9wdGlvbnMuTWVtby5wcm9ncmFtLmluY2x1ZGVzKGluc3RydWN0aW9uLnByb2dyYW0pKSB7XG4gICAgICAgICAgICAgICAgbGV0IGluc3RydWN0aW9uVHJhbnNmZXI7XG5cbiAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLk1lbW8uaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyLFxuICAgICAgICAgICAgICAgICAgcG9zdFRva2VuQWNjb3VudCxcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLk1pbnQ6IHtcbiAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuTWludC5wcm9ncmFtLmluY2x1ZGVzKGluc3RydWN0aW9uLnByb2dyYW0pICYmXG4gICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5NaW50LmFjdGlvbi5pbmNsdWRlcyhcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLnBhcnNlZC50eXBlIGFzIHN0cmluZyxcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuTWludC5pbnRvVXNlclNpZGUoaW5zdHJ1Y3Rpb24sIHR4TWV0YSk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXNlIEZpbHRlclR5cGUuVHJhbnNmZXI6XG4gICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICBtb2R1bGVOYW1lID09PSBpbnN0cnVjdGlvbi5wcm9ncmFtICYmXG4gICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5UcmFuc2Zlci5hY3Rpb24uaW5jbHVkZXMoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbi5wYXJzZWQudHlwZSBhcyBzdHJpbmcsXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICBpZiAoaW5zdHJ1Y3Rpb24ucGFyc2VkLnR5cGUgPT09ICd0cmFuc2ZlckNoZWNrZWQnKSB7XG4gICAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLlRyYW5zZmVyQ2hlY2tlZC5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICAgIHBvc3RUb2tlbkFjY291bnQsXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLlRyYW5zZmVyLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIHJldHVybiBoaXN0b3J5O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c3QgcGF5ZXIgPSBvcHRpb25zLmZlZVBheWVyID8gb3B0aW9ucy5mZWVQYXllciA6IG11bHRpc2lnWzBdO1xuICAgICAgY29uc3Qga2V5cGFpcnMgPSBtdWx0aXNpZy5tYXAoKHMpID0+IHMudG9LZXlwYWlyKCkpO1xuICAgICAgY29uc3Qgd3JhcHBlZCA9IGF3YWl0IGNyZWF0ZVdyYXBwZWROYXRpdmVBY2NvdW50KFxuICAgICAgICBjb25uZWN0aW9uLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgcGFyc2VJbnQoYCR7YW1vdW50LnRvTGFtcG9ydHMoKX1gLCBSQURJWCksXG4gICAgICApO1xuXG4gICAgICBkZWJ1Z0xvZygnIyB3cmFwcGVkIHNvbDogJywgd3JhcHBlZC50b0Jhc2U1OCgpKTtcblxuICAgICAgY29uc3QgaW5zdHJ1Y3Rpb25zID0gW107XG5cbiAgICAgIGNvbnN0IHRva2VuID0gYXdhaXQgY3JlYXRlTWludChcbiAgICAgICAgY29ubmVjdGlvbixcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIDAsXG4gICAgICApO1xuXG4gICAgICBjb25zdCBzb3VyY2VUb2tlbiA9IGF3YWl0IEFjY291bnQuQXNzb2NpYXRlZC5yZXRyeUdldE9yQ3JlYXRlKFxuICAgICAgICB0b2tlbi50b1N0cmluZygpLFxuICAgICAgICBvd25lcixcbiAgICAgICAgcGF5ZXIsXG4gICAgICApO1xuXG4gICAgICBkZWJ1Z0xvZygnIyBzb3VyY2VUb2tlbjogJywgc291cmNlVG9rZW4pO1xuXG4gICAgICBjb25zdCBkZXN0VG9rZW4gPSBhd2FpdCBBY2NvdW50LkFzc29jaWF0ZWQucmV0cnlHZXRPckNyZWF0ZShcbiAgICAgICAgdG9rZW4udG9TdHJpbmcoKSxcbiAgICAgICAgd3JhcHBlZC50b1N0cmluZygpLFxuICAgICAgICBwYXllcixcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGRlc3RUb2tlbjogJywgZGVzdFRva2VuKTtcblxuICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgIGNyZWF0ZVRyYW5zZmVySW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgc291cmNlVG9rZW4udG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBkZXN0VG9rZW4udG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIHBhcnNlSW50KGAke2Ftb3VudH1gLCBSQURJWCksIC8vIE5vIGxhbXBvcnRzLCBpdHMgc29sXG4gICAgICAgICAga2V5cGFpcnMsXG4gICAgICAgICksXG4gICAgICApO1xuXG4gICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgY3JlYXRlQ2xvc2VBY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgd3JhcHBlZCxcbiAgICAgICAgICBkZXN0LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBrZXlwYWlycyxcbiAgICAgICAgKSxcbiAgICAgICk7XG5cbiAgICAgIHJldHVybiBuZXcgVHJhbnNhY3Rpb25CdWlsZGVyLkNvbW1vbihcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLFxuICAgICAgICBtdWx0aXNpZy5tYXAoKHMpID0+IHMudG9LZXlwYWlyKCkpLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKSxcbiAgICAgICk7XG4gICAgfSk7XG4gIH07XG59XG4iLCAiaW1wb3J0IHsgU29sTmF0aXZlIGFzIEZpbmQgfSBmcm9tICcuL2ZpbmQnO1xuaW1wb3J0IHsgU29sTmF0aXZlIGFzIEdhc0x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ge1xuICAgICAgcmV0dXJuIFRyeShhc3luYyAoKSA9PiB7XG4gICAgICAgIGxldCBpID0gMDtcbiAgICAgICAgZm9yIChjb25zdCBhIG9mIGFycikge1xuICAgICAgICAgIGlmICghYS5pbnN0cnVjdGlvbnMgJiYgIWEuc2lnbmVycykge1xuICAgICAgICAgICAgdGhyb3cgRXJyb3IoXG4gICAgICAgICAgICAgIGBvbmx5IEluc3RydWN0aW9uIG9iamVjdCB0aGF0IGNhbiB1c2UgYmF0Y2hTdWJtaXQoKS5cbiAgICAgICAgICAgIEluZGV4OiAke2l9LCBTZXQgdmFsdWU6ICR7SlNPTi5zdHJpbmdpZnkoYSl9YCxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIGkrKztcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IGluc3RydWN0aW9ucyA9IGFyci5mbGF0TWFwKChhKSA9PiBhLmluc3RydWN0aW9ucyk7XG4gICAgICAgIGNvbnN0IHNpZ25lcnMgPSBhcnIuZmxhdE1hcCgoYSkgPT4gYS5zaWduZXJzKTtcbiAgICAgICAgY29uc3QgZmVlUGF5ZXJzID0gYXJyLmZpbHRlcigoYSkgPT4gYS5mZWVQYXllciAhPT0gdW5kZWZpbmVkKTtcbiAgICAgICAgbGV0IGZlZVBheWVyID0gc2lnbmVyc1swXTtcbiAgICAgICAgaWYgKGZlZVBheWVycy5sZW5ndGggPiAwICYmIGZlZVBheWVyc1swXS5mZWVQYXllcikge1xuICAgICAgICAgIGZlZVBheWVyID0gZmVlUGF5ZXJzWzBdLmZlZVBheWVyO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgdHJhbnNhY3Rpb24gPSBuZXcgVHJhbnNhY3Rpb24oKTtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHNpZ25lcnM7XG4gICAgICAgIGlmIChmZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gZmVlUGF5ZXI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N0IG9iaiBvZiB0aGlzKSB7XG4gICAgICBpZiAob2JqLmlzRXJyKSB7XG4gICAgICAgIHJldHVybiBvYmo7XG4gICAgICB9IGVsc2UgaWYgKG9iai52YWx1ZS5jYW5TdWJtaXQpIHtcbiAgICAgICAgZGVidWdMb2coJyMgUmVzdWx0IGJhdGNoIGNhblN1Ym1pdCcpO1xuICAgICAgICBjb25zdCBzaWcgPSBhd2FpdCAob2JqIGFzIFBhcnRpYWxTaWduU3RydWN0dXJlKS5zdWJtaXQoZmVlUGF5ZXIpO1xuICAgICAgICBpZiAoc2lnLmlzRXJyKSB7XG4gICAgICAgICAgcmV0dXJuIHNpZztcbiAgICAgICAgfVxuICAgICAgICBhd2FpdCBOb2RlLmNvbmZpcm1lZFNpZyhzaWcudmFsdWUpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgZGVidWdMb2coJyMgUmVzdWx0IGJhdGNoIG90aGVyIHRoYW4gY2FuU3VibWl0Jyk7XG4gICAgICAgIGlmICh0aGlzLmxlbmd0aCA9PSBpKSB7XG4gICAgICAgICAgLy8gbGFzdCBvYmplY3RcbiAgICAgICAgICByZXR1cm4gb2JqLnN1Ym1pdChmZWVQYXllcik7XG4gICAgICAgIH1cbiAgICAgICAgb2JqLnN1Ym1pdChmZWVQYXllcik7XG4gICAgICB9XG4gICAgICBpKys7XG4gICAgfVxuICB9IGVsc2Uge1xuICAgIGNvbnN0IGluc3RydWN0aW9uczogQ29tbW9uU3RydWN0dXJlIHwgTWludFN0cnVjdHVyZVtdID0gW107XG4gICAgZm9yIChjb25zdCBvYmogb2YgdGhpcykge1xuICAgICAgaWYgKG9iai5pc0Vycikge1xuICAgICAgICByZXR1cm4gb2JqO1xuICAgICAgfSBlbHNlIGlmIChvYmouaXNPaykge1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChvYmoudmFsdWUpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgcmV0dXJuIFJlc3VsdC5lcnIoRXJyb3IoJ09ubH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W10sXG4gICAgKTogSGlzdG9yeSB8IHVuZGVmaW5lZCA9PiB7XG4gICAgICBjb25zdCBoaXN0b3J5OiBIaXN0b3J5ID0ge307XG5cbiAgICAgIGlmIChtYXBwaW5nVG9rZW5BY2NvdW50KSB7XG4gICAgICAgIGNvbnN0IGZvdW5kU291cmNlID0gbWFwcGluZ1Rva2VuQWNjb3VudC5maW5kKFxuICAgICAgICAgIChtKSA9PiBtLmFjY291bnQgPT09IG91dHB1dC5wYXJzZWQuaW5mby5zb3VyY2UsXG4gICAgICAgICk7XG4gICAgICAgIGNvbnN0IGZvdW5kRGVzdCA9IG1hcHBpbmdUb2tlbkFjY291bnQuZmluZChcbiAgICAgICAgICAobSkgPT4gbS5hY2NvdW50ID09PSBvdXRwdXQucGFyc2VkLmluZm8uZGVzdGluYXRpb24sXG4gICAgICAgICk7XG4gICAgICAgIGZvdW5kU291cmNlICYmIChoaXN0b3J5LnNvdXJjZSA9IGZvdW5kU291cmNlLm93bmVyKTtcbiAgICAgICAgZm91bmREZXN0ICYmIChoaXN0b3J5LmRlc3RpbmF0aW9uID0gZm91bmREZXN0Lm93bmVyKTtcbiAgICAgIH1cblxuICAgICAgaGlzdG9yeS50b2tlbkFtb3VudCA9IG91dHB1dC5wYXJzZWQuaW5mby50b2tlbkFtb3VudDtcbiAgICAgIGhpc3RvcnkubWludCA9IG91dHB1dC5wYXJzZWQuaW5mby5taW50O1xuICAgICAgaGlzdG9yeS5tdWx0aXNpZ0F1dGhvcml0eSA9IG91dHB1dC5wYXJzZWQuaW5mby5tdWx0aXNpZ0F1dGhvcml0eTtcbiAgICAgIGhpc3Rvcnkuc2lnbmVycyA9IG91dHB1dC5wYXJzZWQuaW5mby5zaWduZXJzO1xuICAgICAgaGlzdG9yeS50eXBlID0gb3V0cHV0LnByb2dyYW07XG4gICAgICBoaXN0b3J5LmRhdGVUaW1lID0gY29udmVydFRpbWVzdGFtcFRvRGF0ZVRpbWUobWV0YS5ibG9ja1RpbWUgYXMgbnVt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zID0gaXNJbWFnZVVybChtZXRhZGF0YS5pbWFnZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdyb3lhbHR5JzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEucm95YWx0eSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1JveWFsdHkobWV0YWRhdGEucm95YWx0eSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ25hbWUnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLm5hbWUpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNOYW1lKG1ldGFkYXRhLm5hbWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc3ltYm9sJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5zeW1ib2wpIHtcbiAgICAgICAgIC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pb24pKSB7XG4gICAgICAgICAgc3dpdGNoIChmaWx0ZXJUeXBlKSB7XG4gICAgICAgICAgICBjYXNlIEZpbHRlclR5cGUuTWVtbzoge1xuICAgICAgICAgICAgICBpZiAoRmlsdGVyT3B0aW9ucy5NZW1vLnByb2dyYW0uaW5jbHVkZXMoaW5zdHJ1Y3Rpb24ucHJvZ3JhbSkpIHtcbiAgICAgICAgICAgICAgICBsZXQgaW5zdHJ1Y3Rpb25UcmFuc2ZlcjtcblxuICAgICAgICAgICAgICAgIC8vIGZldGNoICB0cmFuc2ZlciB0cmFuc2FjdGlvbiBmb3IgcmVsYXRpb25hbCBtZW1vXG4gICAgICAgICAgICAgICAgdHhNZXRhLnRyYW5zYWN0aW9uLm1lc3NhZ2UuaW5zdHJ1Y3Rpb25zLmZvckVhY2goXG4gICAgICAgICAgICAgICAgICAoaW5zdHJ1Y3Rpb24pID0+IHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgIGlzUGFyc2VkSW5zdHJ1Y3Rpb24oaW5zdHJ1Y3Rpb24pICYmXG4gICAgICAgICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5UcmFuc2Zlci5wcm9ncmFtLmluY2x1ZGVzKFxuICAgICAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24ucHJvZ3JhbSxcbiAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIgPSBpbnN0cnVjdGlvbjtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICApO1xuXG4gICAgICAgICAgICAgICAgLy8gc3BsLXRva2VuIG9yIHN5c3RlbVxuICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIgJiZcbiAgICAgICAgICAgICAgICAgIG1vZHVsZU5hbWUgIT09IGluc3RydWN0aW9uVHJhbnNmZXJbJ3Byb2dyYW0nXVxuICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgZGVidWdMb2coXG4gICAgICAgICAgICAgICAgICAgICcjIEZpbHRlclR5cGUuTWVtbyBicmVhayBpbnN0cnVjdGlvbjogJyxcbiAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlcixcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAvLyBmZXRjaCBtZW1vIG9ubHkgdHJhbnNhY3Rpb25cbiAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLk1lbW8uaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyLFxuICAgICAgICAgICAgICAgICAgcG9zdFRva2VuQWNjb3VudCxcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLk9ubHlNZW1vOiB7XG4gICAgICAgICAgICAgIGlmIChGaWx0ZXJPcHRpb25zLk1lbW8ucHJvZ3JhbS5pbmNsdWRlcyhpbnN0cnVjdGlvbi5wcm9ncmFtKSkge1xuICAgICAgICAgICAgICAgIGxldCBpbnN0cnVjdGlvblRyYW5zZmVyO1xuXG4gICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5NZW1vLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlcixcbiAgICAgICAgICAgICAgICAgIHBvc3RUb2tlbkFjY291bnQsXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5NaW50OiB7XG4gICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLk1pbnQucHJvZ3JhbS5pbmNsdWRlcyhpbnN0cnVjdGlvbi5wcm9ncmFtKSAmJlxuICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuTWludC5hY3Rpb24uaW5jbHVkZXMoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbi5wYXJzZWQudHlwZSBhcyBzdHJpbmcsXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLk1pbnQuaW50b1VzZXJTaWRlKGluc3RydWN0aW9uLCB0eE1ldGEpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLlRyYW5zZmVyOlxuICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgbW9kdWxlTmFtZSA9PT0gaW5zdHJ1Y3Rpb24ucHJvZ3JhbSAmJlxuICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuVHJhbnNmZXIuYWN0aW9uLmluY2x1ZGVzKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24ucGFyc2VkLnR5cGUgYXMgc3RyaW5nLFxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgaWYgKGluc3RydWN0aW9uLnBhcnNlZC50eXBlID09PSAndHJhbnNmZXJDaGVja2VkJykge1xuICAgICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5UcmFuc2ZlckNoZWNrZWQuaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgICBwb3N0VG9rZW5BY2NvdW50LFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5UcmFuc2Zlci5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgICByZXR1cm4gaGlzdG9yeTtcbiAgICB9O1xufVxuIiwgImltcG9ydCB7IFBhcnNlZEFjY291bnREYXRhIH0gZnJvbSAnQHNvbGFuYS93ZWIzLmpzJztcbmltcG9ydCB7IFJlc3VsdCwgVHJ5IH0gZnJvbSAnfi9zdWl0ZS11dGlscyc7XG5pbXBvcnQgeyBOb2RlIH0gZnJvbSAnfi9ub2RlJztcbmltcG9ydCB7IE93bmVySW5mbywgUHVia2V5IH0gZnJvbSAnfi90eXBlcy9hY2NvdW50JztcbmltcG9ydCB7IFRyYW5zYWN0aW9uRmlsdGVyIH0gZnJvbSAnfi90cmFuc2FjdGlvbi1maWx0ZXInO1xuXG5leHBvcnQgbmFtZXNwYWNlIFNvbE5hdGl2ZSB7XG4gIC8qKlxuICAgKiBGaW5kIG5mdCBieSBvd25lciBhZGRyZXNzXG4gICAqXG4gICAqIEBwYXJhbSB7UHVia2V5fSBvd25lclxuICAgKiBAcmV0dXJuIFByb21pc2U8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gIGNvbnN0IGluc3RydWN0aW9ucyA9IFtdO1xuXG4gICAgICBjb25zdCB0b2tlbiA9IGF3YWl0IGNyZWF0ZU1pbnQoXG4gICAgICAgIGNvbm5lY3Rpb24sXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAwLFxuICAgICAgKTtcblxuICAgICAgY29uc3Qgc291cmNlVG9rZW4gPSBhd2FpdCBBY2NvdW50LkFzc29jaWF0ZWQucmV0cnlHZXRPckNyZWF0ZShcbiAgICAgICAgdG9rZW4udG9TdHJpbmcoKSxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIHBheWVyLFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgc291cmNlVG9rZW46ICcsIHNvdXJjZVRva2VuKTtcblxuICAgICAgY29uc3QgZGVzdFRva2VuID0gYXdhaXQgQWNjb3VudC5Bc3NvY2lhdGVkLnJldHJ5R2V0T3JDcmVhdGUoXG4gICAgICAgIHRva2VuLnRvU3RyaW5nKCksXG4gICAgICAgIHdyYXBwZWQudG9TdHJpbmcoKSxcbiAgICAgICAgcGF5ZXIsXG4gICAgICApO1xuXG4gICAgICBkZWJ1Z0xvZygnIyBkZXN0VG9rZW46ICcsIGRlc3RUb2tlbik7XG5cbiAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICBjcmVhdGVUcmFuc2Zlckluc3RydWN0aW9uKFxuICAgICAgICAgIHNvdXJjZVRva2VuLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgZGVzdFRva2VuLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBwYXJzZUludChgJHthbW91bnR9YCwgUkFESVgpLCAvLyBObyBsYW1wb3J0cywgaXRzIHNvbFxuICAgICAgICAgIGtleXBhaXJzLFxuICAgICAgICApLFxuICA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bGVjdGlvbk1pbnQiLCAiQ29udmVydGVyIiwgIkNyZWF0b3JzIiwgIkNvbnZlcnRlciIsICJDb21wcmVzc2VkTmZ0TWV0YWRhdGEiLCAiQ29udmVydGVyIiwgIlJveWFsdHkiLCAiQ29udmVydGVyIiwgIk5mdCIsICJDb252ZXJ0ZXIiLCAiTWVtbyIsICJDb252ZXJ0ZXIiLCAiTWludCIsICJDb252ZXJ0ZXIiLCAiUmVndWxhck5mdE1ldGFkYXRhIiwgIkNvbnZlcnRlciIsICJQcm9wZXJ0aWVzIiwgIkNvbnZlcnRlciIsICJVc2VzIiwgIkNvbnZlcnRlciIsICJUb2tlbk1ldGFkYXRhIiwgIkNvbnZlcnRlciIsICJUcmFuc2ZlckNoZWNrZWQiLCAiQ29udmVydGVyIiwgIlRyYW5zZmVyIiwgIkNvbnZlcnRlciIsICJWYWxpZGF0b3IiLCAiTWVzc2FnZSIsICJDb252ZXJ0ZXIiLCAiU2lnbmF0dXJlcyIsICJUcmFuc2FjdGlvbkZpbHRlciIsICJpbnN0cnVjdGlvbiIsICJDb252ZXJ0ZXIiLCAiU29sTmF0aXZlIiwgIlRyYW5zYWN0aW9uIiwgIlNvbE5hdGl2ZSIsICJUcmFuc2FjdGlvbiIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiU3lzdGVtUHJvZ3JhbSIsICJTb2xOYXRpdmUiLCAiU3lzdGVtUHJvZ3JhbSIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiU29sTmF0aXZlIiwgIkFjY291bnQiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlNvbE5hdGl2ZSJdCn0K \ No newline at end of file diff --git a/packages/suite-spl-token/dist/index.d.mts b/packages/suite-spl-token/dist/index.d.mts index eabbede38..c0e42f74c 100644 --- a/packages/suite-spl-token/dist/index.d.mts +++ b/packages/suite-spl-token/dist/index.d.mts @@ -221,6 +221,35 @@ type Result = Result.Ok | Result.Err; type OkType> = R extends Result ? O : never; type ErrType> = R extends Result ? E : never; +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; +}; + type bignum = number | BN; declare enum UseMethod { Burn = 0, @@ -289,35 +318,6 @@ type Options = { [key: string]: unknown; }; -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; -}; - type CommonStructure = { instructions: TransactionInstruction[]; signers: Keypair[]; diff --git a/packages/suite-spl-token/dist/index.d.ts b/packages/suite-spl-token/dist/index.d.ts index eabbede38..c0e42f74c 100644 --- a/packages/suite-spl-token/dist/index.d.ts +++ b/packages/suite-spl-token/dist/index.d.ts @@ -221,6 +221,35 @@ type Result = Result.Ok | Result.Err; type OkType> = R extends Result ? O : never; type ErrType> = R extends Result ? E : never; +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; +}; + type bignum = number | BN; declare enum UseMethod { Burn = 0, @@ -289,35 +318,6 @@ type Options = { [key: string]: unknown; }; -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; -}; - type CommonStructure = { instructions: TransactionInstruction[]; signers: Keypair[]; diff --git a/packages/suite-spl-token/dist/index.js b/packages/suite-spl-token/dist/index.js index b98aad7a3..4e9b8c68b 100644 --- a/packages/suite-spl-token/dist/index.js +++ b/packages/suite-spl-token/dist/index.js @@ -1628,14 +1628,13 @@ var SplToken6; dest, feePayer ); - let inst2; const blockhashObj = await Node.getConnection().getLatestBlockhash(); const tx = new import_web310.Transaction({ lastValidBlockHeight: blockhashObj.lastValidBlockHeight, blockhash: blockhashObj.blockhash, feePayer: feePayer.toPublicKey() }); - inst2 = (0, import_spl_token5.createTransferCheckedInstruction)( + const inst2 = (0, import_spl_token5.createTransferCheckedInstruction)( sourceToken.tokenAccount.toPublicKey(), mint.toPublicKey(), destToken.tokenAccount.toPublicKey(), @@ -2116,4 +2115,4 @@ var SplToken10 = { 0 && (module.exports = { SplToken }); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uL3NyYy9hZGQudHMiLCAiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9iYXRjaC50cyIsICIuLi8uLi9ub2RlL3NyYy9pbmRleC50c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Q6XG4gICAgICAgIHJldHVybiBDb25zdGFudHMuRW5kUG9pbnRVcmwubG9jYWxob3N0O1xuICAgIH1cbiAgfTtcblxuICBleHBvcnQgY29uc3Qgc3dpdGNoQnVuZGxyID0gKGVudjogc3RyaW5nKTogc3RyaW5nID0+IHtcbiAgICBzd2l0Y2ggKGVudikge1xuICAgICAgY2FzZSBDb25zdGFudHMuQ2x1c3Rlci5wcmQ6IHtcbiAgICAgICAgY29uc3QgdXJscyA9IENvbnN0YW50cy5CdW5kbHJVcmwucHJkLnNwbGl0KCcsJyk7XG4gICAgICAgIGNvbnN0IGluZGV4ID0gRGF0ZS5ub3coKSAlIHVybHMubGVuZ3RoO1xuICAgICAgICByZXR1cm4gdXJsc1tpbmRleF07XG4gICAgICB9XG4gICAgICBkZWZhdWx0OiB7XG4gICAgICAgIHJldHVybiBDb25zdGFudHMuQnVuZGxyVXJsLmRldjtcbiAgICAgIH1cbiAgICB9XG4gIH07XG5cbiAgZXhwb3J0IGNvbnN0IHN3aXRjaERhc0FwaSA9IChlbnY6IHN0cmluZyk6IHN0cmluZyA9PiB7XG4gICAgc3dpdGNoIChlbnYpIHtcbiAgICAgIGNhc2UgQ29uc3RhbnRzLkNsdXN0ZXIucHJkOiB7XG4gICAgICAgIGlmIChkYXNBcGlVcmwubGVuZ3RoIDwgMSkge1xuICAgICAgICAgIHRocm93IEVycm9yKENvbnN0YW50cy5XYXJubmluZ01lc3NhZ2UuREFTX0FQSV9VUkwpO1xuICAgICAgICB9XG4gICAgICAgIGNvbnN0IHVybHMgPSBDb25zdGFudHMuQnVuZGxyVXJsLnByZC5zcGxpdCgnLCcpO1xuICAgICAgICBjb25zdCBpbmRleCA9IERhdGUubm93KCkgJSB1cmxzLmxlbmd0aDtcbiAgICAgICAgcmV0dXJuIHVybHNbaW5kZXhdO1xuICAgICAgfVxuICAgICAgZGVmYXVsdDoge1xuICAgICAgICBjb25zdCB1cmxzID0gQ29uc3RhbnRzLkRhc0FwaVVybC5kZXYuc3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cbiAgICAgICAgW1xuICAgICAgICAgIEJ1ZmZlci5mcm9tKCdtZXRhZGF0YScpLFxuICAgICAgICAgIFBST0dSQU1fSUQudG9CdWZmZXIoKSxcbiAgICAgICAgICBhZGRyZXNzLnRvUHVibGljS2V5KCkudG9CdWZmZXIoKSxcbiAgICAgICAgXSxcbiAgICAgICAgUFJPR1JBTV9JRCxcbiAgICAgICk7XG4gICAgICByZXR1cm4gcHVibGljS2V5O1xuICAgIH07XG5cbiAgICBleHBvcnQgY29uc3QgZ2V0TWFzdGVyRWRpdGlvbiA9IChhZGRyZXNzOiBQdWJrZXkpOiBQdWJsaWNLZXkgPT4ge1xuICAgICAgY29uc3QgW3B1YmxpY0tleV0gPSBQdWJsaWNLZXkuZmluZFByb2dyYW1BZGRyZXNzU3luYyhcbiAgICAgICAgW1xuICAgICAgICAgIEJ1ZmZlci5mcm9tKCdtZXRhZGF0YScpLFxuICAgICAgICAgIFBST0dSQU1fSUQudG9CdWZmZXIoKSxcbiAgICAgICAgICBhZGRyZXNzLnRvUHVibGljS2V5KCkudG9CdWZmZXIoKSxcbiAgICAgICAgICBCdWZmZXIuZnJvbSgnZWRpdGlvbicpLFxuICAgICAgICBdLFxuICAgICAgICBQUk9HUkFNX0lELFxuICAgICAgKTtcbiAgICAgIHJldHVybiBwdWJsaWNLZXk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBnZXRUcmVlQXV0aG9yaXR5ID0gKGFkZHJlc3M6IFB1YmtleSk6IFB1YmxpY0tleSA9PiB7XG4gICAgICBjb25zdCBbcHVibGljS2V5XSA9IFB1YmxpY0tleS5maW5kUHJvZ3JhbUFkZHJlc3NTeW5jKFxuICAgICAgICBbYWRkcmVzcy50b1B1YmxpY0tleSgpLnRvQnVmZmVyKCldLFxuICAgICAgICBNUExfQlVCQkxFR1VNX1BST0dSQU1fSUQudG9QdWJsaWNLZXkoKSxcbiAgICAgICk7XG4gICAgICByZXR1cm4gcHVibGljS2V5O1xuICAgIH07XG5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wdXQpIHtcbiAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICB9XG4gICAgICByZXR1cm4gaW5wdXQubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvQ29tcHJlc3NlZE5mdEluZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IEludGVybmFsQ3JlYXRvcnNbXSA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBbXTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBpbnB1dCEubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlciA9IChcbiAgICAgIG91dHB1dDogT3B0aW9uPEludGVybmFsQ3JlYXRvcnNbXT4sXG4gICAgKTogQ3JlYXRvcnNbXSB8IHVuZGVmaW5lZCA9PiB7XG4gICAgICBpZiAoIW91dHB1dCkge1xuICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gb3V0cHV0Lm1hcCgoZGF0YSkgPT4ge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIGFkZHJlc3M6IGRhdG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T4gUHJvbWlzZTxSZXN1bHQ8c3RyaW5nLCBFcnJvcj4+LFxuICAgICAgc3RvcmFnZVR5cGU6IFN0b3JhZ2VUeXBlLFxuICAgICAgZmVlUGF5ZXI/OiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxQcm9wZXJ0aWVzPiA9PiB7XG4gICAgICBpZiAoIWlucHV0IHx8ICFpbnB1dC5maWxlcykge1xuICAgICAgICByZXR1cm4ge307XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGZpbGVzID0gYXdhaXQgUHJvbWlzZS5hbGwoXG4gICAgICAgIGlucHV0LmZpbGVzLm1hcChhc3luYyAoZmlsZSkgPT4ge1xuICAgICAgICAgIGlmICghZmlsZS5maWxlUGF0aCkge1xuICAgICAgICAgICAgcmV0dXJuIHt9O1xuICAgICAgICAgIH1cbiAgICAgICAgICBjb25zdCByZXMgPSBhd2FpdCBjYWxsYmFja0Z1bmMoZmlsZS5maWxlUGF0aCwgc3RvcmFnZVR5cGUsIGZlZVBheWVyKTtcbiAgICAgICAgICBpZiAocmVzLmlzRXJyKSB7XG4gICAgICAgICAgICB0aHJvdyBFcnJvcihyZXMuZXJyb3IubWVzc2FnZSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBvdmVyd3JpdGVPYmplY3QoZmlsZSwgW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBleGlzdHNLZXk6ICdmaWxlUGF0aCcsXG4gICAgICAgICAgICAgIHdpbGw6IHsga2V5OiAndXJpJywgdmFsdWU6IHJlcy52YWx1ZSB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICBdKTtcbiAgICAgICAgfSksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHsgLi4uaW5wdXQsIGZpbGVzIH0gYXMgUHJvcGVydGllcztcbiAgICB9O1xuICB9XG59XG4iLCAiLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLXVudXNlZC12YXJzICovXG5pbXBvcnQg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XRhaWxzW10gPSBbXTtcbiAgICAgIGtleXMubWFwKChrZXkpID0+IHtcbiAgICAgICAgbGV0IHJlcyE6IFJlc3VsdDxzdHJpbmcsIFZhbGlkYXRvckVycm9yPjtcbiAgICAgICAgc3dpdGNoIChrZXkpIHtcbiAgICAgICAgICBjYXNlICdpbWFnZSc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLmltYWdlKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzSW1hZ2VVcmwobWV0YWRhdGEuaW1hZ2UpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAncm95YWx0eSc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnJveWFsdHkpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNSb3lhbHR5KG1ldGFkYXRhLnJveWFsdHkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEuc3ltYm9sKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU3ltYm9sKG1ldGFkYXRhLnN5bWJvbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAocmVzICYmIHJlcy5pc0Vycikge1xuICAgICAgICAgIHJlc3VsdHMucHVzaCguLi5yZXMuZXJyb3IuZGV0YWlscyk7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgICAgaWYgKHJlc3VsdHMubGVuZ3RoID4gMCkge1xuICAgICAgICBjb25zdCBtZXNzYWdlID1cbiAgICAgICAgICAnQ2F1Z2h0IGluIHRoZSB2YWxpZGF0aW9uIGVycm9ycy4gc2VlIGluZm9ybWF0aW9uIGUuZzogZXJyPFZhbGlkYXRvckVycm9yPi5kZXRhaWxzJztcbiAgICAgICAgdGhyb3cgbmV3IFZhbGlkYXRvckVycm9yKG1lc3NhZ2UsIHJlc3VsdHMpO1xuICAgICAgfVxuICAgICAgcmV0dXJuIE1lc3NhZ2UuU1VDQ0VTUztcbiAgICB9KTtcbiAgfTtcblxuICB0eXBlIFBpY2tOZnRTdG9yYWdlID0gUGljazxcbiAgICBPZmZjaGFpbixcbiAgICAnbmFtZScgfCAnc3ltYm9sJyB8ICdpbWFnZScgfCAnc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMnXG4gID47XG4gIHR5cGUgUGlja05mdFN0b3JhZ2VNZXRhcGxleCA9IFBpY2s8XG4gICAgSW5wdXROZnRNZXRhZG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vZyhgTWF4IHJldHJpZXMgcmVhY2hlZCAoJHtNQVhfUkVUUklFU30pYCk7XG4gICAgICB9XG4gICAgfVxuICB9O1xuXG4gIC8qKlxuICAgKiBGZXRjaCBtaW50ZWQgbWV0YWRhdGEgYnkgb3duZXIgUHVia2V5XG4gICAqXG4gICAqIEBwYXJhbSB7UHVia2V5fSBvd25lclxuICAgKiBAcmV0dXJuIHtQcm9taXNlPFJlc3VsdDxUb2tlbk1ldGFkYXRhW118IEVycm9yPj59XG4gICAqL1xuICBleHBvcnQgY29uc3QgZmluZEJ5T3duZXIgPSBhc3luYyAoXG4gICAgb3duZXI6IFB1YmtleSxcbiAgKTogUHJvbWlzZTxSZXN1bHQ8VG9rZW5NZXRhZGF0YVtdLCBFcnJvcj4+ID0+IHtcbiAgICByZXR1cm4gVHJ5KGFzeW5jICgpID0+IHtcbiAgICAgIGNvbnN0IGNvbm5lY3Rpb24gPSBOb2RlLmdldENvbm5lY3Rpb24oKTtcbiAgICAgIGNvbnN0IGluZm8gPSBhd2FpdCBjb25uZWN0aW9uLmdldFBhcnNlZFRva2VuQWNjb3VudHNCeU93bmVyKFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICB7XG4gICAgICAgICAgcHJvZ3JhbUlkOiBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICB9LFxuICAgICAgKTtcblxuICAgICAgY29uc3QgZGF0YXMgPSBpbmZvLnZhbHVlLm1hcChhc3luYyAoZCkgPT4ge1xuICAgICAgICBjb25zdCBtaW50ID0gZC5hY2NvdW50LmRhdGEucGFyc2VkLmluZm8ubWludCBhcyBQdWJrZXk7XG4gICAgICAgIGNvbnN0IHRva2VuQW1vdW50ID0gZC5hY2NvdW50LmRhdGEucGFyc2VkLmluZm8udG9rZW5BbW91bnRcbiAgICAgICAgICAuYW1vdW50IGFzIHN0cmluZztcbiAgICAgICAgaWYgKHRva2VuQW1vdW50ID09PSAnMScpIHtcbiAgICAgICAgICByZXR1cm47XG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bnN0IGdhc0xlc3NUcmFuc2ZlciA9IGFzeW5jIChcbiAgICBtaW50OiBQdWJrZXksXG4gICAgb3duZXI6IFNlY3JldCxcbiAgICBkZXN0OiBQdWJrZXksXG4gICAgYW1vdW50OiBudW1iZXIsXG4gICAgbWludERlY2ltYWw6IG51bWJlcixcbiAgICBmZWVQYXllcjogUHVia2V5LFxuICApOiBQcm9taXNlPFJlc3VsdDxQYXJ0aWFsU2lnblN0cnVjdHVyZSwgRXJyb3I+PiA9PiB7XG4gICAgcmV0dXJuIFRyeShhc3luYyAoKSA9PiB7XG4gICAgICBjb25zdCBvd25lclB1YmxpY0tleSA9IG93bmVyLnRvS2V5cGFpcigpLnB1YmxpY0tleTtcbiAgICAgIGNvbnN0IHNvdXJjZVRva2VuID0gYXdhaXQgQWNjb3VudC5Bc3NvY2lhdGVkLm1ha2VPckNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICBtaW50LFxuICAgICAgICBvd25lclB1YmxpY0tleS50b1N0cmluZygpLFxuICAgICAgICBmZWVQYXllcixcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IGRlc3RUb2tlbiA9IGF3YWl0IEFjY291bnQuQXNzb2NpYXRlZC5tYWtlT3JDcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgZGVzdCxcbiAgICAgICAgZmVlUGF5ZXIsXG4gICAgICApO1xuXG4gICAgICBsZXQgaW5zdDI7XG4gICAgICBjb25zdCBibG9ja2hhc2hPYmogPSBhd2FpdCBOb2RlLmdldENvbm5lY3Rpb24oKS5nZXRMYXRlc3RCbG9ja2hhc2goKTtcblxuICAgICAgY29uc3QgdHggPSBuZXcgVHJhbnNhY3Rpb24oe1xuICAgICAgICBsYXN0VmFsaWRCbG9ja0hlaWdodDogYmxvY2toYXNoT2JqLmxhc3RWYWxpZEJsb2NrSGVpZ2h0LFxuICAgICAgICBibG9ja2hhc2g6IGJsb2NraGFzaE9iai5ibG9ja2hhc2gsXG4gICA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XG4gICAgICBjcmVhdGVJbml0aWFsaXplTWludEluc3RydWN0aW9uKFxuICAgICAgICBtaW50LFxuICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIG93bmVyLFxuICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKSxcbiAgICApO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVBc3NvY2lhdGVkVG9rZW5BY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgIGZlZVBheWVyLFxuICAgICAgICB0b2tlbkFzc29jaWF0ZWQsXG4gICAgICAgIG93bmVyLFxuICAgICAgICBtaW50LFxuICAgICAgKSxcbiAgICApO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVNaW50VG9DaGVja2VkSW5zdHJ1Y3Rpb24oXG4gICAgICAgIG1pbnQsXG4gICAgICAgIHRva2VuQXNzb2NpYXRlZCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIENhbGN1bGF0ZS5jYWxjdWxhdGVBbW91bnQodG90YWxBbW91bnQsIG1pbnREZWNpbWFsKSxcbiAgICAgICAgbWludERlY2ltYWwsXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUNyZWF0ZU1ldGFkYXRhQWNjb3VudFYzSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHtcbiAgICAgICAgICBtZXRhZGF0YTogbWV0YWRhdGFQZGEsXG4gICAgICAgICAgbWludCxcbiAgICAgICAgICBtaW50QXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBwYXllcjogZmVlUGF5ZXIsXG4gICAgICAgICAgdXBkYXRlQXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgIGNyZWF0ZU1ldGFkYXRhQWNjb3VudEFyZ3NWMzoge1xuICAgICAg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lLFxuICAgICAgICAgIHBheWVyLFxuICAgICAgICApO1xuXG4gICAgICAgIGlmICh1cGxvYWRlZC5pc0Vycikge1xuICAgICAgICAgIHRocm93IHVwbG9hZGVkO1xuICAgICAgICB9XG4gICAgICAgIHVyaSA9IHVwbG9hZGVkLnZhbHVlO1xuICAgICAgfSBlbHNlIGlmIChpbnB1dC51cmkpIHtcbiAgICAgICAgY29uc3QgaW1hZ2UgPSB7IGltYWdlOiBpbnB1dC51cmkgfTtcbiAgICAgICAgY29uc3QgdXBsb2FkZWQgPSBhd2FpdCBTdG9yYWdlLnVwbG9hZERhdGEoXG4gICAgICAgICAgeyAuLi5zdG9yYWdlTWV0YWRhdGEsIC4uLmltYWdlIH0sXG4gICAgICAgICAgc3RvcmFnZVR5cGUsXG4gICAgICAgICAgcGF5ZXIsXG4gICAgICAgICk7XG4gICAgICAgIGlmICh1cGxvYWRlZC5pc0Vycikge1xuICAgICAgICAgIHRocm93IHVwbG9hZGVkO1xuICAgICAgICB9XG4gICAgICAgIHVyaSA9IHVwbG9hZGVkLnZhbHVlO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgdGhyb3cgRXJyb3IoYE11c3Qgc2V0IGZpbGVQYXRoJyBvciAndXJpJ2ApO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBpc011dGFibGUgPSB0cnVlO1xuXG4gICAgICBjb25zdCBkYXRhdjIgPSBDb252ZXJ0ZXIuVG9rZW5NZXRhZGF0YS5pbnRvSW5mcmEoXG4gICAgICAgIGlucHV0LFxuICAgICAgICB1cmksXG4gICAgICAgIHNlbGxlckZlZUJhc2lzUG9pbnRzLFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgZGF0YXYyOiAnLCBkYXRhdjIpO1xuICAgICAgZGVidWdMb2coJyMgdXBsb2FkIGNvbnRlbnQgdXJsOiAnLCB1cmkpO1xuXG4gICAgICBjb25zdCBtaW50ID0gQWNjb3VudC5LZXlwYWlyLmNyZWF0ZSgpO1xuICAgICAgY29uc3QgaW5zdHMgPSBhd2FpdCBjcmVhdGVNaW50KFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICB0b3RhbEFtb3VudCxcbiAgICAgICAgbWludERlY2ltYWwsXG4gICAgICAgIGRhdGF2MixcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICBpc011dGFibGUsXG4gICAgICApO1xuXG4gICAgICAvLyBmcmVlemVBdXRob3JpdHlcbiAgICAgIGlmIChmcmVlemVBdXRob3JpdHkpIHtcbiAgICAgICAgaW5zdHMucHVzaChcbiAgICAgICAgICBjcmVhdGVGcmVlemVBdXRob3JpdHkoXG4gICAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgICAgIGZyZWV6ZUF1dGhvcml0eS50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBuZXcgVHJhbnNhY3Rpb25CdWlsZGVyLk1pbnQoXG4gICAgICAgIGluc3RzLFxuICAgICAgICBbb3duZXIudG9LZXlwYWlyKCksIG1pbnQudG9LZXlwYWlyKCldLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgbWludC5wdWJrZXksXG4gICAgICApO1xuICAgIH0pO1xuICB9O1xufVxuIiwgImltcG9ydCB7IENvbnN0YW50cywgZGVidWdMb2csIGlzQnJvd3NlciwgaXNOb2RlIH0gZnJvbSAnfi9zdWl0ZS11dGlscyc7XG5pbXBvcnQgeyBGaWxlVHlwZSwgSWRlbnRpdHksIFRhZ3MsIFVwbG9hZGFibGVGaWxlVHlwZSB9IGZyb20gJ34vdHlwZXMvc3RvcmFnZSc7XG5pbXBvcnQgeyBQaGFudG9tUHJvdmlkZXIgfSBmcm9tICd+L3R5cGVzL3BoYW50b20nO1xua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ICJQcm92ZW5hbmNlTGF5ZXIiLCAidXBsb2FkRmlsZSIsICJJcnlzIiwgIkFyd2VhdmUiLCAiaW1wb3J0X25mdCIsICJOZnRTdG9yYWdlIiwgIlN0b3JhZ2UiLCAiU3BsVG9rZW4iLCAibWludCIsICJBY2NvdW50IiwgIkNvbnZlcnRlciIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiaW1wb3J0X3NwbF90b2tlbiIsICJTcGxUb2tlbiIsICJBY2NvdW50IiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJpbXBvcnRfc3BsX3Rva2VuIiwgIlNwbFRva2VuIiwgIkFjY291bnQiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlNwbFRva2VuIl0KfQo= \ No newline at end of file +//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uL3NyYy9hZGQudHMiLCAiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9iYXRjaC50cyIsICIuLi8uLi9ub2RlL3NyYy9pbmRleC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jb21tb24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvbWludC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9wYXJ0aWFsLXNpZ24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY2FsY3VsYXRlLXR4c2l6ZS50cyIsICIuLi8uLi9nbG9iYWwvc3JjL2luZGV4LnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2tleXBhaXIudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvcGRhLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3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AgIHRvdGFsQW1vdW50OiBudW1iZXIsXG4gICAgbWludERlY2ltYWw6IG51bWJlcixcbiAgICBvcHRpb25zOiBQYXJ0aWFsPE1pbnRPcHRpb25zPiA9IHt9LFxuICApOiBQcm9taXNlPFJlc3VsdDxDb21tb25TdHJ1Y3R1cmU8UHVia2V5PiwgRXJyb3I+PiA9PiB7XG4gICAgcmV0dXJuIFRyeShhc3luYyAoKSA9PiB7XG4gICAgICBjb25zdCBwYXllciA9IG9wdGlvbnMuZmVlUGF5ZXIgPyBvcHRpb25zLmZlZVBheWVyIDogb3duZXJPck11bHRpc2lnWzBdO1xuICAgICAgY29uc3Qga2V5cGFpcnMgPSBvd25lck9yTXVsdGlzaWcubWFwKChzKSA9PiBzLnRvS2V5cGFpcigpKTtcblxuICAgICAgY29uc3QgdG9rZW5Bc3NvY2lhdGVkID0gYXdhaXQgQWNjb3VudC5Bc3NvY2lhdGVkLnJldHJ5R2V0T3JDcmVhdGUoXG4gICAgICAgIHRva2VuLFxuICAgICAgICBvd25lcixcbiAgICAgICAgcGF5ZXIsXG4gICAgICApO1xuXG4gICAgICBjb25zdCBpbnN0ID0gY3JlYXRlTWludFRvQ2hlY2tlZEluc3RydWN0aW9uKFxuICAgICAgICB0b2tlbi50b1B1YmxpY0tleSgpLFxuICAgICAgICB0b2tlbkFzc29jaWF0ZWQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgQ2FsY3VsYXRlLmNhbGN1bGF0ZUFtb3VudCh0b3RhbEFtb3VudCwgbWludERlY2ltYWwpLFxuICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICAga2V5cGFpcnMsXG4gICAgICApO1xuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb248UHVia2V5PihcbiAgICAgICAgW2luc3RdLFxuICAgICAgICBrZXlwYWlycyxcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCksXG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lnbmVycyA9IG5ldyBTZXQ8c3RyaW5nPihmZWVQYXllclBrKTtcbiAgICBjb25zdCBhY2NvdW50cyA9IG5ldyBTZXQ8c3RyaW5nPihmZWVQYXllclBrKTtcblxuICAgIGNvbnN0IGl4c1NpemUgPSB0cmFuc2FjdGlvbi5pbnN0cnVjdGlvbnMucmVkdWNlKChhY2MsIGl4KSA9PiB7XG4gICAgICBpeC5rZXlzLmZvckVhY2goKHsgcHVia2V5LCBpc1NpZ25lciB9KSA9PiB7XG4gICAgICAgIGNvbnN0IHBrID0gcHVia2V5LnRvQmFzZTU4KCk7XG4gICAgICAgIGlmIChpc1NpZ25lcikgc2lnbmVycy5hZGQocGspO1xuICAgICAgICBhY2NvdW50cy5hZGQocGspO1xuICAgICAgfSk7XG5cbiAgICAgIGFjY291bnRzLmFkZChpeC5wcm9ncmFtSWQudG9CYXNlNTgoKSk7XG5cbiAgICAgIGNvbnN0IG5JbmRleGVzID0gaXgua2V5cy5sZW5ndGg7XG4gICAgICBjb25zdCBvcGFxdWVEYXRhID0gaXguZGF0YS5sZW5ndGg7XG5cbiAgICAgIHJldHVybiAoXG4gICAgICAgIGFjYyArXG4gICAgICAgIDEgKyAvLyBQSUQgaW5kZXhcbiAgICAgICAgY29tcGFjdEFycmF5U2l6ZShuSW5kZXhlcywgMSkgK1xuICAgICAgICBjb21wYWN0QXJyYXlTaXplKG9wYXF1ZURhdGEsIDEpXG4gICAgICApO1xuICAgIH0sIDApO1xuXG4gICAgcmV0dXJuIChcbiAgICAgIGNvbXBhY3RBcnJheVNpemUoc2lnbmVycy5zaXplLCA2NCkgKyAvLyBzaWduYXR1cmVzXG4gICAgICAzICsgLy8gaGVhZGVyXG4gICAgICBjb21wYWN0QXJyYXlTaXplKGFjY291bnRzLnNpemUsIDMyKSArIC8vIGFjY291bnRzXG4gICAgICAzMiArIC8vIGJsb2NraGFzaFxuICAgICAgY29tcGFjdEhlYWRlcih0cmFuc2FjdGlvbi5pbnN0cnVjdGlvbnMubGV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WYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5yb3lhbHR5KSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzUm95YWx0eShtZXRhZGF0YS5yb3lhbHR5KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlcl9mZWVfYmFzaXNfcG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJGZWVCYXNpc1BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0YWRhdGEubmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzeW1ib2wnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLnN5bWJvbCkge1xuICAgICAgICAgICAgICByZXMgPSBpc1N5bWJvbChtZXRhZGF0YS5zeW1ib2wpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHJlcyAmJiBy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RhdGFbXSwgRXJyb3I+PiA9PiB7XG4gICAgcmV0dXJuIFRyeShhc3luYyAoKSA9PiB7XG4gICAgICBjb25zdCBjb25uZWN0aW9uID0gTm9kZS5nZXRDb25uZWN0aW9uKCk7XG4gICAgICBjb25zdCBpbmZvID0gYXdhaXQgY29ubmVjdGlvbi5nZXRQYXJzZWRUb2tlbkFjY291bnRzQnlPd25lcihcbiAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAge1xuICAgICAgICAgIHByb2dyYW1JZDogVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgfSxcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IGRhdGFzID0gaW5mby52YWx1ZS5tYXAoYXN5bmMgKGQpID0+IHtcbiAgICAgICAgY29uc3QgbWludCA9IGQuYWNjb3VudC5kYXRhLnBhcnNlZC5pbmZvLm1pbnQgYXMgUHVia2V5O1xuICAgICAgICBjb25zdCB0b2tlbkFtb3VudCA9IGQuYWNjb3VudC5kYXRhLnBhcnNlZC5pbmZvLnRva2VuQW1vdW50XG4gICAgICAgICAgLmFtb3VudCBhcyBzdHJpbmc7XG4gICAgICAgIGlmICh0b2tlbkFtb3VudCA9PT0gJzEnKSB7XG4gICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBNZXRhZGF0YS5mcm9tQWNjb3VudEFkZHJlc3MoXG4gICAgICAgICAgY29ubmVjdGlvbixcbiAgICAgICAgICBBY2NvdW50LlBkYS5nZXRNZXRhZGF0YShtaW50KSxcbiAgICAgICAgKVxuICAgICAgICAgIC50aGVuKGFzeW5jIChtZXRhZGF0YSkgPT4ge1xuICAgICAgICAgICAgLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLWV4cGxpY2l0LWFueSAqL1xuICAgICAgICAgICAgcmV0dXJuIGZldGNoUmV0cnkobWV0YWRhdGEuZGF0YS51cmkpLnRoZW4oKGpzb246IGFueSkgPT4ge1xuICAgICAgICAgICAgICByZXR1cm4gY29udmVydGVyKG1ldGFkYXRhLCBqc29uLCB0b2tlbkFtb3VudCk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICB9KVxuICAgICAgICAgIC5jYXRjaCgoZXJyKSA9PiBkZWJ1Z0xvZygnIyBbRmV0Y2ggZXJyb3JdJywgZXJyKSk7XG4gICAgICB9KTtcblxuICAgICAgY29uc3QgZmlsdGVycyA9IChhd2FpdCBQcm9taXNlLmFsbChkYXRhcykpLmZpbHRlcihcbiAgICAgICAgKGRhdGEpID0+IGRhdGEgIT09IHVuZGVmaW5lZCxcbiAgICAgICk7XG4gICAgICByZXR1cm4gZmlsdGVycyBhcyBUb2tlbk1ldGFkYXRhW107XG4gICAgfSk7XG4gIH07XG5cbiAgLyoqXG4gICAqIEZldGNoIG1pbnRlZCBtZXRhZGF0YSBieSBtaW50IGFkZHJlc3NcbiAgICpcbiAgICogQHBhcmFtIHtQdWJrZXl9IG1pbnRcbiAgICogQHJldHVybiBQcm9taXNlPFJlc3VsdDxVc2VyU2lkZU91dHB1dC5Ub2tlbk1ldGFkYXRhLCBFcnJvcj4+XG4gICAqL1xuICBleHBvcnQgY29uc3QgZmluZEJ5TWludCA9IGFzeW5jIChcbiAgICBtaW50OiBQdWJrZXksXG4gICk6IFByb21pc2U8UmVzdWx0PFRva2VuTWV0YWRhdGEsIEVycm9yPj4gPT4ge1xuICAgIHJldHVybiBUcnkoYXN5bmMgKCkgPT4ge1xuICAgICAgY29uc3QgY29ubmVjdGlvbiA9IE5vZGUuZ2V0Q29ubmVjdGlvbigpO1xuXG4gICAgICBjb25zdCBtZXRhZGF0YSA9IGF3YWl0IE1ldGFkYXRhLmZyb21BY2NvdW50QWRkcmVzcyhcbiAgICAgICAgY29ubmVjdGlvbixcbiAgICAgICAgQWNjb3VudC5QZGEuZ2V0TWV0YWRhdGEobWludCksXG4gICAgICApO1xuICAgICAgZGVidWdMb2coJyMgZmluZEJ5TWludCBtZXRhZGF0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blxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlTWludFRvQ2hlY2tlZEluc3RydWN0aW9uKFxuICAgICAgICBtaW50LFxuICAgICAgICB0b2tlbkFzc29jaWF0ZWQsXG4gICAgICAgIG93bmVyLFxuICAgICAgICBDYWxjdWxhdGUuY2FsY3VsYXRlQW1vdW50KHRvdGFsQW1vdW50LCBtaW50RGVjaW1hbCksXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgKSxcbiAgICApO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVDcmVhdGVNZXRhZGF0YUFjY291bnRWM0luc3RydWN0aW9uKFxuICAgICAgICB7XG4gICAgICAgICAgbWV0YWRhdGE6IG1ldGFkYXRhUGRhLFxuICAgICAgICAgIG1pbnQsXG4gICAgICAgICAgbWludEF1dGhvcml0eTogb3duZXIsXG4gICAgICAgICAgcGF5ZXI6IGZlZVBheWVyLFxuICAgICAgICAgIHVwZGF0ZUF1dGhvcml0eTogb3duZXIsXG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICBjcmVhdGVNZXRhZGF0YUFjY291bnRBcmdzVjM6IHtcbiAgICAgICAgICAgIGRhdGE6IHRva2VuTWV0YWRhdGEsXG4gICAgICAgICAgICBpc011dGFibGUsXG4gICAgICAgICAgICBjb2xsZWN0aW9uRGV0YWlsczogbnVsbCxcbiAgICAgICAgICB9LFxuICAgICAgICB9LFxuICAgICAgKSxcbiAgICApO1xuICAgIHJldHVybiBpbnN0cnVjdGlvbnM7XG4gIH07XG5cbiAgLyoqXG4gICAqIFNQTC1UT0tFTiBtaW50XG4gICAqXG4gICAqIEBwYXJhbSB7U2VjcmV0fSBvd25lciAgICAgIC8vIHRva2VuIG93bmVyIFNlY3JldFxuICAgKiBAcGFyYW0ge251bWJlcn0gdG90YWxBbW91bnQgLy8gdG90YWwgbnVtYmVyXG4gICAqIEBwYXJhbSB7bnVtYmVyfSBta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FxuICAgICAgICAgIHBheWVyLFxuICAgICAgICApO1xuICAgICAgICBpZiAodXBsb2FkZWQuaXNFcnIpIHtcbiAgICAgICAgICB0aHJvdyB1cGxvYWRlZDtcbiAgICAgICAgfVxuICAgICAgICB1cmkgPSB1cGxvYWRlZC52YWx1ZTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHRocm93IEVycm9yKGBNdXN0IHNldCBmaWxlUGF0aCcgb3IgJ3VyaSdgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgaXNNdXRhYmxlID0gdHJ1ZTtcblxuICAgICAgY29uc3QgZGF0YXYyID0gQ29udmVydGVyLlRva2VuTWV0YWRhdGEuaW50b0luZnJhKFxuICAgICAgICBpbnB1dCxcbiAgICAgICAgdXJpLFxuICAgICAgICBzZWxsZXJGZWVCYXNpc1BvaW50cyxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGRhdGF2MjogJywgZGF0YXYyKTtcbiAgICAgIGRlYnVnTG9nKCcjIHVwbG9hZCBjb250ZW50IHVybDogJywgdXJpKTtcblxuICAgICAgY29uc3QgbWludCA9IEFjY291bnQuS2V5cGFpci5jcmVhdGUoKTtcbiAgICAgIGNvbnN0IGluc3RzID0gYXdhaXQgY3JlYXRlTWludChcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgdG90YWxBbW91bnQsXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICBkYXRhdjIsXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgKTtcblxuICAgICAgLy8gZnJlZXplQXV0aG9yaXR5XG4gICAgICBpZiAoZnJlZXplQXV0aG9yaXR5KSB7XG4gICAgICAgIGluc3RzLnB1c2goXG4gICAgICAgICAgY3JlYXRlRnJlZXplQXV0aG9yaXR5KFxuICAgICAgICAgICAgbWludC50b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WxkZXIiLCAiaW1wb3J0X3NwbF90b2tlbiIsICJTcGxUb2tlbiIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiaW1wb3J0X21wbF90b2tlbl9tZXRhZGF0YSIsICJpbXBvcnRfc3BsX3Rva2VuIiwgIlNwbFRva2VuIiwgIk1BWF9SRVRSSUVTIiwgIkNvbnZlcnRlciIsICJmZXRjaCIsICJBY2NvdW50IiwgImltcG9ydF9zcGxfdG9rZW4iLCAiU3BsVG9rZW4iLCAiQWNjb3VudCIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiaW1wb3J0X3NwbF90b2tlbiIsICJpbXBvcnRfd2ViMyIsICJTcGxUb2tlbiIsICJBY2NvdW50IiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJpbXBvcnRfd2ViMyIsICJpbXBvcnRfc3BsX3Rva2VuIiwgImltcG9ydF9tcGxfdG9rZW5fbWV0YWRhdGEiLCAiUHJvdmVuYW5jZUxheWVyIiwgInVwbG9hZEZpbGUiLCAiSXJ5cyIsICJBcndlYXZlIiwgImltcG9ydF9uZnQiLCAiTmZ0U3RvcmFnZSIsICJTdG9yYWdlIiwgIlNwbFRva2VuIiwgIm1pbnQiLCAiQWNjb3VudCIsICJDb252ZXJ0ZXIiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgImltcG9ydF9zcGxfdG9rZW4iLCAiU3BsVG9rZW4iLCAiQWNjb3VudCIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiaW1wb3J0X3NwbF90b2tlbiIsICJTcGxUb2tlbiIsICJBY2NvdW50IiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJTcGxUb2tlbiJdCn0K \ No newline at end of file diff --git a/packages/suite-spl-token/dist/index.mjs b/packages/suite-spl-token/dist/index.mjs index 16869ec2e..22efe7973 100644 --- a/packages/suite-spl-token/dist/index.mjs +++ b/packages/suite-spl-token/dist/index.mjs @@ -1612,14 +1612,13 @@ var SplToken6; dest, feePayer ); - let inst2; const blockhashObj = await Node.getConnection().getLatestBlockhash(); const tx = new Transaction5({ lastValidBlockHeight: blockhashObj.lastValidBlockHeight, blockhash: blockhashObj.blockhash, feePayer: feePayer.toPublicKey() }); - inst2 = createTransferCheckedInstruction( + const inst2 = createTransferCheckedInstruction( sourceToken.tokenAccount.toPublicKey(), mint.toPublicKey(), destToken.tokenAccount.toPublicKey(), @@ -2116,4 +2115,4 @@ var SplToken10 = { export { SplToken10 as SplToken }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2FkZC50cyIsICIuLi8uLi9zdWl0ZS11dGlscy9zcmMvY29uc3RhbnRzLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2JhdGNoLnRzIiwgIi4uLy4uL25vZGUvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2NvbW1vbi50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9taW50LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL3BhcnRpYWwtc2lnbi50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jYWxjdWxhdGUtdHhzaXplLnRzIiwgIi4uLy4uL2dsb2JhbC9zcmMvaW5kZXgudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMva2V5cGFpci50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9wZGEudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvaW5kZXgudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvaW5kZXgudHMiLCAiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL3NoYXJlZC50cyIsICIuLi8uLi9zdWl0ZS11dGlscy9zcmMvcmVzdWx0LnRzIiwgIi4uLy4uL2NvbnZlcnRlci9zcmMvY29sbGV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dodCA9IGJsb2NraGFzaE9iai5sYXN0VmFsaWRCbG9ja0hlaWdodDtcbiAgICAgICAgdHJhbnNhY3Rpb24ucmVjZW50QmxvY2toYXNoID0gYmxvY2toYXNoT2JqLmJsb2NraGFzaDtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHRoaXMuc2lnbmVycztcblxuICAgICAgICBpZiAodGhpcy5mZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gdGhpcy5mZWVQYXllci5wdWJsaWNLZXk7XG4gICAgICAgICAgZmluYWxTaWduZXJzID0gW3RoaXMuZmVlUGF5ZXIsIC4uLnRoaXMuc2lnbmVyc107XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLmluc3RydWN0aW9ucy5mb3JFYWNoKChpbnN0KSA9PiB0cmFuc2FjdGlvbi5hZGQoaW5zdCkpO1xuXG4gICAgICAgIGNvbnN0IG9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IE1BWF9SRVRSSUVTLFxuICAgICAgICB9O1xuXG4gICAgICAgIGlmIChOb2RlLmdldENvbm5lY3Rpb24oKS5ycGNFbmRwb2ludCA9PT0gQ29uc3RhbnRzLkVuZFBvaW50VXJsLnByZCkge1xuICAgICAgICAgIGRlYnVnTG9nKCcjIENoYW5nZSBtZXRhcGxleCBjbHVzdGVyIG9uIG1haW5uZXQtYmV0YScpO1xuICAgICAgICAgIE5vZGUuY2hhbmdlQ29ubmVjdGlvbih7IGNsdXN0ZXI6IENvbnN0YW50cy5DbHVzdGVyLnByZE1ldGFwbGV4IH0pO1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgIC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0gYXN5bmMgZnVuY3Rpb24gKGZlZVBheWVyPzogU2VjcmV0KSB7XG4gIGlmIChmZWVQYXllcikge1xuICAgIGxldCBpID0gMTtcbiAgICBmb3IgYXdhaXQgKGNvbnN0IG9iaiBvZiB0aGlzKSB7XG4gICAgICBpZiAob2JqLmlzRXJyKSB7XG4gICAgICAgIHJldHVybiBvYmo7XG4gICAgICB9IGVsc2UgaWYgKG9iai52YWx1ZS5jYW5TdWJtaXQpIHtcbiAgICAgICAgZGVidWdMb2coJyMgUmVzdWx0IGJhdGNoIGNhblN1Ym1pdCcpO1xuICAgICAgICBjb25zdCBzaWcgPSBhd2FpdCAob2JqIGFzIFBhcnRpYWxTaWduU3RydWN0dXJlKS5zdWJtaXQoZmVlUGF5ZXIpO1xuICAgICAgICBpZiAoc2lnLmlzRXJyKSB7XG4gICAgICAgICAgcmV0dXJuIHNpZztcbiAgICAgICAgfVxuICAgICAgICBhd2FpdCBOb2RlLmNvbmZpcm1lZFNpZyhzaWcudmFsdWUpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgZGVidWdMb2coJyMgUmVzdWx0IGJhdGNoIG90aGVyIHRoYW4gY2FuU3VibWl0Jyk7XG4gICAgICAgIGlmICh0aGlzLmxlbmd0aCA9PSBpKSB7XG4gICAgICAgICAgLy8gbGFzdCBvYmplY3RcbiAgICAgICAgICByZXR1cm4gb2JqLnN1Ym1pdChmZWVQYXllcik7XG4gICAgICAgIH1cbiAgICAgICAgb2JqLnN1Ym1pdChmZWVQYXllcik7XG4gICAgICB9XG4gICAgICBpKys7XG4gICAgfVxuICB9IGVsc2Uge1xuICAgIGNvbnN0IGluc3RydWN0aW9uczogQ29tbW9uU3RydWN0dXJlIHwgTWludFN0cnVjdHVyZVtdID0gW107XG4gICAgZm9yIChjb25zdCBvYmogb2YgdGhpcykge1xuICAgICAgaWYgKG9iai5pc0Vycikge1xuICAgICAgICByZXR1cm4gb2JqO1xuICAgICAgfSBlbHNlIGlmIChvYmouaXNPaykge1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WJsaWNLZXkoKSxcbiAgICAgICAgICBzaGFyZTogZGF0YS5zaGFyZSxcbiAgICAgICAgICB2ZXJpZmllZDogZmFsc2UsXG4gICAgICAgIH07XG4gICAgICB9KTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGludG9Db21wcmVzc2VkTmZ0SW5mcmEgPSAoXG4gICAgICBpbnB1dDogT3B0aW9uPElucHV0Q3JlYXRvcnNbXT4gfCB1bmRlZmluZWQsXG4gICAgKTogSW50ZXJuYWxDcmVhdG9yc1tdID0+IHtcbiAgICAgIGlmICghaW5wdXQpIHtcbiAgICAgICAgcmV0dXJuIFtdO1xuICAgICAgfVxuICAgICAgcmV0dXJuIGlucHV0IS5tYXAoKGRhdGEpID0+IHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICBhZGRyZXNzOiBkYXRhLmFkZHJlc3MudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBzaGFyZTogZGF0YS5zaGFyZSxcbiAgICAgICAgICB2ZXJpZmllZDogZmFsc2UsXG4gICAgICAgIH07XG4gICAgICB9KTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGludG9Vc2VyID0gKFxuICAgICAgb3V0cHV0OiBPcHRpb248SW50ZXJuYWxDcmVhdG9yc1tdPixcbiAgICApOiBDcmVhdG9yc1tdIHwgdW5kZWZpbmVkID0+IHtcbiAgICAgIGlmICghb3V0cHV0KSB7XG4gICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBvdXRwdXQubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvU3RyaW5nKCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGRhdGEudmVyaWZpZWQsXG4gICAgICAgIH07XG4gICAgICB9KTtcbiAgICB9O1xuICB9X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ja2VkLFxuICAgICAgbWV0YTogUGFyc2VkVHJhbnNhY3Rpb25XaXRoTWV0YSxcbiAgICAgIG1hcHBpbmdUb2tlbkFjY291bnQ/OiBQb3N0VG9rZW5BY2NvdW50W10sXG4gICAgKTogSGlzdG9yeSB8IHVuZGVmaW5lZCA9PiB7XG4gICAgICBjb25zdCBoaXN0b3J5OiBIaXN0b3J5ID0ge307XG5cbiAgICAgIGlmIChtYXBwaW5nVG9rZW5BY2NvdW50KSB7XG4gICAgICAgIGNvbnN0IGZvdW5kU291cmNlID0gbWFwcGluZ1Rva2VuQWNjb3VudC5maW5kKFxuICAgICAgICAgIChtKSA9PiBtLmFjY291bnQgPT09IG91dHB1dC5wYXJzZWQuaW5mby5zb3VyY2UsXG4gICAgICAgICk7XG4gICAgICAgIGNvbnN0IGZvdW5kRGVzdCA9IG1hcHBpbmdUb2tlbkFjY291bnQuZmluZChcbiAgICAgICAgICAobSkgPT4gbS5hY2NvdW50ID09PSBvdXRwdXQucGFyc2VkLmluZm8uZGVzdGluYXRpb24sXG4gICAgICAgICk7XG4gICAgICAgIGZvdW5kU291cmNlICYmIChoaXN0b3J5LnNvdXJjZSA9IGZvdW5kU291cmNlLm93bmVyKTtcbiAgICAgICAgZm91bmREZXN0ICYmIChoaXN0b3J5LmRlc3RpbmF0aW9uID0gZm91bmREZXN0Lm93bmVyKTtcbiAgICAgIH1cblxuICAgICAgaGlzdG9yeS50b2tlbkFtb3VudCA9IG91dHB1dC5wYXJzZWQuaW5mby50b2tlbkFtb3VudDtcbiAgICAgIGhpc3RvcnkubWludCA9IG91dHB1dC5wYXJzZWQuaW5mby5taW50O1xuICAgICAgaGlzdG9yeS5tdWx0aXNpZ0F1dGhvcml0eSA9IG91dHB1dC5wYXJzZWQuaW5mby5tdWx0aXNpZ0F1dGhvcml0eTtcbiAgICAgIGhpc3Rvcnkuc2lnbmVycyA9IG91dHB1dC5wYXJzZWQuaW5mby5zaWduZXJzO1xuICAgICAgaGlzdG9yeS50eXBlID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AgICAgIGNhc2UgJ2ltYWdlJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuaW1hZ2UpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNJbWFnZVVybChtZXRhZGF0YS5pbWFnZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdyb3lhbHR5JzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEucm95YWx0eSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1JveWFsdHkobWV0YWRhdGEucm95YWx0eSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ25hbWUnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLm5hbWUpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNOYW1lKG1ldGFkYXRhLm5hbWUpO1xuICAgICAgICAgIC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SBvd25lciBQdWJrZXlcbiAgICpcbiAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAqIEByZXR1cm4ge1Byb21pc2U8UmVzdWx0PFRva2VuTWV0YWRhdGFbXXwgRXJyb3I+Pn1cbiAgICovXG4gIGV4cG9ydCBjb25zdCBmaW5kQnlPd25lciA9IGFzeW5jIChcbiAgICBvd25lcjogUHVia2V5LFxuICApOiBQcm9taXNlPFJlc3VsdDxUb2tlbk1ldGFkYXRhW10sIEVycm9yPj4gPT4ge1xuICAgIHJldHVybiBUcnkoYXN5bmMgKCkgPT4ge1xuICAgICAgY29uc3QgY29ubmVjdGlvbiA9IE5vZGUuZ2V0Q29ubmVjdGlvbigpO1xuICAgICAgY29uc3QgaW5mbyA9IGF3YWl0IGNvbm5lY3Rpb24uZ2V0UGFyc2VkVG9rZW5BY2NvdW50c0J5T3duZXIoXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIHtcbiAgICAgICAgICBwcm9ncmFtSWQ6IFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgIH0sXG4gICAgICApO1xuXG4gICAgICBjb25zdCBkYXRhcyA9IGluZm8udmFsdWUubWFwKGFzeW5jIChkKSA9PiB7XG4gICAgICAgIGNvbnN0IG1pbnQgPSBkLmFjY291bnQuZGF0YS5wYXJzZWQuaW5mby5taW50IGFzIFB1YmtleTtcbiAgICAgICAgY29uc3QgdG9rZW5BbW91bnQgPSBkLmFjY291bnQuZGF0YS5wYXJzZWQuaW5mby50b2tlbkFtb3VudFxuICAgICAgICAgIC5hbW91bnQgYXMgc3RyaW5nO1xuICAgICAgICBpZiAodG9rZW5BbW91bnQgPT09ICcxJykge1xuICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gTWV0YWRhdGEuZnJvbUFjY291bnRBZGRyZXNzKFxuICAgICAgICAgIGNvbm5lY3Rpb24sXG4gICAgICAgICAgQWNjb3VudC5QZGEuZ2V0TWV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gICAgICBvd25lcixcbiAgICAgICAgb3duZXIsXG4gICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgZmVlUGF5ZXIsXG4gICAgICAgIHRva2VuQXNzb2NpYXRlZCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIG1pbnQsXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZU1pbnRUb0NoZWNrZWRJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgdG9rZW5Bc3NvY2lhdGVkLFxuICAgICAgICBvd25lcixcbiAgICAgICAgQ2FsY3VsYXRlLmNhbGN1bGF0ZUFtb3VudCh0b3RhbEFtb3VudCwgbWludERlY2ltYWwpLFxuICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlQ3JlYXRlTWV0YWRhdGFBY2NvdW50VjNJbnN0cnVjdGlvbihcbiAgICAgICAge1xuICAgICAgICAgIG1ldGFkYXRhOiBtZXRhZGF0YVBkYSxcbiAgICAgICAgICBtaW50LFxuICAgICAgICAgIG1pbnRBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICAgIHBheWVyOiBmZWVQYXllcixcbiAgICAgICAgICB1cGRhdGVBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICB9LFxuICAgICAgICB7XG4gICAgICAgICAgY3JlYXRlTWV0YWRhdGFBY2NvdW50QXJnc1YzOiB7XG4gICAgICAgICAgICBkYXRhOiB0b2tlbk1ldGFkYXRhLFxuICAgICAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgICAgICAgY29sbGVjdGlvbkRldGFpbHM6IG51bGw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aWNLZXksXG4gICAgICAgIHRvdGFsQW1vdW50LFxuICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICAgZGF0YXYyLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICk7XG5cbiAgICAgIC8vIGZyZWV6ZUF1dGhvcml0eVxuICAgICAgaWYgKGZyZWV6ZUF1dGhvcml0eSkge1xuICAgICAgICBpbnN0cy5wdXNoKFxuICAgICAgICAgIGNyZWF0ZUZyZWV6ZUF1dGhvcml0eShcbiAgICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICAgICAgZnJlZXplQXV0aG9yaXR5LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuTWludChcbiAgICAgICAgaW5zdHMsXG4gICAgICAgIFtvd25lci50b0tleXBhaXIoKSwgbWludC50b0tleXBhaXIoKV0sXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICBtaW50LnB1YmtleSxcbiAgICAgICk7XG4gICAgfSk7XG4gIH07XG59XG4iLCAiaW1wb3J0IHsgQ29uc3RhbnRzLCBkZWJ1Z0xvZywgaXNCcm93c2VyLCBpc05vZGUgfSBmcm9tICd+L3N1aXRlLXV0aWxzJztcbmltcG9ydCB7IEZpbGVUeXBlLCBJZGVudGl0eSwgVGFncywgVXBsb2FkYWJsZUZpbGVUeXBlIH0gZnJvbSAnfi90eXBlcy9zdG9yYWdlJztcbmltcG9ydCB7IFBoYW50b21Qcm92aWRlciB9IGZyb20gJ34vdHlwZXMvcGhhbnRvbSc7XG5pbXBvcnQgSXJ5cywgeyBXZWJJcnlzIH0gZnJvbSAnQGlyeXMvc2RrJztcbmltcG9ydCB7IFVwbG9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NwYWNlIENyZWF0b3JzIHtcbiAgICBleHBvcnQgY29uc3QgaW50b0luZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IE9wdGlvbjxJbnRlcm5hbENyZWF0b3JzW10+ID0+IHtcbiAgICAgIGlmICghaW5wdXQpIHtcbiAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICB9XG4gICAgICByZXR1cm4gaW5wdXQubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvQ29tcHJlc3NlZE5mdEluZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IEludGVybmFsQ3JlYXRvcnNbXSA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBbXTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBpbnB1dCEubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlciA9IChcbiAgICAgIG91dHB1dDogT3B0aW9uPEludGVybmFsQ3JlYXRvcnNbXT4sXG4gICAgKTogQ3JlYXRvcnNbXSB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3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEuc3ltYm9sKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU3ltYm9sKG1ldGFkYXRhLnN5bWJvbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAocmVzICYmIHJlcy5pc0Vycikge1xuICAgICAgICAgIHJlc3VsdHMucHVzaCguLi5yZXMuZXJyb3IuZGV0YWlscyk7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgICAgaWYgKHJlc3VsdHMubGVuZ3RoID4gMCkge1xuICAgICAgICBjb25zdCBtZXNzYWdlID1cbiAgICAgICAgICAnQ2F1Z2h0IGluIHRoZSB2YWxpZGF0aW9uIGVycm9ycy4gc2VlIGluZm9ybWF0aW9uIGUuZzogZXJyPFZhbGlkYXRvckVycm9yPi5kZXRhaWxzJztcbiAgICAgICAgdGhyb3cgbmV3IFZhbGlkYXRvckVycm9yKG1lc3NhZ2UsIHJlc3VsdHMpO1xuICAgICAgfVxuICAgICAgcmV0dXJuIE1lc3NhZ2UuU1VDQ0VTUztcbiAgICB9KTtcbiAgfTtcblxuICB0eXBlIFBpY2tOZnRTdG9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dWJrZXk7XG4gICAgICAgIGNvbnN0IHRva2VuQW1vdW50ID0gZC5hY2NvdW50LmRhdGEucGFyc2VkLmluZm8udG9rZW5BbW91bnRcbiAgICAgICAgICAuYW1vdW50IGFzIHN0cmluZztcbiAgICAgICAgaWYgKHRva2VuQW1vdW50ID09PSAnMScpIHtcbiAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIE1ldGFkYXRhLmZyb21BY2NvdW50QWRkcmVzcyhcbiAgICAgICAgICBjb25uZWN0aW9uLFxuICAgICAgICAgIEFjY291bnQuUGRhLmdldE1ldGFkYXRhKG1pbnQpLFxuICAgICAgICApXG4gICAgICAgICAgLnRoZW4oYXN5bmMgKG1ldGFkYXRhKSA9PiB7XG4gICAgICAgICAgICAvKiBlc2xpbnQtZGlzYWJsZSBAdHlwZXNjcmlwdC1lc2xpbnQvbm8tZXhwbGljaXQtYW55ICovXG4gICAgICAgICAgICByZXR1cm4gZmV0Y2hSZXRyeShtZXRhZGF0YS5kYXRhLnVyaSkudGhlbigoanNvbjogYW55KSA9PiB7XG4gICAgICAgICAgICAgIHJldHVybiBjb252ZXJ0ZXIobWV0YWRhdGEsIGpzb24sIHRva2VuQW1vdW50KTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgIH0pXG4gICAgICAgICAgLmNhdGNoKChlcnIpID0+IGRlYnVnTG9nKCcjIFtGZXRjaCBlcnJvcl0nLCBlcnIpKTtcbiAgICAgIH0pO1xuXG4gICAgICBjb25zdCBmaWx0ZXJzID0gKGF3YWl0IFByb21pc2UuYWxsKGRhdGFzKSkuZmlsdGVyKFxuICAgICAgICAoZGF0YSkgPT4gZGF0YSAhPT0gdW5kZWZpbmVkLFxuICAgICAgKTtcbiAgICAgIHJldHVybiBmaWx0ZXJzIGFzIFRva2VuTWV0YWRhdGFbXTtcbiAgICB9KTtcbiAgfTtcblxuICAvKipcbiAgICogRmV0Y2ggbWludGVkIG1ldGFkYXRhIGJ5IG1pbn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SBuZXcgVHJhbnNhY3Rpb24oe1xuICAgICAgICBsYXN0VmFsaWRCbG9ja0hlaWdodDogYmxvY2toYXNoT2JqLmxhc3RWYWxpZEJsb2NrSGVpZ2h0LFxuICAgICAgICBibG9ja2hhc2g6IGJsb2NraGFzaE9iai5ibG9ja2hhc2gsXG4gICAgICAgIGZlZVBheWVyOiBmZWVQYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgfSk7XG5cbiAgICAgIGNvbnN0IGluc3QyID0gY3JlYXRlVHJhbnNmZXJDaGVja2VkSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHNvdXJjZVRva2VuLnRva2VuQWNjb3VudC50b1B1YmxpY0tleSgpLFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIGRlc3RUb2tlbi50b2tlbkFjY291bnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgIENhbGN1bGF0b3IuY2FsY3VsYXRlQW1vdW50KGFtb3VudCwgbWludERlY2ltYWwpLFxuICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICAgW293bmVyLnRvS2V5cGFpcigpXSxcbiAgICAgICk7XG5cbiAgICAgIC8vIHJldHVybiBhc3NvY2lhdGVkIHRva2VuIGFjY291bnRcbiAgICAgIGlmICghZGVzdFRva2VuLmluc3QpIHtcbiAgICAgICAgdHguYWRkKGluc3QyKTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIC8vIHJldHVybiBpbnN0cnVjdGlvbiBhbmQgdW5kZWNpZGVkIGFzc29jaWF0ZWQgdG9rZW4gYWNjb3VudFxuICAgICAgICB0eC5hZGQoZGVzdFRva2VuLmluc3QpLmFkZChpbnN0Mik7XG4gICAgICB9XG5cbiAgICAgIHR4LnJlY2VudEJsb2NraGFzaCA9IGJsb2NraGFzaE9iai5ibG9ja2hhc2g7XG4gICAgICB0eC5wYXJ0aWFsU2lnbihvd25lci50b0tleXBhaXIoKSk7XG5cbi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xcbiAgICAgICAgc3BhY2U6IE1JTlRfU0laRSxcbiAgICAgICAgbGFtcG9ydHM6IGxhbXBvcnRzLFxuICAgICAgICBwcm9ncmFtSWQ6IFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICB9KSxcbiAgICApO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVJbml0aWFsaXplTWludEluc3RydWN0aW9uKFxuICAgICAgICBtaW50LFxuICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIG93bmVyLFxuICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKSxcbiAgICApO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVBc3NvY2lhdGVkVG9rZW5BY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgIGZlZVBheWVyLFxuICAgICAgICB0b2tlbkFzc29jaWF0ZWQsXG4gICAgICAgIG93bmVyLFxuICAgICAgICBtaW50LFxuICAgICAgKSxcbiAgICApO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVNaW50VG9DaGVja2VkSW5zdHJ1Y3Rpb24oXG4gICAgICAgIG1pbnQsXG4gICAgICAgIHRva2VuQXNzb2NpYXRlZCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIENhbGN1bGF0ZS5jYWxjdWxhdGVBbW91bnQodG90YWxBbW91bnQsIG1pbnREZWNpbWFsKSxcbiAgICAgICAgbWludERlY2ltYWwsXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUNyZWF0ZU1ldGFkYXRhQWNjb3VudFYzSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHtcbiAgICAgICAgICBtZXRhZGF0YTogbWV0YWRhdGFQZGEsXG4gICAgICAgICAgbWludCxcbiAgICAgICAgICBtaW50QXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBwYXllcjogZmVlUGF5ZXIsXG4gICAgICAgICAgdXBkYXRlQXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgIGNyZWF0ZU1ldGFkYXRhQWNjb3VudEFyZ3NWMzoge1xuICAgICAgICAgICAgZGF0YTogdG9rZW5NZXRhZGF0YSxcbiAgICAgICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICAgICAgIGNvbGxlY3Rpb25EZXRhaWxzOiBudWxsLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICApLFxuICAgICk7XG4gICAgcmV0dXJuIGluc3RydWN0aW9ucztcbiAgfTtcblxuICAvKipcbiAgICogU1BMLVRPS0VOIG1pbnRcbiAgICpcbiAgICogQHBhcmFtIHtTZWNyZXR9IG93bmVyICAgICAgLy8gdG9rZW4gb3duZXIgU2VjcmV0XG4gICAqIEBwYXJhbSB7bnVtYmVyfSB0b3RhbEFtb3VudCAvLyB0b3RhbCBudW1iZXJcbiAgICogQHBhcmFtIHtudW1iZXJ9IG1pbnREZWNpbWFsIC8vIHRva2VuIGRlY2ltYWxcbiAgICogQHBhcmFtIHtJbnB1dFRva2VuTWV0YWRhdGF9IGlucHV0ICAgICAgIC8vIHRva2VuIG1ldGFkYXRhXG4gICAqIEBwYXJhbSB7UGFydGlhbDxNaW50T3B0aW9ucz59IG9wdGlvbnMgICAvLyBvcHRpb25zXG4gICAqIEByZXR1cm4gUHJvbWlzZTxSZXN1bHQ8TWludEluc3RydWN0aW9uLCBFcnJvcj4+XG4gICAqL1xuICBleHBvcnQgY29uc3QgbWludCA9IGFzeW5jIChcbiAgICBvd25lcjogU2VjcmV0LFxuICAgIHRvdGFsQW1vdW50OiBudW1iZXIsXG4gICAgbWludERlY2ltYWw6IG51bWJlcixcbiAgICBpbnB1dDogSW5wdXRUb2tlbk1ldGFkYXRhLFxuICAgIG9wdGlvbnM6IFBhcnRpYWw8TWludE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ucHV0LmZpbGVQYXRoKSB7XG4gICAgICAgIGNvbnN0IHVwbG9hZGVkID0gYXdhaXQgU3RvcmFnZS51cGxvYWQoXG4gICAgICAgICAgc3RvcmFnZU1ldGFkYXRhLFxuICAgICAgICAgIGlucHV0LmZpbGVQYXRoLFxuICAgICAgICAgIHN0b3JhZ2VUeXBlLFxuICAgICAgICAgIHBheWVyLFxuICAgICAgICApO1xuXG4gICAgICAgIGlmICh1cGxvYWRlZC5pc0Vycikge1xuICAgICAgICAgIHRocm93IHVwbG9hZGVkO1xuICAgICAgICB9XG4gICAgICAgIHVyaSA9IHVwbG9hZGVkLnZhbHVlO1xuICAgICAgfSBlbHNlIGlmIChpbnB1dC51cmkpIHtcbiAgICAgICAgY29uc3QgaW1hZ2UgPSB7IGltYWdlOiBpbnB1dC51cmkgfTtcbiAgICAgICAgY29uc3QgdXBsb2FkZWQgPSBhd2FpdCBTdG9yYWdlLnVwbG9hZERhdGEoXG4gICAgICAgICAgeyAuLi5zdG9yYWdlTWV0YWRhdGEsIC4uLmltYWdlIH0sXG4gICAgICAgICAgc3RvcmFnZVR5cGUsXG4gICAgICAgICAgcGF5ZXIsXG4gICAgICAgICk7XG4gICAgICAgIGlmICh1cGxvYWRlZC5pc0Vycikge1xuICAgICAgICAgIHRocm93IHVwbG9hZGVkO1xuICAgICAgICB9XG4gICAgICAgIHVyaSA9IHVwbG9hZGVkLnZhbHVlO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgdGhyb3cgRXJyb3IoYE11c3Qgc2V0IGZpbGVQYXRoJyBvciAndXJpJ2ApO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBpc011dGFibGUgPSB0cnVlO1xuXG4gICAgICBjb25zdCBkYXRhdjIgPSBDb252ZXJ0ZXIuVG9rZW5NZXRhZGF0YS5pbnRvSW5mcmEoXG4gICAgICAgIGlucHV0LFxuICAgICAgICB1cmksXG4gICAgICAgIHNlbGxlckZlZUJhc2lzUG9pbnRzLFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgZGF0YXYyOiAnLCBkYXRhdjIpO1xuICAgICAgZGVidWdMb2coJyMgdXBsb2FkIGNvbnRlbnQgdXJsOiAnLCB1cmkpO1xuXG4gICAgICBjb25zdCBtaW50ID0gQWNjb3VudC5LZXlwYWlyLmNyZWF0ZSgpO1xuICAgICAgY29uc3QgaW5zdHMgPSBhd2FpdCBjcmVhdGVNaW50KFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICB0b3RhbEFtb3VudCxcbiAgICAgICAgbWludERlY2ltYWwsXG4gICAgICAgIGRhdGF2MixcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICBpc011dGFibGUsXG4gICAgICApO1xuXG4gICAgICAvLyBmcmVlemVBdXRob3JpdHlcbiAgICAgIGlmIChmcmVlemVBdXRob3JpdHkpIHtcbiAgICAgICAgaW5zdHMucHVzaChcbiAgICAgICAgICBjcmVhdGVGcmVlemVBdXRob3JpdHkoXG4gICAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgICAgIGZyZWV6ZUF1dGhvcml0eS50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBuZXcgVHJhbnNhY3Rpb25CdWlsZGVyLk1pbnQoXG4gICAgICAgIGluc3RzLFxuICAgICAgICBbb3duZXIudG9LZXlwYWlyKCksIG1pbnQudG9LZXlwYWlyKCldLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgbWludC5wdWJrZXksXG4gICAgICApO1xuICAgIH0pO1xuICB9O1xufVxuIiwgImltcG9ydCB7IENvbnN0YW50cywgZGVidWdMb2csIGlzQnJvd3NlciwgaXNOb2RlIH0gZnJvbSAnfi9zdWl0ZS11dGlscyc7X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CAiQWNjb3VudCIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiVHJhbnNhY3Rpb24iLCAiU3BsVG9rZW4iLCAiQWNjb3VudCIsICJUcmFuc2FjdGlvbiIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiY3JlYXRlTWludFRvQ2hlY2tlZEluc3RydWN0aW9uIiwgImdldEFzc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jIiwgIlRPS0VOX1BST0dSQU1fSUQiLCAiUHJvdmVuYW5jZUxheWVyIiwgInVwbG9hZEZpbGUiLCAiQXJ3ZWF2ZSIsICJOZnRTdG9yYWdlIiwgIlN0b3JhZ2UiLCAiU3BsVG9rZW4iLCAibWludCIsICJBY2NvdW50IiwgImdldEFzc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jIiwgIlRPS0VOX1BST0dSQU1fSUQiLCAiY3JlYXRlTWludFRvQ2hlY2tlZEluc3RydWN0aW9uIiwgIkNvbnZlcnRlciIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiZ2V0QXNzb2NpYXRlZFRva2VuQWRkcmVzc1N5bmMiLCAiU3BsVG9rZW4iLCAiQWNjb3VudCIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiY3JlYXRlVHJhbnNmZXJDaGVja2VkSW5zdHJ1Y3Rpb24iLCAiU3BsVG9rZW4iLCAiQWNjb3VudCIsICJjcmVhdGVUcmFuc2ZlckNoZWNrZWRJbnN0cnVjdGlvbiIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiU3BsVG9rZW4iXQp9Cg== \ No newline at end of file diff --git a/packages/suite-spl-token/src/gas-less-transfer.ts b/packages/suite-spl-token/src/gas-less-transfer.ts index f5db67a4a..a76c3015e 100644 --- a/packages/suite-spl-token/src/gas-less-transfer.ts +++ b/packages/suite-spl-token/src/gas-less-transfer.ts @@ -42,7 +42,6 @@ export namespace SplToken { feePayer, ); - let inst2; const blockhashObj = await Node.getConnection().getLatestBlockhash(); const tx = new Transaction({ @@ -51,7 +50,7 @@ export namespace SplToken { feePayer: feePayer.toPublicKey(), }); - inst2 = createTransferCheckedInstruction( + const inst2 = createTransferCheckedInstruction( sourceToken.tokenAccount.toPublicKey(), mint.toPublicKey(), destToken.tokenAccount.toPublicKey(), diff --git a/packages/suite-spl-token/test/gas-less-transfer.test.ts b/packages/suite-spl-token/test/gas-less-transfer.test.ts index 448e36461..717ab65d4 100644 --- a/packages/suite-spl-token/test/gas-less-transfer.test.ts +++ b/packages/suite-spl-token/test/gas-less-transfer.test.ts @@ -6,7 +6,6 @@ import { KeypairAccount, Pubkey } from '~/types/account'; import { Account } from '~/account'; import { Node } from '~/suite-utils'; -let source: KeypairAccount; let feePayer: KeypairAccount; const TOKEN_TOTAL_AMOUNT = 10000000; diff --git a/packages/suite-utils/dist/exports-248b9ab6.d.ts b/packages/suite-utils/dist/exports-c05c52f7.d.ts similarity index 100% rename from packages/suite-utils/dist/exports-248b9ab6.d.ts rename to packages/suite-utils/dist/exports-c05c52f7.d.ts index 34cd7f4f1..d7ed4ef3e 100644 --- a/packages/suite-utils/dist/exports-248b9ab6.d.ts +++ b/packages/suite-utils/dist/exports-c05c52f7.d.ts @@ -335,6 +335,35 @@ 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; @@ -476,33 +505,4 @@ declare class ValidatorError extends Error { constructor(message: string, details: Details[]); } -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; -}; - export { Account as A, Explorer as E, KeypairAccount as K, Node as N, OwnerInfo as O, Pubkey as P, Result as R, Secret as S, Try as T, Validator as V, isNode as a, bufferToArray as b, isPromise as c, debugLog as d, convertTimestampToDateTime as e, ValidatorError as f, ExplorerOptions as g, isBrowser as i, overwriteObject as o, sleep as s, unixTimestamp as u }; diff --git a/packages/suite-utils/dist/exports.d.mts b/packages/suite-utils/dist/exports.d.mts index bc8cb4133..6faf633e0 100644 --- a/packages/suite-utils/dist/exports.d.mts +++ b/packages/suite-utils/dist/exports.d.mts @@ -1,4 +1,4 @@ -export { A as Account, E as Explorer, g as ExplorerOptions, K as KeypairAccount, N as Node, O as OwnerInfo, P as Pubkey, S as Secret, T as Try, V as Validator, f as ValidatorError, b as bufferToArray, e as convertTimestampToDateTime, d as debugLog, i as isBrowser, a as isNode, c as isPromise, o as overwriteObject, s as sleep, u as unixTimestamp } from './exports-248b9ab6.js'; +export { A as Account, E as Explorer, g as ExplorerOptions, K as KeypairAccount, N as Node, O as OwnerInfo, P as Pubkey, S as Secret, T as Try, V as Validator, f as ValidatorError, b as bufferToArray, e as convertTimestampToDateTime, d as debugLog, i as isBrowser, a as isNode, c as isPromise, o as overwriteObject, s as sleep, u as unixTimestamp } from './exports-c05c52f7.js'; import '@solana/web3.js'; import 'bn.js'; import '@metaplex-foundation/mpl-token-metadata'; diff --git a/packages/suite-utils/dist/exports.d.ts b/packages/suite-utils/dist/exports.d.ts index bc8cb4133..6faf633e0 100644 --- a/packages/suite-utils/dist/exports.d.ts +++ b/packages/suite-utils/dist/exports.d.ts @@ -1,4 +1,4 @@ -export { A as Account, E as Explorer, g as ExplorerOptions, K as KeypairAccount, N as Node, O as OwnerInfo, P as Pubkey, S as Secret, T as Try, V as Validator, f as ValidatorError, b as bufferToArray, e as convertTimestampToDateTime, d as debugLog, i as isBrowser, a as isNode, c as isPromise, o as overwriteObject, s as sleep, u as unixTimestamp } from './exports-248b9ab6.js'; +export { A as Account, E as Explorer, g as ExplorerOptions, K as KeypairAccount, N as Node, O as OwnerInfo, P as Pubkey, S as Secret, T as Try, V as Validator, f as ValidatorError, b as bufferToArray, e as convertTimestampToDateTime, d as debugLog, i as isBrowser, a as isNode, c as isPromise, o as overwriteObject, s as sleep, u as unixTimestamp } from './exports-c05c52f7.js'; import '@solana/web3.js'; import 'bn.js'; import '@metaplex-foundation/mpl-token-metadata'; diff --git a/packages/suite-utils/dist/exports.js b/packages/suite-utils/dist/exports.js index 8af7d5d6f..1685dacee 100644 --- a/packages/suite-utils/dist/exports.js +++ b/packages/suite-utils/dist/exports.js @@ -1479,4 +1479,4 @@ var ValidatorError = class extends Error { sleep, unixTimestamp }); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2V4cG9ydHMudHMiLCAiLi4vc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9iYXRjaC50cyIsICIuLi8uLi90eXBlcy9zcmMvZ2xvYmFsL2luZGV4LnRzIiwgIi4uLy4uL2dsb2JhbC9zcmMvaW5kZXgudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMva2V5cGFpci50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9wZGEudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvaW5kZXgudHMiLCAiLi4vLi4vbm9kZS9zcmMvaW5kZXgudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY29tbW9uLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9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bkJ1aWxkZXIge1xuICBleHBvcnQgY2xhc3MgQmF0Y2gge1xuICAgIHN1Ym1pdCA9IGFzeW5jIChcbiAgICAgIGFycjogQ29tbW9uLkNvbW1vbltdIHwgTWludC5NaW50W10sXG4gICAgKTogUHJvbWlzZTxSZXN1bHQ8VHJhbnNhY3Rpb25TaWduYXR1cmUsIEVycm9yPj4gPT4ge1xuICAgICAgcmV0dXJuIFRyeShhc3luYyAoKSA9PiB7XG4gICAgICAgIGxldCBpID0gMDtcbiAgICAgICAgZm9yIChjb25zdCBhIG9mIGFycikge1xuICAgICAgICAgIGlmICghYS5pbnN0cnVjdGlvbnMgJiYgIWEuc2lnbmVycykge1xuICAgICAgICAgICAgdGhyb3cgRXJyb3IoXG4gICAgICAgICAgICAgIGBvbmx5IEluc3RydWN0aW9uIG9iamVjdCB0aGF0IGNhbiB1c2UgYmF0Y2hTdWJtaXQoKS5cbiAgICAgICAgICAgIEluZGV4OiAke2l9LCBTZXQgdmFsdWU6ICR7SlNPTi5zdHJpbmdpZnkoYSl9YCxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIGkrKztcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IGluc3RydWN0aW9ucyA9IGFyci5mbGF0TWFwKChhKSA9PiBhLmluc3RydWN0aW9ucyk7XG4gICAgICAgIGNvbnN0IHNpZ25lcnMgPSBhcnIuZmxhdE1hcCgoYSkgPT4gYS5zaWduZXJzKTtcbiAgICAgICAgY29uc3QgZmVlUGF5ZXJzID0gYXJyLmZpbHRlcigoYSkgPT4gYS5mZWVQYXllciAhPT0gdW5kZWZpbmVkKTtcbiAgICAgICAgbGV0IGZlZVBheWVyID0gc2lnbmVyc1swXTtcbiAgICAgICAgaWYgKGZlZVBheWVycy5sZW5ndGggPiAwICYmIGZlZVBheWVyc1swXS5mZWVQYXllcikge1xuICAgICAgICAgIGZlZVBheWVyID0gZmVlUGF5ZXJzWzBdLmZlZVBheWVyO1xuICAgICAgIC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ldGFkYXRhLmltYWdlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3JveWFsdHknOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5yb3lhbHR5KSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzUm95YWx0eShtZXRhZGF0YS5yb3lhbHR5KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlcl9mZWVfYmFzaXNfcG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJGZWVCYXNpc1BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0YWRhdGEubmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzeW1ib2wnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLnN5bWJvbCkge1xuICAgICAgICAgICAgICByZXMgPSBpc1N5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YS5mZWVQYXllciAhPT0gdW5kZWZpbmVkKTtcbiAgICAgICAgbGV0IGZlZVBheWVyID0gc2lnbmVyc1swXTtcbiAgICAgICAgaWYgKGZlZVBheWVycy5sZW5ndGggPiAwICYmIGZlZVBheWVyc1swXS5mZWVQYXllcikge1xuICAgICAgICAgIGZlZVBheWVyID0gZmVlUGF5ZXJzWzBdLmZlZVBheWVyO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgdHJhbnNhY3Rpb24gPSBuZXcgVHJhbnNhY3Rpb24oKTtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHNpZ25lcnM7XG4gICAgICAgIGlmIChmZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gZmVlUGF5ZXIucHVibGljS2V5O1xuICAgICAgICAgIGZpbmFsU2lnbmVycyA9IFtmZWVQYXllciwgLi4uc2lnbmVyc107XG4gICAgICAgIH1cbiAgICAgICAgaW5zdHJ1Y3Rpb25zLm1hcCgoaW5zdCkgPT4gdHJhbnNhY3Rpb24uYWRkKGluc3QpKTtcblxuICAgICAgICAvLyBDYWxjdWxhdGVUeHNpemUuaXNNYXhUcmFuc2FjdGlvblNpemUodHJhbnNhY3Rpb24sIGZlZVBheWVyLnB1YmxpY0tleSk7XG5cbiAgICAgICAgY29uc3Qgb3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogTUFYX1JFVFJJRVMsXG4gICAgICAgIH07XG5cbiAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgIG9wdGlvbnMsXG4gICAgICAgICk7XG4gICAgICB9KTtcbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0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CksXG4gICAgICAgICAgYWRkcmVzcy50b1B1YmxpY0tleSgpLnRvQnVmZmVyKCksXG4gICAgICAgIF0sXG4gICAgICAgIFBST0dSQU1fSUQsXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGdldE1hc3RlckVkaXRpb24gPSAoYWRkcmVzczogUHVia2V5KTogUHVibGljS2V5ID0+IHtcbiAgICAgIGNvbnN0IFtwdWJsaWNLZXldID0gUHVibGljS2V5LmZpbmRQcm9ncmFtQWRkcmVzc1N5bmMoXG4gICAgICAgIFtcbiAgICAgICAgICBCdWZmZXIuZnJvbSgnbWV0YWRhdGEnKSxcbiAgICAgICAgICBQUk9HUkFNX0lELnRvQnVmZmVyKCksXG4gICAgICAgICAgYWRkcmVzcy50b1B1YmxpY0tleSgpLnRvQnVmZmVyKCksXG4gICAgICAgICAgQnVmZmVyLmZyb20oJ2VkaXRpb24nKSxcbiAgICAgICAgXSxcbiAgICAgICAgUFJPR1JBTV9JRCxcbiAgICAgICk7XG4gICAgICByZXR1cm4gcHVibGljS2V5O1xuICAgIH07XG5cbiAgICBleHBvcnQgY29uc3QgZ2V0VHJlZUF1dGhvcml0eSA9IChhZGRyZXNzOiBQdWJrZXkpOiBQdWJsaWNLZXkgPT4ge1xuICAgICAgY29uc3QgW3B1YmxpY0tleV0gPSBQdWJsaWNLZXkuZmluZFByb2dyYW1BZGRyZXNzU3luYyhcbiAgICAgICAgW2FkZHJlc3MudG9QdWJsaWNLZXkoKS50b0J1ZmZlcigpXSxcbiAgICAgICAgTVBMX0JVQkJMRUdVTV9QUk9HUkFNX0lELnRvUHVibGljS2V5KCksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGdldEJndW1TaWduZXIgPSAoKTogUHVibGljS2V5ID0+IHtcbiAgICAgIGNvbnN0IFtwdWJsaWNLZXldID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gICAgICAgICB2ZXJpZmllZDogZmFsc2UsXG4gICAgICAgIH07XG4gICAgICB9KTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGludG9Db21wcmVzc2VkTmZ0SW5mcmEgPSAoXG4gICAgICBpbnB1dDogT3B0aW9uPElucHV0Q3JlYXRvcnNbXT4gfCB1bmRlZmluZWQsXG4gICAgKTogSW50ZXJuYWxDcmVhdG9yc1tdID0+IHtcbiAgICAgIGlmICghaW5wdXQpIHtcbiAgICAgICAgcmV0dXJuIFtdO1xuICAgICAgfVxuICAgICAgcmV0dXJuIGlucHV0IS5tYXAoKGRhdGEpID0+IHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICBhZGRyZXNzOiBkYXRhLmFkZHJlc3MudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBzaGFyZTogZGF0YS5zaGFyZSxcbiAgICAgICAgICB2ZXJpZmllZDogZmFsc2UsXG4gICAgICAgIH07XG4gICAgICB9KTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGludG9Vc2VyID0gKFxuICAgICAgb3V0cHV0OiBPcHRpb248SW50ZXJuYWxDcmVhdG9yc1tdPixcbiAgICApOiBDcmVhdG9yc1tdIHwgdW5kZWZpbmVkID0+IHtcbiAgICAgIGlmICghb3V0cHV0KSB7XG4gICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBvdXRwdXQubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvU3RyaW5nKCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGRhdGEudmVyaWZpZWQsXG4gICAgICAgIH07XG4gICAgICB9KTtcbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHsgQ29udmVydGVyIGFzIENvbGxlY3Rpb24gfSB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SxcbiAgICAgIG1hcHBpbmdUb2tlbkFjY291bnQ/OiBQb3N0VG9rZW5BY2NvdW50W10sXG4gICAgKTogSGlzdG9yeSB8IHVuZGVmaW5lZCA9PiB7XG4gICAgICBjb25zdCBoaXN0b3J5OiBIaXN0b3J5ID0ge307XG5cbiAgICAgIGlmIChtYXBwaW5nVG9rZW5BY2NvdW50KSB7XG4gICAgICAgIGNvbnN0IGZvdW5kU291cmNlID0gbWFwcGluZ1Rva2VuQWNjb3VudC5maW5kKFxuICAgICAgICAgIChtKSA9PiBtLmFjY291bnQgPT09IG91dHB1dC5wYXJzZWQuaW5mby5zb3VyY2UsXG4gICAgICAgICk7XG4gICAgICAgIGNvbnN0IGZvdW5kRGVzdCA9IG1hcHBpbmdUb2tlbkFjY291bnQuZmluZChcbiAgICAgICAgICAobSkgPT4gbS5hY2NvdW50ID09PSBvdXRwdXQucGFyc2VkLmluZm8uZGVzdGluYXRpb24sXG4gICAgICAgICk7XG4gICAgICAgIGZvdW5kU291cmNlICYmIChoaXN0b3J5LnNvdXJjZSA9IGZvdW5kU291cmNlLm93bmVyKTtcbiAgICAgICAgZm91bmREZXN0ICYmIChoaXN0b3J5LmRlc3RpbmF0aW9uID0gZm91bmREZXN0Lm93bmVyKTtcbiAgICAgIH1cblxuICAgICAgaGlzdG9yeS50b2tlbkFtb3VudCA9IG91dHB1dC5wYXJzZWQuaW5mby50b2tlbkFtb3VudDtcbiAgICAgIGhpc3RvcnkubWludCA9IG91dHB1dC5wYXJzZWQuaW5mby5taW50O1xuICAgICAgaGlzdG9yeS5tdWx0aXNpZ0F1dGhvcml0eSA9IG91dHB1dC5wYXJzZWQuaW5mby5tdWx0aXNpZ0F1dGhvcml0eTtcbiAgICAgIGhpc3Rvcnkuc2lnbmVycyA9IG91dHB1dC5wYXJzZWQuaW5mby5zaWduZXJzO1xuICAgICAgaGlzdG9yeS50eXBlID0gb3V0cHV0LnByb2dyYW07XG4gICAgICBoaXN0b3J5LmRhdGVUaW1lID0gY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bWV0YWRhdGEgJiYgbWV0YWRhdGEuaW1hZ2UpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNJbWFnZVVybChtZXRhZGF0YS5pbWFnZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdyb3lhbHR5JzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEucm95YWx0eSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1JveWFsdHkobWV0YWRhdGEucm95YWx0eSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ25hbWUnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLm5hbWUpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNOYW1lKG1ldGFkYXRhLm5hbWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc3ltYm9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sICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiQ29tbW9uIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJpbXBvcnRfd2ViMyIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiaW1wb3J0X3dlYjMiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlJlc3VsdCIsICJDb252ZXJ0ZXIiLCAiQ29sbGVjdGlvbiIsICJDb2xsZWN0aW9uTWludCIsICJDb252ZXJ0ZXIiLCAiQ3JlYXRvcnMiLCAiQ29udmVydGVyIiwgIkNvbXByZXNzZWROZnRNZXRhZGF0YSIsICJDb252ZXJ0ZXIiLCAiUm95YWx0eSIsICJDb252ZXJ0ZXIiLCAiTmZ0IiwgIkNvbnZlcnRlciIsICJNZW1vIiwgIkNvbnZlcnRlciIsICJNaW50IiwgIkNvbnZlcnRlciIsICJSZWd1bGFyTmZ0TWV0YWRhdGEiLCAiQ29udmVydGVyIiwgIlByb3BlcnRpZXMiLCAiQ29udmVydGVyIiwgIlVzZXMiLCAiQ29udmVydGVyIiwgIlRva2VuTWV0YWRhdGEiLCAiQ29udmVydGVyIiwgIlRyYW5zZmVyQ2hlY2tlZCIsICJDb252ZXJ0ZXIiLCAiVHJhbnNmZXIiLCAiQ29udmVydGVyIiwgIlZhbGlkYXRvciIsICJNZXNzYWdlIiwgIkNvbnZlcnRlciJdCn0K \ No newline at end of file diff --git a/packages/suite-utils/dist/exports.mjs b/packages/suite-utils/dist/exports.mjs index ebaf8d8cb..14fc310db 100644 --- a/packages/suite-utils/dist/exports.mjs +++ b/packages/suite-utils/dist/exports.mjs @@ -1442,4 +1442,4 @@ export { sleep, unixTimestamp }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2Nvbn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jogc3RyaW5nKTogc3RyaW5nID0+IHtcbiAgICBzd2l0Y2ggKGVudikge1xuICAgICAgY2FzZSBDb25zdGFudHMuQ2x1c3Rlci5wcmQ6IHtcbiAgICAgICAgY29uc3QgdXJscyA9IENvbnN0YW50cy5CdW5kbHJVcmwucHJkLnNwbGl0KCcsJyk7XG4gICAgICAgIGNvbnN0IGluZGV4ID0gRGF0ZS5ub3coKSAlIHVybHMubGVuZ3RoO1xuICAgICAgICByZXR1cm4gdXJsc1tpbmRleF07XG4gICAgICB9XG4gICAgICBkZWZhdWx0OiB7XG4gICAgICAgIHJldHVybiBDb25zdGFudHMuQnVuZGxyVXJsLmRldjtcbiAgICAgIH1cbiAgICB9XG4gIH07XG5cbiAgZXhwb3J0IGNvbnN0IHN3aXRjaERhc0FwaSA9IChlbnY6IHN0cmluZyk6IHN0cmluZyA9PiB7XG4gICAgc3dpdGNoIChlbnYpIHtcbiAgICAgIGNhc2UgQ29uc3RhbnRzLkNsdXN0ZXIucHJkOiB7XG4gICAgICAgIGlmIChkYXNBcGlVcmwubGVuZ3RoIDwgMSkge1xuICAgICAgICAgIHRocm93IEVycm9yKENvbnN0YW50cy5XYXJubmluZ01lc3NhZ2UuREFTX0FQSV9VUkwpO1xuICAgICAgICB9XG4gICAgICAgIGNvbnN0IHVybHMgPSBDb25zdGFudHMuQnVuZGxyVXJsLnByZC5zcGxpdCgnLCcpO1xuICAgICAgICBjb25zdCBpbmRleCA9IERhdGUubm93KCkgJSB1cmxzLmxlbmd0aDtcbiAgICAgICAgcmV0dXJuIHVybHNbaW5kZXhdO1xuICAgICAgfVxuICAgICAgZGVmYXVsdDoge1xuICAgICAgICBjb25zdCB1cmxzID0gQ29uc3RhbnRzLkRhc0FwaVVybC5kZXYuc3BsaXQoJywnKTtcbiAgICAgICAgY29uc3QgaW5kZXggPSBEYXRlLm5vdygpICUgdXJscy5sZW5ndGg7XG4gICAgICAgIHJldHVybiB1cmxzW2luZGV4XTtcbiAgICAgIH1cbiAgICB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GwoXG4gICAgICAgIGlucHV0LmZpbGVzLm1hcChhc3luYyAoZmlsZSkgPT4ge1xuICAgICAgICAgIGlmICghZmlsZS5maWxlUGF0aCkge1xuICAgICAgICAgICAgcmV0dXJuIHt9O1xuICAgICAgICAgIH1cbiAgICAgICAgICBjb25zdCByZXMgPSBhd2FpdCBjYWxsYmFja0Z1bmMoZmlsZS5maWxlUGF0aCwgc3RvcmFnZVR5cGUsIGZlZVBheWVyKTtcbiAgICAgICAgICBpZiAocmVzLmlzRXJyKSB7XG4gICAgICAgICAgICB0aHJvdyBFcnJvcihyZXMuZXJyb3IubWVzc2FnZSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBvdmVyd3JpdGVPYmplY3QoZmlsZSwgW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBleGlzdHNLZXk6ICdmaWxlUGF0aCcsXG4gICAgICAgICAgICAgIHdpbGw6IHsga2V5OiAndXJpJywgdmFsdWU6IHJlcy52YWx1ZSB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICBdKTtcbiAgICAgICAgfSksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHsgLi4uaW5wdXQsIGZpbGVzIH0gYXMgUHJvcGVydGllcztcbiAgICB9O1xuICB9XG59XG4iLCAiLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLXVudXNlZC12YXJzICovXG5pbXBvcnQgeyBPcHRpb24sIFVzZXMgfSBmcm9tICd+L3R5cGVzL3JlZ3VsYXItbmZ0JztcblxuZXhwb3J0IG5hbWVzcGFjZSBDb252ZXJ0ZXIge1xuICBleHBvcnQgbmFtZXNwYWNlIFVzZXMge1xuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlclNpZGUgPSAob3V0cHV0OiBPcHRpb248VXNlcz4pOiBVc2VzIHwgdW5kZWZpbmVkID0+IHtcbiAgICAgIGlmICghb3V0cHV0KSB7XG4gICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG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hZ2UpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAncm95YWx0eSc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnJveWFsdHkpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNSb3lhbHR5KG1ldGFkYXRhLnJveWFsdHkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEuc3ltYm9sKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU3ltYm9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tleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5pbWFnZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc0ltYWdlVXJsKG1ldGFkYXRhLmltYWdlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3JveWFsdHknOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5yb3lhbHR5KSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzUm95YWx0eShtZXRhZGF0YS5yb3lhbHR5KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlcl9mZWVfYmFzaXNfcG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJGZWVCYXNpc1BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0YWRhdGEubmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYX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hbnNhY3Rpb24iLCAic2VuZEFuZENvbmZpcm1UcmFuc2FjdGlvbiIsICJzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uIiwgIlRyYW5zYWN0aW9uIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJUcmFuc2FjdGlvbiIsICJzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uIiwgIlRyYW5zYWN0aW9uIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJUcmFuc2FjdGlvbiIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJSZXN1bHQiLCAiQ29udmVydGVyIiwgIkNvbGxlY3Rpb24iLCAiQ29sbGVjdGlvbk1pbnQiLCAiQ29udmVydGVyIiwgIkNyZWF0b3JzIiwgIkNvbnZlcnRlciIsICJDb21wcmVzc2VkTmZ0TWV0YWRhdGEiLCAiQ29udmVydGVyIiwgIlJveWFsdHkiLCAiQ29udmVydGVyIiwgIk5mdCIsICJDb252ZXJ0ZXIiLCAiTWVtbyIsICJDb252ZXJ0ZXIiLCAiTWludCIsICJDb252ZXJ0ZXIiLCAiUmVndWxhck5mdE1ldGFkYXRhIiwgIkNvbnZlcnRlciIsICJQcm9wZXJ0aWVzIiwgIkNvbnZlcnRlciIsICJVc2VzIiwgIkNvbnZlcnRlciIsICJUb2tlbk1ldGFkYXRhIiwgIkNvbnZlcnRlciIsICJUcmFuc2ZlckNoZWNrZWQiLCAiQ29udmVydGVyIiwgIlRyYW5zZmVyIiwgIkNvbnZlcnRlciIsICJWYWxpZGF0b3IiLCAiTWVzc2FnZSIsICJDb252ZXJ0ZXIiXQp9Cg== \ No newline at end of file diff --git a/packages/suite-utils/dist/index.d.mts b/packages/suite-utils/dist/index.d.mts index 6ad40da0d..cdf2374fc 100644 --- a/packages/suite-utils/dist/index.d.mts +++ b/packages/suite-utils/dist/index.d.mts @@ -1,5 +1,5 @@ import { PublicKey, Commitment } from '@solana/web3.js'; -export { A as Account, E as Explorer, g as ExplorerOptions, K as KeypairAccount, N as Node, O as OwnerInfo, P as Pubkey, R as Result, S as Secret, T as Try, V as Validator, f as ValidatorError, b as bufferToArray, e as convertTimestampToDateTime, d as debugLog, i as isBrowser, a as isNode, c as isPromise, o as overwriteObject, s as sleep, u as unixTimestamp } from './exports-248b9ab6.js'; +export { A as Account, E as Explorer, g as ExplorerOptions, K as KeypairAccount, N as Node, O as OwnerInfo, P as Pubkey, R as Result, S as Secret, T as Try, V as Validator, f as ValidatorError, b as bufferToArray, e as convertTimestampToDateTime, d as debugLog, i as isBrowser, a as isNode, c as isPromise, o as overwriteObject, s as sleep, u as unixTimestamp } from './exports-c05c52f7.js'; import 'bn.js'; import '@metaplex-foundation/mpl-token-metadata'; diff --git a/packages/suite-utils/dist/index.d.ts b/packages/suite-utils/dist/index.d.ts index 6ad40da0d..cdf2374fc 100644 --- a/packages/suite-utils/dist/index.d.ts +++ b/packages/suite-utils/dist/index.d.ts @@ -1,5 +1,5 @@ import { PublicKey, Commitment } from '@solana/web3.js'; -export { A as Account, E as Explorer, g as ExplorerOptions, K as KeypairAccount, N as Node, O as OwnerInfo, P as Pubkey, R as Result, S as Secret, T as Try, V as Validator, f as ValidatorError, b as bufferToArray, e as convertTimestampToDateTime, d as debugLog, i as isBrowser, a as isNode, c as isPromise, o as overwriteObject, s as sleep, u as unixTimestamp } from './exports-248b9ab6.js'; +export { A as Account, E as Explorer, g as ExplorerOptions, K as KeypairAccount, N as Node, O as OwnerInfo, P as Pubkey, R as Result, S as Secret, T as Try, V as Validator, f as ValidatorError, b as bufferToArray, e as convertTimestampToDateTime, d as debugLog, i as isBrowser, a as isNode, c as isPromise, o as overwriteObject, s as sleep, u as unixTimestamp } from './exports-c05c52f7.js'; import 'bn.js'; import '@metaplex-foundation/mpl-token-metadata'; diff --git a/packages/suite-utils/dist/index.js b/packages/suite-utils/dist/index.js index b7b732124..36be5aafd 100644 --- a/packages/suite-utils/dist/index.js +++ b/packages/suite-utils/dist/index.js @@ -1483,4 +1483,4 @@ var ValidatorError = class extends Error { sleep, unixTimestamp }); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uL3NyYy9jb25zdGFudHMudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvYmF0Y2gudHMiLCAiLi4vLi4vbm9kZS9zcmMvaW5kZXgudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY29tbW9uLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL21pbnQudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvcGFydGlhbC1zaWduLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2NhbGN1bGF0ZS10eHNpemUudHMiLCAiLi4vLi4vdHlwZXMvc3JjL2dsb2JhbC9pbmRleC50cyIsICIuLi8uLi9nbG9iYWwvc3JjL2luZGV4LnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2tleXBhaXIudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvcGRhLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2luZGV4LnRzIiwgIi4uL3NyYy9zaGFyZWQudHMiLCAiLi4vc3JjL3Jlc3VsdC50cyIsICIuLi8uLi9jb252ZXJ0ZXIvc3JjL2NvbGxlY3Rpb24udHMiLCAiLi4vLi4vY29udmVydGVyL3NyYy9jcmVhdG9ycy50cyIsICIuLi8uLi9jb252ZXJ0ZXIvc3JjL2NvbXByZXNzZWQtbmZ0LW1ldGFkYXRhLnRzIiwgIi4uLy4uL2NvbnZlcnRlci9zcmMvcm95YWx0eS50cyIsICI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GlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IE9wdGlvbjxJbnRlcm5hbENyZWF0b3JzW10+ID0+IHtcbiAgICAgIGlmICghaW5wdXQpIHtcbiAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICB9XG4gICAgICByZXR1cm4gaW5wdXQubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvQ29tcHJlc3NlZE5mdEluZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IEludGVybmFsQ3JlYXRvcnNbXSA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBbXTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBpbnB1dCEubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlciA9IChcbiAgICAgIG91dHB1dDogT3B0aW9uPEludGVybmFsQ3JlYXRvcnNbXT4sXG4gICAgKTogQ3JlYXRvcnNbXSB8IHVuZGVmaW5lZCA9PiB7XG4gICAgICBpZiAoIW91dHB1dCkge1xuICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1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QYXRoOiBGaWxlVHlwZSxcbiAgICAgICAgc3RvcmFnZVR5cGU6IFN0b3JhZ2VUeXBlLFxuICAgICAgICBmZWVQYXllcj86IFNlY3JldCxcbiAgICAgICkgPT4gUHJvbWlzZTxSZXN1bHQ8c3RyaW5nLCBFcnJvcj4+LFxuICAgICAgc3RvcmFnZVR5cGU6IFN0b3JhZ2VUeXBlLFxuICAgICAgZmVlUGF5ZXI/OiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxQcm9wZXJ0aWVzPiA9PiB7XG4gICAgICBpZiAoIWlucHV0IHx8ICFpbnB1dC5maWxlcykge1xuICAgICAgICByZXR1cm4ge307XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGZpbGVzID0gYXdhaXQgUHJvbWlzZS5hbGwoXG4gICAgICAgIGlucHV0LmZpbGVzLm1hcChhc3luYyAoZmlsZSkgPT4ge1xuICAgICAgICAgIGlmICghZmlsZS5maWxlUGF0aCkge1xuICAgICAgICAgICAgcmV0dXJuIHt9O1xuICAgICAgICAgIH1cbiAgICAgICAgICBjb25zdCByZXMgPSBhd2FpdCBjYWxsYmFja0Z1bmMoZmlsZS5maWxlUGF0aCwgc3RvcmFnZVR5cGUsIGZlZVBheWVyKTtcbiAgICAgICAgICBpZiAocmVzLmlzRXJyKSB7XG4gICAgICAgICAgICB0aHJvdyBFcnJvcihyZXMuZXJyb3IubWVzc2FnZSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBvdmVyd3JpdGVPYmplY3QoZmlsZSwgW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBleGlzdHNLZXk6ICdmaWxlUGF0aCcsXG4gICAgICAgICAgICAgIHdpbGw6IHsga2V5OiAndXJpJywgdmFsdWU6IHJlcy52YWx1ZSB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICBdKTtcbiAgICAgICAgfSksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHsgLi4uaW5wdXQsIGZpbGVzIH0gYXMgUHJv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ICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEuc3ltYm9sKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU3ltYm9sKG1ldGFkYXRhLnN5bWJvbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAocmVzICYmIHJlcy5pc0Vycikge1xuICAgICAgICAgIHJlc3VsdHMucHVzaCguLi5yZXMuZXJyb3IuZGV0YWlscyk7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgICAgaWYgKHJlc3VsdHMubGVuZ3RoID4gMCkge1xuICAgICAgICBjb25zdCBtZXNzYWdlID1cbiAgICAgICAgICAnQ2F1Z2h0IGluIHRoZSB2YWxpZGF0aW9uIGVycm9ycy4gc2VlIGluZm9ybWF0aW9uIGUuZzogZXJyPFZhbGlkYXRvckVycm9yPi5kZXRhaWxzJztcbiAgICAgICAgdGhyb3cgbmV3IFZhbGlkYXRvckVycm9yKG1lc3NhZ2UsIHJlc3VsdHMpO1xuICAgICAgfVxuICAgICAgcmV0dXJuIE1lc3NhZ2UuU1VDQ0VTUztcbiAgICB9KTtcbiAgfTtcblxuICB0eXBlIFBpY2tOZnRTdG9yYWdlID0gUGljazxcbiAgICBPZmZjaGFpbixcbiAgICAnbmFtZScgfCAnc3ltYm9sJyB8ICdpbWFnZScgfCAnc2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ICAgIHRocm93IEVycm9yKENvbnN0YW50cy5XYXJubmluZ01lc3NhZ2UuREFTX0FQSV9VUkwpO1xuICAgICAgICB9XG4gICAgICAgIGNvbnN0IHVybHMgPSBDb25zdGFudHMuQnVuZGxyVXJsLnByZC5zcGxpdCgnLCcpO1xuICAgICAgICBjb25zdCBpbmRleCA9IERhdGUubm93KCkgJSB1cmxzLmxlbmd0aDtcbiAgICAgICAgcmV0dXJuIHVybHNbaW5kZXhdO1xuICAgICAgfVxuICAgICAgZGVmYXVsdDoge1xuICAgICAgICBjb25zdCB1cmxzID0gQ29uc3RhbnRzLkRhc0FwaVVybC5kZXYuc3BsaXQoJywnKTtcbiAgICAgICAgY29uc3QgaW5kZXggPSBEYXRlLm5vdygpICUgdXJscy5sZW5ndGg7XG4gICAgICAgIHJldHVybiB1cmxzW2luZGV4XTtcbiAgICAgIH1cbiAgICB9XG4gIH07XG5cbiAgZXhwb3J0IGNvbnN0IHN3aXRjaE5mdFN0b3JhZ2UgPSAoZW52OiBzdHJpbmcpOiBzdHJpbmcgPT4ge1xuICAgIHN3aXRjaCAoZW52KSB7XG4gICAgICBjYXNlIENvbnN0YW50cy5DbHVzdGVyLnByZDpcbiAgICAgICAgaWYgKCFuZnRTdG9yYWdlQXBpS2V5KSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoV2Fybm5pbmdNZXNzYWdlLk5GVF9TVE9SQUdFX0FQSV9LRVkpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBuZnRTdG9yYWdlQXBpS2V5O1xuICAgICAgZGVmYXVsdDoge1xuICAgICAgICByZXR1cm4gQ29uc3RhbnRzLk5mdHN0b3JhZ2VBcGlLZXkuZGV2O1xuICAgICAgfVxuICAgIH1cbiAgfTtcblxuICBleHBvcnQgY29uc3QgV1JBUFBFRF9UT0tFTl9QUk9HUkFNX0lEID0gbmV3IFB1YmxpY0tleShcbiAgICAnU28xMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMicsXG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ycyB7XG4gICAgZXhwb3J0IGNvbnN0IGludG9JbmZyYSA9IChcbiAgICAgIGlucHV0OiBPcHRpb248SW5wdXRDcmVhdG9yc1tdPiB8IHVuZGVmaW5lZCxcbiAgICApOiBPcHRpb248SW50ZXJuYWxDcmVhdG9yc1tdPiA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBudWxsO1xuICAgICAgfVxuICAgICAgcmV0dXJuIGlucHV0Lm1hcCgoZGF0YSkgPT4ge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIGFkZHJlc3M6IGRhdGEuYWRkcmVzcy50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIHNoYXJlOiBkYXRhLnNoYXJlLFxuICAgICAgICAgIHZlcmlmaWVkOiBmYWxzZSxcbiAgICAgICAgfTtcbiAgICAgIH0pO1xuICAgIH07XG5cbiAgICBleHBvcnQgY29uc3QgaW50b0NvbXByZXNzZWROZnRJbmZyYSA9IChcbiAgICAgIGlucHV0OiBPcHRpb248SW5wdXRDcmVhdG9yc1tdPiB8IHVuZGVmaW5lZCxcbiAgICApOiBJbnRlcm5hbENyZWF0b3JzW10gPT4ge1xuICAgICAgaWYgKCFpbnB1dCkge1xuICAgICAgICByZXR1cm4gW107XG4gICAgICB9XG4gICAgICByZXR1cm4gaW5wdXQhLm1hcCgoZGF0YSkgPT4ge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIGFkZHJlc3M6IGRhdGEuYWRkcmVzcy50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIHNoYXJlOiBkYXRhLnNoYXJlLFxuICAgICAgICAgIHZlcmlmaWVkOiBmYWxzZSxcbiAgICAgICAgfTtcbiAgICAgIH0pO1xuICAgIH07XG5cbiAgICBleHBvcnQgY29uc3QgaW50b1VzZXIgPSAoXG4gICAgICBvdXRwdXQ6IE9wdGlvbjxJbnRlcm5hbENyZWF0b3JzW10+LFxuICAgICk6IENyZWF0b3JzW10gfCB1bmRlZmluZ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ZXJGZWVCYXNpc1BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0YWRhdGEubmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzeW1ib2wnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLnN5bWJvbCkge1xuICAgICAgICAgICAgICByZXMgPSBpc1N5bWJvbChtZXRhZGF0YS5zeW1ib2wpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHJlcyAmJiByZXMuaXNFcnIpIHtcbiAgICAgICAgICByZXN1bHRzLnB1c2goLi4ucmVzLmVycm9yLmRldGFpbHMpO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIGlmIChyZXN1bHRzLmxlbmd0aCA+IDApIHtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9XG4gICAgICAgICAgJ0NhdWdodCBpbiB0aGUgdmFsaWRhdGlvbiBlcnJvcnMuIHNlZSBpbmZvcm1hdGlvbiBlLmc6IGVycjxWYWxpZGF0b3JFcnJvcj4uZGV0YWlscyc7XG4gICAgICAgIHRocm93IG5ldyBWYWxpZGF0b3JFcnJvcihtZXNzYWdlLCByZXN1bHRzKTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBNZXNzYWdlLlNVQ0NFU1M7XG4gICAgfSk7XG4gIH07XG5cbiAgdHlwZSBQaWNrTmZ0U3RvcmFnZSA9IFBp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VydGVyIiwgIlByb3BlcnRpZXMiLCAiQ29udmVydGVyIiwgIlVzZXMiLCAiQ29udmVydGVyIiwgIlRva2VuTWV0YWRhdGEiLCAiQ29udmVydGVyIiwgIlRyYW5zZmVyQ2hlY2tlZCIsICJDb252ZXJ0ZXIiLCAiVHJhbnNmZXIiLCAiQ29udmVydGVyIiwgIlZhbGlkYXRvciIsICJNZXNzYWdlIiwgIkNvbnZlcnRlciJdCn0K \ No newline at end of file diff --git a/packages/suite-utils/dist/index.mjs b/packages/suite-utils/dist/index.mjs index 89710c084..700d194c4 100644 --- a/packages/suite-utils/dist/index.mjs +++ b/packages/suite-utils/dist/index.mjs @@ -1444,4 +1444,4 @@ export { sleep, unixTimestamp }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9iYXRjaC50cyIsICIuLi8uLi9ub2RlL3NyYy9pbmRleC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jb21tb24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvbWludC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9wYXJ0aWFsLXNpZ24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY2FsY3VsYXRlLXR4c2l6ZS50cyIsICIuLi8uLi90eXBlcy9zcmMvZ2xvYmFsL2luZGV4LnRzIiwgIi4uLy4uL2dsb2JhbC9zcmMvaW5kZXgudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMva2V5cGFpci50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9wZGEudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvaW5kZXgudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvaW5kZXgudHMiLC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biAgKTogbnVtYmVyID0+IHtcbiAgICBjb25zdCBmZWVQYXllclBrID0gW2ZlZVBheWVyLnRvQmFzZTU4KCldO1xuXG4gICAgY29uc3Qgc2lnbmVycyA9IG5ldyBTZXQ8c3RyaW5nPihmZWVQYXllclBrKTtcbiAgICBjb25zdCBhY2NvdW50cyA9IG5ldyBTZXQ8c3RyaW5nPihmZWVQYXllclBrKTtcblxuICAgIGNvbnN0IGl4c1NpemUgPSB0cmFuc2FjdGlvbi5pbnN0cnVjdGlvbnMucmVkdWNlKChhY2MsIGl4KSA9PiB7XG4gICAgICBpeC5rZXlzLmZvckVhY2goKHsgcHVia2V5LCBpc1NpZ25lciB9KSA9PiB7XG4gICAgICAgIGNvbnN0IHBrID0gcHVia2V5LnRvQmFzZTU4KCk7XG4gICAgICAgIGlmIChpc1NpZ25lcikgc2lnbmVycy5hZGQocGspO1xuICAgICAgICBhY2NvdW50cy5hZGQocGspO1xuICAgICAgfSk7XG5cbiAgICAgIGFjY291bnRzLmFkZChpeC5wcm9ncmFtSWQudG9CYXNlNTgoKSk7XG5cbiAgICAgIGNvbnN0IG5JbmRleGVzID0gaXgua2V5cy5sZW5ndGg7XG4gICAgICBjb25zdCBvcGFxdWVEYXRhID0gaXguZGF0YS5sZW5ndGg7XG5cbiAgICAgIHJldHVybiAoXG4gICAgICAgIGFjYyArXG4gICAgICAgIDEgKyAvLyBQSUQgaW5kZXhcbiAgICAgICAgY29tcGFjdEFycmF5U2l6ZShuSW5kZXhlcywgMSkgK1xuICAgICAgICBjb21wYWN0QXJyYXlTaXplKG9wYXF1ZURhdGEsIDEpXG4gICAgICApO1xuICAgIH0sIDApO1xuXG4gICAgcmV0dXJuIChcbiAgICAgIGNvbXBhY3RBcnJheVNpemUoc2lnbmVycy5zaXplLCA2NCkgKyAvLyBzaWduYXR1cmVzXG4gICAgICAzICsgLy8gaGVhZGVyXG4gICAgICBjb21wYWN0QXJyYXlTaXplKGFjY291bnRzLnNpemUsIDMyKSArIC8vIGF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bHR5KG1ldGFkYXRhLnJveWFsdHkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEuc3ltYm9sKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU3ltYm9sKG1ldGFkYXRhLnN5bWJvbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAocmVzICYmIHJlcy5pc0Vycikge1xuICAgICAgICAgIHJlc3VsdHMucHVzaCguLi5yZXMuZXJyb3IuZGV0YWlscyk7XG4gICAgICA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aWNLZXkiLCAiQWNjb3VudCIsICJQZGEiLCAiQWNjb3VudCIsICJicyIsICJBY2NvdW50IiwgIlB1YmxpY0tleSIsICJLZXlwYWlyIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiUmVzdWx0IiwgIkNvbnZlcnRlciIsICJDb2xsZWN0aW9uIiwgIkNvbGxlY3Rpb25NaW50IiwgIkNvbnZlcnRlciIsICJDcmVhdG9ycyIsICJDb252ZXJ0ZXIiLCAiQ29tcHJlc3NlZE5mdE1ldGFkYXRhIiwgIkNvbnZlcnRlciIsICJSb3lhbHR5IiwgIkNvbnZlcnRlciIsICJOZnQiLCAiQ29udmVydGVyIiwgIk1lbW8iLCAiQ29udmVydGVyIiwgIk1pbnQiLCAiQ29udmVydGVyIiwgIlJlZ3VsYXJOZnRNZXRhZGF0YSIsICJDb252ZXJ0ZXIiLCAiUHJvcGVydGllcyIsICJDb252ZXJ0ZXIiLCAiVXNlcyIsICJDb252ZXJ0ZXIiLCAiVG9rZW5NZXRhZGF0YSIsICJDb252ZXJ0ZXIiLCAiVHJhbnNmZXJDaGVja2VkIiwgIkNvbnZlcnRlciIsICJUcmFuc2ZlciIsICJDb252ZXJ0ZXIiLCAiVmFsaWRhdG9yIiwgIk1lc3NhZ2UiLCAiQ29udmVydGVyIl0KfQo= \ No newline at end of file +//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9iYXRjaC50cyIsICIuLi8uLi9ub2RlL3NyYy9pbmRleC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jb21tb24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvbWludC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9w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4KCldO1xuXG4gICAgY29uc3Qgc2lnbmVycyA9IG5ldyBTZXQ8c3RyaW5nPihmZWVQYXllclBrKTtcbiAgICBjb25zdCBhY2NvdW50cyA9IG5ldyBTZXQ8c3RyaW5nPihmZWVQYXllclBrKTtcblxuICAgIGNvbnN0IGl4c1NpemUgPSB0cmFuc2FjdGlvbi5pbnN0cnVjdGlvbnMucmVkdWNlKChhY2MsIGl4KSA9PiB7XG4gICAgICBpeC5rZXlzLmZvckVhY2goKHsgcHVia2V5LCBpc1NpZ25lciB9KSA9PiB7XG4gICAgICAgIGNvbnN0IHBrID0gcHVia2V5LnRvQmFzZTU4KCk7XG4gICAgICAgIGlmIChpc1NpZ25lcikgc2lnbmVycy5hZGQocGspO1xuICAgICAgICBhY2NvdW50cy5hZGQocGspO1xuICAgICAgfSk7XG5cbiAgICAgIGFjY291bnRzLmFkZChpeC5wcm9ncmFtSWQudG9CYXNlNTgoKSk7XG5cbiAgICAgIGNvbnN0IG5JbmRleGVzID0gaXgua2V5cy5sZW5ndGg7XG4gICAgICBjb25zdCBvcGFxdWVEYXRhID0gaXguZGF0YS5sZW5ndGg7XG5cbiAgICAgIHJldHVybiAoXG4gICAgICAgIGFjYyArXG4gICAgICAgIDEgKyAvLyBQSUQgaW5kZXhcbiAgICAgICAgY29tcGFjdEFycmF5U2l6ZShuSW5kZXhlcywgMSkgK1xuICAgICAgICBjb21wYWN0QXJyYXlTaXplKG9wYXF1ZURhdGEsIDEpXG4gICAgICApO1xuICAgIH0sIDApO1xuXG4gICAgcmV0dXJuIChcbiAgICAgIGNvbXBhY3RBcnJheVNpemUoc2lnbmVycy5zaXplLCA2NCkgKyAvLyBzaWduYXR1cmVzXG4gICAgICAzICsgLy8gaGVhZGVyXG4gICAgICBjb21wYWN0QXJyYXlTaXplKGFjY291bnRzLnNpemUsIDMyKSArIC8vIGFjY291bnRzXG4gICAgICAzMiArIC8vIGJsb2NraGFzaFxuICAgICAgY29tcGFjdEhlYWRlcih0cmFuc2Fjd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gICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlcl9mZWVfYmFzaXNfcG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJGZWVCYXNpc1BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0YWRhdGEubmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzeW1ib2wnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLnN5bWJvbCkge1xuICAgICAgICAgICAgICByZXMgPSBpc1N5bWJvbChtZXRhZGF0YS5zeW1ib2wpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHJlcyAmJiByZXMuaXNFcnIpIHtcbiAgICAgICAgICByZXN1bHRzLnB1c2goLi4ucmVzLmVycm9yLmRldGFpbHMpO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIGlmIChyZXN1bHRzLmxlbmd0aCA+IDApIHtcbiAgIC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dWJsaWNLZXkiLCAiS2V5cGFpciIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlJlc3VsdCIsICJDb252ZXJ0ZXIiLCAiQ29sbGVjdGlvbiIsICJDb2xsZWN0aW9uTWludCIsICJDb252ZXJ0ZXIiLCAiQ3JlYXRvcnMiLCAiQ29udmVydGVyIiwgIkNvbXByZXNzZWROZnRNZXRhZGF0YSIsICJDb252ZXJ0ZXIiLCAiUm95YWx0eSIsICJDb252ZXJ0ZXIiLCAiTmZ0IiwgIkNvbnZlcnRlciIsICJNZW1vIiwgIkNvbnZlcnRlciIsICJNaW50IiwgIkNvbnZlcnRlciIsICJSZWd1bGFyTmZ0TWV0YWRhdGEiLCAiQ29udmVydGVyIiwgIlByb3BlcnRpZXMiLCAiQ29udmVydGVyIiwgIlVzZXMiLCAiQ29udmVydGVyIiwgIlRva2VuTWV0YWRhdGEiLCAiQ29udmVydGVyIiwgIlRyYW5zZmVyQ2hlY2tlZCIsICJDb252ZXJ0ZXIiLCAiVHJhbnNmZXIiLCAiQ29udmVydGVyIiwgIlZhbGlkYXRvciIsICJNZXNzYWdlIiwgIkNvbnZlcnRlciJdCn0K \ No newline at end of file diff --git a/packages/test-tools/dist/index.js b/packages/test-tools/dist/index.js index 027f39a44..56a3ee4de 100644 --- a/packages/test-tools/dist/index.js +++ b/packages/test-tools/dist/index.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; var __create = Object.create; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; @@ -10,37 +10,46 @@ var __export = (target, all) => { __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { + if ((from && typeof from === 'object') || typeof from === 'function') { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + __defProp(to, key, { + get: () => from[key], + enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable, + }); } return to; }; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); +var __toESM = (mod, isNodeMode, target) => ( + (target = mod != null ? __create(__getProtoOf(mod)) : {}), + __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule + ? __defProp(target, 'default', { value: mod, enumerable: true }) + : target, + mod, + ) +); +var __toCommonJS = (mod) => + __copyProps(__defProp({}, '__esModule', { value: true }), mod); // src/index.ts var src_exports = {}; __export(src_exports, { - requestSol: () => requestSol + requestSol: () => requestSol, }); module.exports = __toCommonJS(src_exports); // src/request-sol.ts -var import_assert = __toESM(require("assert")); -var import_fs = __toESM(require("fs")); +var import_assert = __toESM(require('assert')); +var import_fs = __toESM(require('fs')); // ../suite-utils/src/constants.ts -var import_web3 = require("@solana/web3.js"); -var import_load = __toESM(require("@solana-suite/config/load")); +var import_web3 = require('@solana/web3.js'); +var import_load = __toESM(require('@solana-suite/config/load')); var Config = import_load.default; var Constants; ((Constants2) => { @@ -78,7 +87,10 @@ var Constants; } return false; }; - })(WarnningMessage = Constants2.WarnningMessage || (Constants2.WarnningMessage = {})); + })( + (WarnningMessage = + Constants2.WarnningMessage || (Constants2.WarnningMessage = {})), + ); })(Constants || (Constants = {})); ((Constants2) => { Constants2.currentCluster = Config.cluster.type; @@ -88,35 +100,40 @@ var Constants; Constants2.dasApiUrl = Config.dasApiUrl; let Cluster; ((Cluster2) => { - Cluster2["prd"] = "mainnet-beta"; - Cluster2["prdMetaplex"] = "mainnet-beta-metaplex"; - Cluster2["dev"] = "devnet"; - Cluster2["test"] = "testnet"; - Cluster2["localhost"] = "localhost-devnet"; - })(Cluster = Constants2.Cluster || (Constants2.Cluster = {})); + Cluster2['prd'] = 'mainnet-beta'; + Cluster2['prdMetaplex'] = 'mainnet-beta-metaplex'; + Cluster2['dev'] = 'devnet'; + Cluster2['test'] = 'testnet'; + Cluster2['localhost'] = 'localhost-devnet'; + })((Cluster = Constants2.Cluster || (Constants2.Cluster = {}))); let EndPointUrl; ((EndPointUrl2) => { - EndPointUrl2["prd"] = "https://api.mainnet-beta.solana.com"; - EndPointUrl2["prdMetaplex"] = "https://api.metaplex.solana.com"; - EndPointUrl2["dev"] = "https://api.devnet.solana.com"; - EndPointUrl2["test"] = "https://api.testnet.solana.com"; - EndPointUrl2["localhost"] = "http://api.devnet.solana.com"; - })(EndPointUrl = Constants2.EndPointUrl || (Constants2.EndPointUrl = {})); + EndPointUrl2['prd'] = 'https://api.mainnet-beta.solana.com'; + EndPointUrl2['prdMetaplex'] = 'https://api.metaplex.solana.com'; + EndPointUrl2['dev'] = 'https://api.devnet.solana.com'; + EndPointUrl2['test'] = 'https://api.testnet.solana.com'; + EndPointUrl2['localhost'] = 'http://api.devnet.solana.com'; + })((EndPointUrl = Constants2.EndPointUrl || (Constants2.EndPointUrl = {}))); let BundlrUrl; ((BundlrUrl2) => { - BundlrUrl2["prd"] = "https://node1.irys.xyz,https://node2.irys.xyz"; - BundlrUrl2["dev"] = "https://devnet.irys.xyz"; - })(BundlrUrl = Constants2.BundlrUrl || (Constants2.BundlrUrl = {})); + BundlrUrl2['prd'] = 'https://node1.irys.xyz,https://node2.irys.xyz'; + BundlrUrl2['dev'] = 'https://devnet.irys.xyz'; + })((BundlrUrl = Constants2.BundlrUrl || (Constants2.BundlrUrl = {}))); let DasApiUrl; ((DasApiUrl2) => { - DasApiUrl2["dev"] = "https://devnet.helius-rpc.com/?api-key=15319bf4-5b40-4958-ac8d-6313aa55eb92,https://rpc-devnet.helius.xyz?api-key=9f70a843-3274-4ffd-a0a9-323f8b7c0639"; - })(DasApiUrl = Constants2.DasApiUrl || (Constants2.DasApiUrl = {})); + DasApiUrl2['dev'] = + 'https://devnet.helius-rpc.com/?api-key=15319bf4-5b40-4958-ac8d-6313aa55eb92,https://rpc-devnet.helius.xyz?api-key=9f70a843-3274-4ffd-a0a9-323f8b7c0639'; + })((DasApiUrl = Constants2.DasApiUrl || (Constants2.DasApiUrl = {}))); let NftstorageApiKey; ((NftstorageApiKey2) => { - NftstorageApiKey2["dev"] = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJkaWQ6ZXRocjoweERGMjcyN2VkODZhRGU1RTMyZDZDZEJlODc0YzRFNDlEODY1OWZmOEMiLCJpc3MiOiJuZnQtc3RvcmFnZSIsImlhdCI6MTYyMDI2NDk0MzcwNiwibmFtZSI6ImRlbW8ifQ.d4J70mikxRB8a5vwNu6SO5HDA8JaueuseAj7Q_ytMCE"; - })(NftstorageApiKey = Constants2.NftstorageApiKey || (Constants2.NftstorageApiKey = {})); + NftstorageApiKey2['dev'] = + 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJkaWQ6ZXRocjoweERGMjcyN2VkODZhRGU1RTMyZDZDZEJlODc0YzRFNDlEODY1OWZmOEMiLCJpc3MiOiJuZnQtc3RvcmFnZSIsImlhdCI6MTYyMDI2NDk0MzcwNiwibmFtZSI6ImRlbW8ifQ.d4J70mikxRB8a5vwNu6SO5HDA8JaueuseAj7Q_ytMCE'; + })( + (NftstorageApiKey = + Constants2.NftstorageApiKey || (Constants2.NftstorageApiKey = {})), + ); Constants2.loadConfig = async () => { - Config = await import("@solana-suite/config/load"); + Config = await import('@solana-suite/config/load'); }; Constants2.switchCluster = (param) => { const { cluster: env, customClusterUrl: customClusterUrl2 } = param; @@ -125,42 +142,46 @@ var Constants; return customClusterUrl2[index]; } switch (env) { - case "mainnet-beta" /* prd */: - return "https://api.mainnet-beta.solana.com" /* prd */; - case "mainnet-beta-metaplex" /* prdMetaplex */: - return "https://api.metaplex.solana.com" /* prdMetaplex */; - case "testnet" /* test */: - return "https://api.testnet.solana.com" /* test */; - case "devnet" /* dev */: - return "https://api.devnet.solana.com" /* dev */; + case 'mainnet-beta' /* prd */: + return 'https://api.mainnet-beta.solana.com' /* prd */; + case 'mainnet-beta-metaplex' /* prdMetaplex */: + return 'https://api.metaplex.solana.com' /* prdMetaplex */; + case 'testnet' /* test */: + return 'https://api.testnet.solana.com' /* test */; + case 'devnet' /* dev */: + return 'https://api.devnet.solana.com' /* dev */; default: - return "http://api.devnet.solana.com" /* localhost */; + return 'http://api.devnet.solana.com' /* localhost */; } }; Constants2.switchBundlr = (env) => { switch (env) { - case "mainnet-beta" /* prd */: { - const urls = "https://node1.irys.xyz,https://node2.irys.xyz" /* prd */.split(","); + case 'mainnet-beta' /* prd */: { + const urls = 'https://node1.irys.xyz,https://node2.irys.xyz' /* prd */ + .split(','); const index = Date.now() % urls.length; return urls[index]; } default: { - return "https://devnet.irys.xyz" /* dev */; + return 'https://devnet.irys.xyz' /* dev */; } } }; Constants2.switchDasApi = (env) => { switch (env) { - case "mainnet-beta" /* prd */: { + case 'mainnet-beta' /* prd */: { if (Constants2.dasApiUrl.length < 1) { throw Error(Constants2.WarnningMessage.DAS_API_URL); } - const urls = "https://node1.irys.xyz,https://node2.irys.xyz" /* prd */.split(","); + const urls = 'https://node1.irys.xyz,https://node2.irys.xyz' /* prd */ + .split(','); const index = Date.now() % urls.length; return urls[index]; } default: { - const urls = "https://devnet.helius-rpc.com/?api-key=15319bf4-5b40-4958-ac8d-6313aa55eb92,https://rpc-devnet.helius.xyz?api-key=9f70a843-3274-4ffd-a0a9-323f8b7c0639" /* dev */.split(","); + const urls = + 'https://devnet.helius-rpc.com/?api-key=15319bf4-5b40-4958-ac8d-6313aa55eb92,https://rpc-devnet.helius.xyz?api-key=9f70a843-3274-4ffd-a0a9-323f8b7c0639' /* dev */ + .split(','); const index = Date.now() % urls.length; return urls[index]; } @@ -168,61 +189,65 @@ var Constants; }; Constants2.switchNftStorage = (env) => { switch (env) { - case "mainnet-beta" /* prd */: + case 'mainnet-beta' /* prd */: if (!Constants2.nftStorageApiKey) { throw Error(Constants2.WarnningMessage.NFT_STORAGE_API_KEY); } return Constants2.nftStorageApiKey; default: { - return "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJkaWQ6ZXRocjoweERGMjcyN2VkODZhRGU1RTMyZDZDZEJlODc0YzRFNDlEODY1OWZmOEMiLCJpc3MiOiJuZnQtc3RvcmFnZSIsImlhdCI6MTYyMDI2NDk0MzcwNiwibmFtZSI6ImRlbW8ifQ.d4J70mikxRB8a5vwNu6SO5HDA8JaueuseAj7Q_ytMCE" /* dev */; + return 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJkaWQ6ZXRocjoweERGMjcyN2VkODZhRGU1RTMyZDZDZEJlODc0YzRFNDlEODY1OWZmOEMiLCJpc3MiOiJuZnQtc3RvcmFnZSIsImlhdCI6MTYyMDI2NDk0MzcwNiwibmFtZSI6ImRlbW8ifQ.d4J70mikxRB8a5vwNu6SO5HDA8JaueuseAj7Q_ytMCE' /* dev */; } } }; Constants2.WRAPPED_TOKEN_PROGRAM_ID = new import_web3.PublicKey( - "So11111111111111111111111111111111111111112" + 'So11111111111111111111111111111111111111112', ); Constants2.MEMO_PROGRAM_ID = new import_web3.PublicKey( - "Memo1UhkJRfHyvLMcVucJwxXeuD728EqVDDwQDxFMNo" + 'Memo1UhkJRfHyvLMcVucJwxXeuD728EqVDDwQDxFMNo', ); Constants2.METAPLEX_PROGRAM_ID = new import_web3.PublicKey( - "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s" + 'metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s', + ); + Constants2.COMMITMENT = 'confirmed'; + Constants2.NFT_STORAGE_GATEWAY_URL = 'https://ipfs.io/ipfs'; + Constants2.IRYS_GATEWAY_URL = 'https://gateway.irys.xyz'; + Constants2.BUNDLR_NETWORK_URL = (0, Constants2.switchBundlr)( + Config.cluster.type, ); - Constants2.COMMITMENT = "confirmed"; - Constants2.NFT_STORAGE_GATEWAY_URL = "https://ipfs.io/ipfs"; - Constants2.IRYS_GATEWAY_URL = "https://gateway.irys.xyz"; - Constants2.BUNDLR_NETWORK_URL = (0, Constants2.switchBundlr)(Config.cluster.type); Constants2.DAS_API_URL = (0, Constants2.switchDasApi)(Config.cluster.type); - Constants2.NFT_STORAGE_API_KEY = (0, Constants2.switchNftStorage)(Config.cluster.type); - Constants2.EXPLORER_SOLSCAN_URL = "https://solscan.io"; - Constants2.EXPLORER_SOLANAFM_URL = "https://solana.fm"; - Constants2.EXPLORER_XRAY_URL = "https://xray.helius.xyz"; + Constants2.NFT_STORAGE_API_KEY = (0, Constants2.switchNftStorage)( + Config.cluster.type, + ); + Constants2.EXPLORER_SOLSCAN_URL = 'https://solscan.io'; + Constants2.EXPLORER_SOLANAFM_URL = 'https://solana.fm'; + Constants2.EXPLORER_XRAY_URL = 'https://xray.helius.xyz'; })(Constants || (Constants = {})); console.log(Constants.WarnningMessage.ANNOUNCE); // ../transaction-builder/src/batch.ts -var import_web34 = require("@solana/web3.js"); +var import_web34 = require('@solana/web3.js'); // ../node/src/index.ts -var import_web32 = require("@solana/web3.js"); +var import_web32 = require('@solana/web3.js'); var Node; ((Node2) => { const setted = { - clusterUrl: "", + clusterUrl: '', commitment: Constants.COMMITMENT, - customClusterUrl: [] + customClusterUrl: [], }; Node2.getConnection = () => { if (setted.customClusterUrl.length > 0) { setted.clusterUrl = Constants.switchCluster({ - customClusterUrl: setted.customClusterUrl + customClusterUrl: setted.customClusterUrl, }); } else if (Constants.customClusterUrl.length > 0) { setted.clusterUrl = Constants.switchCluster({ - customClusterUrl: Constants.customClusterUrl + customClusterUrl: Constants.customClusterUrl, }); } else if (!setted.clusterUrl) { setted.clusterUrl = Constants.switchCluster({ - cluster: Constants.currentCluster + cluster: Constants.currentCluster, }); } if (!setted.commitment) { @@ -231,44 +256,47 @@ var Node; return new import_web32.Connection(setted.clusterUrl, setted.commitment); }; Node2.changeConnection = (param) => { - setted.clusterUrl = ""; + setted.clusterUrl = ''; setted.customClusterUrl = []; setted.commitment = Constants.COMMITMENT; const { cluster, commitment, customClusterUrl } = param; if (commitment) { setted.commitment = commitment; - debugLog("# Node change commitment: ", setted.commitment); + debugLog('# Node change commitment: ', setted.commitment); } if (cluster) { setted.clusterUrl = Constants.switchCluster({ cluster }); - debugLog("# Node change clusterUrl: ", setted.clusterUrl); + debugLog('# Node change clusterUrl: ', setted.clusterUrl); } if (customClusterUrl) { - debugLog("# customClusterUrl: ", customClusterUrl); + debugLog('# customClusterUrl: ', customClusterUrl); setted.clusterUrl = Constants.switchCluster({ customClusterUrl }); setted.customClusterUrl = customClusterUrl; debugLog( - "# Node change cluster, custom cluster url: ", - setted.clusterUrl + '# Node change cluster, custom cluster url: ', + setted.clusterUrl, ); } }; Node2.confirmedSig = async (signature, commitment = Constants.COMMITMENT) => { const connection = Node2.getConnection(); const latestBlockhash = await connection.getLatestBlockhash(); - return await connection.confirmTransaction( - { - blockhash: latestBlockhash.blockhash, - lastValidBlockHeight: latestBlockhash.lastValidBlockHeight, - signature - }, - commitment - ).then(Result.ok).catch(Result.err); + return await connection + .confirmTransaction( + { + blockhash: latestBlockhash.blockhash, + lastValidBlockHeight: latestBlockhash.lastValidBlockHeight, + signature, + }, + commitment, + ) + .then(Result.ok) + .catch(Result.err); }; })(Node || (Node = {})); // ../transaction-builder/src/common.ts -var import_web33 = require("@solana/web3.js"); +var import_web33 = require('@solana/web3.js'); var MAX_RETRIES = 3; var TransactionBuilder; ((TransactionBuilder7) => { @@ -287,7 +315,7 @@ var TransactionBuilder; submit = async () => { return Try(async () => { if (!(this instanceof Common2)) { - throw Error("only Instruction object that can use this"); + throw Error('only Instruction object that can use this'); } const transaction = new import_web33.Transaction(); const blockhashObj = await Node.getConnection().getLatestBlockhash(); @@ -300,13 +328,13 @@ var TransactionBuilder; } this.instructions.forEach((inst) => transaction.add(inst)); const options = { - maxRetries: MAX_RETRIES + maxRetries: MAX_RETRIES, }; return await (0, import_web33.sendAndConfirmTransaction)( Node.getConnection(), transaction, finalSigners, - options + options, ); }); }; @@ -325,7 +353,7 @@ var TransactionBuilder2; if (!a.instructions && !a.signers) { throw Error( `only Instruction object that can use batchSubmit(). - Index: ${i}, Set value: ${JSON.stringify(a)}` + Index: ${i}, Set value: ${JSON.stringify(a)}`, ); } i++; @@ -345,13 +373,13 @@ var TransactionBuilder2; } instructions.map((inst) => transaction.add(inst)); const options = { - maxRetries: MAX_RETRIES + maxRetries: MAX_RETRIES, }; return await (0, import_web34.sendAndConfirmTransaction)( Node.getConnection(), transaction, finalSigners, - options + options, ); }); }; @@ -360,7 +388,7 @@ var TransactionBuilder2; })(TransactionBuilder2 || (TransactionBuilder2 = {})); // ../transaction-builder/src/mint.ts -var import_web35 = require("@solana/web3.js"); +var import_web35 = require('@solana/web3.js'); var TransactionBuilder3; ((TransactionBuilder7) => { class Mint { @@ -377,7 +405,7 @@ var TransactionBuilder3; submit = async () => { return Try(async () => { if (!(this instanceof Mint)) { - throw Error("only MintInstruction object that can use this"); + throw Error('only MintInstruction object that can use this'); } const transaction = new import_web35.Transaction(); const blockhashObj = await Node.getConnection().getLatestBlockhash(); @@ -390,17 +418,17 @@ var TransactionBuilder3; } this.instructions.forEach((inst) => transaction.add(inst)); const options = { - maxRetries: MAX_RETRIES + maxRetries: MAX_RETRIES, }; if (Node.getConnection().rpcEndpoint === Constants.EndPointUrl.prd) { - debugLog("# Change metaplex cluster on mainnet-beta"); + debugLog('# Change metaplex cluster on mainnet-beta'); Node.changeConnection({ cluster: Constants.Cluster.prdMetaplex }); } return await (0, import_web35.sendAndConfirmTransaction)( Node.getConnection(), transaction, finalSigners, - options + options, ); }); }; @@ -409,7 +437,7 @@ var TransactionBuilder3; })(TransactionBuilder3 || (TransactionBuilder3 = {})); // ../transaction-builder/src/partial-sign.ts -var import_web36 = require("@solana/web3.js"); +var import_web36 = require('@solana/web3.js'); var TransactionBuilder4; ((TransactionBuilder7) => { class PartialSign { @@ -424,18 +452,18 @@ var TransactionBuilder4; submit = async (feePayer) => { return Try(async () => { if (!(this instanceof PartialSign)) { - throw Error("only PartialSignInstruction object that can use this"); + throw Error('only PartialSignInstruction object that can use this'); } - const decode = Buffer.from(this.hexInstruction, "hex"); + const decode = Buffer.from(this.hexInstruction, 'hex'); const transactionFromJson = import_web36.Transaction.from(decode); transactionFromJson.partialSign(feePayer.toKeypair()); const options = { - maxRetries: MAX_RETRIES + maxRetries: MAX_RETRIES, }; const wireTransaction = transactionFromJson.serialize(); return await Node.getConnection().sendRawTransaction( wireTransaction, - options + options, ); }); }; @@ -449,7 +477,7 @@ var TransactionBuilder5; const LOW_VALUE = 127; const HIGH_VALUE = 16383; const MAX_TRANSACTION_SIZE = 1232; - const compactHeader = (n) => n <= LOW_VALUE ? 1 : n <= HIGH_VALUE ? 2 : 3; + const compactHeader = (n) => (n <= LOW_VALUE ? 1 : n <= HIGH_VALUE ? 2 : 3); const compactArraySize = (n, size) => compactHeader(n) + n * size; TransactionBuilder7.calculateTxSize = (transaction, feePayer) => { const feePayerPk = [feePayer.toBase58()]; @@ -458,34 +486,42 @@ var TransactionBuilder5; const ixsSize = transaction.instructions.reduce((acc, ix) => { ix.keys.forEach(({ pubkey, isSigner }) => { const pk = pubkey.toBase58(); - if (isSigner) - signers.add(pk); + if (isSigner) signers.add(pk); accounts.add(pk); }); accounts.add(ix.programId.toBase58()); const nIndexes = ix.keys.length; const opaqueData = ix.data.length; - return acc + 1 + // PID index - compactArraySize(nIndexes, 1) + compactArraySize(opaqueData, 1); + return ( + acc + + 1 + // PID index + compactArraySize(nIndexes, 1) + + compactArraySize(opaqueData, 1) + ); }, 0); - return compactArraySize(signers.size, 64) + // signatures - 3 + // header - compactArraySize(accounts.size, 32) + // accounts - 32 + // blockhash - compactHeader(transaction.instructions.length) + // instructions - ixsSize; + return ( + compactArraySize(signers.size, 64) + // signatures + 3 + // header + compactArraySize(accounts.size, 32) + // accounts + 32 + // blockhash + compactHeader(transaction.instructions.length) + // instructions + ixsSize + ); }; TransactionBuilder7.isOverTransactionSize = (transaction, feePayer) => { - return (0, TransactionBuilder7.calculateTxSize)(transaction, feePayer) > MAX_TRANSACTION_SIZE; + return ( + (0, TransactionBuilder7.calculateTxSize)(transaction, feePayer) > + MAX_TRANSACTION_SIZE + ); }; })(TransactionBuilder5 || (TransactionBuilder5 = {})); // ../global/src/index.ts -var import_web39 = require("@solana/web3.js"); +var import_web39 = require('@solana/web3.js'); // ../account/src/keypair.ts -var import_web37 = require("@solana/web3.js"); -var import_bs58 = __toESM(require("bs58")); +var import_web37 = require('@solana/web3.js'); +var import_bs58 = __toESM(require('bs58')); var Account; ((Account4) => { class Keypair4 { @@ -513,13 +549,13 @@ var Account; const keypair = import_web37.Keypair.generate(); return new Keypair4({ pubkey: keypair.publicKey.toString(), - secret: import_bs58.default.encode(keypair.secretKey) + secret: import_bs58.default.encode(keypair.secretKey), }); }; static toKeyPair = (keypair) => { return new Keypair4({ pubkey: keypair.publicKey.toString(), - secret: import_bs58.default.encode(keypair.secretKey) + secret: import_bs58.default.encode(keypair.secretKey), }); }; } @@ -527,10 +563,10 @@ var Account; })(Account || (Account = {})); // ../account/src/pda.ts -var import_web38 = require("@solana/web3.js"); -var import_mpl_token_metadata = require("@metaplex-foundation/mpl-token-metadata"); -var import_mpl_bubblegum = require("@metaplex-foundation/mpl-bubblegum"); -var import_bn = __toESM(require("bn.js")); +var import_web38 = require('@solana/web3.js'); +var import_mpl_token_metadata = require('@metaplex-foundation/mpl-token-metadata'); +var import_mpl_bubblegum = require('@metaplex-foundation/mpl-bubblegum'); +var import_bn = __toESM(require('bn.js')); var Account2; ((Account4) => { let Pda; @@ -538,37 +574,37 @@ var Account2; Pda2.getMetadata = (address) => { const [publicKey] = import_web38.PublicKey.findProgramAddressSync( [ - Buffer.from("metadata"), + Buffer.from('metadata'), import_mpl_token_metadata.PROGRAM_ID.toBuffer(), - address.toPublicKey().toBuffer() + address.toPublicKey().toBuffer(), ], - import_mpl_token_metadata.PROGRAM_ID + import_mpl_token_metadata.PROGRAM_ID, ); return publicKey; }; Pda2.getMasterEdition = (address) => { const [publicKey] = import_web38.PublicKey.findProgramAddressSync( [ - Buffer.from("metadata"), + Buffer.from('metadata'), import_mpl_token_metadata.PROGRAM_ID.toBuffer(), address.toPublicKey().toBuffer(), - Buffer.from("edition") + Buffer.from('edition'), ], - import_mpl_token_metadata.PROGRAM_ID + import_mpl_token_metadata.PROGRAM_ID, ); return publicKey; }; Pda2.getTreeAuthority = (address) => { const [publicKey] = import_web38.PublicKey.findProgramAddressSync( [address.toPublicKey().toBuffer()], - import_mpl_bubblegum.MPL_BUBBLEGUM_PROGRAM_ID.toPublicKey() + import_mpl_bubblegum.MPL_BUBBLEGUM_PROGRAM_ID.toPublicKey(), ); return publicKey; }; Pda2.getBgumSigner = () => { const [publicKey] = import_web38.PublicKey.findProgramAddressSync( - [Buffer.from("collection_cpi", "utf8")], - import_mpl_bubblegum.MPL_BUBBLEGUM_PROGRAM_ID.toPublicKey() + [Buffer.from('collection_cpi', 'utf8')], + import_mpl_bubblegum.MPL_BUBBLEGUM_PROGRAM_ID.toPublicKey(), ); return publicKey; }; @@ -576,30 +612,33 @@ var Account2; const node = new import_bn.default.BN(leafIndex); const [assetId] = import_web38.PublicKey.findProgramAddressSync( [ - Buffer.from("asset", "utf8"), + Buffer.from('asset', 'utf8'), address.toPublicKey().toBuffer(), - Uint8Array.from(node.toArray("le", 8)) + Uint8Array.from(node.toArray('le', 8)), ], - import_mpl_bubblegum.MPL_BUBBLEGUM_PROGRAM_ID.toPublicKey() + import_mpl_bubblegum.MPL_BUBBLEGUM_PROGRAM_ID.toPublicKey(), ); return assetId.toString(); }; - })(Pda = Account4.Pda || (Account4.Pda = {})); + })((Pda = Account4.Pda || (Account4.Pda = {}))); })(Account2 || (Account2 = {})); // ../account/src/index.ts var Account3 = { ...Account, - ...Account2 + ...Account2, }; // ../global/src/index.ts -var import_bignumber = require("bignumber.js"); -var import_bs582 = __toESM(require("bs58")); -String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, options = {}) { +var import_bignumber = require('bignumber.js'); +var import_bs582 = __toESM(require('bs58')); +String.prototype.toExplorerUrl = function ( + explorer = 'solscan' /* Solscan */, + options = {}, +) { const endPointUrl = Node.getConnection().rpcEndpoint; - debugLog("# toExplorerUrl rpcEndpoint:", endPointUrl); - let cluster = ""; + debugLog('# toExplorerUrl rpcEndpoint:', endPointUrl); + let cluster = ''; if (endPointUrl === Constants.EndPointUrl.prd) { cluster = Constants.Cluster.prd; } else if (endPointUrl === Constants.EndPointUrl.test) { @@ -610,11 +649,11 @@ String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, op cluster = Constants.Cluster.dev; } const addressOrSignature = this.toString(); - let url = ""; + let url = ''; if (options.replacePath) { - if (explorer === "solanafm" /* SolanaFM */) { + if (explorer === 'solanafm' /* SolanaFM */) { url = `${Constants.EXPLORER_SOLANAFM_URL}/${options.replacePath}/${addressOrSignature}?cluster=${cluster}`; - } else if (explorer === "xray" /* Xray */) { + } else if (explorer === 'xray' /* Xray */) { url = `${Constants.EXPLORER_XRAY_URL}/${options.replacePath}/${addressOrSignature}?network=${cluster}`; } else { url = `${Constants.EXPLORER_SOLSCAN_URL}/${options.replacePath}/${addressOrSignature}?cluster=${cluster}`; @@ -622,17 +661,17 @@ String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, op return url; } if (Account3.Keypair.isPubkey(addressOrSignature)) { - if (explorer === "solanafm" /* SolanaFM */) { + if (explorer === 'solanafm' /* SolanaFM */) { url = `${Constants.EXPLORER_SOLANAFM_URL}/address/${addressOrSignature}?cluster=${cluster}`; - } else if (explorer === "xray" /* Xray */) { + } else if (explorer === 'xray' /* Xray */) { url = `${Constants.EXPLORER_XRAY_URL}/account/${addressOrSignature}?network=${cluster}`; } else { url = `${Constants.EXPLORER_SOLSCAN_URL}/account/${addressOrSignature}?cluster=${cluster}`; } } else { - if (explorer === "solanafm" /* SolanaFM */) { + if (explorer === 'solanafm' /* SolanaFM */) { url = `${Constants.EXPLORER_SOLANAFM_URL}/tx/${addressOrSignature}?cluster=${cluster}`; - } else if (explorer === "xray" /* Xray */) { + } else if (explorer === 'xray' /* Xray */) { url = `${Constants.EXPLORER_XRAY_URL}/tx/${addressOrSignature}?network=${cluster}`; } else { url = `${Constants.EXPLORER_SOLSCAN_URL}/tx/${addressOrSignature}?cluster=${cluster}`; @@ -640,24 +679,28 @@ String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, op } return url; }; -String.prototype.toPublicKey = function() { +String.prototype.toPublicKey = function () { if (!Account3.Keypair.isPubkey(this.toString())) { throw Error(`No match KeyPair.PubKey: ${this.toString()}`); } return new import_web39.PublicKey(this.toString()); }; -String.prototype.toKeypair = function() { +String.prototype.toKeypair = function () { if (!Account3.Keypair.isSecret(this.toString())) { throw Error(`No match KeyPair.Secret: ${this.toString()}`); } const decoded = import_bs582.default.decode(this.toString()); return import_web39.Keypair.fromSecretKey(decoded); }; -Number.prototype.toSol = function() { - return (0, import_bignumber.BigNumber)(this).div(import_web39.LAMPORTS_PER_SOL).toNumber(); +Number.prototype.toSol = function () { + return (0, import_bignumber.BigNumber)(this) + .div(import_web39.LAMPORTS_PER_SOL) + .toNumber(); }; -Number.prototype.toLamports = function() { - return (0, import_bignumber.BigNumber)(this).times(import_web39.LAMPORTS_PER_SOL).toNumber(); +Number.prototype.toLamports = function () { + return (0, import_bignumber.BigNumber)(this) + .times(import_web39.LAMPORTS_PER_SOL) + .toNumber(); }; // ../transaction-builder/src/index.ts @@ -666,7 +709,7 @@ var TransactionBuilder6 = { ...TransactionBuilder5, ...TransactionBuilder3, ...TransactionBuilder, - ...TransactionBuilder4 + ...TransactionBuilder4, }; // ../suite-utils/src/shared.ts @@ -678,16 +721,20 @@ var overwriteObject = (object, targets) => { }); return that; }; -var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { - if (Constants.isDebugging === "true" || process.env.DEBUG === "true") { - console.log("[DEBUG]", data1, data2, data3, data4); +var debugLog = (data1, data2 = '', data3 = '', data4 = '') => { + if (Constants.isDebugging === 'true' || process.env.DEBUG === 'true') { + console.log('[DEBUG]', data1, data2, data3, data4); } }; var sleep = async (sec) => { return new Promise((r) => setTimeout(r, sec * 1e3)); }; var isPromise = (obj) => { - return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; + return ( + !!obj && + (typeof obj === 'object' || typeof obj === 'function') && + typeof obj.then === 'function' + ); }; function Try(input, finallyInput) { try { @@ -695,7 +742,7 @@ function Try(input, finallyInput) { if (isPromise(v)) { return v.then( (x) => Result.ok(x), - (err) => Result.err(err) + (err) => Result.err(err), ); } else { return Result.ok(v); @@ -707,7 +754,7 @@ function Try(input, finallyInput) { return Result.err(Error(e)); } finally { if (finallyInput) { - debugLog("# finally input:", finallyInput); + debugLog('# finally input:', finallyInput); finallyInput(); } } @@ -724,7 +771,7 @@ var AbstractResult = class { unwrap(ok, err) { const r = this._chain( (value) => Result.ok(ok ? ok(value) : value), - (error) => err ? Result.ok(err(error)) : Result.err(error) + (error) => (err ? Result.ok(err(error)) : Result.err(error)), ); if (r.isErr) { throw r.error; @@ -734,7 +781,7 @@ var AbstractResult = class { map(ok, err) { return this._chain( (value) => Result.ok(ok(value)), - (error) => Result.err(err ? err(error) : error) + (error) => Result.err(err ? err(error) : error), ); } chain(ok, err) { @@ -743,7 +790,7 @@ var AbstractResult = class { match(ok, err) { this._chain( (value) => Result.ok(ok(value)), - (error) => Result.err(err(error)) + (error) => Result.err(err(error)), ); } /// single TransactionBuilder //// @@ -751,7 +798,7 @@ var AbstractResult = class { async submit(feePayer) { const res = this.map( async (ok) => { - debugLog("# result single submit: ", ok); + debugLog('# result single submit: ', ok); if (feePayer) { const obj = ok; return await obj.submit(feePayer); @@ -762,7 +809,7 @@ var AbstractResult = class { }, (err) => { return err; - } + }, ); if (res.isErr) { return Result.err(res.error); @@ -770,21 +817,21 @@ var AbstractResult = class { return res.value; } }; -Array.prototype.submit = async function(feePayer) { +Array.prototype.submit = async function (feePayer) { if (feePayer) { let i = 1; for await (const obj of this) { if (obj.isErr) { return obj; } else if (obj.value.canSubmit) { - debugLog("# Result batch canSubmit"); + debugLog('# Result batch canSubmit'); const sig = await obj.submit(feePayer); if (sig.isErr) { return sig; } await Node.confirmedSig(sig.value); } else { - debugLog("# Result batch other than canSubmit"); + debugLog('# Result batch other than canSubmit'); if (this.length == i) { return obj.submit(feePayer); } @@ -800,10 +847,10 @@ Array.prototype.submit = async function(feePayer) { } else if (obj.isOk) { instructions.push(obj.value); } else { - return Result.err(Error("Only Array Instruction object")); + return Result.err(Error('Only Array Instruction object')); } } - debugLog("# Result batch submit: ", instructions); + debugLog('# Result batch submit: ', instructions); return new TransactionBuilder6.Batch().submit(instructions); } }; @@ -876,7 +923,7 @@ var Converter; } return { key: input.toPublicKey(), - verified: false + verified: false, }; }; Collection2.intoUser = (output) => { @@ -885,21 +932,24 @@ var Converter; } return { address: output.key.toString(), - verified: output.verified + verified: output.verified, }; }; - })(Collection = Converter15.Collection || (Converter15.Collection = {})); + })((Collection = Converter15.Collection || (Converter15.Collection = {}))); let CollectionMint; ((CollectionMint2) => { CollectionMint2.intoUser = (output) => { const res = output.find((value) => { - if (value.group_key === "collection") { + if (value.group_key === 'collection') { return value.group_value; } }); - return res ? res.group_value : ""; + return res ? res.group_value : ''; }; - })(CollectionMint = Converter15.CollectionMint || (Converter15.CollectionMint = {})); + })( + (CollectionMint = + Converter15.CollectionMint || (Converter15.CollectionMint = {})), + ); })(Converter || (Converter = {})); // ../converter/src/creators.ts @@ -915,7 +965,7 @@ var Converter2; return { address: data.address.toPublicKey(), share: data.share, - verified: false + verified: false, }; }); }; @@ -927,7 +977,7 @@ var Converter2; return { address: data.address.toPublicKey(), share: data.share, - verified: false + verified: false, }; }); }; @@ -939,15 +989,15 @@ var Converter2; return { address: data.address.toString(), share: data.share, - verified: data.verified + verified: data.verified, }; }); }; - })(Creators = Converter15.Creators || (Converter15.Creators = {})); + })((Creators = Converter15.Creators || (Converter15.Creators = {}))); })(Converter2 || (Converter2 = {})); // ../converter/src/compressed-nft-metadata.ts -var import_mpl_bubblegum_instruction = require("mpl-bubblegum-instruction"); +var import_mpl_bubblegum_instruction = require('mpl-bubblegum-instruction'); var Converter3; ((Converter15) => { let CompressedNftMetadata; @@ -964,11 +1014,17 @@ var Converter3; primarySaleHappened: false, isMutable: input.isMutable ?? false, editionNonce: 0, - tokenStandard: import_mpl_bubblegum_instruction.TokenStandard.NonFungible, - tokenProgramVersion: import_mpl_bubblegum_instruction.TokenProgramVersion.Original + tokenStandard: + import_mpl_bubblegum_instruction.TokenStandard.NonFungible, + tokenProgramVersion: + import_mpl_bubblegum_instruction.TokenProgramVersion.Original, }; }; - })(CompressedNftMetadata = Converter15.CompressedNftMetadata || (Converter15.CompressedNftMetadata = {})); + })( + (CompressedNftMetadata = + Converter15.CompressedNftMetadata || + (Converter15.CompressedNftMetadata = {})), + ); })(Converter3 || (Converter3 = {})); // ../converter/src/royalty.ts @@ -983,7 +1039,7 @@ var Converter4; Royalty2.intoUser = (percentage) => { return percentage * Royalty2.THRESHOLD; }; - })(Royalty = Converter15.Royalty || (Converter15.Royalty = {})); + })((Royalty = Converter15.Royalty || (Converter15.Royalty = {}))); })(Converter4 || (Converter4 = {})); // ../converter/src/nft.ts @@ -995,7 +1051,7 @@ var Converter5; return { mint: output.onchain.id.toString(), collectionMint: Converter.CollectionMint.intoUser( - output.onchain.grouping + output.onchain.grouping, ), authorities: output.onchain.authorities, royalty: Converter4.Royalty.intoUser(output.onchain.royalty.percent), @@ -1010,10 +1066,10 @@ var Converter5; editionNonce: output.onchain.supply.edition_nonce, primarySaleHappened: output.onchain.royalty.primary_sale_happened, dateTime: convertTimestampToDateTime(output.offchain.created_at), - offchain: output.offchain + offchain: output.offchain, }; }; - })(Nft = Converter15.Nft || (Converter15.Nft = {})); + })((Nft = Converter15.Nft || (Converter15.Nft = {}))); })(Converter5 || (Converter5 = {})); // ../converter/src/memo.ts @@ -1021,15 +1077,20 @@ var Converter6; ((Converter15) => { let Memo; ((Memo2) => { - Memo2.intoUserSide = (output, meta, outputTransfer, mappingTokenAccount) => { + Memo2.intoUserSide = ( + output, + meta, + outputTransfer, + mappingTokenAccount, + ) => { const history = {}; - if (outputTransfer && outputTransfer.program !== "") { - if (mappingTokenAccount && outputTransfer.program === "spl-token") { + if (outputTransfer && outputTransfer.program !== '') { + if (mappingTokenAccount && outputTransfer.program === 'spl-token') { const foundSource = mappingTokenAccount.find( - (m) => m.account === outputTransfer.parsed.info.source + (m) => m.account === outputTransfer.parsed.info.source, ); const foundDest = mappingTokenAccount.find( - (m) => m.account === outputTransfer.parsed.info.destination + (m) => m.account === outputTransfer.parsed.info.destination, ); history.mint = outputTransfer.parsed.info.mint; foundSource && (history.source = foundSource.owner); @@ -1044,12 +1105,15 @@ var Converter6; history.dateTime = convertTimestampToDateTime(meta.blockTime); history.sig = meta.transaction.signatures[0]; history.innerInstruction = false; - if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { + if ( + meta.meta?.innerInstructions && + meta.meta?.innerInstructions.length !== 0 + ) { history.innerInstruction = true; } return history; }; - })(Memo = Converter15.Memo || (Converter15.Memo = {})); + })((Memo = Converter15.Memo || (Converter15.Memo = {}))); })(Converter6 || (Converter6 = {})); // ../converter/src/mint.ts @@ -1067,12 +1131,15 @@ var Converter7; history.dateTime = convertTimestampToDateTime(meta.blockTime); history.sig = meta.transaction.signatures[0]; history.innerInstruction = false; - if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { + if ( + meta.meta?.innerInstructions && + meta.meta?.innerInstructions.length !== 0 + ) { history.innerInstruction = true; } return history; }; - })(Mint = Converter15.Mint || (Converter15.Mint = {})); + })((Mint = Converter15.Mint || (Converter15.Mint = {}))); })(Converter7 || (Converter7 = {})); // ../converter/src/regular-nft-metadata.ts @@ -1088,10 +1155,13 @@ var Converter8; sellerFeeBasisPoints, creators: Converter2.Creators.intoInfra(input.creators), collection: Converter.Collection.intoInfra(input.collection), - uses: input.uses || null + uses: input.uses || null, }; }; - })(RegularNftMetadata = Converter15.RegularNftMetadata || (Converter15.RegularNftMetadata = {})); + })( + (RegularNftMetadata = + Converter15.RegularNftMetadata || (Converter15.RegularNftMetadata = {})), + ); })(Converter8 || (Converter8 = {})); // ../converter/src/properties.ts @@ -1099,7 +1169,12 @@ var Converter9; ((Converter15) => { let Properties; ((Properties2) => { - Properties2.intoInfra = async (input, callbackFunc, storageType, feePayer) => { + Properties2.intoInfra = async ( + input, + callbackFunc, + storageType, + feePayer, + ) => { if (!input || !input.files) { return {}; } @@ -1114,15 +1189,15 @@ var Converter9; } return overwriteObject(file, [ { - existsKey: "filePath", - will: { key: "uri", value: res.value } - } + existsKey: 'filePath', + will: { key: 'uri', value: res.value }, + }, ]); - }) + }), ); return { ...input, files }; }; - })(Properties = Converter15.Properties || (Converter15.Properties = {})); + })((Properties = Converter15.Properties || (Converter15.Properties = {}))); })(Converter9 || (Converter9 = {})); // ../converter/src/uses.ts @@ -1136,7 +1211,7 @@ var Converter10; } return output; }; - })(Uses = Converter15.Uses || (Converter15.Uses = {})); + })((Uses = Converter15.Uses || (Converter15.Uses = {}))); })(Converter10 || (Converter10 = {})); // ../converter/src/token-metadata.ts @@ -1152,7 +1227,7 @@ var Converter11; sellerFeeBasisPoints, creators: Converter2.Creators.intoInfra(input.creators), collection: null, - uses: input.uses || null + uses: input.uses || null, }; }; TokenMetadata2.intoUser = (output, tokenAmount) => { @@ -1160,19 +1235,24 @@ var Converter11; mint: output.onchain.mint.toString(), royalty: output.onchain.data.sellerFeeBasisPoints, name: (0, TokenMetadata2.deleteNullStrings)(output.onchain.data.name), - symbol: (0, TokenMetadata2.deleteNullStrings)(output.onchain.data.symbol), + symbol: (0, TokenMetadata2.deleteNullStrings)( + output.onchain.data.symbol, + ), tokenAmount, uri: (0, TokenMetadata2.deleteNullStrings)(output.onchain.data.uri), creators: Converter2.Creators.intoUser(output.onchain.data.creators), uses: Converter10.Uses.intoUserSide(output.onchain.uses), dateTime: convertTimestampToDateTime(output.offchain.created_at), - offchain: output.offchain + offchain: output.offchain, }; }; TokenMetadata2.deleteNullStrings = (str) => { - return str.replace(/\0/g, ""); + return str.replace(/\0/g, ''); }; - })(TokenMetadata = Converter15.TokenMetadata || (Converter15.TokenMetadata = {})); + })( + (TokenMetadata = + Converter15.TokenMetadata || (Converter15.TokenMetadata = {})), + ); })(Converter11 || (Converter11 = {})); // ../converter/src/transfer-checked.ts @@ -1184,10 +1264,10 @@ var Converter12; const history = {}; if (mappingTokenAccount) { const foundSource = mappingTokenAccount.find( - (m) => m.account === output.parsed.info.source + (m) => m.account === output.parsed.info.source, ); const foundDest = mappingTokenAccount.find( - (m) => m.account === output.parsed.info.destination + (m) => m.account === output.parsed.info.destination, ); foundSource && (history.source = foundSource.owner); foundDest && (history.destination = foundDest.owner); @@ -1200,12 +1280,18 @@ var Converter12; history.dateTime = convertTimestampToDateTime(meta.blockTime); history.sig = meta.transaction.signatures[0]; history.innerInstruction = false; - if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { + if ( + meta.meta?.innerInstructions && + meta.meta?.innerInstructions.length !== 0 + ) { history.innerInstruction = true; } return history; }; - })(TransferChecked = Converter15.TransferChecked || (Converter15.TransferChecked = {})); + })( + (TransferChecked = + Converter15.TransferChecked || (Converter15.TransferChecked = {})), + ); })(Converter12 || (Converter12 = {})); // ../converter/src/transfer.ts @@ -1225,12 +1311,15 @@ var Converter13; history.dateTime = convertTimestampToDateTime(meta.blockTime); history.sig = meta.transaction.signatures[0]; history.innerInstruction = false; - if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { + if ( + meta.meta?.innerInstructions && + meta.meta?.innerInstructions.length !== 0 + ) { history.innerInstruction = true; } return history; }; - })(Transfer = Converter15.Transfer || (Converter15.Transfer = {})); + })((Transfer = Converter15.Transfer || (Converter15.Transfer = {}))); })(Converter13 || (Converter13 = {})); // ../converter/src/index.ts @@ -1247,7 +1336,7 @@ var Converter14 = { ...Converter11, ...Converter12, ...Converter13, - ...Converter10 + ...Converter10, }; // ../validator/src/index.ts @@ -1255,14 +1344,14 @@ var Validator; ((Validator2) => { let Message; ((Message2) => { - Message2.SUCCESS = "success"; - Message2.SMALL_NUMBER = "too small"; - Message2.BIG_NUMBER = "too big"; - Message2.LONG_LENGTH = "too long"; - Message2.EMPTY = "invalid empty value"; - Message2.INVALID_URL = "invalid url"; - Message2.ONLY_NODE_JS = "`string` type is only Node.js"; - })(Message = Validator2.Message || (Validator2.Message = {})); + Message2.SUCCESS = 'success'; + Message2.SMALL_NUMBER = 'too small'; + Message2.BIG_NUMBER = 'too big'; + Message2.LONG_LENGTH = 'too long'; + Message2.EMPTY = 'invalid empty value'; + Message2.INVALID_URL = 'invalid url'; + Message2.ONLY_NODE_JS = '`string` type is only Node.js'; + })((Message = Validator2.Message || (Validator2.Message = {}))); Validator2.NAME_LENGTH = 32; Validator2.SYMBOL_LENGTH = 10; Validator2.URL_LENGTH = 200; @@ -1271,19 +1360,19 @@ var Validator; Validator2.ROYALTY_MIN = 0; Validator2.isRoyalty = (royalty) => { return Try(() => { - const key = "royalty"; + const key = 'royalty'; if (royalty !== 0 && !royalty) { throw createError(key, Message.EMPTY, royalty); } if (royalty < Validator2.ROYALTY_MIN) { throw createError(key, Message.SMALL_NUMBER, royalty, { threshold: Validator2.ROYALTY_MIN, - condition: "underMin" + condition: 'underMin', }); } else if (royalty > Validator2.ROYALTY_MAX) { throw createError(key, Message.BIG_NUMBER, royalty, { threshold: Validator2.ROYALTY_MAX, - condition: "overMax" + condition: 'overMax', }); } return Message.SUCCESS; @@ -1291,19 +1380,22 @@ var Validator; }; Validator2.isSellerFeeBasisPoints = (royalty) => { return Try(() => { - const key = "sellerFeeBasisPoints/seller_fee_basis_points"; + const key = 'sellerFeeBasisPoints/seller_fee_basis_points'; if (royalty !== 0 && !royalty) { throw createError(key, Message.EMPTY, royalty); } if (royalty < Validator2.ROYALTY_MIN) { throw createError(key, Message.SMALL_NUMBER, royalty, { threshold: Validator2.ROYALTY_MIN, - condition: "underMin" + condition: 'underMin', }); - } else if (royalty > Validator2.ROYALTY_MAX * Converter14.Royalty.THRESHOLD) { + } else if ( + royalty > + Validator2.ROYALTY_MAX * Converter14.Royalty.THRESHOLD + ) { throw createError(key, Message.BIG_NUMBER, royalty, { threshold: Validator2.SELLER_FEE_BASIS_POINTS_MAX, - condition: "overMax" + condition: 'overMax', }); } return Message.SUCCESS; @@ -1311,14 +1403,14 @@ var Validator; }; Validator2.isName = (name) => { return Try(() => { - const key = "name"; + const key = 'name'; if (!name) { throw createError(key, Message.EMPTY, name); } if (byteLength(name) > Validator2.NAME_LENGTH) { throw createError(key, Message.LONG_LENGTH, name, { threshold: Validator2.NAME_LENGTH, - condition: "overMax" + condition: 'overMax', }); } return Message.SUCCESS; @@ -1326,20 +1418,20 @@ var Validator; }; Validator2.isSymbol = (symbol) => { return Try(() => { - const key = "symbol"; + const key = 'symbol'; if (!symbol) { throw createError(key, Message.EMPTY, symbol); } if (byteLength(symbol) > Validator2.SYMBOL_LENGTH) { throw createError(key, Message.LONG_LENGTH, symbol, { threshold: Validator2.SYMBOL_LENGTH, - condition: "overMax" + condition: 'overMax', }); } return Message.SUCCESS; }); }; - Validator2.isImageUrl = (image) => isUriOrImage(image, "image"); + Validator2.isImageUrl = (image) => isUriOrImage(image, 'image'); Validator2.checkAll = (metadata) => { return Try(() => { const keys = Object.keys(metadata); @@ -1347,32 +1439,36 @@ var Validator; keys.map((key) => { let res; switch (key) { - case "image": + case 'image': if (key in metadata && metadata.image) { res = (0, Validator2.isImageUrl)(metadata.image); } break; - case "royalty": + case 'royalty': if (key in metadata && metadata.royalty) { res = (0, Validator2.isRoyalty)(metadata.royalty); } break; - case "seller_fee_basis_points": + case 'seller_fee_basis_points': if (key in metadata && metadata.seller_fee_basis_points) { - res = (0, Validator2.isSellerFeeBasisPoints)(metadata.seller_fee_basis_points); + res = (0, Validator2.isSellerFeeBasisPoints)( + metadata.seller_fee_basis_points, + ); } break; - case "sellerFeeBasisPoints": + case 'sellerFeeBasisPoints': if (key in metadata) { - res = (0, Validator2.isSellerFeeBasisPoints)(metadata.sellerFeeBasisPoints); + res = (0, Validator2.isSellerFeeBasisPoints)( + metadata.sellerFeeBasisPoints, + ); } break; - case "name": + case 'name': if (metadata.name) { res = (0, Validator2.isName)(metadata.name); } break; - case "symbol": + case 'symbol': if (metadata.symbol) { res = (0, Validator2.isSymbol)(metadata.symbol); } @@ -1383,7 +1479,8 @@ var Validator; } }); if (results.length > 0) { - const message = "Caught in the validation errors. see information e.g: err.details"; + const message = + 'Caught in the validation errors. see information e.g: err.details'; throw new ValidatorError(message, results); } return Message.SUCCESS; @@ -1410,7 +1507,7 @@ var Validator; if (byteLength(imageOrUri) > Validator2.URL_LENGTH) { throw createError(key, Message.LONG_LENGTH, imageOrUri, { threshold: Validator2.URL_LENGTH, - condition: "overMax" + condition: 'overMax', }); } if (!/https?:\/\/[-_.!~*\\()a-zA-Z0-9;?:&=+,%#]+/g.test(imageOrUri)) { @@ -1438,24 +1535,32 @@ var Signatures; } return res; }; - Signatures2.getForAdress = async (pubkey, parser, callback, options, histories = []) => { + Signatures2.getForAdress = async ( + pubkey, + parser, + callback, + options, + histories = [], + ) => { try { - debugLog("# options: ", options); + debugLog('# options: ', options); const transactions = await Node.getConnection().getSignaturesForAddress( pubkey.toPublicKey(), { - limit: options.narrowDown - } + limit: options.narrowDown, + }, ); - debugLog("# transactions count:", transactions.length); + debugLog('# transactions count:', transactions.length); for (const transaction of transactions) { - parseForTransaction(transaction.signature).then((signature) => { - const history = parser(signature); - if (history) { - histories.push(history); - callback(Result.ok(histories)); - } - }).catch((e) => callback(Result.err(e))); + parseForTransaction(transaction.signature) + .then((signature) => { + const history = parser(signature); + if (history) { + histories.push(history); + callback(Result.ok(histories)); + } + }) + .catch((e) => callback(Result.err(e))); await sleep(options.waitTime); } } catch (e) { @@ -1469,17 +1574,17 @@ var Signatures; // ../types/src/transaction-filter/index.ts var FilterOptions = { Transfer: { - program: ["system", "spl-token"], - action: ["transfer", "transferChecked"] + program: ['system', 'spl-token'], + action: ['transfer', 'transferChecked'], }, Memo: { - program: ["spl-memo"], - action: ["*"] + program: ['spl-memo'], + action: ['*'], }, Mint: { - program: ["spl-token"], - action: ["mintTo", "mintToChecked"] - } + program: ['spl-token'], + action: ['mintTo', 'mintToChecked'], + }, }; // ../transaction-filter/src/transaction-filter.ts @@ -1490,14 +1595,14 @@ var TransactionFilter; if (Object.keys(transaction).length === 0) { return postTokenAccount; } - const accountKeys = transaction.transaction.message.accountKeys.map( - (t) => t.pubkey.toString() + const accountKeys = transaction.transaction.message.accountKeys.map((t) => + t.pubkey.toString(), ); transaction.meta?.postTokenBalances?.forEach((t) => { if (accountKeys[t.accountIndex] && t.owner) { const v = { account: accountKeys[t.accountIndex], - owner: t.owner + owner: t.owner, }; postTokenAccount.push(v); } @@ -1505,13 +1610,16 @@ var TransactionFilter; return postTokenAccount; }; TransactionFilter2.isParsedInstruction = (arg) => { - return arg !== null && typeof arg === "object" && "parsed" in arg; + return arg !== null && typeof arg === 'object' && 'parsed' in arg; }; TransactionFilter2.parse = (filterType, moduleName) => (txMeta) => { let history; - if (filterType === "mint" /* Mint */ && moduleName === "system" /* SolNative */) { + if ( + filterType === 'mint' /* Mint */ && + moduleName === 'system' /* SolNative */ + ) { throw Error( - "This filterType('FilterType.Mint') can not use from SolNative module" + "This filterType('FilterType.Mint') can not use from SolNative module", ); } if (!txMeta || !txMeta.transaction) { @@ -1521,22 +1629,28 @@ var TransactionFilter; txMeta.transaction.message.instructions.forEach((instruction) => { if ((0, TransactionFilter2.isParsedInstruction)(instruction)) { switch (filterType) { - case "memo" /* Memo */: { + case 'memo' /* Memo */: { if (FilterOptions.Memo.program.includes(instruction.program)) { let instructionTransfer; txMeta.transaction.message.instructions.forEach( (instruction2) => { - if ((0, TransactionFilter2.isParsedInstruction)(instruction2) && FilterOptions.Transfer.program.includes( - instruction2.program - )) { + if ( + (0, TransactionFilter2.isParsedInstruction)(instruction2) && + FilterOptions.Transfer.program.includes( + instruction2.program, + ) + ) { instructionTransfer = instruction2; } - } + }, ); - if (instructionTransfer && moduleName !== instructionTransfer["program"]) { + if ( + instructionTransfer && + moduleName !== instructionTransfer['program'] + ) { debugLog( - "# FilterType.Memo break instruction: ", - instructionTransfer + '# FilterType.Memo break instruction: ', + instructionTransfer, ); break; } @@ -1544,45 +1658,47 @@ var TransactionFilter; instruction, txMeta, instructionTransfer, - postTokenAccount + postTokenAccount, ); } break; } - case "only-memo" /* OnlyMemo */: { + case 'only-memo' /* OnlyMemo */: { if (FilterOptions.Memo.program.includes(instruction.program)) { let instructionTransfer; history = Converter14.Memo.intoUserSide( instruction, txMeta, instructionTransfer, - postTokenAccount + postTokenAccount, ); } break; } - case "mint" /* Mint */: { - if (FilterOptions.Mint.program.includes(instruction.program) && FilterOptions.Mint.action.includes( - instruction.parsed.type - )) { + case 'mint' /* Mint */: { + if ( + FilterOptions.Mint.program.includes(instruction.program) && + FilterOptions.Mint.action.includes(instruction.parsed.type) + ) { history = Converter14.Mint.intoUserSide(instruction, txMeta); } break; } - case "transfer" /* Transfer */: - if (moduleName === instruction.program && FilterOptions.Transfer.action.includes( - instruction.parsed.type - )) { - if (instruction.parsed.type === "transferChecked") { + case 'transfer' /* Transfer */: + if ( + moduleName === instruction.program && + FilterOptions.Transfer.action.includes(instruction.parsed.type) + ) { + if (instruction.parsed.type === 'transferChecked') { history = Converter14.TransferChecked.intoUserSide( instruction, txMeta, - postTokenAccount + postTokenAccount, ); } else { history = Converter14.Transfer.intoUserSide( instruction, - txMeta + txMeta, ); } } @@ -1599,12 +1715,12 @@ var SolNative; SolNative6.findByOwner = async (owner) => { return Try(async () => { const res = await Node.getConnection().getParsedAccountInfo( - owner.toPublicKey() + owner.toPublicKey(), ); const info = { sol: 0, lamports: 0, - owner: owner.toString() + owner: owner.toString(), }; if (TransactionFilter.isParsedInstruction(res.value?.data)) { const parsedAccountData = res.value?.data; @@ -1620,7 +1736,7 @@ var SolNative; })(SolNative || (SolNative = {})); // ../suite-sol-native/src/gas-less-transfer.ts -var import_web310 = require("@solana/web3.js"); +var import_web310 = require('@solana/web3.js'); var SolNative2; ((SolNative6) => { const RADIX = 10; @@ -1631,52 +1747,66 @@ var SolNative2; const tx = new import_web310.Transaction({ blockhash: blockHashObj.blockhash, lastValidBlockHeight: blockHashObj.lastValidBlockHeight, - feePayer: feePayer.toPublicKey() + feePayer: feePayer.toPublicKey(), }).add( import_web310.SystemProgram.transfer({ fromPubkey: ownerPublicKey, toPubkey: dest.toPublicKey(), - lamports: parseInt(`${amount.toLamports()}`, RADIX) - }) + lamports: parseInt(`${amount.toLamports()}`, RADIX), + }), ); tx.partialSign(owner.toKeypair()); const serializedTx = tx.serialize({ - requireAllSignatures: false + requireAllSignatures: false, }); - const hex = serializedTx.toString("hex"); + const hex = serializedTx.toString('hex'); return new TransactionBuilder6.PartialSign(hex); }); }; })(SolNative2 || (SolNative2 = {})); // ../suite-sol-native/src/transfer.ts -var import_web311 = require("@solana/web3.js"); +var import_web311 = require('@solana/web3.js'); var SolNative3; ((SolNative6) => { const RADIX = 10; - SolNative6.transfer = (owner, dest, ownerOrMultisig, amount, options = {}) => { + SolNative6.transfer = ( + owner, + dest, + ownerOrMultisig, + amount, + options = {}, + ) => { return Try(() => { const inst = import_web311.SystemProgram.transfer({ fromPubkey: owner.toPublicKey(), toPubkey: dest.toPublicKey(), - lamports: parseInt(`${amount.toLamports()}`, RADIX) + lamports: parseInt(`${amount.toLamports()}`, RADIX), }); - const payer = options.feePayer ? options.feePayer.toKeypair() : ownerOrMultisig[0].toKeypair(); + const payer = options.feePayer + ? options.feePayer.toKeypair() + : ownerOrMultisig[0].toKeypair(); return new TransactionBuilder6.Common( [inst], ownerOrMultisig.map((s) => s.toKeypair()), - payer + payer, ); }); }; })(SolNative3 || (SolNative3 = {})); // ../suite-sol-native/src/transfer-with-multisig.ts -var import_spl_token = require("@solana/spl-token"); +var import_spl_token = require('@solana/spl-token'); var SolNative4; ((SolNative6) => { const RADIX = 10; - SolNative6.transferWithMultisig = async (owner, dest, multisig, amount, options = {}) => { + SolNative6.transferWithMultisig = async ( + owner, + dest, + multisig, + amount, + options = {}, + ) => { return Try(async () => { const connection = Node.getConnection(); const payer = options.feePayer ? options.feePayer : multisig[0]; @@ -1685,29 +1815,29 @@ var SolNative4; connection, payer.toKeypair(), owner.toPublicKey(), - parseInt(`${amount.toLamports()}`, RADIX) + parseInt(`${amount.toLamports()}`, RADIX), ); - debugLog("# wrapped sol: ", wrapped.toBase58()); + debugLog('# wrapped sol: ', wrapped.toBase58()); const instructions = []; const token = await (0, import_spl_token.createMint)( connection, payer.toKeypair(), owner.toPublicKey(), owner.toPublicKey(), - 0 + 0, ); const sourceToken = await Account3.Associated.retryGetOrCreate( token.toString(), owner, - payer + payer, ); - debugLog("# sourceToken: ", sourceToken); + debugLog('# sourceToken: ', sourceToken); const destToken = await Account3.Associated.retryGetOrCreate( token.toString(), wrapped.toString(), - payer + payer, ); - debugLog("# destToken: ", destToken); + debugLog('# destToken: ', destToken); instructions.push( (0, import_spl_token.createTransferInstruction)( sourceToken.toPublicKey(), @@ -1715,21 +1845,21 @@ var SolNative4; owner.toPublicKey(), parseInt(`${amount}`, RADIX), // No lamports, its sol - keypairs - ) + keypairs, + ), ); instructions.push( (0, import_spl_token.createCloseAccountInstruction)( wrapped, dest.toPublicKey(), owner.toPublicKey(), - keypairs - ) + keypairs, + ), ); return new TransactionBuilder6.Common( instructions, multisig.map((s) => s.toKeypair()), - payer.toKeypair() + payer.toKeypair(), ); }); }; @@ -1740,32 +1870,44 @@ var SolNative5 = { ...SolNative, ...SolNative2, ...SolNative3, - ...SolNative4 + ...SolNative4, }; // src/request-sol.ts -var LOCAL_KEYPAIR_FILE = "solana-localhost-devnet-keypair"; +var LOCAL_KEYPAIR_FILE = 'solana-localhost-devnet-keypair'; var requestSol = async (pubkey, sol = 0.1) => { - let bufferStr = ""; + let bufferStr = ''; try { - bufferStr = import_fs.default.readFileSync(`./${LOCAL_KEYPAIR_FILE}`, "utf8"); + bufferStr = import_fs.default.readFileSync( + `./${LOCAL_KEYPAIR_FILE}`, + 'utf8', + ); } catch (_) { - console.log("_"); - bufferStr = import_fs.default.readFileSync(`../../${LOCAL_KEYPAIR_FILE}`, "utf8"); + console.log('_'); + bufferStr = import_fs.default.readFileSync( + `../../${LOCAL_KEYPAIR_FILE}`, + 'utf8', + ); } - console.log("Now load...please wait"); + console.log('Now load...please wait'); const keypair = JSON.parse(bufferStr).feePayer; - const sig = SolNative5.transfer(keypair.pubkey, pubkey, [keypair.secret], sol); + const sig = SolNative5.transfer( + keypair.pubkey, + pubkey, + [keypair.secret], + sol, + ); (await sig.submit()).match( (ok) => { Node.confirmedSig(ok); - console.log("Done transfer"); + console.log('Done transfer'); }, - (err) => import_assert.default.fail(err) + (err) => import_assert.default.fail(err), ); }; // Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - requestSol -}); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uL3NyYy9yZXF1ZXN0LXNvbC50cyIsICIuLi8uLi9zdWl0ZS11dGlscy9zcmMvY29uc3RhbnRzLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2JhdGNoLnRzIiwgIi4uLy4uL25vZGUvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9u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c3luYyAoXG4gICAgICBhcnI6IENvbW1vbi5Db21tb25bXSB8IE1pbnQuTWludFtdLFxuICAgICk6IFByb21pc2U8UmVzdWx0PFRyYW5zYWN0aW9uU2lnbmF0dXJlLCBFcnJvcj4+ID0+IHtcbiAgICAgIHJldHVybiBUcnkoYXN5bmMgKCkgPT4ge1xuICAgICAgICBsZXQgaSA9IDA7XG4gICAgICAgIGZvciAoY29uc3QgYSBvZiBhcnIpIHtcbiAgICAgICAgICBpZiAoIWEuaW5zdHJ1Y3Rpb25zICYmICFhLnNpZ25lcnMpIHtcbiAgICAgICAgICAgIHRocm93IEVycm9yKFxuICAgICAgICAgICAgICBgb25seSBJbnN0cnVjdGlvbiBvYmplY3QgdGhhdCBjYW4gdXNlIGJhdGNoU3VibWl0KCkuXG4gICAgICAgICAgICBJbmRleDogJHtpfSwgU2V0IHZhbHVlOiAke0pTT04uc3RyaW5naWZ5KGEpfWAsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICBpKys7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBpbnN0cnVjdGlvbnMgPSBhcnIuZmxhdE1hcCgoYSkgPT4gYS5pbnN0cnVjdGlvbnMpO1xuICAgICAgICBjb25zdCBzaWduZXJzID0gYXJyLmZsYXRNYXAoKGEpID0+IGEuc2lnbmVycyk7XG4gICAgICAgIGNvbnN0IGZlZVBheWVycyA9IGFyci5maWx0ZXIoKGEpID0+IGEuZmVlUGF5ZXIgIT09IHVuZGVmaW5lZCk7XG4gICAgICAgIGxldCBmZWVQYXllciA9IHNpZ25lcnNbMF07XG4gICAgICAgIGlmIChmZWVQYXllcnMubGVuZ3RoID4gMCAmJiBmZWVQYXllcnNbMF0uZmVlUGF5ZXIpIHtcbiAgICAgICAgICBmZWVQYXllciA9IGZlZVBheWVyc1swXS5mZWVQYXllcjtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHRyYW5zYWN0aW9uID0gbmV3IFRyYW5zYWN0aW9uK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Y2toYXNoT2JqLmJsb2NraGFzaDtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHRoaXMuc2lnbmVycztcblxuICAgICAgICBpZiAodGhpcy5mZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gdGhpcy5mZWVQYXllci5wdWJsaWNLZXk7XG4gICAgICAgICAgZmluYWxTaWduZXJzID0gW3RoaXMuZmVlUGF5ZXIsIC4uLnRoaXMuc2lnbmVyc107XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLmluc3RydWN0aW9ucy5mb3JFYWNoKChpbnN0KSA9PiB0cmFuc2FjdGlvbi5hZGQoaW5zdCkpO1xuXG4gICAgICAgIGNvbnN0IG9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IE1BWF9SRVRSSUVTLFxuICAgICAgICB9O1xuXG4gICAgICAgIGlmIChOb2RlLmdldENvbm5lY3Rpb24oKS5ycGNFbmRwb2ludCA9PT0gQ29uc3RhbnRzLkVuZFBvaW50VXJsLnByZCkge1xuICAgICAgICAgIGRlYnVnTG9nKCcjIENoYW5nZSBtZXRhcGxleCBjbHVzdGVyIG9uIG1haW5uZXQtYmV0YScpO1xuICAgICAgICAgIE5vZGUuY2hhbmdlQ29ubmVjdGlvbih7IGNsdXN0ZXI6IENvbnN0YW50cy5DbHVzdGVyLnByZE1ldGFwbGV4IH0pO1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgIG9wdGlvbnMsXG4gICAgICAgICk7XG4gICAgICB9KTtcbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHtcbiAgQ29uZmlybU9wdGlvb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XdhaXQgKGNvbnN0IG9iaiBvZiB0aGlzKSB7XG4gICAgICBpZiAob2JqLmlzRXJyKSB7XG4gICAgICAgIHJldHVybiBvYmo7XG4gICAgICB9IGVsc2UgaWYgKG9iai52YWx1ZS5jYW5TdWJtaXQpIHtcbiAgICAgICAgZGVidWdMb2coJyMgUmVzdWx0IGJhdGNoIGNhblN1Ym1pdCcpO1xuICAgICAgICBjb25zdCBzaWcgPSBhd2FpdCAob2JqIGFzIFBhcnRpYWxTaWduU3RydWN0dXJlKS5zdWJtaXQoZmVlUGF5ZXIpO1xuICAgICAgICBpZiAoc2lnLmlzRXJyKSB7XG4gICAgICAgICAgcmV0dXJuIHNpZztcbiAgICAgICAgfVxuICAgICAgICBhd2FpdCBOb2RlLmNvbmZpcm1lZFNpZyhzaWcudmFsdWUpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgZGVidWdMb2coJyMgUmVzdWx0IGJhdGNoIG90aGVyIHRoYW4gY2FuU3VibWl0Jyk7XG4gICAgICAgIGlmICh0aGlzLmxlbmd0aCA9PSBpKSB7XG4gICAgICAgICAgLy8gbGFzdCBvYmplY3RcbiAgICAgICAgICByZXR1cm4gb2JqLnN1Ym1pdChmZWVQYXllcik7XG4gICAgICAgIH1cbiAgICAgICAgb2JqLnN1Ym1pdChmZWVQYXllcik7XG4gICAgICB9XG4gICAgICBpKys7XG4gICAgfVxuICB9IGVsc2Uge1xuICAgIGNvbnN0IGluc3RydWN0aW9uczogQ29tbW9uU3RydWN0dXJlIHwgTWludFN0cnVjdHVyZVtdID0gW107XG4gICAgZm9yIChjb25zdCBvYmogb2YgdGhpcykge1xuICAgICAgaWYgKG9iai5pc0Vycikge1xuICAgICAgICByZXR1cm4gb2JqO1xuICAgICAgfSBlbHNlIGlmIChvYmouaXNPaykge1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChvYmoudmFsdWUpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgcmV0dXJuIFJlc3VsdC5lcnIoR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9rZW5BY2NvdW50W10sXG4gICAgKTogSGlzdG9yeSB8IHVuZGVmaW5lZCA9PiB7XG4gICAgICBjb25zdCBoaXN0b3J5OiBIaXN0b3J5ID0ge307XG5cbiAgICAgIGlmIChtYXBwaW5nVG9rZW5BY2NvdW50KSB7XG4gICAgICAgIGNvbnN0IGZvdW5kU291cmNlID0gbWFwcGluZ1Rva2VuQWNjb3VudC5maW5kKFxuICAgICAgICAgIChtKSA9PiBtLmFjY291bnQgPT09IG91dHB1dC5wYXJzZWQuaW5mby5zb3VyY2UsXG4gICAgICAgICk7XG4gICAgICAgIGNvbnN0IGZvdW5kRGVzdCA9IG1hcHBpbmdUb2tlbkFjY291bnQuZmluZChcbiAgICAgICAgICAobSkgPT4gbS5hY2NvdW50ID09PSBvdXRwdXQucGFyc2VkLmluZm8uZGVzdGluYXRpb24sXG4gICAgICAgICk7XG4gICAgICAgIGZvdW5kU291cmNlICYmIChoaXN0b3J5LnNvdXJjZSA9IGZvdW5kU291cmNlLm93bmVyKTtcbiAgICAgICAgZm91bmREZXN0ICYmIChoaXN0b3J5LmRlc3RpbmF0aW9uID0gZm91bmREZXN0Lm93bmVyKTtcbiAgICAgIH1cblxuICAgICAgaGlzdG9yeS50b2tlbkFtb3VudCA9IG91dHB1dC5wYXJzZWQuaW5mby50b2tlbkFtb3VudDtcbiAgICAgIGhpc3RvcnkubWludCA9IG91dHB1dC5wYXJzZWQuaW5mby5taW50O1xuICAgICAgaGlzdG9yeS5tdWx0aXNpZ0F1dGhvcml0eSA9IG91dHB1dC5wYXJzZWQuaW5mby5tdWx0aXNpZ0F1dGhvcml0eTtcbiAgICAgIGhpc3Rvcnkuc2lnbmVycyA9IG91dHB1dC5wYXJzZWQuaW5mby5zaWduZXJzO1xuICAgICAgaGlzdG9yeS50eXBlID0gb3V0cHV0LnByb2dyYW07XG4gICAgICBoaXN0b3J5LmRhdGVUaW1lID0gY29udmVydFRpbWVzdGFtcFRvRGF0ZVRpbWUobWV0YS5ibG9ja1R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gICAgICAgICAgcmVzID0gaXNJbWFnZVVybChtZXRhZGF0YS5pbWFnZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdyb3lhbHR5JzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEucm95YWx0eSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1JveWFsdHkobWV0YWRhdGEucm95YWx0eSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ25hbWUnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLm5hbWUpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNOYW1lKG1ldGFkYXRhLm5hbWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc3ltYm9sJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5zeW1ib2wpIH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W5zdHJ1Y3Rpb24pKSB7XG4gICAgICAgICAgc3dpdGNoIChmaWx0ZXJUeXBlKSB7XG4gICAgICAgICAgICBjYXNlIEZpbHRlclR5cGUuTWVtbzoge1xuICAgICAgICAgICAgICBpZiAoRmlsdGVyT3B0aW9ucy5NZW1vLnByb2dyYW0uaW5jbHVkZXMoaW5zdHJ1Y3Rpb24ucHJvZ3JhbSkpIHtcbiAgICAgICAgICAgICAgICBsZXQgaW5zdHJ1Y3Rpb25UcmFuc2ZlcjtcblxuICAgICAgICAgICAgICAgIC8vIGZldGNoICB0cmFuc2ZlciB0cmFuc2FjdGlvbiBmb3IgcmVsYXRpb25hbCBtZW1vXG4gICAgICAgICAgICAgICAgdHhNZXRhLnRyYW5zYWN0aW9uLm1lc3NhZ2UuaW5zdHJ1Y3Rpb25zLmZvckVhY2goXG4gICAgICAgICAgICAgICAgICAoaW5zdHJ1Y3Rpb24pID0+IHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgIGlzUGFyc2VkSW5zdHJ1Y3Rpb24oaW5zdHJ1Y3Rpb24pICYmXG4gICAgICAgICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5UcmFuc2Zlci5wcm9ncmFtLmluY2x1ZGVzKFxuICAgICAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24ucHJvZ3JhbSxcbiAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIgPSBpbnN0cnVjdGlvbjtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICApO1xuXG4gICAgICAgICAgICAgICAgLy8gc3BsLXRva2VuIG9yIHN5c3RlbVxuICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIgJiZcbiAgICAgICAgICAgICAgICAgIG1vZHVsZU5hbWUgIT09IGluc3RydWN0aW9uVHJhbnNmZXJbJ3Byb2dyYW0nXVxuICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgZGVidWdMb2coXG4gICAgICAgICAgICAgICAgICAgICcjIEZpbHRlclR5cGUuTWVtbyBicmVhayBpbnN0cnVjdGlvbjogJyxcbiAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlcixcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAvLyBmZXRjaCBtZW1vIG9ubHkgdHJhbnNhY3Rpb25cbiAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLk1lbW8uaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyLFxuICAgICAgICAgICAgICAgICAgcG9zdFRva2VuQWNjb3VudCxcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLk9ubHlNZW1vOiB7XG4gICAgICAgICAgICAgIGlmIChGaWx0ZXJPcHRpb25zLk1lbW8ucHJvZ3JhbS5pbmNsdWRlcyhpbnN0cnVjdGlvbi5wcm9ncmFtKSkge1xuICAgICAgICAgICAgICAgIGxldCBpbnN0cnVjdGlvblRyYW5zZmVyO1xuXG4gICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5NZW1vLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlcixcbiAgICAgICAgICAgICAgICAgIHBvc3RUb2tlbkFjY291bnQsXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5NaW50OiB7XG4gICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLk1pbnQucHJvZ3JhbS5pbmNsdWRlcyhpbnN0cnVjdGlvbi5wcm9ncmFtKSAmJlxuICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuTWludC5hY3Rpb24uaW5jbHVkZXMoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbi5wYXJzZWQudHlwZSBhcyBzdHJpbmcsXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLk1pbnQuaW50b1VzZXJTaWRlKGluc3RydWN0aW9uLCB0eE1ldGEpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLlRyYW5zZmVyOlxuICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgbW9kdWxlTmFtZSA9PT0gaW5zdHJ1Y3Rpb24ucHJvZ3JhbSAmJlxuICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuVHJhbnNmZXIuYWN0aW9uLmluY2x1ZGVzKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24ucGFyc2VkLnR5cGUgYXMgc3RyaW5nLFxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgaWYgKGluc3RydWN0aW9uLnBhcnNlZC50eXBlID09PSAndHJhbnNmZXJDaGVja2VkJykge1xuICAgICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5UcmFuc2ZlckNoZWNrZWQuaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgICBwb3N0VG9rZW5BY2NvdW50LFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5UcmFuc2Zlci5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgICByZXR1cm4gaGlzdG9yeTtcbiAgICB9O1xufVxuIiwgImltcG9ydCB7IFBhcnNlZEFjY291bnREYXRhIH0gZnJvbSAnQHNvbGFuYS93ZWIzLmpzJztcbmltcG9ydCB7IFJlc3VsdCwgVHJ5IH0gZnJvbSAnfi9zdWl0ZS11dGlscyc7XG5pbXBvcnQgeyBOb2RlIH0gZnJvbSAnfi9ub2RlJztcbmltcG9ydCB7IE93bmVySW5mbywgUHVia2V5IH0gZnJvbSAnfi90eXBlcy9hY2NvdW50JztcbmltcG9ydCB7IFRyYW5zYWN0aW9uRmlsdGVyIH0gZnJvbSAnfi90cmFuc2FjdGlvbi1maWx0ZXInO1xuXG5leHBvcnQgbmFtZXNwYWNlIFNvbE5hdGl2ZSB7XG4gIC8qKlxuICAgKiBGaW5kIG5mdCBieSBvd25lciBhZGRyZXNzXG4gICAqXG4gICAqIEBwYXJhbSB7UHVia2V5fSBvd25lclxuICAgKiBAcmV0d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Sk7XG5cbiAgICAgIGNvbnN0IGluc3RydWN0aW9ucyA9IFtdO1xuXG4gICAgICBjb25zdCB0b2tlbiA9IGF3YWl0IGNyZWF0ZU1pbnQoXG4gICAgICAgIGNvbm5lY3Rpb24sXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAwLFxuICAgICAgKTtcblxuICAgICAgY29uc3Qgc291cmNlVG9rZW4gPSBhd2FpdCBBY2NvdW50LkFzc29jaWF0ZWQucmV0cnlHZXRPckNyZWF0ZShcbiAgICAgICAgdG9rZW4udG9TdHJpbmcoKSxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIHBheWVyLFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgc291cmNlVG9rZW46ICcsIHNvdXJjZVRva2VuKTtcblxuICAgICAgY29uc3QgZGVzdFRva2VuID0gYXdhaXQgQWNjb3VudC5Bc3NvY2lhdGVkLnJldHJ5R2V0T3JDcmVhdGUoXG4gICAgICAgIHRva2VuLnRvU3RyaW5nKCksXG4gICAgICAgIHdyYXBwZWQudG9TdHJpbmcoKSxcbiAgICAgICAgcGF5ZXIsXG4gICAgICApO1xuXG4gICAgICBkZWJ1Z0xvZygnIyBkZXN0VG9rZW46ICcsIGRlc3RUb2tlbik7XG5cbiAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICBjcmVhdGVUcmFuc2Zlckluc3RydWN0aW9uKFxuICAgICAgICAgIHNvdXJjZVRva2VuLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgZGVzdFRva2VuLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBwYXJzZUludChgJHthbW91bnR9YCwgUkFESVgpLCAvLyBObyBsYW1wb3J0cywgaXRzIHNvbFxuICAgICAgICAgIGtleXBhaXJzLFxuIC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cmFuc2FjdGlvbkJ1aWxkZXIiLCAiaW1wb3J0X3dlYjMiLCAiU29sTmF0aXZlIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJTb2xOYXRpdmUiLCAiQWNjb3VudCIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiU29sTmF0aXZlIiwgImZzIiwgIlNvbE5hdGl2ZSIsICJhc3NlcnQiXQp9Cg== \ No newline at end of file +0 && + (module.exports = { + requestSol, + }); +//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uL3NyYy9yZXF1ZXN0LXNvbC50cyIsICIuLi8uLi9zdWl0ZS11dGlscy9zcmMvY29uc3RhbnRzLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2JhdGNoLnRzIiwgIi4uLy4uL25vZGUvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2NvbW1vbi50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9taW50LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL3BhcnRpYWwtc2lnbi50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jYWxjdWxhdGUtdHhzaXplLnRzIiwgIi4uLy4uL2dsb2JhbC9zcmMvaW5kZXgudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMva2V5cGFpci50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9wZGEudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvaW5kZXgudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvaW5kZXgudHMiLCAiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL3NoYXJlZC50cyIsICIuLi8uLi9zdWl0ZS11dGlscy9zcmMvcmVzdWx0LnRzI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uZnQnO1xuaW1wb3J0IHsgSW50ZXJuYWxDcmVhdG9ycyB9IGZyb20gJ34vdHlwZXMvY29udmVydGVyJztcblxuZXhwb3J0IG5hbWVzcGFjZSBDb252ZXJ0ZXIge1xuICBleHBvcnQgbmFtZXNwYWNlIENyZWF0b3JzIHtcbiAgICBleHBvcnQgY29uc3QgaW50b0luZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IE9wdGlvbjxJbnRlcm5hbENyZWF0b3JzW10+ID0+IHtcbiAgICAgIGlmICghaW5wdXQpIHtcbiAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICB9XG4gICAgICByZXR1cm4gaW5wdXQubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvQ29tcHJlc3NlZE5mdEluZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IEludGVybmFsQ3JlYXRvcnNbXSA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBbXTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBpbnB1dCEubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICA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c1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEuc3ltYm9sKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU3ltYm9sKG1ldGFkYXRhLnN5bWJvbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAocmVzICYmIHJlcy5pc0Vycikge1xuICAgICAgICAgIHJlc3VsdHMucHVzaCguLi5yZXMuZXJyb3IuZGV0YWlscyk7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgICAgaWYgKHJlc3VsdHMubGVuZ3RoID4gMCkge1xuICAgICAgICBjb25zdCBtZXNzYWdlID1cbiAgICAgICAgICAnQ2F1Z2h0IGluIHRoZSB2YWxpZGF0aW9uIGVycm9ycy4gc2VlIGluZm9ybWF0aW9uIGUuZzogZXJyPFZhbGlkYXRvckVycm9yPi5kZXRhaWxzJztcbiAgICAgICAgdGhyb3cgbmV3IFZhb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AgICAgKGluc3RydWN0aW9uKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICBpc1BhcnNlZEluc3RydWN0aW9uKGluc3RydWN0aW9uKSAmJlxuICAgICAgICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuVHJhbnNmZXIucHJvZ3JhbS5pbmNsdWRlcyhcbiAgICAgICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLnByb2dyYW0sXG4gICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyID0gaW5zdHJ1Y3Rpb247XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgKTtcblxuICAgICAgICAgICAgICAgIC8vIHNwbC10b2tlbiBvciBzeXN0ZW1cbiAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyICYmXG4gICAgICAgICAgICAgICAgICBtb2R1bGVOYW1lICE9PSBpbnN0cnVjdGlvblRyYW5zZmVyWydwcm9ncmFtJ11cbiAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgIGRlYnVnTG9nKFxuICAgICAgICAgICAgICAgICAgICAnIyBGaWx0ZXJUeXBlLk1lbW8gYnJlYWsgaW5zdHJ1Y3Rpb246ICcsXG4gICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIsXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgLy8gZmV0Y2ggbWVtbyBvbmx5IHRyYW5zYWN0aW9uXG4gICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5NZW1vLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlcixcbiAgICAgICAgICAgICAgICAgIHBvc3RUb2tlbkFjY291bnQsXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5Pbmx5TWVtbzoge1xuICAgICAgICAgICAgICBpZiAoRmlsdGVyT3B0aW9ucy5NZW1vLnByb2dyYW0uaW5jbHVkZXMoaW5zdHJ1Y3Rpb24ucHJvZ3JhbSkpIHtcbiAgICAgICAgICAgICAgICBsZXQgaW5zdHJ1Y3Rpb25UcmFuc2ZlcjtcblxuICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuTWVtby5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIsXG4gICAgICAgICAgICAgICAgICBwb3N0VG9rZW5BY2NvdW50LFxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXNlIEZpbHRlclR5cGUuTWludDoge1xuICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5NaW50LnByb2dyYW0uaW5jbHVkZXMoaW5zdHJ1Y3Rpb24ucHJvZ3JhbSkgJiZcbiAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLk1pbnQuYWN0aW9uLmluY2x1ZGVzKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24ucGFyc2VkLnR5cGUgYXMgc3RyaW5nLFxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5NaW50LmludG9Vc2VyU2lkZShpbnN0cnVjdGlvbiwgdHhNZXRhKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5UcmFuc2ZlcjpcbiAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgIG1vZHVsZU5hbWUgPT09IGluc3RydWN0aW9uLnByb2dyYW0gJiZcbiAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLlRyYW5zZmVyLmFjdGlvbi5pbmNsdWRlcyhcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLnBhcnNlZC50eXBlIGFzIHN0cmluZyxcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgIGlmIChpbnN0cnVjdGlvbi5wYXJzZWQudHlwZSA9PT0gJ3RyYW5zZmVyQ2hlY2tlZCcpIHtcbiAgICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuVHJhbnNmZXJDaGVja2VkLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgICAgcG9zdFRva2VuQWNjb3VudCxcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuVHJhbnNmZXIuaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgIC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3I+PiA9PiB7XG4gICAgcmV0dXJuIFRyeShhc3luYyAoKSA9PiB7XG4gICAgICBjb25zdCBjb25uZWN0aW9uID0gTm9kZS5nZXRDb25uZWN0aW9uKCk7XG4gICAgICBjb25zdCBwYXllciA9IG9wdGlvbnMuZmVlUGF5ZXIgPyBvcHRpb25zLmZlZVBheWVyIDogbXVsdGlzaWdbMF07XG4gICAgICBjb25zdCBrZXlwYWlycyA9IG11bHRpc2lnLm1hcCgocykgPT4gcy50b0tleXBhaXIoKSk7XG4gICAgICBjb25zdCB3cmFwcGVkID0gYXdhaXQgY3JlYXRlV3JhcHBlZE5hdGl2ZUFjY291bnQoXG4gICAgICAgIGNvbm5lY3Rpb24sXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICBwYXJzZUludChgJHthbW91bnQudG9MYW1wb3J0cygpfWAsIFJBRElYKSxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIHdyYXBwZWQgc29sOiAnLCB3cmFwcGVkLnRvQmFzZTU4KCkpO1xuXG4gICAgICBjb25zdCBpbnN0cnVjdGlvbnMgPSBbXTtcblxuICAgICAgY29uc3QgdG9rZW4gPSBhd2FpdCBjcmVhdGVNaW50KFxuICAgICAgICBjb25uZWN0aW9uLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgMCxcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IHNvdXJjZVRva2VuID0gYXdhaXQgQWNjb3VudC5Bc3NvY2lhdGVkLnJldHJ5R2V0T3JDcmVhdGUoXG4gICAgICAgIHRva2VuLnRvU3RyaW5nKCksXG4gICAgICAgIG93bmVyLFxuICAgICAgICBwYXllcixcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIHNvdXJjZVRva2VuOiAnLCBzb3VyY2VUb2tlbik7XG5cbiAgICAgIGNvbnN0IGRlc3RUb2tlbiA9IGF3YWl0IEFjY291bnQuQXNzb2NpYXRlZC5yZXRyeUdldE9yQ3JlYXRlKFxuICAgICAgICB0b2tlbi50b1N0cmluZygpLFxuICAgICAgICB3cmFwcGVkLnRvU3RyaW5nKCksXG4gICAgICAgIHBheWVyLFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgZGVzdFRva2VuOiAnLCBkZXN0VG9rZW4pO1xuXG4gICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgY3JlYXRlVHJhbnNmZXJJbnN0cnVjdGlvbihcbiAgICAgICAgICBzb3VyY2VUb2tlbi50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGRlc3RUb2tlbi50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgcGFyc2VJbnQoYCR7YW1vdW50fWAsIFJBRElYKSwgLy8gTm8gbGFtcG9ydHMsIGl0cyBzb2xcbiAgICAgICAgICBrZXlwYWlycyxcbiAgICAgICAgKSxcbiAgICAgICk7XG5cbiAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICBjcmVhdGVDbG9zZUFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgICB3cmFwcGVkLFxuICAgICAgICAgIGRlc3QudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGtleXBhaXJzLFxuICAgICAgICApLFxuICAgICAgKTtcblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uKFxuICAgICAgICBpbnN0cnVjdGlvbnMsXG4gICAgICAgIG11bHRpc2lnLm1hcCgocykgPT4gcy50b0tleXBhaXIoKSksXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgKTtcbiAgICB9K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ZXJ0ZXIiLCAiQ29tcHJlc3NlZE5mdE1ldGFkYXRhIiwgIkNvbnZlcnRlciIsICJSb3lhbHR5IiwgIkNvbnZlcnRlciIsICJOZnQiLCAiQ29udmVydGVyIiwgIk1lbW8iLCAiQ29udmVydGVyIiwgIk1pbnQiLCAiQ29udmVydGVyIiwgIlJlZ3VsYXJOZnRNZXRhZGF0YSIsICJDb252ZXJ0ZXIiLCAiUHJvcGVydGllcyIsICJDb252ZXJ0ZXIiLCAiVXNlcyIsICJDb252ZXJ0ZXIiLCAiVG9rZW5NZXRhZGF0YSIsICJDb252ZXJ0ZXIiLCAiVHJhbnNmZXJDaGVja2VkIiwgIkNvbnZlcnRlciIsICJUcmFuc2ZlciIsICJDb252ZXJ0ZXIiLCAiVmFsaWRhdG9yIiwgIk1lc3NhZ2UiLCAiQ29udmVydGVyIiwgIlNpZ25hdHVyZXMiLCAiVHJhbnNhY3Rpb25GaWx0ZXIiLCAiaW5zdHJ1Y3Rpb24iLCAiQ29udmVydGVyIiwgIlNvbE5hdGl2ZSIsICJpbXBvcnRfd2ViMyIsICJTb2xOYXRpdmUiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgImltcG9ydF93ZWIzIiwgIlNvbE5hdGl2ZSIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiU29sTmF0aXZlIiwgIkFjY291bnQiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlNvbE5hdGl2ZSIsICJmcyIsICJTb2xOYXRpdmUiLCAiYXNzZXJ0Il0KfQo= diff --git a/packages/test-tools/dist/index.mjs b/packages/test-tools/dist/index.mjs index 0f715a579..d43b3c7b3 100644 --- a/packages/test-tools/dist/index.mjs +++ b/packages/test-tools/dist/index.mjs @@ -1,10 +1,10 @@ // src/request-sol.ts -import assert from "assert"; -import fs from "fs"; +import assert from 'assert'; +import fs from 'fs'; // ../suite-utils/src/constants.ts -import { PublicKey } from "@solana/web3.js"; -import SolanaJsonConfig from "@solana-suite/config/load"; +import { PublicKey } from '@solana/web3.js'; +import SolanaJsonConfig from '@solana-suite/config/load'; var Config = SolanaJsonConfig; var Constants; ((Constants2) => { @@ -42,7 +42,10 @@ var Constants; } return false; }; - })(WarnningMessage = Constants2.WarnningMessage || (Constants2.WarnningMessage = {})); + })( + (WarnningMessage = + Constants2.WarnningMessage || (Constants2.WarnningMessage = {})), + ); })(Constants || (Constants = {})); ((Constants2) => { Constants2.currentCluster = Config.cluster.type; @@ -52,35 +55,40 @@ var Constants; Constants2.dasApiUrl = Config.dasApiUrl; let Cluster; ((Cluster2) => { - Cluster2["prd"] = "mainnet-beta"; - Cluster2["prdMetaplex"] = "mainnet-beta-metaplex"; - Cluster2["dev"] = "devnet"; - Cluster2["test"] = "testnet"; - Cluster2["localhost"] = "localhost-devnet"; - })(Cluster = Constants2.Cluster || (Constants2.Cluster = {})); + Cluster2['prd'] = 'mainnet-beta'; + Cluster2['prdMetaplex'] = 'mainnet-beta-metaplex'; + Cluster2['dev'] = 'devnet'; + Cluster2['test'] = 'testnet'; + Cluster2['localhost'] = 'localhost-devnet'; + })((Cluster = Constants2.Cluster || (Constants2.Cluster = {}))); let EndPointUrl; ((EndPointUrl2) => { - EndPointUrl2["prd"] = "https://api.mainnet-beta.solana.com"; - EndPointUrl2["prdMetaplex"] = "https://api.metaplex.solana.com"; - EndPointUrl2["dev"] = "https://api.devnet.solana.com"; - EndPointUrl2["test"] = "https://api.testnet.solana.com"; - EndPointUrl2["localhost"] = "http://api.devnet.solana.com"; - })(EndPointUrl = Constants2.EndPointUrl || (Constants2.EndPointUrl = {})); + EndPointUrl2['prd'] = 'https://api.mainnet-beta.solana.com'; + EndPointUrl2['prdMetaplex'] = 'https://api.metaplex.solana.com'; + EndPointUrl2['dev'] = 'https://api.devnet.solana.com'; + EndPointUrl2['test'] = 'https://api.testnet.solana.com'; + EndPointUrl2['localhost'] = 'http://api.devnet.solana.com'; + })((EndPointUrl = Constants2.EndPointUrl || (Constants2.EndPointUrl = {}))); let BundlrUrl; ((BundlrUrl2) => { - BundlrUrl2["prd"] = "https://node1.irys.xyz,https://node2.irys.xyz"; - BundlrUrl2["dev"] = "https://devnet.irys.xyz"; - })(BundlrUrl = Constants2.BundlrUrl || (Constants2.BundlrUrl = {})); + BundlrUrl2['prd'] = 'https://node1.irys.xyz,https://node2.irys.xyz'; + BundlrUrl2['dev'] = 'https://devnet.irys.xyz'; + })((BundlrUrl = Constants2.BundlrUrl || (Constants2.BundlrUrl = {}))); let DasApiUrl; ((DasApiUrl2) => { - DasApiUrl2["dev"] = "https://devnet.helius-rpc.com/?api-key=15319bf4-5b40-4958-ac8d-6313aa55eb92,https://rpc-devnet.helius.xyz?api-key=9f70a843-3274-4ffd-a0a9-323f8b7c0639"; - })(DasApiUrl = Constants2.DasApiUrl || (Constants2.DasApiUrl = {})); + DasApiUrl2['dev'] = + 'https://devnet.helius-rpc.com/?api-key=15319bf4-5b40-4958-ac8d-6313aa55eb92,https://rpc-devnet.helius.xyz?api-key=9f70a843-3274-4ffd-a0a9-323f8b7c0639'; + })((DasApiUrl = Constants2.DasApiUrl || (Constants2.DasApiUrl = {}))); let NftstorageApiKey; ((NftstorageApiKey2) => { - NftstorageApiKey2["dev"] = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJkaWQ6ZXRocjoweERGMjcyN2VkODZhRGU1RTMyZDZDZEJlODc0YzRFNDlEODY1OWZmOEMiLCJpc3MiOiJuZnQtc3RvcmFnZSIsImlhdCI6MTYyMDI2NDk0MzcwNiwibmFtZSI6ImRlbW8ifQ.d4J70mikxRB8a5vwNu6SO5HDA8JaueuseAj7Q_ytMCE"; - })(NftstorageApiKey = Constants2.NftstorageApiKey || (Constants2.NftstorageApiKey = {})); + NftstorageApiKey2['dev'] = + 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJkaWQ6ZXRocjoweERGMjcyN2VkODZhRGU1RTMyZDZDZEJlODc0YzRFNDlEODY1OWZmOEMiLCJpc3MiOiJuZnQtc3RvcmFnZSIsImlhdCI6MTYyMDI2NDk0MzcwNiwibmFtZSI6ImRlbW8ifQ.d4J70mikxRB8a5vwNu6SO5HDA8JaueuseAj7Q_ytMCE'; + })( + (NftstorageApiKey = + Constants2.NftstorageApiKey || (Constants2.NftstorageApiKey = {})), + ); Constants2.loadConfig = async () => { - Config = await import("@solana-suite/config/load"); + Config = await import('@solana-suite/config/load'); }; Constants2.switchCluster = (param) => { const { cluster: env, customClusterUrl: customClusterUrl2 } = param; @@ -89,42 +97,46 @@ var Constants; return customClusterUrl2[index]; } switch (env) { - case "mainnet-beta" /* prd */: - return "https://api.mainnet-beta.solana.com" /* prd */; - case "mainnet-beta-metaplex" /* prdMetaplex */: - return "https://api.metaplex.solana.com" /* prdMetaplex */; - case "testnet" /* test */: - return "https://api.testnet.solana.com" /* test */; - case "devnet" /* dev */: - return "https://api.devnet.solana.com" /* dev */; + case 'mainnet-beta' /* prd */: + return 'https://api.mainnet-beta.solana.com' /* prd */; + case 'mainnet-beta-metaplex' /* prdMetaplex */: + return 'https://api.metaplex.solana.com' /* prdMetaplex */; + case 'testnet' /* test */: + return 'https://api.testnet.solana.com' /* test */; + case 'devnet' /* dev */: + return 'https://api.devnet.solana.com' /* dev */; default: - return "http://api.devnet.solana.com" /* localhost */; + return 'http://api.devnet.solana.com' /* localhost */; } }; Constants2.switchBundlr = (env) => { switch (env) { - case "mainnet-beta" /* prd */: { - const urls = "https://node1.irys.xyz,https://node2.irys.xyz" /* prd */.split(","); + case 'mainnet-beta' /* prd */: { + const urls = 'https://node1.irys.xyz,https://node2.irys.xyz' /* prd */ + .split(','); const index = Date.now() % urls.length; return urls[index]; } default: { - return "https://devnet.irys.xyz" /* dev */; + return 'https://devnet.irys.xyz' /* dev */; } } }; Constants2.switchDasApi = (env) => { switch (env) { - case "mainnet-beta" /* prd */: { + case 'mainnet-beta' /* prd */: { if (Constants2.dasApiUrl.length < 1) { throw Error(Constants2.WarnningMessage.DAS_API_URL); } - const urls = "https://node1.irys.xyz,https://node2.irys.xyz" /* prd */.split(","); + const urls = 'https://node1.irys.xyz,https://node2.irys.xyz' /* prd */ + .split(','); const index = Date.now() % urls.length; return urls[index]; } default: { - const urls = "https://devnet.helius-rpc.com/?api-key=15319bf4-5b40-4958-ac8d-6313aa55eb92,https://rpc-devnet.helius.xyz?api-key=9f70a843-3274-4ffd-a0a9-323f8b7c0639" /* dev */.split(","); + const urls = + 'https://devnet.helius-rpc.com/?api-key=15319bf4-5b40-4958-ac8d-6313aa55eb92,https://rpc-devnet.helius.xyz?api-key=9f70a843-3274-4ffd-a0a9-323f8b7c0639' /* dev */ + .split(','); const index = Date.now() % urls.length; return urls[index]; } @@ -132,64 +144,68 @@ var Constants; }; Constants2.switchNftStorage = (env) => { switch (env) { - case "mainnet-beta" /* prd */: + case 'mainnet-beta' /* prd */: if (!Constants2.nftStorageApiKey) { throw Error(Constants2.WarnningMessage.NFT_STORAGE_API_KEY); } return Constants2.nftStorageApiKey; default: { - return "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJkaWQ6ZXRocjoweERGMjcyN2VkODZhRGU1RTMyZDZDZEJlODc0YzRFNDlEODY1OWZmOEMiLCJpc3MiOiJuZnQtc3RvcmFnZSIsImlhdCI6MTYyMDI2NDk0MzcwNiwibmFtZSI6ImRlbW8ifQ.d4J70mikxRB8a5vwNu6SO5HDA8JaueuseAj7Q_ytMCE" /* dev */; + return 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJkaWQ6ZXRocjoweERGMjcyN2VkODZhRGU1RTMyZDZDZEJlODc0YzRFNDlEODY1OWZmOEMiLCJpc3MiOiJuZnQtc3RvcmFnZSIsImlhdCI6MTYyMDI2NDk0MzcwNiwibmFtZSI6ImRlbW8ifQ.d4J70mikxRB8a5vwNu6SO5HDA8JaueuseAj7Q_ytMCE' /* dev */; } } }; Constants2.WRAPPED_TOKEN_PROGRAM_ID = new PublicKey( - "So11111111111111111111111111111111111111112" + 'So11111111111111111111111111111111111111112', ); Constants2.MEMO_PROGRAM_ID = new PublicKey( - "Memo1UhkJRfHyvLMcVucJwxXeuD728EqVDDwQDxFMNo" + 'Memo1UhkJRfHyvLMcVucJwxXeuD728EqVDDwQDxFMNo', ); Constants2.METAPLEX_PROGRAM_ID = new PublicKey( - "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s" + 'metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s', + ); + Constants2.COMMITMENT = 'confirmed'; + Constants2.NFT_STORAGE_GATEWAY_URL = 'https://ipfs.io/ipfs'; + Constants2.IRYS_GATEWAY_URL = 'https://gateway.irys.xyz'; + Constants2.BUNDLR_NETWORK_URL = (0, Constants2.switchBundlr)( + Config.cluster.type, ); - Constants2.COMMITMENT = "confirmed"; - Constants2.NFT_STORAGE_GATEWAY_URL = "https://ipfs.io/ipfs"; - Constants2.IRYS_GATEWAY_URL = "https://gateway.irys.xyz"; - Constants2.BUNDLR_NETWORK_URL = (0, Constants2.switchBundlr)(Config.cluster.type); Constants2.DAS_API_URL = (0, Constants2.switchDasApi)(Config.cluster.type); - Constants2.NFT_STORAGE_API_KEY = (0, Constants2.switchNftStorage)(Config.cluster.type); - Constants2.EXPLORER_SOLSCAN_URL = "https://solscan.io"; - Constants2.EXPLORER_SOLANAFM_URL = "https://solana.fm"; - Constants2.EXPLORER_XRAY_URL = "https://xray.helius.xyz"; + Constants2.NFT_STORAGE_API_KEY = (0, Constants2.switchNftStorage)( + Config.cluster.type, + ); + Constants2.EXPLORER_SOLSCAN_URL = 'https://solscan.io'; + Constants2.EXPLORER_SOLANAFM_URL = 'https://solana.fm'; + Constants2.EXPLORER_XRAY_URL = 'https://xray.helius.xyz'; })(Constants || (Constants = {})); console.log(Constants.WarnningMessage.ANNOUNCE); // ../transaction-builder/src/batch.ts import { sendAndConfirmTransaction as sendAndConfirmTransaction2, - Transaction as Transaction2 -} from "@solana/web3.js"; + Transaction as Transaction2, +} from '@solana/web3.js'; // ../node/src/index.ts -import { Connection } from "@solana/web3.js"; +import { Connection } from '@solana/web3.js'; var Node; ((Node2) => { const setted = { - clusterUrl: "", + clusterUrl: '', commitment: Constants.COMMITMENT, - customClusterUrl: [] + customClusterUrl: [], }; Node2.getConnection = () => { if (setted.customClusterUrl.length > 0) { setted.clusterUrl = Constants.switchCluster({ - customClusterUrl: setted.customClusterUrl + customClusterUrl: setted.customClusterUrl, }); } else if (Constants.customClusterUrl.length > 0) { setted.clusterUrl = Constants.switchCluster({ - customClusterUrl: Constants.customClusterUrl + customClusterUrl: Constants.customClusterUrl, }); } else if (!setted.clusterUrl) { setted.clusterUrl = Constants.switchCluster({ - cluster: Constants.currentCluster + cluster: Constants.currentCluster, }); } if (!setted.commitment) { @@ -198,47 +214,47 @@ var Node; return new Connection(setted.clusterUrl, setted.commitment); }; Node2.changeConnection = (param) => { - setted.clusterUrl = ""; + setted.clusterUrl = ''; setted.customClusterUrl = []; setted.commitment = Constants.COMMITMENT; const { cluster, commitment, customClusterUrl } = param; if (commitment) { setted.commitment = commitment; - debugLog("# Node change commitment: ", setted.commitment); + debugLog('# Node change commitment: ', setted.commitment); } if (cluster) { setted.clusterUrl = Constants.switchCluster({ cluster }); - debugLog("# Node change clusterUrl: ", setted.clusterUrl); + debugLog('# Node change clusterUrl: ', setted.clusterUrl); } if (customClusterUrl) { - debugLog("# customClusterUrl: ", customClusterUrl); + debugLog('# customClusterUrl: ', customClusterUrl); setted.clusterUrl = Constants.switchCluster({ customClusterUrl }); setted.customClusterUrl = customClusterUrl; debugLog( - "# Node change cluster, custom cluster url: ", - setted.clusterUrl + '# Node change cluster, custom cluster url: ', + setted.clusterUrl, ); } }; Node2.confirmedSig = async (signature, commitment = Constants.COMMITMENT) => { const connection = Node2.getConnection(); const latestBlockhash = await connection.getLatestBlockhash(); - return await connection.confirmTransaction( - { - blockhash: latestBlockhash.blockhash, - lastValidBlockHeight: latestBlockhash.lastValidBlockHeight, - signature - }, - commitment - ).then(Result.ok).catch(Result.err); + return await connection + .confirmTransaction( + { + blockhash: latestBlockhash.blockhash, + lastValidBlockHeight: latestBlockhash.lastValidBlockHeight, + signature, + }, + commitment, + ) + .then(Result.ok) + .catch(Result.err); }; })(Node || (Node = {})); // ../transaction-builder/src/common.ts -import { - sendAndConfirmTransaction, - Transaction -} from "@solana/web3.js"; +import { sendAndConfirmTransaction, Transaction } from '@solana/web3.js'; var MAX_RETRIES = 3; var TransactionBuilder; ((TransactionBuilder7) => { @@ -257,7 +273,7 @@ var TransactionBuilder; submit = async () => { return Try(async () => { if (!(this instanceof Common2)) { - throw Error("only Instruction object that can use this"); + throw Error('only Instruction object that can use this'); } const transaction = new Transaction(); const blockhashObj = await Node.getConnection().getLatestBlockhash(); @@ -270,13 +286,13 @@ var TransactionBuilder; } this.instructions.forEach((inst) => transaction.add(inst)); const options = { - maxRetries: MAX_RETRIES + maxRetries: MAX_RETRIES, }; return await sendAndConfirmTransaction( Node.getConnection(), transaction, finalSigners, - options + options, ); }); }; @@ -295,7 +311,7 @@ var TransactionBuilder2; if (!a.instructions && !a.signers) { throw Error( `only Instruction object that can use batchSubmit(). - Index: ${i}, Set value: ${JSON.stringify(a)}` + Index: ${i}, Set value: ${JSON.stringify(a)}`, ); } i++; @@ -315,13 +331,13 @@ var TransactionBuilder2; } instructions.map((inst) => transaction.add(inst)); const options = { - maxRetries: MAX_RETRIES + maxRetries: MAX_RETRIES, }; return await sendAndConfirmTransaction2( Node.getConnection(), transaction, finalSigners, - options + options, ); }); }; @@ -332,8 +348,8 @@ var TransactionBuilder2; // ../transaction-builder/src/mint.ts import { sendAndConfirmTransaction as sendAndConfirmTransaction3, - Transaction as Transaction3 -} from "@solana/web3.js"; + Transaction as Transaction3, +} from '@solana/web3.js'; var TransactionBuilder3; ((TransactionBuilder7) => { class Mint { @@ -350,7 +366,7 @@ var TransactionBuilder3; submit = async () => { return Try(async () => { if (!(this instanceof Mint)) { - throw Error("only MintInstruction object that can use this"); + throw Error('only MintInstruction object that can use this'); } const transaction = new Transaction3(); const blockhashObj = await Node.getConnection().getLatestBlockhash(); @@ -363,17 +379,17 @@ var TransactionBuilder3; } this.instructions.forEach((inst) => transaction.add(inst)); const options = { - maxRetries: MAX_RETRIES + maxRetries: MAX_RETRIES, }; if (Node.getConnection().rpcEndpoint === Constants.EndPointUrl.prd) { - debugLog("# Change metaplex cluster on mainnet-beta"); + debugLog('# Change metaplex cluster on mainnet-beta'); Node.changeConnection({ cluster: Constants.Cluster.prdMetaplex }); } return await sendAndConfirmTransaction3( Node.getConnection(), transaction, finalSigners, - options + options, ); }); }; @@ -382,9 +398,7 @@ var TransactionBuilder3; })(TransactionBuilder3 || (TransactionBuilder3 = {})); // ../transaction-builder/src/partial-sign.ts -import { - Transaction as Transaction4 -} from "@solana/web3.js"; +import { Transaction as Transaction4 } from '@solana/web3.js'; var TransactionBuilder4; ((TransactionBuilder7) => { class PartialSign { @@ -399,18 +413,18 @@ var TransactionBuilder4; submit = async (feePayer) => { return Try(async () => { if (!(this instanceof PartialSign)) { - throw Error("only PartialSignInstruction object that can use this"); + throw Error('only PartialSignInstruction object that can use this'); } - const decode = Buffer.from(this.hexInstruction, "hex"); + const decode = Buffer.from(this.hexInstruction, 'hex'); const transactionFromJson = Transaction4.from(decode); transactionFromJson.partialSign(feePayer.toKeypair()); const options = { - maxRetries: MAX_RETRIES + maxRetries: MAX_RETRIES, }; const wireTransaction = transactionFromJson.serialize(); return await Node.getConnection().sendRawTransaction( wireTransaction, - options + options, ); }); }; @@ -424,7 +438,7 @@ var TransactionBuilder5; const LOW_VALUE = 127; const HIGH_VALUE = 16383; const MAX_TRANSACTION_SIZE = 1232; - const compactHeader = (n) => n <= LOW_VALUE ? 1 : n <= HIGH_VALUE ? 2 : 3; + const compactHeader = (n) => (n <= LOW_VALUE ? 1 : n <= HIGH_VALUE ? 2 : 3); const compactArraySize = (n, size) => compactHeader(n) + n * size; TransactionBuilder7.calculateTxSize = (transaction, feePayer) => { const feePayerPk = [feePayer.toBase58()]; @@ -433,34 +447,46 @@ var TransactionBuilder5; const ixsSize = transaction.instructions.reduce((acc, ix) => { ix.keys.forEach(({ pubkey, isSigner }) => { const pk = pubkey.toBase58(); - if (isSigner) - signers.add(pk); + if (isSigner) signers.add(pk); accounts.add(pk); }); accounts.add(ix.programId.toBase58()); const nIndexes = ix.keys.length; const opaqueData = ix.data.length; - return acc + 1 + // PID index - compactArraySize(nIndexes, 1) + compactArraySize(opaqueData, 1); + return ( + acc + + 1 + // PID index + compactArraySize(nIndexes, 1) + + compactArraySize(opaqueData, 1) + ); }, 0); - return compactArraySize(signers.size, 64) + // signatures - 3 + // header - compactArraySize(accounts.size, 32) + // accounts - 32 + // blockhash - compactHeader(transaction.instructions.length) + // instructions - ixsSize; + return ( + compactArraySize(signers.size, 64) + // signatures + 3 + // header + compactArraySize(accounts.size, 32) + // accounts + 32 + // blockhash + compactHeader(transaction.instructions.length) + // instructions + ixsSize + ); }; TransactionBuilder7.isOverTransactionSize = (transaction, feePayer) => { - return (0, TransactionBuilder7.calculateTxSize)(transaction, feePayer) > MAX_TRANSACTION_SIZE; + return ( + (0, TransactionBuilder7.calculateTxSize)(transaction, feePayer) > + MAX_TRANSACTION_SIZE + ); }; })(TransactionBuilder5 || (TransactionBuilder5 = {})); // ../global/src/index.ts -import { Keypair as Keypair3, LAMPORTS_PER_SOL, PublicKey as PublicKey4 } from "@solana/web3.js"; +import { + Keypair as Keypair3, + LAMPORTS_PER_SOL, + PublicKey as PublicKey4, +} from '@solana/web3.js'; // ../account/src/keypair.ts -import { Keypair as Original, PublicKey as PublicKey2 } from "@solana/web3.js"; -import bs from "bs58"; +import { Keypair as Original, PublicKey as PublicKey2 } from '@solana/web3.js'; +import bs from 'bs58'; var Account; ((Account4) => { class Keypair4 { @@ -488,13 +514,13 @@ var Account; const keypair = Original.generate(); return new Keypair4({ pubkey: keypair.publicKey.toString(), - secret: bs.encode(keypair.secretKey) + secret: bs.encode(keypair.secretKey), }); }; static toKeyPair = (keypair) => { return new Keypair4({ pubkey: keypair.publicKey.toString(), - secret: bs.encode(keypair.secretKey) + secret: bs.encode(keypair.secretKey), }); }; } @@ -502,10 +528,10 @@ var Account; })(Account || (Account = {})); // ../account/src/pda.ts -import { PublicKey as PublicKey3 } from "@solana/web3.js"; -import { PROGRAM_ID } from "@metaplex-foundation/mpl-token-metadata"; -import { MPL_BUBBLEGUM_PROGRAM_ID } from "@metaplex-foundation/mpl-bubblegum"; -import BN from "bn.js"; +import { PublicKey as PublicKey3 } from '@solana/web3.js'; +import { PROGRAM_ID } from '@metaplex-foundation/mpl-token-metadata'; +import { MPL_BUBBLEGUM_PROGRAM_ID } from '@metaplex-foundation/mpl-bubblegum'; +import BN from 'bn.js'; var Account2; ((Account4) => { let Pda; @@ -513,37 +539,37 @@ var Account2; Pda2.getMetadata = (address) => { const [publicKey] = PublicKey3.findProgramAddressSync( [ - Buffer.from("metadata"), + Buffer.from('metadata'), PROGRAM_ID.toBuffer(), - address.toPublicKey().toBuffer() + address.toPublicKey().toBuffer(), ], - PROGRAM_ID + PROGRAM_ID, ); return publicKey; }; Pda2.getMasterEdition = (address) => { const [publicKey] = PublicKey3.findProgramAddressSync( [ - Buffer.from("metadata"), + Buffer.from('metadata'), PROGRAM_ID.toBuffer(), address.toPublicKey().toBuffer(), - Buffer.from("edition") + Buffer.from('edition'), ], - PROGRAM_ID + PROGRAM_ID, ); return publicKey; }; Pda2.getTreeAuthority = (address) => { const [publicKey] = PublicKey3.findProgramAddressSync( [address.toPublicKey().toBuffer()], - MPL_BUBBLEGUM_PROGRAM_ID.toPublicKey() + MPL_BUBBLEGUM_PROGRAM_ID.toPublicKey(), ); return publicKey; }; Pda2.getBgumSigner = () => { const [publicKey] = PublicKey3.findProgramAddressSync( - [Buffer.from("collection_cpi", "utf8")], - MPL_BUBBLEGUM_PROGRAM_ID.toPublicKey() + [Buffer.from('collection_cpi', 'utf8')], + MPL_BUBBLEGUM_PROGRAM_ID.toPublicKey(), ); return publicKey; }; @@ -551,30 +577,33 @@ var Account2; const node = new BN.BN(leafIndex); const [assetId] = PublicKey3.findProgramAddressSync( [ - Buffer.from("asset", "utf8"), + Buffer.from('asset', 'utf8'), address.toPublicKey().toBuffer(), - Uint8Array.from(node.toArray("le", 8)) + Uint8Array.from(node.toArray('le', 8)), ], - MPL_BUBBLEGUM_PROGRAM_ID.toPublicKey() + MPL_BUBBLEGUM_PROGRAM_ID.toPublicKey(), ); return assetId.toString(); }; - })(Pda = Account4.Pda || (Account4.Pda = {})); + })((Pda = Account4.Pda || (Account4.Pda = {}))); })(Account2 || (Account2 = {})); // ../account/src/index.ts var Account3 = { ...Account, - ...Account2 + ...Account2, }; // ../global/src/index.ts -import { BigNumber } from "bignumber.js"; -import bs2 from "bs58"; -String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, options = {}) { +import { BigNumber } from 'bignumber.js'; +import bs2 from 'bs58'; +String.prototype.toExplorerUrl = function ( + explorer = 'solscan' /* Solscan */, + options = {}, +) { const endPointUrl = Node.getConnection().rpcEndpoint; - debugLog("# toExplorerUrl rpcEndpoint:", endPointUrl); - let cluster = ""; + debugLog('# toExplorerUrl rpcEndpoint:', endPointUrl); + let cluster = ''; if (endPointUrl === Constants.EndPointUrl.prd) { cluster = Constants.Cluster.prd; } else if (endPointUrl === Constants.EndPointUrl.test) { @@ -585,11 +614,11 @@ String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, op cluster = Constants.Cluster.dev; } const addressOrSignature = this.toString(); - let url = ""; + let url = ''; if (options.replacePath) { - if (explorer === "solanafm" /* SolanaFM */) { + if (explorer === 'solanafm' /* SolanaFM */) { url = `${Constants.EXPLORER_SOLANAFM_URL}/${options.replacePath}/${addressOrSignature}?cluster=${cluster}`; - } else if (explorer === "xray" /* Xray */) { + } else if (explorer === 'xray' /* Xray */) { url = `${Constants.EXPLORER_XRAY_URL}/${options.replacePath}/${addressOrSignature}?network=${cluster}`; } else { url = `${Constants.EXPLORER_SOLSCAN_URL}/${options.replacePath}/${addressOrSignature}?cluster=${cluster}`; @@ -597,17 +626,17 @@ String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, op return url; } if (Account3.Keypair.isPubkey(addressOrSignature)) { - if (explorer === "solanafm" /* SolanaFM */) { + if (explorer === 'solanafm' /* SolanaFM */) { url = `${Constants.EXPLORER_SOLANAFM_URL}/address/${addressOrSignature}?cluster=${cluster}`; - } else if (explorer === "xray" /* Xray */) { + } else if (explorer === 'xray' /* Xray */) { url = `${Constants.EXPLORER_XRAY_URL}/account/${addressOrSignature}?network=${cluster}`; } else { url = `${Constants.EXPLORER_SOLSCAN_URL}/account/${addressOrSignature}?cluster=${cluster}`; } } else { - if (explorer === "solanafm" /* SolanaFM */) { + if (explorer === 'solanafm' /* SolanaFM */) { url = `${Constants.EXPLORER_SOLANAFM_URL}/tx/${addressOrSignature}?cluster=${cluster}`; - } else if (explorer === "xray" /* Xray */) { + } else if (explorer === 'xray' /* Xray */) { url = `${Constants.EXPLORER_XRAY_URL}/tx/${addressOrSignature}?network=${cluster}`; } else { url = `${Constants.EXPLORER_SOLSCAN_URL}/tx/${addressOrSignature}?cluster=${cluster}`; @@ -615,23 +644,23 @@ String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, op } return url; }; -String.prototype.toPublicKey = function() { +String.prototype.toPublicKey = function () { if (!Account3.Keypair.isPubkey(this.toString())) { throw Error(`No match KeyPair.PubKey: ${this.toString()}`); } return new PublicKey4(this.toString()); }; -String.prototype.toKeypair = function() { +String.prototype.toKeypair = function () { if (!Account3.Keypair.isSecret(this.toString())) { throw Error(`No match KeyPair.Secret: ${this.toString()}`); } const decoded = bs2.decode(this.toString()); return Keypair3.fromSecretKey(decoded); }; -Number.prototype.toSol = function() { +Number.prototype.toSol = function () { return BigNumber(this).div(LAMPORTS_PER_SOL).toNumber(); }; -Number.prototype.toLamports = function() { +Number.prototype.toLamports = function () { return BigNumber(this).times(LAMPORTS_PER_SOL).toNumber(); }; @@ -641,7 +670,7 @@ var TransactionBuilder6 = { ...TransactionBuilder5, ...TransactionBuilder3, ...TransactionBuilder, - ...TransactionBuilder4 + ...TransactionBuilder4, }; // ../suite-utils/src/shared.ts @@ -653,16 +682,20 @@ var overwriteObject = (object, targets) => { }); return that; }; -var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { - if (Constants.isDebugging === "true" || process.env.DEBUG === "true") { - console.log("[DEBUG]", data1, data2, data3, data4); +var debugLog = (data1, data2 = '', data3 = '', data4 = '') => { + if (Constants.isDebugging === 'true' || process.env.DEBUG === 'true') { + console.log('[DEBUG]', data1, data2, data3, data4); } }; var sleep = async (sec) => { return new Promise((r) => setTimeout(r, sec * 1e3)); }; var isPromise = (obj) => { - return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; + return ( + !!obj && + (typeof obj === 'object' || typeof obj === 'function') && + typeof obj.then === 'function' + ); }; function Try(input, finallyInput) { try { @@ -670,7 +703,7 @@ function Try(input, finallyInput) { if (isPromise(v)) { return v.then( (x) => Result.ok(x), - (err) => Result.err(err) + (err) => Result.err(err), ); } else { return Result.ok(v); @@ -682,7 +715,7 @@ function Try(input, finallyInput) { return Result.err(Error(e)); } finally { if (finallyInput) { - debugLog("# finally input:", finallyInput); + debugLog('# finally input:', finallyInput); finallyInput(); } } @@ -699,7 +732,7 @@ var AbstractResult = class { unwrap(ok, err) { const r = this._chain( (value) => Result.ok(ok ? ok(value) : value), - (error) => err ? Result.ok(err(error)) : Result.err(error) + (error) => (err ? Result.ok(err(error)) : Result.err(error)), ); if (r.isErr) { throw r.error; @@ -709,7 +742,7 @@ var AbstractResult = class { map(ok, err) { return this._chain( (value) => Result.ok(ok(value)), - (error) => Result.err(err ? err(error) : error) + (error) => Result.err(err ? err(error) : error), ); } chain(ok, err) { @@ -718,7 +751,7 @@ var AbstractResult = class { match(ok, err) { this._chain( (value) => Result.ok(ok(value)), - (error) => Result.err(err(error)) + (error) => Result.err(err(error)), ); } /// single TransactionBuilder //// @@ -726,7 +759,7 @@ var AbstractResult = class { async submit(feePayer) { const res = this.map( async (ok) => { - debugLog("# result single submit: ", ok); + debugLog('# result single submit: ', ok); if (feePayer) { const obj = ok; return await obj.submit(feePayer); @@ -737,7 +770,7 @@ var AbstractResult = class { }, (err) => { return err; - } + }, ); if (res.isErr) { return Result.err(res.error); @@ -745,21 +778,21 @@ var AbstractResult = class { return res.value; } }; -Array.prototype.submit = async function(feePayer) { +Array.prototype.submit = async function (feePayer) { if (feePayer) { let i = 1; for await (const obj of this) { if (obj.isErr) { return obj; } else if (obj.value.canSubmit) { - debugLog("# Result batch canSubmit"); + debugLog('# Result batch canSubmit'); const sig = await obj.submit(feePayer); if (sig.isErr) { return sig; } await Node.confirmedSig(sig.value); } else { - debugLog("# Result batch other than canSubmit"); + debugLog('# Result batch other than canSubmit'); if (this.length == i) { return obj.submit(feePayer); } @@ -775,10 +808,10 @@ Array.prototype.submit = async function(feePayer) { } else if (obj.isOk) { instructions.push(obj.value); } else { - return Result.err(Error("Only Array Instruction object")); + return Result.err(Error('Only Array Instruction object')); } } - debugLog("# Result batch submit: ", instructions); + debugLog('# Result batch submit: ', instructions); return new TransactionBuilder6.Batch().submit(instructions); } }; @@ -851,7 +884,7 @@ var Converter; } return { key: input.toPublicKey(), - verified: false + verified: false, }; }; Collection2.intoUser = (output) => { @@ -860,21 +893,24 @@ var Converter; } return { address: output.key.toString(), - verified: output.verified + verified: output.verified, }; }; - })(Collection = Converter15.Collection || (Converter15.Collection = {})); + })((Collection = Converter15.Collection || (Converter15.Collection = {}))); let CollectionMint; ((CollectionMint2) => { CollectionMint2.intoUser = (output) => { const res = output.find((value) => { - if (value.group_key === "collection") { + if (value.group_key === 'collection') { return value.group_value; } }); - return res ? res.group_value : ""; + return res ? res.group_value : ''; }; - })(CollectionMint = Converter15.CollectionMint || (Converter15.CollectionMint = {})); + })( + (CollectionMint = + Converter15.CollectionMint || (Converter15.CollectionMint = {})), + ); })(Converter || (Converter = {})); // ../converter/src/creators.ts @@ -890,7 +926,7 @@ var Converter2; return { address: data.address.toPublicKey(), share: data.share, - verified: false + verified: false, }; }); }; @@ -902,7 +938,7 @@ var Converter2; return { address: data.address.toPublicKey(), share: data.share, - verified: false + verified: false, }; }); }; @@ -914,18 +950,15 @@ var Converter2; return { address: data.address.toString(), share: data.share, - verified: data.verified + verified: data.verified, }; }); }; - })(Creators = Converter15.Creators || (Converter15.Creators = {})); + })((Creators = Converter15.Creators || (Converter15.Creators = {}))); })(Converter2 || (Converter2 = {})); // ../converter/src/compressed-nft-metadata.ts -import { - TokenProgramVersion, - TokenStandard -} from "mpl-bubblegum-instruction"; +import { TokenProgramVersion, TokenStandard } from 'mpl-bubblegum-instruction'; var Converter3; ((Converter15) => { let CompressedNftMetadata; @@ -943,10 +976,14 @@ var Converter3; isMutable: input.isMutable ?? false, editionNonce: 0, tokenStandard: TokenStandard.NonFungible, - tokenProgramVersion: TokenProgramVersion.Original + tokenProgramVersion: TokenProgramVersion.Original, }; }; - })(CompressedNftMetadata = Converter15.CompressedNftMetadata || (Converter15.CompressedNftMetadata = {})); + })( + (CompressedNftMetadata = + Converter15.CompressedNftMetadata || + (Converter15.CompressedNftMetadata = {})), + ); })(Converter3 || (Converter3 = {})); // ../converter/src/royalty.ts @@ -961,7 +998,7 @@ var Converter4; Royalty2.intoUser = (percentage) => { return percentage * Royalty2.THRESHOLD; }; - })(Royalty = Converter15.Royalty || (Converter15.Royalty = {})); + })((Royalty = Converter15.Royalty || (Converter15.Royalty = {}))); })(Converter4 || (Converter4 = {})); // ../converter/src/nft.ts @@ -973,7 +1010,7 @@ var Converter5; return { mint: output.onchain.id.toString(), collectionMint: Converter.CollectionMint.intoUser( - output.onchain.grouping + output.onchain.grouping, ), authorities: output.onchain.authorities, royalty: Converter4.Royalty.intoUser(output.onchain.royalty.percent), @@ -988,10 +1025,10 @@ var Converter5; editionNonce: output.onchain.supply.edition_nonce, primarySaleHappened: output.onchain.royalty.primary_sale_happened, dateTime: convertTimestampToDateTime(output.offchain.created_at), - offchain: output.offchain + offchain: output.offchain, }; }; - })(Nft = Converter15.Nft || (Converter15.Nft = {})); + })((Nft = Converter15.Nft || (Converter15.Nft = {}))); })(Converter5 || (Converter5 = {})); // ../converter/src/memo.ts @@ -999,15 +1036,20 @@ var Converter6; ((Converter15) => { let Memo; ((Memo2) => { - Memo2.intoUserSide = (output, meta, outputTransfer, mappingTokenAccount) => { + Memo2.intoUserSide = ( + output, + meta, + outputTransfer, + mappingTokenAccount, + ) => { const history = {}; - if (outputTransfer && outputTransfer.program !== "") { - if (mappingTokenAccount && outputTransfer.program === "spl-token") { + if (outputTransfer && outputTransfer.program !== '') { + if (mappingTokenAccount && outputTransfer.program === 'spl-token') { const foundSource = mappingTokenAccount.find( - (m) => m.account === outputTransfer.parsed.info.source + (m) => m.account === outputTransfer.parsed.info.source, ); const foundDest = mappingTokenAccount.find( - (m) => m.account === outputTransfer.parsed.info.destination + (m) => m.account === outputTransfer.parsed.info.destination, ); history.mint = outputTransfer.parsed.info.mint; foundSource && (history.source = foundSource.owner); @@ -1022,12 +1064,15 @@ var Converter6; history.dateTime = convertTimestampToDateTime(meta.blockTime); history.sig = meta.transaction.signatures[0]; history.innerInstruction = false; - if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { + if ( + meta.meta?.innerInstructions && + meta.meta?.innerInstructions.length !== 0 + ) { history.innerInstruction = true; } return history; }; - })(Memo = Converter15.Memo || (Converter15.Memo = {})); + })((Memo = Converter15.Memo || (Converter15.Memo = {}))); })(Converter6 || (Converter6 = {})); // ../converter/src/mint.ts @@ -1045,12 +1090,15 @@ var Converter7; history.dateTime = convertTimestampToDateTime(meta.blockTime); history.sig = meta.transaction.signatures[0]; history.innerInstruction = false; - if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { + if ( + meta.meta?.innerInstructions && + meta.meta?.innerInstructions.length !== 0 + ) { history.innerInstruction = true; } return history; }; - })(Mint = Converter15.Mint || (Converter15.Mint = {})); + })((Mint = Converter15.Mint || (Converter15.Mint = {}))); })(Converter7 || (Converter7 = {})); // ../converter/src/regular-nft-metadata.ts @@ -1066,10 +1114,13 @@ var Converter8; sellerFeeBasisPoints, creators: Converter2.Creators.intoInfra(input.creators), collection: Converter.Collection.intoInfra(input.collection), - uses: input.uses || null + uses: input.uses || null, }; }; - })(RegularNftMetadata = Converter15.RegularNftMetadata || (Converter15.RegularNftMetadata = {})); + })( + (RegularNftMetadata = + Converter15.RegularNftMetadata || (Converter15.RegularNftMetadata = {})), + ); })(Converter8 || (Converter8 = {})); // ../converter/src/properties.ts @@ -1077,7 +1128,12 @@ var Converter9; ((Converter15) => { let Properties; ((Properties2) => { - Properties2.intoInfra = async (input, callbackFunc, storageType, feePayer) => { + Properties2.intoInfra = async ( + input, + callbackFunc, + storageType, + feePayer, + ) => { if (!input || !input.files) { return {}; } @@ -1092,15 +1148,15 @@ var Converter9; } return overwriteObject(file, [ { - existsKey: "filePath", - will: { key: "uri", value: res.value } - } + existsKey: 'filePath', + will: { key: 'uri', value: res.value }, + }, ]); - }) + }), ); return { ...input, files }; }; - })(Properties = Converter15.Properties || (Converter15.Properties = {})); + })((Properties = Converter15.Properties || (Converter15.Properties = {}))); })(Converter9 || (Converter9 = {})); // ../converter/src/uses.ts @@ -1114,7 +1170,7 @@ var Converter10; } return output; }; - })(Uses = Converter15.Uses || (Converter15.Uses = {})); + })((Uses = Converter15.Uses || (Converter15.Uses = {}))); })(Converter10 || (Converter10 = {})); // ../converter/src/token-metadata.ts @@ -1130,7 +1186,7 @@ var Converter11; sellerFeeBasisPoints, creators: Converter2.Creators.intoInfra(input.creators), collection: null, - uses: input.uses || null + uses: input.uses || null, }; }; TokenMetadata2.intoUser = (output, tokenAmount) => { @@ -1138,19 +1194,24 @@ var Converter11; mint: output.onchain.mint.toString(), royalty: output.onchain.data.sellerFeeBasisPoints, name: (0, TokenMetadata2.deleteNullStrings)(output.onchain.data.name), - symbol: (0, TokenMetadata2.deleteNullStrings)(output.onchain.data.symbol), + symbol: (0, TokenMetadata2.deleteNullStrings)( + output.onchain.data.symbol, + ), tokenAmount, uri: (0, TokenMetadata2.deleteNullStrings)(output.onchain.data.uri), creators: Converter2.Creators.intoUser(output.onchain.data.creators), uses: Converter10.Uses.intoUserSide(output.onchain.uses), dateTime: convertTimestampToDateTime(output.offchain.created_at), - offchain: output.offchain + offchain: output.offchain, }; }; TokenMetadata2.deleteNullStrings = (str) => { - return str.replace(/\0/g, ""); + return str.replace(/\0/g, ''); }; - })(TokenMetadata = Converter15.TokenMetadata || (Converter15.TokenMetadata = {})); + })( + (TokenMetadata = + Converter15.TokenMetadata || (Converter15.TokenMetadata = {})), + ); })(Converter11 || (Converter11 = {})); // ../converter/src/transfer-checked.ts @@ -1162,10 +1223,10 @@ var Converter12; const history = {}; if (mappingTokenAccount) { const foundSource = mappingTokenAccount.find( - (m) => m.account === output.parsed.info.source + (m) => m.account === output.parsed.info.source, ); const foundDest = mappingTokenAccount.find( - (m) => m.account === output.parsed.info.destination + (m) => m.account === output.parsed.info.destination, ); foundSource && (history.source = foundSource.owner); foundDest && (history.destination = foundDest.owner); @@ -1178,12 +1239,18 @@ var Converter12; history.dateTime = convertTimestampToDateTime(meta.blockTime); history.sig = meta.transaction.signatures[0]; history.innerInstruction = false; - if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { + if ( + meta.meta?.innerInstructions && + meta.meta?.innerInstructions.length !== 0 + ) { history.innerInstruction = true; } return history; }; - })(TransferChecked = Converter15.TransferChecked || (Converter15.TransferChecked = {})); + })( + (TransferChecked = + Converter15.TransferChecked || (Converter15.TransferChecked = {})), + ); })(Converter12 || (Converter12 = {})); // ../converter/src/transfer.ts @@ -1203,12 +1270,15 @@ var Converter13; history.dateTime = convertTimestampToDateTime(meta.blockTime); history.sig = meta.transaction.signatures[0]; history.innerInstruction = false; - if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { + if ( + meta.meta?.innerInstructions && + meta.meta?.innerInstructions.length !== 0 + ) { history.innerInstruction = true; } return history; }; - })(Transfer = Converter15.Transfer || (Converter15.Transfer = {})); + })((Transfer = Converter15.Transfer || (Converter15.Transfer = {}))); })(Converter13 || (Converter13 = {})); // ../converter/src/index.ts @@ -1225,7 +1295,7 @@ var Converter14 = { ...Converter11, ...Converter12, ...Converter13, - ...Converter10 + ...Converter10, }; // ../validator/src/index.ts @@ -1233,14 +1303,14 @@ var Validator; ((Validator2) => { let Message; ((Message2) => { - Message2.SUCCESS = "success"; - Message2.SMALL_NUMBER = "too small"; - Message2.BIG_NUMBER = "too big"; - Message2.LONG_LENGTH = "too long"; - Message2.EMPTY = "invalid empty value"; - Message2.INVALID_URL = "invalid url"; - Message2.ONLY_NODE_JS = "`string` type is only Node.js"; - })(Message = Validator2.Message || (Validator2.Message = {})); + Message2.SUCCESS = 'success'; + Message2.SMALL_NUMBER = 'too small'; + Message2.BIG_NUMBER = 'too big'; + Message2.LONG_LENGTH = 'too long'; + Message2.EMPTY = 'invalid empty value'; + Message2.INVALID_URL = 'invalid url'; + Message2.ONLY_NODE_JS = '`string` type is only Node.js'; + })((Message = Validator2.Message || (Validator2.Message = {}))); Validator2.NAME_LENGTH = 32; Validator2.SYMBOL_LENGTH = 10; Validator2.URL_LENGTH = 200; @@ -1249,19 +1319,19 @@ var Validator; Validator2.ROYALTY_MIN = 0; Validator2.isRoyalty = (royalty) => { return Try(() => { - const key = "royalty"; + const key = 'royalty'; if (royalty !== 0 && !royalty) { throw createError(key, Message.EMPTY, royalty); } if (royalty < Validator2.ROYALTY_MIN) { throw createError(key, Message.SMALL_NUMBER, royalty, { threshold: Validator2.ROYALTY_MIN, - condition: "underMin" + condition: 'underMin', }); } else if (royalty > Validator2.ROYALTY_MAX) { throw createError(key, Message.BIG_NUMBER, royalty, { threshold: Validator2.ROYALTY_MAX, - condition: "overMax" + condition: 'overMax', }); } return Message.SUCCESS; @@ -1269,19 +1339,22 @@ var Validator; }; Validator2.isSellerFeeBasisPoints = (royalty) => { return Try(() => { - const key = "sellerFeeBasisPoints/seller_fee_basis_points"; + const key = 'sellerFeeBasisPoints/seller_fee_basis_points'; if (royalty !== 0 && !royalty) { throw createError(key, Message.EMPTY, royalty); } if (royalty < Validator2.ROYALTY_MIN) { throw createError(key, Message.SMALL_NUMBER, royalty, { threshold: Validator2.ROYALTY_MIN, - condition: "underMin" + condition: 'underMin', }); - } else if (royalty > Validator2.ROYALTY_MAX * Converter14.Royalty.THRESHOLD) { + } else if ( + royalty > + Validator2.ROYALTY_MAX * Converter14.Royalty.THRESHOLD + ) { throw createError(key, Message.BIG_NUMBER, royalty, { threshold: Validator2.SELLER_FEE_BASIS_POINTS_MAX, - condition: "overMax" + condition: 'overMax', }); } return Message.SUCCESS; @@ -1289,14 +1362,14 @@ var Validator; }; Validator2.isName = (name) => { return Try(() => { - const key = "name"; + const key = 'name'; if (!name) { throw createError(key, Message.EMPTY, name); } if (byteLength(name) > Validator2.NAME_LENGTH) { throw createError(key, Message.LONG_LENGTH, name, { threshold: Validator2.NAME_LENGTH, - condition: "overMax" + condition: 'overMax', }); } return Message.SUCCESS; @@ -1304,20 +1377,20 @@ var Validator; }; Validator2.isSymbol = (symbol) => { return Try(() => { - const key = "symbol"; + const key = 'symbol'; if (!symbol) { throw createError(key, Message.EMPTY, symbol); } if (byteLength(symbol) > Validator2.SYMBOL_LENGTH) { throw createError(key, Message.LONG_LENGTH, symbol, { threshold: Validator2.SYMBOL_LENGTH, - condition: "overMax" + condition: 'overMax', }); } return Message.SUCCESS; }); }; - Validator2.isImageUrl = (image) => isUriOrImage(image, "image"); + Validator2.isImageUrl = (image) => isUriOrImage(image, 'image'); Validator2.checkAll = (metadata) => { return Try(() => { const keys = Object.keys(metadata); @@ -1325,32 +1398,36 @@ var Validator; keys.map((key) => { let res; switch (key) { - case "image": + case 'image': if (key in metadata && metadata.image) { res = (0, Validator2.isImageUrl)(metadata.image); } break; - case "royalty": + case 'royalty': if (key in metadata && metadata.royalty) { res = (0, Validator2.isRoyalty)(metadata.royalty); } break; - case "seller_fee_basis_points": + case 'seller_fee_basis_points': if (key in metadata && metadata.seller_fee_basis_points) { - res = (0, Validator2.isSellerFeeBasisPoints)(metadata.seller_fee_basis_points); + res = (0, Validator2.isSellerFeeBasisPoints)( + metadata.seller_fee_basis_points, + ); } break; - case "sellerFeeBasisPoints": + case 'sellerFeeBasisPoints': if (key in metadata) { - res = (0, Validator2.isSellerFeeBasisPoints)(metadata.sellerFeeBasisPoints); + res = (0, Validator2.isSellerFeeBasisPoints)( + metadata.sellerFeeBasisPoints, + ); } break; - case "name": + case 'name': if (metadata.name) { res = (0, Validator2.isName)(metadata.name); } break; - case "symbol": + case 'symbol': if (metadata.symbol) { res = (0, Validator2.isSymbol)(metadata.symbol); } @@ -1361,7 +1438,8 @@ var Validator; } }); if (results.length > 0) { - const message = "Caught in the validation errors. see information e.g: err.details"; + const message = + 'Caught in the validation errors. see information e.g: err.details'; throw new ValidatorError(message, results); } return Message.SUCCESS; @@ -1388,7 +1466,7 @@ var Validator; if (byteLength(imageOrUri) > Validator2.URL_LENGTH) { throw createError(key, Message.LONG_LENGTH, imageOrUri, { threshold: Validator2.URL_LENGTH, - condition: "overMax" + condition: 'overMax', }); } if (!/https?:\/\/[-_.!~*\\()a-zA-Z0-9;?:&=+,%#]+/g.test(imageOrUri)) { @@ -1416,24 +1494,32 @@ var Signatures; } return res; }; - Signatures2.getForAdress = async (pubkey, parser, callback, options, histories = []) => { + Signatures2.getForAdress = async ( + pubkey, + parser, + callback, + options, + histories = [], + ) => { try { - debugLog("# options: ", options); + debugLog('# options: ', options); const transactions = await Node.getConnection().getSignaturesForAddress( pubkey.toPublicKey(), { - limit: options.narrowDown - } + limit: options.narrowDown, + }, ); - debugLog("# transactions count:", transactions.length); + debugLog('# transactions count:', transactions.length); for (const transaction of transactions) { - parseForTransaction(transaction.signature).then((signature) => { - const history = parser(signature); - if (history) { - histories.push(history); - callback(Result.ok(histories)); - } - }).catch((e) => callback(Result.err(e))); + parseForTransaction(transaction.signature) + .then((signature) => { + const history = parser(signature); + if (history) { + histories.push(history); + callback(Result.ok(histories)); + } + }) + .catch((e) => callback(Result.err(e))); await sleep(options.waitTime); } } catch (e) { @@ -1447,17 +1533,17 @@ var Signatures; // ../types/src/transaction-filter/index.ts var FilterOptions = { Transfer: { - program: ["system", "spl-token"], - action: ["transfer", "transferChecked"] + program: ['system', 'spl-token'], + action: ['transfer', 'transferChecked'], }, Memo: { - program: ["spl-memo"], - action: ["*"] + program: ['spl-memo'], + action: ['*'], }, Mint: { - program: ["spl-token"], - action: ["mintTo", "mintToChecked"] - } + program: ['spl-token'], + action: ['mintTo', 'mintToChecked'], + }, }; // ../transaction-filter/src/transaction-filter.ts @@ -1468,14 +1554,14 @@ var TransactionFilter; if (Object.keys(transaction).length === 0) { return postTokenAccount; } - const accountKeys = transaction.transaction.message.accountKeys.map( - (t) => t.pubkey.toString() + const accountKeys = transaction.transaction.message.accountKeys.map((t) => + t.pubkey.toString(), ); transaction.meta?.postTokenBalances?.forEach((t) => { if (accountKeys[t.accountIndex] && t.owner) { const v = { account: accountKeys[t.accountIndex], - owner: t.owner + owner: t.owner, }; postTokenAccount.push(v); } @@ -1483,13 +1569,16 @@ var TransactionFilter; return postTokenAccount; }; TransactionFilter2.isParsedInstruction = (arg) => { - return arg !== null && typeof arg === "object" && "parsed" in arg; + return arg !== null && typeof arg === 'object' && 'parsed' in arg; }; TransactionFilter2.parse = (filterType, moduleName) => (txMeta) => { let history; - if (filterType === "mint" /* Mint */ && moduleName === "system" /* SolNative */) { + if ( + filterType === 'mint' /* Mint */ && + moduleName === 'system' /* SolNative */ + ) { throw Error( - "This filterType('FilterType.Mint') can not use from SolNative module" + "This filterType('FilterType.Mint') can not use from SolNative module", ); } if (!txMeta || !txMeta.transaction) { @@ -1499,22 +1588,28 @@ var TransactionFilter; txMeta.transaction.message.instructions.forEach((instruction) => { if ((0, TransactionFilter2.isParsedInstruction)(instruction)) { switch (filterType) { - case "memo" /* Memo */: { + case 'memo' /* Memo */: { if (FilterOptions.Memo.program.includes(instruction.program)) { let instructionTransfer; txMeta.transaction.message.instructions.forEach( (instruction2) => { - if ((0, TransactionFilter2.isParsedInstruction)(instruction2) && FilterOptions.Transfer.program.includes( - instruction2.program - )) { + if ( + (0, TransactionFilter2.isParsedInstruction)(instruction2) && + FilterOptions.Transfer.program.includes( + instruction2.program, + ) + ) { instructionTransfer = instruction2; } - } + }, ); - if (instructionTransfer && moduleName !== instructionTransfer["program"]) { + if ( + instructionTransfer && + moduleName !== instructionTransfer['program'] + ) { debugLog( - "# FilterType.Memo break instruction: ", - instructionTransfer + '# FilterType.Memo break instruction: ', + instructionTransfer, ); break; } @@ -1522,45 +1617,47 @@ var TransactionFilter; instruction, txMeta, instructionTransfer, - postTokenAccount + postTokenAccount, ); } break; } - case "only-memo" /* OnlyMemo */: { + case 'only-memo' /* OnlyMemo */: { if (FilterOptions.Memo.program.includes(instruction.program)) { let instructionTransfer; history = Converter14.Memo.intoUserSide( instruction, txMeta, instructionTransfer, - postTokenAccount + postTokenAccount, ); } break; } - case "mint" /* Mint */: { - if (FilterOptions.Mint.program.includes(instruction.program) && FilterOptions.Mint.action.includes( - instruction.parsed.type - )) { + case 'mint' /* Mint */: { + if ( + FilterOptions.Mint.program.includes(instruction.program) && + FilterOptions.Mint.action.includes(instruction.parsed.type) + ) { history = Converter14.Mint.intoUserSide(instruction, txMeta); } break; } - case "transfer" /* Transfer */: - if (moduleName === instruction.program && FilterOptions.Transfer.action.includes( - instruction.parsed.type - )) { - if (instruction.parsed.type === "transferChecked") { + case 'transfer' /* Transfer */: + if ( + moduleName === instruction.program && + FilterOptions.Transfer.action.includes(instruction.parsed.type) + ) { + if (instruction.parsed.type === 'transferChecked') { history = Converter14.TransferChecked.intoUserSide( instruction, txMeta, - postTokenAccount + postTokenAccount, ); } else { history = Converter14.Transfer.intoUserSide( instruction, - txMeta + txMeta, ); } } @@ -1577,12 +1674,12 @@ var SolNative; SolNative6.findByOwner = async (owner) => { return Try(async () => { const res = await Node.getConnection().getParsedAccountInfo( - owner.toPublicKey() + owner.toPublicKey(), ); const info = { sol: 0, lamports: 0, - owner: owner.toString() + owner: owner.toString(), }; if (TransactionFilter.isParsedInstruction(res.value?.data)) { const parsedAccountData = res.value?.data; @@ -1598,7 +1695,7 @@ var SolNative; })(SolNative || (SolNative = {})); // ../suite-sol-native/src/gas-less-transfer.ts -import { SystemProgram, Transaction as Transaction5 } from "@solana/web3.js"; +import { SystemProgram, Transaction as Transaction5 } from '@solana/web3.js'; var SolNative2; ((SolNative6) => { const RADIX = 10; @@ -1609,41 +1706,49 @@ var SolNative2; const tx = new Transaction5({ blockhash: blockHashObj.blockhash, lastValidBlockHeight: blockHashObj.lastValidBlockHeight, - feePayer: feePayer.toPublicKey() + feePayer: feePayer.toPublicKey(), }).add( SystemProgram.transfer({ fromPubkey: ownerPublicKey, toPubkey: dest.toPublicKey(), - lamports: parseInt(`${amount.toLamports()}`, RADIX) - }) + lamports: parseInt(`${amount.toLamports()}`, RADIX), + }), ); tx.partialSign(owner.toKeypair()); const serializedTx = tx.serialize({ - requireAllSignatures: false + requireAllSignatures: false, }); - const hex = serializedTx.toString("hex"); + const hex = serializedTx.toString('hex'); return new TransactionBuilder6.PartialSign(hex); }); }; })(SolNative2 || (SolNative2 = {})); // ../suite-sol-native/src/transfer.ts -import { SystemProgram as SystemProgram2 } from "@solana/web3.js"; +import { SystemProgram as SystemProgram2 } from '@solana/web3.js'; var SolNative3; ((SolNative6) => { const RADIX = 10; - SolNative6.transfer = (owner, dest, ownerOrMultisig, amount, options = {}) => { + SolNative6.transfer = ( + owner, + dest, + ownerOrMultisig, + amount, + options = {}, + ) => { return Try(() => { const inst = SystemProgram2.transfer({ fromPubkey: owner.toPublicKey(), toPubkey: dest.toPublicKey(), - lamports: parseInt(`${amount.toLamports()}`, RADIX) + lamports: parseInt(`${amount.toLamports()}`, RADIX), }); - const payer = options.feePayer ? options.feePayer.toKeypair() : ownerOrMultisig[0].toKeypair(); + const payer = options.feePayer + ? options.feePayer.toKeypair() + : ownerOrMultisig[0].toKeypair(); return new TransactionBuilder6.Common( [inst], ownerOrMultisig.map((s) => s.toKeypair()), - payer + payer, ); }); }; @@ -1654,12 +1759,18 @@ import { createCloseAccountInstruction, createMint, createTransferInstruction, - createWrappedNativeAccount -} from "@solana/spl-token"; + createWrappedNativeAccount, +} from '@solana/spl-token'; var SolNative4; ((SolNative6) => { const RADIX = 10; - SolNative6.transferWithMultisig = async (owner, dest, multisig, amount, options = {}) => { + SolNative6.transferWithMultisig = async ( + owner, + dest, + multisig, + amount, + options = {}, + ) => { return Try(async () => { const connection = Node.getConnection(); const payer = options.feePayer ? options.feePayer : multisig[0]; @@ -1668,29 +1779,29 @@ var SolNative4; connection, payer.toKeypair(), owner.toPublicKey(), - parseInt(`${amount.toLamports()}`, RADIX) + parseInt(`${amount.toLamports()}`, RADIX), ); - debugLog("# wrapped sol: ", wrapped.toBase58()); + debugLog('# wrapped sol: ', wrapped.toBase58()); const instructions = []; const token = await createMint( connection, payer.toKeypair(), owner.toPublicKey(), owner.toPublicKey(), - 0 + 0, ); const sourceToken = await Account3.Associated.retryGetOrCreate( token.toString(), owner, - payer + payer, ); - debugLog("# sourceToken: ", sourceToken); + debugLog('# sourceToken: ', sourceToken); const destToken = await Account3.Associated.retryGetOrCreate( token.toString(), wrapped.toString(), - payer + payer, ); - debugLog("# destToken: ", destToken); + debugLog('# destToken: ', destToken); instructions.push( createTransferInstruction( sourceToken.toPublicKey(), @@ -1698,21 +1809,21 @@ var SolNative4; owner.toPublicKey(), parseInt(`${amount}`, RADIX), // No lamports, its sol - keypairs - ) + keypairs, + ), ); instructions.push( createCloseAccountInstruction( wrapped, dest.toPublicKey(), owner.toPublicKey(), - keypairs - ) + keypairs, + ), ); return new TransactionBuilder6.Common( instructions, multisig.map((s) => s.toKeypair()), - payer.toKeypair() + payer.toKeypair(), ); }); }; @@ -1723,31 +1834,34 @@ var SolNative5 = { ...SolNative, ...SolNative2, ...SolNative3, - ...SolNative4 + ...SolNative4, }; // src/request-sol.ts -var LOCAL_KEYPAIR_FILE = "solana-localhost-devnet-keypair"; +var LOCAL_KEYPAIR_FILE = 'solana-localhost-devnet-keypair'; var requestSol = async (pubkey, sol = 0.1) => { - let bufferStr = ""; + let bufferStr = ''; try { - bufferStr = fs.readFileSync(`./${LOCAL_KEYPAIR_FILE}`, "utf8"); + bufferStr = fs.readFileSync(`./${LOCAL_KEYPAIR_FILE}`, 'utf8'); } catch (_) { - console.log("_"); - bufferStr = fs.readFileSync(`../../${LOCAL_KEYPAIR_FILE}`, "utf8"); + console.log('_'); + bufferStr = fs.readFileSync(`../../${LOCAL_KEYPAIR_FILE}`, 'utf8'); } - console.log("Now load...please wait"); + console.log('Now load...please wait'); const keypair = JSON.parse(bufferStr).feePayer; - const sig = SolNative5.transfer(keypair.pubkey, pubkey, [keypair.secret], sol); + const sig = SolNative5.transfer( + keypair.pubkey, + pubkey, + [keypair.secret], + sol, + ); (await sig.submit()).match( (ok) => { Node.confirmedSig(ok); - console.log("Done transfer"); + console.log('Done transfer'); }, - (err) => assert.fail(err) + (err) => assert.fail(err), ); }; -export { - requestSol -}; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL3JlcXVlc3Qtc29sLnRzIiwgIi4uLy4uL3N1aXRlLXV0aWxzL3NyYy9jb25zdGFudHMudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvYmF0Y2gudHMiLCAiLi4vLi4vbm9kZS9zcmMvaW5kZXgudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY29tbW9uLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL21pbnQudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvcGFydGlhbC1zaWduLnRzIiwgIi4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Chjb25zdCBhIG9mIGFycikge1xuICAgICAgICAgIGlmICghYS5pbnN0cnVjdGlvbnMgJiYgIWEuc2lnbmVycykge1xuICAgICAgICAgICAgdGhyb3cgRXJyb3IoXG4gICAgICAgICAgICAgIGBvbmx5IEluc3RydWN0aW9uIG9iamVjdCB0aGF0IGNhbiB1c2UgYmF0Y2hTdWJtaXQoKS5cbiAgICAgICAgICAgIEluZGV4OiAke2l9LCBTZXQgdmFsdWU6ICR7SlNPTi5zdHJpbmdpZnkoYSl9YCxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIGkrKztcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IGluc3RydWN0aW9ucyA9IGFyci5mbGF0TWFwKChhKSA9PiBhLmluc3RydWN0aW9ucyk7XG4gICAgICAgIGNvbnN0IHNpZ25lcnMgPSBhcnIuZmxhdE1hcCgoYSkgPT4gYS5zaWduZXJzKTtcbiAgICAgICAgY29uc3QgZmVlUGF5ZXJzID0gYXJyLmZpbHRlcigoYSkgPT4gYS5mZWVQYXllciAhPT0gdW5kZWZpbmVkKTtcbiAgICAgICAgbGV0IGZlZVBheWVyID0gc2lnbmVyc1swXTtcbiAgICAgICAgaWYgKGZlZVBheWVycy5sZW5ndGggPiAwICYmIGZlZVBheWVyc1swXS5mZWVQYXllcikge1xuICAgICAgICAgIGZlZVBheWVyID0gZmVlUGF5ZXJzWzBdLmZlZVBheWVyO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgdHJhbnNhY3Rpb24gPSBuZXcgVHJhbnNhY3Rpb24oKTtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHNpZ25lcnM7XG4gICAgICAgIGlmIChmZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gZmVlUGF5ZXIucHVibGljS2V5O1xuICAgICAgICAgIGZpbmFsU2lnbmVycyA9IFtmZWVQYXllciwgLi4uc2lnbmVyc107XG4gICAgICAg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YWx0eShtZXRhZGF0YS5yb3lhbHR5KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlcl9mZWVfYmFzaXNfcG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJGZWVCYXNpc1BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0YWRhdGEubmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzeW1ib2wnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLnN5bWJvbCkge1xuICAgICAgICAgICAgICByZXMgPSBpc1N5bWJvbChtZXRhZGF0YS5zeW1ib2wpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHJlcyAmJiByZXMuaXNFcnIpIHtcbiAgICAgICAgICByZXN1bHRzLnB1c2goLi4ucmVzLmVycm9yLmRldGFpbHMpO1xuICAgICAgICB9XG4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JPcHRpb25zLk1lbW8ucHJvZ3JhbS5pbmNsdWRlcyhpbnN0cnVjdGlvbi5wcm9ncmFtKSkge1xuICAgICAgICAgICAgICAgIGxldCBpbnN0cnVjdGlvblRyYW5zZmVyO1xuXG4gICAgICAgICAgICAgICAgLy8gZmV0Y2ggIHRyYW5zZmVyIHRyYW5zYWN0aW9uIGZvciByZWxhdGlvbmFsIG1lbW9cbiAgICAgICAgICAgICAgICB0eE1ldGEudHJhbnNhY3Rpb24ubWVzc2FnZS5pbnN0cnVjdGlvbnMuZm9yRWFjaChcbiAgICAgICAgICAgICAgICAgIChpbnN0cnVjdGlvbikgPT4ge1xuICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgaXNQYXJzZWRJbnN0cnVjdGlvbihpbnN0cnVjdGlvbikgJiZcbiAgICAgICAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLlRyYW5zZmVyLnByb2dyYW0uaW5jbHVkZXMoXG4gICAgICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbi5wcm9ncmFtLFxuICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlciA9IGluc3RydWN0aW9uO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICk7XG5cbiAgICAgICAgICAgICAgICAvLyBzcGwtdG9rZW4gb3Igc3lzdGVtXG4gICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlciAmJlxuICAgICAgICAgICAgICAgICAgbW9kdWxlTmFtZSAhPT0gaW5zdHJ1Y3Rpb25UcmFuc2ZlclsncHJvZ3JhbSddXG4gICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICBkZWJ1Z0xvZyhcbiAgICAgICAgICAgICAgICAgICAgJyMgRmlsdGVyVHlwZS5NZW1vIGJyZWFrIGluc3RydWN0aW9uOiAnLFxuICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyLFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vIGZldGNoIG1lbW8gb25seSB0cmFuc2FjdGlvblxuICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuTWVtby5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIsXG4gICAgICAgICAgICAgICAgICBwb3N0VG9rZW5BY2NvdW50LFxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXNlIEZpbHRlclR5cGUuT25seU1lbW86IHtcbiAgICAgICAgICAgICAgaWYgKEZpbHRlck9wdGlvbnMuTWVtby5wcm9ncmFtLmluY2x1ZGVzKGluc3RydWN0aW9uLnByb2dyYW0pKSB7XG4gICAgICAgICAgICAgICAgbGV0IGluc3RydWN0aW9uVHJhbnNmZXI7XG5cbiAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLk1lbW8uaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyLFxuICAgICAgICAgICAgICAgICAgcG9zdFRva2VuQWNjb3VudCxcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLk1pbnQ6IHtcbiAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuTWludC5wcm9ncmFtLmluY2x1ZGVzKGluc3RydWN0aW9uLnByb2dyYW0pICYmXG4gICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5NaW50LmFjdGlvbi5pbmNsdWRlcyhcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLnBhcnNlZC50eXBlIGFzIHN0cmluZyxcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuTWludC5pbnRvVXNlclNpZGUoaW5zdHJ1Y3Rpb24sIHR4TWV0YSk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXNlIEZpbHRlclR5cGUuVHJhbnNmZXI6XG4gICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICBtb2R1bGVOYW1lID09PSBpbnN0cnVjdGlvbi5wcm9ncmFtICYmXG4gICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5UcmFuc2Zlci5hY3Rpb24uaW5jbHVkZXMoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbi5wYXJzZWQudHlwZSBhcyBzdHJpbmcsXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICBpZiAoaW5zdHJ1Y3Rpb24ucGFyc2VkLnR5cGUgPT09ICd0cmFuc2ZlckNoZWNrZWQnKSB7XG4gICAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLlRyYW5zZmVyQ2hlY2tlZC5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICAgIHBvc3RUb2tlbkFjY291bnQsXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLlRyYW5zZmVyLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIHJldHVybiBoaXN0b3J5O1xuICAgIH07XG59XG4iLCAiaW1wb3J0IHsgUGFyc2VkQWNjb3VudERhdGEgfSBmcm9tICdAc29sYW5hL3dlYjMuanMnO1xuaW1wb3J0IHsgUmVzdWx0LCBUcnkgfSBmcm9tICd+L3N1aXRlLXV0aWxzJztcbmltcG9ydCB7IE5vZGUgfSBmcm9tICd+L25vZGUnO1xuaW1wb3J0IHsgT3duZXJJbmZvLCBQdWJrZXkgfSBmcm9tICd+L3R5cGVzL2FjY291bnQnO1xuaW1wb3J0IHsgVHJhbnNhY3Rpb25GaWx0ZXIgfSBmcm9tICd+L3RyYW5zYWN0aW9uLWZpbHRlcic7XG5cbmV4cG9ydCBuYW1lc3BhY2UgU29sTmF0aXZlIHtcbiAgLyoqXG4gICAqIEZpbmQgbmZ0IGJ5IG93bmVyIGFkZHJlc3NcbiAgICpcbiAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAqIEByZXR1cm4gUHJvbWlzZTxSZXN1bHQ8T3duZXJJbmZvLCBFcnJvcj4+XG4gICAqL1xuICBleHBvcnQgY29uc3QgZmluZEJ5T3duZXIgPSBhc3luYyAoXG4gICAgb3duZXI6IFB1YmtleSxcbiAgKTogUHJvbW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ICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIDAsXG4gICAgICApO1xuXG4gICAgICBjb25zdCBzb3VyY2VUb2tlbiA9IGF3YWl0IEFjY291bnQuQXNzb2NpYXRlZC5yZXRyeUdldE9yQ3JlYXRlKFxuICAgICAgICB0b2tlbi50b1N0cmluZygpLFxuICAgICAgICBvd25lcixcbiAgICAgICAgcGF5ZXIsXG4gICAgICApO1xuXG4gICAgICBkZWJ1Z0xvZygnIyBzb3VyY2VUb2tlbjogJywgc291cmNlVG9rZW4pO1xuXG4gICAgICBjb25zdCBkZXN0VG9rZW4gPSBhd2FpdCBBY2NvdW50LkFzc29jaWF0ZWQucmV0cnlHZXRPckNyZWF0ZShcbiAgICAgICAgdG9rZW4udG9TdHJpbmcoKSxcbiAgICAgICAgd3JhcHBlZC50b1N0cmluZygpLFxuICAgICAgICBwYXllcixcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGRlc3RUb2tlbjogJywgZGVzdFRva2VuKTtcblxuICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgIGNyZWF0ZVRyYW5zZmVySW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgc291cmNlVG9rZW4udG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBkZXN0VG9rZW4udG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIHBhcnNlSW50KGAke2Ftb3VudH1gLCBSQURJWCksIC8vIE5vIGxhbXBvcnRzLCBpdHMgc29sXG4gICAgICAgICAga2V5cGFpcnMsXG4gICAgICAgICksXG4gICAgICApO1xuXG4gICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgY3JlYXRlQ2xvc2VBY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgd3JhcHBlZCxcbiAgICAgICAgICBkZXN0LnRvUH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b248SW5wdXRDb2xsZWN0aW9uPiB8IHVuZGVmaW5lZCxcbiAgICApOiBPcHRpb248SW50ZXJuYWxDb2xsZWN0aW9uPiA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBudWxsO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4ge1xuICAgICAgICBrZXk6IGlucHV0LnRvUHVibGljS2V5KCksXG4gICAgICAgIHZlcmlmaWVkOiBmYWxzZSxcbiAgICAgIH07XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlciA9IChcbiAgICAgIG91dHB1dDogT3B0aW9uPEludGVybmFsQ29sbGVjdGlvbj4sXG4gICAgKTogQ29sbGVjdGlvblR5cGUgfCB1bmRlZmluZWQgPT4ge1xuICAgICAgaWYgKCFvdXRwdXQpIHtcbiAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIHtcbiAgICAgICAgYWRkcmVzczogb3V0cHV0LmtleS50b1N0cmluZygpLFxuICAgICAgICB2ZXJpZmllZDogb3V0cHV0LnZlcmlmaWVkLFxuICAgICAgfTtcbiAgICB9O1xuICB9XG5cbiAgZXhwb3J0IG5hbWVzcGFjZSBDb2xsZWN0aW9uTWludCB7XG4gICAgZXhwb3J0IGNvbnN0IGludG9Vc2VyID0gKG91dHB1dDogR3JvdXBpbmdbXSk6IFB1YmtleSA9PiB7XG4gICAgICBjb25zdCByZXMgPSBvdXRwdXQuZmluZCgodmFsdWUpID0+IHtcbiAgICAgICAgaWYgKHZhbHVlLmdyb3VwX2tleSA9PT0gJ2NvbGxlY3Rpb24nKSB7XG4gICAgICAgICAgcmV0dXJuIHZhbHVlLmdyb3VwX3ZhbHVlO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIHJldHVybiByZXMgPyByZXMuZ3JvdXBfdmFsdWUgOiAnJztcbiAgICB9O1xuICB9XG59XG4iLCAiLyogZXNsaW50LWRpc2Fib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ZXJfZmVlX2Jhc2lzX3BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ25hbWUnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLm5hbWUpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNOYW1lKG1ldGFkYXRhLm5hbWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc3ltYm9sJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5zeW1ib2wpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTeW1ib2wobWV0YWRhdGEuc3ltYm9sKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgICAgIGlmIChyZXMgJiYgcmVzLmlzRXJyKSB7XG4gICAgICAgICAgcmVzdWx0cy5wdXNoKC4uLnJlcy5lcnJvci5kZXRhaWxzKTtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgICBpZiAocmVzdWx0cy5sZW5ndGggPiAwKSB7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2U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0cmFuc2FjdGlvbiBmb3IgcmVsYXRpb25hbCBtZW1vXG4gICAgICAgICAgICAgICAgdHhNZXRhLnRyYW5zYWN0aW9uLm1lc3NhZ2UuaW5zdHJ1Y3Rpb25zLmZvckVhY2goXG4gICAgICAgICAgICAgICAgICAoaW5zdHJ1Y3Rpb24pID0+IHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgIGlzUGFyc2VkSW5zdHJ1Y3Rpb24oaW5zdHJ1Y3Rpb24pICYmXG4gICAgICAgICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5UcmFuc2Zlci5wcm9ncmFtLmluY2x1ZGVzKFxuICAgICAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24ucHJvZ3JhbSxcbiAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIgPSBpbnN0cnVjdGlvbjtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICApO1xuXG4gICAgICAgICAgICAgICAgLy8gc3BsLXRva2VuIG9yIHN5c3RlbVxuICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIgJiZcbiAgICAgICAgICAgICAgICAgIG1vZHVsZU5hbWUgIT09IGluc3RydWN0aW9uVHJhbnNmZXJbJ3Byb2dyYW0nXVxuICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgZGVidWdMb2coXG4gICAgICAgICAgICAgICAgICAgICcjIEZpbHRlclR5cGUuTWVtbyBicmVhayBpbnN0cnVjdGlvbjogJyxcbiAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlcixcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAvLyBmZXRjaCBtZW1vIG9ubHkgdHJhbnNhY3Rpb25cbiAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLk1lbW8uaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyLFxuICAgICAgICAgICAgICAgICAgcG9zdFRva2VuQWNjb3VudCxcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLk9ubHlNZW1vOiB7XG4gICAgICAgICAgICAgIGlmIChGaWx0ZXJPcHRpb25zLk1lbW8ucHJvZ3JhbS5pbmNsdWRlcyhpbnN0cnVjdGlvbi5wcm9ncmFtKSkge1xuICAgICAgICAgICAgICAgIGxldCBpbnN0cnVjdGlvblRyYW5zZmVyO1xuXG4gICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5NZW1vLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlcixcbiAgICAgICAgICAgICAgICAgIHBvc3RUb2tlbkFjY291bnQsXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5NaW50OiB7XG4gICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLk1pbnQucHJvZ3JhbS5pbmNsdWRlcyhpbnN0cnVjdGlvbi5wcm9ncmFtKSAmJlxuICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuTWludC5hY3Rpb24uaW5jbHVkZXMoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbi5wYXJzZWQudHlwZSBhcyBzdHJpbmcsXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLk1pbnQuaW50b1VzZXJTaWRlKGluc3RydWN0aW9uLCB0eE1ldGEpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLlRyYW5zZmVyOlxuICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgbW9kdWxlTmFtZSA9PT0gaW5zdHJ1Y3Rpb24ucHJvZ3JhbSAmJlxuICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuVHJhbnNmZXIuYWN0aW9uLmluY2x1ZGVzKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24ucGFyc2VkLnR5cGUgYXMgc3RyaW5nLFxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgaWYgKGluc3RydWN0aW9uLnBhcnNlZC50eXBlID09PSAndHJhbnNmZXJDaGVja2VkJykge1xuICAgICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5UcmFuc2ZlckNoZWNrZWQuaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgICBwb3N0VG9rZW5BY2NvdW50LFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5UcmFuc2Zlci5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgICByZXR1cm4gaGlzdG9yeTtcbiAgICB9O1xufVxuIiwgImltcG9ydCB7IFBhcnNlZEFjY291bnREYXRhIH0gZnJvbSAnQHNvbGFuYS93ZWIzLmpzJztcbmltcG9ydCB7IFJlc3VsdCwgVHJ5IH0gZnJvbSAnfi9zdWl0ZS11dGlscyc7XG5pbXBvcnQgeyBOb2RlIH0gZnJvbSAnfi9ub2RlJztcbmltcG9ydCB7IE93bmVySW5mbywgUHVia2V5IH0gZnJvbSAnfi90eXBlcy9hY2NvdW50JztcbmltcG9ydCB7IFRyYW5zYWN0aW9uRmlsdGVyIH0gZnJvbSAnfi90cmFuc2FjdGlvbi1maWx0ZXInO1xuXG5leHBvcnQgbmFtZXNwYWNlIFNvbE5hdGl2ZSB7XG4gIC8qKlxuICAgKiBGaW5kIG5mdCBieSBvd25lciBhZGRyZXNzXG4gICAqXG4gICAqIEBwYXJhbSB7UHVia2V5fSBvd25lclxuICAgKiBAcmV0dXJuIFByb21pc2U8UmVzdWx0PE93bmVySW5mbywgRXJyb3I+PlxuICAgKi9cbiAgZXhwb3J0IGNvbnN0IGZpbmRCeU93bmVyID0gYXN5bmMgKFxuICAgIG93bmVyOiBQdWJrZXksXG4gICk6IFByb21pc2U8UmVzdWx0PE93bmVySW5mbywgRXJyb3I+PiA9PiB7XG4gICAgcmV0dXJuIFRyeShhc3luYyAoKSA9PiB7XG4gICAgICBjb25zdCByZXMgPSBhd2FpdCBOb2RlLmdldENvbm5lY3Rpb24oKS5nZXRQYXJzZWRBY2NvdW50SW5mbyhcbiAgICA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aWF0ZWQucmV0cnlHZXRPckNyZWF0ZShcbiAgICAgICAgdG9rZW4udG9TdHJpbmcoKSxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIHBheWVyLFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgc291cmNlVG9rZW46ICcsIHNvdXJjZVRva2VuKTtcblxuICAgICAgY29uc3QgZGVzdFRva2VuID0gYXdhaXQgQWNjb3VudC5Bc3NvY2lhdGVkLnJldHJ5R2V0T3JDcmVhdGUoXG4gICAgICAgIHRva2VuLnRvU3RyaW5nKCksXG4gICAgICAgIHdyYXBwZWQudG9TdHJpbmcoKSxcbiAgICAgICAgcGF5ZXIsXG4gICAgICApO1xuXG4gICAgICBkZWJ1Z0xvZygnIyBkZXN0VG9rZW46ICcsIGRlc3RUb2tlbik7XG5cbiAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICBjcmVhdGVUcmFuc2Zlckluc3RydWN0aW9uKFxuICAgICAgICAgIHNvdXJjZVRva2VuLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgZGVzdFRva2VuLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBwYXJzZUludChgJHthbW91bnR9YCwgUkFESVgpLCAvLyBObyBsYW1wb3J0cywgaXRzIHNvbFxuICAgICAgICAgIGtleXBhaXJzLFxuICAgICAgICApLFxuICAgICAgKTtcblxuICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgIGNyZWF0ZUNsb3NlQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHdyYXBwZWQsXG4gICAgICAgICAgZGVzdC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAga2V5cGFpcnMsXG4gICAgICAgICksXG4gICAgICApO1xuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb24oXG4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b2xOYXRpdmUiLCAiVHJhbnNhY3Rpb24iLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlN5c3RlbVByb2dyYW0iLCAiU29sTmF0aXZlIiwgIlN5c3RlbVByb2dyYW0iLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlNvbE5hdGl2ZSIsICJBY2NvdW50IiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJTb2xOYXRpdmUiLCAiU29sTmF0aXZlIl0KfQo= diff --git a/packages/test-tools/tsconfig.json b/packages/test-tools/tsconfig.json index 783278df8..e06bfd62e 100644 --- a/packages/test-tools/tsconfig.json +++ b/packages/test-tools/tsconfig.json @@ -5,7 +5,7 @@ "compilerOptions": { "paths": { "~/types/*": ["../types/src/*/index.ts"], - "~/*": ["../*/src/index.ts"], + "~/*": ["../*/src/index.ts"] } }, "include": ["src/**/*.ts", "test/**/*.ts"], diff --git a/packages/transaction-builder/dist/index.js b/packages/transaction-builder/dist/index.js index 56dcadfce..42d6e5cc3 100644 --- a/packages/transaction-builder/dist/index.js +++ b/packages/transaction-builder/dist/index.js @@ -1422,4 +1422,4 @@ var TransactionBuilder = { 0 && (module.exports = { TransactionBuilder }); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uL3NyYy9iYXRjaC50cyIsICIuLi8uLi9zdWl0ZS11dGlscy9zcmMvY29uc3RhbnRzLnRzIiwgIi4uLy4uL3N1aXRlLXV0aWxzL3NyYy9zaGFyZWQudHMiLCAiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL3Jlc3VsdC50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9rZXlwYWlyLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL3BkYS50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9pbmRleC50cyIsICIuLi8uLi9nbG9iYWwvc3JjL2luZGV4LnRzIiwgIi4uLy4uL2NvbnZl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NvbW1vbltdIHwgTWludC5NaW50W10sXG4gICAgKTogUHJvbWlzZTxSZXN1bHQ8VHJhbnNhY3Rpb25TaWduYXR1cmUsIEVycm9yPj4gPT4ge1xuICAgICAgcmV0dXJuIFRyeShhc3luYyAoKSA9PiB7XG4gICAgICAgIGxldCBpID0gMDtcbiAgICAgICAgZm9yIChjb25zdCBhIG9mIGFycikge1xuICAgICAgICAgIGlmICghYS5pbnN0cnVjdGlvbnMgJiYgIWEuc2lnbmVycykge1xuICAgICAgICAgICAgdGhyb3cgRXJyb3IoXG4gICAgICAgICAgICAgIGBvbmx5IEluc3RydWN0aW9uIG9iamVjdCB0aGF0IGNhbiB1c2UgYmF0Y2hTdWJtaXQoKS5cbiAgICAgICAgICAgIEluZGV4OiAke2l9LCBTZXQgdmFsdWU6ICR7SlNPTi5zdHJpbmdpZnkoYSl9YCxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIGkrKztcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IGluc3RydWN0aW9ucyA9IGFyci5mbGF0TWFwKChhKSA9PiBhLmluc3RydWN0aW9ucyk7XG4gICAgICAgIGNvbnN0IHNpZ25lcnMgPSBhcnIuZmxhdE1hcCgoYSkgPT4gYS5zaWduZXJzKTtcbiAgICAgICAgY29uc3QgZmVlUGF5ZXJzID0gYXJyLmZpbHRlcigoYSkgPT4gYS5mZWVQYXllciAhPT0gdW5kZWZpbmVkKTtcbiAgICAgICAgbGV0IGZlZVBheWVyID0gc2lnbmVyc1swXTtcbiAgICAgICAgaWYgKGZlZVBheWVycy5sZW5ndGggPiAwICYmIGZlZVBheWVyc1swXS5mZWVQYXllcikge1xuICAgICAgICAgIGZlZVBheWVyID0gZmVlUGF5ZXJzWzBdLmZlZVBheWVyO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgdHJhbnNhY3Rpb24gPSBuZXcgVHJhbnNhY3Rpb24oKTtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmV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ICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJGZWVCYXNpc1BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0YWRhdGEubmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzeW1ib2wnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLnN5bWJvbCkge1xuICAgICAgICAgICAgICByZXMgPSBpc1N5bWJvbChtZXRhZGF0YS5zeW1ib2wpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHJlcyAmJiByZXMuaXNFcnIpIHtcbiAgICAgICAgICByZXN1bHRzLnB1c2goLi4ucmVzLmVycm9yLmRldGFpbHMpO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIGlmIChyZXN1bHRzLmxlbmd0aCA+IDApIHtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9XG4gICAgICAgICAgJ0NhdWdodCBpbiB0aGUgdmFsaWRhdGlvbiBlc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aW50W10sXG4gICAgKTogUHJvbWlzZTxSZXN1bHQ8VHJhbnNhY3Rpb25TaWduYXR1cmUsIEVycm9yPj4gPT4ge1xuICAgICAgcmV0dXJuIFRyeShhc3luYyAoKSA9PiB7XG4gICAgICAgIGxldCBpID0gMDtcbiAgICAgICAgZm9yIChjb25zdCBhIG9mIGFycikge1xuICAgICAgICAgIGlmICghYS5pbnN0cnVjdGlvbnMgJiYgIWEuc2lnbmVycykge1xuICAgICAgICAgICAgdGhyb3cgRXJyb3IoXG4gICAgICAgICAgICAgIGBvbmx5IEluc3RydWN0aW9uIG9iamVjdCB0aGF0IGNhbiB1c2UgYmF0Y2hTdWJtaXQoKS5cbiAgICAgICAgICAgIEluZGV4OiAke2l9LCBTZXQgdmFsdWU6ICR7SlNPTi5zdHJpbmdpZnkoYSl9YCxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIGkrKztcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IGluc3RydWN0aW9ucyA9IGFyci5mbGF0TWFwKChhKSA9PiBhLmluc3RydWN0aW9ucyk7XG4gICAgICAgIGNvbnN0IHNpZ25lcnMgPSBhcnIuZmxhdE1hcCgoYSkgPT4gYS5zaWduZXJzKTtcbiAgICAgICAgY29uc3QgZmVlUGF5ZXJzID0gYXJyLmZpbHRlcigoYSkgPT4gYS5mZWVQYXllciAhPT0gdW5kZWZpbmVkKTtcbiAgICAgICAgbGV0IGZlZVBheWVyID0gc2lnbmVyc1swXTtcbiAgICAgICAgaWYgKGZlZVBheWVycy5sZW5ndGggPiAwICYmIGZlZVBheWVyc1swXS5mZWVQYXllcikge1xuICAgICAgICAgIGZlZVBheWVyID0gZmVlUGF5ZXJzWzBdLmZlZVBheWVyO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgdHJhbnNhY3Rpb24gPSBuZXcgVHJhbnNhY3Rpb24oKTtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHNpZ25lcnM7XG4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A9IChcbiAgICAgIGlucHV0OiBPcHRpb248SW5wdXRDb2xsZWN0aW9uPiB8IHVuZGVmaW5lZCxcbiAgICApOiBPcHRpb248SW50ZXJuYWxDb2xsZWN0aW9uPiA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBudWxsO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4ge1xuICAgICAgICBrZXk6IGlucHV0LnRvUHVibGljS2V5KCksXG4gICAgICAgIHZlcmlmaWVkOiBmYWxzZSxcbiAgICAgIH07XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlciA9IChcbiAgICAgIG91dHB1dDogT3B0aW9uPEludGVybmFsQ29sbGVjdGlvbj4sXG4gICAgKTogQ29sbGVjdGlvblR5cGUgfCB1bmRlZmluZWQgPT4ge1xuICAgICAgaWYgKCFvdXRwdXQpIHtcbiAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIHtcbiAgICAgICAgYWRkcmVzczogb3V0cHV0LmtleS50b1N0cmluZygpLFxuICAgICAgICB2ZXJpZmllZDogb3V0cHV0LnZlcmlmaWVkLFxuICAgICAgfTtcbiAgICB9O1xuICB9XG5cbiAgZXhwb3J0IG5hbWVzcGFjZSBDb2xsZWN0aW9uTWludCB7XG4gICAgZXhwb3J0IGNvbnN0IGludG9Vc2VyID0gKG91dHB1dDogR3JvdXBpbmdbXSk6IFB1YmtleSA9PiB7XG4gICAgICBjb25zdCByZXMgPSBvdXRwdXQuZmluZCgodmFsdWUpID0+IHtcbiAgICAgICAgaWYgKHZhbHVlLmdyb3VwX2tleSA9PT0gJ2NvbGxlY3Rpb24nKSB7XG4gICAgICAgICAgcmV0dXJuIHZhbHVlLmdyb3VwX3ZhbHVlO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIHJldHVybiByZXMgPyByZXMuZ3JvdXBfdmFsdWUgOiAnJztcbiAgICB9O1xuICB9XG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aztcbiAgICAgICAgICBjYXNlICdzZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ25hbWUnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLm5hbWUpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNOYW1lKG1ldGFkYXRhLm5hbWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc3ltYm9sJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5zeW1ib2wpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTeW1ib2wobWV0YWRhdGEuc3ltYm9sKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgICAgIGlmIChyZXMgJiYgcmVzLmlzRXJyKSB7XG4gICAgICAgICAgcmVzdWx0cy5wdXNoKC4uLnJlcy5lcnJvci5kZXRhaWxzKTtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgICBpZiAocmVzdWx0cy5sZW5ndGggPiAwKSB7XG4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J0ZXIiLCAiUHJvcGVydGllcyIsICJDb252ZXJ0ZXIiLCAiVXNlcyIsICJDb252ZXJ0ZXIiLCAiVG9rZW5NZXRhZGF0YSIsICJDb252ZXJ0ZXIiLCAiVHJhbnNmZXJDaGVja2VkIiwgIkNvbnZlcnRlciIsICJUcmFuc2ZlciIsICJDb252ZXJ0ZXIiLCAiVmFsaWRhdG9yIiwgIk1lc3NhZ2UiLCAiQ29udmVydGVyIiwgImltcG9ydF93ZWIzIiwgIk5vZGUiLCAiaW1wb3J0X3dlYjMiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIkNvbW1vbiIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiaW1wb3J0X3dlYjMiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgImltcG9ydF93ZWIzIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIl0KfQo= \ No newline at end of file diff --git a/packages/transaction-builder/dist/index.mjs b/packages/transaction-builder/dist/index.mjs index a4f674628..ce1e56420 100644 --- a/packages/transaction-builder/dist/index.mjs +++ b/packages/transaction-builder/dist/index.mjs @@ -1399,4 +1399,4 @@ var TransactionBuilder = { export { TransactionBuilder }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2JhdGNoLnRzIiwgIi4uLy4uL3N1aXRlLXV0aWxzL3NyYy9jb25zdGFudHMudHMiLCAiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL3NoYXJlZC50cyIsICIuLi8uLi9zdWl0ZS11dGlscy9zcmMvcmVzdWx0LnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2tleXBhaXIudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvcGRhLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2luZGV4LnRzIiwgIi4uLy4uL2dsb2JhbC9zcm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BheWVyPzogU2VjcmV0KSB7XG4gIGlmIChmZWVQYXllcikge1xuICAgIGxldCBpID0gMTtcbiAgICBmb3IgYXdhaXQgKGNvbnN0IG9iaiBvZiB0aGlzKSB7XG4gICAgICBpZiAob2JqLmlzRXJyKSB7XG4gICAgICAgIHJldHVybiBvYmo7XG4gICAgICB9IGVsc2UgaWYgKG9iai52YWx1ZS5jYW5TdWJtaXQpIHtcbiAgICAgICAgZGVidWdMb2coJyMgUmVzdWx0IGJhdGNoIGNhblN1Ym1pdCcpO1xuICAgICAgICBjb25zdCBzaWcgPSBhd2FpdCAob2JqIGFzIFBhcnRpYWxTaWduU3RydWN0dXJlKS5zdWJtaXQoZmVlUGF5ZXIpO1xuICAgICAgICBpZiAoc2lnLmlzRXJyKSB7XG4gICAgICAgICAgcmV0dXJuIHNpZztcbiAgICAgICAgfVxuICAgICAgICBhd2FpdCBOb2RlLmNvbmZpcm1lZFNpZyhzaWcudmFsdWUpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgZGVidWdMb2coJyMgUmVzdWx0IGJhdGNoIG90aGVyIHRoYW4gY2FuU3VibWl0Jyk7XG4gICAgICAgIGlmICh0aGlzLmxlbmd0aCA9PSBpKSB7XG4gICAgICAgICAgLy8gbGFzdCBvYmplY3RcbiAgICAgICAgICByZXR1cm4gb2JqLnN1Ym1pdChmZWVQYXllcik7XG4gICAgICAgIH1cbiAgICAgICAgb2JqLnN1Ym1pdChmZWVQYXllcik7XG4gICAgICB9XG4gICAgICBpKys7XG4gICAgfVxuICB9IGVsc2Uge1xuICAgIGNvbnN0IGluc3RydWN0aW9uczogQ29tbW9uU3RydWN0dXJlIHwgTWludFN0cnVjdHVyZVtdID0gW107XG4gICAgZm9yIChjb25zdCBvYmogb2YgdGhpcykge1xuICAgICAgaWYgKG9iai5pc0Vycikge1xuICAgICAgICByZXR1cm4gb2JqO1xuICAgICAgfSBlbHNlIGlmIChvYmouaXNPaykge1xuICAgICAgICBpbnN0cnVjdGlvbnMucH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+IHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICBhZGRyZXNzOiBkYXRhLmFkZHJlc3MudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBzaGFyZTogZGF0YS5zaGFyZSxcbiAgICAgICAgICB2ZXJpZmllZDogZmFsc2UsXG4gICAgICAgIH07XG4gICAgICB9KTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGludG9Db21wcmVzc2VkTmZ0SW5mcmEgPSAoXG4gICAgICBpbnB1dDogT3B0aW9uPElucHV0Q3JlYXRvcnNbXT4gfCB1bmRlZmluZWQsXG4gICAgKTogSW50ZXJuYWxDcmVhdG9yc1tdID0+IHtcbiAgICAgIGlmICghaW5wdXQpIHtcbiAgICAgICAgcmV0dXJuIFtdO1xuICAgICAgfVxuICAgICAgcmV0dXJuIGlucHV0IS5tYXAoKGRhdGEpID0+IHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICBhZGRyZXNzOiBkYXRhLmFkZHJlc3MudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBzaGFyZTogZGF0YS5zaGFyZSxcbiAgICAgICAgICB2ZXJpZmllZDogZmFsc2UsXG4gICAgICAgIH07XG4gICAgICB9KTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGludG9Vc2VyID0gKFxuICAgICAgb3V0cHV0OiBPcHRpb248SW50ZXJuYWxDcmVhdG9yc1tdPixcbiAgICApOiBDcmVhdG9yc1tdIHwgdW5kZWZpbmVkID0+IHtcbiAgICAgIGlmICghb3V0cHV0KSB7XG4gICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBvdXRwdXQubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvU3RyaW5nKCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdm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VzdWx0PHN0cmluZywgVmFsaWRhdG9yRXJyb3I+O1xuICAgICAgICBzd2l0Y2ggKGtleSkge1xuICAgICAgICAgIGNhc2UgJ2ltYWdlJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuaW1hZ2UpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNJbWFnZVVybChtZXRhZGF0YS5pbWFnZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdyb3lhbHR5JzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEucm95YWx0eSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1JveWFsdHkobWV0YWRhdGEucm95YWx0eSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ25hbWUnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLm5hb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iAgICAgICAgdHJhbnNhY3Rpb24ucmVjZW50QmxvY2toYXNoID0gYmxvY2toYXNoT2JqLmJsb2NraGFzaDtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHRoaXMuc2lnbmVycztcblxuICAgICAgICBpZiAodGhpcy5mZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gdGhpcy5mZWVQYXllci5wdWJsaWNLZXk7XG4gICAgICAgICAgZmluYWxTaWduZXJzID0gW3RoaXMuZmVlUGF5ZXIsIC4uLnRoaXMuc2lnbmVyc107XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLmluc3RydWN0aW9ucy5mb3JFYWNoKChpbnN0KSA9PiB0cmFuc2FjdGlvbi5hZGQoaW5zdCkpO1xuXG4gICAgICAgIGNvbnN0IG9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IE1BWF9SRVRSSUVTLFxuICAgICAgICB9O1xuXG4gICAgICAgIGlmIChOb2RlLmdldENvbm5lY3Rpb24oKS5ycGNFbmRwb2ludCA9PT0gQ29uc3RhbnRzLkVuZFBvaW50VXJsLnByZCkge1xuICAgICAgICAgIGRlYnVnTG9nKCcjIENoYW5nZSBtZXRhcGxleCBjbHVzdGVyIG9uIG1haW5uZXQtYmV0YScpO1xuICAgICAgICAgIE5vZGUuY2hhbmdlQ29ubmVjdGlvbih7IGNsdXN0ZXI6IENvbnN0YW50cy5DbHVzdGVyLnByZE1ldGFwbGV4IH0pO1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgIG9wdGlvbnMsXG4gICAgICAgICk7XG4gICAgICB9KTtcbiAgICB9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ge1xuICAgIHN3aXRjaCAoZW52KSB7XG4gICAgICBjYXNlIENvbnN0YW50cy5DbHVzdGVyLnByZDoge1xuICAgICAgICBjb25zdCB1cmxzID0gQ29uc3RhbnRzLkJ1bmRsclVybC5wcmQuc3BsaXQoJywnKTtcbiAgICAgICAgY29uc3QgaW5kZXggPSBEYXRlLm5vdygpICUgdXJscy5sZW5ndGg7XG4gICAgICAgIHJldHVybiB1cmxzW2luZGV4XTtcbiAgICAgIH1cbiAgICAgIGRlZmF1bHQ6IHtcbiAgICAgICAgcmV0dXJuIENvbnN0YW50cy5CdW5kbHJVcmwuZGV2O1xuICAgICAgfVxuICAgIH1cbiAgfTtcblxuICBleHBvcnQgY29uc3Qgc3dpdGNoRGFzQXBpID0gKGVudjogc3RyaW5nKTogc3RyaW5nID0+IHtcbiAgICBzd2l0Y2ggKGVudikge1xuICAgICAgY2FzZSBDb25zdGFudHMuQ2x1c3Rlci5wcmQ6IHtcbiAgICAgICAgaWYgKGRhc0FwaVVybC5sZW5ndGggPCAxKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoQ29uc3RhbnRzLldhcm5uaW5nTWVzc2FnZS5EQVNfQVBJX1VSTCk7XG4gICAgICAgIH1cbiAgICAgICAgY29uc3QgdXJscyA9IENvbnN0YW50cy5CdW5kbHJVcmwucHJkLnNwbGl0KCcsJyk7XG4gICAgICAgIGNvbnN0IGluZGV4ID0gRGF0ZS5ub3coKSAlIHVybHMubGVuZ3RoO1xuICAgICAgICByZXR1cm4gdXJsc1tpbmRleF07XG4gICAgICB9XG4gICAgICBkZWZhdWx0OiB7XG4gICAgICAgIGNvbnN0IHVybHMgPSBDb25zdGFudHMuRGFzQXBpVXJsLmRldi5zcGxpdCgnLCcpO1xuICAgICAgICBjb25zdCBpbmRleCA9IERhdGUubm93KCkgJSB1cmxzLmxlbmd0aDtcbiAgICAgICAgcmV0dXJuIHVybHNbaW5kZXhdO1xuICAgICAgfVxuICAgIH1cbiAgfTtcblxuICBleHBvcn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3QgaW50b0luZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IE9wdGlvbjxJbnRlcm5hbENyZWF0b3JzW10+ID0+IHtcbiAgICAgIGlmICghaW5wdXQpIHtcbiAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICB9XG4gICAgICByZXR1cm4gaW5wdXQubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvQ29tcHJlc3NlZE5mdEluZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IEludGVybmFsQ3JlYXRvcnNbXSA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBbXTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBpbnB1dCEubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlciA9IChcbiAgICAgIG91dHB1dDogT3B0aW9uPEludGVybmFsQ3JlYXRvcnNbXT4sXG4gICAgKTogQ3JlYXRvcnNbXSB8IHVuZGVmaW5lZCA9PiB7XG4gICAgICBpZiAoIW91d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ICAgY2FsbGJhY2tGdW5jOiAoXG4gICAgICAgIGZpbGVQYXRoOiBGaWxlVHlwZSxcbiAgICAgICAgc3RvcmFnZVR5cGU6IFN0b3JhZ2VUeXBlLFxuICAgICAgICBmZWVQYXllcj86IFNlY3JldCxcbiAgICAgICkgPT4gUHJvbWlzZTxSZXN1bHQ8c3RyaW5nLCBFcnJvcj4+LFxuICAgICAgc3RvcmFnZVR5cGU6IFN0b3JhZ2VUeXBlLFxuICAgICAgZmVlUGF5ZXI/OiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxQcm9wZXJ0aWVzPiA9PiB7XG4gICAgICBpZiAoIWlucHV0IHx8ICFpbnB1dC5maWxlcykge1xuICAgICAgICByZXR1cm4ge307XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGZpbGVzID0gYXdhaXQgUHJvbWlzZS5hbGwoXG4gICAgICAgIGlucHV0LmZpbGVzLm1hcChhc3luYyAoZmlsZSkgPT4ge1xuICAgICAgICAgIGlmICghZmlsZS5maWxlUGF0aCkge1xuICAgICAgICAgICAgcmV0dXJuIHt9O1xuICAgICAgICAgIH1cbiAgICAgICAgICBjb25zdCByZXMgPSBhd2FpdCBjYWxsYmFja0Z1bmMoZmlsZS5maWxlUGF0aCwgc3RvcmFnZVR5cGUsIGZlZVBheWVyKTtcbiAgICAgICAgICBpZiAocmVzLmlzRXJyKSB7XG4gICAgICAgICAgICB0aHJvdyBFcnJvcihyZXMuZXJyb3IubWVzc2FnZSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBvdmVyd3JpdGVPYmplY3QoZmlsZSwgW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBleGlzdHNLZXk6ICdmaWxlUGF0aCcsXG4gICAgICAgICAgICAgIHdpbGw6IHsga2V5OiAndXJpJywgdmFsdWU6IHJlcy52YWx1ZSB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICBdKTtcbiAgICAgICAgfSksXG4gICAgICApO1xuICAgICAgcmV0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AgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEuc3ltYm9sKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU3ltYm9sKG1ldGFkYXRhLnN5bWJvbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAocmVzICYmIHJlcy5pc0Vycikge1xuICAgICAgICAgIHJlc3VsdHMucHVzaCguLi5yZXMuZXJyb3IuZGV0YWlscyk7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgICAgaWYgKHJlc3VsdHMubGVuZ3RoID4gMCkge1xuICAgICAgICBjb25zdCBtZXNzYWdlID1cbiAgICAgICAgICAnQ2F1Z2h0IGluIHRoZSB2YWxpZGF0aW9uIGVycm9ycy4gc2VlIGluZm9ybWF0aW9uIGUuZzogZXJyPFZhbGlkYXRvckVycm9yPi5kZXRhaWxzJztcbiAgICAgICAgdGhyb3cgbmV3IFZhbGlkYXRvckVycm9yKG1lc3NhZ2UsIHJlc3VsdHMpO1xuICAgICAgfVxuICAgICAgcmV0dXJuIE1lc3NhZ2UuU1VDQ0VTUztcbiAgICB9KTtcbiAgfTtcblxuICB0eXBlIFBpY2tOZnRTdG9yYWdlID0gUGljazxcbiAgICBPZmZjaGFpbixcbiAgICAn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IiwgIlB1YmxpY0tleSIsICJicyIsICJBY2NvdW50IiwgIlB1YmxpY0tleSIsICJDb252ZXJ0ZXIiLCAiQ29sbGVjdGlvbiIsICJDb2xsZWN0aW9uTWludCIsICJDb252ZXJ0ZXIiLCAiQ3JlYXRvcnMiLCAiQ29udmVydGVyIiwgIkNvbXByZXNzZWROZnRNZXRhZGF0YSIsICJDb252ZXJ0ZXIiLCAiUm95YWx0eSIsICJDb252ZXJ0ZXIiLCAiTmZ0IiwgIkNvbnZlcnRlciIsICJNZW1vIiwgIkNvbnZlcnRlciIsICJNaW50IiwgIkNvbnZlcnRlciIsICJSZWd1bGFyTmZ0TWV0YWRhdGEiLCAiQ29udmVydGVyIiwgIlByb3BlcnRpZXMiLCAiQ29udmVydGVyIiwgIlVzZXMiLCAiQ29udmVydGVyIiwgIlRva2VuTWV0YWRhdGEiLCAiQ29udmVydGVyIiwgIlRyYW5zZmVyQ2hlY2tlZCIsICJDb252ZXJ0ZXIiLCAiVHJhbnNmZXIiLCAiQ29udmVydGVyIiwgIlZhbGlkYXRvciIsICJNZXNzYWdlIiwgIkNvbnZlcnRlciIsICJOb2RlIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJDb21tb24iLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlRyYW5zYWN0aW9uIiwgInNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24iLCAic2VuZEFuZENvbmZpcm1UcmFuc2FjdGlvbiIsICJUcmFuc2FjdGlvbiIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiVHJhbnNhY3Rpb24iLCAic2VuZEFuZENvbmZpcm1UcmFuc2FjdGlvbiIsICJUcmFuc2FjdGlvbiIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiVHJhbnNhY3Rpb24iLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlRyYW5zYWN0aW9uQnVpbGRlciJdCn0K \ No newline at end of file diff --git a/packages/transaction-filter/dist/index.js b/packages/transaction-filter/dist/index.js index d1eed68b3..388b12344 100644 --- a/packages/transaction-filter/dist/index.js +++ b/packages/transaction-filter/dist/index.js @@ -1594,4 +1594,4 @@ var TransactionFilter; Signatures, TransactionFilter }); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uLy4uL3N1aXRlLXV0aWxzL3NyYy9jb25zdGFudHMudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvYmF0Y2gudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY29tbW9uLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL21pbnQudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvcGFydGlhbC1zaWduLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2NhbGN1bGF0ZS10eHNpemUudHMiLCAiLi4vLi4vZ2xvYmFsL3NyYy9pbmRleC50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9rZXlwYWlyLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL3BkYS50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9pbmRleC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9pbmRleC50cyIsICIuLi8uLi9zdWl0ZS11dGlscy9zcmMvc2hhcmVkLnRzIiwgIi4uLy4uL3N1aXRlLXV0aWxzL3NyYy9yZXN1bHQudHMiLCAiLi4vLi4vY29udmVydGVyL3NyYy9jb2xsZWN0aW9uLnRzIiwgIi4uLy4uL2NvbnZlcnRlci9zcmMvY3JlYXRvcnMudHMiLCAiLi4vLi4vY29udmVydGVyL3NyYy9jb21wcmVzc2VkLW5mdC1tZXRhZGF0YS50cyIsICIuLi8uLi9jb252ZXJ0ZXIvc3JjL3JveWFsdHkudHMiLCAiLi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5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IE9wdGlvbjxJbnRlcm5hbENyZWF0b3JzW10+ID0+IHtcbiAgICAgIGlmICghaW5wdXQpIHtcbiAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICB9XG4gICAgICByZXR1cm4gaW5wdXQubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvQ29tcHJlc3NlZE5mdEluZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IEludGVybmFsQ3JlYXRvcnNbXSA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBbXTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBpbnB1dCEubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlciA9IChcbiAgICAgIG91dHB1dDogT3B0aW9uPEludGVybmFsQ3JlYXRvcnNbXT4sXG4gICAgKTogQ3JlYXRvcnNbXSB8IHVuZGVmaW5lZCA9PiB7XG4gICAgICBpZiAoIW91dHB1dCkge1xuICAgICAgICByZXR1cm4gdW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AgICAgIGZpbGVQYXRoOiBGaWxlVHlwZSxcbiAgICAgICAgc3RvcmFnZVR5cGU6IFN0b3JhZ2VUeXBlLFxuICAgICAgICBmZWVQYXllcj86IFNlY3JldCxcbiAgICAgICkgPT4gUHJvbWlzZTxSZXN1bHQ8c3RyaW5nLCBFcnJvcj4+LFxuICAgICAgc3RvcmFnZVR5cGU6IFN0b3JhZ2VUeXBlLFxuICAgICAgZmVlUGF5ZXI/OiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxQcm9wZXJ0aWVzPiA9PiB7XG4gICAgICBpZiAoIWlucHV0IHx8ICFpbnB1dC5maWxlcykge1xuICAgICAgICByZXR1cm4ge307XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGZpbGVzID0gYXdhaXQgUHJvbWlzZS5hbGwoXG4gICAgICAgIGlucHV0LmZpbGVzLm1hcChhc3luYyAoZmlsZSkgPT4ge1xuICAgICAgICAgIGlmICghZmlsZS5maWxlUGF0aCkge1xuICAgICAgICAgICAgcmV0dXJuIHt9O1xuICAgICAgICAgIH1cbiAgICAgICAgICBjb25zdCByZXMgPSBhd2FpdCBjYWxsYmFja0Z1bmMoZmlsZS5maWxlUGF0aCwgc3RvcmFnZVR5cGUsIGZlZVBheWVyKTtcbiAgICAgICAgICBpZiAocmVzLmlzRXJyKSB7XG4gICAgICAgICAgICB0aHJvdyBFcnJvcihyZXMuZXJyb3IubWVzc2FnZSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBvdmVyd3JpdGVPYmplY3QoZmlsZSwgW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBleGlzdHNLZXk6ICdmaWxlUGF0aCcsXG4gICAgICAgICAgICAgIHdpbGw6IHsga2V5OiAndXJpJywgdmFsdWU6IHJlcy52YWx1ZSB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICBdKTtcbiAgICAgICAgfSksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHsgLi4uaW5wdXQsIGZpbGVz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dGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEuc3ltYm9sKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU3ltYm9sKG1ldGFkYXRhLnN5bWJvbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAocmVzICYmIHJlcy5pc0Vycikge1xuICAgICAgICAgIHJlc3VsdHMucHVzaCguLi5yZXMuZXJyb3IuZGV0YWlscyk7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgICAgaWYgKHJlc3VsdHMubGVuZ3RoID4gMCkge1xuICAgICAgICBjb25zdCBtZXNzYWdlID1cbiAgICAgICAgICAnQ2F1Z2h0IGluIHRoZSB2YWxpZGF0aW9uIGVycm9ycy4gc2VlIGluZm9ybWF0aW9uIGUuZzogZXJyPFZhbGlkYXRvckVycm9yPi5kZXRhaWxzJztcbiAgICAgICAgdGhyb3cgbmV3IFZhbGlkYXRvckVycm9yKG1lc3NhZ2UsIHJlc3VsdHMpO1xuICAgICAgfVxuICAgICAgcmV0dXJuIE1lc3NhZ2UuU1VDQ0VTUztcbiAgICB9KTtcbiAgfTtcblxuICB0eXBlIFBpY2tOZnRTdG9yYWdlID0gUGljazxcbiAgICBPZmZjaGFpbixcbiAgICAnbmFtZScgfCAnc3ltYm9sJyB8ICdpb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HtcbiAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgIGlzUGFyc2VkSW5zdHJ1Y3Rpb24oaW5zdHJ1Y3Rpb24pICYmXG4gICAgICAgICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5UcmFuc2Zlci5wcm9ncmFtLmluY2x1ZGVzKFxuICAgICAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24ucHJvZ3JhbSxcbiAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIgPSBpbnN0cnVjdGlvbjtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICApO1xuXG4gICAgICAgICAgICAgICAgLy8gc3BsLXRva2VuIG9yIHN5c3RlbVxuICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIgJiZcbiAgICAgICAgICAgICAgICAgIG1vZHVsZU5hbWUgIT09IGluc3RydWN0aW9uVHJhbnNmZXJbJ3Byb2dyYW0nXVxuICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgZGVidWdMb2coXG4gICAgICAgICAgICAgICAgICAgICcjIEZpbHRlclR5cGUuTWVtbyBicmVhayBpbnN0cnVjdGlvbjogJyxcbiAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlcixcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAvLyBmZXRjaCBtZW1vIG9ubHkgdHJhbnNhY3Rpb25cbiAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLk1lbW8uaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyLFxuICAgICAgICAgICAgICAgICAgcG9zdFRva2VuQWNjb3VudCxcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLk9ubHlNZW1vOiB7XG4gICAgICAgICAgICAgIGlmIChGaWx0ZXJPcHRpb25zLk1lbW8ucHJvZ3JhbS5pbmNsdWRlcyhpbnN0cnVjdGlvbi5wcm9ncmFtKSkge1xuICAgICAgICAgICAgICAgIGxldCBpbnN0cnVjdGlvblRyYW5zZmVyO1xuXG4gICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5NZW1vLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlcixcbiAgICAgICAgICAgICAgICAgIHBvc3RUb2tlbkFjY291bnQsXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5NaW50OiB7XG4gICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLk1pbnQucHJvZ3JhbS5pbmNsdWRlcyhpbnN0cnVjdGlvbi5wcm9ncmFtKSAmJlxuICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuTWludC5hY3Rpb24uaW5jbHVkZXMoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbi5wYXJzZWQudHlwZSBhcyBzdHJpbmcsXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLk1pbnQuaW50b1VzZXJTaWRlKGluc3RydWN0aW9uLCB0eE1ldGEpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLlRyYW5zZmVyOlxuICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgbW9kdWxlTmFtZSA9PT0gaW5zdHJ1Y3Rpb24ucHJvZ3JhbSAmJlxuICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuVHJhbnNmZXIuYWN0aW9uLmluY2x1ZGVzKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24ucGFyc2VkLnR5cGUgYXMgc3RyaW5nLFxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgaWYgKGluc3RydWN0aW9uLnBhcnNlZC50eXBlID09PSAndHJhbnNmZXJDaGVja2VkJykge1xuICAgICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5UcmFuc2ZlckNoZWNrZWQuaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgICBwb3N0VG9rZW5BY2NvdW50LFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5UcmFuc2Zlci5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIH1cbiAgICA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QmFzZTU4KCldO1xuXG4gICAgY29uc3Qgc2lnbmVycyA9IG5ldyBTZXQ8c3RyaW5nPihmZWVQYXllclBrKTtcbiAgICBjb25zdCBhY2NvdW50cyA9IG5ldyBTZXQ8c3RyaW5nPihmZWVQYXllclBrKTtcblxuICAgIGNvbnN0IGl4c1NpemUgPSB0cmFuc2FjdGlvbi5pbnN0cnVjdGlvbnMucmVkdWNlKChhY2MsIGl4KSA9PiB7XG4gICAgICBpeC5rZXlzLmZvckVhY2goKHsgcHVia2V5LCBpc1NpZ25lciB9KSA9PiB7XG4gICAgICAgIGNvbnN0IHBrID0gcHVia2V5LnRvQmFzZTU4KCk7XG4gICAgICAgIGlmIChpc1NpZ25lcikgc2lnbmVycy5hZGQocGspO1xuICAgICAgICBhY2NvdW50cy5hZGQocGspO1xuICAgICAgfSk7XG5cbiAgICAgIGFjY291bnRzLmFkZChpeC5wcm9ncmFtSWQudG9CYXNlNTgoKSk7XG5cbiAgICAgIGNvbnN0IG5JbmRleGVzID0gaXgua2V5cy5sZW5ndGg7XG4gICAgICBjb25zdCBvcGFxdWVEYXRhID0gaXguZGF0YS5sZW5ndGg7XG5cbiAgICAgIHJldHVybiAoXG4gICAgICAgIGFjYyArXG4gICAgICAgIDEgKyAvLyBQSUQgaW5kZXhcbiAgICAgICAgY29tcGFjdEFycmF5U2l6ZShuSW5kZXhlcywgMSkgK1xuICAgICAgICBjb21wYWN0QXJyYXlTaXplKG9wYXF1ZURhdGEsIDEpXG4gICAgICApO1xuICAgIH0sIDApO1xuXG4gICAgcmV0dXJuIChcbiAgICAgIGNvbXBhY3RBcnJheVNpemUoc2lnbmVycy5zaXplLCA2NCkgKyAvLyBzaWduYXR1cmVzXG4gICAgICAzICsgLy8gaGVhZGVyXG4gICAgICBjb21wYWN0QXJyYXlTaXplKGFjY291bnRzLnNpemUsIDMyKSArIC8vIGFjY291bnRzXG4gICAgICAzMiArIC8vIGJsb2NraGFzaFxuICAgICAgY29tcGFjdEhlYWRlcih0cm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c2UgJ3JveWFsdHknOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5yb3lhbHR5KSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzUm95YWx0eShtZXRhZGF0YS5yb3lhbHR5KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlcl9mZWVfYmFzaXNfcG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJGZWVCYXNpc1BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0YWRhdGEubmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzeW1ib2wnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLnN5bWJvbCkge1xuICAgICAgICAgICAgICByZXMgPSBpc1N5bWJvbChtZXRhZGF0YS5zeW1ib2wpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAg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lzdCh0eE1ldGEpO1xuICAgICAgdHhNZXRhLnRyYW5zYWN0aW9uLm1lc3NhZ2UuaW5zdHJ1Y3Rpb25zLmZvckVhY2goKGluc3RydWN0aW9uKSA9PiB7XG4gICAgICAgIGlmIChpc1BhcnNlZEluc3RydWN0aW9uKGluc3RydWN0aW9uKSkge1xuICAgICAgICAgIHN3aXRjaCAoZmlsdGVyVHlwZSkge1xuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLk1lbW86IHtcbiAgICAgICAgICAgICAgaWYgKEZpbHRlck9wdGlvbnMuTWVtby5wcm9ncmFtLmluY2x1ZGVzKGluc3RydWN0aW9uLnByb2dyYW0pKSB7XG4gICAgICAgICAgICAgICAgbGV0IGluc3RydWN0aW9uVHJhbnNmZXI7XG5cbiAgICAgICAgICAgICAgICAvLyBmZXRjaCAgdHJhbnNmZXIgdHJhbnNhY3Rpb24gZm9yIHJlbGF0aW9uYWwgbWVtb1xuICAgICAgICAgICAgICAgIHR4TWV0YS50cmFuc2FjdGlvbi5tZXNzYWdlLmluc3RydWN0aW9ucy5mb3JFYWNoKFxuICAgICAgICAgICAgICAgICAgKGluc3RydWN0aW9uKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICBpc1BhcnNlZEluc3RydWN0aW9uKGluc3RydWN0aW9uKSAmJlxuICAgICAgICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuVHJhbnNmZXIucHJvZ3JhbS5pbmNsdWRlcyhcbiAgICAgICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLnByb2dyYW0sXG4gICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyID0gaW5zdHJ1Y3Rpb247XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgKTtcblxuICAgICAgICAgICAgICAgIC8vIHNwbC10b2tlbiBvciBzeXN0ZW1cbiAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyICYmXG4gICAgICAgICAgICAgICAgICBtb2R1bGVOYW1lICE9PSBpbnN0cnVjdGlvblRyYW5zZmVyWydwcm9ncmFtJ11cbiAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgIGRlYnVnTG9nKFxuICAgICAgICAgICAgICAgICAgICAnIyBGaWx0ZXJUeXBlLk1lbW8gYnJlYWsgaW5zdHJ1Y3Rpb246ICcsXG4gICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIsXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgLy8gZmV0Y2ggbWVtbyBvbmx5IHRyYW5zYWN0aW9uXG4gICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5NZW1vLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlcixcbiAgICAgICAgICAgICAgICAgIHBvc3RUb2tlbkFjY291bnQsXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5Pbmx5TWVtbzoge1xuICAgICAgICAgICAgICBpZiAoRmlsdGVyT3B0aW9ucy5NZW1vLnByb2dyYW0uaW5jbHVkZXMoaW5zdHJ1Y3Rpb24ucHJvZ3JhbSkpIHtcbiAgICAgICAgICAgICAgICBsZXQgaW5zdHJ1Y3Rpb25UcmFuc2ZlcjtcblxuICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuTWVtby5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIsXG4gICAgICAgICAgICAgICAgICBwb3N0VG9rZW5BY2NvdW50LFxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXNlIEZpbHRlclR5cGUuTWludDoge1xuICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5NaW50LnByb2dyYW0uaW5jbHVkZXMoaW5zdHJ1Y3Rpb24ucHJvZ3JhbSkgJiZcbiAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLk1pbnQuYWN0aW9uLmluY2x1ZGVzKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24ucGFyc2VkLnR5cGUgYXMgc3RyaW5nLFxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5NaW50LmludG9Vc2VyU2lkZShpbnN0cnVjdGlvbiwgdHhNZXRhKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5UcmFuc2ZlcjpcbiAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgIG1vZHVsZU5hbWUgPT09IGluc3RydWN0aW9uLnByb2dyYW0gJiZcbiAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLlRyYW5zZmVyLmFjdGlvbi5pbmNsdWRlcyhcbiAgICAgICAgICAgICAgICAg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EiLCAiQ29udmVydGVyIiwgIlRyYW5zZmVyQ2hlY2tlZCIsICJDb252ZXJ0ZXIiLCAiVHJhbnNmZXIiLCAiQ29udmVydGVyIiwgIlZhbGlkYXRvciIsICJNZXNzYWdlIiwgIkNvbnZlcnRlciIsICJpbXBvcnRfd2ViMyIsICJOb2RlIiwgIlJlc3VsdCIsICJTaWduYXR1cmVzIiwgIlJlc3VsdCIsICJUcmFuc2FjdGlvbkZpbHRlciIsICJpbnN0cnVjdGlvbiIsICJDb252ZXJ0ZXIiXQp9Cg== \ No newline at end of file diff --git a/packages/transaction-filter/dist/index.mjs b/packages/transaction-filter/dist/index.mjs index c032f35e3..80f1705d9 100644 --- a/packages/transaction-filter/dist/index.mjs +++ b/packages/transaction-filter/dist/index.mjs @@ -1570,4 +1570,4 @@ export { Signatures, TransactionFilter }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9iYXRjaC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jb21tb24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvbWludC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9wYXJ0aWFsLXNpZ24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY2FsY3VsYXRlLXR4c2l6ZS50cyIsICIuLi8uLi9nbG9iYWwvc3JjL2luZGV4LnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2tleXBhaXIudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvcGRhLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2luZGV4LnRz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xhci1uZnQnO1xuaW1wb3J0IHsgSW50ZXJuYWxDcmVhdG9ycyB9IGZyb20gJ34vdHlwZXMvY29udmVydGVyJztcblxuZXhwb3J0IG5hbWVzcGFjZSBDb252ZXJ0ZXIge1xuICBleHBvcnQgbmFtZXNwYWNlIENyZWF0b3JzIHtcbiAgICBleHBvcnQgY29uc3QgaW50b0luZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IE9wdGlvbjxJbnRlcm5hbENyZWF0b3JzW10+ID0+IHtcbiAgICAgIGlmICghaW5wdXQpIHtcbiAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICB9XG4gICAgICByZXR1cm4gaW5wdXQubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvQ29tcHJlc3NlZE5mdEluZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IEludGVybmFsQ3JlYXRvcnNbXSA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBbXTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBpbnB1dCEubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1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PSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEuc3ltYm9sKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU3ltYm9sKG1ldGFkYXRhLnN5bWJvbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAocmVzICYmIHJlcy5pc0Vycikge1xuICAgICAgICAgIHJlc3VsdHMucHVzaCguLi5yZXMuZXJyb3IuZGV0YWlscyk7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgICAgaWYgKHJlc3VsdHMubGVuZ3RoID4gMCkge1xuICAgICAgICBjb25zdCBtZXNzYWdlID1cbiAgICAgICAgICAnQ2F1Z2h0IGluIHRoZSB2YWxpZGF0aW9uIGVycm9ycy4gc2VlIGluZm9ybWF0aW9uIGUuZzogZXJyPFZhbGlkYXRvckVycm9yPi5kZXRhaWxzJztcbiAgICAgICAgdGhyb3cgbmV3I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gICAgICAgICAgICAgIC8vIGZldGNoICB0cmFuc2ZlciB0cmFuc2FjdGlvbiBmb3IgcmVsYXRpb25hbCBtZW1vXG4gICAgICAgICAgICAgICAgdHhNZXRhLnRyYW5zYWN0aW9uLm1lc3NhZ2UuaW5zdHJ1Y3Rpb25zLmZvckVhY2goXG4gICAgICAgICAgICAgICAgICAoaW5zdHJ1Y3Rpb24pID0+IHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgIGlzUGFyc2VkSW5zdHJ1Y3Rpb24oaW5zdHJ1Y3Rpb24pICYmXG4gICAgICAgICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5UcmFuc2Zlci5wcm9ncmFtLmluY2x1ZGVzKFxuICAgICAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24ucHJvZ3JhbSxcbiAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIgPSBpbnN0cnVjdGlvbjtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICApO1xuXG4gICAgICAgICAgICAgICAgLy8gc3BsLXRva2VuIG9yIHN5c3RlbVxuICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIgJiZcbiAgICAgICAgICAgICAgICAgIG1vZHVsZU5hbWUgIT09IGluc3RydWN0aW9uVHJhbnNmZXJbJ3Byb2dyYW0nXVxuICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgZGVidWdMb2coXG4gICAgICAgICAgICAgICAgICAgICcjIEZpbHRlclR5cGUuTWVtbyBicmVhayBpbnN0cnVjdGlvbjogJyxcbiAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlcixcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAvLyBmZXRjaCBtZW1vIG9ubHkgdHJhbnNhY3Rpb25cbiAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLk1lbW8uaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyLFxuICAgICAgICAgICAgICAgICAgcG9zdFRva2VuQWNjb3VudCxcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLk9ubHlNZW1vOiB7XG4gICAgICAgICAgICAgIGlmIChGaWx0ZXJPcHRpb25zLk1lbW8ucHJvZ3JhbS5pbmNsdWRlcyhpbnN0cnVjdGlvbi5wcm9ncmFtKSkge1xuICAgICAgICAgICAgICAgIGxldCBpbnN0cnVjdGlvblRyYW5zZmVyO1xuXG4gICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5NZW1vLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlcixcbiAgICAgICAgICAgICAgICAgIHBvc3RUb2tlbkFjY291bnQsXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5NaW50OiB7XG4gICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLk1pbnQucHJvZ3JhbS5pbmNsdWRlcyhpbnN0cnVjdGlvbi5wcm9ncmFtKSAmJlxuICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuTWludC5hY3Rpb24uaW5jbHVkZXMoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbi5wYXJzZWQudHlwZSBhcyBzdHJpbmcsXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLk1pbnQuaW50b1VzZXJTaWRlKGluc3RydWN0aW9uLCB0eE1ldGEpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLlRyYW5zZmVyOlxuICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgbW9kdWxlTmFtZSA9PT0gaW5zdHJ1Y3Rpb24ucHJvZ3JhbSAmJlxuICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuVHJhbnNmZXIuYWN0aW9uLmluY2x1ZGVzKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24ucGFyc2VkLnR5cGUgYXMgc3RyaW5nLFxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgaWYgKGluc3RydWN0aW9uLnBhcnNlZC50eXBlID09PSAndHJhbnNmZXJDaGVja2VkJykge1xuICAgICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5UcmFuc2ZlckNoZWNrZWQuaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgICBwb3N0VG9rZW5BY2NvdW50LFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICA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HJldHVybiBudWxsO1xuICAgICAgfVxuICAgICAgcmV0dXJuIGlucHV0Lm1hcCgoZGF0YSkgPT4ge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIGFkZHJlc3M6IGRhdGEuYWRkcmVzcy50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIHNoYXJlOiBkYXRhLnNoYXJlLFxuICAgICAgICAgIHZlcmlmaWVkOiBmYWxzZSxcbiAgICAgICAgfTtcbiAgICAgIH0pO1xuICAgIH07XG5cbiAgICBleHBvcnQgY29uc3QgaW50b0NvbXByZXNzZWROZnRJbmZyYSA9IChcbiAgICAgIGlucHV0OiBPcHRpb248SW5wdXRDcmVhdG9yc1tdPiB8IHVuZGVmaW5lZCxcbiAgICApOiBJbnRlcm5hbENyZWF0b3JzW10gPT4ge1xuICAgICAgaWYgKCFpbnB1dCkge1xuICAgICAgICByZXR1cm4gW107XG4gICAgICB9XG4gICAgICByZXR1cm4gaW5wdXQhLm1hcCgoZGF0YSkgPT4ge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIGFkZHJlc3M6IGRhdGEuYWRkcmVzcy50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIHNoYXJlOiBkYXRhLnNoYXJlLFxuICAgICAgICAgIHZlcmlmaWVkOiBmYWxzZSxcbiAgICAgICAgfTtcbiAgICAgIH0pO1xuICAgIH07XG5cbiAgICBleHBvcnQgY29uc3QgaW50b1VzZXIgPSAoXG4gICAgICBvdXRwdXQ6IE9wdGlvbjxJbnRlcm5hbENyZWF0b3JzW10+LFxuICAgICk6IENyZWF0b3JzW10gfCB1bmRlZmluZWQgPT4ge1xuICAgICAgaWYgKCFvdXRwdXQpIHtcbiAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG91dHB1dC5tYXAoKGRhdGEpID0+IHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICBhZGRyZXNzOiBkYXRhLmFkZHJlc3Mud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yZXQsXG4gICAgICApID0+IFByb21pc2U8UmVzdWx0PHN0cmluZywgRXJyb3I+PixcbiAgICAgIHN0b3JhZ2VUeXBlOiBTdG9yYWdlVHlwZSxcbiAgICAgIGZlZVBheWVyPzogU2VjcmV0LFxuICAgICk6IFByb21pc2U8UHJvcGVydGllcz4gPT4ge1xuICAgICAgaWYgKCFpbnB1dCB8fCAhaW5wdXQuZmlsZXMpIHtcbiAgICAgICAgcmV0dXJuIHt9O1xuICAgICAgfVxuXG4gICAgICBjb25zdCBmaWxlcyA9IGF3YWl0IFByb21pc2UuYWxsKFxuICAgICAgICBpbnB1dC5maWxlcy5tYXAoYXN5bmMgKGZpbGUpID0+IHtcbiAgICAgICAgICBpZiAoIWZpbGUuZmlsZVBhdGgpIHtcbiAgICAgICAgICAgIHJldHVybiB7fTtcbiAgICAgICAgICB9XG4gICAgICAgICAgY29uc3QgcmVzID0gYXdhaXQgY2FsbGJhY2tGdW5jKGZpbGUuZmlsZVBhdGgsIHN0b3JhZ2VUeXBlLCBmZWVQYXllcik7XG4gICAgICAgICAgaWYgKHJlcy5pc0Vycikge1xuICAgICAgICAgICAgdGhyb3cgRXJyb3IocmVzLmVycm9yLm1lc3NhZ2UpO1xuICAgICAgICAgIH1cbiAgICAgICAgICByZXR1cm4gb3ZlcndyaXRlT2JqZWN0KGZpbGUsIFtcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgZXhpc3RzS2V5OiAnZmlsZVBhdGgnLFxuICAgICAgICAgICAgICB3aWxsOiB7IGtleTogJ3VyaScsIHZhbHVlOiByZXMudmFsdWUgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgXSk7XG4gICAgICAgIH0pLFxuICAgICAgKTtcbiAgICAgIHJldHVybiB7IC4uLmlucHV0LCBmaWxlcyB9IGFzIFByb3BlcnRpZXM7XG4gICAgfTtcbiAgfVxufVxuIiwgIi8qIGVzbGludC1kaXNhYmxlIEB0eXBlc2NyaXB0LWVzbGludC9uby11bnVzZW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Gluc3RydWN0aW9uKSAmJlxuICAgICAgICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuVHJhbnNmZXIucHJvZ3JhbS5pbmNsdWRlcyhcbiAgICAgICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLnByb2dyYW0sXG4gICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyID0gaW5zdHJ1Y3Rpb247XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgKTtcblxuICAgICAgICAgICAgICAgIC8vIHNwbC10b2tlbiBvciBzeXN0ZW1cbiAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyICYmXG4gICAgICAgICAgICAgICAgICBtb2R1bGVOYW1lICE9PSBpbnN0cnVjdGlvblRyYW5zZmVyWydwcm9ncmFtJ11cbiAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgIGRlYnVnTG9nKFxuICAgICAgICAgICAgICAgICAgICAnIyBGaWx0ZXJUeXBlLk1lbW8gYnJlYWsgaW5zdHJ1Y3Rpb246ICcsXG4gICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIsXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgLy8gZmV0Y2ggbWVtbyBvbmx5IHRyYW5zYWN0aW9uXG4gICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5NZW1vLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlcixcbiAgICAgICAgICAgICAgICAgIHBvc3RUb2tlbkFjY291bnQsXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5Pbmx5TWVtbzoge1xuICAgICAgICAgICAgICBpZiAoRmlsdGVyT3B0aW9ucy5NZW1vLnByb2dyYW0uaW5jbHVkZXMoaW5zdHJ1Y3Rpb24ucHJvZ3JhbSkpIHtcbiAgICAgICAgICAgICAgICBsZXQgaW5zdHJ1Y3Rpb25UcmFuc2ZlcjtcblxuICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuTWVtby5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIsXG4gICAgICAgICAgICAgICAgICBwb3N0VG9rZW5BY2NvdW50LFxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXNlIEZpbHRlclR5cGUuTWludDoge1xuICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5NaW50LnByb2dyYW0uaW5jbHVkZXMoaW5zdHJ1Y3Rpb24ucHJvZ3JhbSkgJiZcbiAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLk1pbnQuYWN0aW9uLmluY2x1ZGVzKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24ucGFyc2VkLnR5cGUgYXMgc3RyaW5nLFxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5NaW50LmludG9Vc2VyU2lkZShpbnN0cnVjdGlvbiwgdHhNZXRhKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5UcmFuc2ZlcjpcbiAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgIG1vZHVsZU5hbWUgPT09IGluc3RydWN0aW9uLnByb2dyYW0gJiZcbiAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLlRyYW5zZmVyLmFjdGlvbi5pbmNsdWRlcyhcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLnBhcnNlZC50eXBlIGFzIHN0cmluZyxcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgIGlmIChpbnN0cnVjdGlvbi5wYXJzZWQudHlwZSA9PT0gJ3RyYW5zZmVyQ2hlY2tlZCcpIHtcbiAgICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuVHJhbnNmZXJDaGVja2VkLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgICAgcG9zdFRva2VuQWNjb3VudCxcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuVHJhbnNmZXIuaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgICAgcm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lwYWlyIiwgIlB1YmxpY0tleSIsICJQdWJsaWNLZXkiLCAiQWNjb3VudCIsICJLZXlwYWlyIiwgIlB1YmxpY0tleSIsICJBY2NvdW50IiwgIlBkYSIsICJBY2NvdW50IiwgImJzIiwgIkFjY291bnQiLCAiUHVibGljS2V5IiwgIktleXBhaXIiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlJlc3VsdCIsICJSZXN1bHQiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIkNvbnZlcnRlciIsICJDb2xsZWN0aW9uIiwgIkNvbGxlY3Rpb25NaW50IiwgIkNvbnZlcnRlciIsICJDcmVhdG9ycyIsICJDb252ZXJ0ZXIiLCAiQ29tcHJlc3NlZE5mdE1ldGFkYXRhIiwgIkNvbnZlcnRlciIsICJSb3lhbHR5IiwgIkNvbnZlcnRlciIsICJOZnQiLCAiQ29udmVydGVyIiwgIk1lbW8iLCAiQ29udmVydGVyIiwgIk1pbnQiLCAiQ29udmVydGVyIiwgIlJlZ3VsYXJOZnRNZXRhZGF0YSIsICJDb252ZXJ0ZXIiLCAiUHJvcGVydGllcyIsICJDb252ZXJ0ZXIiLCAiVXNlcyIsICJDb252ZXJ0ZXIiLCAiVG9rZW5NZXRhZGF0YSIsICJDb252ZXJ0ZXIiLCAiVHJhbnNmZXJDaGVja2VkIiwgIkNvbnZlcnRlciIsICJUcmFuc2ZlciIsICJDb252ZXJ0ZXIiLCAiVmFsaWRhdG9yIiwgIk1lc3NhZ2UiLCAiQ29udmVydGVyIiwgIk5vZGUiLCAiUmVzdWx0IiwgIlNpZ25hdHVyZXMiLCAiUmVzdWx0IiwgIlRyYW5zYWN0aW9uRmlsdGVyIiwgImluc3RydWN0aW9uIiwgIkNvbnZlcnRlciJdCn0K \ No newline at end of file diff --git a/packages/types/dist/account.d.mts b/packages/types/dist/account.d.mts new file mode 100644 index 000000000..4b6a54e14 --- /dev/null +++ b/packages/types/dist/account.d.mts @@ -0,0 +1,19 @@ +declare const pubKeyNominality: unique symbol; +declare const secretNominality: unique symbol; +type Pubkey = (string & { + [pubKeyNominality]: never; +}) | string; +type Secret = (string & { + [secretNominality]: never; +}) | string; +type KeypairAccount = { + pubkey: Pubkey; + secret: Secret; +}; +type OwnerInfo = { + sol: number; + lamports: number; + owner: string; +}; + +export { KeypairAccount, OwnerInfo, Pubkey, Secret }; diff --git a/packages/types/dist/account.d.ts b/packages/types/dist/account.d.ts new file mode 100644 index 000000000..4b6a54e14 --- /dev/null +++ b/packages/types/dist/account.d.ts @@ -0,0 +1,19 @@ +declare const pubKeyNominality: unique symbol; +declare const secretNominality: unique symbol; +type Pubkey = (string & { + [pubKeyNominality]: never; +}) | string; +type Secret = (string & { + [secretNominality]: never; +}) | string; +type KeypairAccount = { + pubkey: Pubkey; + secret: Secret; +}; +type OwnerInfo = { + sol: number; + lamports: number; + owner: string; +}; + +export { KeypairAccount, OwnerInfo, Pubkey, Secret }; diff --git a/packages/types/dist/airdrop.d.mts b/packages/types/dist/airdrop.d.mts new file mode 100644 index 000000000..80c79f26c --- /dev/null +++ b/packages/types/dist/airdrop.d.mts @@ -0,0 +1,5 @@ +type AirdropOptions = { + dropAmount: number; +}; + +export { AirdropOptions }; diff --git a/packages/types/dist/airdrop.d.ts b/packages/types/dist/airdrop.d.ts new file mode 100644 index 000000000..80c79f26c --- /dev/null +++ b/packages/types/dist/airdrop.d.ts @@ -0,0 +1,5 @@ +type AirdropOptions = { + dropAmount: number; +}; + +export { AirdropOptions }; diff --git a/packages/types/dist/compressed-nft.d.mts b/packages/types/dist/compressed-nft.d.mts new file mode 100644 index 000000000..0194bff4c --- /dev/null +++ b/packages/types/dist/compressed-nft.d.mts @@ -0,0 +1,23 @@ +import { Pubkey, Secret } from './account.mjs'; + +type DelegateOptions = { + delegate: Pubkey; +}; + +type MintOptions = { + receiver: Pubkey; + delegate: Pubkey; + feePayer: Secret; +}; + +type MintCollectionOptions = { + freezeAuthority: Pubkey; + feePayer: Secret; +}; + +type SpaceOptions = { + feePayer: Secret; +}; +type SpaceNumber = 8 | 16000 | 100000 | 16700000 | 67000000 | 1000000000; + +export { DelegateOptions, MintCollectionOptions, MintOptions, SpaceNumber, SpaceOptions }; diff --git a/packages/types/dist/compressed-nft.d.ts b/packages/types/dist/compressed-nft.d.ts new file mode 100644 index 000000000..4c617b1b8 --- /dev/null +++ b/packages/types/dist/compressed-nft.d.ts @@ -0,0 +1,23 @@ +import { Pubkey, Secret } from './account.js'; + +type DelegateOptions = { + delegate: Pubkey; +}; + +type MintOptions = { + receiver: Pubkey; + delegate: Pubkey; + feePayer: Secret; +}; + +type MintCollectionOptions = { + freezeAuthority: Pubkey; + feePayer: Secret; +}; + +type SpaceOptions = { + feePayer: Secret; +}; +type SpaceNumber = 8 | 16000 | 100000 | 16700000 | 67000000 | 1000000000; + +export { DelegateOptions, MintCollectionOptions, MintOptions, SpaceNumber, SpaceOptions }; diff --git a/packages/types/dist/converter.d.mts b/packages/types/dist/converter.d.mts new file mode 100644 index 000000000..3ded3deb6 --- /dev/null +++ b/packages/types/dist/converter.d.mts @@ -0,0 +1,13 @@ +import { PublicKey } from '@solana/web3.js'; + +type InternalCollection = { + key: PublicKey; + verified: boolean; +}; +type InternalCreators = { + address: PublicKey; + verified: boolean; + share: number; +}; + +export { InternalCollection, InternalCreators }; diff --git a/packages/types/dist/converter.d.ts b/packages/types/dist/converter.d.ts new file mode 100644 index 000000000..3ded3deb6 --- /dev/null +++ b/packages/types/dist/converter.d.ts @@ -0,0 +1,13 @@ +import { PublicKey } from '@solana/web3.js'; + +type InternalCollection = { + key: PublicKey; + verified: boolean; +}; +type InternalCreators = { + address: PublicKey; + verified: boolean; + share: number; +}; + +export { InternalCollection, InternalCreators }; diff --git a/packages/types/dist/das-api.d.mts b/packages/types/dist/das-api.d.mts new file mode 100644 index 000000000..ad274718d --- /dev/null +++ b/packages/types/dist/das-api.d.mts @@ -0,0 +1,76 @@ +import { InternalCreators } from './converter.mjs'; +import { Pubkey } from './account.mjs'; +import '@solana/web3.js'; + +type AssetProof = { + leaf: Pubkey; + node_index: number; + proof: Pubkey[]; + root: Pubkey; + tree_id: Pubkey; +}; +type Metadata = { + name: string; + symbol: string; + token_standard: string; +}; +type Grouping = { + group_key: string; + group_value: string; +}; +type Asset = { + interface: string; + id: Pubkey; + content: { + json_uri: string; + files: string[]; + metadata: Metadata; + links: string[]; + }; + authorities: { + address: Pubkey; + scopes: string[]; + }[]; + compression: { + eligible: boolean; + compressed: boolean; + data_hash: Pubkey; + creator_hash: Pubkey; + asset_hash: Pubkey; + tree: Pubkey; + seq: number; + leaf_id: number; + }; + grouping: Grouping[]; + royalty: { + royalty_model: 'creators' | 'fanout' | 'single'; + target: null; + percent: number; + basis_points: number; + primary_sale_happened: boolean; + locked: boolean; + }; + creators: InternalCreators[]; + ownership: { + frozen: boolean; + delegated: boolean; + delegate: Pubkey; + ownership_model: 'single' | 'token'; + owner: Pubkey; + }; + supply: { + print_max_supply: number; + print_current_supply: number; + edition_nonce: number; + }; + mutable: boolean; + burnt: boolean; +}; +type Assets = { + total: number; + limit: number; + page: number; + items: Asset[]; +}; + +export { Asset, AssetProof, Assets, Grouping, Metadata }; diff --git a/packages/types/dist/das-api.d.ts b/packages/types/dist/das-api.d.ts new file mode 100644 index 000000000..d96adbe9f --- /dev/null +++ b/packages/types/dist/das-api.d.ts @@ -0,0 +1,76 @@ +import { InternalCreators } from './converter.js'; +import { Pubkey } from './account.js'; +import '@solana/web3.js'; + +type AssetProof = { + leaf: Pubkey; + node_index: number; + proof: Pubkey[]; + root: Pubkey; + tree_id: Pubkey; +}; +type Metadata = { + name: string; + symbol: string; + token_standard: string; +}; +type Grouping = { + group_key: string; + group_value: string; +}; +type Asset = { + interface: string; + id: Pubkey; + content: { + json_uri: string; + files: string[]; + metadata: Metadata; + links: string[]; + }; + authorities: { + address: Pubkey; + scopes: string[]; + }[]; + compression: { + eligible: boolean; + compressed: boolean; + data_hash: Pubkey; + creator_hash: Pubkey; + asset_hash: Pubkey; + tree: Pubkey; + seq: number; + leaf_id: number; + }; + grouping: Grouping[]; + royalty: { + royalty_model: 'creators' | 'fanout' | 'single'; + target: null; + percent: number; + basis_points: number; + primary_sale_happened: boolean; + locked: boolean; + }; + creators: InternalCreators[]; + ownership: { + frozen: boolean; + delegated: boolean; + delegate: Pubkey; + ownership_model: 'single' | 'token'; + owner: Pubkey; + }; + supply: { + print_max_supply: number; + print_current_supply: number; + edition_nonce: number; + }; + mutable: boolean; + burnt: boolean; +}; +type Assets = { + total: number; + limit: number; + page: number; + items: Asset[]; +}; + +export { Asset, AssetProof, Assets, Grouping, Metadata }; diff --git a/packages/types/dist/find.d.mts b/packages/types/dist/find.d.mts new file mode 100644 index 000000000..a717edb8d --- /dev/null +++ b/packages/types/dist/find.d.mts @@ -0,0 +1,41 @@ +import { Pubkey } from './account.mjs'; + +declare enum SortDirection { + Asc = "asc", + Desc = "desc" +} +declare enum SortBy { + Created = "created", + Updated = "updated", + Recent = "recent_action" +} +type Sortable = { + sortBy: SortBy; + sortDirection: SortDirection; +}; +type FindOptions = { + limit: number; + page: number; + sortBy: Sortable; + before: string; + after: string; +}; +type Find = { + sol?: string; + account?: string; + destination?: Pubkey; + source?: Pubkey; + authority?: Pubkey; + multisigAuthority?: Pubkey; + signers?: Pubkey[]; + mint?: Pubkey; + mintAuthority?: Pubkey; + tokenAmount?: string; + memo?: string; + dateTime?: Date; + type?: string; + sig?: string; + innerInstruction?: boolean; +}; + +export { Find, FindOptions, SortBy, SortDirection, Sortable }; diff --git a/packages/types/dist/find.d.ts b/packages/types/dist/find.d.ts new file mode 100644 index 000000000..43350cc69 --- /dev/null +++ b/packages/types/dist/find.d.ts @@ -0,0 +1,41 @@ +import { Pubkey } from './account.js'; + +declare enum SortDirection { + Asc = "asc", + Desc = "desc" +} +declare enum SortBy { + Created = "created", + Updated = "updated", + Recent = "recent_action" +} +type Sortable = { + sortBy: SortBy; + sortDirection: SortDirection; +}; +type FindOptions = { + limit: number; + page: number; + sortBy: Sortable; + before: string; + after: string; +}; +type Find = { + sol?: string; + account?: string; + destination?: Pubkey; + source?: Pubkey; + authority?: Pubkey; + multisigAuthority?: Pubkey; + signers?: Pubkey[]; + mint?: Pubkey; + mintAuthority?: Pubkey; + tokenAmount?: string; + memo?: string; + dateTime?: Date; + type?: string; + sig?: string; + innerInstruction?: boolean; +}; + +export { Find, FindOptions, SortBy, SortDirection, Sortable }; diff --git a/packages/types/dist/global.d.mts b/packages/types/dist/global.d.mts new file mode 100644 index 000000000..bffa1a7fa --- /dev/null +++ b/packages/types/dist/global.d.mts @@ -0,0 +1,32 @@ +import { PublicKey, Keypair } from '@solana/web3.js'; + +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; +}; + +export { Explorer, ExplorerOptions }; diff --git a/packages/types/dist/global.d.ts b/packages/types/dist/global.d.ts new file mode 100644 index 000000000..bffa1a7fa --- /dev/null +++ b/packages/types/dist/global.d.ts @@ -0,0 +1,32 @@ +import { PublicKey, Keypair } from '@solana/web3.js'; + +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; +}; + +export { Explorer, ExplorerOptions }; diff --git a/packages/types/dist/history.d.mts b/packages/types/dist/history.d.mts new file mode 100644 index 000000000..8071fda16 --- /dev/null +++ b/packages/types/dist/history.d.mts @@ -0,0 +1,25 @@ +import { Pubkey } from './account.mjs'; + +type History = { + sol?: string; + account?: string; + destination?: Pubkey; + source?: Pubkey; + authority?: Pubkey; + multisigAuthority?: Pubkey; + signers?: Pubkey[]; + mint?: Pubkey; + mintAuthority?: Pubkey; + tokenAmount?: string; + memo?: string; + dateTime?: Date; + type?: string; + sig?: string; + innerInstruction?: boolean; +}; +type FindOptions = { + waitTime: number; + narrowDown: number; +}; + +export { FindOptions, History }; diff --git a/packages/types/dist/history.d.ts b/packages/types/dist/history.d.ts new file mode 100644 index 000000000..bbccb381b --- /dev/null +++ b/packages/types/dist/history.d.ts @@ -0,0 +1,25 @@ +import { Pubkey } from './account.js'; + +type History = { + sol?: string; + account?: string; + destination?: Pubkey; + source?: Pubkey; + authority?: Pubkey; + multisigAuthority?: Pubkey; + signers?: Pubkey[]; + mint?: Pubkey; + mintAuthority?: Pubkey; + tokenAmount?: string; + memo?: string; + dateTime?: Date; + type?: string; + sig?: string; + innerInstruction?: boolean; +}; +type FindOptions = { + waitTime: number; + narrowDown: number; +}; + +export { FindOptions, History }; diff --git a/packages/types/dist/memo.d.mts b/packages/types/dist/memo.d.mts new file mode 100644 index 000000000..3d3bb48ce --- /dev/null +++ b/packages/types/dist/memo.d.mts @@ -0,0 +1,7 @@ +import { Secret } from './account.mjs'; + +type MemoOptions = { + feePayer: Secret; +}; + +export { MemoOptions }; diff --git a/packages/types/dist/memo.d.ts b/packages/types/dist/memo.d.ts new file mode 100644 index 000000000..e7c2bbf75 --- /dev/null +++ b/packages/types/dist/memo.d.ts @@ -0,0 +1,7 @@ +import { Secret } from './account.js'; + +type MemoOptions = { + feePayer: Secret; +}; + +export { MemoOptions }; diff --git a/packages/types/dist/mint-08f26d69.d.ts b/packages/types/dist/mint-08f26d69.d.ts new file mode 100644 index 000000000..a4ef3afad --- /dev/null +++ b/packages/types/dist/mint-08f26d69.d.ts @@ -0,0 +1,55 @@ +import { Pubkey, Secret } from './account.js'; +import { StorageType, FileType, Attribute, Properties } from './storage.js'; +import BN from 'bn.js'; + +type bignum = number | BN; +type Option = T | null; +declare enum UseMethod { + Burn = 0, + Multiple = 1, + Single = 2 +} +type Uses = { + useMethod: UseMethod; + remaining: bignum; + total: bignum; +}; +type Creators = { + address: Pubkey; + share: number; + verified: boolean; +}; +type InputCreators = { + address: Pubkey; + secret: Secret; + share: number; +}; + +type InputCollection = Pubkey; +type Options = { + [key: string]: unknown; +}; +type InputNftMetadata = { + name: string; + symbol: string; + royalty?: number; + storageType?: StorageType; + filePath?: FileType; + uri?: string; + isMutable?: boolean; + description?: string; + external_url?: string; + attributes?: Attribute[]; + properties?: Properties; + maxSupply?: bignum; + creators?: InputCreators[]; + uses?: Uses; + collection?: InputCollection; + options?: Options; +}; +type MintOptions = { + freezeAuthority: Pubkey; + feePayer: Secret; +}; + +export { Creators as C, InputCreators as I, MintOptions as M, Options as O, Uses as U, Option as a, bignum as b, UseMethod as c, InputCollection as d, InputNftMetadata as e }; diff --git a/packages/types/dist/mint-74b505a0.d.ts b/packages/types/dist/mint-74b505a0.d.ts new file mode 100644 index 000000000..9cc11e20c --- /dev/null +++ b/packages/types/dist/mint-74b505a0.d.ts @@ -0,0 +1,55 @@ +import { Pubkey, Secret } from './account.mjs'; +import { StorageType, FileType, Attribute, Properties } from './storage.mjs'; +import BN from 'bn.js'; + +type bignum = number | BN; +type Option = T | null; +declare enum UseMethod { + Burn = 0, + Multiple = 1, + Single = 2 +} +type Uses = { + useMethod: UseMethod; + remaining: bignum; + total: bignum; +}; +type Creators = { + address: Pubkey; + share: number; + verified: boolean; +}; +type InputCreators = { + address: Pubkey; + secret: Secret; + share: number; +}; + +type InputCollection = Pubkey; +type Options = { + [key: string]: unknown; +}; +type InputNftMetadata = { + name: string; + symbol: string; + royalty?: number; + storageType?: StorageType; + filePath?: FileType; + uri?: string; + isMutable?: boolean; + description?: string; + external_url?: string; + attributes?: Attribute[]; + properties?: Properties; + maxSupply?: bignum; + creators?: InputCreators[]; + uses?: Uses; + collection?: InputCollection; + options?: Options; +}; +type MintOptions = { + freezeAuthority: Pubkey; + feePayer: Secret; +}; + +export { Creators as C, InputCreators as I, MintOptions as M, Options as O, Uses as U, Option as a, bignum as b, UseMethod as c, InputCollection as d, InputNftMetadata as e }; diff --git a/packages/types/dist/nft.d.mts b/packages/types/dist/nft.d.mts new file mode 100644 index 000000000..49d0f6a0a --- /dev/null +++ b/packages/types/dist/nft.d.mts @@ -0,0 +1,43 @@ +import { Pubkey } from './account.mjs'; +import { Offchain } from './storage.mjs'; +import '@solana/web3.js'; +import './phantom-e9a40784.js'; +import './das-api.mjs'; +import './converter.mjs'; +import '@metaplex-foundation/mpl-token-metadata'; + +type Authority = { + address: Pubkey; + scopes: string[]; +}; +type Creators = { + address: Pubkey; + share: number; + verified: boolean; +}[]; +type Metadata = { + mint: Pubkey; + collectionMint: Pubkey; + authorities: Authority[]; + royalty: number; + name: string; + symbol: string; + uri: string; + creators: Creators; + treeAddress: Pubkey; + isCompressed: boolean; + isMutable: boolean; + isBurn: boolean; + editionNonce: number; + primarySaleHappened: boolean; + dateTime: Date; + offchain: Offchain; +}; +type NftMetadata = { + page: number; + total: number; + limit: number; + metadatas: Metadata[]; +}; + +export { Authority, Creators, Metadata, NftMetadata }; diff --git a/packages/types/dist/nft.d.ts b/packages/types/dist/nft.d.ts new file mode 100644 index 000000000..124ec7896 --- /dev/null +++ b/packages/types/dist/nft.d.ts @@ -0,0 +1,43 @@ +import { Pubkey } from './account.js'; +import { Offchain } from './storage.js'; +import '@solana/web3.js'; +import './phantom-e9a40784.js'; +import './das-api.js'; +import './converter.js'; +import '@metaplex-foundation/mpl-token-metadata'; + +type Authority = { + address: Pubkey; + scopes: string[]; +}; +type Creators = { + address: Pubkey; + share: number; + verified: boolean; +}[]; +type Metadata = { + mint: Pubkey; + collectionMint: Pubkey; + authorities: Authority[]; + royalty: number; + name: string; + symbol: string; + uri: string; + creators: Creators; + treeAddress: Pubkey; + isCompressed: boolean; + isMutable: boolean; + isBurn: boolean; + editionNonce: number; + primarySaleHappened: boolean; + dateTime: Date; + offchain: Offchain; +}; +type NftMetadata = { + page: number; + total: number; + limit: number; + metadatas: Metadata[]; +}; + +export { Authority, Creators, Metadata, NftMetadata }; diff --git a/packages/types/dist/phantom-e9a40784.d.ts b/packages/types/dist/phantom-e9a40784.d.ts new file mode 100644 index 000000000..820828ce4 --- /dev/null +++ b/packages/types/dist/phantom-e9a40784.d.ts @@ -0,0 +1,16 @@ +import { PublicKey, Transaction } from '@solana/web3.js'; + +type connectOption = { + onlyIfTrusted: false; +}; +type PhantomProvider = { + isPhantom?: boolean; + publicKey: PublicKey | null; + signTransaction(transaction: Transaction): Promise; + signAllTransactions(transactions: Transaction[]): Promise; + signMessage(message: Uint8Array): Promise; + connect(): Promise; + disconnect(): Promise; +}; + +export { PhantomProvider as P, connectOption as c }; diff --git a/packages/types/dist/phantom.d.mts b/packages/types/dist/phantom.d.mts new file mode 100644 index 000000000..5846ba175 --- /dev/null +++ b/packages/types/dist/phantom.d.mts @@ -0,0 +1,9 @@ +import { Keypair, Transaction } from '@solana/web3.js'; +export { P as PhantomProvider, c as connectOption } from './phantom-e9a40784.js'; + +type InitializeMint = { + mint: Keypair; + tx: Transaction; +}; + +export { InitializeMint }; diff --git a/packages/types/dist/phantom.d.ts b/packages/types/dist/phantom.d.ts new file mode 100644 index 000000000..5846ba175 --- /dev/null +++ b/packages/types/dist/phantom.d.ts @@ -0,0 +1,9 @@ +import { Keypair, Transaction } from '@solana/web3.js'; +export { P as PhantomProvider, c as connectOption } from './phantom-e9a40784.js'; + +type InitializeMint = { + mint: Keypair; + tx: Transaction; +}; + +export { InitializeMint }; diff --git a/packages/types/dist/regular-nft.d.mts b/packages/types/dist/regular-nft.d.mts new file mode 100644 index 000000000..9eb67573f --- /dev/null +++ b/packages/types/dist/regular-nft.d.mts @@ -0,0 +1,41 @@ +import { Secret, Pubkey } from './account.mjs'; +export { C as Creators, d as InputCollection, I as InputCreators, e as InputNftMetadata, M as MintOptions, a as Option, O as Options, c as UseMethod, U as Uses, b as bignum } from './mint-74b505a0.js'; +import './storage.mjs'; +import '@solana/web3.js'; +import './phantom-e9a40784.js'; +import './das-api.mjs'; +import './converter.mjs'; +import '@metaplex-foundation/mpl-token-metadata'; +import 'bn.js'; + +type BurnOptions = { + feePayer: Secret; +}; + +type ThawOptions = { + feePayer: Secret; +}; + +type GasLessMintOptions = { + freezeAuthority: Pubkey; +}; + +type MintCollectionOptions = { + feePayer: Secret; + freezeAuthority: Pubkey; + collectionSize: number; +}; +type Collection = { + address: Pubkey; + verified: boolean; +}; + +type FreezeOptions = { + feePayer: Secret; +}; + +type TransferOptions = { + feePayer: Secret; +}; + +export { BurnOptions, Collection, FreezeOptions, GasLessMintOptions, MintCollectionOptions, ThawOptions, TransferOptions }; diff --git a/packages/types/dist/regular-nft.d.ts b/packages/types/dist/regular-nft.d.ts new file mode 100644 index 000000000..6cdbceb5d --- /dev/null +++ b/packages/types/dist/regular-nft.d.ts @@ -0,0 +1,41 @@ +import { Secret, Pubkey } from './account.js'; +export { C as Creators, d as InputCollection, I as InputCreators, e as InputNftMetadata, M as MintOptions, a as Option, O as Options, c as UseMethod, U as Uses, b as bignum } from './mint-08f26d69.js'; +import './storage.js'; +import '@solana/web3.js'; +import './phantom-e9a40784.js'; +import './das-api.js'; +import './converter.js'; +import '@metaplex-foundation/mpl-token-metadata'; +import 'bn.js'; + +type BurnOptions = { + feePayer: Secret; +}; + +type ThawOptions = { + feePayer: Secret; +}; + +type GasLessMintOptions = { + freezeAuthority: Pubkey; +}; + +type MintCollectionOptions = { + feePayer: Secret; + freezeAuthority: Pubkey; + collectionSize: number; +}; +type Collection = { + address: Pubkey; + verified: boolean; +}; + +type FreezeOptions = { + feePayer: Secret; +}; + +type TransferOptions = { + feePayer: Secret; +}; + +export { BurnOptions, Collection, FreezeOptions, GasLessMintOptions, MintCollectionOptions, ThawOptions, TransferOptions }; diff --git a/packages/types/dist/sol-native.d.mts b/packages/types/dist/sol-native.d.mts new file mode 100644 index 000000000..29d86c67c --- /dev/null +++ b/packages/types/dist/sol-native.d.mts @@ -0,0 +1,7 @@ +import { Secret } from './account.mjs'; + +type TransferOptions = { + feePayer: Secret; +}; + +export { TransferOptions }; diff --git a/packages/types/dist/sol-native.d.ts b/packages/types/dist/sol-native.d.ts new file mode 100644 index 000000000..a076dc08f --- /dev/null +++ b/packages/types/dist/sol-native.d.ts @@ -0,0 +1,7 @@ +import { Secret } from './account.js'; + +type TransferOptions = { + feePayer: Secret; +}; + +export { TransferOptions }; diff --git a/packages/types/dist/spl-token.d.mts b/packages/types/dist/spl-token.d.mts new file mode 100644 index 000000000..ec6fb174b --- /dev/null +++ b/packages/types/dist/spl-token.d.mts @@ -0,0 +1,55 @@ +import { Secret, Pubkey } from './account.mjs'; +import { Offchain, Attribute, FileType, StorageType } from './storage.mjs'; +import { C as Creators, U as Uses, I as InputCreators, O as Options } from './mint-74b505a0.js'; +import '@solana/web3.js'; +import './phantom-e9a40784.js'; +import './das-api.mjs'; +import './converter.mjs'; +import '@metaplex-foundation/mpl-token-metadata'; +import 'bn.js'; + +type BurnOptions = { + feePayer: Secret; +}; + +type TokenMetadata = { + mint: string; + name: string; + symbol: string; + uri: string; + royalty: number; + offchain: Offchain; + tokenAmount: string; + attributes?: Attribute | undefined; + creators?: Creators[] | undefined; + uses?: Uses | undefined; + dateTime?: Date | undefined; +}; + +type FreezeOptions = { + feePayer: Secret; +}; + +type MintOptions = { + feePayer: Secret; + freezeAuthority: Pubkey; +}; +type InputTokenMetadata = { + name: string; + symbol: string; + filePath?: FileType; + uri?: string; + storageType?: StorageType; + description?: string; + royalty?: number; + uses?: Uses; + creators?: InputCreators[]; + attributes?: Attribute[]; + options?: Options; +}; + +type ThawOptions = { + feePayer: Secret; +}; + +export { BurnOptions, FreezeOptions, InputTokenMetadata, MintOptions, ThawOptions, TokenMetadata }; diff --git a/packages/types/dist/spl-token.d.ts b/packages/types/dist/spl-token.d.ts new file mode 100644 index 000000000..b4b87c8b6 --- /dev/null +++ b/packages/types/dist/spl-token.d.ts @@ -0,0 +1,55 @@ +import { Secret, Pubkey } from './account.js'; +import { Offchain, Attribute, FileType, StorageType } from './storage.js'; +import { C as Creators, U as Uses, I as InputCreators, O as Options } from './mint-08f26d69.js'; +import '@solana/web3.js'; +import './phantom-e9a40784.js'; +import './das-api.js'; +import './converter.js'; +import '@metaplex-foundation/mpl-token-metadata'; +import 'bn.js'; + +type BurnOptions = { + feePayer: Secret; +}; + +type TokenMetadata = { + mint: string; + name: string; + symbol: string; + uri: string; + royalty: number; + offchain: Offchain; + tokenAmount: string; + attributes?: Attribute | undefined; + creators?: Creators[] | undefined; + uses?: Uses | undefined; + dateTime?: Date | undefined; +}; + +type FreezeOptions = { + feePayer: Secret; +}; + +type MintOptions = { + feePayer: Secret; + freezeAuthority: Pubkey; +}; +type InputTokenMetadata = { + name: string; + symbol: string; + filePath?: FileType; + uri?: string; + storageType?: StorageType; + description?: string; + royalty?: number; + uses?: Uses; + creators?: InputCreators[]; + attributes?: Attribute[]; + options?: Options; +}; + +type ThawOptions = { + feePayer: Secret; +}; + +export { BurnOptions, FreezeOptions, InputTokenMetadata, MintOptions, ThawOptions, TokenMetadata }; diff --git a/packages/types/dist/storage.d.mts b/packages/types/dist/storage.d.mts new file mode 100644 index 000000000..a40c52e01 --- /dev/null +++ b/packages/types/dist/storage.d.mts @@ -0,0 +1,68 @@ +import { Keypair, PublicKey } from '@solana/web3.js'; +import { P as PhantomProvider } from './phantom-e9a40784.js'; +import { Secret } from './account.mjs'; +import { Asset } from './das-api.mjs'; +import { Metadata } from '@metaplex-foundation/mpl-token-metadata'; +import './converter.mjs'; + +type BundlrSigner = Keypair | PhantomWallet | undefined; +type PhantomWallet = { + publicKey: PublicKey; +}; +type FileType = string | File; +type UploadableFileType = string & File; +type Identity = Secret | PhantomProvider; +type Tags = [{ + name: string; + value: string; +}]; + +type StorageType = 'nftStorage' | 'arweave' | string; +type MetadataAndOffchain = { + onchain: Metadata; + offchain: Offchain; +}; +type AssetAndOffchain = { + onchain: Asset; + offchain: Offchain; +}; +type Offchain = { + name?: string; + symbol?: string; + description?: string; + seller_fee_basis_points?: number; + image?: string; + external_url?: string; + attributes?: Attribute[]; + properties?: Properties; + collection?: { + name?: string; + family?: string; + [key: string]: unknown; + }; + collectionDetails?: { + kind: string; + size: number; + }; + created_at?: number; +}; +type Properties = { + creators?: { + address?: string; + share?: number; + [key: string]: unknown; + }[]; + files?: { + type?: string; + filePath?: FileType; + [key: string]: unknown; + }[]; + [key: string]: unknown; +}; +type Attribute = { + trait_type?: string; + value?: string; + [key: string]: unknown; +}; + +export { AssetAndOffchain, Attribute, BundlrSigner, FileType, Identity, MetadataAndOffchain, Offchain, PhantomWallet, Properties, StorageType, Tags, UploadableFileType }; diff --git a/packages/types/dist/storage.d.ts b/packages/types/dist/storage.d.ts new file mode 100644 index 000000000..368f5dcb4 --- /dev/null +++ b/packages/types/dist/storage.d.ts @@ -0,0 +1,68 @@ +import { Keypair, PublicKey } from '@solana/web3.js'; +import { P as PhantomProvider } from './phantom-e9a40784.js'; +import { Secret } from './account.js'; +import { Asset } from './das-api.js'; +import { Metadata } from '@metaplex-foundation/mpl-token-metadata'; +import './converter.js'; + +type BundlrSigner = Keypair | PhantomWallet | undefined; +type PhantomWallet = { + publicKey: PublicKey; +}; +type FileType = string | File; +type UploadableFileType = string & File; +type Identity = Secret | PhantomProvider; +type Tags = [{ + name: string; + value: string; +}]; + +type StorageType = 'nftStorage' | 'arweave' | string; +type MetadataAndOffchain = { + onchain: Metadata; + offchain: Offchain; +}; +type AssetAndOffchain = { + onchain: Asset; + offchain: Offchain; +}; +type Offchain = { + name?: string; + symbol?: string; + description?: string; + seller_fee_basis_points?: number; + image?: string; + external_url?: string; + attributes?: Attribute[]; + properties?: Properties; + collection?: { + name?: string; + family?: string; + [key: string]: unknown; + }; + collectionDetails?: { + kind: string; + size: number; + }; + created_at?: number; +}; +type Properties = { + creators?: { + address?: string; + share?: number; + [key: string]: unknown; + }[]; + files?: { + type?: string; + filePath?: FileType; + [key: string]: unknown; + }[]; + [key: string]: unknown; +}; +type Attribute = { + trait_type?: string; + value?: string; + [key: string]: unknown; +}; + +export { AssetAndOffchain, Attribute, BundlrSigner, FileType, Identity, MetadataAndOffchain, Offchain, PhantomWallet, Properties, StorageType, Tags, UploadableFileType }; diff --git a/packages/types/dist/transaction-builder.d.mts b/packages/types/dist/transaction-builder.d.mts new file mode 100644 index 000000000..9c50b58e5 --- /dev/null +++ b/packages/types/dist/transaction-builder.d.mts @@ -0,0 +1,237 @@ +import { Secret, Pubkey } from './account.mjs'; +import { TransactionSignature, TransactionInstruction, Keypair } from '@solana/web3.js'; +import './global.mjs'; + +declare abstract class AbstractResult { + protected abstract _chain(ok: (value: T) => Result, err: (error: E) => Result): Result; + unwrap(): T; + unwrap(ok: (value: T) => U): U; + unwrap(ok: (value: T) => U, err: (error: E) => V): U | V; + unwrap(ok: (value: T) => U, err: (error: E) => U): U; + map(ok: (value: T) => U): Result; + map(ok: (value: T) => U, err: (error: E) => F): Result; + chain(ok: (value: T) => Result): Result; + chain(ok: (value: T) => Result): Result; + chain(ok: (value: T) => Result, err: (error: E) => Result): Result; + match(ok: (value: T) => U, err: (error: E) => F): void | Promise; + submit(feePayer?: Secret): Promise>; +} +declare global { + interface Array { + submit(feePayer?: Secret): Promise>; + } +} +declare class InternalOk extends AbstractResult { + readonly value: T; + readonly isOk = true; + readonly isErr = false; + constructor(value: T); + protected _chain(ok: (value: T) => Result, _err: (error: E) => Result): Result; +} +declare class InternalErr extends AbstractResult { + readonly error: E; + readonly isOk = false; + readonly isErr = true; + constructor(error: E); + protected _chain(_ok: (value: T) => Result, err: (error: E) => Result): Result; +} +declare namespace Result { + export type Ok = InternalOk; + export type Err = InternalErr; + export function ok(value: T): Result; + export function err(error?: E): Result; + type U = Result; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3]): Result<[ + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2]): Result<[OkType, OkType, OkType], ErrType>; + export function all(obj: [R0, R1]): Result<[OkType, OkType], ErrType>; + export function all(obj: [R0]): Result<[OkType], ErrType>; + export function all(obj: []): Result<[]>; + export function all>(obj: T): Result<{ + [K in keyof T]: T[K] extends Result ? I : never; + }, { + [K in keyof T]: T[K] extends Result ? E : never; + }[keyof T]>; + export {}; +} +type Result = Result.Ok | Result.Err; +type OkType> = R extends Result ? O : never; +type ErrType> = R extends Result ? E : never; + +type CommonStructure = { + instructions: TransactionInstruction[]; + signers: Keypair[]; + feePayer?: Keypair; + canSubmit?: boolean; + data?: T; + submit: () => Promise>; +}; +type MintStructure = { + instructions: TransactionInstruction[]; + signers: Keypair[]; + data: T; + feePayer: Keypair; + canSubmit?: boolean; + submit: () => Promise>; +}; +type PartialSignStructure = { + hexInstruction: string; + canSubmit?: boolean; + data?: T; + submit: (feePayer: Secret) => Promise>; +}; + +export { CommonStructure, MintStructure, PartialSignStructure }; diff --git a/packages/types/dist/transaction-builder.d.ts b/packages/types/dist/transaction-builder.d.ts new file mode 100644 index 000000000..d04e5b9dc --- /dev/null +++ b/packages/types/dist/transaction-builder.d.ts @@ -0,0 +1,237 @@ +import { Secret, Pubkey } from './account.js'; +import { TransactionSignature, TransactionInstruction, Keypair } from '@solana/web3.js'; +import './global.js'; + +declare abstract class AbstractResult { + protected abstract _chain(ok: (value: T) => Result, err: (error: E) => Result): Result; + unwrap(): T; + unwrap(ok: (value: T) => U): U; + unwrap(ok: (value: T) => U, err: (error: E) => V): U | V; + unwrap(ok: (value: T) => U, err: (error: E) => U): U; + map(ok: (value: T) => U): Result; + map(ok: (value: T) => U, err: (error: E) => F): Result; + chain(ok: (value: T) => Result): Result; + chain(ok: (value: T) => Result): Result; + chain(ok: (value: T) => Result, err: (error: E) => Result): Result; + match(ok: (value: T) => U, err: (error: E) => F): void | Promise; + submit(feePayer?: Secret): Promise>; +} +declare global { + interface Array { + submit(feePayer?: Secret): Promise>; + } +} +declare class InternalOk extends AbstractResult { + readonly value: T; + readonly isOk = true; + readonly isErr = false; + constructor(value: T); + protected _chain(ok: (value: T) => Result, _err: (error: E) => Result): Result; +} +declare class InternalErr extends AbstractResult { + readonly error: E; + readonly isOk = false; + readonly isErr = true; + constructor(error: E); + protected _chain(_ok: (value: T) => Result, err: (error: E) => Result): Result; +} +declare namespace Result { + export type Ok = InternalOk; + export type Err = InternalErr; + export function ok(value: T): Result; + export function err(error?: E): Result; + type U = Result; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3]): Result<[ + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2]): Result<[OkType, OkType, OkType], ErrType>; + export function all(obj: [R0, R1]): Result<[OkType, OkType], ErrType>; + export function all(obj: [R0]): Result<[OkType], ErrType>; + export function all(obj: []): Result<[]>; + export function all>(obj: T): Result<{ + [K in keyof T]: T[K] extends Result ? I : never; + }, { + [K in keyof T]: T[K] extends Result ? E : never; + }[keyof T]>; + export {}; +} +type Result = Result.Ok | Result.Err; +type OkType> = R extends Result ? O : never; +type ErrType> = R extends Result ? E : never; + +type CommonStructure = { + instructions: TransactionInstruction[]; + signers: Keypair[]; + feePayer?: Keypair; + canSubmit?: boolean; + data?: T; + submit: () => Promise>; +}; +type MintStructure = { + instructions: TransactionInstruction[]; + signers: Keypair[]; + data: T; + feePayer: Keypair; + canSubmit?: boolean; + submit: () => Promise>; +}; +type PartialSignStructure = { + hexInstruction: string; + canSubmit?: boolean; + data?: T; + submit: (feePayer: Secret) => Promise>; +}; + +export { CommonStructure, MintStructure, PartialSignStructure }; diff --git a/packages/types/dist/transaction-filter.d.mts b/packages/types/dist/transaction-filter.d.mts new file mode 100644 index 000000000..66687a3e0 --- /dev/null +++ b/packages/types/dist/transaction-filter.d.mts @@ -0,0 +1,83 @@ +import { PublicKey } from '@solana/web3.js'; +import { Pubkey } from './account.mjs'; + +declare enum FilterType { + Memo = "memo", + Mint = "mint", + OnlyMemo = "only-memo", + Transfer = "transfer" +} +declare enum ModuleName { + SolNative = "system", + SplToken = "spl-token" +} +declare const FilterOptions: { + Transfer: { + program: string[]; + action: string[]; + }; + Memo: { + program: string[]; + action: string[]; + }; + Mint: { + program: string[]; + action: string[]; + }; +}; +type PostTokenAccount = { + account: string; + owner: string; +}; +type WithMemo = { + sig: string[]; + memo: string; +}; +type Transfer = { + parsed: { + info: { + destination: Pubkey; + source: Pubkey; + lamports: number; + }; + type: string; + }; + program: string; + programId?: PublicKey; +}; +type MintTo = { + parsed: { + info: { + account: Pubkey; + mint: Pubkey; + mintAuthority: Pubkey; + tokenAmount: string; + }; + type: string; + }; + program: string; + programId?: PublicKey; +}; +type MintToChecked = MintTo; +type TransferChecked = { + parsed: { + info: { + destination: Pubkey; + mint: Pubkey; + multisigAuthority: Pubkey; + signers: Pubkey[]; + source: Pubkey; + tokenAmount: string; + }; + type: string; + }; + program: string; + programId?: PublicKey; +}; +type Memo = { + parsed: string; + program: string; + programId: PublicKey; +}; + +export { FilterOptions, FilterType, Memo, MintTo, MintToChecked, ModuleName, PostTokenAccount, Transfer, TransferChecked, WithMemo }; diff --git a/packages/types/dist/transaction-filter.d.ts b/packages/types/dist/transaction-filter.d.ts new file mode 100644 index 000000000..ea9a6f24b --- /dev/null +++ b/packages/types/dist/transaction-filter.d.ts @@ -0,0 +1,83 @@ +import { PublicKey } from '@solana/web3.js'; +import { Pubkey } from './account.js'; + +declare enum FilterType { + Memo = "memo", + Mint = "mint", + OnlyMemo = "only-memo", + Transfer = "transfer" +} +declare enum ModuleName { + SolNative = "system", + SplToken = "spl-token" +} +declare const FilterOptions: { + Transfer: { + program: string[]; + action: string[]; + }; + Memo: { + program: string[]; + action: string[]; + }; + Mint: { + program: string[]; + action: string[]; + }; +}; +type PostTokenAccount = { + account: string; + owner: string; +}; +type WithMemo = { + sig: string[]; + memo: string; +}; +type Transfer = { + parsed: { + info: { + destination: Pubkey; + source: Pubkey; + lamports: number; + }; + type: string; + }; + program: string; + programId?: PublicKey; +}; +type MintTo = { + parsed: { + info: { + account: Pubkey; + mint: Pubkey; + mintAuthority: Pubkey; + tokenAmount: string; + }; + type: string; + }; + program: string; + programId?: PublicKey; +}; +type MintToChecked = MintTo; +type TransferChecked = { + parsed: { + info: { + destination: Pubkey; + mint: Pubkey; + multisigAuthority: Pubkey; + signers: Pubkey[]; + source: Pubkey; + tokenAmount: string; + }; + type: string; + }; + program: string; + programId?: PublicKey; +}; +type Memo = { + parsed: string; + program: string; + programId: PublicKey; +}; + +export { FilterOptions, FilterType, Memo, MintTo, MintToChecked, ModuleName, PostTokenAccount, Transfer, TransferChecked, WithMemo }; diff --git a/packages/types/dist/utils.d.mts b/packages/types/dist/utils.d.mts new file mode 100644 index 000000000..3f1949a22 --- /dev/null +++ b/packages/types/dist/utils.d.mts @@ -0,0 +1,18 @@ +import { Find } from './find.mjs'; +import { History } from './history.mjs'; +import './account.mjs'; + +type AnyObject = { + [key: string]: unknown; +}; +type OverwriteObject = { + existsKey: string; + will: { + key: string; + value: unknown; + }; +}; +type OnOk = (ok: T[]) => void; +type OnErr = (err: Error) => void; + +export { AnyObject, OnErr, OnOk, OverwriteObject }; diff --git a/packages/types/dist/utils.d.ts b/packages/types/dist/utils.d.ts new file mode 100644 index 000000000..602b6828e --- /dev/null +++ b/packages/types/dist/utils.d.ts @@ -0,0 +1,18 @@ +import { Find } from './find.js'; +import { History } from './history.js'; +import './account.js'; + +type AnyObject = { + [key: string]: unknown; +}; +type OverwriteObject = { + existsKey: string; + will: { + key: string; + value: unknown; + }; +}; +type OnOk = (ok: T[]) => void; +type OnErr = (err: Error) => void; + +export { AnyObject, OnErr, OnOk, OverwriteObject }; diff --git a/packages/types/dist/validator.d.mts b/packages/types/dist/validator.d.mts new file mode 100644 index 000000000..c56cc1dc3 --- /dev/null +++ b/packages/types/dist/validator.d.mts @@ -0,0 +1,13 @@ +type Condition = 'overMax' | 'underMin'; +interface Limit { + threshold: number; + condition: Condition; +} +interface Details { + key: string; + message: string; + actual: string | number; + limit?: Limit; +} + +export { Condition, Details, Limit }; diff --git a/packages/types/dist/validator.d.ts b/packages/types/dist/validator.d.ts new file mode 100644 index 000000000..c56cc1dc3 --- /dev/null +++ b/packages/types/dist/validator.d.ts @@ -0,0 +1,13 @@ +type Condition = 'overMax' | 'underMin'; +interface Limit { + threshold: number; + condition: Condition; +} +interface Details { + key: string; + message: string; + actual: string | number; + limit?: Limit; +} + +export { Condition, Details, Limit }; diff --git a/packages/validator/dist/index.js b/packages/validator/dist/index.js index dd94bf695..961d9de48 100644 --- a/packages/validator/dist/index.js +++ b/packages/validator/dist/index.js @@ -1426,4 +1426,4 @@ var ValidatorError = class extends Error { Validator, ValidatorError }); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uLy4uL3N1aXRlLXV0aWxzL3NyYy9jb25zdGFudHMudHMiLCAiLi4vLi4v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gICAgICAgICAgIHJlcyA9IGlzSW1hZ2VVcmwobWV0YWRhdGEuaW1hZ2UpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAncm95YWx0eSc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnJveWFsdHkpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNSb3lhbHR5KG1ldGFkYXRhLnJveWFsdHkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdG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NlIENyZWF0b3JzIHtcbiAgICBleHBvcnQgY29uc3QgaW50b0luZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IE9wdGlvbjxJbnRlcm5hbENyZWF0b3JzW10+ID0+IHtcbiAgICAgIGlmICghaW5wdXQpIHtcbiAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICB9XG4gICAgICByZXR1cm4gaW5wdXQubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvQ29tcHJlc3NlZE5mdEluZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IEludGVybmFsQ3JlYXRvcnNbXSA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBbXTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBpbnB1dCEubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlciA9IChcbiAgICAgIG91dHB1dDogT3B0aW9uPEludGVybmFsQ3JlYXRvcnNbXT4sXG4gICAgKTogQ3JlYXRvcnNbXSB8IHV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G9ydF93ZWIzIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJDb21tb24iLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgImltcG9ydF93ZWIzIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJpbXBvcnRfd2ViMyIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgImltcG9ydF93ZWIzIiwgImltcG9ydF93ZWIzIiwgIkFjY291bnQiLCAiS2V5cGFpciIsICJicyIsICJPcmlnaW5hbCIsICJpbXBvcnRfd2ViMyIsICJBY2NvdW50IiwgIlBkYSIsICJCTiIsICJBY2NvdW50IiwgImltcG9ydF9iczU4IiwgIkFjY291bnQiLCAiYnMiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJSZXN1bHQiLCAiQ29udmVydGVyIiwgIkNvbGxlY3Rpb24iLCAiQ29sbGVjdGlvbk1pbnQiLCAiQ29udmVydGVyIiwgIkNyZWF0b3JzIiwgIkNvbnZlcnRlciIsICJDb21wcmVzc2VkTmZ0TWV0YWRhdGEiLCAiQ29udmVydGVyIiwgIlJveWFsdHkiLCAiQ29udmVydGVyIiwgIk5mdCIsICJDb252ZXJ0ZXIiLCAiTWVtbyIsICJDb252ZXJ0ZXIiLCAiTWludCIsICJDb252ZXJ0ZXIiLCAiUmVndWxhck5mdE1ldGFkYXRhIiwgIkNvbnZlcnRlciIsICJQcm9wZXJ0aWVzIiwgIkNvbnZlcnRlciIsICJVc2VzIiwgIkNvbnZlcnRlciIsICJUb2tlbk1ldGFkYXRhIiwgIkNvbnZlcnRlciIsICJUcmFuc2ZlckNoZWNrZWQiLCAiQ29udmVydGVyIiwgIlRyYW5zZmVyIiwgIkNvbnZlcnRlciIsICJWYWxpZGF0b3IiLCAiTWVzc2FnZSIsICJDb252ZXJ0ZXIiXQp9Cg== \ No newline at end of file +//# sourceMappingURL=data:application/json;base64,ewogIC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dGNoIChrZXkpIHtcbiAgICAgICAgICBjYXNlICdpbWFnZSc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLmltYWdlKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzSW1hZ2VVcmwobWV0YWRhdGEuaW1hZ2UpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAncm95YWx0eSc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnJveWFsdHkpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNSb3lhbHR5KG1ldGFkYXRhLnJveWFsdHkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF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vbigpLmdldExhdGVzdEJsb2NraGFzaCgpO1xuICAgICAgICB0cmFuc2FjdGlvbi5sYXN0VmFsaWRCbG9ja0hlaWdodCA9IGJsb2NraGFzaE9iai5sYXN0VmFsaWRCbG9ja0hlaWdodDtcbiAgICAgICAgdHJhbnNhY3Rpb24ucmVjZW50QmxvY2toYXNoID0gYmxvY2toYXNoT2JqLmJsb2NraGFzaDtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHRoaXMuc2lnbmVycztcblxuICAgICAgICBpZiAodGhpcy5mZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gdGhpcy5mZWVQYXllci5wdWJsaWNLZXk7XG4gICAgICAgICAgZmluYWxTaWduZXJzID0gW3RoaXMuZmVlUGF5ZXIsIC4uLnRoaXMuc2lnbmVyc107XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLmluc3RydWN0aW9ucy5mb3JFYWNoKChpbnN0KSA9PiB0cmFuc2FjdGlvbi5hZGQoaW5zdCkpO1xuXG4gICAgICAgIGNvbnN0IG9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IE1BWF9SRVRSSUVTLFxuICAgICAgICB9O1xuXG4gICAgICAgIHJldHVybiBhd2FpdCBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uKFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICBvcHRpb25zLFxuICAgICAgICApO1xuICAgICAgfSk7XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7XG4gIENvbmZpcm1PcHRpb25zLFxuICBLZXlwYWlyLFxuICBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uLFxuICBUcmFuc2FjdGlvbixcbiAgVHJhbnNhY3Rpb25JbnN0cnVjdGlvbix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IiLCAiVHJhbnNmZXJDaGVja2VkIiwgIkNvbnZlcnRlciIsICJUcmFuc2ZlciIsICJDb252ZXJ0ZXIiLCAiVmFsaWRhdG9yIiwgIk1lc3NhZ2UiLCAiQ29udmVydGVyIl0KfQo= \ No newline at end of file diff --git a/packages/validator/dist/index.mjs b/packages/validator/dist/index.mjs index dfd47dcf6..ac08cfcfc 100644 --- a/packages/validator/dist/index.mjs +++ b/packages/validator/dist/index.mjs @@ -1402,4 +1402,4 @@ export { Validator, ValidatorError }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9iYXRjaC50cyIsICIuLi8uLi9ub2RlL3NyYy9pbmRleC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jb21tb24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvbWludC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9wYXJ0aWFsLXNpZ24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY2FsY3VsYXRlLXR4c2l6ZS50cyIsICIuLi8uLi9nbG9iYWwvc3JjL2luZGV4LnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2tleXBhaXIudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvcGRhLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3N1aXRlLXV0aWxzL3NyYy9zaGFyZWQudHMiLCAiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL3Jlc3VsdC50cyIsICIuLi8uLi9jb252ZXJ0ZXIvc3JjL2NvbGxlY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XJ0ZXIge1xuICBleHBvcnQgbmFtZXNwYWNlIENyZWF0b3JzIHtcbiAgICBleHBvcnQgY29uc3QgaW50b0luZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IE9wdGlvbjxJbnRlcm5hbENyZWF0b3JzW10+ID0+IHtcbiAgICAgIGlmICghaW5wdXQpIHtcbiAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICB9XG4gICAgICByZXR1cm4gaW5wdXQubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvQ29tcHJlc3NlZE5mdEluZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IEludGVybmFsQ3JlYXRvcnNbXSA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBbXTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBpbnB1dCEubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlciA9IChcbiAgICAgIG91dHB1dDogT3B0aW9uPEludGVybmFsQ3JlYXRvcnNbXT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JyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEuc3ltYm9sKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU3ltYm9sKG1ldGFkYXRhLnN5bWJvbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAocmVzICYmIHJlcy5pc0Vycikge1xuICAgICAgICAgIHJlc3VsdHMucHVzaCguLi5yZXMuZXJyb3IuZGV0YWlscyk7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgICAgaWYgKHJlc3VsdHMubGVuZ3RoID4gMCkge1xuICAgICAgICBjb25zdCBtZXNzYWdlID1cbiAgICAgICAgICAnQ2F1Z2h0IGluIHRoZSB2YWxpZGF0aW9uIGVycm9ycy4gc2VlIGluZm9ybWF0aW9uIGUuZzogZXJyPFZhbGlkYXRvckVycm9yPi5kZXRhaWxzJztcbiAgICAgICAgdGhyb3cgbmV3IFZhbGlkYXRvckVycm9yKG1lc3NhZ2UsIHJlc3VsdHMpO1xuICAgICAgfVxuICAgICAgcmV0dXJuIE1lc3NhZ2UuU1VDQ0VTUztcbiAgICB9KTtcbiAgf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c3RyaW5nPihmZWVQYXllclBrKTtcbiAgICBjb25zdCBhY2NvdW50cyA9IG5ldyBTZXQ8c3RyaW5nPihmZWVQYXllclBrKTtcblxuICAgIGNvbnN0IGl4c1NpemUgPSB0cmFuc2FjdGlvbi5pbnN0cnVjdGlvbnMucmVkdWNlKChhY2MsIGl4KSA9PiB7XG4gICAgICBpeC5rZXlzLmZvckVhY2goKHsgcHVia2V5LCBpc1NpZ25lciB9KSA9PiB7XG4gICAgICAgIGNvbnN0IHBrID0gcHVia2V5LnRvQmFzZTU4KCk7XG4gICAgICAgIGlmIChpc1NpZ25lcikgc2lnbmVycy5hZGQocGspO1xuICAgICAgICBhY2NvdW50cy5hZGQocGspO1xuICAgICAgfSk7XG5cbiAgICAgIGFjY291bnRzLmFkZChpeC5wcm9ncmFtSWQudG9CYXNlNTgoKSk7XG5cbiAgICAgIGNvbnN0IG5JbmRleGVzID0gaXgua2V5cy5sZW5ndGg7XG4gICAgICBjb25zdCBvcGFxdWVEYXRhID0gaXguZGF0YS5sZW5ndGg7XG5cbiAgICAgIHJldHVybiAoXG4gICAgICAgIGFjYyArXG4gICAgICAgIDEgKyAvLyBQSUQgaW5kZXhcbiAgICAgICAgY29tcGFjdEFycmF5U2l6ZShuSW5kZXhlcywgMSkgK1xuICAgICAgICBjb21wYWN0QXJyYXlTaXplKG9wYXF1ZURhdGEsIDEpXG4gICAgICApO1xuICAgIH0sIDApO1xuXG4gICAgcmV0dXJuIChcbiAgICAgIGNvbXBhY3RBcnJheVNpemUoc2lnbmVycy5zaXplLCA2NCkgKyAvLyBzaWduYXR1cmVzXG4gICAgICAzICsgLy8gaGVhZGVyXG4gICAgICBjb21wYWN0QXJyYXlTaXplKGFjY291bnRzLnNpemUsIDMyKSArIC8vIGFjY291bnRzXG4gICAgICAzMiArIC8vIGJsb2NraGFzaFxuICAgICAgY29tcGFjdEhlYWRlcih0cmFuc2FjdGlvbi5pbnN0cnVjdGlvbnMubGVuZ3RoKSArIC8vIGluc3RydWN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YSAmJiBtZXRhZGF0YS5yb3lhbHR5KSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzUm95YWx0eShtZXRhZGF0YS5yb3lhbHR5KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlcl9mZWVfYmFzaXNfcG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJGZWVCYXNpc1BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0YWRhdGEubmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzeW1ib2wnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLnN5bWJvbCkge1xuICAgICAgICAgICAgICByZXMgPSBpc1N5bWJvbChtZXRhZGF0YS5zeW1ib2wpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHJlcyAmJiByZXMuaXNFcnIpIHtcbiAgICA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npm-lock.yaml b/pnpm-lock.yaml index 396fe5726..75ed9f23e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -298,9 +298,33 @@ importers: packages/suite-airdrop: dependencies: + '@metaplex-foundation/mpl-bubblegum': + specifier: ^3.0.0 + version: 3.0.0(@metaplex-foundation/umi@0.8.10) + '@metaplex-foundation/mpl-token-metadata': + specifier: ^2.13.0 + version: 2.13.0 + '@solana-suite/config': + specifier: workspace:^ + version: link:../suite-config + '@solana/spl-token': + specifier: ^0.3.8 + version: 0.3.8(@solana/web3.js@1.87.1) '@solana/web3.js': specifier: ^1.78.5 version: 1.87.1 + bignumber.js: + specifier: ^9.1.2 + version: 9.1.2 + bn.js: + specifier: ^5.2.1 + version: 5.2.1 + bs58: + specifier: ^4.0.1 + version: 4.0.1 + mpl-bubblegum-instruction: + specifier: github:atonoy/mpl-bubblegum-instructions + version: github.com/atonoy/mpl-bubblegum-instructions/00f20bb7ed5ddc28e74056afd539a23257f04178 devDependencies: build-configs/eslint: specifier: workspace:* @@ -2315,7 +2339,7 @@ packages: resolution: {integrity: sha512-LZmYCKcPQDtJgecvWOgT/cnoIQPWjdH+QVyzPcFvyDUiT0DiRjZaam4aqNUyvchLFhzgunv3d9xOoyE34ofdoQ==} engines: {node: '>= 10'} dependencies: - '@babel/runtime': 7.23.2 + '@babel/runtime': 7.23.6 '@solana/web3.js': 1.87.6 bn.js: 5.2.1 buffer: 6.0.3 diff --git a/turbo.json b/turbo.json index 42de93622..e64bbd02f 100644 --- a/turbo.json +++ b/turbo.json @@ -13,7 +13,7 @@ "dependsOn": [ "^build", "eslint", - "prettier", + "prettier:fix", "depcheck" ], "cache": false From f05c31336c6805fa8ed4c6a05ed37e47740acfd1 Mon Sep 17 00:00:00 2001 From: fukaoi Date: Sat, 3 Feb 2024 22:32:50 +0900 Subject: [PATCH 13/15] Deleted exports --- packages/suite-compressed-nft/dist/index.js | 5 +- packages/suite-compressed-nft/dist/index.mjs | 5 +- packages/suite-regular-nft/dist/index.js | 5 +- packages/suite-regular-nft/dist/index.mjs | 5 +- .../suite-utils/dist/exports-c05c52f7.d.ts | 508 ------ packages/suite-utils/dist/exports.d.mts | 4 - packages/suite-utils/dist/exports.d.ts | 4 - packages/suite-utils/dist/exports.js | 1482 ----------------- packages/suite-utils/dist/exports.mjs | 1445 ---------------- packages/suite-utils/dist/index.d.mts | 512 +++++- packages/suite-utils/dist/index.d.ts | 512 +++++- packages/suite-utils/dist/index.js | 2 +- packages/suite-utils/package.json | 30 +- packages/suite-utils/src/exports.ts | 7 - packages/suite-utils/src/index.ts | 8 +- packages/suite-utils/tsconfig.json | 11 +- packages/suite-utils/tsup.config.ts | 1 - packages/test-tools/dist/index.js | 822 ++++----- packages/test-tools/dist/index.mjs | 784 ++++----- 19 files changed, 1742 insertions(+), 4410 deletions(-) delete mode 100644 packages/suite-utils/dist/exports-c05c52f7.d.ts delete mode 100644 packages/suite-utils/dist/exports.d.mts delete mode 100644 packages/suite-utils/dist/exports.d.ts delete mode 100644 packages/suite-utils/dist/exports.js delete mode 100644 packages/suite-utils/dist/exports.mjs delete mode 100644 packages/suite-utils/src/exports.ts diff --git a/packages/suite-compressed-nft/dist/index.js b/packages/suite-compressed-nft/dist/index.js index 28a7b3ab4..5e858764c 100644 --- a/packages/suite-compressed-nft/dist/index.js +++ b/packages/suite-compressed-nft/dist/index.js @@ -2536,14 +2536,13 @@ var SplToken6; dest, feePayer ); - let inst2; const blockhashObj = await Node.getConnection().getLatestBlockhash(); const tx = new import_web313.Transaction({ lastValidBlockHeight: blockhashObj.lastValidBlockHeight, blockhash: blockhashObj.blockhash, feePayer: feePayer.toPublicKey() }); - inst2 = (0, import_spl_token5.createTransferCheckedInstruction)( + const inst2 = (0, import_spl_token5.createTransferCheckedInstruction)( sourceToken.tokenAccount.toPublicKey(), mint.toPublicKey(), destToken.tokenAccount.toPublicKey(), @@ -3380,4 +3379,4 @@ var CompressedNft9 = { 0 && (module.exports = { CompressedNft }); -//# sourceMappingUR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G9mIGFycikge1xuICAgICAgICAgIGlmICghYS5pbnN0cnVjdGlvbnMgJiYgIWEuc2lnbmVycykge1xuICAgICAgICAgICAgdGhyb3cgRXJyb3IoXG4gICAgICAgICAgICAgIGBvbmx5IEluc3RydWN0aW9uIG9iamVjdCB0aGF0IGNhbiB1c2UgYmF0Y2hTdWJtaXQoKS5cbiAgICAgICAgICAgIEluZGV4OiAke2l9LCBTZXQgdmFsdWU6ICR7SlNPTi5zdHJpbmdpZnkoYSl9YCxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIGkrKztcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IGluc3RydWN0aW9ucyA9IGFyci5mbGF0TWFwKChhKSA9PiBhLmluc3RydWN0aW9ucyk7XG4gICAgICAgIGNvbnN0IHNpZ25lcnMgPSBhcnIuZmxhdE1hcCgoYSkgPT4gYS5zaWduZXJzKTtcbiAgICAgICAgY29uc3QgZmVlUGF5ZXJzID0gYXJyLmZpbHRlcigoYSkgPT4gYS5mZWVQYXllciAhPT0gdW5kZWZpbmVkKTtcbiAgICAgICAgbGV0IGZlZVBheWVyID0gc2lnbmVyc1swXTtcbiAgICAgICAgaWYgKGZlZVBheWVycy5sZW5ndGggPiAwICYmIGZlZVBheWVyc1swXS5mZWVQYXllcikge1xuICAgICAgICAgIGZlZVBheWVyID0gZmVlUGF5ZXJzWzBdLmZlZVBheWVyO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgdHJhbnNhY3Rpb24gPSBuZXcgVHJhbnNhY3Rpb24oKTtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHNpZ25lcnM7XG4gICAgICAgIGlmIChmZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gZmVlUGF5ZXIucHVibGljS2V5O1xuICAgICAgICAgIGZpbmFsU2lnbmVycyA9IFtmZWVQYXllciwgLi4uc2lnbmVyc107XG4gICAgICAgIH1cbiAgICA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mJiBtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEuc3ltYm9sKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU3ltYm9sKG1ldGFkYXRhLnN5bWJvbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAocmVzICYmIHJlcy5pc0Vycikge1xuICAgICAgICAgIHJlc3VsdHMucHVzaCguLi5yZXMuZXJyb3IuZGV0YWlscyk7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgICAgaWYgKHJlc3VsdHMubGVuZ3RoID4gMCkge1xuICAgICAgICBjb25zdCBtZXNzYWdlID1cbiAgICAgICAgICAnQ2F1Z2h0IGluIHRoZSB2YWxpZGF0aW9uIGVycm9ycy4gc2VlIGluZm9ybWF0aW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xlZ2F0ZShtaW50LCBvd25lciwgZmVlUGF5ZXIpO1xuICAgIGRlbGVnYXRlLnVud3JhcCgpLmNhblN1Ym1pdCA9IHRydWU7XG5cbiAgICBjb25zdCB0cmFuc2ZlciA9IGF3YWl0IFRyeShhc3luYyAoKSA9PiB7XG4gICAgICBjb25zdCBibG9ja2hhc2hPYmogPSBhd2FpdCBOb2RlLmdldENvbm5lY3Rpb24oKS5nZXRMYXRlc3RCbG9ja2hhc2goKTtcbiAgICAgIGNvbnN0IGluc3QgPSBuZXcgVHJhbnNhY3Rpb24oe1xuICAgICAgICBsYXN0VmFsaWRCbG9ja0hlaWdodDogYmxvY2toYXNoT2JqLmxhc3RWYWxpZEJsb2NrSGVpZ2h0LFxuICAgICAgICBibG9ja2hhc2g6IGJsb2NraGFzaE9iai5ibG9ja2hhc2gsXG4gICAgICAgIGZlZVBheWVyOiBmZWVQYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgfSk7XG5cbiAgICAgIGluc3QuYWRkKFxuICAgICAgICBhd2FpdCBUcmFuc2Zlci5jcmVhdGVUcmFuc2ZlcihcbiAgICAgICAgICBtaW50LFxuICAgICAgICAgIG5ldyBBY2NvdW50LktleXBhaXIoeyBzZWNyZXQ6IG93bmVyIH0pLnB1YmtleSxcbiAgICAgICAgICBkZXN0LFxuICAgICAgICAgIGZlZVBheWVyLFxuICAgICAgICApLFxuICAgICAgKTtcbiAgICAgIGluc3QucmVjZW50QmxvY2toYXNoID0gYmxvY2toYXNoT2JqLmJsb2NraGFzaDtcblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuUGFydGlhbFNpZ24oXG4gICAgICAgIGluc3RcbiAgICAgICAgICAuc2VyaWFsaXplKHtcbiAgICAgICAgICAgIHJlcXVpcmVBbGxTaWduYXR1cmVzOiBmYWxzZSxcbiAgICAgICAgICB9KVxuICAgICAgICAgIC50b1N0cmluZygnaGV4JyksXG4gICAgICApO1xuICAgIH0pO1xuICAgIH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XG4gICAgY29uc3QgY29tcHJlc3Npb24gPSBhc3NldC52YWx1ZS5jb21wcmVzc2lvbjtcbiAgICBjb25zdCBvd25lcnNoaXAgPSBhc3NldC52YWx1ZS5vd25lcnNoaXA7XG4gICAgY29uc3QgcHJvb2YgPSBhc3NldFByb29mLnZhbHVlLnByb29mO1xuICAgIGNvbnN0IG1lcmtsZVRyZWUgPSBjb21wcmVzc2lvbi50cmVlLnRvUHVibGljS2V5KCk7XG4gICAgY29uc3QgdHJlZUFjY291bnQgPSBhd2FpdCBDb25jdXJyZW50TWVya2xlVHJlZUFjY291bnQuZnJvbUFjY291bnRBZGRyZXNzKFxuICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICBtZXJrbGVUcmVlLFxuICAgICk7XG4gICAgY29uc3QgdHJlZUF1dGhvcml0eSA9IHRyZWVBY2NvdW50LmdldEF1dGhvcml0eSgpO1xuICAgIGNvbnN0IGNhbm9weURlcHRoID0gdHJlZUFjY291bnQuZ2V0Q2Fub3B5RGVwdGgoKTtcblxuICAgIGNvbnN0IHByb29mUGF0aCA9IHByb29mXG4gICAgICAubWFwKChub2RlOiBzdHJpbmcpID0+ICh7XG4gICAgICAgIHB1YmtleTogbm9kZS50b1B1YmxpY0tleSgpLFxuICAgICAgICBpc1NpZ25lcjogZmFsc2UsXG4gICAgICAgIGlzV3JpdGFibGU6IGZhbHNlLFxuICAgICAgfSkpXG4gICAgICAuc2xpY2UoMCwgcHJvb2YubGVuZ3RoIC0gKGNhbm9weURlcHRoID8gY2Fub3B5RGVwdGggOiAwKSk7XG5cbiAgICBjb25zdCBsZWFmT3duZXIgPSBvd25lcnNoaXAub3duZXIudG9QdWJsaWNLZXkoKTtcbiAgICBjb25zdCBuZXdMZWFmT3duZXIgPSBkZXN0LnRvUHVibGljS2V5KCk7XG4gICAgY29uc3QgbGVhZk5vbmNlID0gY29tcHJlc3Npb24ubGVhZl9pZDtcbiAgICBsZXQgbGVhZkRlbGVnYXRlOiBQdWJ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uICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgIGNyZWF0ZUNyZWF0ZVRyZWVJbnN0cnVjdGlvbihcbiAgICAgICAgICB7XG4gICAgICAgICAgICBtZXJrbGVUcmVlOiB0cmVlT3duZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICAgICAgdHJlZUF1dGhvcml0eSxcbiAgICAgICAgICAgIHRyZWVDcmVhdG9yOiBvd25lci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgICAgICBwYXllcjogcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICAgICAgbG9nV3JhcHBlcjogU1BMX05PT1BfUFJPR1JBTV9JRCxcbiAgICAgICAgICAgIGNvbXByZXNzaW9uUHJvZ3JhbTogU1BMX0FDQ09VTlRfQ09NUFJFU1NJT05fUFJPR1JBTV9JRCxcbiAgICAgICAgICB9LFxuICAgICAgICAgIHtcbiAgICAgICAgICAgIG1heEJ1ZmZlclNpemUsXG4gICAgICAgICAgICBtYXhEZXB0aCxcbiAgICAgICAgICAgIHB1YmxpYzogZmFsc2UsXG4gICAgICAgICAgfSxcbiAgICAgICAgICBNUExfQlVCQkxFR1VNX1BST0dSQU1fSUQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgKSxcbiAgICAgICk7XG5cbiAgICAgIHJldHVybiBuZXcgVHJhbnNhY3Rpb25CdWlsZGVyLk1pbnQoXG4gICAgICAgIGluc3RydWN0aW9ucyxcbiAgICAgICAgW3RyZWVPd25lci50b0tleXBhaXIoKSwgb3duZXIudG9LZXlwYWlyKCldLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgdHJlZU93bmVyLnB1YmtleSxcbiAgICAgICk7XG4gICAgfSk7XG4gIH07XG5cbiAgLyoqXG4gICAqIGNyZWF0ZSBhIG5ldyBuZnQgc3BhY2VcbiAgICogVGhpcyBmdW5jdGlvbiBuZWVkcyBvbmx5IDEgY2FsbF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RCxcbiAgICAgICAgY29tcHJlc3Npb25Qcm9ncmFtOiBTUExfQUNDT1VOVF9DT01QUkVTU0lPTl9QUk9HUkFNX0lELFxuICAgICAgICBjcmVhdG9yOiBmZWVQYXllcixcblxuICAgICAgICAvLyBwcm92aWRlIHRoZSBzbGljZWQgcHJvb2ZcbiAgICAgICAgYW5jaG9yUmVtYWluaW5nQWNjb3VudHM6IHNsaWNlZFByb29mLFxuICAgICAgfSxcbiAgICAgIHtcbiAgICAgICAgcm9vdDogWy4uLmFzc2V0UHJvb2Yucm9vdC50cmltKCkudG9QdWJsaWNLZXkoKS50b0J5dGVzKCldLFxuICAgICAgICBjcmVhdG9ySGFzaDogWy4uLmNvbXB1dGVDcmVhdG9ySGFzaChjcmVhdG9ycyldLFxuICAgICAgICBkYXRhSGFzaDogWy4uLmNvbXB1dGVEYXRhSGFzaChtZXRhZGF0YSldLFxuICAgICAgICBub25jZTogY29tcHJlc3Npb24ubGVhZl9pZCxcbiAgICAgICAgaW5kZXg6IGNvbXByZXNzaW9uLmxlYWZfaWQsXG4gICAgICAgIG1lc3NhZ2U6IG1ldGFkYXRhLFxuICAgICAgfSxcbiAgICApO1xuICB9O1xuXG4gIC8qKlxuICAgKiBVcGxvYWQgY29udGVudCBhbmQgQ29tcHJlc3NlZCBORlQgbWludFxuICAgKlxuICAgKiBAcGFyYW0ge1NlY3JldH0gb3duZXIgICAgICAgICAvLyBvd25lcidzIFNlY3JldFxuICAgKiBAcGFyYW0ge0lucHV0TmZ0TWV0YWRhdGF9IGlucHV0XG4gICAqIHtcbiAgICogICBuYW1lOiBzdHJpbmcgICAgICAgICAgICAgICAvLyBuZnQgY29udGVudCBuYW1lXG4gICAqICAgc3ltYm9sOiBzdHJpbmcgICAgICAgICAgICAgLy8gbmZ0IHRpY2tlciBzeW1ib2xcbiAgICogICBmaWxlUGF0aDogc3RyaW5nIHwgRmlsZSAgICAvLyBuZnQgdGlja2VyIHN5bWJvbFxuICAgKiAgIHJveWFsdHk6IG51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XkoKSA6IG93bmVyUHVibGljS2V5O1xuICAgICAgY29uc3QgbGVhZkRlbGVnYXRlID0gZGVsZWdhdGVcbiAgICAgICAgPyBkZWxlZ2F0ZVxuICAgICAgICA6IG5ldyBBY2NvdW50LktleXBhaXIoeyBzZWNyZXQ6IHBheWVyISB9KS5wdWJrZXk7XG5cbiAgICAgIGNvbnN0IHRyZWVBdXRob3JpdHkgPSBBY2NvdW50LlBkYS5nZXRUcmVlQXV0aG9yaXR5KFxuICAgICAgICB0cmVlT3duZXIudG9QdWJsaWNLZXkoKS50b1N0cmluZygpLFxuICAgICAgKTtcbiAgICAgIGNvbnN0IGNvbGxlY3Rpb25NZXRhZGF0YSA9IEFjY291bnQuUGRhLmdldE1ldGFkYXRhKFxuICAgICAgICBjb2xsZWN0aW9uTWludC50b1N0cmluZygpLFxuICAgICAgKTtcbiAgICAgIGNvbnN0IGNvbGxlY3Rpb25NYXN0ZXJFZGl0aW9uQWNjb3VudCA9IEFjY291bnQuUGRhLmdldE1hc3RlckVkaXRpb24oXG4gICAgICAgIGNvbGxlY3Rpb25NaW50LnRvU3RyaW5nKCksXG4gICAgICApO1xuICAgICAgY29uc3QgYnViYmxlZ3VtU2lnbmVyID0gQWNjb3VudC5QZGEuZ2V0Qmd1bVNpZ25lcigpO1xuXG4gICAgICAvLyBwb3JwZXJ0aWVzLCBVcGxvYWQgY29udGVudFxuICAgICAgbGV0IHByb3BlcnRpZXM7XG4gICAgICBpZiAoaW5wdXQucHJvcGVydGllcykge1xuICAgICAgICBwcm9wZXJ0aWVzID0gYXdhaXQgQ29udmVydGVyLlByb3BlcnRpZXMuaW50b0luZnJhKFxuICAgICAgICAgIGlucHV0LnByb3BlcnRpZXMsXG4gICAgICAgICAgU3RvcmFnZS51cGxvYWRGaWxlLFxuICAgICAgICAgIHN0b3JhZ2VUeXBlLFxuICAgICAgICAgIHBheWVyLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICBpbnB1dCA9IHtcbiAgICAgICAgLi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Rpb25zLnB1c2goXG4gICAgICAgIGNyZWF0ZU1pbnRUb0NvbGxlY3Rpb25WMUluc3RydWN0aW9uKFxuICAgICAgICAgIHtcbiAgICAgICAgICAgIG1lcmtsZVRyZWU6IHRyZWVPd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgdHJlZUF1dGhvcml0eSxcbiAgICAgICAgICAgIHRyZWVEZWxlZ2F0ZTogb3duZXJQdWJsaWNLZXksXG4gICAgICAgICAgICBwYXllcjogcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICAgICAgbGVhZk93bmVyOiBsZWFmT3duZXIsIC8vIHJlY2VpdmVyXG4gICAgICAgICAgICBsZWFmRGVsZWdhdGU6IGxlYWZEZWxlZ2F0ZS50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgY29sbGVjdGlvbkF1dGhvcml0eTogb3duZXJQdWJsaWNLZXksXG4gICAgICAgICAgICBjb2xsZWN0aW9uTWludDogY29sbGVjdGlvbk1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIGNvbGxlY3Rpb25NZXRhZGF0YSxcbiAgICAgICAgICAgIGVkaXRpb25BY2NvdW50OiBjb2xsZWN0aW9uTWFzdGVyRWRpdGlvbkFjY291bnQsXG4gICAgICAgICAgICBidWJibGVndW1TaWduZXIsXG4gICAgICAgICAgICBsb2dXcmFwcGVyOiBTUExfTk9PUF9QUk9HUkFNX0lELFxuICAgICAgICAgICAgY29sbGVjdGlvbkF1dGhvcml0eVJlY29yZFBkYTogQlVCQkxFR1VNX1BST0dSQU1fSUQsXG4gICAgICAgICAgICBjb21wcmVzc2lvblByb2dyYW06IFNQTF9BQ0NPVU5UX0NPTVBSRVNTSU9OX1BST0dSQU1fSUQsXG4gICAgICAgICAgICB0b2tlbk1ldGFkYXRhUHJvZ3JhbTogVE9LRU5fTUVUQURBVEFfUFJPR1JBTV9JRCxcbiAgICAgICAgICB9LFxuICAgICAgICAgIHtcbiAgICAgICAgICAgIG1ldGFkYXRhQXJncyxcbiAgICAgICAgICB9LFxuICAgICAgICApLFxuICAgICAgKTtcblxuICAgICAgaWYgKGlucHV0LmNyZWF0b3JzKSB7XG4gICAgICAgIGNvbnN0IGFzc2V0SWQgPSBhd2FpdCBuZXcgU3BhY2UuU3BhY2UodHJlZU93bmVyKS5nZXRBc3NldElkKCk7XG4gICAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICAgIGF3YWl0IGNyZWF0ZVZlcmlmeUNyZWF0b3IoXG4gICAgICAgICAgICBtZXRhZGF0YUFyZ3MuY3JlYXRvcnMsXG4gICAgICAgICAgICBhc3NldElkLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICB0cmVlT3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIG1ldGFkYXRhQXJncyxcbiAgICAgICAgICAgIHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5NaW50KFxuICAgICAgICBpbnN0cnVjdGlvbnMsXG4gICAgICAgIFtvd25lci50b0tleXBhaXIoKV0sXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICBuZXcgU3BhY2UuU3BhY2UodHJlZU93bmVyKSxcbiAgICAgICk7XG4gICAgfSk7XG4gIH07XG59XG4iLCAiaW1wb3J0IHsgY3JlYXRlTWludFRvQ2hlY2tlZEluc3RydWN0aW9uIH0gZnJvbSAnQHNvbGFuYS9zcGwtdG9rZW4nO1xuaW1wb3J0IHsgUmVzdWx0LCBUcnkgfSBmcm9tICd+L3N1aXRlLXV0aWxzJztcbmltcG9ydCB7IFB1YmtleSwgU2VjcmV0IH0gZnJvbSAnfi90eXBlcy9hY2NvdW50JztcbmltcG9ydCB7IFRyYW5zYWN0aW9uQnVpbGRlciB9IGZyb20gJ34vdHJhbnNhY3Rpb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PT0gJzEnKSB7XG4gICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBNZXRhZGF0YS5mcm9tQWNjb3VudEFkZHJlc3MoXG4gICAgICAgICAgY29ubmVjdGlvbixcbiAgICAgICAgICBBY2NvdW50LlBkYS5nZXRNZXRhZGF0YShtaW50KSxcbiAgICAgICAgKVxuICAgICAgICAgIC50aGVuKGFzeW5jIChtZXRhZGF0YSkgPT4ge1xuICAgICAgICAgICAgLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLWV4cGxpY2l0LWFueSAqL1xuICAgICAgICAgICAgcmV0dXJuIGZldGNoUmV0cnkobWV0YWRhdGEuZGF0YS51cmkpLnRoZW4oKGpzb246IGFueSkgPT4ge1xuICAgICAgICAgICAgICByZXR1cm4gY29udmVydGVyKG1ldGFkYXRhLCBqc29uLCB0b2tlbkFtb3VudCk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICB9KVxuICAgICAgICAgIC5jYXRjaCgoZXJyKSA9PiBkZWJ1Z0xvZygnIyBbRmV0Y2ggZXJyb3JdJywgZXJyKSk7XG4gICAgICB9KTtcblxuICAgICAgY29uc3QgZmlsdGVycyA9IChhd2FpdCBQcm9taXNlLmFsbChkYXRhcykpLmZpbHRlcihcbiAgICAgICAgKGRhdGEpID0+IGRhdGEgIT09IHVuZGVmaW5lZCxcbiAgICAgICk7XG4gICAgICByZXR1cm4gZmlsdGVycyBhcyBUb2tlbk1ldGFkYXRhW107XG4gICAgfSk7XG4gIH07XG5cbiAgLyoqXG4gICAqIEZldGNoIG1pbnRlZCBtZXRhZGF0YSBieSBtaW50IGFkZHJlc3NcbiAgICpcbiAgICogQHBhcmFtIHtQdWJrZXl9IG1pbnRcbiAgICogQHJldHVybiBQcm9taXNlPFJlc3VsdDxVc2VyU2lkZU91dHB1dC5Ub2tlbk1ldGFkYXRhLCBFcnJvcj4+XG4gICAqL1xuICBleHBvcnQgY29uc3QgZmlu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2hPYmouYmxvY2toYXNoLFxuICAgICAgICBmZWVQYXllcjogZmVlUGF5ZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgIH0pO1xuXG4gICAgICBpbnN0MiA9IGNyZWF0ZVRyYW5zZmVyQ2hlY2tlZEluc3RydWN0aW9uKFxuICAgICAgICBzb3VyY2VUb2tlbi50b2tlbkFjY291bnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBkZXN0VG9rZW4udG9rZW5BY2NvdW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICBDYWxjdWxhdG9yLmNhbGN1bGF0ZUFtb3VudChhbW91bnQsIG1pbnREZWNpbWFsKSxcbiAgICAgICAgbWludERlY2ltYWwsXG4gICAgICAgIFtvd25lci50b0tleXBhaXIoKV0sXG4gICAgICApO1xuXG4gICAgICAvLyByZXR1cm4gYXNzb2NpYXRlZCB0b2tlbiBhY2NvdW50XG4gICAgICBpZiAoIWRlc3RUb2tlbi5pbnN0KSB7XG4gICAgICAgIHR4LmFkZChpbnN0Mik7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICAvLyByZXR1cm4gaW5zdHJ1Y3Rpb24gYW5kIHVuZGVjaWRlZCBhc3NvY2lhdGVkIHRva2VuIGFjY291bnRcbiAgICAgICAgdHguYWRkKGRlc3RUb2tlbi5pbnN0KS5hZGQoaW5zdDIpO1xuICAgICAgfVxuXG4gICAgICB0eC5yZWNlbnRCbG9ja2hhc2ggPSBibG9ja2hhc2hPYmouYmxvY2toYXNoO1xuICAgICAgdHgucGFydGlhbFNpZ24ob3duZXIudG9LZXlwYWlyKCkpO1xuXG4gICAgICBjb25zdCBzZXJpYWxpemVkVHggPSB0eC5zZXJpYWxpemUoe1xuICAgICAgICByZXF1aXJlQWxsU2lnbmF0dXJlczogZmFsc2UsXG4gICAgICB9KTtcbiAgICAgIGNvbnN0IGhleCA9IHNlcmlhbGl6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XG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlSW5pdGlhbGl6ZU1pbnRJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgbWludERlY2ltYWwsXG4gICAgICAgIG93bmVyLFxuICAgICAgICBvd25lcixcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICBmZWVQYXllcixcbiAgICAgICAgdG9rZW5Bc3NvY2lhdGVkLFxuICAgICAgICBvd25lcixcbiAgICAgICAgbWludCxcbiAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlTWludFRvQ2hlY2tlZEluc3RydWN0aW9uKFxuICAgICAgICBtaW50LFxuICAgICAgICB0b2tlbkFzc29jaWF0ZWQsXG4gICAgICAgIG93bmVyLFxuICAgICAgICBDYWxjdWxhdGUuY2FsY3VsYXRlQW1vdW50KHRvdGFsQW1vdW50LCBtaW50RGVjaW1hbCksXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgKSxcbiAgICApO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVDcmVhdGVNZXRhZGF0YUFjY291bnRWM0luc3RydWN0aW9uKFxuICAgICAgICB7XG4gICAgICAgICAgbWV0YWRhdGE6IG1ldGFkYXRhUGRhLFxuICAgICAgICAgIG1pbnQsXG4gICAgICAgICAgbWludEF1dGhvcml0eTogb3duZXIsXG4gICAgICAgICAgcGF5ZXI6IGZlZVBheWVyLFxuICAgICAgICAgIHVwZGF0ZUF1dGhvcml0eTogb3duZXIsXG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICBjcmVhdGVNZXRhZGF0YUFjY291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gICBzdG9yYWdlVHlwZSxcbiAgICAgICAgICBwYXllcixcbiAgICAgICAgKTtcblxuICAgICAgICBpZiAodXBsb2FkZWQuaXNFcnIpIHtcbiAgICAgICAgICB0aHJvdyB1cGxvYWRlZDtcbiAgICAgICAgfVxuICAgICAgICB1cmkgPSB1cGxvYWRlZC52YWx1ZTtcbiAgICAgIH0gZWxzZSBpZiAoaW5wdXQudXJpKSB7XG4gICAgICAgIGNvbnN0IGltYWdlID0geyBpbWFnZTogaW5wdXQudXJpIH07XG4gICAgICAgIGNvbnN0IHVwbG9hZGVkID0gYXdhaXQgU3RvcmFnZS51cGxvYWREYXRhKFxuICAgICAgICAgIHsgLi4uc3RvcmFnZU1ldGFkYXRhLCAuLi5pbWFnZSB9LFxuICAgICAgICAgIHN0b3JhZ2VUeXBlLFxuICAgICAgICAgIHBheWVyLFxuICAgICAgICApO1xuICAgICAgICBpZiAodXBsb2FkZWQuaXNFcnIpIHtcbiAgICAgICAgICB0aHJvdyB1cGxvYWRlZDtcbiAgICAgICAgfVxuICAgICAgICB1cmkgPSB1cGxvYWRlZC52YWx1ZTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHRocm93IEVycm9yKGBNdXN0IHNldCBmaWxlUGF0aCcgb3IgJ3VyaSdgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgaXNNdXRhYmxlID0gdHJ1ZTtcblxuICAgICAgY29uc3QgZGF0YXYyID0gQ29udmVydGVyLlRva2VuTWV0YWRhdGEuaW50b0luZnJhKFxuICAgICAgICBpbnB1dCxcbiAgICAgICAgdXJpLFxuICAgICAgICBzZWxsZXJGZWVCYXNpc1BvaW50cyxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGRhdGF2MjogJywgZGF0YXYyKTtcbiAgICAgIGRlYnVnTG9nKCcjIHVwbG9hZCBjb250ZW50IHVybDogJywgdXJpKTtcblxuICAgICAgY29uc3QgbWludCA9IEFjY291bnQuS2V5cGFpci5jcmVhdGUoKTtcbiAgICAgIGNvbnN0IGluc3RzID0gYXdhaXQgY3JlYXRlTWludChcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgdG90YWxBbW91bnQsXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICBkYXRhdjIsXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgKTtcblxuICAgICAgLy8gZnJlZXplQXV0aG9yaXR5XG4gICAgICBpZiAoZnJlZXplQXV0aG9yaXR5KSB7XG4gICAgICAgIGluc3RzLnB1c2goXG4gICAgICAgICAgY3JlYXRlRnJlZXplQXV0aG9yaXR5KFxuICAgICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgICAgICBmcmVlemVBdXRob3JpdHkudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5NaW50KFxuICAgICAgICBpbnN0cyxcbiAgICAgICAgW293bmVyLnRvS2V5cGFpcigpLCBtaW50LnRvS2V5cGFpcigpXSxcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCksXG4gICAgICAgIG1pbnQucHVia2V5LFxuICAgICAgKTtcbiAgICB9KTtcbiAgfTtcbn1cbiIsICJpbXBvcnQgeyBSZXN1bHQsIFRyeSB9IGZyb20gJ34vc3VpdGUtdXRpbHMnO1xuaW1wb3J0IHsgVHJhbnNhY3Rpb25CdWlsZGVyIH0gZnJvbSAnfi90cmFuc2FjdGlvbi1idWlsZGVyJztcbmltcG9ydCB7IFB1YmtleSwgU2VjcmV0IH0gZnJvbSAnfi90eXBlcy9hY2NvdW50JztcbmltcG9ydCB7IEFjY291bnQgfSBmcm9tICd+L2FjY291b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5jIChcbiAgICBtaW50OiBQdWJrZXksXG4gICAgb3duZXI6IFB1YmtleSxcbiAgICBkZXN0OiBQdWJrZXksXG4gICAgb3duZXJPck11bHRpc2lnOiBTZWNyZXRbXSxcbiAgICBhbW91bnQ6IG51bWJlcixcbiAgICBtaW50RGVjaW1hbDogbnVtYmVyLFxuICAgIG9wdGlvbnM6IFBhcnRpYWw8TWludE9wdGlvbnM+ID0ge30sXG4gICk6IFByb21pc2U8UmVzdWx0PENvbW1vblN0cnVjdHVyZSwgRXJyb3I+PiA9PiB7XG4gICAgcmV0dXJuIFRyeShhc3luYyAoKSA9PiB7XG4gICAgICBjb25zdCBwYXllciA9IG9wdGlvbnMuZmVlUGF5ZXIgPyBvcHRpb25zLmZlZVBheWVyIDogb3duZXJPck11bHRpc2lnWzBdO1xuICAgICAgY29uc3QgcGF5ZXJQdWJrZXkgPSBuZXcgQWNjb3VudC5LZXlwYWlyKHsgc2VjcmV0OiBwYXllciB9KTtcbiAgICAgIGNvbnN0IGtleXBhaXJzID0gb3duZXJPck11bHRpc2lnLm1hcCgocykgPT4gcy50b0tleXBhaXIoKSk7XG4gICAgICBjb25zdCBzb3VyY2VUb2tlbiA9IGF3YWl0IEFjY291bnQuQXNzb2NpYXRlZC5tYWtlT3JDcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgb3duZXIudG9TdHJpbmcoKSxcbiAgICAgICAgcGF5ZXJQdWJrZXkucHVia2V5LFxuICAgICAgKTtcblxuICAgICAgY29uc3QgZGVzdFRva2VuID0gYXdhaXQgQWNjb3VudC5Bc3NvY2lhdGVkLm1ha2VPckNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICBtaW50LFxuICAgICAgICBkZXN0LFxuICAgICAgICBwYXllclB1YmtleS5wdWJrZXksXG4gICAgICApO1xuXG4gICAgICBjb25zdCBpbnN0ID0gY3JlYXRlVHJhbnNmZXJDaGVja2VkSW5zdHJ1Y3Rpb24oXG4gICAgICAgIH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AgICAgY3JlYXRlQ3JlYXRlTWV0YWRhdGFBY2NvdW50VjNJbnN0cnVjdGlvbihcbiAgICAgICAge1xuICAgICAgICAgIG1ldGFkYXRhOiB0b2tlbk1ldGFkYXRhUHVia2V5LFxuICAgICAgICAgIG1pbnQsXG4gICAgICAgICAgbWludEF1dGhvcml0eTogb3duZXIsXG4gICAgICAgICAgcGF5ZXI6IGZlZVBheWVyLFxuICAgICAgICAgIHVwZGF0ZUF1dGhvcml0eTogb3duZXIsXG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICBjcmVhdGVNZXRhZGF0YUFjY291bnRBcmdzVjM6IHtcbiAgICAgICAgICAgIGRhdGE6IG5mdE1ldGFkYXRhLFxuICAgICAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgICAgICAgY29sbGVjdGlvbkRldGFpbHM6IG51bGwsXG4gICAgICAgICAgfSxcbiAgICAgICAgfSxcbiAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlQ3JlYXRlTWFzdGVyRWRpdGlvblYzSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHtcbiAgICAgICAgICBlZGl0aW9uOiBtYXN0ZXJFZGl0aW9uUHVia2V5LFxuICAgICAgICAgIG1pbnQsXG4gICAgICAgICAgdXBkYXRlQXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBtaW50QXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBwYXllcjogZmVlUGF5ZXIsXG4gICAgICAgICAgbWV0YWRhdGE6IHRva2VuTWV0YWRhdGFQdWJrZXksXG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICBjcmVhdGVNYXN0ZXJFZGl0aW9uQXJnczoge1xuICAgICAgICAgICAgbWF4U3VwcGx5OiAwLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICApLFxuICAgICk7XG4gICAgcmV0dXJuIGluc3RydWN0aW9ucztcbiAg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b3cgRXJyb3IoYE11c3Qgc2V0IGZpbGVQYXRoJyBvciAndXJpJ2ApO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBkYXRhdjIgPSBDb252ZXJ0ZXIuUmVndWxhck5mdE1ldGFkYXRhLmludG9JbmZyYShcbiAgICAgICAgaW5wdXQsXG4gICAgICAgIHVyaSxcbiAgICAgICAgc2VsbGVyRmVlQmFzaXNQb2ludHMsXG4gICAgICApO1xuXG4gICAgICBjb25zdCBpc011dGFibGUgPSBpbnB1dC5pc011dGFibGUgPT09IHVuZGVmaW5lZCA/IHRydWUgOiBpbnB1dC5pc011dGFibGU7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGlucHV0OiAnLCBpbnB1dCk7XG4gICAgICBkZWJ1Z0xvZygnIyBkYXRhdjI6ICcsIGRhdGF2Mik7XG5cbiAgICAgIGNvbnN0IG1pbnQgPSBBY2NvdW50LktleXBhaXIuY3JlYXRlKCk7XG5cbiAgICAgIGNvbnN0IGluc3RydWN0aW9ucyA9IGF3YWl0IGNyZWF0ZU1pbnQoXG4gICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgIGRhdGF2MixcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICBpc011dGFibGUsXG4gICAgICApO1xuXG4gICAgICAvLyBmcmVlemVBdXRob3JpdHlcbiAgICAgIGlmIChmcmVlemVBdXRob3JpdHkpIHtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgICAgY3JlYXRlRGVsZWFnYXRlKFxuICAgICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgICAgICBmcmVlemVBdXRob3JpdHkudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICAvLyBjb2xsZWN0aW9uIC0tLVxuICAgICAgaWYgKGlucHV0LmNvbGxlY3Rpb24pIHtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgICAgY3JlYXRlVmVyaWZ5U2l6ZWRDb2xsZWN0aW9uKFxuICAgICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgaW5wdXQuY29sbGVjdGlvbi50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGtleXBhaXJzID0gW293bmVyLnRvS2V5cGFpcigpLCBtaW50LnRvS2V5cGFpcigpXTtcblxuICAgICAgLy8gY3JlYXRvciAtLS1cbiAgICAgIGlmIChpbnB1dC5jcmVhdG9ycykge1xuICAgICAgICBpbnB1dC5jcmVhdG9ycy5mb3JFYWNoKChjcmVhdG9yKSA9PiB7XG4gICAgICAgICAgaWYgKEFjY291bnQuS2V5cGFpci5pc1NlY3JldChjcmVhdG9yLnNlY3JldCkpIHtcbiAgICAgICAgICAgIGNvbnN0IGNyZWF0b3JQdWJrZXkgPSBjcmVhdG9yLmFkZHJlc3MudG9QdWJsaWNLZXkoKTtcbiAgICAgICAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVWZXJpZnlDcmVhdG9yKG1pbnQudG9QdWJsaWNLZXkoKSwgY3JlYXRvclB1YmtleSk7XG4gICAgICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChpbnN0KTtcbiAgICAgICAgICAgIGtleXBhaXJzLnB1c2goY3JlYXRvci5zZWNyZXQudG9LZXlwYWlyKCkpO1xuICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBuZXcgVHJhbnNhY3Rpb25CdWlsZGVyLk1pbnQoXG4gICAgICAgIGluc3RydWN0aW9ucyxcbiAgICAgICAga2V5cGF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AgICAgIGNvbnN0IGlzTXV0YWJsZSA9IGlucHV0LmlzTXV0YWJsZSA9PT0gdW5kZWZpbmVkID8gdHJ1ZSA6IGlucHV0LmlzTXV0YWJsZTtcblxuICAgICAgZGVidWdMb2coJyMgaW5wdXQ6ICcsIGlucHV0KTtcbiAgICAgIGRlYnVnTG9nKCcjIHNlbGxlckZlZUJhc2lzUG9pbnRzOiAnLCBzZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICBkZWJ1Z0xvZygnIyBkYXRhdjI6ICcsIGRhdGF2Mik7XG5cbiAgICAgIGNvbnN0IG1pbnQgPSBBY2NvdW50LktleXBhaXIuY3JlYXRlKCk7XG4gICAgICBjb25zdCBpbnN0cyA9IGF3YWl0IE1pbnQuY3JlYXRlTWludChcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lclB1YmxpY2tleSxcbiAgICAgICAgZGF0YXYyLFxuICAgICAgICBmZWVQYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgICBpc011dGFibGUsXG4gICAgICApO1xuXG4gICAgICAvLyBmcmVlemVBdXRob3JpdHlcbiAgICAgIGlmIChvcHRpb25zLmZyZWV6ZUF1dGhvcml0eSkge1xuICAgICAgICBpbnN0cy5wdXNoKFxuICAgICAgICAgIE1pbnQuY3JlYXRlRGVsZWFnYXRlKFxuICAgICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgb3duZXJQdWJsaWNrZXksXG4gICAgICAgICAgICBvcHRpb25zLmZyZWV6ZUF1dGhvcml0eS50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGJsb2NraGFzaE9iaiA9IGF3YWl0IE5vZGUuZ2V0Q29ubmVjdGlvbigpLmdldExhdGVzdEJsb2NraGFzaCgpO1xuICAgICAgY29uc3QgdHggPSBuZXcgVHJhbnNhY3Rpb24oe1xuICAgICAgICBsYXN0Vm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gIHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgKTtcblxuICAgICAgLy8gZnJlZXplQXV0aG9yaXR5XG4gICAgICBpZiAoZnJlZXplQXV0aG9yaXR5KSB7XG4gICAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICAgIE1pbnQuY3JlYXRlRGVsZWFnYXRlKFxuICAgICAgICAgICAgY29sbGVjdGlvbk1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICAgICAgZnJlZXplQXV0aG9yaXR5LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgY29sbGVjdGlvbnMgPSB7XG4gICAgICAgIGNvbGxlY3Rpb25NZXRhZGF0YTogY29sbGVjdGlvbk1ldGFkYXRhQWNjb3VudCxcbiAgICAgICAgY29sbGVjdGlvbkF1dGhvcml0eTogb3duZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICBjb2xsZWN0aW9uTWludDogY29sbGVjdGlvbk1pbnQudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgfTtcblxuICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgIGNyZWF0ZVNldENvbGxlY3Rpb25TaXplSW5zdHJ1Y3Rpb24oY29sbGVjdGlvbnMsIHtcbiAgICAgICAgICBzZXRDb2xsZWN0aW9uU2l6ZUFyZ3M6IHtcbiAgICAgICAgICAgIHNpemU6IGNvbGxlY3Rpb25TaXplIHx8IERFRkFVTFRfQ09MTEVDVElPTl9TSVpFLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0pLFxuICAgICAgKTtcblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuTWludChcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLFxuICAgICAgICB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HBvcnQgY2xhc3MgQmF0Y2gge1xuICAgIHN1Ym1pdCA9IGFzeW5jIChcbiAgICAgIGFycjogQ29tbW9uLkNvbW1vbltdIHwgTWludC5NaW50W10sXG4gICAgKTogUHJvbWlzZTxSZXN1bHQ8VHJhbnNhY3Rpb25TaWduYXR1cmUsIEVycm9yPj4gPT4ge1xuICAgICAgcmV0dXJuIFRyeShhc3luYyAoKSA9PiB7XG4gICAgICAgIGxldCBpID0gMDtcbiAgICAgICAgZm9yIChjb25zdCBhIG9mIGFycikge1xuICAgICAgICAgIGlmICghYS5pbnN0cnVjdGlvbnMgJiYgIWEuc2lnbmVycykge1xuICAgICAgICAgICAgdGhyb3cgRXJyb3IoXG4gICAgICAgICAgICAgIGBvbmx5IEluc3RydWN0aW9uIG9iamVjdCB0aGF0IGNhbiB1c2UgYmF0Y2hTdWJtaXQoKS5cbiAgICAgICAgICAgIEluZGV4OiAke2l9LCBTZXQgdmFsdWU6ICR7SlNPTi5zdHJpbmdpZnkoYSl9YCxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIGkrKztcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IGluc3RydWN0aW9ucyA9IGFyci5mbGF0TWFwKChhKSA9PiBhLmluc3RydWN0aW9ucyk7XG4gICAgICAgIGNvbnN0IHNpZ25lcnMgPSBhcnIuZmxhdE1hcCgoYSkgPT4gYS5zaWduZXJzKTtcbiAgICAgICAgY29uc3QgZmVlUGF5ZXJzID0gYXJyLmZpbHRlcigoYSkgPT4gYS5mZWVQYXllciAhPT0gdW5kZWZpbmVkKTtcbiAgICAgICAgbGV0IGZlZVBheWVyID0gc2lnbmVyc1swXTtcbiAgICAgICAgaWYgKGZlZVBheWVycy5sZW5ndGggPiAwICYmIGZlZVBheWVyc1swXS5mZWVQYXllcikge1xuICAgICAgICAgIGZlZVBheWVyID0gZmVlUGF5ZXJzWzBdLmZlZVBheWVyO1xuICAgICAgICB9XG5cbiAgICAgICAgY29u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mlsZS5maWxlUGF0aCkge1xuICAgICAgICAgICAgcmV0dXJuIHt9O1xuICAgICAgICAgIH1cbiAgICAgICAgICBjb25zdCByZXMgPSBhd2FpdCBjYWxsYmFja0Z1bmMoZmlsZS5maWxlUGF0aCwgc3RvcmFnZVR5cGUsIGZlZVBheWVyKTtcbiAgICAgICAgICBpZiAocmVzLmlzRXJyKSB7XG4gICAgICAgICAgICB0aHJvdyBFcnJvcihyZXMuZXJyb3IubWVzc2FnZSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBvdmVyd3JpdGVPYmplY3QoZmlsZSwgW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBleGlzdHNLZXk6ICdmaWxlUGF0aCcsXG4gICAgICAgICAgICAgIHdpbGw6IHsga2V5OiAndXJpJywgdmFsdWU6IHJlcy52YWx1ZSB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICBdKTtcbiAgICAgICAgfSksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHsgLi4uaW5wdXQsIGZpbGVzIH0gYXMgUHJvcGVydGllcztcbiAgICB9O1xuICB9XG59XG4iLCAiLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLXVudXNlZC12YXJzICovXG5pbXBvcnQgeyBPcHRpb24sIFVzZXMgfSBmcm9tICd+L3R5cGVzL3JlZ3VsYXItbmZ0JztcblxuZXhwb3J0IG5hbWVzcGFjZSBDb252ZXJ0ZXIge1xuICBleHBvcnQgbmFtZXNwYWNlIFVzZXMge1xuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlclNpZGUgPSAob3V0cHV0OiBPcHRpb248VXNlcz4pOiBVc2VzIHwgdW5kZWZpbmVkID0+IHtcbiAgICAgIGlmICghb3V0cHV0KSB7XG4gICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgICB9XG4gICAgICByZXR1cm4gb3V0cHV0O1xuICAgIH07XG4gIH1cbn1cbiIsICJpbXBvcnQgeyBD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Sc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnJveWFsdHkpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNSb3lhbHR5KG1ldGFkYXRhLnJveWFsdHkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEuc3ltYm9sKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU3ltYm9sKG1ldGFkYXRhLnN5bWJvbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgf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GFzc2V0cy52YWx1ZS5pdGVtcztcblxuICAgIGNvbnN0IG1ldGFkYXRhcyA9IGF3YWl0IFByb21pc2UuYWxsKFxuICAgICAgaXRlbXNcbiAgICAgICAgLmZpbHRlcigoaXRlbSkgPT4gaXRlbS5jb21wcmVzc2lvbi5jb21wcmVzc2VkID09PSBpc0NvbXByZXNzZWQpXG4gICAgICAgIC5tYXAoYXN5bmMgKGl0ZW0pID0+IHtcbiAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgY29uc3Qgb2ZmY2hhaW46IE9mZmNoYWluID0gYXdhaXQgZmV0Y2hPZmZjaGFpbihcbiAgICAgICAgICAgICAgaXRlbS5jb250ZW50Lmpzb25fdXJpLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIGNvbnN0IG1lcmdlZCA9IHtcbiAgICAgICAgICAgICAgb25jaGFpbjogaXRlbSxcbiAgICAgICAgICAgICAgb2ZmY2hhaW46IG9mZmNoYWluLFxuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIHJldHVybiBDb252ZXJ0ZXIuTmZ0LmludG9Vc2VyKG1lcmdlZCk7XG4gICAgICAgICAgfSBjYXRjaCAoZXJyKSB7XG4gICAgICAgICAgICBkZWJ1Z0xvZygnIyBGYWlsZWQgZmV0Y2ggb2ZmY2hhaW4gdXJsOiAnLCBpdGVtLmNvbnRlbnQuanNvbl91cmkpO1xuICAgICAgICAgICAgcmV0dXJuIENvbnZlcnRlci5OZnQuaW50b1VzZXIoe1xuICAgICAgICAgICAgICBvbmNoYWluOiBpdGVtLFxuICAgICAgICAgICAgICBvZmZjaGFpbjoge30sXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICB9XG4gICAgICAgIH0pLFxuICAgICk7XG4gICAgcmV0dXJuIHtcbiAgICAgIHBhZ2U6IGFzc2V0cy52YWx1ZS5wYWdlLFxuICAgICAgdG90YWw6IGFzc2V0cy52YWx1ZS50b3RhbCxcbiAgICAgIGxpbWl0OiBhc3NldHMudmFsdWUubG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AgICAgIGxhbXBvcnRzOlxuICAgICAgICAgICAgYXdhaXQgTm9kZS5nZXRDb25uZWN0aW9uKCkuZ2V0TWluaW11bUJhbGFuY2VGb3JSZW50RXhlbXB0aW9uKHNwYWNlKSxcbiAgICAgICAgICBzcGFjZTogc3BhY2UsXG4gICAgICAgICAgcHJvZ3JhbUlkOiBTUExfQUNDT1VOVF9DT01QUkVTU0lPTl9QUk9HUkFNX0lELFxuICAgICAgICB9KSxcbiAgICAgICk7XG5cbiAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICBjcmVhdGVDcmVhdGVUcmVlSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAge1xuICAgICAgICAgICAgbWVya2xlVHJlZTogdHJlZU93bmVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgICAgIHRyZWVBdXRob3JpdHksXG4gICAgICAgICAgICB0cmVlQ3JlYXRvcjogb3duZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICAgICAgcGF5ZXI6IHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgICAgIGxvZ1dyYXBwZXI6IFNQTF9OT09QX1BST0dSQU1fSUQsXG4gICAgICAgICAgICBjb21wcmVzc2lvblByb2dyYW06IFNQTF9BQ0NPVU5UX0NPTVBSRVNTSU9OX1BST0dSQU1fSUQsXG4gICAgICAgICAgfSxcbiAgICAgICAgICB7XG4gICAgICAgICAgICBtYXhCdWZmZXJTaXplLFxuICAgICAgICAgICAgbWF4RGVwdGgsXG4gICAgICAgICAgICBwdWJsaWM6IGZhbHNlLFxuICAgICAgICAgIH0sXG4gICAgICAgICAgTVBMX0JVQkJMRUdVTV9QUk9HUkFNX0lELnRvUHVibGljS2V5KCksXG4gICAgICAgICksXG4gICAgICApO1xuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5NaW50KFxuICAgICAgICBpbnN0cnVjdGlvbnMsXG4gICAgICA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leTogY29sbGVjdGlvbk1pbnQudG9QdWJsaWNLZXkoKSwgdmVyaWZpZWQ6IGZhbHNlIH0sXG4gICAgICB9O1xuXG4gICAgICBkZWJ1Z0xvZygnIyBpbnB1dDogJywgaW5wdXQpO1xuICAgICAgZGVidWdMb2coJyMgbWV0YWRhdGFBcmdzOiAnLCBtZXRhZGF0YUFyZ3MpO1xuXG4gICAgICBjb25zdCBpbnN0cnVjdGlvbnMgPSBbXTtcbiAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICBjcmVhdGVNaW50VG9Db2xsZWN0aW9uVjFJbnN0cnVjdGlvbihcbiAgICAgICAgICB7XG4gICAgICAgICAgICBtZXJrbGVUcmVlOiB0cmVlT3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIHRyZWVBdXRob3JpdHksXG4gICAgICAgICAgICB0cmVlRGVsZWdhdGU6IG93bmVyUHVibGljS2V5LFxuICAgICAgICAgICAgcGF5ZXI6IHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgICAgIGxlYWZPd25lcjogbGVhZk93bmVyLCAvLyByZWNlaXZlclxuICAgICAgICAgICAgbGVhZkRlbGVnYXRlOiBsZWFmRGVsZWdhdGUudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIGNvbGxlY3Rpb25BdXRob3JpdHk6IG93bmVyUHVibGljS2V5LFxuICAgICAgICAgICAgY29sbGVjdGlvbk1pbnQ6IGNvbGxlY3Rpb25NaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBjb2xsZWN0aW9uTWV0YWRhdGEsXG4gICAgICAgICAgICBlZGl0aW9uQWNjb3VudDogY29sbGVjdGlvbk1hc3RlckVkaXRpb25BY2NvdW50LFxuICAgICAgICAgICAgYnViYmxlZ3VtU2lnbmVyLFxuICAgICAgICAgICAgbG9nV3JhcHBlcjogU1BMX05PT1BfUFJPR1JBTV9JRCxcbiAgICAgICAgICAgIGNvbGxlY3Rpb25BdXRob3JpdHlSZWNvcmRQZGE6IEJVQkJMRUdVTV9QUk9HUkFNX0lELFxuICAgICAgICAgICAgY29tcHJlc3Npb25Qcm9ncmFtOiBTUExfQUNDT1VOVF9DT01QUkVTU0lPTl9QUk9HUkFNX0lELFxuICAgICAgICAgICAgdG9rZW5NZXRhZGF0YVByb2dyYW06IFRPS0VOX01FVEFEQVRBX1BST0dSQU1fSUQsXG4gICAgICAgICAgfSxcbiAgICAgICAgICB7XG4gICAgICAgICAgICBtZXRhZGF0YUFyZ3MsXG4gICAgICAgICAgfSxcbiAgICAgICAgKSxcbiAgICAgICk7XG5cbiAgICAgIGlmIChpbnB1dC5jcmVhdG9ycykge1xuICAgICAgICBjb25zdCBhc3NldElkID0gYXdhaXQgbmV3IFNwYWNlLlNwYWNlKHRyZWVPd25lcikuZ2V0QXNzZXRJZCgpO1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgICBhd2FpdCBjcmVhdGVWZXJpZnlDcmVhdG9yKFxuICAgICAgICAgICAgbWV0YWRhdGFBcmdzLmNyZWF0b3JzLFxuICAgICAgICAgICAgYXNzZXRJZC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgdHJlZU93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBtZXRhZGF0YUFyZ3MsXG4gICAgICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuTWludChcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLFxuICAgICAgICBbb3duZXIudG9LZXlwYWlyKCldLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgbmV3IFNwYWNlLlNwYWNlKHRyZWVPd25lciksXG4gICAgICApO1xuICAgIH0pO1xuICB9O1xufVxuIiwgImltcG9ydCB7IGNyZWF0ZU1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dCBkYXRhcyA9IGluZm8udmFsdWUubWFwKGFzeW5jIChkKSA9PiB7XG4gICAgICAgIGNvbnN0IG1pbnQgPSBkLmFjY291bnQuZGF0YS5wYXJzZWQuaW5mby5taW50IGFzIFB1YmtleTtcbiAgICAgICAgY29uc3QgdG9rZW5BbW91bnQgPSBkLmFjY291bnQuZGF0YS5wYXJzZWQuaW5mby50b2tlbkFtb3VudFxuICAgICAgICAgIC5hbW91bnQgYXMgc3RyaW5nO1xuICAgICAgICBpZiAodG9rZW5BbW91bnQgPT09ICcxJykge1xuICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gTWV0YWRhdGEuZnJvbUFjY291bnRBZGRyZXNzKFxuICAgICAgICAgIGNvbm5lY3Rpb24sXG4gICAgICAgICAgQWNjb3VudC5QZGEuZ2V0TWV0YWRhdGEobWludCksXG4gICAgICAgIClcbiAgICAgICAgICAudGhlbihhc3luYyAobWV0YWRhdGEpID0+IHtcbiAgICAgICAgICAgIC8qIGVzbGludC1kaXNhYmxlIEB0eXBlc2NyaXB0LWVzbGludC9uby1leHBsaWNpdC1hbnkgKi9cbiAgICAgICAgICAgIHJldHVybiBmZXRjaFJldHJ5KG1ldGFkYXRhLmRhdGEudXJpKS50aGVuKChqc29uOiBhbnkpID0+IHtcbiAgICAgICAgICAgICAgcmV0dXJuIGNvbnZlcnRlcihtZXRhZGF0YSwganNvbiwgdG9rZW5BbW91bnQpO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfSlcbiAgICAgICAgICAuY2F0Y2goKGVycikgPT4gZGVidWdMb2coJyMgW0ZldGNoIGVycm9yXScsIGVycikpO1xuICAgICAgfSk7XG5cbiAgICAgIGNvbnN0IGZpbHRlcnMgPSAoYXdhaXQgUHJvbWlzZS5hbGwoZGF0YXMpKS5maWx0ZXIoXG4gICAgICAgIChkYXRhKSA9PiBkYXRhICE9PSB1bmRlZmluZWQsXG4gICAgICApO1xuICAgICAgcmV0dXJuIGZpb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G5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIFN5c3RlbVByb2dyYW0uY3JlYXRlQWNjb3VudCh7XG4gICAgICAgIGZyb21QdWJrZXk6IGZlZVBheWVyLFxuICAgICAgICBuZXdBY2NvdW50UHVia2V5OiBtaW50LFxuICAgICAgICBzcGFjZTogTUlOVF9TSVpFLFxuICAgICAgICBsYW1wb3J0czogbGFtcG9ydHMsXG4gICAgICAgIHByb2dyYW1JZDogVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgIH0pLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUluaXRpYWxpemVNaW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgIG1pbnQsXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICBvd25lcixcbiAgICAgICAgb3duZXIsXG4gICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgZmVlUGF5ZXIsXG4gICAgICAgIHRva2VuQXNzb2NpYXRlZCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIG1pbnQsXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZU1pbnRUb0NoZWNrZWRJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgdG9rZW5Bc3NvY2lhdGVkLFxuICAgICAgICBvd25lcixcbiAgICAgICAgQ2FsY3VsYXRlLmNhbGN1bGF0ZUFtb3VudCh0b3RhbEFtb3VudCwgbWludERlY2ltYWwpLFxuICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXR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GRhdGF2MiA9IENvbnZlcnRlci5Ub2tlbk1ldGFkYXRhLmludG9JbmZyYShcbiAgICAgICAgaW5wdXQsXG4gICAgICAgIHVyaSxcbiAgICAgICAgc2VsbGVyRmVlQmFzaXNQb2ludHMsXG4gICAgICApO1xuXG4gICAgICBkZWJ1Z0xvZygnIyBkYXRhdjI6ICcsIGRhdGF2Mik7XG4gICAgICBkZWJ1Z0xvZygnIyB1cGxvYWQgY29udGVudCB1cmw6ICcsIHVyaSk7XG5cbiAgICAgIGNvbnN0IG1pbnQgPSBBY2NvdW50LktleXBhaXIuY3JlYXRlKCk7XG4gICAgICBjb25zdCBpbnN0cyA9IGF3YWl0IGNyZWF0ZU1pbnQoXG4gICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgIHRvdGFsQW1vdW50LFxuICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICAgZGF0YXYyLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICk7XG5cbiAgICAgIC8vIGZyZWV6ZUF1dGhvcml0eVxuICAgICAgaWYgKGZyZWV6ZUF1dGhvcml0eSkge1xuICAgICAgICBpbnN0cy5wdXNoKFxuICAgICAgICAgIGNyZWF0ZUZyZWV6ZUF1dGhvcml0eShcbiAgICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICAgICAgZnJlZXplQXV0aG9yaXR5LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuTWludChcbiAgICAgICAgaW5zdHMsXG4gICAgICAgIFtvd25lci50b0tleXBhaXIoKSwgbWludC50b0tleXBhaXIoKV0sXG4gICAgICAgIHB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GNvbnN0IGNyZWF0ZU1pbnQgPSBhc3luYyAoXG4gICAgbWludDogUHVibGljS2V5LFxuICAgIG93bmVyOiBQdWJsaWNLZXksXG4gICAgbmZ0TWV0YWRhdGE6IERhdGFWMixcbiAgICBmZWVQYXllcjogUHVibGljS2V5LFxuICAgIGlzTXV0YWJsZTogYm9vbGVhbixcbiAgKTogUHJvbWlzZTxUcmFuc2FjdGlvbkluc3RydWN0aW9uW10+ID0+IHtcbiAgICBjb25zdCBhdGEgPSBnZXRBc3NvY2lhdGVkVG9rZW5BZGRyZXNzU3luYyhtaW50LCBvd25lcik7XG4gICAgY29uc3QgdG9rZW5NZXRhZGF0YVB1YmtleSA9IEFjY291bnQuUGRhLmdldE1ldGFkYXRhKG1pbnQudG9TdHJpbmcoKSk7XG4gICAgY29uc3QgbWFzdGVyRWRpdGlvblB1YmtleSA9IEFjY291bnQuUGRhLmdldE1hc3RlckVkaXRpb24obWludC50b1N0cmluZygpKTtcbiAgICBjb25zdCBjb25uZWN0aW9uID0gTm9kZS5nZXRDb25uZWN0aW9uKCk7XG4gICAgY29uc3QgaW5zdHJ1Y3Rpb25zID0gW107XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIFN5c3RlbVByb2dyYW0uY3JlYXRlQWNjb3VudCh7XG4gICAgICAgIGZyb21QdWJrZXk6IGZlZVBheWVyLFxuICAgICAgICBuZXdBY2NvdW50UHVia2V5OiBtaW50LFxuICAgICAgICBsYW1wb3J0czogYXdhaXQgZ2V0TWluaW11bUJhbGFuY2VGb3JSZW50RXhlbXB0TWludChjb25uZWN0aW9uKSxcbiAgICAgICAgc3BhY2U6IE1JTlRfU0laRSxcbiAgICAgICAgcHJvZ3JhbUlkOiBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgfSksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKGNyZWF0ZUluaXRpYWxpemVNaW50SW5zdHJ1Y3Rpb24obWludCwgMCwgb3duZXIsIG93bmVyKSk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihmZWVQYXllciwgYXRhLCBvd25lciwgbWludCksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKGNyZWF0ZU1pbnRUb0NoZWNrZWRJbnN0cnVjdGlvbihtaW50LCBhdGEsIG93bmVyLCAxLCAwKSk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUNyZWF0ZU1ldGFkYXRhQWNjb3VudFYzSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHtcbiAgICAgICAgICBtZXRhZGF0YTogdG9rZW5NZXRhZGF0YVB1YmtleSxcbiAgICAgICAgICBtaW50LFxuICAgICAgICAgIG1pbnRBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICAgIHBheWVyOiBmZWVQYXllcixcbiAgICAgICAgICB1cGRhdGVBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICB9LFxuICAgICAgICB7XG4gICAgICAgICAgY3JlYXRlTWV0YWRhdGFBY2NvdW50QXJnc1YzOiB7XG4gICAgICAgICAgICBkYXRhOiBuZnRNZXRhZGF0YSxcbiAgICAgICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICAgICAgIGNvbGxlY3Rpb25EZXRhaWxzOiBudWxsLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUNyZWF0ZU1hc3RlckVkaXRpb25WM0luc3RydWN0aW9uKFxuICAgICAgICB7XG4gICAgICAgICAgZWRpdGlvbjogbWFzdGVyRWRpdGlvblB1YmtleSxcbiAgICAgICAgICBtaW50LFxuICAgICAgICAgIHVwZGF0ZUF1dGhvcml0eTogb3duZXIsXG4gICAgICAgICAgbWludEF1dGhvcml0eTogb3duZXIs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YWREYXRhKFxuICAgICAgICAgIHsgLi4uc3RvcmFnZU1ldGFkYXRhLCAuLi5pbWFnZSB9LFxuICAgICAgICAgIHN0b3JhZ2VUeXBlLFxuICAgICAgICAgIHBheWVyLFxuICAgICAgICApO1xuICAgICAgICBpZiAodXBsb2FkZWQuaXNFcnIpIHtcbiAgICAgICAgICB0aHJvdyB1cGxvYWRlZDtcbiAgICAgICAgfVxuICAgICAgICB1cmkgPSB1cGxvYWRlZC52YWx1ZTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHRocm93IEVycm9yKGBNdXN0IHNldCBmaWxlUGF0aCcgb3IgJ3VyaSdgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgZGF0YXYyID0gQ29udmVydGVyLlJlZ3VsYXJOZnRNZXRhZGF0YS5pbnRvSW5mcmEoXG4gICAgICAgIGlucHV0LFxuICAgICAgICB1cmksXG4gICAgICAgIHNlbGxlckZlZUJhc2lzUG9pbnRzLFxuICAgICAgKTtcblxuICAgICAgY29uc3QgaXNNdXRhYmxlID0gaW5wdXQuaXNNdXRhYmxlID09PSB1bmRlZmluZWQgPyB0cnVlIDogaW5wdXQuaXNNdXRhYmxlO1xuXG4gICAgICBkZWJ1Z0xvZygnIyBpbnB1dDogJywgaW5wdXQpO1xuICAgICAgZGVidWdMb2coJyMgZGF0YXYyOiAnLCBkYXRhdjIpO1xuXG4gICAgICBjb25zdCBtaW50ID0gQWNjb3VudC5LZXlwYWlyLmNyZWF0ZSgpO1xuXG4gICAgICBjb25zdCBpbnN0cnVjdGlvbnMgPSBhd2FpdCBjcmVhdGVNaW50KFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICBkYXRhdjIsXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgKTtcblxuICAgICAgLy8gZnJlZXplQXV0aG9yaXR5XG4gICAgICBpZiAoZnJlZXplQXV0aG9yaXR5KSB7XG4gICAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICAgIGNyZWF0ZURlbGVhZ2F0ZShcbiAgICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICAgICAgZnJlZXplQXV0aG9yaXR5LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgLy8gY29sbGVjdGlvbiAtLS1cbiAgICAgIGlmIChpbnB1dC5jb2xsZWN0aW9uKSB7XG4gICAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICAgIGNyZWF0ZVZlcmlmeVNpemVkQ29sbGVjdGlvbihcbiAgICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIGlucHV0LmNvbGxlY3Rpb24udG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBrZXlwYWlycyA9IFtvd25lci50b0tleXBhaXIoKSwgbWludC50b0tleXBhaXIoKV07XG5cbiAgICAgIC8vIGNyZWF0b3IgLS0tXG4gICAgICBpZiAoaW5wdXQuY3JlYXRvcnMpIHtcbiAgICAgICAgaW5wdXQuY3JlYXRvcnMuZm9yRWFjaCgoY3JlYXRvcikgPT4ge1xuICAgICAgICAgIGlmIChBY2NvdW50LktleXBhaXIuaXNTZWNyZXQoY3JlYXRvci5zZWNyZXQpKSB7XG4gICAgICAgICAgICBjb25zdCBjcmVhdG9yUHVia2V5ID0gY3JlYXRvci5hZGRyZXNzLnRvUHVibGljS2V5KCk7XG4gICAgICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlVmVyaWZ5Q3JlYXRvcihtaW50LnRvUHVib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5jcmVhdGUoKTtcbiAgICAgIGNvbnN0IGNvbGxlY3Rpb25NZXRhZGF0YUFjY291bnQgPSBBY2NvdW50LlBkYS5nZXRNZXRhZGF0YShcbiAgICAgICAgY29sbGVjdGlvbk1pbnQucHVia2V5LFxuICAgICAgKTtcblxuICAgICAgY29uc3QgaW5zdHJ1Y3Rpb25zID0gYXdhaXQgTWludC5jcmVhdGVNaW50KFxuICAgICAgICBjb2xsZWN0aW9uTWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgZGF0YXYyLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICk7XG5cbiAgICAgIC8vIGZyZWV6ZUF1dGhvcml0eVxuICAgICAgaWYgKGZyZWV6ZUF1dGhvcml0eSkge1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgICBNaW50LmNyZWF0ZURlbGVhZ2F0ZShcbiAgICAgICAgICAgIGNvbGxlY3Rpb25NaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgICAgIGZyZWV6ZUF1dGhvcml0eS50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGNvbGxlY3Rpb25zID0ge1xuICAgICAgICBjb2xsZWN0aW9uTWV0YWRhdGE6IGNvbGxlY3Rpb25NZXRhZGF0YUFjY291bnQsXG4gICAgICAgIGNvbGxlY3Rpb25BdXRob3JpdHk6IG93bmVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgY29sbGVjdGlvbk1pbnQ6IGNvbGxlY3Rpb25NaW50LnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgIH07XG5cbiAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICBjcmVhdG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jdGlvbkJ1aWxkZXIiLCAiaW1wb3J0X3dlYjMiLCAiUmVndWxhck5mdCIsICJDb252ZXJ0ZXIiLCAiQWNjb3VudCIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiUmVndWxhck5mdCIsICJTcGxUb2tlbiIsICJpbXBvcnRfbXBsX3Rva2VuX21ldGFkYXRhIiwgIlJlZ3VsYXJOZnQiLCAiQ29udmVydGVyIiwgIkFjY291bnQiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgImltcG9ydF9zcGxfdG9rZW4iLCAiaW1wb3J0X21wbF90b2tlbl9tZXRhZGF0YSIsICJSZWd1bGFyTmZ0IiwgIkFjY291bnQiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlJlZ3VsYXJOZnQiLCAiU3BsVG9rZW4iLCAiUmVndWxhck5mdCIsICJDb21wcmVzc2VkTmZ0IiwgIlJlZ3VsYXJOZnQiLCAiQ29tcHJlc3NlZE5mdCJdCn0K \ No newline at end of file diff --git a/packages/suite-compressed-nft/dist/index.mjs b/packages/suite-compressed-nft/dist/index.mjs index adae6a9f5..25cd1d9e8 100644 --- a/packages/suite-compressed-nft/dist/index.mjs +++ b/packages/suite-compressed-nft/dist/index.mjs @@ -2544,14 +2544,13 @@ var SplToken6; dest, feePayer ); - let inst2; const blockhashObj = await Node.getConnection().getLatestBlockhash(); const tx = new Transaction7({ lastValidBlockHeight: blockhashObj.lastValidBlockHeight, blockhash: blockhashObj.blockhash, feePayer: feePayer.toPublicKey() }); - inst2 = createTransferCheckedInstruction( + const inst2 = createTransferCheckedInstruction( sourceToken.tokenAccount.toPublicKey(), mint.toPublicKey(), destToken.tokenAccount.toPublicKey(), @@ -3420,4 +3419,4 @@ var CompressedNft9 = { export { CompressedNft9 as CompressedNft }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL2NvbnN0YW50cy50cyIsIC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8IHVuZGVmaW5lZCxcbiAgICApOiBPcHRpb248SW50ZXJuYWxDb2xsZWN0aW9uPiA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBudWxsO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4ge1xuICAgICAgICBrZXk6IGlucHV0LnRvUHVibGljS2V5KCksXG4gICAgICAgIHZlcmlmaWVkOiBmYWxzZSxcbiAgICAgIH07XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlciA9IChcbiAgICAgIG91dHB1dDogT3B0aW9uPEludGVybmFsQ29sbGVjdGlvbj4sXG4gICAgKTogQ29sbGVjdGlvblR5cGUgfCB1bmRlZmluZWQgPT4ge1xuICAgICAgaWYgKCFvdXRwdXQpIHtcbiAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIHtcbiAgICAgICAgYWRkcmVzczogb3V0cHV0LmtleS50b1N0cmluZygpLFxuICAgICAgICB2ZXJpZmllZDogb3V0cHV0LnZlcmlmaWVkLFxuICAgICAgfTtcbiAgICB9O1xuICB9XG5cbiAgZXhwb3J0IG5hbWVzcGFjZSBDb2xsZWN0aW9uTWludCB7XG4gICAgZXhwb3J0IGNvbnN0IGludG9Vc2VyID0gKG91dHB1dDogR3JvdXBpbmdbXSk6IFB1YmtleSA9PiB7XG4gICAgICBjb25zdCByZXMgPSBvdXRwdXQuZmluZCgodmFsdWUpID0+IHtcbiAgICAgICAgaWYgKHZhbHVlLmdyb3VwX2tleSA9PT0gJ2NvbGxlY3Rpb24nKSB7XG4gICAgICAgICAgcmV0dXJuIHZhbHVlLmdyb3VwX3ZhbHVlO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIHJldHVybiByZXMgPyByZXMuZ3JvdXBfdmFsdWUgOiAnJztcbiAgICB9O1xuICB9XG59XG4iLCAiLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW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yc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ25hbWUnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLm5hbWUpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNOYW1lKG1ldGFkYXRhLm5hbWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc3ltYm9sJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5zeW1ib2wpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTeW1ib2wobWV0YWRhdGEuc3ltYm9sKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgICAgIGlmIChyZXMgJiYgcmVzLmlzRXJyKSB7XG4gICAgICAgICAgcmVzdWx0cy5wdXNoKC4uLnJlcy5lcnJvci5kZXRhaWxzKTtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgICBpZiAocmVzdWx0cy5sZW5ndGggPiAwKSB7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPVxuICAgICAgICAgICdDYXVnaHQg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W9uLmNvbXByZXNzZWQgPT09IGlzQ29tcHJlc3NlZClcbiAgICAgICAgLm1hcChhc3luYyAoaXRlbSkgPT4ge1xuICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICBjb25zdCBvZmZjaGFpbjogT2ZmY2hhaW4gPSBhd2FpdCBmZXRjaE9mZmNoYWluKFxuICAgICAgICAgICAgICBpdGVtLmNvbnRlbnQuanNvbl91cmksXG4gICAgICAgICAgICApO1xuICAgICAgICAgICAgY29uc3QgbWVyZ2VkID0ge1xuICAgICAgICAgICAgICBvbmNoYWluOiBpdGVtLFxuICAgICAgICAgICAgICBvZmZjaGFpbjogb2ZmY2hhaW4sXG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgcmV0dXJuIENvbnZlcnRlci5OZnQuaW50b1VzZXIobWVyZ2VkKTtcbiAgICAgICAgICB9IGNhdGNoIChlcnIpIHtcbiAgICAgICAgICAgIGRlYnVnTG9nKCcjIEZhaWxlZCBmZXRjaCBvZmZjaGFpbiB1cmw6ICcsIGl0ZW0uY29udGVudC5qc29uX3VyaSk7XG4gICAgICAgICAgICByZXR1cm4gQ29udmVydGVyLk5mdC5pbnRvVXNlcih7XG4gICAgICAgICAgICAgIG9uY2hhaW46IGl0ZW0sXG4gICAgICAgICAgICAgIG9mZmNoYWluOiB7fSxcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgIH1cbiAgICAgICAgfSksXG4gICAgKTtcbiAgICByZXR1cm4ge1xuICAgICAgcGFnZTogYXNzZXRzLnZhbHVlLnBhZ2UsXG4gICAgICB0b3RhbDogYXNzZXRzLnZhbHVlLnRvdGFsLFxuICAgICAgbGltaXQ6IGFzc2V0cy52YWx1ZS5saW1pdCxcbiAgICAgIG1ldGFkYXRhcyxcbiAgICB9O1xuICB9O1xuXG4gIC8qKlxuICAgKiBGaW5kIG5mdCBieSBjb2xsZWN0aW9uIG1pbnRcbiAgICpcbiAgICogQHBhcmFtIHtQdWJrZXl9IGNvbGxlY3Rpb25NaW50X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1wdGlvbihzcGFjZSksXG4gICAgICAgICAgc3BhY2U6IHNwYWNlLFxuICAgICAgICAgIHByb2dyYW1JZDogU1BMX0FDQ09VTlRfQ09NUFJFU1NJT05fUFJPR1JBTV9JRCxcbiAgICAgICAgfSksXG4gICAgICApO1xuXG4gICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgY3JlYXRlQ3JlYXRlVHJlZUluc3RydWN0aW9uKFxuICAgICAgICAgIHtcbiAgICAgICAgICAgIG1lcmtsZVRyZWU6IHRyZWVPd25lci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgICAgICB0cmVlQXV0aG9yaXR5LFxuICAgICAgICAgICAgdHJlZUNyZWF0b3I6IG93bmVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgICAgIHBheWVyOiBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgICAgICBsb2dXcmFwcGVyOiBTUExfTk9PUF9QUk9HUkFNX0lELFxuICAgICAgICAgICAgY29tcHJlc3Npb25Qcm9ncmFtOiBTUExfQUNDT1VOVF9DT01QUkVTU0lPTl9QUk9HUkFNX0lELFxuICAgICAgICAgIH0sXG4gICAgICAgICAge1xuICAgICAgICAgICAgbWF4QnVmZmVyU2l6ZSxcbiAgICAgICAgICAgIG1heERlcHRoLFxuICAgICAgICAgICAgcHVibGljOiBmYWxzZSxcbiAgICAgICAgICB9LFxuICAgICAgICAgIE1QTF9CVUJCTEVHVU1fUFJPR1JBTV9JRC50b1B1YmxpY0tleSgpLFxuICAgICAgICApLFxuICAgICAgKTtcblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuTWludChcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLFxuICAgICAgICBbdHJlZU93bmVyLnRvS2V5cGFpcigpLCBvd25lci50b0tleXBhaXIoKV0sXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICB0cmVlT3du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AgfVxuICAgIGNvbnN0IGNvbXByZXNzaW9uID0gcnBjQXNzZXQudmFsdWUuY29tcHJlc3Npb247XG4gICAgY29uc3Qgb3duZXJzaGlwID0gcnBjQXNzZXQudmFsdWUub3duZXJzaGlwO1xuICAgIGNvbnN0IGFzc2V0UHJvb2YgPSBycGNBc3NldFByb29mLnZhbHVlO1xuXG4gICAgY29uc3QgdHJlZUFjY291bnQgPSBhd2FpdCBDb25jdXJyZW50TWVya2xlVHJlZUFjY291bnQuZnJvbUFjY291bnRBZGRyZXNzKFxuICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICB0cmVlT3duZXIsXG4gICAgKTtcbiAgICBjb25zdCBjYW5vcHlEZXB0aCA9IHRyZWVBY2NvdW50LmdldENhbm9weURlcHRoKCk7XG4gICAgY29uc3Qgc2xpY2VkUHJvb2Y6IEFjY291bnRNZXRhW10gPSBhc3NldFByb29mLnByb29mXG4gICAgICAubWFwKChub2RlOiBzdHJpbmcpID0+ICh7XG4gICAgICAgIHB1YmtleTogbm9kZS50b1B1YmxpY0tleSgpLFxuICAgICAgICBpc1NpZ25lcjogZmFsc2UsXG4gICAgICAgIGlzV3JpdGFibGU6IGZhbHNlLFxuICAgICAgfSkpXG4gICAgICAuc2xpY2UoMCwgYXNzZXRQcm9vZi5wcm9vZi5sZW5ndGggLSAoY2Fub3B5RGVwdGggPyBjYW5vcHlEZXB0aCA6IDApKTtcblxuICAgIHJldHVybiBjcmVhdGVWZXJpZnlDcmVhdG9ySW5zdHJ1Y3Rpb24oXG4gICAgICB7XG4gICAgICAgIHRyZWVBdXRob3JpdHk6IHRyZWVPd25lcixcbiAgICAgICAgbGVhZk93bmVyOiBvd25lcnNoaXAub3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgbGVhZkRlbGVnYXRlOiAob3duZXJzaGlwLmRlbGVnYXRlIHx8IG93bmVyc2hpcC5vd25lcikudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgbWVya2xlVHJ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cbiAgICAgIGNvbnN0IG93bmVyUHVibGljS2V5ID0gb3duZXIudG9LZXlwYWlyKCkucHVibGljS2V5O1xuICAgICAgY29uc3QgbGVhZk93bmVyID0gcmVjZWl2ZXIgPyByZWNlaXZlci50b1B1YmxpY0tleSgpIDogb3duZXJQdWJsaWNLZXk7XG4gICAgICBjb25zdCBsZWFmRGVsZWdhdGUgPSBkZWxlZ2F0ZVxuICAgICAgICA/IGRlbGVnYXRlXG4gICAgICAgIDogbmV3IEFjY291bnQuS2V5cGFpcih7IHNlY3JldDogcGF5ZXIhIH0pLnB1YmtleTtcblxuICAgICAgY29uc3QgdHJlZUF1dGhvcml0eSA9IEFjY291bnQuUGRhLmdldFRyZWVBdXRob3JpdHkoXG4gICAgICAgIHRyZWVPd25lci50b1B1YmxpY0tleSgpLnRvU3RyaW5nKCksXG4gICAgICApO1xuICAgICAgY29uc3QgY29sbGVjdGlvbk1ldGFkYXRhID0gQWNjb3VudC5QZGEuZ2V0TWV0YWRhdGEoXG4gICAgICAgIGNvbGxlY3Rpb25NaW50LnRvU3RyaW5nKCksXG4gICAgICApO1xuICAgICAgY29uc3QgY29sbGVjdGlvbk1hc3RlckVkaXRpb25BY2NvdW50ID0gQWNjb3VudC5QZGEuZ2V0TWFzdGVyRWRpdGlvbihcbiAgICAgICAgY29sbGVjdGlvbk1pbnQudG9TdHJpbmcoKSxcbiAgICAgICk7XG4gICAgICBjb25zdCBidWJibGVndW1TaWduZXIgPSBBY2NvdW50LlBkYS5nZXRCZ3VtU2lnbmVyKCk7XG5cbiAgICAgIC8vIHBvcnBlcnRpZXMsIFVwbG9hZCBjb250ZW50XG4gICAgICBsZXQgcHJvcGVydGllcztcbiAgICAgIGlmIChpbnB1dC5wcm9wZXJ0aWVzKSB7XG4gICAgICAgIHByb3BlcnRpZXMgPSBhd2FpdCBDb252ZXJ0ZXIuUHJvcGVydGllcy5pbnRvSW5mcmEoXG4gICAgICAgICAgaW5wdXQucHJvcGVydGllcyxcbiAgICAgICA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AgICAgIGRlYnVnTG9nKCcjIG1ldGFkYXRhQXJnczogJywgbWV0YWRhdGFBcmdzKTtcblxuICAgICAgY29uc3QgaW5zdHJ1Y3Rpb25zID0gW107XG4gICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgY3JlYXRlTWludFRvQ29sbGVjdGlvblYxSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAge1xuICAgICAgICAgICAgbWVya2xlVHJlZTogdHJlZU93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICB0cmVlQXV0aG9yaXR5LFxuICAgICAgICAgICAgdHJlZURlbGVnYXRlOiBvd25lclB1YmxpY0tleSxcbiAgICAgICAgICAgIHBheWVyOiBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgICAgICBsZWFmT3duZXI6IGxlYWZPd25lciwgLy8gcmVjZWl2ZXJcbiAgICAgICAgICAgIGxlYWZEZWxlZ2F0ZTogbGVhZkRlbGVnYXRlLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBjb2xsZWN0aW9uQXV0aG9yaXR5OiBvd25lclB1YmxpY0tleSxcbiAgICAgICAgICAgIGNvbGxlY3Rpb25NaW50OiBjb2xsZWN0aW9uTWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgY29sbGVjdGlvbk1ldGFkYXRhLFxuICAgICAgICAgICAgZWRpdGlvbkFjY291bnQ6IGNvbGxlY3Rpb25NYXN0ZXJFZGl0aW9uQWNjb3VudCxcbiAgICAgICAgICAgIGJ1YmJsZWd1bVNpZ25lcixcbiAgICAgICAgICAgIGxvZ1dyYXBwZXI6IFNQTF9OT09QX1BST0dSQU1fSUQsXG4gICAgICAgICAgICBjb2xsZWN0aW9uQXV0aG9yaXR5UmVjb3JkUGRhOiBCVUJCTEVHVU1fUFJPR1JBTV9JRCxcbiAgICAgICAgICAgIGNvbXByZXNzaW9uUHJvZ3JhbTogU1BMX0FDQ09VTlRfQ09NUFJFU1NJT05fUFJPR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WludERlY2ltYWw6IG51bWJlcixcbiAgICBvcHRpb25zOiBQYXJ0aWFsPE1pbnRPcHRpb25zPiA9IHt9LFxuICApOiBQcm9taXNlPFJlc3VsdDxDb21tb25TdHJ1Y3R1cmU8UHVia2V5PiwgRXJyb3I+PiA9PiB7XG4gICAgcmV0dXJuIFRyeShhc3luYyAoKSA9PiB7XG4gICAgICBjb25zdCBwYXllciA9IG9wdGlvbnMuZmVlUGF5ZXIgPyBvcHRpb25zLmZlZVBheWVyIDogb3duZXJPck11bHRpc2lnWzBdO1xuICAgICAgY29uc3Qga2V5cGFpcnMgPSBvd25lck9yTXVsdGlzaWcubWFwKChzKSA9PiBzLnRvS2V5cGFpcigpKTtcblxuICAgICAgY29uc3QgdG9rZW5Bc3NvY2lhdGVkID0gYXdhaXQgQWNjb3VudC5Bc3NvY2lhdGVkLnJldHJ5R2V0T3JDcmVhdGUoXG4gICAgICAgIHRva2VuLFxuICAgICAgICBvd25lcixcbiAgICAgICAgcGF5ZXIsXG4gICAgICApO1xuXG4gICAgICBjb25zdCBpbnN0ID0gY3JlYXRlTWludFRvQ2hlY2tlZEluc3RydWN0aW9uKFxuICAgICAgICB0b2tlbi50b1B1YmxpY0tleSgpLFxuICAgICAgICB0b2tlbkFzc29jaWF0ZWQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgQ2FsY3VsYXRlLmNhbGN1bGF0ZUFtb3VudCh0b3RhbEFtb3VudCwgbWludERlY2ltYWwpLFxuICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICAga2V5cGFpcnMsXG4gICAgICApO1xuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb248UHVia2V5PihcbiAgICAgICAgW2luc3RdLFxuICAgICAgICBrZXlwYWlycyxcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCksXG4gICAgICAgIHRva2VuLFxuICAgICAgKTtcbiAgICB9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bnN0IHRva2VuQW1vdW50ID0gZC5hY2NvdW50LmRhdGEucGFyc2VkLmluZm8udG9rZW5BbW91bnRcbiAgICAgICAgICAuYW1vdW50IGFzIHN0cmluZztcbiAgICAgICAgaWYgKHRva2VuQW1vdW50ID09PSAnMScpIHtcbiAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIE1ldGFkYXRhLmZyb21BY2NvdW50QWRkcmVzcyhcbiAgICAgICAgICBjb25uZWN0aW9uLFxuICAgICAgICAgIEFjY291bnQuUGRhLmdldE1ldGFkYXRhKG1pbnQpLFxuICAgICAgICApXG4gICAgICAgICAgLnRoZW4oYXN5bmMgKG1ldGFkYXRhKSA9PiB7XG4gICAgICAgICAgICAvKiBlc2xpbnQtZGlzYWJsZSBAdHlwZXNjcmlwdC1lc2xpbnQvbm8tZXhwbGljaXQtYW55ICovXG4gICAgICAgICAgICByZXR1cm4gZmV0Y2hSZXRyeShtZXRhZGF0YS5kYXRhLnVyaSkudGhlbigoanNvbjogYW55KSA9PiB7XG4gICAgICAgICAgICAgIHJldHVybiBjb252ZXJ0ZXIobWV0YWRhdGEsIGpzb24sIHRva2VuQW1vdW50KTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgIH0pXG4gICAgICAgICAgLmNhdGNoKChlcnIpID0+IGRlYnVnTG9nKCcjIFtGZXRjaCBlcnJvcl0nLCBlcnIpKTtcbiAgICAgIH0pO1xuXG4gICAgICBjb25zdCBmaWx0ZXJzID0gKGF3YWl0IFByb21pc2UuYWxsKGRhdGFzKSkuZmlsdGVyKFxuICAgICAgICAoZGF0YSkgPT4gZGF0YSAhPT0gdW5kZWZpbmVkLFxuICAgICAgKTtcbiAgICAgIHJldHVybiBmaWx0ZXJzIGFzIFRva2VuTWV0YWRhdGFbXTtcbiAgICB9KTtcbiAgfTtcblxuICAvKipcbiAgICogRmV0Y2ggbWludGVkIG1ldGFkYXRhIGJ5IG1pbnQgYWRkcmVzc1xuICAgKlxuIC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SBuZXcgVHJhbnNhY3Rpb24oe1xuICAgICAgICBsYXN0VmFsaWRCbG9ja0hlaWdodDogYmxvY2toYXNoT2JqLmxhc3RWYWxpZEJsb2NrSGVpZ2h0LFxuICAgICAgICBibG9ja2hhc2g6IGJsb2NraGFzaE9iai5ibG9ja2hhc2gsXG4gICAgICAgIGZlZVBheWVyOiBmZWVQYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgfSk7XG5cbiAgICAgIGluc3QyID0gY3JlYXRlVHJhbnNmZXJDaGVja2VkSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHNvdXJjZVRva2VuLnRva2VuQWNjb3VudC50b1B1YmxpY0tleSgpLFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIGRlc3RUb2tlbi50b2tlbkFjY291bnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgIENhbGN1bGF0b3IuY2FsY3VsYXRlQW1vdW50KGFtb3VudCwgbWludERlY2ltYWwpLFxuICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICAgW293bmVyLnRvS2V5cGFpcigpXSxcbiAgICAgICk7XG5cbiAgICAgIC8vIHJldHVybiBhc3NvY2lhdGVkIHRva2VuIGFjY291bnRcbiAgICAgIGlmICghZGVzdFRva2VuLmluc3QpIHtcbiAgICAgICAgdHguYWRkKGluc3QyKTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIC8vIHJldHVybiBpbnN0cnVjdGlvbiBhbmQgdW5kZWNpZGVkIGFzc29jaWF0ZWQgdG9rZW4gYWNjb3VudFxuICAgICAgICB0eC5hZGQoZGVzdFRva2VuLmluc3QpLmFkZChpbnN0Mik7XG4gICAgICB9XG5cbiAgICAgIHR4LnJlY2VudEJsb2NraGFzaCA9IGJsb2NraGFzaE9iai5ibG9ja2hhc2g7XG4gICAgICB0eC5wYXJ0aWFsU2lnbihvd25lci50b0tleXBhaXIoKSk7XG5cbiAgICAgIGN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25lcixcbiAgICAgICAgICBwYXllcjogZmVlUGF5ZXIsXG4gICAgICAgICAgdXBkYXRlQXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgIGNyZWF0ZU1ldGFkYXRhQWNjb3VudEFyZ3NWMzoge1xuICAgICAgICAgICAgZGF0YTogdG9rZW5NZXRhZGF0YSxcbiAgICAgICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICAgICAgIGNvbGxlY3Rpb25EZXRhaWxzOiBudWxsLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICApLFxuICAgICk7XG4gICAgcmV0dXJuIGluc3RydWN0aW9ucztcbiAgfTtcblxuICAvKipcbiAgICogU1BMLVRPS0VOIG1pbnRcbiAgICpcbiAgICogQHBhcmFtIHtTZWNyZXR9IG93bmVyICAgICAgLy8gdG9rZW4gb3duZXIgU2VjcmV0XG4gICAqIEBwYXJhbSB7bnVtYmVyfSB0b3RhbEFtb3VudCAvLyB0b3RhbCBudW1iZXJcbiAgICogQHBhcmFtIHtudW1iZXJ9IG1pbnREZWNpbWFsIC8vIHRva2VuIGRlY2ltYWxcbiAgICogQHBhcmFtIHtJbnB1dFRva2VuTWV0YWRhdGF9IGlucHV0ICAgICAgIC8vIHRva2VuIG1ldGFkYXRhXG4gICAqIEBwYXJhbSB7UGFydGlhbDxNaW50T3B0aW9ucz59IG9wdGlvbnMgICAvLyBvcHRpb25zXG4gICAqIEByZXR1cm4gUHJvbWlzZTxSZXN1bHQ8TWludEluc3RydWN0aW9uLCBFcnJvcj4+XG4gICAqL1xuICBleHBvcnQgY29uc3QgbWludCA9IGFzeW5jIChcbiAgICBvd25lcjogU2VjcmV0LFxuICAgIHRvdGFsQW1vdW50OiBudW1iZXIsXG4gICAgbWludERlY2ltYWw6IG51bWJlcixcbiAgICBpbnB1dDogSW5wdXRUb2tlbk1ldGFkYXRhLFxuICAgIG9wdGlvbnM6IFBhcnRpYWw8TWludE9wdGlvbn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bGVQYXRoKSB7XG4gICAgICAgIGNvbnN0IHVwbG9hZGVkID0gYXdhaXQgU3RvcmFnZS51cGxvYWQoXG4gICAgICAgICAgc3RvcmFnZU1ldGFkYXRhLFxuICAgICAgICAgIGlucHV0LmZpbGVQYXRoLFxuICAgICAgICAgIHN0b3JhZ2VUeXBlLFxuICAgICAgICAgIHBheWVyLFxuICAgICAgICApO1xuXG4gICAgICAgIGlmICh1cGxvYWRlZC5pc0Vycikge1xuICAgICAgICAgIHRocm93IHVwbG9hZGVkO1xuICAgICAgICB9XG4gICAgICAgIHVyaSA9IHVwbG9hZGVkLnZhbHVlO1xuICAgICAgfSBlbHNlIGlmIChpbnB1dC51cmkpIHtcbiAgICAgICAgY29uc3QgaW1hZ2UgPSB7IGltYWdlOiBpbnB1dC51cmkgfTtcbiAgICAgICAgY29uc3QgdXBsb2FkZWQgPSBhd2FpdCBTdG9yYWdlLnVwbG9hZERhdGEoXG4gICAgICAgICAgeyAuLi5zdG9yYWdlTWV0YWRhdGEsIC4uLmltYWdlIH0sXG4gICAgICAgICAgc3RvcmFnZVR5cGUsXG4gICAgICAgICAgcGF5ZXIsXG4gICAgICAgICk7XG4gICAgICAgIGlmICh1cGxvYWRlZC5pc0Vycikge1xuICAgICAgICAgIHRocm93IHVwbG9hZGVkO1xuICAgICAgICB9XG4gICAgICAgIHVyaSA9IHVwbG9hZGVkLnZhbHVlO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgdGhyb3cgRXJyb3IoYE11c3Qgc2V0IGZpbGVQYXRoJyBvciAndXJpJ2ApO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBpc011dGFibGUgPSB0cnVlO1xuXG4gICAgICBjb25zdCBkYXRhdjIgPSBDb252ZXJ0ZXIuVG9rZW5NZXRhZGF0YS5pbnRvSW5mcmEoXG4gICAgICAgIGlucHV0LFxuICAgICAgICB1cmksXG4gICAgICAgIHNlbGxlckZlZUJhc2lzUG9pbnRzLFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgZGF0YXYyOiAnLCBkYXRhdjIpO1xuICAgICAgZGVidWdMb2coJyMgdXBsb2FkIGNvbnRlbnQgdXJsOiAnLCB1cmkpO1xuXG4gICAgICBjb25zdCBtaW50ID0gQWNjb3VudC5LZXlwYWlyLmNyZWF0ZSgpO1xuICAgICAgY29uc3QgaW5zdHMgPSBhd2FpdCBjcmVhdGVNaW50KFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICB0b3RhbEFtb3VudCxcbiAgICAgICAgbWludERlY2ltYWwsXG4gICAgICAgIGRhdGF2MixcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICBpc011dGFibGUsXG4gICAgICApO1xuXG4gICAgICAvLyBmcmVlemVBdXRob3JpdHlcbiAgICAgIGlmIChmcmVlemVBdXRob3JpdHkpIHtcbiAgICAgICAgaW5zdHMucHVzaChcbiAgICAgICAgICBjcmVhdGVGcmVlemVBdXRob3JpdHkoXG4gICAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgICAgIGZyZWV6ZUF1dGhvcml0eS50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBuZXcgVHJhbnNhY3Rpb25CdWlsZGVyLk1pbnQoXG4gICAgICAgIGluc3RzLFxuICAgICAgICBbb3duZXIudG9LZXlwYWlyKCksIG1pbnQudG9LZXlwYWlyKCldLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgbWludC5wdWJrZXksXG4gICAgICApO1xuICAgIH0pO1xuICB9O1xufVxuIiwgImltcG9ydCB7IFJlc3VsdCwgVHJ5IH0gZnJvbSAnfi9zdWl0ZS11dGlscyc7XG5pbXBvcnQgeyBUcmFuc2FjdGlvbkJ1aWxkZ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AgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChjcmVhdGVNaW50VG9DaGVja2VkSW5zdHJ1Y3Rpb24obWludCwgYXRhLCBvd25lciwgMSwgMCkpO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVDcmVhdGVNZXRhZGF0YUFjY291bnRWM0luc3RydWN0aW9uKFxuICAgICAgICB7XG4gICAgICAgICAgbWV0YWRhdGE6IHRva2VuTWV0YWRhdGFQdWJrZXksXG4gICAgICAgICAgbWludCxcbiAgICAgICAgICBtaW50QXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBwYXllcjogZmVlUGF5ZXIsXG4gICAgICAgICAgdXBkYXRlQXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgIGNyZWF0ZU1ldGFkYXRhQWNjb3VudEFyZ3NWMzoge1xuICAgICAgICAgICAgZGF0YTogbmZ0TWV0YWRhdGEsXG4gICAgICAgICAgICBpc011dGFibGUsXG4gICAgICAgICAgICBjb2xsZWN0aW9uRGV0YWlsczogbnVsbCxcbiAgICAgICAgICB9LFxuICAgICAgICB9LFxuICAgICAgKSxcbiAgICApO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVDcmVhdGVNYXN0ZXJFZGl0aW9uVjNJbnN0cnVjdGlvbihcbiAgICAgICAge1xuICAgICAgICAgIGVkaXRpb246IG1hc3RlckVkaXRpb25QdWJrZXksXG4gICAgICAgICAgbWludCxcbiAgICAgICAgICB1cGRhdGVBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICAgIG1pbnRBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICAgIHBheWVyOiBmZWVQYXllcixcbiAgICAgICAgICBtZXRhZGF0YTogdG9rZW5NZXRhZGF0YVB1YmtleSxcbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgIGNyZWF0ZU1hc3RlckVkaXR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hZGVkLmlzRXJyKSB7XG4gICAgICAgICAgdGhyb3cgdXBsb2FkZWQ7XG4gICAgICAgIH1cbiAgICAgICAgdXJpID0gdXBsb2FkZWQudmFsdWU7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICB0aHJvdyBFcnJvcihgTXVzdCBzZXQgZmlsZVBhdGgnIG9yICd1cmknYCk7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGRhdGF2MiA9IENvbnZlcnRlci5SZWd1bGFyTmZ0TWV0YWRhdGEuaW50b0luZnJhKFxuICAgICAgICBpbnB1dCxcbiAgICAgICAgdXJpLFxuICAgICAgICBzZWxsZXJGZWVCYXNpc1BvaW50cyxcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IGlzTXV0YWJsZSA9IGlucHV0LmlzTXV0YWJsZSA9PT0gdW5kZWZpbmVkID8gdHJ1ZSA6IGlucHV0LmlzTXV0YWJsZTtcblxuICAgICAgZGVidWdMb2coJyMgaW5wdXQ6ICcsIGlucHV0KTtcbiAgICAgIGRlYnVnTG9nKCcjIGRhdGF2MjogJywgZGF0YXYyKTtcblxuICAgICAgY29uc3QgbWludCA9IEFjY291bnQuS2V5cGFpci5jcmVhdGUoKTtcblxuICAgICAgY29uc3QgaW5zdHJ1Y3Rpb25zID0gYXdhaXQgY3JlYXRlTWludChcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgZGF0YXYyLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICk7XG5cbiAgICAgIC8vIGZyZWV6ZUF1dGhvcml0eVxuICAgICAgaWYgKGZyZWV6ZUF1dGhvcml0eSkge1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgICBjcmVhdGVEZWxlYWdhdGUoXG4gICAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgICAgIGZyZWV6ZUF1dGhvcml0eS50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIC8vIGNvbGxlY3Rpb24gLS0tXG4gICAgICBpZiAoaW5wdXQuY29sbGVjdGlvbikge1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgICBjcmVhdGVWZXJpZnlTaXplZENvbGxlY3Rpb24oXG4gICAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBpbnB1dC5jb2xsZWN0aW9uLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3Qga2V5cGFpcnMgPSBbb3duZXIudG9LZXlwYWlyKCksIG1pbnQudG9LZXlwYWlyKCldO1xuXG4gICAgICAvLyBjcmVhdG9yIC0tLVxuICAgICAgaWYgKGlucHV0LmNyZWF0b3JzKSB7XG4gICAgICAgIGlucHV0LmNyZWF0b3JzLmZvckVhY2goKGNyZWF0b3IpID0+IHtcbiAgICAgICAgICBpZiAoQWNjb3VudC5LZXlwYWlyLmlzU2VjcmV0KGNyZWF0b3Iuc2VjcmV0KSkge1xuICAgICAgICAgICAgY29uc3QgY3JlYXRvclB1YmtleSA9IGNyZWF0b3IuYWRkcmVzcy50b1B1YmxpY0tleSgpO1xuICAgICAgICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZVZlcmlmeUNyZWF0b3IobWludC50b1B1YmxpY0tleSgpLCBjcmVhdG9yUHVia2V5KTtcbiAgICAgICAgICAgIGluc3RydWN0aW9ucy5wdXNoKGluc3QpO1xuICAgICAgICAgICAga2V5cGFpcnMucHVzaChjcmVhdG9yLnNlY3JldC50b0tleXBhaXIoKSk7XG4gICAgICAgICAgfVxuICAgICA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GxlY3Rpb24pO1xuICAgICAgICBkYXRhdjIgPSB7IC4uLmRhdGF2MiwgY29sbGVjdGlvbiB9O1xuICAgICAgfVxuICAgICAgLy8tLS0gY29sbGVjdGlvbiAtLS1cblxuICAgICAgY29uc3QgaXNNdXRhYmxlID0gaW5wdXQuaXNNdXRhYmxlID09PSB1bmRlZmluZWQgPyB0cnVlIDogaW5wdXQuaXNNdXRhYmxlO1xuXG4gICAgICBkZWJ1Z0xvZygnIyBpbnB1dDogJywgaW5wdXQpO1xuICAgICAgZGVidWdMb2coJyMgc2VsbGVyRmVlQmFzaXNQb2ludHM6ICcsIHNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgIGRlYnVnTG9nKCcjIGRhdGF2MjogJywgZGF0YXYyKTtcblxuICAgICAgY29uc3QgbWludCA9IEFjY291bnQuS2V5cGFpci5jcmVhdGUoKTtcbiAgICAgIGNvbnN0IGluc3RzID0gYXdhaXQgTWludC5jcmVhdGVNaW50KFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyUHVibGlja2V5LFxuICAgICAgICBkYXRhdjIsXG4gICAgICAgIGZlZVBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICk7XG5cbiAgICAgIC8vIGZyZWV6ZUF1dGhvcml0eVxuICAgICAgaWYgKG9wdGlvbnMuZnJlZXplQXV0aG9yaXR5KSB7XG4gICAgICAgIGluc3RzLnB1c2goXG4gICAgICAgICAgTWludC5jcmVhdGVEZWxlYWdhdGUoXG4gICAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBvd25lclB1YmxpY2tleSxcbiAgICAgICAgICAgIG9wdGlvbnMuZnJlZXplQXV0aG9yaXR5LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgYmxvY2toYXNoT2JqID0gYXdhaXQgTm9kZS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IGNvbnN0IGluc3RydWN0aW9ucyA9IGF3YWl0IE1pbnQuY3JlYXRlTWludChcbiAgICAgICAgY29sbGVjdGlvbk1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgIGRhdGF2MixcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICBpc011dGFibGUsXG4gICAgICApO1xuXG4gICAgICAvLyBmcmVlemVBdXRob3JpdHlcbiAgICAgIGlmIChmcmVlemVBdXRob3JpdHkpIHtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgICAgTWludC5jcmVhdGVEZWxlYWdhdGUoXG4gICAgICAgICAgICBjb2xsZWN0aW9uTWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgICAgICBmcmVlemVBdXRob3JpdHkudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBjb2xsZWN0aW9ucyA9IHtcbiAgICAgICAgY29sbGVjdGlvbk1ldGFkYXRhOiBjb2xsZWN0aW9uTWV0YWRhdGFBY2NvdW50LFxuICAgICAgICBjb2xsZWN0aW9uQXV0aG9yaXR5OiBvd25lci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgIGNvbGxlY3Rpb25NaW50OiBjb2xsZWN0aW9uTWludC50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICB9O1xuXG4gICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgY3JlYXRlU2V0Q29sbGVjdGlvblNpemVJbnN0cnVjdGlvbihjb2xsZWN0aW9ucywge1xuICAgICAgICAgIHNldENvbGxlY3Rpb25TaXplQXJnczoge1xuICAgICAgICAgICAgc2l6ZTogY29sbGVjdGlvblNpemUgfHwgREVGQVVMVF9DT0xMRUNUSU9OX1N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c3dpdGNoQnVuZGxyID0gKGVudjogc3RyaW5nKTogc3RyaW5nID0+IHtcbiAgICBzd2l0Y2ggKGVudikge1xuICAgICAgY2FzZSBDb25zdGFudHMuQ2x1c3Rlci5wcmQ6IHtcbiAgICAgICAgY29uc3QgdXJscyA9IENvbnN0YW50cy5CdW5kbHJVcmwucHJkLnNwbGl0KCcsJyk7XG4gICAgICAgIGNvbnN0IGluZGV4ID0gRGF0ZS5ub3coKSAlIHVybHMubGVuZ3RoO1xuICAgICAgICByZXR1cm4gdXJsc1tpbmRleF07XG4gICAgICB9XG4gICAgICBkZWZhdWx0OiB7XG4gICAgICAgIHJldHVybiBDb25zdGFudHMuQnVuZGxyVXJsLmRldjtcbiAgICAgIH1cbiAgICB9XG4gIH07XG5cbiAgZXhwb3J0IGNvbnN0IHN3aXRjaERhc0FwaSA9IChlbnY6IHN0cmluZyk6IHN0cmluZyA9PiB7XG4gICAgc3dpdGNoIChlbnYpIHtcbiAgICAgIGNhc2UgQ29uc3RhbnRzLkNsdXN0ZXIucHJkOiB7XG4gICAgICAgIGlmIChkYXNBcGlVcmwubGVuZ3RoIDwgMSkge1xuICAgICAgICAgIHRocm93IEVycm9yKENvbnN0YW50cy5XYXJubmluZ01lc3NhZ2UuREFTX0FQSV9VUkwpO1xuICAgICAgICB9XG4gICAgICAgIGNvbnN0IHVybHMgPSBDb25zdGFudHMuQnVuZGxyVXJsLnByZC5zcGxpdCgnLCcpO1xuICAgICAgICBjb25zdCBpbmRleCA9IERhdGUubm93KCkgJSB1cmxzLmxlbmd0aDtcbiAgICAgICAgcmV0dXJuIHVybHNbaW5kZXhdO1xuICAgICAgfVxuICAgICAgZGVmYXVsdDoge1xuICAgICAgICBjb25zdCB1cmxzID0gQ29uc3RhbnRzLkRhc0FwaVVybC5kZXYuc3BsaXQoJywnKTtcbiAgICAgICAgY29uc3QgaW5kZXggPSBEYXRlLm5vdygpICUgdXJscy5sZW5ndGg7XG4gICAgICAgIHJldHVybiB1cmxzW2luZG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JheS5wcm90b3R5cGUuc3VibWl0ID0gYXN5bmMgZnVuY3Rpb24gKGZlZVBheWVyPzogU2VjcmV0KSB7XG4gIGlmIChmZWVQYXllcikge1xuICAgIGxldCBpID0gMTtcbiAgICBmb3IgYXdhaXQgKGNvbnN0IG9iaiBvZiB0aGlzKSB7XG4gICAgICBpZiAob2JqLmlzRXJyKSB7XG4gICAgICAgIHJldHVybiBvYmo7XG4gICAgICB9IGVsc2UgaWYgKG9iai52YWx1ZS5jYW5TdWJtaXQpIHtcbiAgICAgICAgZGVidWdMb2coJyMgUmVzdWx0IGJhdGNoIGNhblN1Ym1pdCcpO1xuICAgICAgICBjb25zdCBzaWcgPSBhd2FpdCAob2JqIGFzIFBhcnRpYWxTaWduU3RydWN0dXJlKS5zdWJtaXQoZmVlUGF5ZXIpO1xuICAgICAgICBpZiAoc2lnLmlzRXJyKSB7XG4gICAgICAgICAgcmV0dXJuIHNpZztcbiAgICAgICAgfVxuICAgICAgICBhd2FpdCBOb2RlLmNvbmZpcm1lZFNpZyhzaWcudmFsdWUpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgZGVidWdMb2coJyMgUmVzdWx0IGJhdGNoIG90aGVyIHRoYW4gY2FuU3VibWl0Jyk7XG4gICAgICAgIGlmICh0aGlzLmxlbmd0aCA9PSBpKSB7XG4gICAgICAgICAgLy8gbGFzdCBvYmplY3RcbiAgICAgICAgICByZXR1cm4gb2JqLnN1Ym1pdChmZWVQYXllcik7XG4gICAgICAgIH1cbiAgICAgICAgb2JqLnN1Ym1pdChmZWVQYXllcik7XG4gICAgICB9XG4gICAgICBpKys7XG4gICAgfVxuICB9IGVsc2Uge1xuICAgIGNvbnN0IGluc3RydWN0aW9uczogQ29tbW9uU3RydWN0dXJlIHwgTWludFN0cnVjdHVyZVtdID0gW107XG4gICAgZm9yIChjb25zdCBvYmogb2YgdGhpcykge1xuICAgICAgaWYgKG9iai5pc0Vycikge1xuICAgICAgICByZXR1cm4gb2JqO1xuICAgICAgf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Bzd2l0Y2ggKGtleSkge1xuICAgICAgICAgIGNhc2UgJ2ltYWdlJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuaW1hZ2UpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNJbWFnZVVybChtZXRhZGF0YS5pbWFnZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdyb3lhbHR5JzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEucm95YWx0eSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1JveWFsdHkobWV0YWRhdGEucm95YWx0eSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ25hbWUnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLm5hbWUpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNOYW1lKG1ldGFkY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b25zLFxuICAgICAgLi4ub3B0aW9ucyxcbiAgICB9O1xuXG4gICAgY29uc3QgYXNzZXRzID0gYXdhaXQgQXBpLmdldEFzc2V0c0J5T3duZXIoXG4gICAgICBvd25lcixcbiAgICAgIGxpbWl0LFxuICAgICAgcGFnZSxcbiAgICAgIHNvcnRCeSxcbiAgICAgIGJlZm9yZSxcbiAgICAgIGFmdGVyLFxuICAgICk7XG4gICAgaWYgKGFzc2V0cy5pc0Vycikge1xuICAgICAgdGhyb3cgYXNzZXRzLmVycm9yO1xuICAgIH1cblxuICAgIGNvbnN0IGl0ZW1zID0gYXNzZXRzLnZhbHVlLml0ZW1zO1xuXG4gICAgY29uc3QgbWV0YWRhdGFzID0gYXdhaXQgUHJvbWlzZS5hbGwoXG4gICAgICBpdGVtc1xuICAgICAgICAuZmlsdGVyKChpdGVtKSA9PiBpdGVtLmNvbXByZXNzaW9uLmNvbXByZXNzZWQgPT09IGlzQ29tcHJlc3NlZClcbiAgICAgICAgLm1hcChhc3luYyAoaXRlbSkgPT4ge1xuICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICBjb25zdCBvZmZjaGFpbjogT2ZmY2hhaW4gPSBhd2FpdCBmZXRjaE9mZmNoYWluKFxuICAgICAgICAgICAgICBpdGVtLmNvbnRlbnQuanNvbl91cmksXG4gICAgICAgICAgICApO1xuICAgICAgICAgICAgY29uc3QgbWVyZ2VkID0ge1xuICAgICAgICAgICAgICBvbmNoYWluOiBpdGVtLFxuICAgICAgICAgICAgICBvZmZjaGFpbjogb2ZmY2hhaW4sXG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgcmV0dXJuIENvbnZlcnRlci5OZnQuaW50b1VzZXIobWVyZ2VkKTtcbiAgICAgICAgICB9IGNhdGNoIChlcnIpIHtcbiAgICAgICAgICAgIGRlYnVnTG9nKCcjIEZhaWxlZCBmZXRjaCBvZmZjaGFpbiB1cmw6ICcsIGl0ZW0uY29udGVudC5qc29uX3VyaSk7XG4gICAgICAgICAgIC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dWJsaWNLZXksXG4gICAgICAgICAgICBjb2xsZWN0aW9uTWludDogY29sbGVjdGlvbk1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIGNvbGxlY3Rpb25NZXRhZGF0YSxcbiAgICAgICAgICAgIGVkaXRpb25BY2NvdW50OiBjb2xsZWN0aW9uTWFzdGVyRWRpdGlvbkFjY291bnQsXG4gICAgICAgICAgICBidWJibGVndW1TaWduZXIsXG4gICAgICAgICAgICBsb2dXcmFwcGVyOiBTUExfTk9PUF9QUk9HUkFNX0lELFxuICAgICAgICAgICAgY29sbGVjdGlvbkF1dGhvcml0eVJlY29yZFBkYTogQlVCQkxFR1VNX1BST0dSQU1fSUQsXG4gICAgICAgICAgICBjb21wcmVzc2lvblByb2dyYW06IFNQTF9BQ0NPVU5UX0NPTVBSRVNTSU9OX1BST0dSQU1fSUQsXG4gICAgICAgICAgICB0b2tlbk1ldGFkYXRhUHJvZ3JhbTogVE9LRU5fTUVUQURBVEFfUFJPR1JBTV9JRCxcbiAgICAgICAgICB9LFxuICAgICAgICAgIHtcbiAgICAgICAgICAgIG1ldGFkYXRhQXJncyxcbiAgICAgICAgICB9LFxuICAgICAgICApLFxuICAgICAgKTtcblxuICAgICAgaWYgKGlucHV0LmNyZWF0b3JzKSB7XG4gICAgICAgIGNvbnN0IGFzc2V0SWQgPSBhd2FpdCBuZXcgU3BhY2UuU3BhY2UodHJlZU93bmVyKS5nZXRBc3NldElkKCk7XG4gICAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICAgIGF3YWl0IGNyZWF0ZVZlcmlmeUNyZWF0b3IoXG4gICAgICAgICAgICBtZXRhZGF0YUFyZ3MuY3JlYXRvcnMsXG4gICAgICAgICAgICBhc3NldElkLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICB0cmVlT3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIG1ldGFkYXRhQXJncyxcbiAgICAgICAgICAgIHBheWVyLnRvS2V5c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A9PiB7XG4gICAgICBjb25zdCBjb25uZWN0aW9uID0gTm9kZS5nZXRDb25uZWN0aW9uKCk7XG4gICAgICBjb25zdCBpbmZvID0gYXdhaXQgY29ubmVjdGlvbi5nZXRQYXJzZWRUb2tlbkFjY291bnRzQnlPd25lcihcbiAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAge1xuICAgICAgICAgIHByb2dyYW1JZDogVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgfSxcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IGRhdGFzID0gaW5mby52YWx1ZS5tYXAoYXN5bmMgKGQpID0+IHtcbiAgICAgICAgY29uc3QgbWludCA9IGQuYWNjb3VudC5kYXRhLnBhcnNlZC5pbmZvLm1pbnQgYXMgUHVia2V5O1xuICAgICAgICBjb25zdCB0b2tlbkFtb3VudCA9IGQuYWNjb3VudC5kYXRhLnBhcnNlZC5pbmZvLnRva2VuQW1vdW50XG4gICAgICAgICAgLmFtb3VudCBhcyBzdHJpbmc7XG4gICAgICAgIGlmICh0b2tlbkFtb3VudCA9PT0gJzEnKSB7XG4gICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBNZXRhZGF0YS5mcm9tQWNjb3VudEFkZHJlc3MoXG4gICAgICAgICAgY29ubmVjdGlvbixcbiAgICAgICAgICBBY2NvdW50LlBkYS5nZXRNZXRhZGF0YShtaW50KSxcbiAgICAgICAgKVxuICAgICAgICAgIC50aGVuKGFzeW5jIChtZXRhZGF0YSkgPT4ge1xuICAgICAgICAgICAgLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLWV4cGxpY2l0LWFueSAqL1xuICAgICAgICAgICAgcmV0dXJuIGZldGNoUmV0cnkobWV0YWRhdGEuZGF0YS51cmkpLnRoZW4oKGpzb246IGFueSkgPT4ge1xuICAgICAgICAgICAgICByZXR1cm4gY29udmVydGVyKG1ldGFkYXRhLCBqc29uLCB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Y2tlZEluc3RydWN0aW9uKFxuICAgICAgICBtaW50LFxuICAgICAgICB0b2tlbkFzc29jaWF0ZWQsXG4gICAgICAgIG93bmVyLFxuICAgICAgICBDYWxjdWxhdGUuY2FsY3VsYXRlQW1vdW50KHRvdGFsQW1vdW50LCBtaW50RGVjaW1hbCksXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgKSxcbiAgICApO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVDcmVhdGVNZXRhZGF0YUFjY291bnRWM0luc3RydWN0aW9uKFxuICAgICAgICB7XG4gICAgICAgICAgbWV0YWRhdGE6IG1ldGFkYXRhUGRhLFxuICAgICAgICAgIG1pbnQsXG4gICAgICAgICAgbWludEF1dGhvcml0eTogb3duZXIsXG4gICAgICAgICAgcGF5ZXI6IGZlZVBheWVyLFxuICAgICAgICAgIHVwZGF0ZUF1dGhvcml0eTogb3duZXIsXG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICBjcmVhdGVNZXRhZGF0YUFjY291bnRBcmdzVjM6IHtcbiAgICAgICAgICAgIGRhdGE6IHRva2VuTWV0YWRhdGEsXG4gICAgICAgICAgICBpc011dGFibGUsXG4gICAgICAgICAgICBjb2xsZWN0aW9uRGV0YWlsczogbnVsbCxcbiAgICAgICAgICB9LFxuICAgICAgICB9LFxuICAgICAgKSxcbiAgICApO1xuICAgIHJldHVybiBpbnN0cnVjdGlvbnM7XG4gIH07XG5cbiAgLyoqXG4gICAqIFNQTC1UT0tFTiBtaW50XG4gICAqXG4gICAqIEBwYXJhbSB7U2VjcmV0fSBvd25lciAgICAgIC8vIHRva2VuIG93bmVyIFNlY3JldFxuICAgKiBAcGFyYW0ge251bWJlcn0gdG90YWxBbW91bnQgLy8gdG90YWwgbnVtYmVyXG4gICAqIEBwYXJhbSB7bnVtYmVyfSBtaW50RGVjaW1hbCAvLyB0b2tlbiBkZWNpbWFsXG4gICAqIEBwYXJhbSB7SW5w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QuaXNFcnIpIHtcbiAgICAgICAgICB0aHJvdyB1cGxvYWRlZDtcbiAgICAgICAgfVxuICAgICAgICB1cmkgPSB1cGxvYWRlZC52YWx1ZTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHRocm93IEVycm9yKGBNdXN0IHNldCBmaWxlUGF0aCcgb3IgJ3VyaSdgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgaXNNdXRhYmxlID0gdHJ1ZTtcblxuICAgICAgY29uc3QgZGF0YXYyID0gQ29udmVydGVyLlRva2VuTWV0YWRhdGEuaW50b0luZnJhKFxuICAgICAgICBpbnB1dCxcbiAgICAgICAgdXJpLFxuICAgICAgICBzZWxsZXJGZWVCYXNpc1BvaW50cyxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGRhdGF2MjogJywgZGF0YXYyKTtcbiAgICAgIGRlYnVnTG9nKCcjIHVwbG9hZCBjb250ZW50IHVybDogJywgdXJpKTtcblxuICAgICAgY29uc3QgbWludCA9IEFjY291bnQuS2V5cGFpci5jcmVhdGUoKTtcbiAgICAgIGNvbnN0IGluc3RzID0gYXdhaXQgY3JlYXRlTWludChcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgdG90YWxBbW91bnQsXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICBkYXRhdjIsXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgKTtcblxuICAgICAgLy8gZnJlZXplQXV0aG9yaXR5XG4gICAgICBpZiAoZnJlZXplQXV0aG9yaXR5KSB7XG4gICAgICAgIGluc3RzLnB1c2goXG4gICAgICAgICAgY3JlYXRlRnJlZXplQXV0aG9yaXR5KFxuICAgICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICA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KHsgc2VjcmV0OiBwYXllciB9KTtcbiAgICAgIGNvbnN0IGtleXBhaXJzID0gb3duZXJPck11bHRpc2lnLm1hcCgocykgPT4gcy50b0tleXBhaXIoKSk7XG4gICAgICBjb25zdCBzb3VyY2VUb2tlbiA9IGF3YWl0IEFjY291bnQuQXNzb2NpYXRlZC5tYWtlT3JDcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgb3duZXIudG9TdHJpbmcoKSxcbiAgICAgICAgcGF5ZXJQdWJrZXkucHVia2V5LFxuICAgICAgKTtcblxuICAgICAgY29uc3QgZGVzdFRva2VuID0gYXdhaXQgQWNjb3VudC5Bc3NvY2lhdGVkLm1ha2VPckNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICBtaW50LFxuICAgICAgICBkZXN0LFxuICAgICAgICBwYXllclB1YmtleS5wdWJrZXksXG4gICAgICApO1xuXG4gICAgICBjb25zdCBpbnN0ID0gY3JlYXRlVHJhbnNmZXJDaGVja2VkSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHNvdXJjZVRva2VuLnRva2VuQWNjb3VudC50b1B1YmxpY0tleSgpLFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIGRlc3RUb2tlbi50b2tlbkFjY291bnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgQ2FsY3VsYXRvci5jYWxjdWxhdGVBbW91bnQoYW1vdW50LCBtaW50RGVjaW1hbCksXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICBrZXlwYWlycyxcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IGluc3RydWN0aW9ucyA9IGRlc3RUb2tlbi5pbnN0ID8gW2Rlc3RUb2tlbi5pbnN0LCBpbnN0XSA6IFtpbnN0XTtcblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uKFxuICAgICA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biAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlQ3JlYXRlTWFzdGVyRWRpdGlvblYzSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHtcbiAgICAgICAgICBlZGl0aW9uOiBtYXN0ZXJFZGl0aW9uUHVia2V5LFxuICAgICAgICAgIG1pbnQsXG4gICAgICAgICAgdXBkYXRlQXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBtaW50QXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBwYXllcjogZmVlUGF5ZXIsXG4gICAgICAgICAgbWV0YWRhdGE6IHRva2VuTWV0YWRhdGFQdWJrZXksXG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICBjcmVhdGVNYXN0ZXJFZGl0aW9uQXJnczoge1xuICAgICAgICAgICAgbWF4U3VwcGx5OiAwLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICApLFxuICAgICk7XG4gICAgcmV0dXJuIGluc3RydWN0aW9ucztcbiAgfTtcblxuICAvKipcbiAgICogVXBsb2FkIGNvbnRlbnQgYW5kIE5GVCBtaW50XG4gICAqXG4gICAqIEBwYXJhbSB7U2VjcmV0fSBvd25lciAgICAgICAgIC8vIG93bmVyJ3MgU2VjcmV0XG4gICAqIEBwYXJhbSB7SW5wdXROZnRNZXRhZGF0YX0gaW5wdXRcbiAgICoge1xuICAgKiAgIG5hbWU6IHN0cmluZyAgICAgICAgICAgICAgIC8vIG5mdCBjb250ZW50IG5hbWVcbiAgICogICBzeW1ib2w6IHN0cmluZyAgICAgICAgICAgICAvLyBuZnQgdGlja2VyIHN5bWJvbFxuICAgKiAgIGZpbGVQYXRoOiBzdHJpbmcgfCBGaWxlICAgIC8vIG5mdCB0aWNrZXIgc3ltYm9sXG4gICAqICAgcm95YWx0eTogbnVtYmVyICAgICAgICAgICAgLy8gcm95YWx0eSBwZXJjZW50YWdlXG4gICAqICAgc3RvcmFnZ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lYXRlKCk7XG5cbiAgICAgIGNvbnN0IGluc3RydWN0aW9ucyA9IGF3YWl0IGNyZWF0ZU1pbnQoXG4gICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgIGRhdGF2MixcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICBpc011dGFibGUsXG4gICAgICApO1xuXG4gICAgICAvLyBmcmVlemVBdXRob3JpdHlcbiAgICAgIGlmIChmcmVlemVBdXRob3JpdHkpIHtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgICAgY3JlYXRlRGVsZWFnYXRlKFxuICAgICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgICAgICBmcmVlemVBdXRob3JpdHkudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICAvLyBjb2xsZWN0aW9uIC0tLVxuICAgICAgaWYgKGlucHV0LmNvbGxlY3Rpb24pIHtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgICAgY3JlYXRlVmVyaWZ5U2l6ZWRDb2xsZWN0aW9uKFxuICAgICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgaW5wdXQuY29sbGVjdGlvbi50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGtleXBhaXJzID0gW293bmVyLnRvS2V5cGFpcigpLCBtaW50LnRvS2V5cGFpcigpXTtcblxuICAgICAgLy8gY3JlYXRvciAtLS1cbiAgICAgIGlmIChpbnB1dC5jcmVhdG9ycykge1xuICAgICAgICBpbnB1dC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0YXYyLFxuICAgICAgICBmZWVQYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgICBpc011dGFibGUsXG4gICAgICApO1xuXG4gICAgICAvLyBmcmVlemVBdXRob3JpdHlcbiAgICAgIGlmIChvcHRpb25zLmZyZWV6ZUF1dGhvcml0eSkge1xuICAgICAgICBpbnN0cy5wdXNoKFxuICAgICAgICAgIE1pbnQuY3JlYXRlRGVsZWFnYXRlKFxuICAgICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgb3duZXJQdWJsaWNrZXksXG4gICAgICAgICAgICBvcHRpb25zLmZyZWV6ZUF1dGhvcml0eS50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGJsb2NraGFzaE9iaiA9IGF3YWl0IE5vZGUuZ2V0Q29ubmVjdGlvbigpLmdldExhdGVzdEJsb2NraGFzaCgpO1xuICAgICAgY29uc3QgdHggPSBuZXcgVHJhbnNhY3Rpb24oe1xuICAgICAgICBsYXN0VmFsaWRCbG9ja0hlaWdodDogYmxvY2toYXNoT2JqLmxhc3RWYWxpZEJsb2NrSGVpZ2h0LFxuICAgICAgICBibG9ja2hhc2g6IGJsb2NraGFzaE9iai5ibG9ja2hhc2gsXG4gICAgICAgIGZlZVBheWVyOiBmZWVQYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgfSk7XG5cbiAgICAgIGluc3RzLmZvckVhY2goKGluc3QpID0+IHR4LmFkZChpbnN0KSk7XG4gICAgICB0eC5yZWNlbnRCbG9ja2hhc2ggPSBibG9ja2hhc2hPYmouYmxvY2toYXNoO1xuICAgICAgW293bmVyLCBtaW50XS5mb3JFYWNoKChzaWduZXIpID0+IHR4LnBhcnRpYWxTaWduKHNpZ25lci50b0tleXBhaXIoKSkpO1xuXG4gICAgICBjb25zdCBzZXJpYWxpemVkVHggPSB0eC5zZXJpYWxpemUoe1xuICAgICAgICByZXF1aXJlQWxsU2l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011dGFibGUgPSBpbnB1dC5pc011dGFibGUgPT09IHVuZGVmaW5lZCA/IHRydWUgOiBpbnB1dC5pc011dGFibGU7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGlucHV0OiAnLCBpbnB1dCk7XG4gICAgICBkZWJ1Z0xvZygnIyBkYXRhdjI6ICcsIGRhdGF2Mik7XG5cbiAgICAgIGNvbnN0IGNvbGxlY3Rpb25NaW50ID0gQWNjb3VudC5LZXlwYWlyLmNyZWF0ZSgpO1xuICAgICAgY29uc3QgY29sbGVjdGlvbk1ldGFkYXRhQWNjb3VudCA9IEFjY291bnQuUGRhLmdldE1ldGFkYXRhKFxuICAgICAgICBjb2xsZWN0aW9uTWludC5wdWJrZXksXG4gICAgICApO1xuXG4gICAgICBjb25zdCBpbnN0cnVjdGlvbnMgPSBhd2FpdCBNaW50LmNyZWF0ZU1pbnQoXG4gICAgICAgIGNvbGxlY3Rpb25NaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICBkYXRhdjIsXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgKTtcblxuICAgICAgLy8gZnJlZXplQXV0aG9yaXR5XG4gICAgICBpZiAoZnJlZXplQXV0aG9yaXR5KSB7XG4gICAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICAgIE1pbnQuY3JlYXRlRGVsZWFnYXRlKFxuICAgICAgICAgICAgY29sbGVjdGlvbk1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICAgICAgZnJlZXplQXV0aG9yaXR5LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgY29sbGVjdGlvbnMgPSB7XG4gICAgICAgIGNvbGxlY3Rpb25NZXRhZGF0YTogY29sbGVjd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--git a/packages/suite-regular-nft/dist/index.js b/packages/suite-regular-nft/dist/index.js index f4ff09766..e51cc2693 100644 --- a/packages/suite-regular-nft/dist/index.js +++ b/packages/suite-regular-nft/dist/index.js @@ -1628,14 +1628,13 @@ var SplToken6; dest, feePayer ); - let inst2; const blockhashObj = await Node.getConnection().getLatestBlockhash(); const tx = new import_web310.Transaction({ lastValidBlockHeight: blockhashObj.lastValidBlockHeight, blockhash: blockhashObj.blockhash, feePayer: feePayer.toPublicKey() }); - inst2 = (0, import_spl_token5.createTransferCheckedInstruction)( + const inst2 = (0, import_spl_token5.createTransferCheckedInstruction)( sourceToken.tokenAccount.toPublicKey(), mint.toPublicKey(), destToken.tokenAccount.toPublicKey(), @@ -2852,4 +2851,4 @@ var RegularNft10 = { 0 && (module.exports = { RegularNft }); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uLy4uL3N1aXRlLXNwbC10b2tlbi9zcmMvYWRkLnRzIiwgIi4uLy4uL3N1aXRlLXV0aWxzL3NyYy9jb25zdGFudHMudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvYmF0Y2gudHMiLCAiLi4vLi4vbm9kZS9zcmMvaW5kZXgudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY29tbW9uLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL21pbnQudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvcGFydGlhbC1zaWduLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2NhbGN1bGF0ZS10eHNpemUudHMiLCAiLi4vLi4vZ2xvYmFsL3NyYy9pbmRleC50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9rZXlwYWlyLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL3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vdW5kU291cmNlID0gbWFwcGluZ1Rva2VuQWNjb3VudC5maW5kKFxuICAgICAgICAgIChtKSA9PiBtLmFjY291bnQgPT09IG91dHB1dC5wYXJzZWQuaW5mby5zb3VyY2UsXG4gICAgICAgICk7XG4gICAgICAgIGNvbnN0IGZvdW5kRGVzdCA9IG1hcHBpbmdUb2tlbkFjY291bnQuZmluZChcbiAgICAgICAgICAobSkgPT4gbS5hY2NvdW50ID09PSBvdXRwdXQucGFyc2VkLmluZm8uZGVzdGluYXRpb24sXG4gICAgICAgICk7XG4gICAgICAgIGZvdW5kU291cmNlICYmIChoaXN0b3J5LnNvdXJjZSA9IGZvdW5kU291cmNlLm93bmVyKTtcbiAgICAgICAgZm91bmREZXN0ICYmIChoaXN0b3J5LmRlc3RpbmF0aW9uID0gZm91bmREZXN0Lm93bmVyKTtcbiAgICAgIH1cblxuICAgICAgaGlzdG9yeS50b2tlbkFtb3VudCA9IG91dHB1dC5wYXJzZWQuaW5mby50b2tlbkFtb3VudDtcbiAgICAgIGhpc3RvcnkubWludCA9IG91dHB1dC5wYXJzZWQuaW5mby5taW50O1xuICAgICAgaGlzdG9yeS5tdWx0aXNpZ0F1dGhvcml0eSA9IG91dHB1dC5wYXJzZWQuaW5mby5tdWx0aXNpZ0F1dGhvcml0eTtcbiAgICAgIGhpc3Rvcnkuc2lnbmVycyA9IG91dHB1dC5wYXJzZWQuaW5mby5zaWduZXJzO1xuICAgICAgaGlzdG9yeS50eXBlID0gb3V0cHV0LnByb2dyYW07XG4gICAgICBoaXN0b3J5LmRhdGVUaW1lID0gY29udmVydFRpbWVzdGFtcFRvRGF0ZVRpbWUobWV0YS5ibG9ja1RpbWUgYXMgbnVtYmVyKTtcbiAgICAgIGhpc3Rvcnkuc2lnID0gbWV0YS50cmFuc2FjdGlvbi5zaWduYXR1cmVzWzBdO1xuICAgICAgaGlzdG9yeS5pbm5lckluc3RydWN0aW9uID0gZmFsc2U7XG5cbiAgICAgIC8vIGlubmVyIGluc3RydWN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V0YWRhdGEucm95YWx0eSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1JveWFsdHkobWV0YWRhdGEucm95YWx0eSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ25hbWUnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLm5hbWUpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNOYW1lKG1ldGFkYXRhLm5hbWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc3ltYm9sJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5zeW1ib2wpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTeW1ib2wobWV0YWRhdGEuc3ltYm9sKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgICAgIGlmIChyZXMgJiYgcmVzLmlzRXJyKSB7XG4gICAgICAgICAgcm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1xuICAgIHJldHVybiBUcnkoYXN5bmMgKCkgPT4ge1xuICAgICAgY29uc3QgY29ubmVjdGlvbiA9IE5vZGUuZ2V0Q29ubmVjdGlvbigpO1xuICAgICAgY29uc3QgaW5mbyA9IGF3YWl0IGNvbm5lY3Rpb24uZ2V0UGFyc2VkVG9rZW5BY2NvdW50c0J5T3duZXIoXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIHtcbiAgICAgICAgICBwcm9ncmFtSWQ6IFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgIH0sXG4gICAgICApO1xuXG4gICAgICBjb25zdCBkYXRhcyA9IGluZm8udmFsdWUubWFwKGFzeW5jIChkKSA9PiB7XG4gICAgICAgIGNvbnN0IG1pbnQgPSBkLmFjY291bnQuZGF0YS5wYXJzZWQuaW5mby5taW50IGFzIFB1YmtleTtcbiAgICAgICAgY29uc3QgdG9rZW5BbW91bnQgPSBkLmFjY291bnQuZGF0YS5wYXJzZWQuaW5mby50b2tlbkFtb3VudFxuICAgICAgICAgIC5hbW91bnQgYXMgc3RyaW5nO1xuICAgICAgICBpZiAodG9rZW5BbW91bnQgPT09ICcxJykge1xuICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gTWV0YWRhdGEuZnJvbUFjY291bnRBZGRyZXNzKFxuICAgICAgICAgIGNvbm5lY3Rpb24sXG4gICAgICAgICAgQWNjb3VudC5QZGEuZ2V0TWV0YWRhdGEobWludCksXG4gICAgICAgIClcbiAgICAgICAgICAudGhlbihhc3luYyAobWV0YWRhdGEpID0+IHtcbiAgICAgICAgICAgIC8qIGVzbGludC1kaXNhYmxlIEB0eXBlc2NyaXB0LWVzbGludC9uby1leHBsaWNpdC1hbnkgKi9cbiAgICAgICAgICAgIHJldHVybiBmZXRjaFJldHJ5KG1ldGFkYXRhLmRhdGEudXJpKS50aGVuKChqc29uOiBhbnkpID0+IHtcbiAgICAgICAgICAgICAgcmV0dXJuIGNvb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G4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZU1pbnRUb0NoZWNrZWRJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgdG9rZW5Bc3NvY2lhdGVkLFxuICAgICAgICBvd25lcixcbiAgICAgICAgQ2FsY3VsYXRlLmNhbGN1bGF0ZUFtb3VudCh0b3RhbEFtb3VudCwgbWludERlY2ltYWwpLFxuICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlQ3JlYXRlTWV0YWRhdGFBY2NvdW50VjNJbnN0cnVjdGlvbihcbiAgICAgICAge1xuICAgICAgICAgIG1ldGFkYXRhOiBtZXRhZGF0YVBkYSxcbiAgICAgICAgICBtaW50LFxuICAgICAgICAgIG1pbnRBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICAgIHBheWVyOiBmZWVQYXllcixcbiAgICAgICAgICB1cGRhdGVBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICB9LFxuICAgICAgICB7XG4gICAgICAgICAgY3JlYXRlTWV0YWRhdGFBY2NvdW50QXJnc1YzOiB7XG4gICAgICAgICAgICBkYXRhOiB0b2tlbk1ldGFkYXRhLFxuICAgICAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgICAgICAgY29sbGVjdGlvbkRldGFpbHM6IG51bGwsXG4gICAgICAgICAgfSxcbiAgICAgICAgfSxcbiAgICAgICksXG4gICAgKTtcbiAgICByZXR1cm4gaW5zdHJ1Y3Rpb25zO1xuICB9O1xuXG4gIC8qKlxuICAgKiBTUEwtVE9LRU4gbWludFxuICAgKlxuICAgKiBAcGFyYW0ge1NlY3JldH0gb3duZXIgICAgICAvLyB0b2tlbiBvd25lciBTZWNyZXRcbiAgICogQHBhcmFtIHtudW1iZXJ9IHRvdGFsQW1vdW50IC8vIHRvdGFsIG51bWJlclxuIC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PSBhd2FpdCBQcm9taXNlLmFsbChcbiAgICAgIGl0ZW1zXG4gICAgICAgIC5maWx0ZXIoKGl0ZW0pID0+IGl0ZW0uY29tcHJlc3Npb24uY29tcHJlc3NlZCA9PT0gaXNDb21wcmVzc2VkKVxuICAgICAgICAubWFwKGFzeW5jIChpdGVtKSA9PiB7XG4gICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgIGNvbnN0IG9mZmNoYWluOiBPZmZjaGFpbiA9IGF3YWl0IGZldGNoT2ZmY2hhaW4oXG4gICAgICAgICAgICAgIGl0ZW0uY29udGVudC5qc29uX3VyaSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgICBjb25zdCBtZXJnZWQgPSB7XG4gICAgICAgICAgICAgIG9uY2hhaW46IGl0ZW0sXG4gICAgICAgICAgICAgIG9mZmNoYWluOiBvZmZjaGFpbixcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICByZXR1cm4gQ29udmVydGVyLk5mdC5pbnRvVXNlcihtZXJnZWQpO1xuICAgICAgICAgIH0gY2F0Y2ggKGVycikge1xuICAgICAgICAgICAgZGVidWdMb2coJyMgRmFpbGVkIGZldGNoIG9mZmNoYWluIHVybDogJywgaXRlbS5jb250ZW50Lmpzb25fdXJpKTtcbiAgICAgICAgICAgIHJldHVybiBDb252ZXJ0ZXIuTmZ0LmludG9Vc2VyKHtcbiAgICAgICAgICAgICAgb25jaGFpbjogaXRlbSxcbiAgICAgICAgICAgICAgb2ZmY2hhaW46IHt9LFxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfVxuICAgICAgICB9KSxcbiAgICApO1xuICAgIHJldHVybiB7XG4gICAgICBwYWdlOiBhc3NldHMudmFsdWUucGFnZSxcbiAgICAgIHRvdGFsOiBhc3NldHMudmFsdWUudG90YWwsXG4gICAgICBsaW1pdDogYXNzZXRzLnZhbHVlLmxpbWl0LFxuICAgICAgbWV0YWRhdGFzLFxuICAgIH07XG4gIH07XG5cbiAgLyoqXG4gICAqIEZpbm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IHtcbiAgICAgICAgICBlZGl0aW9uOiBtYXN0ZXJFZGl0aW9uUHVia2V5LFxuICAgICAgICAgIG1pbnQsXG4gICAgICAgICAgdXBkYXRlQXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBtaW50QXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBwYXllcjogZmVlUGF5ZXIsXG4gICAgICAgICAgbWV0YWRhdGE6IHRva2VuTWV0YWRhdGFQdWJrZXksXG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICBjcmVhdGVNYXN0ZXJFZGl0aW9uQXJnczoge1xuICAgICAgICAgICAgbWF4U3VwcGx5OiAwLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICApLFxuICAgICk7XG4gICAgcmV0dXJuIGluc3RydWN0aW9ucztcbiAgfTtcblxuICAvKipcbiAgICogVXBsb2FkIGNvbnRlbnQgYW5kIE5GVCBtaW50XG4gICAqXG4gICAqIEBwYXJhbSB7U2VjcmV0fSBvd25lciAgICAgICAgIC8vIG93bmVyJ3MgU2VjcmV0XG4gICAqIEBwYXJhbSB7SW5wdXROZnRNZXRhZGF0YX0gaW5wdXRcbiAgICoge1xuICAgKiAgIG5hbWU6IHN0cmluZyAgICAgICAgICAgICAgIC8vIG5mdCBjb250ZW50IG5hbWVcbiAgICogICBzeW1ib2w6IHN0cmluZyAgICAgICAgICAgICAvLyBuZnQgdGlja2VyIHN5bWJvbFxuICAgKiAgIGZpbGVQYXRoOiBzdHJpbmcgfCBGaWxlICAgIC8vIG5mdCB0aWNrZXIgc3ltYm9sXG4gICAqICAgcm95YWx0eTogbnVtYmVyICAgICAgICAgICAgLy8gcm95YWx0eSBwZXJjZW50YWdlXG4gICAqICAgc3RvcmFnZVR5cGU6ICdhcndlYXZlJ3wnbmZ0U3RvcmFnZScgLy8gRGVjZW50cmFsaXplZCBzdG9yYWdlXG4gICAqICAgZGVzY3JpcHRpb24/OiBzdHJpbmcgICAgICAgLy8gbmZ0I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XJQdWJsaWNLZXksXG4gICAgICAgIGRhdGF2MixcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICBpc011dGFibGUsXG4gICAgICApO1xuXG4gICAgICAvLyBmcmVlemVBdXRob3JpdHlcbiAgICAgIGlmIChmcmVlemVBdXRob3JpdHkpIHtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgICAgY3JlYXRlRGVsZWFnYXRlKFxuICAgICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgICAgICBmcmVlemVBdXRob3JpdHkudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICAvLyBjb2xsZWN0aW9uIC0tLVxuICAgICAgaWYgKGlucHV0LmNvbGxlY3Rpb24pIHtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgICAgY3JlYXRlVmVyaWZ5U2l6ZWRDb2xsZWN0aW9uKFxuICAgICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgaW5wdXQuY29sbGVjdGlvbi50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGtleXBhaXJzID0gW293bmVyLnRvS2V5cGFpcigpLCBtaW50LnRvS2V5cGFpcigpXTtcblxuICAgICAgLy8gY3JlYXRvciAtLS1cbiAgICAgIGlmIChpbnB1dC5jcmVhdG9ycykge1xuICAgICAgICBpbnB1dC5jcmVhdG9ycy5mb3JFYWNoKChjcmVhdG9yKSA9PiB7XG4gICAgICAgICAgaWYgKEFjY291bnQuS2V5cGFpci5pc1NlY3JldChjcmVhdG9yLnNlY3JldCkpIHtcbiAgICAgICAg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vcHRpb25zLmZyZWV6ZUF1dGhvcml0eSkge1xuICAgICAgICBpbnN0cy5wdXNoKFxuICAgICAgICAgIE1pbnQuY3JlYXRlRGVsZWFnYXRlKFxuICAgICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgb3duZXJQdWJsaWNrZXksXG4gICAgICAgICAgICBvcHRpb25zLmZyZWV6ZUF1dGhvcml0eS50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGJsb2NraGFzaE9iaiA9IGF3YWl0IE5vZGUuZ2V0Q29ubmVjdGlvbigpLmdldExhdGVzdEJsb2NraGFzaCgpO1xuICAgICAgY29uc3QgdHggPSBuZXcgVHJhbnNhY3Rpb24oe1xuICAgICAgICBsYXN0VmFsaWRCbG9ja0hlaWdodDogYmxvY2toYXNoT2JqLmxhc3RWYWxpZEJsb2NrSGVpZ2h0LFxuICAgICAgICBibG9ja2hhc2g6IGJsb2NraGFzaE9iai5ibG9ja2hhc2gsXG4gICAgICAgIGZlZVBheWVyOiBmZWVQYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgfSk7XG5cbiAgICAgIGluc3RzLmZvckVhY2goKGluc3QpID0+IHR4LmFkZChpbnN0KSk7XG4gICAgICB0eC5yZWNlbnRCbG9ja2hhc2ggPSBibG9ja2hhc2hPYmouYmxvY2toYXNoO1xuICAgICAgW293bmVyLCBtaW50XS5mb3JFYWNoKChzaWduZXIpID0+IHR4LnBhcnRpYWxTaWduKHNpZ25lci50b0tleXBhaXIoKSkpO1xuXG4gICAgICBjb25zdCBzZXJpYWxpemVkVHggPSB0eC5zZXJpYWxpemUoe1xuICAgICAgICByZXF1aXJlQWxsU2lnbmF0dXJlczogZmFsc2UsXG4gICAgICB9KTtcbiAgICAgIGNvbnN0IGhleCA9IHNlcmlhbGl6ZWRUeC50b1N0cmluZygnaGV4Jyk7XG4gICAgICByZXR1cm4gbmV3IFRyYW5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dCk7XG4gICAgICBkZWJ1Z0xvZygnIyBkYXRhdjI6ICcsIGRhdGF2Mik7XG5cbiAgICAgIGNvbnN0IGNvbGxlY3Rpb25NaW50ID0gQWNjb3VudC5LZXlwYWlyLmNyZWF0ZSgpO1xuICAgICAgY29uc3QgY29sbGVjdGlvbk1ldGFkYXRhQWNjb3VudCA9IEFjY291bnQuUGRhLmdldE1ldGFkYXRhKFxuICAgICAgICBjb2xsZWN0aW9uTWludC5wdWJrZXksXG4gICAgICApO1xuXG4gICAgICBjb25zdCBpbnN0cnVjdGlvbnMgPSBhd2FpdCBNaW50LmNyZWF0ZU1pbnQoXG4gICAgICAgIGNvbGxlY3Rpb25NaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICBkYXRhdjIsXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgKTtcblxuICAgICAgLy8gZnJlZXplQXV0aG9yaXR5XG4gICAgICBpZiAoZnJlZXplQXV0aG9yaXR5KSB7XG4gICAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICAgIE1pbnQuY3JlYXRlRGVsZWFnYXRlKFxuICAgICAgICAgICAgY29sbGVjdGlvbk1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICAgICAgZnJlZXplQXV0aG9yaXR5LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgY29sbGVjdGlvbnMgPSB7XG4gICAgICAgIGNvbGxlY3Rpb25NZXRhZGF0YTogY29sbGVjdGlvbk1ldGFkYXRhQWNjb3VudCxcbiAgICAgICAgY29sbGVjdGlvbkF1dGhvcml0eTogb3duZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICBjb2xsZWN0aW9uTWludDog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b2tlbiIsICJTcGxUb2tlbiIsICJBY2NvdW50IiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJTcGxUb2tlbiIsICJSZWd1bGFyTmZ0IiwgIlNwbFRva2VuIiwgIkRhc0FwaSIsICJEYXNBcGkiLCAiQ29udmVydGVyIiwgIkRhc0FwaSIsICJSZWd1bGFyTmZ0IiwgIkRhc0FwaSIsICJpbXBvcnRfc3BsX3Rva2VuIiwgImltcG9ydF9tcGxfdG9rZW5fbWV0YWRhdGEiLCAiUmVndWxhck5mdCIsICJBY2NvdW50IiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJpbXBvcnRfd2ViMyIsICJpbXBvcnRfc3BsX3Rva2VuIiwgImltcG9ydF9tcGxfdG9rZW5fbWV0YWRhdGEiLCAiUmVndWxhck5mdCIsICJtaW50IiwgIkFjY291bnQiLCAiQ29udmVydGVyIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJpbXBvcnRfd2ViMyIsICJSZWd1bGFyTmZ0IiwgIkNvbnZlcnRlciIsICJBY2NvdW50IiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJSZWd1bGFyTmZ0IiwgIlNwbFRva2VuIiwgImltcG9ydF9tcGxfdG9rZW5fbWV0YWRhdGEiLCAiUmVndWxhck5mdCIsICJDb252ZXJ0ZXIiLCAiQWNjb3VudCIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiaW1wb3J0X3NwbF90b2tlbiIsICJpbXBvcnRfbXBsX3Rva2VuX21ldGFkYXRhIiwgIlJlZ3VsYXJOZnQiLCAiQWNjb3VudCIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiUmVndWxhck5mdCIsICJTcGxUb2tlbiIsICJSZWd1bGFyTmZ0Il0KfQo= \ No newline at end of file +//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uLy4uL3N1aXRlLXNwbC10b2tlb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ncmFtQWRkcmVzc1N5bmMoXG4gICAgICAgIFtcbiAgICAgICAgICBCdWZmZXIuZnJvbSgnbWV0YWRhdGEnKSxcbiAgICAgICAgICBQUk9HUkFNX0lELnRvQnVmZmVyKCksXG4gICAgICAgICAgYWRkcmVzcy50b1B1YmxpY0tleSgpLnRvQnVmZmVyKCksXG4gICAgICAgIF0sXG4gICAgICAgIFBST0dSQU1fSUQsXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGdldE1hc3RlckVkaXRpb24gPSAoYWRkcmVzczogUHVia2V5KTogUHVibGljS2V5ID0+IHtcbiAgICAgIGNvbnN0IFtwdWJsaWNLZXldID0gUHVibGljS2V5LmZpbmRQcm9ncmFtQWRkcmVzc1N5bmMoXG4gICAgICAgIFtcbiAgICAgICAgICBCdWZmZXIuZnJvbSgnbWV0YWRhdGEnKSxcbiAgICAgICAgICBQUk9HUkFNX0lELnRvQnVmZmVyKCksXG4gICAgICAgICAgYWRkcmVzcy50b1B1YmxpY0tleSgpLnRvQnVmZmVyKCksXG4gICAgICAgICAgQnVmZmVyLmZyb20oJ2VkaXRpb24nKSxcbiAgICAgICAgXSxcbiAgICAgICAgUFJPR1JBTV9JRCxcbiAgICAgICk7XG4gICAgICByZXR1cm4gcHVibGljS2V5O1xuICAgIH07XG5cbiAgICBleHBvcnQgY29uc3QgZ2V0VHJlZUF1dGhvcml0eSA9IChhZGRyZXNzOiBQdWJrZXkpOiBQdWJsaWNLZXkgPT4ge1xuICAgICAgY29uc3QgW3B1YmxpY0tleV0gPSBQdWJsaWNLZXkuZmluZFByb2dyYW1BZGRyZXNzU3luYyhcbiAgICAgICAgW2FkZHJlc3MudG9QdWJsaWNLZXkoKS50b0J1ZmZlcigpXSxcbiAgICAgICAgTVBMX0JVQkJMRUdVTV9QUk9HUkFNX0lELnRvUHVibGljS2V5KCksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1Ym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LFxuICAgICAgICBzdG9yYWdlVHlwZTogU3RvcmFnZVR5cGUsXG4gICAgICAgIGZlZVBheWVyPzogU2VjcmV0LFxuICAgICAgKSA9PiBQcm9taXNlPFJlc3VsdDxzdHJpbmcsIEVycm9yPj4sXG4gICAgICBzdG9yYWdlVHlwZTogU3RvcmFnZVR5cGUsXG4gICAgICBmZWVQYXllcj86IFNlY3JldCxcbiAgICApOiBQcm9taXNlPFByb3BlcnRpZXM+ID0+IHtcbiAgICAgIGlmICghaW5wdXQgfHwgIWlucHV0LmZpbGVzKSB7XG4gICAgICAgIHJldHVybiB7fTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgZmlsZXMgPSBhd2FpdCBQcm9taXNlLmFsbChcbiAgICAgICAgaW5wdXQuZmlsZXMubWFwKGFzeW5jIChmaWxlKSA9PiB7XG4gICAgICAgICAgaWYgKCFmaWxlLmZpbGVQYXRoKSB7XG4gICAgICAgICAgICByZXR1cm4ge307XG4gICAgICAgICAgfVxuICAgICAgICAgIGNvbnN0IHJlcyA9IGF3YWl0IGNhbGxiYWNrRnVuYyhmaWxlLmZpbGVQYXRoLCBzdG9yYWdlVHlwZSwgZmVlUGF5ZXIpO1xuICAgICAgICAgIGlmIChyZXMuaXNFcnIpIHtcbiAgICAgICAgICAgIHRocm93IEVycm9yKHJlcy5lcnJvci5tZXNzYWdlKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgcmV0dXJuIG92ZXJ3cml0ZU9iamVjdChmaWxlLCBbXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGV4aXN0c0tleTogJ2ZpbGVQYXRoJyxcbiAgICAgICAgICAgICAgd2lsbDogeyBrZXk6ICd1cmknLCB2YWx1ZTogcmVzLnZhbHVlIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgIF0pO1xuICAgICAgICB9KSxcbiAgICAgICk7XG4gICAgICByZXR1cm4geyAuLi5pbnB1dCwgZmlsZXMgfSBhcyBQcm9wZXJ0aWVzO1xuICAgIH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4ge1xuICAgICAgY29uc3Qga2V5cyA9IE9iamVjdC5rZXlzKG1ldGFkYXRhKTtcbiAgICAgIGNvbnN0IHJlc3VsdHM6IERldGFpbHNbXSA9IFtdO1xuICAgICAga2V5cy5tYXAoKGtleSkgPT4ge1xuICAgICAgICBsZXQgcmVzITogUmVzdWx0PHN0cmluZywgVmFsaWRhdG9yRXJyb3I+O1xuICAgICAgICBzd2l0Y2ggKGtleSkge1xuICAgICAgICAgIGNhc2UgJ2ltYWdlJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuaW1hZ2UpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNJbWFnZVVybChtZXRhZGF0YS5pbWFnZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdyb3lhbHR5JzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEucm95YWx0eSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1JveWFsdHkobWV0YWRhdGEucm95YWx0eSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJ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tb3VudFxuICAgICAgICAgIC5hbW91bnQgYXMgc3RyaW5nO1xuICAgICAgICBpZiAodG9rZW5BbW91bnQgPT09ICcxJykge1xuICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gTWV0YWRhdGEuZnJvbUFjY291bnRBZGRyZXNzKFxuICAgICAgICAgIGNvbm5lY3Rpb24sXG4gICAgICAgICAgQWNjb3VudC5QZGEuZ2V0TWV0YWRhdGEobWludCksXG4gICAgICAgIClcbiAgICAgICAgICAudGhlbihhc3luYyAobWV0YWRhdGEpID0+IHtcbiAgICAgICAgICAgIC8qIGVzbGludC1kaXNhYmxlIEB0eXBlc2NyaXB0LWVzbGludC9uby1leHBsaWNpdC1hbnkgKi9cbiAgICAgICAgICAgIHJldHVybiBmZXRjaFJldHJ5KG1ldGFkYXRhLmRhdGEudXJpKS50aGVuKChqc29uOiBhbnkpID0+IHtcbiAgICAgICAgICAgICAgcmV0dXJuIGNvbnZlcnRlcihtZXRhZGF0YSwganNvbiwgdG9rZW5BbW91bnQpO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfSlcbiAgICAgICAgICAuY2F0Y2goKGVycikgPT4gZGVidWdMb2coJyMgW0ZldGNoIGVycm9yXScsIGVycikpO1xuICAgICAgfSk7XG5cbiAgICAgIGNvbnN0IGZpbHRlcnMgPSAoYXdhaXQgUHJvbWlzZS5hbGwoZGF0YXMpKS5maWx0ZXIoXG4gICAgICAgIChkYXRhKSA9PiBkYXRhICE9PSB1bmRlZmluZWQsXG4gICAgICApO1xuICAgICAgcmV0dXJuIGZpbHRlcnMgYXMgVG9rZW5NZXRhZGF0YVtdO1xuICAgIH0pO1xuICB9O1xuXG4gIC8qKlxuICAgKiBGZXRjaCBtaW50ZWQgbWV0YWRhdGEgYnkgbWludCBhZGRyZXNzXG4gICAqXG4gICAqIEBwYXJhbSB7UHVia2V5fSBtaW50XG4gICAqIEByZXR1cm4gUHJvbWlzZTxSZXN1bHQ8VXNlclN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2hhc2hPYmoubGFzdFZhbGlkQmxvY2tIZWlnaHQsXG4gICAgICAgIGJsb2NraGFzaDogYmxvY2toYXNoT2JqLmJsb2NraGFzaCxcbiAgICAgICAgZmVlUGF5ZXI6IGZlZVBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICB9KTtcblxuICAgICAgY29uc3QgaW5zdDIgPSBjcmVhdGVUcmFuc2ZlckNoZWNrZWRJbnN0cnVjdGlvbihcbiAgICAgICAgc291cmNlVG9rZW4udG9rZW5BY2NvdW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgZGVzdFRva2VuLnRva2VuQWNjb3VudC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgQ2FsY3VsYXRvci5jYWxjdWxhdGVBbW91bnQoYW1vdW50LCBtaW50RGVjaW1hbCksXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICBbb3duZXIudG9LZXlwYWlyKCldLFxuICAgICAgKTtcblxuICAgICAgLy8gcmV0dXJuIGFzc29jaWF0ZWQgdG9rZW4gYWNjb3VudFxuICAgICAgaWYgKCFkZXN0VG9rZW4uaW5zdCkge1xuICAgICAgICB0eC5hZGQoaW5zdDIpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgLy8gcmV0dXJuIGluc3RydWN0aW9uIGFuZCB1bmRlY2lkZWQgYXNzb2NpYXRlZCB0b2tlbiBhY2NvdW50XG4gICAgICAgIHR4LmFkZChkZXN0VG9rZW4uaW5zdCkuYWRkKGluc3QyKTtcbiAgICAgIH1cblxuICAgICAgdHgucmVjZW50QmxvY2toYXNoID0gYmxvY2toYXNoT2JqLmJsb2NraGFzaDtcbiAgICAgIHR4LnBhcnRpYWxTaWduKG93bmVyLnRvS2V5cGFpcigpKTtcblxuICAgICAgY29uc3Qgc2VyaWFsaXplZFR4ID0gdHguc2VyaWFsaXplKHtcbiAgICAgICAgcmVxd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0czogbGFtcG9ydHMsXG4gICAgICAgIHByb2dyYW1JZDogVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgIH0pLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUluaXRpYWxpemVNaW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgIG1pbnQsXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICBvd25lcixcbiAgICAgICAgb3duZXIsXG4gICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgZmVlUGF5ZXIsXG4gICAgICAgIHRva2VuQXNzb2NpYXRlZCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIG1pbnQsXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZU1pbnRUb0NoZWNrZWRJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgdG9rZW5Bc3NvY2lhdGVkLFxuICAgICAgICBvd25lcixcbiAgICAgICAgQ2FsY3VsYXRlLmNhbGN1bGF0ZUFtb3VudCh0b3RhbEFtb3VudCwgbWludERlY2ltYWwpLFxuICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlQ3JlYXRlTWV0YWRhdGFBY2NvdW50VjNJbnN0cnVjdGlvbihcbiAgICAgICAge1xuICAgICAgICAgIG1ldGFkYXRhOiBtZXRhZGF0YVBkYSxcbiAgICAgICAgICBtaW50LFxuICAgICAgICAgIG1pbnRBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICAgIHBheWVyOiBmZWVQYXllcixcbiAgICAgICAgICB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WJ1Z0xvZygnIyB1cGxvYWQgY29udGVudCB1cmw6ICcsIHVyaSk7XG5cbiAgICAgIGNvbnN0IG1pbnQgPSBBY2NvdW50LktleXBhaXIuY3JlYXRlKCk7XG4gICAgICBjb25zdCBpbnN0cyA9IGF3YWl0IGNyZWF0ZU1pbnQoXG4gICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgIHRvdGFsQW1vdW50LFxuICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICAgZGF0YXYyLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICk7XG5cbiAgICAgIC8vIGZyZWV6ZUF1dGhvcml0eVxuICAgICAgaWYgKGZyZWV6ZUF1dGhvcml0eSkge1xuICAgICAgICBpbnN0cy5wdXNoKFxuICAgICAgICAgIGNyZWF0ZUZyZWV6ZUF1dGhvcml0eShcbiAgICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICAgICAgZnJlZXplQXV0aG9yaXR5LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuTWludChcbiAgICAgICAgaW5zdHMsXG4gICAgICAgIFtvd25lci50b0tleXBhaXIoKSwgbWludC50b0tleXBhaXIoKV0sXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICBtaW50LnB1YmtleSxcbiAgICAgICk7XG4gICAgfSk7XG4gIH07XG59XG4iLCAiaW1wb3J0IHsgQ29uc3RhbnRzLCBkZWJ1Z0xvZywgaXNCcm93c2VyLCBpc05vZGUgfSBmcm9tICd+L3N1aXRlLXV0aWxzJztcbmltcG9ydCB7IEZpbGVUeXBlLC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dO1xuICAgICAgY29uc3QgcGF5ZXJQdWJrZXkgPSBuZXcgQWNjb3VudC5LZXlwYWlyKHsgc2VjcmV0OiBwYXllciB9KTtcbiAgICAgIGNvbnN0IGtleXBhaXJzID0gb3duZXJPck11bHRpc2lnLm1hcCgocykgPT4gcy50b0tleXBhaXIoKSk7XG4gICAgICBjb25zdCBzb3VyY2VUb2tlbiA9IGF3YWl0IEFjY291bnQuQXNzb2NpYXRlZC5tYWtlT3JDcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgb3duZXIudG9TdHJpbmcoKSxcbiAgICAgICAgcGF5ZXJQdWJrZXkucHVia2V5LFxuICAgICAgKTtcblxuICAgICAgY29uc3QgZGVzdFRva2VuID0gYXdhaXQgQWNjb3VudC5Bc3NvY2lhdGVkLm1ha2VPckNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICBtaW50LFxuICAgICAgICBkZXN0LFxuICAgICAgICBwYXllclB1YmtleS5wdWJrZXksXG4gICAgICApO1xuXG4gICAgICBjb25zdCBpbnN0ID0gY3JlYXRlVHJhbnNmZXJDaGVja2VkSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHNvdXJjZVRva2VuLnRva2VuQWNjb3VudC50b1B1YmxpY0tleSgpLFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIGRlc3RUb2tlbi50b2tlbkFjY291bnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgQ2FsY3VsYXRvci5jYWxjdWxhdGVBbW91bnQoYW1vdW50LCBtaW50RGVjaW1hbCksXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICBrZXlwYWlycyxcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IGluc3RydWN0aW9ucyA9IGRlc3RUb2tlbi5pbnN0ID8gW2Rlc3RUb2tlbi5pbnN0LCBpbnN0XSA6IFtpbnN0XTtcblxuICA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XRhUHVia2V5LFxuICAgICAgICAgIG1pbnQsXG4gICAgICAgICAgbWludEF1dGhvcml0eTogb3duZXIsXG4gICAgICAgICAgcGF5ZXI6IGZlZVBheWVyLFxuICAgICAgICAgIHVwZGF0ZUF1dGhvcml0eTogb3duZXIsXG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICBjcmVhdGVNZXRhZGF0YUFjY291bnRBcmdzVjM6IHtcbiAgICAgICAgICAgIGRhdGE6IG5mdE1ldGFkYXRhLFxuICAgICAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgICAgICAgY29sbGVjdGlvbkRldGFpbHM6IG51bGwsXG4gICAgICAgICAgfSxcbiAgICAgICAgfSxcbiAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlQ3JlYXRlTWFzdGVyRWRpdGlvblYzSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHtcbiAgICAgICAgICBlZGl0aW9uOiBtYXN0ZXJFZGl0aW9uUHVia2V5LFxuICAgICAgICAgIG1pbnQsXG4gICAgICAgICAgdXBkYXRlQXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBtaW50QXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBwYXllcjogZmVlUGF5ZXIsXG4gICAgICAgICAgbWV0YWRhdGE6IHRva2VuTWV0YWRhdGFQdWJrZXksXG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICBjcmVhdGVNYXN0ZXJFZGl0aW9uQXJnczoge1xuICAgICAgICAgICAgbWF4U3VwcGx5OiAwLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICApLFxuICAgICk7XG4gICAgcmV0dXJuIGluc3RydWN0aW9ucztcbiAgfTtcblxuICAvKipcbiAgICogVXBsb2FkIGNvbnRlbnQgYW5kIE5GVCBtaW50XG4gICAqXG4gICAqIEBwYXJhbSB7U2VjcmV0fSBvd25lciAgICAgICAgIC8vIG93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Wxhck5mdE1ldGFkYXRhLmludG9JbmZyYShcbiAgICAgICAgaW5wdXQsXG4gICAgICAgIHVyaSxcbiAgICAgICAgc2VsbGVyRmVlQmFzaXNQb2ludHMsXG4gICAgICApO1xuXG4gICAgICBjb25zdCBpc011dGFibGUgPSBpbnB1dC5pc011dGFibGUgPT09IHVuZGVmaW5lZCA/IHRydWUgOiBpbnB1dC5pc011dGFibGU7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGlucHV0OiAnLCBpbnB1dCk7XG4gICAgICBkZWJ1Z0xvZygnIyBkYXRhdjI6ICcsIGRhdGF2Mik7XG5cbiAgICAgIGNvbnN0IG1pbnQgPSBBY2NvdW50LktleXBhaXIuY3JlYXRlKCk7XG5cbiAgICAgIGNvbnN0IGluc3RydWN0aW9ucyA9IGF3YWl0IGNyZWF0ZU1pbnQoXG4gICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgIGRhdGF2MixcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICBpc011dGFibGUsXG4gICAgICApO1xuXG4gICAgICAvLyBmcmVlemVBdXRob3JpdHlcbiAgICAgIGlmIChmcmVlemVBdXRob3JpdHkpIHtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgICAgY3JlYXRlRGVsZWFnYXRlKFxuICAgICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgICAgICBmcmVlemVBdXRob3JpdHkudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICAvLyBjb2xsZWN0aW9uIC0tLVxuICAgICAgaWYgKGlucHV0LmNvbGxlY3Rpb24pIHtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgICAgY3JlYXRlVmVyaWZ5U2l6ZWRDb2xsZWN0aW9uKFxuICAgICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgaW5wdXQuY29sbGVjdGlvbi50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGtleXBhaXJzID0gW293bmVyLnRvS2V5cGFpcigpLCBtaW50LnRvS2V5cGFpcigpXTtcblxuICAgICAgLy8gY3JlYXRvciAtLS1cbiAgICAgIGlmIChpbnB1dC5jcmVhdG9ycykge1xuICAgICAgICBpbnB1dC5jcmVhdG9ycy5mb3JFYWNoKChjcmVhdG9yKSA9PiB7XG4gICAgICAgICAgaWYgKEFjY291bnQuS2V5cGFpci5pc1NlY3JldChjcmVhdG9yLnNlY3JldCkpIHtcbiAgICAgICAgICAgIGNvbnN0IGNyZWF0b3JQdWJrZXkgPSBjcmVhdG9yLmFkZHJlc3MudG9QdWJsaWNLZXkoKTtcbiAgICAgICAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVWZXJpZnlDcmVhdG9yKG1pbnQudG9QdWJsaWNLZXkoKSwgY3JlYXRvclB1YmtleSk7XG4gICAgICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChpbnN0KTtcbiAgICAgICAgICAgIGtleXBhaXJzLnB1c2goY3JlYXRvci5zZWNyZXQudG9LZXlwYWlyKCkpO1xuICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBuZXcgVHJhbnNhY3Rpb25CdWlsZGVyLk1pbnQoXG4gICAgICAgIGluc3RydWN0aW9ucyxcbiAgICAgICAga2V5cGFpcnMsXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICBtaW50LnB1YmtleSxcbiAgICAgICk7XG4gICAgfSk7XG4gIH07XG59XG4iLCAiaW1wb3J0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AgZGVidWdMb2coJyMgaW5wdXQ6ICcsIGlucHV0KTtcbiAgICAgIGRlYnVnTG9nKCcjIHNlbGxlckZlZUJhc2lzUG9pbnRzOiAnLCBzZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICBkZWJ1Z0xvZygnIyBkYXRhdjI6ICcsIGRhdGF2Mik7XG5cbiAgICAgIGNvbnN0IG1pbnQgPSBBY2NvdW50LktleXBhaXIuY3JlYXRlKCk7XG4gICAgICBjb25zdCBpbnN0cyA9IGF3YWl0IE1pbnQuY3JlYXRlTWludChcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lclB1YmxpY2tleSxcbiAgICAgICAgZGF0YXYyLFxuICAgICAgICBmZWVQYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgICBpc011dGFibGUsXG4gICAgICApO1xuXG4gICAgICAvLyBmcmVlemVBdXRob3JpdHlcbiAgICAgIGlmIChvcHRpb25zLmZyZWV6ZUF1dGhvcml0eSkge1xuICAgICAgICBpbnN0cy5wdXNoKFxuICAgICAgICAgIE1pbnQuY3JlYXRlRGVsZWFnYXRlKFxuICAgICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgb3duZXJQdWJsaWNrZXksXG4gICAgICAgICAgICBvcHRpb25zLmZyZWV6ZUF1dGhvcml0eS50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGJsb2NraGFzaE9iaiA9IGF3YWl0IE5vZGUuZ2V0Q29ubmVjdGlvbigpLmdldExhdGVzdEJsb2NraGFzaCgpO1xuICAgICAgY29uc3QgdHggPSBuZXcgVHJhbnNhY3Rpb24oe1xuICAgICAgICBsYXN0VmFsaWRCbG9ja0hlaWdodDogYmxvY2toYXNoT2JqLmxhc3RWYWxpZEJsb2NrSGVpZ2h0LFxuICAgICAgICBibG9ja2hhc2g6IGJsb2NraGFzaE9iai5ibG9ja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AgICBpZiAoZnJlZXplQXV0aG9yaXR5KSB7XG4gICAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICAgIE1pbnQuY3JlYXRlRGVsZWFnYXRlKFxuICAgICAgICAgICAgY29sbGVjdGlvbk1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICAgICAgZnJlZXplQXV0aG9yaXR5LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgY29sbGVjdGlvbnMgPSB7XG4gICAgICAgIGNvbGxlY3Rpb25NZXRhZGF0YTogY29sbGVjdGlvbk1ldGFkYXRhQWNjb3VudCxcbiAgICAgICAgY29sbGVjdGlvbkF1dGhvcml0eTogb3duZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICBjb2xsZWN0aW9uTWludDogY29sbGVjdGlvbk1pbnQudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgfTtcblxuICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgIGNyZWF0ZVNldENvbGxlY3Rpb25TaXplSW5zdHJ1Y3Rpb24oY29sbGVjdGlvbnMsIHtcbiAgICAgICAgICBzZXRDb2xsZWN0aW9uU2l6ZUFyZ3M6IHtcbiAgICAgICAgICAgIHNpemU6IGNvbGxlY3Rpb25TaXplIHx8IERFRkFVTFRfQ09MTEVDVElPTl9TSVpFLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0pLFxuICAgICAgKTtcblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuTWludChcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLFxuICAgICAgICBbb3duZXIudG9LZXlwYWlyKCksIGNvbGxlY3Rpb25NaW50LnRvS2V5cGFpcigpXSxcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCksXG4gICAgICAgIGNvbGxl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wgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJSZWd1bGFyTmZ0IiwgIlNwbFRva2VuIiwgImltcG9ydF9tcGxfdG9rZW5fbWV0YWRhdGEiLCAiUmVndWxhck5mdCIsICJDb252ZXJ0ZXIiLCAiQWNjb3VudCIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiaW1wb3J0X3NwbF90b2tlbiIsICJpbXBvcnRfbXBsX3Rva2VuX21ldGFkYXRhIiwgIlJlZ3VsYXJOZnQiLCAiQWNjb3VudCIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiUmVndWxhck5mdCIsICJTcGxUb2tlbiIsICJSZWd1bGFyTmZ0Il0KfQo= \ No newline at end of file diff --git a/packages/suite-regular-nft/dist/index.mjs b/packages/suite-regular-nft/dist/index.mjs index 9d9b0efd9..1a0ea1e3f 100644 --- a/packages/suite-regular-nft/dist/index.mjs +++ b/packages/suite-regular-nft/dist/index.mjs @@ -1612,14 +1612,13 @@ var SplToken6; dest, feePayer ); - let inst2; const blockhashObj = await Node.getConnection().getLatestBlockhash(); const tx = new Transaction5({ lastValidBlockHeight: blockhashObj.lastValidBlockHeight, blockhash: blockhashObj.blockhash, feePayer: feePayer.toPublicKey() }); - inst2 = createTransferCheckedInstruction( + const inst2 = createTransferCheckedInstruction( sourceToken.tokenAccount.toPublicKey(), mint.toPublicKey(), destToken.tokenAccount.toPublicKey(), @@ -2868,4 +2867,4 @@ var RegularNft10 = { export { RegularNft10 as RegularNft }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vc3VpdGUtc3BsLXRva2VuL3NyYy9hZGQudHMiLCAiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9iYXRjaC50cyIsICIuLi8uLi9ub2RlL3NyYy9pbmRleC50cyIsICIuLi8uLi90cmFuc2FjdGl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ICAgICAgbGV0IGZlZVBheWVyID0gc2lnbmVyc1swXTtcbiAgICAgICAgaWYgKGZlZVBheWVycy5sZW5ndGggPiAwICYmIGZlZVBheWVyc1swXS5mZWVQYXllcikge1xuICAgICAgICAgIGZlZVBheWVyID0gZmVlUGF5ZXJzWzBdLmZlZVBheWVyO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgdHJhbnNhY3Rpb24gPSBuZXcgVHJhbnNhY3Rpb24oKTtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHNpZ25lcnM7XG4gICAgICAgIGlmIChmZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gZmVlUGF5ZXIucHVibGljS2V5O1xuICAgICAgICAgIGZpbmFsU2lnbmVycyA9IFtmZWVQYXllciwgLi4uc2lnbmVyc107XG4gICAgICAgIH1cbiAgICAgICAgaW5zdHJ1Y3Rpb25zLm1hcCgoaW5zdCkgPT4gdHJhbnNhY3Rpb24uYWRkKGluc3QpKTtcblxuICAgICAgICAvLyBDYWxjdWxhdGVUeHNpemUuaXNNYXhUcmFuc2FjdGlvblNpemUodHJhbnNhY3Rpb24sIGZlZVBheWVyLnB1YmxpY0tleSk7XG5cbiAgICAgICAgY29uc3Qgb3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogTUFYX1JFVFJJRVMsXG4gICAgICAgIH07XG5cbiAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgIG9wdGlvbnMsXG4gICAgICAgICk7XG4gICAgICB9KTtcbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHsgQ29uc3RhbnRzLCBkZWJ1Z0xvZywgUmVzd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uICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGdldEJndW1TaWduZXIgPSAoKTogUHVibGljS2V5ID0+IHtcbiAgICAgIGNvbnN0IFtwdWJsaWNLZXldID0gUHVibGljS2V5LmZpbmRQcm9ncmFtQWRkcmVzc1N5bmMoXG4gICAgICAgIFtCdWZmZXIuZnJvbSgnY29sbGVjdGlvbl9jcGknLCAndXRmOCcpXSxcbiAgICAgICAgTVBMX0JVQkJMRUdVTV9QUk9HUkFNX0lELnRvUHVibGljS2V5KCksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGdldEFzc2V0SWQgPSAoYWRkcmVzczogUHVia2V5LCBsZWFmSW5kZXg6IG51bWJlcik6IFB1YmtleSA9PiB7XG4gICAgICBjb25zdCBub2RlID0gbmV3IEJOLkJOKGxlYWZJbmRleCk7XG4gICAgICBjb25zdCBbYXNzZXRJZF0gPSBQdWJsaWNLZXkuZmluZFByb2dyYW1BZGRyZXNzU3luYyhcbiAgICAgICAgW1xuICAgICAgICAgIEJ1ZmZlci5mcm9tKCdhc3NldCcsICd1dGY4JyksXG4gICAgICAgICAgYWRkcmVzcy50b1B1YmxpY0tleSgpLnRvQnVmZmVyKCksXG4gICAgICAgICAgVWludDhBcnJheS5mcm9tKG5vZGUudG9BcnJheSgnbGUnLCA4KSksXG4gICAgICAgIF0sXG4gICAgICAgIE1QTF9CVUJCTEVHVU1fUFJPR1JBTV9JRC50b1B1YmxpY0tleSgpLFxuICAgICAgKTtcbiAgICAgIHJldHVybiBhc3NldElkLnRvU3RyaW5nKCk7XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IEFjY291bnQgYXMgS2V5cGFpciB9IGZyb20gJy4va2V5cGFpcic7XG5pbXBvcnQgeyBBY2NvdW50IGFzIFBkYSB9IGZyb20gJy4vcGRhJztcbmltcG9ydC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sZVBhdGg6IEZpbGVUeXBlLFxuICAgICAgICBzdG9yYWdlVHlwZTogU3RvcmFnZVR5cGUsXG4gICAgICAgIGZlZVBheWVyPzogU2VjcmV0LFxuICAgICAgKSA9PiBQcm9taXNlPFJlc3VsdDxzdHJpbmcsIEVycm9yPj4sXG4gICAgICBzdG9yYWdlVHlwZTogU3RvcmFnZVR5cGUsXG4gICAgICBmZWVQYXllcj86IFNlY3JldCxcbiAgICApOiBQcm9taXNlPFByb3BlcnRpZXM+ID0+IHtcbiAgICAgIGlmICghaW5wdXQgfHwgIWlucHV0LmZpbGVzKSB7XG4gICAgICAgIHJldHVybiB7fTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgZmlsZXMgPSBhd2FpdCBQcm9taXNlLmFsbChcbiAgICAgICAgaW5wdXQuZmlsZXMubWFwKGFzeW5jIChmaWxlKSA9PiB7XG4gICAgICAgICAgaWYgKCFmaWxlLmZpbGVQYXRoKSB7XG4gICAgICAgICAgICByZXR1cm4ge307XG4gICAgICAgICAgfVxuICAgICAgICAgIGNvbnN0IHJlcyA9IGF3YWl0IGNhbGxiYWNrRnVuYyhmaWxlLmZpbGVQYXRoLCBzdG9yYWdlVHlwZSwgZmVlUGF5ZXIpO1xuICAgICAgICAgIGlmIChyZXMuaXNFcnIpIHtcbiAgICAgICAgICAgIHRocm93IEVycm9yKHJlcy5lcnJvci5tZXNzYWdlKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgcmV0dXJuIG92ZXJ3cml0ZU9iamVjdChmaWxlLCBbXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGV4aXN0c0tleTogJ2ZpbGVQYXRoJyxcbiAgICAgICAgICAgICAgd2lsbDogeyBrZXk6ICd1cmknLCB2YWx1ZTogcmVzLnZhbHVlIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgIF0pO1xuICAgICAgICB9KSxcbiAgICAgICk7XG4gICAgICByZXR1cm4geyAuLi5pbnB1dCwgZmlsZXMgfSBhcyBQc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gIHJldHVybiBUcnkoKCkgPT4ge1xuICAgICAgY29uc3Qga2V5cyA9IE9iamVjdC5rZXlzKG1ldGFkYXRhKTtcbiAgICAgIGNvbnN0IHJlc3VsdHM6IERldGFpbHNbXSA9IFtdO1xuICAgICAga2V5cy5tYXAoKGtleSkgPT4ge1xuICAgICAgICBsZXQgcmVzITogUmVzdWx0PHN0cmluZywgVmFsaWRhdG9yRXJyb3I+O1xuICAgICAgICBzd2l0Y2ggKGtleSkge1xuICAgICAgICAgIGNhc2UgJ2ltYWdlJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuaW1hZ2UpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNJbWFnZVVybChtZXRhZGF0YS5pbWFnZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdyb3lhbHR5JzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEucm95YWx0eSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1JveWFsdHkobWV0YWRhdGEucm95YWx0eSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSkge1xuICAgICAgICAgICAgICByZ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YXJzZWQuaW5mby50b2tlbkFtb3VudFxuICAgICAgICAgIC5hbW91bnQgYXMgc3RyaW5nO1xuICAgICAgICBpZiAodG9rZW5BbW91bnQgPT09ICcxJykge1xuICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gTWV0YWRhdGEuZnJvbUFjY291bnRBZGRyZXNzKFxuICAgICAgICAgIGNvbm5lY3Rpb24sXG4gICAgICAgICAgQWNjb3VudC5QZGEuZ2V0TWV0YWRhdGEobWludCksXG4gICAgICAgIClcbiAgICAgICAgICAudGhlbihhc3luYyAobWV0YWRhdGEpID0+IHtcbiAgICAgICAgICAgIC8qIGVzbGludC1kaXNhYmxlIEB0eXBlc2NyaXB0LWVzbGludC9uby1leHBsaWNpdC1hbnkgKi9cbiAgICAgICAgICAgIHJldHVybiBmZXRjaFJldHJ5KG1ldGFkYXRhLmRhdGEudXJpKS50aGVuKChqc29uOiBhbnkpID0+IHtcbiAgICAgICAgICAgICAgcmV0dXJuIGNvbnZlcnRlcihtZXRhZGF0YSwganNvbiwgdG9rZW5BbW91bnQpO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfSlcbiAgICAgICAgICAuY2F0Y2goKGVycikgPT4gZGVidWdMb2coJyMgW0ZldGNoIGVycm9yXScsIGVycikpO1xuICAgICAgfSk7XG5cbiAgICAgIGNvbnN0IGZpbHRlcnMgPSAoYXdhaXQgUHJvbWlzZS5hbGwoZGF0YXMpKS5maWx0ZXIoXG4gICAgICAgIChkYXRhKSA9PiBkYXRhICE9PSB1bmRlZmluZWQsXG4gICAgICApO1xuICAgICAgcmV0dXJuIGZpbHRlcnMgYXMgVG9rZW5NZXRhZGF0YVtdO1xuICAgIH0pO1xuICB9O1xuXG4gIC8qKlxuICAgKiBGZXRjaCBtaW50ZWQgbWV0YWRhdGEgYnkgbWludCBhZGRyZXNzXG4gICAqXG4gICAqIEBwYXJhbSB7UHVia2V5fSBtaW50XG4gICAqIEByZXR1cm4gUHJvbW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jZTogTUlOVF9TSVpFLFxuICAgICAgICBsYW1wb3J0czogbGFtcG9ydHMsXG4gICAgICAgIHByb2dyYW1JZDogVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgIH0pLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUluaXRpYWxpemVNaW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgIG1pbnQsXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICBvd25lcixcbiAgICAgICAgb3duZXIsXG4gICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgZmVlUGF5ZXIsXG4gICAgICAgIHRva2VuQXNzb2NpYXRlZCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIG1pbnQsXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZU1pbnRUb0NoZWNrZWRJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgdG9rZW5Bc3NvY2lhdGVkLFxuICAgICAgICBvd25lcixcbiAgICAgICAgQ2FsY3VsYXRlLmNhbGN1bGF0ZUFtb3VudCh0b3RhbEFtb3VudCwgbWludERlY2ltYWwpLFxuICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlQ3JlYXRlTWV0YWRhdGFBY2NvdW50VjNJbnN0cnVjdGlvbihcbiAgICAgICAge1xuICAgICAgICAgIG1ldGFkYXRhOiBtZXRhZGF0YVBkYSxcbiAgICAgICAgICBtaW50LFxuICAgICAgICAgIG1pbnRBdXRob3JpdHk6IG93bmVyLFxuICAgICAg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kYXRhdjI6ICcsIGRhdGF2Mik7XG4gICAgICBkZWJ1Z0xvZygnIyB1cGxvYWQgY29udGVudCB1cmw6ICcsIHVyaSk7XG5cbiAgICAgIGNvbnN0IG1pbnQgPSBBY2NvdW50LktleXBhaXIuY3JlYXRlKCk7XG4gICAgICBjb25zdCBpbnN0cyA9IGF3YWl0IGNyZWF0ZU1pbnQoXG4gICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgIHRvdGFsQW1vdW50LFxuICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICAgZGF0YXYyLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICk7XG5cbiAgICAgIC8vIGZyZWV6ZUF1dGhvcml0eVxuICAgICAgaWYgKGZyZWV6ZUF1dGhvcml0eSkge1xuICAgICAgICBpbnN0cy5wdXNoKFxuICAgICAgICAgIGNyZWF0ZUZyZWV6ZUF1dGhvcml0eShcbiAgICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICAgICAgZnJlZXplQXV0aG9yaXR5LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuTWludChcbiAgICAgICAgaW5zdHMsXG4gICAgICAgIFtvd25lci50b0tleXBhaXIoKSwgbWludC50b0tleXBhaXIoKV0sXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICBtaW50LnB1YmtleSxcbiAgICAgICk7XG4gICAgfSk7XG4gIH07XG59XG4iLCAiaW1wb3J0IHsgQ29uc3RhbnRzLCBkZWJ1Z0xvZywgaXNCcm93c2VyLCBpc05vZGUgfSBmcm9tICd+L3N1aXRl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25zLmZlZVBheWVyIDogb3duZXJPck11bHRpc2lnWzBdO1xuICAgICAgY29uc3QgcGF5ZXJQdWJrZXkgPSBuZXcgQWNjb3VudC5LZXlwYWlyKHsgc2VjcmV0OiBwYXllciB9KTtcbiAgICAgIGNvbnN0IGtleXBhaXJzID0gb3duZXJPck11bHRpc2lnLm1hcCgocykgPT4gcy50b0tleXBhaXIoKSk7XG4gICAgICBjb25zdCBzb3VyY2VUb2tlbiA9IGF3YWl0IEFjY291bnQuQXNzb2NpYXRlZC5tYWtlT3JDcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgb3duZXIudG9TdHJpbmcoKSxcbiAgICAgICAgcGF5ZXJQdWJrZXkucHVia2V5LFxuICAgICAgKTtcblxuICAgICAgY29uc3QgZGVzdFRva2VuID0gYXdhaXQgQWNjb3VudC5Bc3NvY2lhdGVkLm1ha2VPckNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICBtaW50LFxuICAgICAgICBkZXN0LFxuICAgICAgICBwYXllclB1YmtleS5wdWJrZXksXG4gICAgICApO1xuXG4gICAgICBjb25zdCBpbnN0ID0gY3JlYXRlVHJhbnNmZXJDaGVja2VkSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHNvdXJjZVRva2VuLnRva2VuQWNjb3VudC50b1B1YmxpY0tleSgpLFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIGRlc3RUb2tlbi50b2tlbkFjY291bnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgQ2FsY3VsYXRvci5jYWxjdWxhdGVBbW91bnQoYW1vdW50LCBtaW50RGVjaW1hbCksXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICBrZXlwYWlycyxcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IGluc3RydWN0aW9ucyA9IGRlc3RUb2tlbi5pbnN0ID8gW2Rlc3RUb2tlb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RvVXNlcihtZXJnZWQpO1xuICAgICAgICAgIH0gY2F0Y2ggKGVycikge1xuICAgICAgICAgICAgZGVidWdMb2coJyMgRmFpbGVkIGZldGNoIG9mZmNoYWluIHVybDogJywgaXRlbS5jb250ZW50Lmpzb25fdXJpKTtcbiAgICAgICAgICAgIHJldHVybiBDb252ZXJ0ZXIuTmZ0LmludG9Vc2VyKHtcbiAgICAgICAgICAgICAgb25jaGFpbjogaXRlbSxcbiAgICAgICAgICAgICAgb2ZmY2hhaW46IHt9LFxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfVxuICAgICAgICB9KSxcbiAgICApO1xuICAgIHJldHVybiB7XG4gICAgICBwYWdlOiBhc3NldHMudmFsdWUucGFnZSxcbiAgICAgIHRvdGFsOiBhc3NldHMudmFsdWUudG90YWwsXG4gICAgICBsaW1pdDogYXNzZXRzLnZhbHVlLmxpbWl0LFxuICAgICAgbWV0YWRhdGFzLFxuICAgIH07XG4gIH07XG5cbiAgLyoqXG4gICAqIEZpbmQgbmZ0IGJ5IGNvbGxlY3Rpb24gbWludFxuICAgKlxuICAgKiBAcGFyYW0ge1B1YmtleX0gY29sbGVjdGlvbk1pbnRcbiAgICogQHBhcmFtIHtib29sZWFufSBpc0NvbXByZXNzZWQsXG4gICAqIEBwYXJhbSB7UGFydGlhbDxGaW5kT3B0aW9ucz59IG9wdGlvbnNcbiAgICogQHJldHVybiBQcm9taXNlPFJlc3VsdDxDb21wcmVzc2VkTmZ0TWV0YWRhdGEsIEVycm9yPj5cbiAgICovXG4gIGV4cG9ydCBjb25zdCBmaW5kQnlDb2xsZWN0aW9uID0gYXN5bmMgKFxuICAgIGNvbGxlY3Rpb25NaW50OiBQdWJrZXksXG4gICAgaXNDb21wcmVzc2VkOiBib29sZWFuLFxuICAgIG9wdGlvbnM6IFBhcnRpYWw8RmluZE9wdGlvbnM+ID0ge30sXG4gICk6IFByb21pc2U8TmZ0TWV0YWRhdGE+ID0+IHtcbiAgICBjb25zdCBkZWZhdW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gICAgICAgIG1ldGFkYXRhOiB0b2tlbk1ldGFkYXRhUHVia2V5LFxuICAgICAgICAgIG1pbnQsXG4gICAgICAgICAgbWludEF1dGhvcml0eTogb3duZXIsXG4gICAgICAgICAgcGF5ZXI6IGZlZVBheWVyLFxuICAgICAgICAgIHVwZGF0ZUF1dGhvcml0eTogb3duZXIsXG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICBjcmVhdGVNZXRhZGF0YUFjY291bnRBcmdzVjM6IHtcbiAgICAgICAgICAgIGRhdGE6IG5mdE1ldGFkYXRhLFxuICAgICAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgICAgICAgY29sbGVjdGlvbkRldGFpbHM6IG51bGwsXG4gICAgICAgICAgfSxcbiAgICAgICAgfSxcbiAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlQ3JlYXRlTWFzdGVyRWRpdGlvblYzSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHtcbiAgICAgICAgICBlZGl0aW9uOiBtYXN0ZXJFZGl0aW9uUHVia2V5LFxuICAgICAgICAgIG1pbnQsXG4gICAgICAgICAgdXBkYXRlQXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBtaW50QXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBwYXllcjogZmVlUGF5ZXIsXG4gICAgICAgICAgbWV0YWRhdGE6IHRva2VuTWV0YWRhdGFQdWJrZXksXG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICBjcmVhdGVNYXN0ZXJFZGl0aW9uQXJnczoge1xuICAgICAgICAgICAgbWF4U3VwcGx5OiAwLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICApLFxuICAgICk7XG4gICAgcmV0dXJuIGluc3RydWN0aW9ucztcbiAgfTtcblxuICAvKipcbiAgICogVXBsb2FkIGNvbnRlbnQgYW5kIE5GVCBtaW50XG4gICAqXG4gICAqIEBwYXJ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b25zdCBkYXRhdjIgPSBDb252ZXJ0ZXIuUmVndWxhck5mdE1ldGFkYXRhLmludG9JbmZyYShcbiAgICAgICAgaW5wdXQsXG4gICAgICAgIHVyaSxcbiAgICAgICAgc2VsbGVyRmVlQmFzaXNQb2ludHMsXG4gICAgICApO1xuXG4gICAgICBjb25zdCBpc011dGFibGUgPSBpbnB1dC5pc011dGFibGUgPT09IHVuZGVmaW5lZCA/IHRydWUgOiBpbnB1dC5pc011dGFibGU7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGlucHV0OiAnLCBpbnB1dCk7XG4gICAgICBkZWJ1Z0xvZygnIyBkYXRhdjI6ICcsIGRhdGF2Mik7XG5cbiAgICAgIGNvbnN0IG1pbnQgPSBBY2NvdW50LktleXBhaXIuY3JlYXRlKCk7XG5cbiAgICAgIGNvbnN0IGluc3RydWN0aW9ucyA9IGF3YWl0IGNyZWF0ZU1pbnQoXG4gICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgIGRhdGF2MixcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICBpc011dGFibGUsXG4gICAgICApO1xuXG4gICAgICAvLyBmcmVlemVBdXRob3JpdHlcbiAgICAgIGlmIChmcmVlemVBdXRob3JpdHkpIHtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgICAgY3JlYXRlRGVsZWFnYXRlKFxuICAgICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgICAgICBmcmVlemVBdXRob3JpdHkudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICAvLyBjb2xsZWN0aW9uIC0tLVxuICAgICAgaWYgKGlucHV0LmNvbGxlY3Rpb24pIHtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgICAgY3JlYXRlVmVyaWZ5U2l6ZWRDb2xsZWN0aW9uKFxuICAgICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgaW5wdXQuY29sbGVjdGlvbi50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGtleXBhaXJzID0gW293bmVyLnRvS2V5cGFpcigpLCBtaW50LnRvS2V5cGFpcigpXTtcblxuICAgICAgLy8gY3JlYXRvciAtLS1cbiAgICAgIGlmIChpbnB1dC5jcmVhdG9ycykge1xuICAgICAgICBpbnB1dC5jcmVhdG9ycy5mb3JFYWNoKChjcmVhdG9yKSA9PiB7XG4gICAgICAgICAgaWYgKEFjY291bnQuS2V5cGFpci5pc1NlY3JldChjcmVhdG9yLnNlY3JldCkpIHtcbiAgICAgICAgICAgIGNvbnN0IGNyZWF0b3JQdWJrZXkgPSBjcmVhdG9yLmFkZHJlc3MudG9QdWJsaWNLZXkoKTtcbiAgICAgICAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVWZXJpZnlDcmVhdG9yKG1pbnQudG9QdWJsaWNLZXkoKSwgY3JlYXRvclB1YmtleSk7XG4gICAgICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChpbnN0KTtcbiAgICAgICAgICAgIGtleXBhaXJzLnB1c2goY3JlYXRvci5zZWNyZXQudG9LZXlwYWlyKCkpO1xuICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBuZXcgVHJhbnNhY3Rpb25CdWlsZGVyLk1pbnQoXG4gICAgICAgIGluc3RydWN0aW9ucyxcbiAgICAgICAga2V5cGFpcnMsXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICBtaW50LnB1YmtleSxcbiAgICAgICk7X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1ZSA6IGlucHV0LmlzTXV0YWJsZTtcblxuICAgICAgZGVidWdMb2coJyMgaW5wdXQ6ICcsIGlucHV0KTtcbiAgICAgIGRlYnVnTG9nKCcjIHNlbGxlckZlZUJhc2lzUG9pbnRzOiAnLCBzZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICBkZWJ1Z0xvZygnIyBkYXRhdjI6ICcsIGRhdGF2Mik7XG5cbiAgICAgIGNvbnN0IG1pbnQgPSBBY2NvdW50LktleXBhaXIuY3JlYXRlKCk7XG4gICAgICBjb25zdCBpbnN0cyA9IGF3YWl0IE1pbnQuY3JlYXRlTWludChcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lclB1YmxpY2tleSxcbiAgICAgICAgZGF0YXYyLFxuICAgICAgICBmZWVQYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgICBpc011dGFibGUsXG4gICAgICApO1xuXG4gICAgICAvLyBmcmVlemVBdXRob3JpdHlcbiAgICAgIGlmIChvcHRpb25zLmZyZWV6ZUF1dGhvcml0eSkge1xuICAgICAgICBpbnN0cy5wdXNoKFxuICAgICAgICAgIE1pbnQuY3JlYXRlRGVsZWFnYXRlKFxuICAgICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgb3duZXJQdWJsaWNrZXksXG4gICAgICAgICAgICBvcHRpb25zLmZyZWV6ZUF1dGhvcml0eS50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGJsb2NraGFzaE9iaiA9IGF3YWl0IE5vZGUuZ2V0Q29ubmVjdGlvbigpLmdldExhdGVzdEJsb2NraGFzaCgpO1xuICAgICAgY29uc3QgdHggPSBuZXcgVHJhbnNhY3Rpb24oe1xuICAgICAgICBsYXN0VmFsaWRCbG9ja0hlaWdodDogYmxvY2toYXNoT2JqLmxhc3RWYWxpZEJsb2NrSGVpZ2h0LFxuICAgICAgIC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xuICAgICAgLy8gZnJlZXplQXV0aG9yaXR5XG4gICAgICBpZiAoZnJlZXplQXV0aG9yaXR5KSB7XG4gICAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICAgIE1pbnQuY3JlYXRlRGVsZWFnYXRlKFxuICAgICAgICAgICAgY29sbGVjdGlvbk1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICAgICAgZnJlZXplQXV0aG9yaXR5LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgY29sbGVjdGlvbnMgPSB7XG4gICAgICAgIGNvbGxlY3Rpb25NZXRhZGF0YTogY29sbGVjdGlvbk1ldGFkYXRhQWNjb3VudCxcbiAgICAgICAgY29sbGVjdGlvbkF1dGhvcml0eTogb3duZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICBjb2xsZWN0aW9uTWludDogY29sbGVjdGlvbk1pbnQudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgfTtcblxuICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgIGNyZWF0ZVNldENvbGxlY3Rpb25TaXplSW5zdHJ1Y3Rpb24oY29sbGVjdGlvbnMsIHtcbiAgICAgICAgICBzZXRDb2xsZWN0aW9uU2l6ZUFyZ3M6IHtcbiAgICAgICAgICAgIHNpemU6IGNvbGxlY3Rpb25TaXplIHx8IERFRkFVTFRfQ09MTEVDVElPTl9TSVpFLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0pLFxuICAgICAgKTtcblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuTWludChcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLFxuICAgICAgICBbb3duZXIudG9LZXlwYWlyKCksIGNvbGxlY3Rpb25NaW50LnRvS2V5cGFpcigpXSxcbiAgICAgICAgcGF5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JNSU5UX1NJWkUiLCAiVE9LRU5fUFJPR1JBTV9JRCIsICJjcmVhdGVDcmVhdGVNZXRhZGF0YUFjY291bnRWM0luc3RydWN0aW9uIiwgIlJlZ3VsYXJOZnQiLCAibWludCIsICJBY2NvdW50IiwgImdldEFzc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jIiwgIlN5c3RlbVByb2dyYW0iLCAiZ2V0TWluaW11bUJhbGFuY2VGb3JSZW50RXhlbXB0TWludCIsICJNSU5UX1NJWkUiLCAiVE9LRU5fUFJPR1JBTV9JRCIsICJjcmVhdGVJbml0aWFsaXplTWludEluc3RydWN0aW9uIiwgImNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbiIsICJjcmVhdGVNaW50VG9DaGVja2VkSW5zdHJ1Y3Rpb24iLCAiQ29udmVydGVyIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJUcmFuc2FjdGlvbiIsICJSZWd1bGFyTmZ0IiwgIkNvbnZlcnRlciIsICJBY2NvdW50IiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJSZWd1bGFyTmZ0IiwgIlNwbFRva2VuIiwgIlJlZ3VsYXJOZnQiLCAiQ29udmVydGVyIiwgIkFjY291bnQiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgImdldEFzc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jIiwgIlJlZ3VsYXJOZnQiLCAiQWNjb3VudCIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiUmVndWxhck5mdCIsICJTcGxUb2tlbiIsICJSZWd1bGFyTmZ0Il0KfQo= \ No newline at end of file +//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vc3VpdGUtc3BsLXRva2VuL3NyYy9hZGQudHMiLCAiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1id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3QgZmVlUGF5ZXJzID0gYXJyLmZpbHRlcigoYSkgPT4gYS5mZWVQYXllciAhPT0gdW5kZWZpbmVkKTtcbiAgICAgICAgbGV0IGZlZVBheWVyID0gc2lnbmVyc1swXTtcbiAgICAgICAgaWYgKGZlZVBheWVycy5sZW5ndGggPiAwICYmIGZlZVBheWVyc1swXS5mZWVQYXllcikge1xuICAgICAgICAgIGZlZVBheWVyID0gZmVlUGF5ZXJzWzBdLmZlZVBheWVyO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgdHJhbnNhY3Rpb24gPSBuZXcgVHJhbnNhY3Rpb24oKTtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHNpZ25lcnM7XG4gICAgICAgIGlmIChmZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gZmVlUGF5ZXIucHVibGljS2V5O1xuICAgICAgICAgIGZpbmFsU2lnbmVycyA9IFtmZWVQYXllciwgLi4uc2lnbmVyc107XG4gICAgICAgIH1cbiAgICAgICAgaW5zdHJ1Y3Rpb25zLm1hcCgoaW5zdCkgPT4gdHJhbnNhY3Rpb24uYWRkKGluc3QpKTtcblxuICAgICAgICAvLyBDYWxjdWxhdGVUeHNpemUuaXNNYXhUcmFuc2FjdGlvblNpemUodHJhbnNhY3Rpb24sIGZlZVBheWVyLnB1YmxpY0tleSk7XG5cbiAgICAgICAgY29uc3Qgb3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogTUFYX1JFVFJJRVMsXG4gICAgICAgIH07XG5cbiAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgIG9wdGlvbnMsXG4gICAgICAgICk7XG4gIC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mZlcigpXSxcbiAgICAgICAgTVBMX0JVQkJMRUdVTV9QUk9HUkFNX0lELnRvUHVibGljS2V5KCksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGdldEJndW1TaWduZXIgPSAoKTogUHVibGljS2V5ID0+IHtcbiAgICAgIGNvbnN0IFtwdWJsaWNLZXldID0gUHVibGljS2V5LmZpbmRQcm9ncmFtQWRkcmVzc1N5bmMoXG4gICAgICAgIFtCdWZmZXIuZnJvbSgnY29sbGVjdGlvbl9jcGknLCAndXRmOCcpXSxcbiAgICAgICAgTVBMX0JVQkJMRUdVTV9QUk9HUkFNX0lELnRvUHVibGljS2V5KCksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGdldEFzc2V0SWQgPSAoYWRkcmVzczogUHVia2V5LCBsZWFmSW5kZXg6IG51bWJlcik6IFB1YmtleSA9PiB7XG4gICAgICBjb25zdCBub2RlID0gbmV3IEJOLkJOKGxlYWZJbmRleCk7XG4gICAgICBjb25zdCBbYXNzZXRJZF0gPSBQdWJsaWNLZXkuZmluZFByb2dyYW1BZGRyZXNzU3luYyhcbiAgICAgICAgW1xuICAgICAgICAgIEJ1ZmZlci5mcm9tKCdhc3NldCcsICd1dGY4JyksXG4gICAgICAgICAgYWRkcmVzcy50b1B1YmxpY0tleSgpLnRvQnVmZmVyKCksXG4gICAgICAgICAgVWludDhBcnJheS5mcm9tKG5vZGUudG9BcnJheSgnbGUnLCA4KSksXG4gICAgICAgIF0sXG4gICAgICAgIE1QTF9CVUJCTEVHVU1fUFJPR1JBTV9JRC50b1B1YmxpY0tleSgpLFxuICAgICAgKTtcbiAgICAgIHJldHVybiBhc3NldElkLnRvU3RyaW5nKCk7XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IEFjY291bnQgYXMgS2V5cGFpciB9IGZ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W5wdXQ6IFByb3BlcnRpZXMgfCB1bmRlZmluZWQsXG4gICAgICBjYWxsYmFja0Z1bmM6IChcbiAgICAgICAgZmlsZVBhdGg6IEZpbGVUeXBlLFxuICAgICAgICBzdG9yYWdlVHlwZTogU3RvcmFnZVR5cGUsXG4gICAgICAgIGZlZVBheWVyPzogU2VjcmV0LFxuICAgICAgKSA9PiBQcm9taXNlPFJlc3VsdDxzdHJpbmcsIEVycm9yPj4sXG4gICAgICBzdG9yYWdlVHlwZTogU3RvcmFnZVR5cGUsXG4gICAgICBmZWVQYXllcj86IFNlY3JldCxcbiAgICApOiBQcm9taXNlPFByb3BlcnRpZXM+ID0+IHtcbiAgICAgIGlmICghaW5wdXQgfHwgIWlucHV0LmZpbGVzKSB7XG4gICAgICAgIHJldHVybiB7fTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgZmlsZXMgPSBhd2FpdCBQcm9taXNlLmFsbChcbiAgICAgICAgaW5wdXQuZmlsZXMubWFwKGFzeW5jIChmaWxlKSA9PiB7XG4gICAgICAgICAgaWYgKCFmaWxlLmZpbGVQYXRoKSB7XG4gICAgICAgICAgICByZXR1cm4ge307XG4gICAgICAgICAgfVxuICAgICAgICAgIGNvbnN0IHJlcyA9IGF3YWl0IGNhbGxiYWNrRnVuYyhmaWxlLmZpbGVQYXRoLCBzdG9yYWdlVHlwZSwgZmVlUGF5ZXIpO1xuICAgICAgICAgIGlmIChyZXMuaXNFcnIpIHtcbiAgICAgICAgICAgIHRocm93IEVycm9yKHJlcy5lcnJvci5tZXNzYWdlKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgcmV0dXJuIG92ZXJ3cml0ZU9iamVjdChmaWxlLCBbXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGV4aXN0c0tleTogJ2ZpbGVQYXRoJyxcbiAgICAgICAgICAgICAgd2lsbDogeyBrZXk6ICd1cmknLCB2YWx1ZTogcmVzLnZhbHVlIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAg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uICAgIG1ldGFkYXRhOiBULFxuICApOiBSZXN1bHQ8c3RyaW5nLCBWYWxpZGF0b3JFcnJvcj4gPT4ge1xuICAgIHJldHVybiBUcnkoKCkgPT4ge1xuICAgICAgY29uc3Qga2V5cyA9IE9iamVjdC5rZXlzKG1ldGFkYXRhKTtcbiAgICAgIGNvbnN0IHJlc3VsdHM6IERldGFpbHNbXSA9IFtdO1xuICAgICAga2V5cy5tYXAoKGtleSkgPT4ge1xuICAgICAgICBsZXQgcmVzITogUmVzdWx0PHN0cmluZywgVmFsaWRhdG9yRXJyb3I+O1xuICAgICAgICBzd2l0Y2ggKGtleSkge1xuICAgICAgICAgIGNhc2UgJ2ltYWdlJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuaW1hZ2UpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNJbWFnZVVybChtZXRhZGF0YS5pbWFnZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdyb3lhbHR5JzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEucm95YWx0eSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1JveWFsdHkobWV0YWRhdGEucm95YWx0eSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVy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QuaW5mby5taW50IGFzIFB1YmtleTtcbiAgICAgICAgY29uc3QgdG9rZW5BbW91bnQgPSBkLmFjY291bnQuZGF0YS5wYXJzZWQuaW5mby50b2tlbkFtb3VudFxuICAgICAgICAgIC5hbW91bnQgYXMgc3RyaW5nO1xuICAgICAgICBpZiAodG9rZW5BbW91bnQgPT09ICcxJykge1xuICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gTWV0YWRhdGEuZnJvbUFjY291bnRBZGRyZXNzKFxuICAgICAgICAgIGNvbm5lY3Rpb24sXG4gICAgICAgICAgQWNjb3VudC5QZGEuZ2V0TWV0YWRhdGEobWludCksXG4gICAgICAgIClcbiAgICAgICAgICAudGhlbihhc3luYyAobWV0YWRhdGEpID0+IHtcbiAgICAgICAgICAgIC8qIGVzbGludC1kaXNhYmxlIEB0eXBlc2NyaXB0LWVzbGludC9uby1leHBsaWNpdC1hbnkgKi9cbiAgICAgICAgICAgIHJldHVybiBmZXRjaFJldHJ5KG1ldGFkYXRhLmRhdGEudXJpKS50aGVuKChqc29uOiBhbnkpID0+IHtcbiAgICAgICAgICAgICAgcmV0dXJuIGNvbnZlcnRlcihtZXRhZGF0YSwganNvbiwgdG9rZW5BbW91bnQpO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfSlcbiAgICAgICAgICAuY2F0Y2goKGVycikgPT4gZGVidWdMb2coJyMgW0ZldGNoIGVycm9yXScsIGVycikpO1xuICAgICAgfSk7XG5cbiAgICAgIGNvbnN0IGZpbHRlcnMgPSAoYXdhaXQgUHJvbWlzZS5hbGwoZGF0YXMpKS5maWx0ZXIoXG4gICAgICAgIChkYXRhKSA9PiBkYXRhICE9PSB1bmRlZmluZWQsXG4gICAgICApO1xuICAgICAgcmV0dXJuIGZpbHRlcnMgYXMgVG9rZW5NZXRhZGF0YVtdO1xuICAgIH0pO1xuICB9O1xuXG4gIC8qKlxuICAgKiBGZXRjaCBtaW50ZWQgbWV0YWRhdGEgYn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IGZlZVBheWVyLFxuICAgICAgICBuZXdBY2NvdW50UHVia2V5OiBtaW50LFxuICAgICAgICBzcGFjZTogTUlOVF9TSVpFLFxuICAgICAgICBsYW1wb3J0czogbGFtcG9ydHMsXG4gICAgICAgIHByb2dyYW1JZDogVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgIH0pLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUluaXRpYWxpemVNaW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgIG1pbnQsXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICBvd25lcixcbiAgICAgICAgb3duZXIsXG4gICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgZmVlUGF5ZXIsXG4gICAgICAgIHRva2VuQXNzb2NpYXRlZCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIG1pbnQsXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZU1pbnRUb0NoZWNrZWRJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgdG9rZW5Bc3NvY2lhdGVkLFxuICAgICAgICBvd25lcixcbiAgICAgICAgQ2FsY3VsYXRlLmNhbGN1bGF0ZUFtb3VudCh0b3RhbEFtb3VudCwgbWludERlY2ltYWwpLFxuICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlQ3JlYXRlTWV0YWRhdGFBY2NvdW50VjNJbnN0cnVjdGlvbihcbiAgICAgICAge1xuICAgICAgICAgIG1ldGFkYXRhOiBtZXRhZGF0YVBkYSxcbiAgICAgICAgICBtaW50LFxuICAgICAgICAgIG1pbnRBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICAgIHBheWVyOiBmZWVQYXllcixcbiAgICAgICAgICB1cGRhdGVBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICB9LFxuICAgICAgICB7XG4gICAgICAgICAgY3JlYXRlTWV0YWRhdGFBY2NvdW50QXJnc1YzOiB7XG4gICAgICAgICAgICBkYXRhOiB0b2tlbk1ldGFkYXRhLFxuICAgICAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgICAgICAgY29sbGVjdGlvbkRldGFpbHM6IG51bGwsXG4gICAgICAgICAgfSxcbiAgICAgICAgfSxcbiAgICAgICksXG4gICAgKTtcbiAgICByZXR1cm4gaW5zdHJ1Y3Rpb25zO1xuICB9O1xuXG4gIC8qKlxuICAgKiBTUEwtVE9LRU4gbWludFxuICAgKlxuICAgKiBAcGFyYW0ge1NlY3JldH0gb3duZXIgICAgICAvLyB0b2tlbiBvd25lciBTZWNyZXRcbiAgICogQHBhcmFtIHtudW1iZXJ9IHRvdGFsQW1vdW50IC8vIHRvdGFsIG51bWJlclxuICAgKiBAcGFyYW0ge251bWJlcn0gbWludERlY2ltYWwgLy8gdG9rZW4gZGVjaW1hbFxuICAgKiBAcGFyYW0ge0lucHV0VG9rZW5NZXRhZGF0YX0gaW5wdXQgICAgICAgLy8gdG9rZW4gbWV0YWRhdGFcbiAgICogQHBhcmFtIHtQYXJ0aWFsPE1pbnRPcHRpb25zPn0gb3B0aW9ucyAgIC8vIG9wdGlvbnNcbiAgICogQHJldHVybiBQcm9taXNlPFJlc3VsdDxNaW50SW5zdHJ1Y3Rpb24sIEVycm9yPj5cbiAgICovXG4gIGV4cG9ydCBjb25zdCBtaW50ID0gYXN5bmMgKFxuICAgIG93bmVyOiBTZWNyZXQsXG4gICAgdG90YWxBbW91bnQ6IG51bWJlcixcbiAgICBtaW50RGVjaW1hbDogbnVtYmVyLFxuICAgIGlucHV0OiBJbnB1dFR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2VsbGVyRmVlQmFzaXNQb2ludHMsXG4gICAgICApO1xuXG4gICAgICBkZWJ1Z0xvZygnIyBkYXRhdjI6ICcsIGRhdGF2Mik7XG4gICAgICBkZWJ1Z0xvZygnIyB1cGxvYWQgY29udGVudCB1cmw6ICcsIHVyaSk7XG5cbiAgICAgIGNvbnN0IG1pbnQgPSBBY2NvdW50LktleXBhaXIuY3JlYXRlKCk7XG4gICAgICBjb25zdCBpbnN0cyA9IGF3YWl0IGNyZWF0ZU1pbnQoXG4gICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgIHRvdGFsQW1vdW50LFxuICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICAgZGF0YXYyLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICk7XG5cbiAgICAgIC8vIGZyZWV6ZUF1dGhvcml0eVxuICAgICAgaWYgKGZyZWV6ZUF1dGhvcml0eSkge1xuICAgICAgICBpbnN0cy5wdXNoKFxuICAgICAgICAgIGNyZWF0ZUZyZWV6ZUF1dGhvcml0eShcbiAgICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICAgICAgZnJlZXplQXV0aG9yaXR5LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuTWludChcbiAgICAgICAgaW5zdHMsXG4gICAgICAgIFtvd25lci50b0tleXBhaXIoKSwgbWludC50b0tleXBhaXIoKV0sXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICBtaW50LnB1YmtleSxcbiAgICAgICk7XG4gICAgfSk7XG4gIH07XG59XG4iLCAiaW1wb3J0IHsgQ29uc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KSA9PiB7XG4gICAgICBjb25zdCBwYXllciA9IG9wdGlvbnMuZmVlUGF5ZXIgPyBvcHRpb25zLmZlZVBheWVyIDogb3duZXJPck11bHRpc2lnWzBdO1xuICAgICAgY29uc3QgcGF5ZXJQdWJrZXkgPSBuZXcgQWNjb3VudC5LZXlwYWlyKHsgc2VjcmV0OiBwYXllciB9KTtcbiAgICAgIGNvbnN0IGtleXBhaXJzID0gb3duZXJPck11bHRpc2lnLm1hcCgocykgPT4gcy50b0tleXBhaXIoKSk7XG4gICAgICBjb25zdCBzb3VyY2VUb2tlbiA9IGF3YWl0IEFjY291bnQuQXNzb2NpYXRlZC5tYWtlT3JDcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgb3duZXIudG9TdHJpbmcoKSxcbiAgICAgICAgcGF5ZXJQdWJrZXkucHVia2V5LFxuICAgICAgKTtcblxuICAgICAgY29uc3QgZGVzdFRva2VuID0gYXdhaXQgQWNjb3VudC5Bc3NvY2lhdGVkLm1ha2VPckNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICBtaW50LFxuICAgICAgICBkZXN0LFxuICAgICAgICBwYXllclB1YmtleS5wdWJrZXksXG4gICAgICApO1xuXG4gICAgICBjb25zdCBpbnN0ID0gY3JlYXRlVHJhbnNmZXJDaGVja2VkSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHNvdXJjZVRva2VuLnRva2VuQWNjb3VudC50b1B1YmxpY0tleSgpLFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIGRlc3RUb2tlbi50b2tlbkFjY291bnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgQ2FsY3VsYXRvci5jYWxjdWxhdGVBbW91bnQoYW1vdW50LCBtaW50RGVjaW1hbCksXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICBrZXlwYWlycyxcbiAgICAgICk7XG5cbiAgICA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GFpbixcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICByZXR1cm4gQ29udmVydGVyLk5mdC5pbnRvVXNlcihtZXJnZWQpO1xuICAgICAgICAgIH0gY2F0Y2ggKGVycikge1xuICAgICAgICAgICAgZGVidWdMb2coJyMgRmFpbGVkIGZldGNoIG9mZmNoYWluIHVybDogJywgaXRlbS5jb250ZW50Lmpzb25fdXJpKTtcbiAgICAgICAgICAgIHJldHVybiBDb252ZXJ0ZXIuTmZ0LmludG9Vc2VyKHtcbiAgICAgICAgICAgICAgb25jaGFpbjogaXRlbSxcbiAgICAgICAgICAgICAgb2ZmY2hhaW46IHt9LFxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfVxuICAgICAgICB9KSxcbiAgICApO1xuICAgIHJldHVybiB7XG4gICAgICBwYWdlOiBhc3NldHMudmFsdWUucGFnZSxcbiAgICAgIHRvdGFsOiBhc3NldHMudmFsdWUudG90YWwsXG4gICAgICBsaW1pdDogYXNzZXRzLnZhbHVlLmxpbWl0LFxuICAgICAgbWV0YWRhdGFzLFxuICAgIH07XG4gIH07XG5cbiAgLyoqXG4gICAqIEZpbmQgbmZ0IGJ5IGNvbGxlY3Rpb24gbWludFxuICAgKlxuICAgKiBAcGFyYW0ge1B1YmtleX0gY29sbGVjdGlvbk1pbnRcbiAgICogQHBhcmFtIHtib29sZWFufSBpc0NvbXByZXNzZWQsXG4gICAqIEBwYXJhbSB7UGFydGlhbDxGaW5kT3B0aW9ucz59IG9wdGlvbnNcbiAgICogQHJldHVybiBQcm9taXNlPFJlc3VsdDxDb21wcmVzc2VkTmZ0TWV0YWRhdGEsIEVycm9yPj5cbiAgICovXG4gIGV4cG9ydCBjb25zdCBmaW5kQnlDb2xsZWN0aW9uID0gYXN5bmMgKFxuICAgIGNvbGxlY3Rpb25NaW50OiBQdWJrZXksXG4gICAgaXNDb21wcmVzc2VkOiBib29sZWFuLFxuICAgIG9wdGlvbnM6IFBhcnRpYWw8RmluZE9wdGlvbnM+ID0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XRlQ3JlYXRlTWV0YWRhdGFBY2NvdW50VjNJbnN0cnVjdGlvbihcbiAgICAgICAge1xuICAgICAgICAgIG1ldGFkYXRhOiB0b2tlbk1ldGFkYXRhUHVia2V5LFxuICAgICAgICAgIG1pbnQsXG4gICAgICAgICAgbWludEF1dGhvcml0eTogb3duZXIsXG4gICAgICAgICAgcGF5ZXI6IGZlZVBheWVyLFxuICAgICAgICAgIHVwZGF0ZUF1dGhvcml0eTogb3duZXIsXG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICBjcmVhdGVNZXRhZGF0YUFjY291bnRBcmdzVjM6IHtcbiAgICAgICAgICAgIGRhdGE6IG5mdE1ldGFkYXRhLFxuICAgICAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgICAgICAgY29sbGVjdGlvbkRldGFpbHM6IG51bGwsXG4gICAgICAgICAgfSxcbiAgICAgICAgfSxcbiAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlQ3JlYXRlTWFzdGVyRWRpdGlvblYzSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHtcbiAgICAgICAgICBlZGl0aW9uOiBtYXN0ZXJFZGl0aW9uUHVia2V5LFxuICAgICAgICAgIG1pbnQsXG4gICAgICAgICAgdXBkYXRlQXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBtaW50QXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBwYXllcjogZmVlUGF5ZXIsXG4gICAgICAgICAgbWV0YWRhdGE6IHRva2VuTWV0YWRhdGFQdWJrZXksXG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICBjcmVhdGVNYXN0ZXJFZGl0aW9uQXJnczoge1xuICAgICAgICAgICAgbWF4U3VwcGx5OiAwLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICApLFxuICAgICk7XG4gICAgcmV0dXJuIGluc3RydWN0aW9ucztcbiAgfTtcblxuICAv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IoYE11c3Qgc2V0IGZpbGVQYXRoJyBvciAndXJpJ2ApO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBkYXRhdjIgPSBDb252ZXJ0ZXIuUmVndWxhck5mdE1ldGFkYXRhLmludG9JbmZyYShcbiAgICAgICAgaW5wdXQsXG4gICAgICAgIHVyaSxcbiAgICAgICAgc2VsbGVyRmVlQmFzaXNQb2ludHMsXG4gICAgICApO1xuXG4gICAgICBjb25zdCBpc011dGFibGUgPSBpbnB1dC5pc011dGFibGUgPT09IHVuZGVmaW5lZCA/IHRydWUgOiBpbnB1dC5pc011dGFibGU7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGlucHV0OiAnLCBpbnB1dCk7XG4gICAgICBkZWJ1Z0xvZygnIyBkYXRhdjI6ICcsIGRhdGF2Mik7XG5cbiAgICAgIGNvbnN0IG1pbnQgPSBBY2NvdW50LktleXBhaXIuY3JlYXRlKCk7XG5cbiAgICAgIGNvbnN0IGluc3RydWN0aW9ucyA9IGF3YWl0IGNyZWF0ZU1pbnQoXG4gICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgIGRhdGF2MixcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICBpc011dGFibGUsXG4gICAgICApO1xuXG4gICAgICAvLyBmcmVlemVBdXRob3JpdHlcbiAgICAgIGlmIChmcmVlemVBdXRob3JpdHkpIHtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgICAgY3JlYXRlRGVsZWFnYXRlKFxuICAgICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgICAgICBmcmVlemVBdXRob3JpdHkudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICAvLyBjb2xsZWN0aW9uIC0tLVxuICAgICAgaWYgKGlucHV0LmNvbGxlY3Rpb24pIHtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgICAgY3JlYXRlVmVyaWZ5U2l6ZWRDb2xsZWN0aW9uKFxuICAgICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgaW5wdXQuY29sbGVjdGlvbi50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGtleXBhaXJzID0gW293bmVyLnRvS2V5cGFpcigpLCBtaW50LnRvS2V5cGFpcigpXTtcblxuICAgICAgLy8gY3JlYXRvciAtLS1cbiAgICAgIGlmIChpbnB1dC5jcmVhdG9ycykge1xuICAgICAgICBpbnB1dC5jcmVhdG9ycy5mb3JFYWNoKChjcmVhdG9yKSA9PiB7XG4gICAgICAgICAgaWYgKEFjY291bnQuS2V5cGFpci5pc1NlY3JldChjcmVhdG9yLnNlY3JldCkpIHtcbiAgICAgICAgICAgIGNvbnN0IGNyZWF0b3JQdWJrZXkgPSBjcmVhdG9yLmFkZHJlc3MudG9QdWJsaWNLZXkoKTtcbiAgICAgICAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVWZXJpZnlDcmVhdG9yKG1pbnQudG9QdWJsaWNLZXkoKSwgY3JlYXRvclB1YmtleSk7XG4gICAgICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChpbnN0KTtcbiAgICAgICAgICAgIGtleXBhaXJzLnB1c2goY3JlYXRvci5zZWNyZXQudG9LZXlwYWlyKCkpO1xuICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBuZXcgVHJhbnNhY3Rpb25CdWlsZGVyLk1pbnQoXG4gICAgICAgIGluc3RydWN0aW9ucyxcbiAgICAgICAga2V5cGFpcnMsXG4gIC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nN0IGlzTXV0YWJsZSA9IGlucHV0LmlzTXV0YWJsZSA9PT0gdW5kZWZpbmVkID8gdHJ1ZSA6IGlucHV0LmlzTXV0YWJsZTtcblxuICAgICAgZGVidWdMb2coJyMgaW5wdXQ6ICcsIGlucHV0KTtcbiAgICAgIGRlYnVnTG9nKCcjIHNlbGxlckZlZUJhc2lzUG9pbnRzOiAnLCBzZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICBkZWJ1Z0xvZygnIyBkYXRhdjI6ICcsIGRhdGF2Mik7XG5cbiAgICAgIGNvbnN0IG1pbnQgPSBBY2NvdW50LktleXBhaXIuY3JlYXRlKCk7XG4gICAgICBjb25zdCBpbnN0cyA9IGF3YWl0IE1pbnQuY3JlYXRlTWludChcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lclB1YmxpY2tleSxcbiAgICAgICAgZGF0YXYyLFxuICAgICAgICBmZWVQYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgICBpc011dGFibGUsXG4gICAgICApO1xuXG4gICAgICAvLyBmcmVlemVBdXRob3JpdHlcbiAgICAgIGlmIChvcHRpb25zLmZyZWV6ZUF1dGhvcml0eSkge1xuICAgICAgICBpbnN0cy5wdXNoKFxuICAgICAgICAgIE1pbnQuY3JlYXRlRGVsZWFnYXRlKFxuICAgICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgb3duZXJQdWJsaWNrZXksXG4gICAgICAgICAgICBvcHRpb25zLmZyZWV6ZUF1dGhvcml0eS50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGJsb2NraGFzaE9iaiA9IGF3YWl0IE5vZGUuZ2V0Q29ubmVjdGlvbigpLmdldExhdGVzdEJsb2NraGFzaCgpO1xuICAgICAgY29uc3QgdHggPSBuZXcgVHJhbnNhY3Rpb24oe1xuICAgICAgICBsYXN0VmFsaWRCbG9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RvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgKTtcblxuICAgICAgLy8gZnJlZXplQXV0aG9yaXR5XG4gICAgICBpZiAoZnJlZXplQXV0aG9yaXR5KSB7XG4gICAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICAgIE1pbnQuY3JlYXRlRGVsZWFnYXRlKFxuICAgICAgICAgICAgY29sbGVjdGlvbk1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICAgICAgZnJlZXplQXV0aG9yaXR5LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgY29sbGVjdGlvbnMgPSB7XG4gICAgICAgIGNvbGxlY3Rpb25NZXRhZGF0YTogY29sbGVjdGlvbk1ldGFkYXRhQWNjb3VudCxcbiAgICAgICAgY29sbGVjdGlvbkF1dGhvcml0eTogb3duZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICBjb2xsZWN0aW9uTWludDogY29sbGVjdGlvbk1pbnQudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgfTtcblxuICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgIGNyZWF0ZVNldENvbGxlY3Rpb25TaXplSW5zdHJ1Y3Rpb24oY29sbGVjdGlvbnMsIHtcbiAgICAgICAgICBzZXRDb2xsZWN0aW9uU2l6ZUFyZ3M6IHtcbiAgICAgICAgICAgIHNpemU6IGNvbGxlY3Rpb25TaXplIHx8IERFRkFVTFRfQ09MTEVDVElPTl9TSVpFLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0pLFxuICAgICAgKTtcblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuTWludChcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLFxuICAgICAgICBbb3duZXIudG9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fSUQiLCAiY3JlYXRlQ3JlYXRlTWV0YWRhdGFBY2NvdW50VjNJbnN0cnVjdGlvbiIsICJSZWd1bGFyTmZ0IiwgIm1pbnQiLCAiQWNjb3VudCIsICJnZXRBc3NvY2lhdGVkVG9rZW5BZGRyZXNzU3luYyIsICJTeXN0ZW1Qcm9ncmFtIiwgImdldE1pbmltdW1CYWxhbmNlRm9yUmVudEV4ZW1wdE1pbnQiLCAiTUlOVF9TSVpFIiwgIlRPS0VOX1BST0dSQU1fSUQiLCAiY3JlYXRlSW5pdGlhbGl6ZU1pbnRJbnN0cnVjdGlvbiIsICJjcmVhdGVBc3NvY2lhdGVkVG9rZW5BY2NvdW50SW5zdHJ1Y3Rpb24iLCAiY3JlYXRlTWludFRvQ2hlY2tlZEluc3RydWN0aW9uIiwgIkNvbnZlcnRlciIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiVHJhbnNhY3Rpb24iLCAiUmVndWxhck5mdCIsICJDb252ZXJ0ZXIiLCAiQWNjb3VudCIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiUmVndWxhck5mdCIsICJTcGxUb2tlbiIsICJSZWd1bGFyTmZ0IiwgIkNvbnZlcnRlciIsICJBY2NvdW50IiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJnZXRBc3NvY2lhdGVkVG9rZW5BZGRyZXNzU3luYyIsICJSZWd1bGFyTmZ0IiwgIkFjY291bnQiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlJlZ3VsYXJOZnQiLCAiU3BsVG9rZW4iLCAiUmVndWxhck5mdCJdCn0K \ No newline at end of file diff --git a/packages/suite-utils/dist/exports-c05c52f7.d.ts b/packages/suite-utils/dist/exports-c05c52f7.d.ts deleted file mode 100644 index d7ed4ef3e..000000000 --- a/packages/suite-utils/dist/exports-c05c52f7.d.ts +++ /dev/null @@ -1,508 +0,0 @@ -import * as _solana_web3_js from '@solana/web3.js'; -import { TransactionSignature, PublicKey, Keypair, Connection, Commitment } from '@solana/web3.js'; -import BN from 'bn.js'; -import { DataV2 } from '@metaplex-foundation/mpl-token-metadata'; - -declare const pubKeyNominality: unique symbol; -declare const secretNominality: unique symbol; -type Pubkey = (string & { - [pubKeyNominality]: never; -}) | string; -type Secret = (string & { - [secretNominality]: never; -}) | string; -type KeypairAccount = { - pubkey: Pubkey; - secret: Secret; -}; -type OwnerInfo = { - sol: number; - lamports: number; - owner: string; -}; - -declare abstract class AbstractResult { - protected abstract _chain(ok: (value: T) => Result, err: (error: E) => Result): Result; - unwrap(): T; - unwrap(ok: (value: T) => U): U; - unwrap(ok: (value: T) => U, err: (error: E) => V): U | V; - unwrap(ok: (value: T) => U, err: (error: E) => U): U; - map(ok: (value: T) => U): Result; - map(ok: (value: T) => U, err: (error: E) => F): Result; - chain(ok: (value: T) => Result): Result; - chain(ok: (value: T) => Result): Result; - chain(ok: (value: T) => Result, err: (error: E) => Result): Result; - match(ok: (value: T) => U, err: (error: E) => F): void | Promise; - submit(feePayer?: Secret): Promise>; -} -declare global { - interface Array { - submit(feePayer?: Secret): Promise>; - } -} -declare class InternalOk extends AbstractResult { - readonly value: T; - readonly isOk = true; - readonly isErr = false; - constructor(value: T); - protected _chain(ok: (value: T) => Result, _err: (error: E) => Result): Result; -} -declare class InternalErr extends AbstractResult { - readonly error: E; - readonly isOk = false; - readonly isErr = true; - constructor(error: E); - protected _chain(_ok: (value: T) => Result, err: (error: E) => Result): Result; -} -declare namespace Result { - export type Ok = InternalOk; - export type Err = InternalErr; - export function ok(value: T): Result; - export function err(error?: E): Result; - type U = Result; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3]): Result<[ - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2]): Result<[OkType, OkType, OkType], ErrType>; - export function all(obj: [R0, R1]): Result<[OkType, OkType], ErrType>; - export function all(obj: [R0]): Result<[OkType], ErrType>; - export function all(obj: []): Result<[]>; - export function all>(obj: T): Result<{ - [K in keyof T]: T[K] extends Result ? I : never; - }, { - [K in keyof T]: T[K] extends Result ? E : never; - }[keyof T]>; - export {}; -} -type Result = Result.Ok | Result.Err; -type OkType> = R extends Result ? O : never; -type ErrType> = R extends Result ? E : never; - -/** - * convert buffer to Array - * - * @param {Buffer} buffer - * @returns number[] - */ -declare const bufferToArray: (buffer: Buffer) => number[]; -/** - * Overwrite JS Object - * - * @param {unknown} object - * @param {OverwriteObject[]} targets - * @returns Object - */ -declare const overwriteObject: (object: unknown, targets: { - existsKey: string; - will: { - key: string; - value: unknown; - }; -}[]) => unknown; -/** - * Display log for solana-suite-config.js - * - * @param {unknown} data1 - * @param {unknown} data2 - * @param {unknown} data3 - * @param {unknown} data4 - * @returns void - */ -declare const debugLog: (data1: unknown, data2?: unknown, data3?: unknown, data4?: unknown) => void; -/** - * sleep timer - * - * @param {number} sec - * @returns Promise - */ -declare const sleep: (sec: number) => Promise; -/** - * Node.js or Browser js - * - * @returns boolean - */ -declare const isBrowser: () => boolean; -/** - * Node.js or Browser js - * - * @returns boolean - */ -declare const isNode: () => boolean; -/** - * argument is promise or other - * - * @param {unknown} obj - * @returns boolean - */ -declare const isPromise: (obj: unknown) => obj is Promise; -/** - * Try async monad - * - * @returns Promise> - */ -declare function Try(asyncblock: () => Promise, finallyInput?: () => void): Promise>; -declare function Try(block: () => T): Result; -/** - * argument is promise or other - * - * @param {number|undefined} created_at - * @returns Date | undefined - */ -declare const convertTimestampToDateTime: (created_at: number | undefined) => Date | undefined; -/** - * Get unix timestamp - * - * @returns number - */ -declare const unixTimestamp: () => number; - -declare namespace Account$2 { - class Keypair { - secret: Secret; - pubkey: Pubkey; - constructor(params: { - pubkey?: Pubkey; - secret: Secret; - }); - toPublicKey(): PublicKey; - toKeypair(): Keypair; - static isPubkey: (value: string) => value is Pubkey; - static isSecret: (value: string) => value is Secret; - static create: () => Keypair; - static toKeyPair: (keypair: Keypair) => Keypair; - } -} - -declare namespace Account$1 { - namespace Pda { - const getMetadata: (address: Pubkey) => PublicKey; - const getMasterEdition: (address: Pubkey) => PublicKey; - const getTreeAuthority: (address: Pubkey) => PublicKey; - const getBgumSigner: () => PublicKey; - const getAssetId: (address: Pubkey, leafIndex: number) => Pubkey; - } -} - -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; -}; - -declare namespace Node { - const getConnection: () => Connection; - const changeConnection: (param: { - cluster?: string; - commitment?: Commitment; - customClusterUrl?: string[]; - }) => void; - const confirmedSig: (signature: string, commitment?: Commitment) => Promise, Error> | Result.Err<_solana_web3_js.RpcResponseAndContext<_solana_web3_js.SignatureResult>, Error> | Result.Ok | Result.Err>; -} - -type Condition = 'overMax' | 'underMin'; -interface Limit { - threshold: number; - condition: Condition; -} -interface Details { - key: string; - message: string; - actual: string | number; - limit?: Limit; -} - -type bignum = number | BN; -declare enum UseMethod { - Burn = 0, - Multiple = 1, - Single = 2 -} -type Uses = { - useMethod: UseMethod; - remaining: bignum; - total: bignum; -}; -type InputCreators = { - address: Pubkey; - secret: Secret; - share: number; -}; - -type FileType = string | File; - -type StorageType = 'nftStorage' | 'arweave' | string; -type Offchain = { - name?: string; - symbol?: string; - description?: string; - seller_fee_basis_points?: number; - image?: string; - external_url?: string; - attributes?: Attribute[]; - properties?: Properties; - collection?: { - name?: string; - family?: string; - [key: string]: unknown; - }; - collectionDetails?: { - kind: string; - size: number; - }; - created_at?: number; -}; -type Properties = { - creators?: { - address?: string; - share?: number; - [key: string]: unknown; - }[]; - files?: { - type?: string; - filePath?: FileType; - [key: string]: unknown; - }[]; - [key: string]: unknown; -}; -type Attribute = { - trait_type?: string; - value?: string; - [key: string]: unknown; -}; - -type InputCollection = Pubkey; -type Options = { - [key: string]: unknown; -}; -type InputNftMetadata = { - name: string; - symbol: string; - royalty?: number; - storageType?: StorageType; - filePath?: FileType; - uri?: string; - isMutable?: boolean; - description?: string; - external_url?: string; - attributes?: Attribute[]; - properties?: Properties; - maxSupply?: bignum; - creators?: InputCreators[]; - uses?: Uses; - collection?: InputCollection; - options?: Options; -}; - -declare namespace Validator { - export namespace Message { - const SUCCESS = "success"; - const SMALL_NUMBER = "too small"; - const BIG_NUMBER = "too big"; - const LONG_LENGTH = "too long"; - const EMPTY = "invalid empty value"; - const INVALID_URL = "invalid url"; - const ONLY_NODE_JS = "`string` type is only Node.js"; - } - export const NAME_LENGTH = 32; - export const SYMBOL_LENGTH = 10; - export const URL_LENGTH = 200; - export const ROYALTY_MAX = 100; - export const SELLER_FEE_BASIS_POINTS_MAX = 10000; - export const ROYALTY_MIN = 0; - export const isRoyalty: (royalty: number) => Result; - export const isSellerFeeBasisPoints: (royalty: number) => Result; - export const isName: (name: string) => Result; - export const isSymbol: (symbol: string) => Result; - export const isImageUrl: (image: string) => Result; - export const checkAll: (metadata: T) => Result; - type PickNftStorage = Pick; - type PickNftStorageMetaplex = Pick; - type PickMetaplex = Pick; - export {}; -} -declare class ValidatorError extends Error { - details: Details[]; - constructor(message: string, details: Details[]); -} - -export { Account as A, Explorer as E, KeypairAccount as K, Node as N, OwnerInfo as O, Pubkey as P, Result as R, Secret as S, Try as T, Validator as V, isNode as a, bufferToArray as b, isPromise as c, debugLog as d, convertTimestampToDateTime as e, ValidatorError as f, ExplorerOptions as g, isBrowser as i, overwriteObject as o, sleep as s, unixTimestamp as u }; diff --git a/packages/suite-utils/dist/exports.d.mts b/packages/suite-utils/dist/exports.d.mts deleted file mode 100644 index 6faf633e0..000000000 --- a/packages/suite-utils/dist/exports.d.mts +++ /dev/null @@ -1,4 +0,0 @@ -export { A as Account, E as Explorer, g as ExplorerOptions, K as KeypairAccount, N as Node, O as OwnerInfo, P as Pubkey, S as Secret, T as Try, V as Validator, f as ValidatorError, b as bufferToArray, e as convertTimestampToDateTime, d as debugLog, i as isBrowser, a as isNode, c as isPromise, o as overwriteObject, s as sleep, u as unixTimestamp } from './exports-c05c52f7.js'; -import '@solana/web3.js'; -import 'bn.js'; -import '@metaplex-foundation/mpl-token-metadata'; diff --git a/packages/suite-utils/dist/exports.d.ts b/packages/suite-utils/dist/exports.d.ts deleted file mode 100644 index 6faf633e0..000000000 --- a/packages/suite-utils/dist/exports.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export { A as Account, E as Explorer, g as ExplorerOptions, K as KeypairAccount, N as Node, O as OwnerInfo, P as Pubkey, S as Secret, T as Try, V as Validator, f as ValidatorError, b as bufferToArray, e as convertTimestampToDateTime, d as debugLog, i as isBrowser, a as isNode, c as isPromise, o as overwriteObject, s as sleep, u as unixTimestamp } from './exports-c05c52f7.js'; -import '@solana/web3.js'; -import 'bn.js'; -import '@metaplex-foundation/mpl-token-metadata'; diff --git a/packages/suite-utils/dist/exports.js b/packages/suite-utils/dist/exports.js deleted file mode 100644 index 1685dacee..000000000 --- a/packages/suite-utils/dist/exports.js +++ /dev/null @@ -1,1482 +0,0 @@ -"use strict"; -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/exports.ts -var exports_exports = {}; -__export(exports_exports, { - Account: () => Account3, - Explorer: () => Explorer, - Node: () => Node, - Try: () => Try, - Validator: () => Validator, - ValidatorError: () => ValidatorError, - bufferToArray: () => bufferToArray, - convertTimestampToDateTime: () => convertTimestampToDateTime, - debugLog: () => debugLog, - isBrowser: () => isBrowser, - isNode: () => isNode, - isPromise: () => isPromise, - overwriteObject: () => overwriteObject, - sleep: () => sleep, - unixTimestamp: () => unixTimestamp -}); -module.exports = __toCommonJS(exports_exports); - -// src/constants.ts -var import_web3 = require("@solana/web3.js"); -var import_load = __toESM(require("@solana-suite/config/load")); -var Config = import_load.default; -var Constants; -((Constants2) => { - let WarnningMessage; - ((WarnningMessage2) => { - const THRESHHOLD = 50; - let isDisplay = false; - WarnningMessage2.NFT_STORAGE_API_KEY = ` - [YOU HAVE TO DO] - -------------------------------------- - You need to update nftStorageApiKey define parameter in solana-suite.json. - Can get api key from https://nft.storage/ - -------------------------------------- - `; - WarnningMessage2.DAS_API_URL = ` - [YOU HAVE TO DO] - -------------------------------------- - You need to update dasApiUrl define parameter in solana-suite.json. - can get api url from https://www.helius.dev/ - -------------------------------------- - `; - WarnningMessage2.ANNOUNCE = ` - [DEPRECATED] - -------------------------------------- - Account, Node, toExplorer, Pubkey, Secret have been moved to - @solana-suite/utils - ------------------------------------- - `; - WarnningMessage2.calculateProbability = () => { - const randomValue = Math.random(); - const probability = 1 / THRESHHOLD; - if (!isDisplay && randomValue < probability) { - isDisplay = true; - return true; - } - return false; - }; - })(WarnningMessage = Constants2.WarnningMessage || (Constants2.WarnningMessage = {})); -})(Constants || (Constants = {})); -((Constants2) => { - Constants2.currentCluster = Config.cluster.type; - Constants2.customClusterUrl = Config.cluster.customClusterUrl; - Constants2.isDebugging = Config.debugging; - Constants2.nftStorageApiKey = Config.nftStorageApiKey; - Constants2.dasApiUrl = Config.dasApiUrl; - let Cluster; - ((Cluster2) => { - Cluster2["prd"] = "mainnet-beta"; - Cluster2["prdMetaplex"] = "mainnet-beta-metaplex"; - Cluster2["dev"] = "devnet"; - Cluster2["test"] = "testnet"; - Cluster2["localhost"] = "localhost-devnet"; - })(Cluster = Constants2.Cluster || (Constants2.Cluster = {})); - let EndPointUrl; - ((EndPointUrl2) => { - EndPointUrl2["prd"] = "https://api.mainnet-beta.solana.com"; - EndPointUrl2["prdMetaplex"] = "https://api.metaplex.solana.com"; - EndPointUrl2["dev"] = "https://api.devnet.solana.com"; - EndPointUrl2["test"] = "https://api.testnet.solana.com"; - EndPointUrl2["localhost"] = "http://api.devnet.solana.com"; - })(EndPointUrl = Constants2.EndPointUrl || (Constants2.EndPointUrl = {})); - let BundlrUrl; - ((BundlrUrl2) => { - BundlrUrl2["prd"] = "https://node1.irys.xyz,https://node2.irys.xyz"; - BundlrUrl2["dev"] = "https://devnet.irys.xyz"; - })(BundlrUrl = Constants2.BundlrUrl || (Constants2.BundlrUrl = {})); - let DasApiUrl; - ((DasApiUrl2) => { - DasApiUrl2["dev"] = "https://devnet.helius-rpc.com/?api-key=15319bf4-5b40-4958-ac8d-6313aa55eb92,https://rpc-devnet.helius.xyz?api-key=9f70a843-3274-4ffd-a0a9-323f8b7c0639"; - })(DasApiUrl = Constants2.DasApiUrl || (Constants2.DasApiUrl = {})); - let NftstorageApiKey; - ((NftstorageApiKey2) => { - NftstorageApiKey2["dev"] = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJkaWQ6ZXRocjoweERGMjcyN2VkODZhRGU1RTMyZDZDZEJlODc0YzRFNDlEODY1OWZmOEMiLCJpc3MiOiJuZnQtc3RvcmFnZSIsImlhdCI6MTYyMDI2NDk0MzcwNiwibmFtZSI6ImRlbW8ifQ.d4J70mikxRB8a5vwNu6SO5HDA8JaueuseAj7Q_ytMCE"; - })(NftstorageApiKey = Constants2.NftstorageApiKey || (Constants2.NftstorageApiKey = {})); - Constants2.loadConfig = async () => { - Config = await import("@solana-suite/config/load"); - }; - Constants2.switchCluster = (param) => { - const { cluster: env, customClusterUrl: customClusterUrl2 } = param; - if (customClusterUrl2 && customClusterUrl2.length > 0) { - const index = Date.now() % customClusterUrl2.length; - return customClusterUrl2[index]; - } - switch (env) { - case "mainnet-beta" /* prd */: - return "https://api.mainnet-beta.solana.com" /* prd */; - case "mainnet-beta-metaplex" /* prdMetaplex */: - return "https://api.metaplex.solana.com" /* prdMetaplex */; - case "testnet" /* test */: - return "https://api.testnet.solana.com" /* test */; - case "devnet" /* dev */: - return "https://api.devnet.solana.com" /* dev */; - default: - return "http://api.devnet.solana.com" /* localhost */; - } - }; - Constants2.switchBundlr = (env) => { - switch (env) { - case "mainnet-beta" /* prd */: { - const urls = "https://node1.irys.xyz,https://node2.irys.xyz" /* prd */.split(","); - const index = Date.now() % urls.length; - return urls[index]; - } - default: { - return "https://devnet.irys.xyz" /* dev */; - } - } - }; - Constants2.switchDasApi = (env) => { - switch (env) { - case "mainnet-beta" /* prd */: { - if (Constants2.dasApiUrl.length < 1) { - throw Error(Constants2.WarnningMessage.DAS_API_URL); - } - const urls = "https://node1.irys.xyz,https://node2.irys.xyz" /* prd */.split(","); - const index = Date.now() % urls.length; - return urls[index]; - } - default: { - const urls = "https://devnet.helius-rpc.com/?api-key=15319bf4-5b40-4958-ac8d-6313aa55eb92,https://rpc-devnet.helius.xyz?api-key=9f70a843-3274-4ffd-a0a9-323f8b7c0639" /* dev */.split(","); - const index = Date.now() % urls.length; - return urls[index]; - } - } - }; - Constants2.switchNftStorage = (env) => { - switch (env) { - case "mainnet-beta" /* prd */: - if (!Constants2.nftStorageApiKey) { - throw Error(Constants2.WarnningMessage.NFT_STORAGE_API_KEY); - } - return Constants2.nftStorageApiKey; - default: { - return "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJkaWQ6ZXRocjoweERGMjcyN2VkODZhRGU1RTMyZDZDZEJlODc0YzRFNDlEODY1OWZmOEMiLCJpc3MiOiJuZnQtc3RvcmFnZSIsImlhdCI6MTYyMDI2NDk0MzcwNiwibmFtZSI6ImRlbW8ifQ.d4J70mikxRB8a5vwNu6SO5HDA8JaueuseAj7Q_ytMCE" /* dev */; - } - } - }; - Constants2.WRAPPED_TOKEN_PROGRAM_ID = new import_web3.PublicKey( - "So11111111111111111111111111111111111111112" - ); - Constants2.MEMO_PROGRAM_ID = new import_web3.PublicKey( - "Memo1UhkJRfHyvLMcVucJwxXeuD728EqVDDwQDxFMNo" - ); - Constants2.METAPLEX_PROGRAM_ID = new import_web3.PublicKey( - "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s" - ); - Constants2.COMMITMENT = "confirmed"; - Constants2.NFT_STORAGE_GATEWAY_URL = "https://ipfs.io/ipfs"; - Constants2.IRYS_GATEWAY_URL = "https://gateway.irys.xyz"; - Constants2.BUNDLR_NETWORK_URL = (0, Constants2.switchBundlr)(Config.cluster.type); - Constants2.DAS_API_URL = (0, Constants2.switchDasApi)(Config.cluster.type); - Constants2.NFT_STORAGE_API_KEY = (0, Constants2.switchNftStorage)(Config.cluster.type); - Constants2.EXPLORER_SOLSCAN_URL = "https://solscan.io"; - Constants2.EXPLORER_SOLANAFM_URL = "https://solana.fm"; - Constants2.EXPLORER_XRAY_URL = "https://xray.helius.xyz"; -})(Constants || (Constants = {})); -console.log(Constants.WarnningMessage.ANNOUNCE); - -// ../transaction-builder/src/batch.ts -var import_web37 = require("@solana/web3.js"); - -// ../types/src/global/index.ts -var Explorer = /* @__PURE__ */ ((Explorer2) => { - Explorer2["Solscan"] = "solscan"; - Explorer2["SolanaFM"] = "solanafm"; - Explorer2["Xray"] = "xray"; - return Explorer2; -})(Explorer || {}); - -// ../global/src/index.ts -var import_web34 = require("@solana/web3.js"); - -// ../account/src/keypair.ts -var import_web32 = require("@solana/web3.js"); -var import_bs58 = __toESM(require("bs58")); -var Account; -((Account4) => { - class Keypair4 { - secret; - pubkey; - constructor(params) { - if (!params.pubkey) { - const keypair = params.secret.toKeypair(); - this.pubkey = keypair.publicKey.toString(); - } else { - this.pubkey = params.pubkey; - } - this.secret = params.secret; - } - toPublicKey() { - return new import_web32.PublicKey(this.pubkey); - } - toKeypair() { - const decoded = import_bs58.default.decode(this.secret); - return import_web32.Keypair.fromSecretKey(decoded); - } - static isPubkey = (value) => /^[0-9a-zA-Z]{32,44}$/.test(value); - static isSecret = (value) => /^[0-9a-zA-Z]{87,88}$/.test(value); - static create = () => { - const keypair = import_web32.Keypair.generate(); - return new Keypair4({ - pubkey: keypair.publicKey.toString(), - secret: import_bs58.default.encode(keypair.secretKey) - }); - }; - static toKeyPair = (keypair) => { - return new Keypair4({ - pubkey: keypair.publicKey.toString(), - secret: import_bs58.default.encode(keypair.secretKey) - }); - }; - } - Account4.Keypair = Keypair4; -})(Account || (Account = {})); - -// ../account/src/pda.ts -var import_web33 = require("@solana/web3.js"); -var import_mpl_token_metadata = require("@metaplex-foundation/mpl-token-metadata"); -var import_mpl_bubblegum = require("@metaplex-foundation/mpl-bubblegum"); -var import_bn = __toESM(require("bn.js")); -var Account2; -((Account4) => { - let Pda; - ((Pda2) => { - Pda2.getMetadata = (address) => { - const [publicKey] = import_web33.PublicKey.findProgramAddressSync( - [ - Buffer.from("metadata"), - import_mpl_token_metadata.PROGRAM_ID.toBuffer(), - address.toPublicKey().toBuffer() - ], - import_mpl_token_metadata.PROGRAM_ID - ); - return publicKey; - }; - Pda2.getMasterEdition = (address) => { - const [publicKey] = import_web33.PublicKey.findProgramAddressSync( - [ - Buffer.from("metadata"), - import_mpl_token_metadata.PROGRAM_ID.toBuffer(), - address.toPublicKey().toBuffer(), - Buffer.from("edition") - ], - import_mpl_token_metadata.PROGRAM_ID - ); - return publicKey; - }; - Pda2.getTreeAuthority = (address) => { - const [publicKey] = import_web33.PublicKey.findProgramAddressSync( - [address.toPublicKey().toBuffer()], - import_mpl_bubblegum.MPL_BUBBLEGUM_PROGRAM_ID.toPublicKey() - ); - return publicKey; - }; - Pda2.getBgumSigner = () => { - const [publicKey] = import_web33.PublicKey.findProgramAddressSync( - [Buffer.from("collection_cpi", "utf8")], - import_mpl_bubblegum.MPL_BUBBLEGUM_PROGRAM_ID.toPublicKey() - ); - return publicKey; - }; - Pda2.getAssetId = (address, leafIndex) => { - const node = new import_bn.default.BN(leafIndex); - const [assetId] = import_web33.PublicKey.findProgramAddressSync( - [ - Buffer.from("asset", "utf8"), - address.toPublicKey().toBuffer(), - Uint8Array.from(node.toArray("le", 8)) - ], - import_mpl_bubblegum.MPL_BUBBLEGUM_PROGRAM_ID.toPublicKey() - ); - return assetId.toString(); - }; - })(Pda = Account4.Pda || (Account4.Pda = {})); -})(Account2 || (Account2 = {})); - -// ../account/src/index.ts -var Account3 = { - ...Account, - ...Account2 -}; - -// ../global/src/index.ts -var import_bignumber = require("bignumber.js"); -var import_bs582 = __toESM(require("bs58")); -String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, options = {}) { - const endPointUrl = Node.getConnection().rpcEndpoint; - debugLog("# toExplorerUrl rpcEndpoint:", endPointUrl); - let cluster = ""; - if (endPointUrl === Constants.EndPointUrl.prd) { - cluster = Constants.Cluster.prd; - } else if (endPointUrl === Constants.EndPointUrl.test) { - cluster = Constants.Cluster.test; - } else if (endPointUrl === Constants.EndPointUrl.dev) { - cluster = Constants.Cluster.dev; - } else { - cluster = Constants.Cluster.dev; - } - const addressOrSignature = this.toString(); - let url = ""; - if (options.replacePath) { - if (explorer === "solanafm" /* SolanaFM */) { - url = `${Constants.EXPLORER_SOLANAFM_URL}/${options.replacePath}/${addressOrSignature}?cluster=${cluster}`; - } else if (explorer === "xray" /* Xray */) { - url = `${Constants.EXPLORER_XRAY_URL}/${options.replacePath}/${addressOrSignature}?network=${cluster}`; - } else { - url = `${Constants.EXPLORER_SOLSCAN_URL}/${options.replacePath}/${addressOrSignature}?cluster=${cluster}`; - } - return url; - } - if (Account3.Keypair.isPubkey(addressOrSignature)) { - if (explorer === "solanafm" /* SolanaFM */) { - url = `${Constants.EXPLORER_SOLANAFM_URL}/address/${addressOrSignature}?cluster=${cluster}`; - } else if (explorer === "xray" /* Xray */) { - url = `${Constants.EXPLORER_XRAY_URL}/account/${addressOrSignature}?network=${cluster}`; - } else { - url = `${Constants.EXPLORER_SOLSCAN_URL}/account/${addressOrSignature}?cluster=${cluster}`; - } - } else { - if (explorer === "solanafm" /* SolanaFM */) { - url = `${Constants.EXPLORER_SOLANAFM_URL}/tx/${addressOrSignature}?cluster=${cluster}`; - } else if (explorer === "xray" /* Xray */) { - url = `${Constants.EXPLORER_XRAY_URL}/tx/${addressOrSignature}?network=${cluster}`; - } else { - url = `${Constants.EXPLORER_SOLSCAN_URL}/tx/${addressOrSignature}?cluster=${cluster}`; - } - } - return url; -}; -String.prototype.toPublicKey = function() { - if (!Account3.Keypair.isPubkey(this.toString())) { - throw Error(`No match KeyPair.PubKey: ${this.toString()}`); - } - return new import_web34.PublicKey(this.toString()); -}; -String.prototype.toKeypair = function() { - if (!Account3.Keypair.isSecret(this.toString())) { - throw Error(`No match KeyPair.Secret: ${this.toString()}`); - } - const decoded = import_bs582.default.decode(this.toString()); - return import_web34.Keypair.fromSecretKey(decoded); -}; -Number.prototype.toSol = function() { - return (0, import_bignumber.BigNumber)(this).div(import_web34.LAMPORTS_PER_SOL).toNumber(); -}; -Number.prototype.toLamports = function() { - return (0, import_bignumber.BigNumber)(this).times(import_web34.LAMPORTS_PER_SOL).toNumber(); -}; - -// ../node/src/index.ts -var import_web35 = require("@solana/web3.js"); -var Node; -((Node2) => { - const setted = { - clusterUrl: "", - commitment: Constants.COMMITMENT, - customClusterUrl: [] - }; - Node2.getConnection = () => { - if (setted.customClusterUrl.length > 0) { - setted.clusterUrl = Constants.switchCluster({ - customClusterUrl: setted.customClusterUrl - }); - } else if (Constants.customClusterUrl.length > 0) { - setted.clusterUrl = Constants.switchCluster({ - customClusterUrl: Constants.customClusterUrl - }); - } else if (!setted.clusterUrl) { - setted.clusterUrl = Constants.switchCluster({ - cluster: Constants.currentCluster - }); - } - if (!setted.commitment) { - setted.commitment = Constants.COMMITMENT; - } - return new import_web35.Connection(setted.clusterUrl, setted.commitment); - }; - Node2.changeConnection = (param) => { - setted.clusterUrl = ""; - setted.customClusterUrl = []; - setted.commitment = Constants.COMMITMENT; - const { cluster, commitment, customClusterUrl } = param; - if (commitment) { - setted.commitment = commitment; - debugLog("# Node change commitment: ", setted.commitment); - } - if (cluster) { - setted.clusterUrl = Constants.switchCluster({ cluster }); - debugLog("# Node change clusterUrl: ", setted.clusterUrl); - } - if (customClusterUrl) { - debugLog("# customClusterUrl: ", customClusterUrl); - setted.clusterUrl = Constants.switchCluster({ customClusterUrl }); - setted.customClusterUrl = customClusterUrl; - debugLog( - "# Node change cluster, custom cluster url: ", - setted.clusterUrl - ); - } - }; - Node2.confirmedSig = async (signature, commitment = Constants.COMMITMENT) => { - const connection = Node2.getConnection(); - const latestBlockhash = await connection.getLatestBlockhash(); - return await connection.confirmTransaction( - { - blockhash: latestBlockhash.blockhash, - lastValidBlockHeight: latestBlockhash.lastValidBlockHeight, - signature - }, - commitment - ).then(Result.ok).catch(Result.err); - }; -})(Node || (Node = {})); - -// ../transaction-builder/src/common.ts -var import_web36 = require("@solana/web3.js"); -var MAX_RETRIES = 3; -var TransactionBuilder; -((TransactionBuilder7) => { - class Common2 { - static MAX_TRANSACTION_SIZE = 1232; - instructions; - signers; - feePayer; - data; - constructor(instructions, signers, feePayer, data) { - this.instructions = instructions; - this.signers = signers; - this.feePayer = feePayer; - this.data = data; - } - submit = async () => { - return Try(async () => { - if (!(this instanceof Common2)) { - throw Error("only Instruction object that can use this"); - } - const transaction = new import_web36.Transaction(); - const blockhashObj = await Node.getConnection().getLatestBlockhash(); - transaction.lastValidBlockHeight = blockhashObj.lastValidBlockHeight; - transaction.recentBlockhash = blockhashObj.blockhash; - let finalSigners = this.signers; - if (this.feePayer) { - transaction.feePayer = this.feePayer.publicKey; - finalSigners = [this.feePayer, ...this.signers]; - } - this.instructions.forEach((inst) => transaction.add(inst)); - const options = { - maxRetries: MAX_RETRIES - }; - return await (0, import_web36.sendAndConfirmTransaction)( - Node.getConnection(), - transaction, - finalSigners, - options - ); - }); - }; - } - TransactionBuilder7.Common = Common2; -})(TransactionBuilder || (TransactionBuilder = {})); - -// ../transaction-builder/src/batch.ts -var TransactionBuilder2; -((TransactionBuilder7) => { - class Batch { - submit = async (arr) => { - return Try(async () => { - let i = 0; - for (const a of arr) { - if (!a.instructions && !a.signers) { - throw Error( - `only Instruction object that can use batchSubmit(). - Index: ${i}, Set value: ${JSON.stringify(a)}` - ); - } - i++; - } - const instructions = arr.flatMap((a) => a.instructions); - const signers = arr.flatMap((a) => a.signers); - const feePayers = arr.filter((a) => a.feePayer !== void 0); - let feePayer = signers[0]; - if (feePayers.length > 0 && feePayers[0].feePayer) { - feePayer = feePayers[0].feePayer; - } - const transaction = new import_web37.Transaction(); - let finalSigners = signers; - if (feePayer) { - transaction.feePayer = feePayer.publicKey; - finalSigners = [feePayer, ...signers]; - } - instructions.map((inst) => transaction.add(inst)); - const options = { - maxRetries: MAX_RETRIES - }; - return await (0, import_web37.sendAndConfirmTransaction)( - Node.getConnection(), - transaction, - finalSigners, - options - ); - }); - }; - } - TransactionBuilder7.Batch = Batch; -})(TransactionBuilder2 || (TransactionBuilder2 = {})); - -// ../transaction-builder/src/mint.ts -var import_web38 = require("@solana/web3.js"); -var TransactionBuilder3; -((TransactionBuilder7) => { - class Mint { - instructions; - signers; - feePayer; - data; - constructor(instructions, signers, feePayer, data) { - this.instructions = instructions; - this.signers = signers; - this.data = data; - this.feePayer = feePayer; - } - submit = async () => { - return Try(async () => { - if (!(this instanceof Mint)) { - throw Error("only MintInstruction object that can use this"); - } - const transaction = new import_web38.Transaction(); - const blockhashObj = await Node.getConnection().getLatestBlockhash(); - transaction.lastValidBlockHeight = blockhashObj.lastValidBlockHeight; - transaction.recentBlockhash = blockhashObj.blockhash; - let finalSigners = this.signers; - if (this.feePayer) { - transaction.feePayer = this.feePayer.publicKey; - finalSigners = [this.feePayer, ...this.signers]; - } - this.instructions.forEach((inst) => transaction.add(inst)); - const options = { - maxRetries: MAX_RETRIES - }; - if (Node.getConnection().rpcEndpoint === Constants.EndPointUrl.prd) { - debugLog("# Change metaplex cluster on mainnet-beta"); - Node.changeConnection({ cluster: Constants.Cluster.prdMetaplex }); - } - return await (0, import_web38.sendAndConfirmTransaction)( - Node.getConnection(), - transaction, - finalSigners, - options - ); - }); - }; - } - TransactionBuilder7.Mint = Mint; -})(TransactionBuilder3 || (TransactionBuilder3 = {})); - -// ../transaction-builder/src/partial-sign.ts -var import_web39 = require("@solana/web3.js"); -var TransactionBuilder4; -((TransactionBuilder7) => { - class PartialSign { - hexInstruction; - data; - canSubmit; - constructor(instructions, mint, canSubmit = false) { - this.hexInstruction = instructions; - this.data = mint; - this.canSubmit = canSubmit; - } - submit = async (feePayer) => { - return Try(async () => { - if (!(this instanceof PartialSign)) { - throw Error("only PartialSignInstruction object that can use this"); - } - const decode = Buffer.from(this.hexInstruction, "hex"); - const transactionFromJson = import_web39.Transaction.from(decode); - transactionFromJson.partialSign(feePayer.toKeypair()); - const options = { - maxRetries: MAX_RETRIES - }; - const wireTransaction = transactionFromJson.serialize(); - return await Node.getConnection().sendRawTransaction( - wireTransaction, - options - ); - }); - }; - } - TransactionBuilder7.PartialSign = PartialSign; -})(TransactionBuilder4 || (TransactionBuilder4 = {})); - -// ../transaction-builder/src/calculate-txsize.ts -var TransactionBuilder5; -((TransactionBuilder7) => { - const LOW_VALUE = 127; - const HIGH_VALUE = 16383; - const MAX_TRANSACTION_SIZE = 1232; - const compactHeader = (n) => n <= LOW_VALUE ? 1 : n <= HIGH_VALUE ? 2 : 3; - const compactArraySize = (n, size) => compactHeader(n) + n * size; - TransactionBuilder7.calculateTxSize = (transaction, feePayer) => { - const feePayerPk = [feePayer.toBase58()]; - const signers = new Set(feePayerPk); - const accounts = new Set(feePayerPk); - const ixsSize = transaction.instructions.reduce((acc, ix) => { - ix.keys.forEach(({ pubkey, isSigner }) => { - const pk = pubkey.toBase58(); - if (isSigner) - signers.add(pk); - accounts.add(pk); - }); - accounts.add(ix.programId.toBase58()); - const nIndexes = ix.keys.length; - const opaqueData = ix.data.length; - return acc + 1 + // PID index - compactArraySize(nIndexes, 1) + compactArraySize(opaqueData, 1); - }, 0); - return compactArraySize(signers.size, 64) + // signatures - 3 + // header - compactArraySize(accounts.size, 32) + // accounts - 32 + // blockhash - compactHeader(transaction.instructions.length) + // instructions - ixsSize; - }; - TransactionBuilder7.isOverTransactionSize = (transaction, feePayer) => { - return (0, TransactionBuilder7.calculateTxSize)(transaction, feePayer) > MAX_TRANSACTION_SIZE; - }; -})(TransactionBuilder5 || (TransactionBuilder5 = {})); - -// ../transaction-builder/src/index.ts -var TransactionBuilder6 = { - ...TransactionBuilder2, - ...TransactionBuilder5, - ...TransactionBuilder3, - ...TransactionBuilder, - ...TransactionBuilder4 -}; - -// src/result.ts -var AbstractResult = class { - unwrap(ok, err) { - const r = this._chain( - (value) => Result.ok(ok ? ok(value) : value), - (error) => err ? Result.ok(err(error)) : Result.err(error) - ); - if (r.isErr) { - throw r.error; - } - return r.value; - } - map(ok, err) { - return this._chain( - (value) => Result.ok(ok(value)), - (error) => Result.err(err ? err(error) : error) - ); - } - chain(ok, err) { - return this._chain(ok, err || ((error) => Result.err(error))); - } - match(ok, err) { - this._chain( - (value) => Result.ok(ok(value)), - (error) => Result.err(err(error)) - ); - } - /// single TransactionBuilder //// - /* eslint-disable @typescript-eslint/no-explicit-any */ - async submit(feePayer) { - const res = this.map( - async (ok) => { - debugLog("# result single submit: ", ok); - if (feePayer) { - const obj = ok; - return await obj.submit(feePayer); - } else { - const obj = ok; - return await obj.submit(); - } - }, - (err) => { - return err; - } - ); - if (res.isErr) { - return Result.err(res.error); - } - return res.value; - } -}; -Array.prototype.submit = async function(feePayer) { - if (feePayer) { - let i = 1; - for await (const obj of this) { - if (obj.isErr) { - return obj; - } else if (obj.value.canSubmit) { - debugLog("# Result batch canSubmit"); - const sig = await obj.submit(feePayer); - if (sig.isErr) { - return sig; - } - await Node.confirmedSig(sig.value); - } else { - debugLog("# Result batch other than canSubmit"); - if (this.length == i) { - return obj.submit(feePayer); - } - obj.submit(feePayer); - } - i++; - } - } else { - const instructions = []; - for (const obj of this) { - if (obj.isErr) { - return obj; - } else if (obj.isOk) { - instructions.push(obj.value); - } else { - return Result.err(Error("Only Array Instruction object")); - } - } - debugLog("# Result batch submit: ", instructions); - return new TransactionBuilder6.Batch().submit(instructions); - } -}; -var InternalOk = class extends AbstractResult { - constructor(value) { - super(); - this.value = value; - } - isOk = true; - isErr = false; - /* eslint-disable @typescript-eslint/no-unused-vars */ - _chain(ok, _err) { - return ok(this.value); - } -}; -var InternalErr = class extends AbstractResult { - constructor(error) { - super(); - this.error = error; - } - isOk = false; - isErr = true; - _chain(_ok, err) { - return err(this.error); - } -}; -var Result; -((Result8) => { - function ok(value) { - return new InternalOk(value); - } - Result8.ok = ok; - function err(error) { - return new InternalErr(error || Error()); - } - Result8.err = err; - function all(obj) { - if (Array.isArray(obj)) { - const resArr = []; - for (const item of obj) { - if (item.isErr) { - return item; - } - resArr.push(item.value); - } - return Result8.ok(resArr); - } - const res = {}; - const keys = Object.keys(obj); - for (const key of keys) { - const item = obj[key]; - if (item.isErr) { - return item; - } - res[key] = item.value; - } - return Result8.ok(res); - } - Result8.all = all; -})(Result || (Result = {})); - -// src/shared.ts -var bufferToArray = (buffer) => { - const nums = []; - for (const byte of buffer) { - nums.push(buffer[byte]); - } - return nums; -}; -var overwriteObject = (object, targets) => { - const that = object; - targets.forEach((target) => { - delete that[target.existsKey]; - that[target.will.key] = target.will.value; - }); - return that; -}; -var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { - if (Constants.isDebugging === "true" || process.env.DEBUG === "true") { - console.log("[DEBUG]", data1, data2, data3, data4); - } -}; -var sleep = async (sec) => { - return new Promise((r) => setTimeout(r, sec * 1e3)); -}; -var isBrowser = () => { - return typeof window !== "undefined" && typeof window.document !== "undefined"; -}; -var isNode = () => { - return typeof process !== "undefined" && process.versions != null && process.versions.node != null; -}; -var isPromise = (obj) => { - return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; -}; -function Try(input, finallyInput) { - try { - const v = input(); - if (isPromise(v)) { - return v.then( - (x) => Result.ok(x), - (err) => Result.err(err) - ); - } else { - return Result.ok(v); - } - } catch (e) { - if (e instanceof Error) { - return Result.err(e); - } - return Result.err(Error(e)); - } finally { - if (finallyInput) { - debugLog("# finally input:", finallyInput); - finallyInput(); - } - } -} -var convertTimestampToDateTime = (created_at) => { - if (created_at) { - return new Date(created_at * 1e3); - } - return; -}; -var unixTimestamp = () => { - return Math.floor((/* @__PURE__ */ new Date()).getTime() / 1e3); -}; - -// ../converter/src/collection.ts -var Converter; -((Converter15) => { - let Collection; - ((Collection2) => { - Collection2.intoInfra = (input) => { - if (!input) { - return null; - } - return { - key: input.toPublicKey(), - verified: false - }; - }; - Collection2.intoUser = (output) => { - if (!output) { - return void 0; - } - return { - address: output.key.toString(), - verified: output.verified - }; - }; - })(Collection = Converter15.Collection || (Converter15.Collection = {})); - let CollectionMint; - ((CollectionMint2) => { - CollectionMint2.intoUser = (output) => { - const res = output.find((value) => { - if (value.group_key === "collection") { - return value.group_value; - } - }); - return res ? res.group_value : ""; - }; - })(CollectionMint = Converter15.CollectionMint || (Converter15.CollectionMint = {})); -})(Converter || (Converter = {})); - -// ../converter/src/creators.ts -var Converter2; -((Converter15) => { - let Creators; - ((Creators2) => { - Creators2.intoInfra = (input) => { - if (!input) { - return null; - } - return input.map((data) => { - return { - address: data.address.toPublicKey(), - share: data.share, - verified: false - }; - }); - }; - Creators2.intoCompressedNftInfra = (input) => { - if (!input) { - return []; - } - return input.map((data) => { - return { - address: data.address.toPublicKey(), - share: data.share, - verified: false - }; - }); - }; - Creators2.intoUser = (output) => { - if (!output) { - return void 0; - } - return output.map((data) => { - return { - address: data.address.toString(), - share: data.share, - verified: data.verified - }; - }); - }; - })(Creators = Converter15.Creators || (Converter15.Creators = {})); -})(Converter2 || (Converter2 = {})); - -// ../converter/src/compressed-nft-metadata.ts -var import_mpl_bubblegum_instruction = require("mpl-bubblegum-instruction"); -var Converter3; -((Converter15) => { - let CompressedNftMetadata; - ((CompressedNftMetadata2) => { - CompressedNftMetadata2.intoInfra = (input, uri, sellerFeeBasisPoints) => { - return { - name: input.name, - symbol: input.symbol, - uri, - sellerFeeBasisPoints, - creators: Converter2.Creators.intoCompressedNftInfra(input.creators), - collection: Converter.Collection.intoInfra(input.collection), - uses: input.uses || null, - primarySaleHappened: false, - isMutable: input.isMutable ?? false, - editionNonce: 0, - tokenStandard: import_mpl_bubblegum_instruction.TokenStandard.NonFungible, - tokenProgramVersion: import_mpl_bubblegum_instruction.TokenProgramVersion.Original - }; - }; - })(CompressedNftMetadata = Converter15.CompressedNftMetadata || (Converter15.CompressedNftMetadata = {})); -})(Converter3 || (Converter3 = {})); - -// ../converter/src/royalty.ts -var Converter4; -((Converter15) => { - let Royalty; - ((Royalty2) => { - Royalty2.THRESHOLD = 100; - Royalty2.intoInfra = (percentage) => { - return percentage * Royalty2.THRESHOLD; - }; - Royalty2.intoUser = (percentage) => { - return percentage * Royalty2.THRESHOLD; - }; - })(Royalty = Converter15.Royalty || (Converter15.Royalty = {})); -})(Converter4 || (Converter4 = {})); - -// ../converter/src/nft.ts -var Converter5; -((Converter15) => { - let Nft; - ((Nft2) => { - Nft2.intoUser = (output) => { - return { - mint: output.onchain.id.toString(), - collectionMint: Converter.CollectionMint.intoUser( - output.onchain.grouping - ), - authorities: output.onchain.authorities, - royalty: Converter4.Royalty.intoUser(output.onchain.royalty.percent), - name: output.onchain.content.metadata.name, - symbol: output.onchain.content.metadata.symbol, - uri: output.onchain.content.json_uri, - creators: Converter2.Creators.intoUser(output.onchain.creators), - treeAddress: output.onchain.compression.tree, - isCompressed: output.onchain.compression.compressed, - isMutable: output.onchain.mutable, - isBurn: output.onchain.burnt, - editionNonce: output.onchain.supply.edition_nonce, - primarySaleHappened: output.onchain.royalty.primary_sale_happened, - dateTime: convertTimestampToDateTime(output.offchain.created_at), - offchain: output.offchain - }; - }; - })(Nft = Converter15.Nft || (Converter15.Nft = {})); -})(Converter5 || (Converter5 = {})); - -// ../converter/src/memo.ts -var Converter6; -((Converter15) => { - let Memo; - ((Memo2) => { - Memo2.intoUserSide = (output, meta, outputTransfer, mappingTokenAccount) => { - const history = {}; - if (outputTransfer && outputTransfer.program !== "") { - if (mappingTokenAccount && outputTransfer.program === "spl-token") { - const foundSource = mappingTokenAccount.find( - (m) => m.account === outputTransfer.parsed.info.source - ); - const foundDest = mappingTokenAccount.find( - (m) => m.account === outputTransfer.parsed.info.destination - ); - history.mint = outputTransfer.parsed.info.mint; - foundSource && (history.source = foundSource.owner); - foundDest && (history.destination = foundDest.owner); - } else { - history.source = outputTransfer.parsed.info.source; - history.destination = outputTransfer.parsed.info.destination; - } - } - history.memo = output.parsed; - history.type = output.program; - history.dateTime = convertTimestampToDateTime(meta.blockTime); - history.sig = meta.transaction.signatures[0]; - history.innerInstruction = false; - if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { - history.innerInstruction = true; - } - return history; - }; - })(Memo = Converter15.Memo || (Converter15.Memo = {})); -})(Converter6 || (Converter6 = {})); - -// ../converter/src/mint.ts -var Converter7; -((Converter15) => { - let Mint; - ((Mint2) => { - Mint2.intoUserSide = (output, meta) => { - const history = {}; - history.mint = output.parsed.info.mint; - history.mintAuthority = output.parsed.info.mintAuthority; - history.tokenAmount = output.parsed.info.tokenAmount; - history.account = output.parsed.info.account; - history.type = output.program; - history.dateTime = convertTimestampToDateTime(meta.blockTime); - history.sig = meta.transaction.signatures[0]; - history.innerInstruction = false; - if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { - history.innerInstruction = true; - } - return history; - }; - })(Mint = Converter15.Mint || (Converter15.Mint = {})); -})(Converter7 || (Converter7 = {})); - -// ../converter/src/regular-nft-metadata.ts -var Converter8; -((Converter15) => { - let RegularNftMetadata; - ((RegularNftMetadata2) => { - RegularNftMetadata2.intoInfra = (input, uri, sellerFeeBasisPoints) => { - return { - name: input.name, - symbol: input.symbol, - uri, - sellerFeeBasisPoints, - creators: Converter2.Creators.intoInfra(input.creators), - collection: Converter.Collection.intoInfra(input.collection), - uses: input.uses || null - }; - }; - })(RegularNftMetadata = Converter15.RegularNftMetadata || (Converter15.RegularNftMetadata = {})); -})(Converter8 || (Converter8 = {})); - -// ../converter/src/properties.ts -var Converter9; -((Converter15) => { - let Properties; - ((Properties2) => { - Properties2.intoInfra = async (input, callbackFunc, storageType, feePayer) => { - if (!input || !input.files) { - return {}; - } - const files = await Promise.all( - input.files.map(async (file) => { - if (!file.filePath) { - return {}; - } - const res = await callbackFunc(file.filePath, storageType, feePayer); - if (res.isErr) { - throw Error(res.error.message); - } - return overwriteObject(file, [ - { - existsKey: "filePath", - will: { key: "uri", value: res.value } - } - ]); - }) - ); - return { ...input, files }; - }; - })(Properties = Converter15.Properties || (Converter15.Properties = {})); -})(Converter9 || (Converter9 = {})); - -// ../converter/src/uses.ts -var Converter10; -((Converter15) => { - let Uses; - ((Uses2) => { - Uses2.intoUserSide = (output) => { - if (!output) { - return void 0; - } - return output; - }; - })(Uses = Converter15.Uses || (Converter15.Uses = {})); -})(Converter10 || (Converter10 = {})); - -// ../converter/src/token-metadata.ts -var Converter11; -((Converter15) => { - let TokenMetadata; - ((TokenMetadata2) => { - TokenMetadata2.intoInfra = (input, uri, sellerFeeBasisPoints) => { - return { - name: input.name, - symbol: input.symbol, - uri, - sellerFeeBasisPoints, - creators: Converter2.Creators.intoInfra(input.creators), - collection: null, - uses: input.uses || null - }; - }; - TokenMetadata2.intoUser = (output, tokenAmount) => { - return { - mint: output.onchain.mint.toString(), - royalty: output.onchain.data.sellerFeeBasisPoints, - name: (0, TokenMetadata2.deleteNullStrings)(output.onchain.data.name), - symbol: (0, TokenMetadata2.deleteNullStrings)(output.onchain.data.symbol), - tokenAmount, - uri: (0, TokenMetadata2.deleteNullStrings)(output.onchain.data.uri), - creators: Converter2.Creators.intoUser(output.onchain.data.creators), - uses: Converter10.Uses.intoUserSide(output.onchain.uses), - dateTime: convertTimestampToDateTime(output.offchain.created_at), - offchain: output.offchain - }; - }; - TokenMetadata2.deleteNullStrings = (str) => { - return str.replace(/\0/g, ""); - }; - })(TokenMetadata = Converter15.TokenMetadata || (Converter15.TokenMetadata = {})); -})(Converter11 || (Converter11 = {})); - -// ../converter/src/transfer-checked.ts -var Converter12; -((Converter15) => { - let TransferChecked; - ((TransferChecked2) => { - TransferChecked2.intoUserSide = (output, meta, mappingTokenAccount) => { - const history = {}; - if (mappingTokenAccount) { - const foundSource = mappingTokenAccount.find( - (m) => m.account === output.parsed.info.source - ); - const foundDest = mappingTokenAccount.find( - (m) => m.account === output.parsed.info.destination - ); - foundSource && (history.source = foundSource.owner); - foundDest && (history.destination = foundDest.owner); - } - history.tokenAmount = output.parsed.info.tokenAmount; - history.mint = output.parsed.info.mint; - history.multisigAuthority = output.parsed.info.multisigAuthority; - history.signers = output.parsed.info.signers; - history.type = output.program; - history.dateTime = convertTimestampToDateTime(meta.blockTime); - history.sig = meta.transaction.signatures[0]; - history.innerInstruction = false; - if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { - history.innerInstruction = true; - } - return history; - }; - })(TransferChecked = Converter15.TransferChecked || (Converter15.TransferChecked = {})); -})(Converter12 || (Converter12 = {})); - -// ../converter/src/transfer.ts -var Converter13; -((Converter15) => { - let Transfer; - ((Transfer2) => { - Transfer2.intoUserSide = (output, meta) => { - const history = {}; - if (!output.parsed.info.destination || !output.parsed.info.lamports) { - return; - } - history.source = output.parsed.info.source; - history.destination = output.parsed.info.destination; - history.sol = output.parsed.info.lamports?.toSol().toString(); - history.type = output.program; - history.dateTime = convertTimestampToDateTime(meta.blockTime); - history.sig = meta.transaction.signatures[0]; - history.innerInstruction = false; - if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { - history.innerInstruction = true; - } - return history; - }; - })(Transfer = Converter15.Transfer || (Converter15.Transfer = {})); -})(Converter13 || (Converter13 = {})); - -// ../converter/src/index.ts -var Converter14 = { - ...Converter3, - ...Converter, - ...Converter2, - ...Converter5, - ...Converter6, - ...Converter7, - ...Converter8, - ...Converter9, - ...Converter4, - ...Converter11, - ...Converter12, - ...Converter13, - ...Converter10 -}; - -// ../validator/src/index.ts -var Validator; -((Validator2) => { - let Message; - ((Message2) => { - Message2.SUCCESS = "success"; - Message2.SMALL_NUMBER = "too small"; - Message2.BIG_NUMBER = "too big"; - Message2.LONG_LENGTH = "too long"; - Message2.EMPTY = "invalid empty value"; - Message2.INVALID_URL = "invalid url"; - Message2.ONLY_NODE_JS = "`string` type is only Node.js"; - })(Message = Validator2.Message || (Validator2.Message = {})); - Validator2.NAME_LENGTH = 32; - Validator2.SYMBOL_LENGTH = 10; - Validator2.URL_LENGTH = 200; - Validator2.ROYALTY_MAX = 100; - Validator2.SELLER_FEE_BASIS_POINTS_MAX = 1e4; - Validator2.ROYALTY_MIN = 0; - Validator2.isRoyalty = (royalty) => { - return Try(() => { - const key = "royalty"; - if (royalty !== 0 && !royalty) { - throw createError(key, Message.EMPTY, royalty); - } - if (royalty < Validator2.ROYALTY_MIN) { - throw createError(key, Message.SMALL_NUMBER, royalty, { - threshold: Validator2.ROYALTY_MIN, - condition: "underMin" - }); - } else if (royalty > Validator2.ROYALTY_MAX) { - throw createError(key, Message.BIG_NUMBER, royalty, { - threshold: Validator2.ROYALTY_MAX, - condition: "overMax" - }); - } - return Message.SUCCESS; - }); - }; - Validator2.isSellerFeeBasisPoints = (royalty) => { - return Try(() => { - const key = "sellerFeeBasisPoints/seller_fee_basis_points"; - if (royalty !== 0 && !royalty) { - throw createError(key, Message.EMPTY, royalty); - } - if (royalty < Validator2.ROYALTY_MIN) { - throw createError(key, Message.SMALL_NUMBER, royalty, { - threshold: Validator2.ROYALTY_MIN, - condition: "underMin" - }); - } else if (royalty > Validator2.ROYALTY_MAX * Converter14.Royalty.THRESHOLD) { - throw createError(key, Message.BIG_NUMBER, royalty, { - threshold: Validator2.SELLER_FEE_BASIS_POINTS_MAX, - condition: "overMax" - }); - } - return Message.SUCCESS; - }); - }; - Validator2.isName = (name) => { - return Try(() => { - const key = "name"; - if (!name) { - throw createError(key, Message.EMPTY, name); - } - if (byteLength(name) > Validator2.NAME_LENGTH) { - throw createError(key, Message.LONG_LENGTH, name, { - threshold: Validator2.NAME_LENGTH, - condition: "overMax" - }); - } - return Message.SUCCESS; - }); - }; - Validator2.isSymbol = (symbol) => { - return Try(() => { - const key = "symbol"; - if (!symbol) { - throw createError(key, Message.EMPTY, symbol); - } - if (byteLength(symbol) > Validator2.SYMBOL_LENGTH) { - throw createError(key, Message.LONG_LENGTH, symbol, { - threshold: Validator2.SYMBOL_LENGTH, - condition: "overMax" - }); - } - return Message.SUCCESS; - }); - }; - Validator2.isImageUrl = (image) => isUriOrImage(image, "image"); - Validator2.checkAll = (metadata) => { - return Try(() => { - const keys = Object.keys(metadata); - const results = []; - keys.map((key) => { - let res; - switch (key) { - case "image": - if (key in metadata && metadata.image) { - res = (0, Validator2.isImageUrl)(metadata.image); - } - break; - case "royalty": - if (key in metadata && metadata.royalty) { - res = (0, Validator2.isRoyalty)(metadata.royalty); - } - break; - case "seller_fee_basis_points": - if (key in metadata && metadata.seller_fee_basis_points) { - res = (0, Validator2.isSellerFeeBasisPoints)(metadata.seller_fee_basis_points); - } - break; - case "sellerFeeBasisPoints": - if (key in metadata) { - res = (0, Validator2.isSellerFeeBasisPoints)(metadata.sellerFeeBasisPoints); - } - break; - case "name": - if (metadata.name) { - res = (0, Validator2.isName)(metadata.name); - } - break; - case "symbol": - if (metadata.symbol) { - res = (0, Validator2.isSymbol)(metadata.symbol); - } - break; - } - if (res && res.isErr) { - results.push(...res.error.details); - } - }); - if (results.length > 0) { - const message = "Caught in the validation errors. see information e.g: err.details"; - throw new ValidatorError(message, results); - } - return Message.SUCCESS; - }); - }; - const byteLength = (value) => { - const text = new TextEncoder(); - return text.encode(value).length; - }; - const createError = (key, message, actual, limit) => { - let error; - if (limit) { - error = new ValidatorError(message, [{ key, message, actual, limit }]); - } else { - error = new ValidatorError(message, [{ key, message, actual }]); - } - return error; - }; - const isUriOrImage = (imageOrUri, key) => { - return Try(() => { - if (!imageOrUri) { - throw createError(key, Message.EMPTY, imageOrUri); - } - if (byteLength(imageOrUri) > Validator2.URL_LENGTH) { - throw createError(key, Message.LONG_LENGTH, imageOrUri, { - threshold: Validator2.URL_LENGTH, - condition: "overMax" - }); - } - if (!/https?:\/\/[-_.!~*\\()a-zA-Z0-9;?:&=+,%#]+/g.test(imageOrUri)) { - throw createError(key, Message.INVALID_URL, imageOrUri); - } - return Message.SUCCESS; - }); - }; -})(Validator || (Validator = {})); -var ValidatorError = class extends Error { - details; - constructor(message, details) { - super(message); - this.details = details; - } -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - Account, - Explorer, - Node, - Try, - Validator, - ValidatorError, - bufferToArray, - convertTimestampToDateTime, - debugLog, - isBrowser, - isNode, - isPromise, - overwriteObject, - sleep, - unixTimestamp -});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gICAgICAgW2FkZHJlc3MudG9QdWJsaWNLZXkoKS50b0J1ZmZlcigpXSxcbiAgICAgICAgTVBMX0JVQkJMRUdVTV9QUk9HUkFNX0lELnRvUHVibGljS2V5KCksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGdldEJndW1TaWduZXIgPSAoKTogUHVibGljS2V5ID0+IHtcbiAgICAgIGNvbnN0IFtwdWJsaWNLZXldID0gUHVibGljS2V5LmZpbmRQcm9ncmFtQWRkcmVzc1N5bmMoXG4gICAgICAgIFtCdWZmZXIuZnJvbSgnY29sbGVjdGlvbl9jcGknLCAndXRmOCcpXSxcbiAgICAgICAgTVBMX0JVQkJMRUdVTV9QUk9HUkFNX0lELnRvUHVibGljS2V5KCksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGdldEFzc2V0SWQgPSAoYWRkcmVzczogUHVia2V5LCBsZWFmSW5kZXg6IG51bWJlcik6IFB1YmtleSA9PiB7XG4gICAgICBjb25zdCBub2RlID0gbmV3IEJOLkJOKGxlYWZJbmRleCk7XG4gICAgICBjb25zdCBbYXNzZXRJZF0gPSBQdWJsaWNLZXkuZmluZFByb2dyYW1BZGRyZXNzU3luYyhcbiAgICAgICAgW1xuICAgICAgICAgIEJ1ZmZlci5mcm9tKCdhc3NldCcsICd1dGY4JyksXG4gICAgICAgICAgYWRkcmVzcy50b1B1YmxpY0tleSgpLnRvQnVmZmVyKCksXG4gICAgICAgICAgVWludDhBcnJheS5mcm9tKG5vZGUudG9BcnJheSgnbGUnLCA4KSksXG4gICAgICAgIF0sXG4gICAgICAgIE1QTF9CVUJCTEVHVU1fUFJPR1JBTV9JRC50b1B1YmxpY0tleSgpLFxuICAgICAgKTtcbiAgICAgIHJldHVybiBhc3NldElkLnRvU3RyaW5nKCk7XG4gICAgfTtcbiAgfVxufVx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TogU3RvcmFnZVR5cGUsXG4gICAgICAgIGZlZVBheWVyPzogU2VjcmV0LFxuICAgICAgKSA9PiBQcm9taXNlPFJlc3VsdDxzdHJpbmcsIEVycm9yPj4sXG4gICAgICBzdG9yYWdlVHlwZTogU3RvcmFnZVR5cGUsXG4gICAgICBmZWVQYXllcj86IFNlY3JldCxcbiAgICApOiBQcm9taXNlPFByb3BlcnRpZXM+ID0+IHtcbiAgICAgIGlmICghaW5wdXQgfHwgIWlucHV0LmZpbGVzKSB7XG4gICAgICAgIHJldHVybiB7fTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgZmlsZXMgPSBhd2FpdCBQcm9taXNlLmFsbChcbiAgICAgICAgaW5wdXQuZmlsZXMubWFwKGFzeW5jIChmaWxlKSA9PiB7XG4gICAgICAgICAgaWYgKCFmaWxlLmZpbGVQYXRoKSB7XG4gICAgICAgICAgICByZXR1cm4ge307XG4gICAgICAgICAgfVxuICAgICAgICAgIGNvbnN0IHJlcyA9IGF3YWl0IGNhbGxiYWNrRnVuYyhmaWxlLmZpbGVQYXRoLCBzdG9yYWdlVHlwZSwgZmVlUGF5ZXIpO1xuICAgICAgICAgIGlmIChyZXMuaXNFcnIpIHtcbiAgICAgICAgICAgIHRocm93IEVycm9yKHJlcy5lcnJvci5tZXNzYWdlKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgcmV0dXJuIG92ZXJ3cml0ZU9iamVjdChmaWxlLCBbXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGV4aXN0c0tleTogJ2ZpbGVQYXRoJyxcbiAgICAgICAgICAgICAgd2lsbDogeyBrZXk6ICd1cmknLCB2YWx1ZTogcmVzLnZhbHVlIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgIF0pO1xuICAgICAgICB9KSxcbiAgICAgICk7XG4gICAgICByZXR1cm4geyAuLi5pbnB1dCwgZmlsZXMgfSBhcyBQcm9wZXJ0aWVzO1xuICAgIH07XG4gIH1cbn1cbiIsICIvKiBlc2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9IE9iamVjdC5rZXlzKG1ldGFkYXRhKTtcbiAgICAgIGNvbnN0IHJlc3VsdHM6IERldGFpbHNbXSA9IFtdO1xuICAgICAga2V5cy5tYXAoKGtleSkgPT4ge1xuICAgICAgICBsZXQgcmVzITogUmVzdWx0PHN0cmluZywgVmFsaWRhdG9yRXJyb3I+O1xuICAgICAgICBzd2l0Y2ggKGtleSkge1xuICAgICAgICAgIGNhc2UgJ2ltYWdlJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuaW1hZ2UpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNJbWFnZVVybChtZXRhZGF0YS5pbWFnZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdyb3lhbHR5JzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEucm95YWx0eSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1JveWFsdHkobWV0YWRhdGEucm95YWx0eSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhL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IsICJNZXNzYWdlIiwgIkNvbnZlcnRlciJdCn0K \ No newline at end of file diff --git a/packages/suite-utils/dist/exports.mjs b/packages/suite-utils/dist/exports.mjs deleted file mode 100644 index 14fc310db..000000000 --- a/packages/suite-utils/dist/exports.mjs +++ /dev/null @@ -1,1445 +0,0 @@ -// src/constants.ts -import { PublicKey } from "@solana/web3.js"; -import SolanaJsonConfig from "@solana-suite/config/load"; -var Config = SolanaJsonConfig; -var Constants; -((Constants2) => { - let WarnningMessage; - ((WarnningMessage2) => { - const THRESHHOLD = 50; - let isDisplay = false; - WarnningMessage2.NFT_STORAGE_API_KEY = ` - [YOU HAVE TO DO] - -------------------------------------- - You need to update nftStorageApiKey define parameter in solana-suite.json. - Can get api key from https://nft.storage/ - -------------------------------------- - `; - WarnningMessage2.DAS_API_URL = ` - [YOU HAVE TO DO] - -------------------------------------- - You need to update dasApiUrl define parameter in solana-suite.json. - can get api url from https://www.helius.dev/ - -------------------------------------- - `; - WarnningMessage2.ANNOUNCE = ` - [DEPRECATED] - -------------------------------------- - Account, Node, toExplorer, Pubkey, Secret have been moved to - @solana-suite/utils - ------------------------------------- - `; - WarnningMessage2.calculateProbability = () => { - const randomValue = Math.random(); - const probability = 1 / THRESHHOLD; - if (!isDisplay && randomValue < probability) { - isDisplay = true; - return true; - } - return false; - }; - })(WarnningMessage = Constants2.WarnningMessage || (Constants2.WarnningMessage = {})); -})(Constants || (Constants = {})); -((Constants2) => { - Constants2.currentCluster = Config.cluster.type; - Constants2.customClusterUrl = Config.cluster.customClusterUrl; - Constants2.isDebugging = Config.debugging; - Constants2.nftStorageApiKey = Config.nftStorageApiKey; - Constants2.dasApiUrl = Config.dasApiUrl; - let Cluster; - ((Cluster2) => { - Cluster2["prd"] = "mainnet-beta"; - Cluster2["prdMetaplex"] = "mainnet-beta-metaplex"; - Cluster2["dev"] = "devnet"; - Cluster2["test"] = "testnet"; - Cluster2["localhost"] = "localhost-devnet"; - })(Cluster = Constants2.Cluster || (Constants2.Cluster = {})); - let EndPointUrl; - ((EndPointUrl2) => { - EndPointUrl2["prd"] = "https://api.mainnet-beta.solana.com"; - EndPointUrl2["prdMetaplex"] = "https://api.metaplex.solana.com"; - EndPointUrl2["dev"] = "https://api.devnet.solana.com"; - EndPointUrl2["test"] = "https://api.testnet.solana.com"; - EndPointUrl2["localhost"] = "http://api.devnet.solana.com"; - })(EndPointUrl = Constants2.EndPointUrl || (Constants2.EndPointUrl = {})); - let BundlrUrl; - ((BundlrUrl2) => { - BundlrUrl2["prd"] = "https://node1.irys.xyz,https://node2.irys.xyz"; - BundlrUrl2["dev"] = "https://devnet.irys.xyz"; - })(BundlrUrl = Constants2.BundlrUrl || (Constants2.BundlrUrl = {})); - let DasApiUrl; - ((DasApiUrl2) => { - DasApiUrl2["dev"] = "https://devnet.helius-rpc.com/?api-key=15319bf4-5b40-4958-ac8d-6313aa55eb92,https://rpc-devnet.helius.xyz?api-key=9f70a843-3274-4ffd-a0a9-323f8b7c0639"; - })(DasApiUrl = Constants2.DasApiUrl || (Constants2.DasApiUrl = {})); - let NftstorageApiKey; - ((NftstorageApiKey2) => { - NftstorageApiKey2["dev"] = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJkaWQ6ZXRocjoweERGMjcyN2VkODZhRGU1RTMyZDZDZEJlODc0YzRFNDlEODY1OWZmOEMiLCJpc3MiOiJuZnQtc3RvcmFnZSIsImlhdCI6MTYyMDI2NDk0MzcwNiwibmFtZSI6ImRlbW8ifQ.d4J70mikxRB8a5vwNu6SO5HDA8JaueuseAj7Q_ytMCE"; - })(NftstorageApiKey = Constants2.NftstorageApiKey || (Constants2.NftstorageApiKey = {})); - Constants2.loadConfig = async () => { - Config = await import("@solana-suite/config/load"); - }; - Constants2.switchCluster = (param) => { - const { cluster: env, customClusterUrl: customClusterUrl2 } = param; - if (customClusterUrl2 && customClusterUrl2.length > 0) { - const index = Date.now() % customClusterUrl2.length; - return customClusterUrl2[index]; - } - switch (env) { - case "mainnet-beta" /* prd */: - return "https://api.mainnet-beta.solana.com" /* prd */; - case "mainnet-beta-metaplex" /* prdMetaplex */: - return "https://api.metaplex.solana.com" /* prdMetaplex */; - case "testnet" /* test */: - return "https://api.testnet.solana.com" /* test */; - case "devnet" /* dev */: - return "https://api.devnet.solana.com" /* dev */; - default: - return "http://api.devnet.solana.com" /* localhost */; - } - }; - Constants2.switchBundlr = (env) => { - switch (env) { - case "mainnet-beta" /* prd */: { - const urls = "https://node1.irys.xyz,https://node2.irys.xyz" /* prd */.split(","); - const index = Date.now() % urls.length; - return urls[index]; - } - default: { - return "https://devnet.irys.xyz" /* dev */; - } - } - }; - Constants2.switchDasApi = (env) => { - switch (env) { - case "mainnet-beta" /* prd */: { - if (Constants2.dasApiUrl.length < 1) { - throw Error(Constants2.WarnningMessage.DAS_API_URL); - } - const urls = "https://node1.irys.xyz,https://node2.irys.xyz" /* prd */.split(","); - const index = Date.now() % urls.length; - return urls[index]; - } - default: { - const urls = "https://devnet.helius-rpc.com/?api-key=15319bf4-5b40-4958-ac8d-6313aa55eb92,https://rpc-devnet.helius.xyz?api-key=9f70a843-3274-4ffd-a0a9-323f8b7c0639" /* dev */.split(","); - const index = Date.now() % urls.length; - return urls[index]; - } - } - }; - Constants2.switchNftStorage = (env) => { - switch (env) { - case "mainnet-beta" /* prd */: - if (!Constants2.nftStorageApiKey) { - throw Error(Constants2.WarnningMessage.NFT_STORAGE_API_KEY); - } - return Constants2.nftStorageApiKey; - default: { - return "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJkaWQ6ZXRocjoweERGMjcyN2VkODZhRGU1RTMyZDZDZEJlODc0YzRFNDlEODY1OWZmOEMiLCJpc3MiOiJuZnQtc3RvcmFnZSIsImlhdCI6MTYyMDI2NDk0MzcwNiwibmFtZSI6ImRlbW8ifQ.d4J70mikxRB8a5vwNu6SO5HDA8JaueuseAj7Q_ytMCE" /* dev */; - } - } - }; - Constants2.WRAPPED_TOKEN_PROGRAM_ID = new PublicKey( - "So11111111111111111111111111111111111111112" - ); - Constants2.MEMO_PROGRAM_ID = new PublicKey( - "Memo1UhkJRfHyvLMcVucJwxXeuD728EqVDDwQDxFMNo" - ); - Constants2.METAPLEX_PROGRAM_ID = new PublicKey( - "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s" - ); - Constants2.COMMITMENT = "confirmed"; - Constants2.NFT_STORAGE_GATEWAY_URL = "https://ipfs.io/ipfs"; - Constants2.IRYS_GATEWAY_URL = "https://gateway.irys.xyz"; - Constants2.BUNDLR_NETWORK_URL = (0, Constants2.switchBundlr)(Config.cluster.type); - Constants2.DAS_API_URL = (0, Constants2.switchDasApi)(Config.cluster.type); - Constants2.NFT_STORAGE_API_KEY = (0, Constants2.switchNftStorage)(Config.cluster.type); - Constants2.EXPLORER_SOLSCAN_URL = "https://solscan.io"; - Constants2.EXPLORER_SOLANAFM_URL = "https://solana.fm"; - Constants2.EXPLORER_XRAY_URL = "https://xray.helius.xyz"; -})(Constants || (Constants = {})); -console.log(Constants.WarnningMessage.ANNOUNCE); - -// ../transaction-builder/src/batch.ts -import { - sendAndConfirmTransaction as sendAndConfirmTransaction2, - Transaction as Transaction2 -} from "@solana/web3.js"; - -// ../types/src/global/index.ts -var Explorer = /* @__PURE__ */ ((Explorer2) => { - Explorer2["Solscan"] = "solscan"; - Explorer2["SolanaFM"] = "solanafm"; - Explorer2["Xray"] = "xray"; - return Explorer2; -})(Explorer || {}); - -// ../global/src/index.ts -import { Keypair, LAMPORTS_PER_SOL, PublicKey as PublicKey4 } from "@solana/web3.js"; - -// ../account/src/keypair.ts -import { Keypair as Original, PublicKey as PublicKey2 } from "@solana/web3.js"; -import bs from "bs58"; -var Account; -((Account4) => { - class Keypair4 { - secret; - pubkey; - constructor(params) { - if (!params.pubkey) { - const keypair = params.secret.toKeypair(); - this.pubkey = keypair.publicKey.toString(); - } else { - this.pubkey = params.pubkey; - } - this.secret = params.secret; - } - toPublicKey() { - return new PublicKey2(this.pubkey); - } - toKeypair() { - const decoded = bs.decode(this.secret); - return Original.fromSecretKey(decoded); - } - static isPubkey = (value) => /^[0-9a-zA-Z]{32,44}$/.test(value); - static isSecret = (value) => /^[0-9a-zA-Z]{87,88}$/.test(value); - static create = () => { - const keypair = Original.generate(); - return new Keypair4({ - pubkey: keypair.publicKey.toString(), - secret: bs.encode(keypair.secretKey) - }); - }; - static toKeyPair = (keypair) => { - return new Keypair4({ - pubkey: keypair.publicKey.toString(), - secret: bs.encode(keypair.secretKey) - }); - }; - } - Account4.Keypair = Keypair4; -})(Account || (Account = {})); - -// ../account/src/pda.ts -import { PublicKey as PublicKey3 } from "@solana/web3.js"; -import { PROGRAM_ID } from "@metaplex-foundation/mpl-token-metadata"; -import { MPL_BUBBLEGUM_PROGRAM_ID } from "@metaplex-foundation/mpl-bubblegum"; -import BN from "bn.js"; -var Account2; -((Account4) => { - let Pda; - ((Pda2) => { - Pda2.getMetadata = (address) => { - const [publicKey] = PublicKey3.findProgramAddressSync( - [ - Buffer.from("metadata"), - PROGRAM_ID.toBuffer(), - address.toPublicKey().toBuffer() - ], - PROGRAM_ID - ); - return publicKey; - }; - Pda2.getMasterEdition = (address) => { - const [publicKey] = PublicKey3.findProgramAddressSync( - [ - Buffer.from("metadata"), - PROGRAM_ID.toBuffer(), - address.toPublicKey().toBuffer(), - Buffer.from("edition") - ], - PROGRAM_ID - ); - return publicKey; - }; - Pda2.getTreeAuthority = (address) => { - const [publicKey] = PublicKey3.findProgramAddressSync( - [address.toPublicKey().toBuffer()], - MPL_BUBBLEGUM_PROGRAM_ID.toPublicKey() - ); - return publicKey; - }; - Pda2.getBgumSigner = () => { - const [publicKey] = PublicKey3.findProgramAddressSync( - [Buffer.from("collection_cpi", "utf8")], - MPL_BUBBLEGUM_PROGRAM_ID.toPublicKey() - ); - return publicKey; - }; - Pda2.getAssetId = (address, leafIndex) => { - const node = new BN.BN(leafIndex); - const [assetId] = PublicKey3.findProgramAddressSync( - [ - Buffer.from("asset", "utf8"), - address.toPublicKey().toBuffer(), - Uint8Array.from(node.toArray("le", 8)) - ], - MPL_BUBBLEGUM_PROGRAM_ID.toPublicKey() - ); - return assetId.toString(); - }; - })(Pda = Account4.Pda || (Account4.Pda = {})); -})(Account2 || (Account2 = {})); - -// ../account/src/index.ts -var Account3 = { - ...Account, - ...Account2 -}; - -// ../global/src/index.ts -import { BigNumber } from "bignumber.js"; -import bs2 from "bs58"; -String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, options = {}) { - const endPointUrl = Node.getConnection().rpcEndpoint; - debugLog("# toExplorerUrl rpcEndpoint:", endPointUrl); - let cluster = ""; - if (endPointUrl === Constants.EndPointUrl.prd) { - cluster = Constants.Cluster.prd; - } else if (endPointUrl === Constants.EndPointUrl.test) { - cluster = Constants.Cluster.test; - } else if (endPointUrl === Constants.EndPointUrl.dev) { - cluster = Constants.Cluster.dev; - } else { - cluster = Constants.Cluster.dev; - } - const addressOrSignature = this.toString(); - let url = ""; - if (options.replacePath) { - if (explorer === "solanafm" /* SolanaFM */) { - url = `${Constants.EXPLORER_SOLANAFM_URL}/${options.replacePath}/${addressOrSignature}?cluster=${cluster}`; - } else if (explorer === "xray" /* Xray */) { - url = `${Constants.EXPLORER_XRAY_URL}/${options.replacePath}/${addressOrSignature}?network=${cluster}`; - } else { - url = `${Constants.EXPLORER_SOLSCAN_URL}/${options.replacePath}/${addressOrSignature}?cluster=${cluster}`; - } - return url; - } - if (Account3.Keypair.isPubkey(addressOrSignature)) { - if (explorer === "solanafm" /* SolanaFM */) { - url = `${Constants.EXPLORER_SOLANAFM_URL}/address/${addressOrSignature}?cluster=${cluster}`; - } else if (explorer === "xray" /* Xray */) { - url = `${Constants.EXPLORER_XRAY_URL}/account/${addressOrSignature}?network=${cluster}`; - } else { - url = `${Constants.EXPLORER_SOLSCAN_URL}/account/${addressOrSignature}?cluster=${cluster}`; - } - } else { - if (explorer === "solanafm" /* SolanaFM */) { - url = `${Constants.EXPLORER_SOLANAFM_URL}/tx/${addressOrSignature}?cluster=${cluster}`; - } else if (explorer === "xray" /* Xray */) { - url = `${Constants.EXPLORER_XRAY_URL}/tx/${addressOrSignature}?network=${cluster}`; - } else { - url = `${Constants.EXPLORER_SOLSCAN_URL}/tx/${addressOrSignature}?cluster=${cluster}`; - } - } - return url; -}; -String.prototype.toPublicKey = function() { - if (!Account3.Keypair.isPubkey(this.toString())) { - throw Error(`No match KeyPair.PubKey: ${this.toString()}`); - } - return new PublicKey4(this.toString()); -}; -String.prototype.toKeypair = function() { - if (!Account3.Keypair.isSecret(this.toString())) { - throw Error(`No match KeyPair.Secret: ${this.toString()}`); - } - const decoded = bs2.decode(this.toString()); - return Keypair.fromSecretKey(decoded); -}; -Number.prototype.toSol = function() { - return BigNumber(this).div(LAMPORTS_PER_SOL).toNumber(); -}; -Number.prototype.toLamports = function() { - return BigNumber(this).times(LAMPORTS_PER_SOL).toNumber(); -}; - -// ../node/src/index.ts -import { Connection } from "@solana/web3.js"; -var Node; -((Node2) => { - const setted = { - clusterUrl: "", - commitment: Constants.COMMITMENT, - customClusterUrl: [] - }; - Node2.getConnection = () => { - if (setted.customClusterUrl.length > 0) { - setted.clusterUrl = Constants.switchCluster({ - customClusterUrl: setted.customClusterUrl - }); - } else if (Constants.customClusterUrl.length > 0) { - setted.clusterUrl = Constants.switchCluster({ - customClusterUrl: Constants.customClusterUrl - }); - } else if (!setted.clusterUrl) { - setted.clusterUrl = Constants.switchCluster({ - cluster: Constants.currentCluster - }); - } - if (!setted.commitment) { - setted.commitment = Constants.COMMITMENT; - } - return new Connection(setted.clusterUrl, setted.commitment); - }; - Node2.changeConnection = (param) => { - setted.clusterUrl = ""; - setted.customClusterUrl = []; - setted.commitment = Constants.COMMITMENT; - const { cluster, commitment, customClusterUrl } = param; - if (commitment) { - setted.commitment = commitment; - debugLog("# Node change commitment: ", setted.commitment); - } - if (cluster) { - setted.clusterUrl = Constants.switchCluster({ cluster }); - debugLog("# Node change clusterUrl: ", setted.clusterUrl); - } - if (customClusterUrl) { - debugLog("# customClusterUrl: ", customClusterUrl); - setted.clusterUrl = Constants.switchCluster({ customClusterUrl }); - setted.customClusterUrl = customClusterUrl; - debugLog( - "# Node change cluster, custom cluster url: ", - setted.clusterUrl - ); - } - }; - Node2.confirmedSig = async (signature, commitment = Constants.COMMITMENT) => { - const connection = Node2.getConnection(); - const latestBlockhash = await connection.getLatestBlockhash(); - return await connection.confirmTransaction( - { - blockhash: latestBlockhash.blockhash, - lastValidBlockHeight: latestBlockhash.lastValidBlockHeight, - signature - }, - commitment - ).then(Result.ok).catch(Result.err); - }; -})(Node || (Node = {})); - -// ../transaction-builder/src/common.ts -import { - sendAndConfirmTransaction, - Transaction -} from "@solana/web3.js"; -var MAX_RETRIES = 3; -var TransactionBuilder; -((TransactionBuilder7) => { - class Common2 { - static MAX_TRANSACTION_SIZE = 1232; - instructions; - signers; - feePayer; - data; - constructor(instructions, signers, feePayer, data) { - this.instructions = instructions; - this.signers = signers; - this.feePayer = feePayer; - this.data = data; - } - submit = async () => { - return Try(async () => { - if (!(this instanceof Common2)) { - throw Error("only Instruction object that can use this"); - } - const transaction = new Transaction(); - const blockhashObj = await Node.getConnection().getLatestBlockhash(); - transaction.lastValidBlockHeight = blockhashObj.lastValidBlockHeight; - transaction.recentBlockhash = blockhashObj.blockhash; - let finalSigners = this.signers; - if (this.feePayer) { - transaction.feePayer = this.feePayer.publicKey; - finalSigners = [this.feePayer, ...this.signers]; - } - this.instructions.forEach((inst) => transaction.add(inst)); - const options = { - maxRetries: MAX_RETRIES - }; - return await sendAndConfirmTransaction( - Node.getConnection(), - transaction, - finalSigners, - options - ); - }); - }; - } - TransactionBuilder7.Common = Common2; -})(TransactionBuilder || (TransactionBuilder = {})); - -// ../transaction-builder/src/batch.ts -var TransactionBuilder2; -((TransactionBuilder7) => { - class Batch { - submit = async (arr) => { - return Try(async () => { - let i = 0; - for (const a of arr) { - if (!a.instructions && !a.signers) { - throw Error( - `only Instruction object that can use batchSubmit(). - Index: ${i}, Set value: ${JSON.stringify(a)}` - ); - } - i++; - } - const instructions = arr.flatMap((a) => a.instructions); - const signers = arr.flatMap((a) => a.signers); - const feePayers = arr.filter((a) => a.feePayer !== void 0); - let feePayer = signers[0]; - if (feePayers.length > 0 && feePayers[0].feePayer) { - feePayer = feePayers[0].feePayer; - } - const transaction = new Transaction2(); - let finalSigners = signers; - if (feePayer) { - transaction.feePayer = feePayer.publicKey; - finalSigners = [feePayer, ...signers]; - } - instructions.map((inst) => transaction.add(inst)); - const options = { - maxRetries: MAX_RETRIES - }; - return await sendAndConfirmTransaction2( - Node.getConnection(), - transaction, - finalSigners, - options - ); - }); - }; - } - TransactionBuilder7.Batch = Batch; -})(TransactionBuilder2 || (TransactionBuilder2 = {})); - -// ../transaction-builder/src/mint.ts -import { - sendAndConfirmTransaction as sendAndConfirmTransaction3, - Transaction as Transaction3 -} from "@solana/web3.js"; -var TransactionBuilder3; -((TransactionBuilder7) => { - class Mint { - instructions; - signers; - feePayer; - data; - constructor(instructions, signers, feePayer, data) { - this.instructions = instructions; - this.signers = signers; - this.data = data; - this.feePayer = feePayer; - } - submit = async () => { - return Try(async () => { - if (!(this instanceof Mint)) { - throw Error("only MintInstruction object that can use this"); - } - const transaction = new Transaction3(); - const blockhashObj = await Node.getConnection().getLatestBlockhash(); - transaction.lastValidBlockHeight = blockhashObj.lastValidBlockHeight; - transaction.recentBlockhash = blockhashObj.blockhash; - let finalSigners = this.signers; - if (this.feePayer) { - transaction.feePayer = this.feePayer.publicKey; - finalSigners = [this.feePayer, ...this.signers]; - } - this.instructions.forEach((inst) => transaction.add(inst)); - const options = { - maxRetries: MAX_RETRIES - }; - if (Node.getConnection().rpcEndpoint === Constants.EndPointUrl.prd) { - debugLog("# Change metaplex cluster on mainnet-beta"); - Node.changeConnection({ cluster: Constants.Cluster.prdMetaplex }); - } - return await sendAndConfirmTransaction3( - Node.getConnection(), - transaction, - finalSigners, - options - ); - }); - }; - } - TransactionBuilder7.Mint = Mint; -})(TransactionBuilder3 || (TransactionBuilder3 = {})); - -// ../transaction-builder/src/partial-sign.ts -import { - Transaction as Transaction4 -} from "@solana/web3.js"; -var TransactionBuilder4; -((TransactionBuilder7) => { - class PartialSign { - hexInstruction; - data; - canSubmit; - constructor(instructions, mint, canSubmit = false) { - this.hexInstruction = instructions; - this.data = mint; - this.canSubmit = canSubmit; - } - submit = async (feePayer) => { - return Try(async () => { - if (!(this instanceof PartialSign)) { - throw Error("only PartialSignInstruction object that can use this"); - } - const decode = Buffer.from(this.hexInstruction, "hex"); - const transactionFromJson = Transaction4.from(decode); - transactionFromJson.partialSign(feePayer.toKeypair()); - const options = { - maxRetries: MAX_RETRIES - }; - const wireTransaction = transactionFromJson.serialize(); - return await Node.getConnection().sendRawTransaction( - wireTransaction, - options - ); - }); - }; - } - TransactionBuilder7.PartialSign = PartialSign; -})(TransactionBuilder4 || (TransactionBuilder4 = {})); - -// ../transaction-builder/src/calculate-txsize.ts -var TransactionBuilder5; -((TransactionBuilder7) => { - const LOW_VALUE = 127; - const HIGH_VALUE = 16383; - const MAX_TRANSACTION_SIZE = 1232; - const compactHeader = (n) => n <= LOW_VALUE ? 1 : n <= HIGH_VALUE ? 2 : 3; - const compactArraySize = (n, size) => compactHeader(n) + n * size; - TransactionBuilder7.calculateTxSize = (transaction, feePayer) => { - const feePayerPk = [feePayer.toBase58()]; - const signers = new Set(feePayerPk); - const accounts = new Set(feePayerPk); - const ixsSize = transaction.instructions.reduce((acc, ix) => { - ix.keys.forEach(({ pubkey, isSigner }) => { - const pk = pubkey.toBase58(); - if (isSigner) - signers.add(pk); - accounts.add(pk); - }); - accounts.add(ix.programId.toBase58()); - const nIndexes = ix.keys.length; - const opaqueData = ix.data.length; - return acc + 1 + // PID index - compactArraySize(nIndexes, 1) + compactArraySize(opaqueData, 1); - }, 0); - return compactArraySize(signers.size, 64) + // signatures - 3 + // header - compactArraySize(accounts.size, 32) + // accounts - 32 + // blockhash - compactHeader(transaction.instructions.length) + // instructions - ixsSize; - }; - TransactionBuilder7.isOverTransactionSize = (transaction, feePayer) => { - return (0, TransactionBuilder7.calculateTxSize)(transaction, feePayer) > MAX_TRANSACTION_SIZE; - }; -})(TransactionBuilder5 || (TransactionBuilder5 = {})); - -// ../transaction-builder/src/index.ts -var TransactionBuilder6 = { - ...TransactionBuilder2, - ...TransactionBuilder5, - ...TransactionBuilder3, - ...TransactionBuilder, - ...TransactionBuilder4 -}; - -// src/result.ts -var AbstractResult = class { - unwrap(ok, err) { - const r = this._chain( - (value) => Result.ok(ok ? ok(value) : value), - (error) => err ? Result.ok(err(error)) : Result.err(error) - ); - if (r.isErr) { - throw r.error; - } - return r.value; - } - map(ok, err) { - return this._chain( - (value) => Result.ok(ok(value)), - (error) => Result.err(err ? err(error) : error) - ); - } - chain(ok, err) { - return this._chain(ok, err || ((error) => Result.err(error))); - } - match(ok, err) { - this._chain( - (value) => Result.ok(ok(value)), - (error) => Result.err(err(error)) - ); - } - /// single TransactionBuilder //// - /* eslint-disable @typescript-eslint/no-explicit-any */ - async submit(feePayer) { - const res = this.map( - async (ok) => { - debugLog("# result single submit: ", ok); - if (feePayer) { - const obj = ok; - return await obj.submit(feePayer); - } else { - const obj = ok; - return await obj.submit(); - } - }, - (err) => { - return err; - } - ); - if (res.isErr) { - return Result.err(res.error); - } - return res.value; - } -}; -Array.prototype.submit = async function(feePayer) { - if (feePayer) { - let i = 1; - for await (const obj of this) { - if (obj.isErr) { - return obj; - } else if (obj.value.canSubmit) { - debugLog("# Result batch canSubmit"); - const sig = await obj.submit(feePayer); - if (sig.isErr) { - return sig; - } - await Node.confirmedSig(sig.value); - } else { - debugLog("# Result batch other than canSubmit"); - if (this.length == i) { - return obj.submit(feePayer); - } - obj.submit(feePayer); - } - i++; - } - } else { - const instructions = []; - for (const obj of this) { - if (obj.isErr) { - return obj; - } else if (obj.isOk) { - instructions.push(obj.value); - } else { - return Result.err(Error("Only Array Instruction object")); - } - } - debugLog("# Result batch submit: ", instructions); - return new TransactionBuilder6.Batch().submit(instructions); - } -}; -var InternalOk = class extends AbstractResult { - constructor(value) { - super(); - this.value = value; - } - isOk = true; - isErr = false; - /* eslint-disable @typescript-eslint/no-unused-vars */ - _chain(ok, _err) { - return ok(this.value); - } -}; -var InternalErr = class extends AbstractResult { - constructor(error) { - super(); - this.error = error; - } - isOk = false; - isErr = true; - _chain(_ok, err) { - return err(this.error); - } -}; -var Result; -((Result8) => { - function ok(value) { - return new InternalOk(value); - } - Result8.ok = ok; - function err(error) { - return new InternalErr(error || Error()); - } - Result8.err = err; - function all(obj) { - if (Array.isArray(obj)) { - const resArr = []; - for (const item of obj) { - if (item.isErr) { - return item; - } - resArr.push(item.value); - } - return Result8.ok(resArr); - } - const res = {}; - const keys = Object.keys(obj); - for (const key of keys) { - const item = obj[key]; - if (item.isErr) { - return item; - } - res[key] = item.value; - } - return Result8.ok(res); - } - Result8.all = all; -})(Result || (Result = {})); - -// src/shared.ts -var bufferToArray = (buffer) => { - const nums = []; - for (const byte of buffer) { - nums.push(buffer[byte]); - } - return nums; -}; -var overwriteObject = (object, targets) => { - const that = object; - targets.forEach((target) => { - delete that[target.existsKey]; - that[target.will.key] = target.will.value; - }); - return that; -}; -var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { - if (Constants.isDebugging === "true" || process.env.DEBUG === "true") { - console.log("[DEBUG]", data1, data2, data3, data4); - } -}; -var sleep = async (sec) => { - return new Promise((r) => setTimeout(r, sec * 1e3)); -}; -var isBrowser = () => { - return typeof window !== "undefined" && typeof window.document !== "undefined"; -}; -var isNode = () => { - return typeof process !== "undefined" && process.versions != null && process.versions.node != null; -}; -var isPromise = (obj) => { - return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; -}; -function Try(input, finallyInput) { - try { - const v = input(); - if (isPromise(v)) { - return v.then( - (x) => Result.ok(x), - (err) => Result.err(err) - ); - } else { - return Result.ok(v); - } - } catch (e) { - if (e instanceof Error) { - return Result.err(e); - } - return Result.err(Error(e)); - } finally { - if (finallyInput) { - debugLog("# finally input:", finallyInput); - finallyInput(); - } - } -} -var convertTimestampToDateTime = (created_at) => { - if (created_at) { - return new Date(created_at * 1e3); - } - return; -}; -var unixTimestamp = () => { - return Math.floor((/* @__PURE__ */ new Date()).getTime() / 1e3); -}; - -// ../converter/src/collection.ts -var Converter; -((Converter15) => { - let Collection; - ((Collection2) => { - Collection2.intoInfra = (input) => { - if (!input) { - return null; - } - return { - key: input.toPublicKey(), - verified: false - }; - }; - Collection2.intoUser = (output) => { - if (!output) { - return void 0; - } - return { - address: output.key.toString(), - verified: output.verified - }; - }; - })(Collection = Converter15.Collection || (Converter15.Collection = {})); - let CollectionMint; - ((CollectionMint2) => { - CollectionMint2.intoUser = (output) => { - const res = output.find((value) => { - if (value.group_key === "collection") { - return value.group_value; - } - }); - return res ? res.group_value : ""; - }; - })(CollectionMint = Converter15.CollectionMint || (Converter15.CollectionMint = {})); -})(Converter || (Converter = {})); - -// ../converter/src/creators.ts -var Converter2; -((Converter15) => { - let Creators; - ((Creators2) => { - Creators2.intoInfra = (input) => { - if (!input) { - return null; - } - return input.map((data) => { - return { - address: data.address.toPublicKey(), - share: data.share, - verified: false - }; - }); - }; - Creators2.intoCompressedNftInfra = (input) => { - if (!input) { - return []; - } - return input.map((data) => { - return { - address: data.address.toPublicKey(), - share: data.share, - verified: false - }; - }); - }; - Creators2.intoUser = (output) => { - if (!output) { - return void 0; - } - return output.map((data) => { - return { - address: data.address.toString(), - share: data.share, - verified: data.verified - }; - }); - }; - })(Creators = Converter15.Creators || (Converter15.Creators = {})); -})(Converter2 || (Converter2 = {})); - -// ../converter/src/compressed-nft-metadata.ts -import { - TokenProgramVersion, - TokenStandard -} from "mpl-bubblegum-instruction"; -var Converter3; -((Converter15) => { - let CompressedNftMetadata; - ((CompressedNftMetadata2) => { - CompressedNftMetadata2.intoInfra = (input, uri, sellerFeeBasisPoints) => { - return { - name: input.name, - symbol: input.symbol, - uri, - sellerFeeBasisPoints, - creators: Converter2.Creators.intoCompressedNftInfra(input.creators), - collection: Converter.Collection.intoInfra(input.collection), - uses: input.uses || null, - primarySaleHappened: false, - isMutable: input.isMutable ?? false, - editionNonce: 0, - tokenStandard: TokenStandard.NonFungible, - tokenProgramVersion: TokenProgramVersion.Original - }; - }; - })(CompressedNftMetadata = Converter15.CompressedNftMetadata || (Converter15.CompressedNftMetadata = {})); -})(Converter3 || (Converter3 = {})); - -// ../converter/src/royalty.ts -var Converter4; -((Converter15) => { - let Royalty; - ((Royalty2) => { - Royalty2.THRESHOLD = 100; - Royalty2.intoInfra = (percentage) => { - return percentage * Royalty2.THRESHOLD; - }; - Royalty2.intoUser = (percentage) => { - return percentage * Royalty2.THRESHOLD; - }; - })(Royalty = Converter15.Royalty || (Converter15.Royalty = {})); -})(Converter4 || (Converter4 = {})); - -// ../converter/src/nft.ts -var Converter5; -((Converter15) => { - let Nft; - ((Nft2) => { - Nft2.intoUser = (output) => { - return { - mint: output.onchain.id.toString(), - collectionMint: Converter.CollectionMint.intoUser( - output.onchain.grouping - ), - authorities: output.onchain.authorities, - royalty: Converter4.Royalty.intoUser(output.onchain.royalty.percent), - name: output.onchain.content.metadata.name, - symbol: output.onchain.content.metadata.symbol, - uri: output.onchain.content.json_uri, - creators: Converter2.Creators.intoUser(output.onchain.creators), - treeAddress: output.onchain.compression.tree, - isCompressed: output.onchain.compression.compressed, - isMutable: output.onchain.mutable, - isBurn: output.onchain.burnt, - editionNonce: output.onchain.supply.edition_nonce, - primarySaleHappened: output.onchain.royalty.primary_sale_happened, - dateTime: convertTimestampToDateTime(output.offchain.created_at), - offchain: output.offchain - }; - }; - })(Nft = Converter15.Nft || (Converter15.Nft = {})); -})(Converter5 || (Converter5 = {})); - -// ../converter/src/memo.ts -var Converter6; -((Converter15) => { - let Memo; - ((Memo2) => { - Memo2.intoUserSide = (output, meta, outputTransfer, mappingTokenAccount) => { - const history = {}; - if (outputTransfer && outputTransfer.program !== "") { - if (mappingTokenAccount && outputTransfer.program === "spl-token") { - const foundSource = mappingTokenAccount.find( - (m) => m.account === outputTransfer.parsed.info.source - ); - const foundDest = mappingTokenAccount.find( - (m) => m.account === outputTransfer.parsed.info.destination - ); - history.mint = outputTransfer.parsed.info.mint; - foundSource && (history.source = foundSource.owner); - foundDest && (history.destination = foundDest.owner); - } else { - history.source = outputTransfer.parsed.info.source; - history.destination = outputTransfer.parsed.info.destination; - } - } - history.memo = output.parsed; - history.type = output.program; - history.dateTime = convertTimestampToDateTime(meta.blockTime); - history.sig = meta.transaction.signatures[0]; - history.innerInstruction = false; - if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { - history.innerInstruction = true; - } - return history; - }; - })(Memo = Converter15.Memo || (Converter15.Memo = {})); -})(Converter6 || (Converter6 = {})); - -// ../converter/src/mint.ts -var Converter7; -((Converter15) => { - let Mint; - ((Mint2) => { - Mint2.intoUserSide = (output, meta) => { - const history = {}; - history.mint = output.parsed.info.mint; - history.mintAuthority = output.parsed.info.mintAuthority; - history.tokenAmount = output.parsed.info.tokenAmount; - history.account = output.parsed.info.account; - history.type = output.program; - history.dateTime = convertTimestampToDateTime(meta.blockTime); - history.sig = meta.transaction.signatures[0]; - history.innerInstruction = false; - if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { - history.innerInstruction = true; - } - return history; - }; - })(Mint = Converter15.Mint || (Converter15.Mint = {})); -})(Converter7 || (Converter7 = {})); - -// ../converter/src/regular-nft-metadata.ts -var Converter8; -((Converter15) => { - let RegularNftMetadata; - ((RegularNftMetadata2) => { - RegularNftMetadata2.intoInfra = (input, uri, sellerFeeBasisPoints) => { - return { - name: input.name, - symbol: input.symbol, - uri, - sellerFeeBasisPoints, - creators: Converter2.Creators.intoInfra(input.creators), - collection: Converter.Collection.intoInfra(input.collection), - uses: input.uses || null - }; - }; - })(RegularNftMetadata = Converter15.RegularNftMetadata || (Converter15.RegularNftMetadata = {})); -})(Converter8 || (Converter8 = {})); - -// ../converter/src/properties.ts -var Converter9; -((Converter15) => { - let Properties; - ((Properties2) => { - Properties2.intoInfra = async (input, callbackFunc, storageType, feePayer) => { - if (!input || !input.files) { - return {}; - } - const files = await Promise.all( - input.files.map(async (file) => { - if (!file.filePath) { - return {}; - } - const res = await callbackFunc(file.filePath, storageType, feePayer); - if (res.isErr) { - throw Error(res.error.message); - } - return overwriteObject(file, [ - { - existsKey: "filePath", - will: { key: "uri", value: res.value } - } - ]); - }) - ); - return { ...input, files }; - }; - })(Properties = Converter15.Properties || (Converter15.Properties = {})); -})(Converter9 || (Converter9 = {})); - -// ../converter/src/uses.ts -var Converter10; -((Converter15) => { - let Uses; - ((Uses2) => { - Uses2.intoUserSide = (output) => { - if (!output) { - return void 0; - } - return output; - }; - })(Uses = Converter15.Uses || (Converter15.Uses = {})); -})(Converter10 || (Converter10 = {})); - -// ../converter/src/token-metadata.ts -var Converter11; -((Converter15) => { - let TokenMetadata; - ((TokenMetadata2) => { - TokenMetadata2.intoInfra = (input, uri, sellerFeeBasisPoints) => { - return { - name: input.name, - symbol: input.symbol, - uri, - sellerFeeBasisPoints, - creators: Converter2.Creators.intoInfra(input.creators), - collection: null, - uses: input.uses || null - }; - }; - TokenMetadata2.intoUser = (output, tokenAmount) => { - return { - mint: output.onchain.mint.toString(), - royalty: output.onchain.data.sellerFeeBasisPoints, - name: (0, TokenMetadata2.deleteNullStrings)(output.onchain.data.name), - symbol: (0, TokenMetadata2.deleteNullStrings)(output.onchain.data.symbol), - tokenAmount, - uri: (0, TokenMetadata2.deleteNullStrings)(output.onchain.data.uri), - creators: Converter2.Creators.intoUser(output.onchain.data.creators), - uses: Converter10.Uses.intoUserSide(output.onchain.uses), - dateTime: convertTimestampToDateTime(output.offchain.created_at), - offchain: output.offchain - }; - }; - TokenMetadata2.deleteNullStrings = (str) => { - return str.replace(/\0/g, ""); - }; - })(TokenMetadata = Converter15.TokenMetadata || (Converter15.TokenMetadata = {})); -})(Converter11 || (Converter11 = {})); - -// ../converter/src/transfer-checked.ts -var Converter12; -((Converter15) => { - let TransferChecked; - ((TransferChecked2) => { - TransferChecked2.intoUserSide = (output, meta, mappingTokenAccount) => { - const history = {}; - if (mappingTokenAccount) { - const foundSource = mappingTokenAccount.find( - (m) => m.account === output.parsed.info.source - ); - const foundDest = mappingTokenAccount.find( - (m) => m.account === output.parsed.info.destination - ); - foundSource && (history.source = foundSource.owner); - foundDest && (history.destination = foundDest.owner); - } - history.tokenAmount = output.parsed.info.tokenAmount; - history.mint = output.parsed.info.mint; - history.multisigAuthority = output.parsed.info.multisigAuthority; - history.signers = output.parsed.info.signers; - history.type = output.program; - history.dateTime = convertTimestampToDateTime(meta.blockTime); - history.sig = meta.transaction.signatures[0]; - history.innerInstruction = false; - if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { - history.innerInstruction = true; - } - return history; - }; - })(TransferChecked = Converter15.TransferChecked || (Converter15.TransferChecked = {})); -})(Converter12 || (Converter12 = {})); - -// ../converter/src/transfer.ts -var Converter13; -((Converter15) => { - let Transfer; - ((Transfer2) => { - Transfer2.intoUserSide = (output, meta) => { - const history = {}; - if (!output.parsed.info.destination || !output.parsed.info.lamports) { - return; - } - history.source = output.parsed.info.source; - history.destination = output.parsed.info.destination; - history.sol = output.parsed.info.lamports?.toSol().toString(); - history.type = output.program; - history.dateTime = convertTimestampToDateTime(meta.blockTime); - history.sig = meta.transaction.signatures[0]; - history.innerInstruction = false; - if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { - history.innerInstruction = true; - } - return history; - }; - })(Transfer = Converter15.Transfer || (Converter15.Transfer = {})); -})(Converter13 || (Converter13 = {})); - -// ../converter/src/index.ts -var Converter14 = { - ...Converter3, - ...Converter, - ...Converter2, - ...Converter5, - ...Converter6, - ...Converter7, - ...Converter8, - ...Converter9, - ...Converter4, - ...Converter11, - ...Converter12, - ...Converter13, - ...Converter10 -}; - -// ../validator/src/index.ts -var Validator; -((Validator2) => { - let Message; - ((Message2) => { - Message2.SUCCESS = "success"; - Message2.SMALL_NUMBER = "too small"; - Message2.BIG_NUMBER = "too big"; - Message2.LONG_LENGTH = "too long"; - Message2.EMPTY = "invalid empty value"; - Message2.INVALID_URL = "invalid url"; - Message2.ONLY_NODE_JS = "`string` type is only Node.js"; - })(Message = Validator2.Message || (Validator2.Message = {})); - Validator2.NAME_LENGTH = 32; - Validator2.SYMBOL_LENGTH = 10; - Validator2.URL_LENGTH = 200; - Validator2.ROYALTY_MAX = 100; - Validator2.SELLER_FEE_BASIS_POINTS_MAX = 1e4; - Validator2.ROYALTY_MIN = 0; - Validator2.isRoyalty = (royalty) => { - return Try(() => { - const key = "royalty"; - if (royalty !== 0 && !royalty) { - throw createError(key, Message.EMPTY, royalty); - } - if (royalty < Validator2.ROYALTY_MIN) { - throw createError(key, Message.SMALL_NUMBER, royalty, { - threshold: Validator2.ROYALTY_MIN, - condition: "underMin" - }); - } else if (royalty > Validator2.ROYALTY_MAX) { - throw createError(key, Message.BIG_NUMBER, royalty, { - threshold: Validator2.ROYALTY_MAX, - condition: "overMax" - }); - } - return Message.SUCCESS; - }); - }; - Validator2.isSellerFeeBasisPoints = (royalty) => { - return Try(() => { - const key = "sellerFeeBasisPoints/seller_fee_basis_points"; - if (royalty !== 0 && !royalty) { - throw createError(key, Message.EMPTY, royalty); - } - if (royalty < Validator2.ROYALTY_MIN) { - throw createError(key, Message.SMALL_NUMBER, royalty, { - threshold: Validator2.ROYALTY_MIN, - condition: "underMin" - }); - } else if (royalty > Validator2.ROYALTY_MAX * Converter14.Royalty.THRESHOLD) { - throw createError(key, Message.BIG_NUMBER, royalty, { - threshold: Validator2.SELLER_FEE_BASIS_POINTS_MAX, - condition: "overMax" - }); - } - return Message.SUCCESS; - }); - }; - Validator2.isName = (name) => { - return Try(() => { - const key = "name"; - if (!name) { - throw createError(key, Message.EMPTY, name); - } - if (byteLength(name) > Validator2.NAME_LENGTH) { - throw createError(key, Message.LONG_LENGTH, name, { - threshold: Validator2.NAME_LENGTH, - condition: "overMax" - }); - } - return Message.SUCCESS; - }); - }; - Validator2.isSymbol = (symbol) => { - return Try(() => { - const key = "symbol"; - if (!symbol) { - throw createError(key, Message.EMPTY, symbol); - } - if (byteLength(symbol) > Validator2.SYMBOL_LENGTH) { - throw createError(key, Message.LONG_LENGTH, symbol, { - threshold: Validator2.SYMBOL_LENGTH, - condition: "overMax" - }); - } - return Message.SUCCESS; - }); - }; - Validator2.isImageUrl = (image) => isUriOrImage(image, "image"); - Validator2.checkAll = (metadata) => { - return Try(() => { - const keys = Object.keys(metadata); - const results = []; - keys.map((key) => { - let res; - switch (key) { - case "image": - if (key in metadata && metadata.image) { - res = (0, Validator2.isImageUrl)(metadata.image); - } - break; - case "royalty": - if (key in metadata && metadata.royalty) { - res = (0, Validator2.isRoyalty)(metadata.royalty); - } - break; - case "seller_fee_basis_points": - if (key in metadata && metadata.seller_fee_basis_points) { - res = (0, Validator2.isSellerFeeBasisPoints)(metadata.seller_fee_basis_points); - } - break; - case "sellerFeeBasisPoints": - if (key in metadata) { - res = (0, Validator2.isSellerFeeBasisPoints)(metadata.sellerFeeBasisPoints); - } - break; - case "name": - if (metadata.name) { - res = (0, Validator2.isName)(metadata.name); - } - break; - case "symbol": - if (metadata.symbol) { - res = (0, Validator2.isSymbol)(metadata.symbol); - } - break; - } - if (res && res.isErr) { - results.push(...res.error.details); - } - }); - if (results.length > 0) { - const message = "Caught in the validation errors. see information e.g: err.details"; - throw new ValidatorError(message, results); - } - return Message.SUCCESS; - }); - }; - const byteLength = (value) => { - const text = new TextEncoder(); - return text.encode(value).length; - }; - const createError = (key, message, actual, limit) => { - let error; - if (limit) { - error = new ValidatorError(message, [{ key, message, actual, limit }]); - } else { - error = new ValidatorError(message, [{ key, message, actual }]); - } - return error; - }; - const isUriOrImage = (imageOrUri, key) => { - return Try(() => { - if (!imageOrUri) { - throw createError(key, Message.EMPTY, imageOrUri); - } - if (byteLength(imageOrUri) > Validator2.URL_LENGTH) { - throw createError(key, Message.LONG_LENGTH, imageOrUri, { - threshold: Validator2.URL_LENGTH, - condition: "overMax" - }); - } - if (!/https?:\/\/[-_.!~*\\()a-zA-Z0-9;?:&=+,%#]+/g.test(imageOrUri)) { - throw createError(key, Message.INVALID_URL, imageOrUri); - } - return Message.SUCCESS; - }); - }; -})(Validator || (Validator = {})); -var ValidatorError = class extends Error { - details; - constructor(message, details) { - super(message); - this.details = details; - } -}; -export { - Account3 as Account, - Explorer, - Node, - Try, - Validator, - ValidatorError, - bufferToArray, - convertTimestampToDateTime, - debugLog, - isBrowser, - isNode, - isPromise, - overwriteObject, - sleep, - unixTimestamp -}; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9iYXRjaC50cyIsICIuLi8uLi90eXBlcy9zcmMvZ2xvYmFsL2luZGV4LnRzIiwgIi4uLy4uL2dsb2JhbC9zcmMvaW5kZXgudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMva2V5cGFpci50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9wZGEudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvaW5kZXgudHMiLCAiLi4vLi4vbm9kZS9zcmMvaW5kZXgudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY29tbW9uLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL21pbnQudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvcGFydGlhbC1zaWduLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2NhbGN1bGF0ZS10eHNpemUudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvaW5kZXgudHMiLCAiLi4vc3JjL3Jlc3VsdC50cyIsICIuLi9zcmMvc2hhcmVkLnRzIiwgIi4uLy4uL2NvbnZlcnRlci9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Npc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJGZWVCYXNpc1BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0YWRhdGEubmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzeW1ib2wnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLnN5bWJvbCkge1xuICAgICAgICAgICAgICByZXMgPSBpc1N5bWJvbChtZXRhZGF0YS5zeW1ib2wpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHJlcyAmJiByZXMuaXNFcnIpIHtcbiAgICAgICAgICByZXN1bHRzLnB1c2goLi4ucmVzLmVycm9yLmRldGFpbHMpO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIGlmIChyZXN1bHRzLmxlbmd0aCA+IDApIHtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9XG4gICAgICAgICAgJ0NhdWdodCBpbiB0aGUgdmFsaWRhdGlvbiBlcnJvcnMuIHNlZSBpbmZvcm1hdGlvbiBlLmc6IGVycjxWYWxpZGF0b3JFcnJvcj4uZGV0YWlscyc7XG4gICAgICAgIHRocm93IG5ldyBWYWxpZGF0b3JFcnJvcihtZXNzYWdlLCByZ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VyIiwgIk5mdCIsICJDb252ZXJ0ZXIiLCAiTWVtbyIsICJDb252ZXJ0ZXIiLCAiTWludCIsICJDb252ZXJ0ZXIiLCAiUmVndWxhck5mdE1ldGFkYXRhIiwgIkNvbnZlcnRlciIsICJQcm9wZXJ0aWVzIiwgIkNvbnZlcnRlciIsICJVc2VzIiwgIkNvbnZlcnRlciIsICJUb2tlbk1ldGFkYXRhIiwgIkNvbnZlcnRlciIsICJUcmFuc2ZlckNoZWNrZWQiLCAiQ29udmVydGVyIiwgIlRyYW5zZmVyIiwgIkNvbnZlcnRlciIsICJWYWxpZGF0b3IiLCAiTWVzc2FnZSIsICJDb252ZXJ0ZXIiXQp9Cg== \ No newline at end of file diff --git a/packages/suite-utils/dist/index.d.mts b/packages/suite-utils/dist/index.d.mts index cdf2374fc..861f76c96 100644 --- a/packages/suite-utils/dist/index.d.mts +++ b/packages/suite-utils/dist/index.d.mts @@ -1,7 +1,7 @@ -import { PublicKey, Commitment } from '@solana/web3.js'; -export { A as Account, E as Explorer, g as ExplorerOptions, K as KeypairAccount, N as Node, O as OwnerInfo, P as Pubkey, R as Result, S as Secret, T as Try, V as Validator, f as ValidatorError, b as bufferToArray, e as convertTimestampToDateTime, d as debugLog, i as isBrowser, a as isNode, c as isPromise, o as overwriteObject, s as sleep, u as unixTimestamp } from './exports-c05c52f7.js'; -import 'bn.js'; -import '@metaplex-foundation/mpl-token-metadata'; +import * as _solana_web3_js from '@solana/web3.js'; +import { PublicKey, Commitment, TransactionSignature, Keypair, Connection } from '@solana/web3.js'; +import BN from 'bn.js'; +import { DataV2 } from '@metaplex-foundation/mpl-token-metadata'; declare namespace Constants { namespace WarnningMessage { @@ -63,4 +63,506 @@ declare namespace Constants { const EXPLORER_XRAY_URL = "https://xray.helius.xyz"; } -export { Constants }; +declare const pubKeyNominality: unique symbol; +declare const secretNominality: unique symbol; +type Pubkey = (string & { + [pubKeyNominality]: never; +}) | string; +type Secret = (string & { + [secretNominality]: never; +}) | string; +type KeypairAccount = { + pubkey: Pubkey; + secret: Secret; +}; +type OwnerInfo = { + sol: number; + lamports: number; + owner: string; +}; + +declare abstract class AbstractResult { + protected abstract _chain(ok: (value: T) => Result, err: (error: E) => Result): Result; + unwrap(): T; + unwrap(ok: (value: T) => U): U; + unwrap(ok: (value: T) => U, err: (error: E) => V): U | V; + unwrap(ok: (value: T) => U, err: (error: E) => U): U; + map(ok: (value: T) => U): Result; + map(ok: (value: T) => U, err: (error: E) => F): Result; + chain(ok: (value: T) => Result): Result; + chain(ok: (value: T) => Result): Result; + chain(ok: (value: T) => Result, err: (error: E) => Result): Result; + match(ok: (value: T) => U, err: (error: E) => F): void | Promise; + submit(feePayer?: Secret): Promise>; +} +declare global { + interface Array { + submit(feePayer?: Secret): Promise>; + } +} +declare class InternalOk extends AbstractResult { + readonly value: T; + readonly isOk = true; + readonly isErr = false; + constructor(value: T); + protected _chain(ok: (value: T) => Result, _err: (error: E) => Result): Result; +} +declare class InternalErr extends AbstractResult { + readonly error: E; + readonly isOk = false; + readonly isErr = true; + constructor(error: E); + protected _chain(_ok: (value: T) => Result, err: (error: E) => Result): Result; +} +declare namespace Result { + export type Ok = InternalOk; + export type Err = InternalErr; + export function ok(value: T): Result; + export function err(error?: E): Result; + type U = Result; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3]): Result<[ + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2]): Result<[OkType, OkType, OkType], ErrType>; + export function all(obj: [R0, R1]): Result<[OkType, OkType], ErrType>; + export function all(obj: [R0]): Result<[OkType], ErrType>; + export function all(obj: []): Result<[]>; + export function all>(obj: T): Result<{ + [K in keyof T]: T[K] extends Result ? I : never; + }, { + [K in keyof T]: T[K] extends Result ? E : never; + }[keyof T]>; + export {}; +} +type Result = Result.Ok | Result.Err; +type OkType> = R extends Result ? O : never; +type ErrType> = R extends Result ? E : never; + +/** + * convert buffer to Array + * + * @param {Buffer} buffer + * @returns number[] + */ +declare const bufferToArray: (buffer: Buffer) => number[]; +/** + * Overwrite JS Object + * + * @param {unknown} object + * @param {OverwriteObject[]} targets + * @returns Object + */ +declare const overwriteObject: (object: unknown, targets: { + existsKey: string; + will: { + key: string; + value: unknown; + }; +}[]) => unknown; +/** + * Display log for solana-suite-config.js + * + * @param {unknown} data1 + * @param {unknown} data2 + * @param {unknown} data3 + * @param {unknown} data4 + * @returns void + */ +declare const debugLog: (data1: unknown, data2?: unknown, data3?: unknown, data4?: unknown) => void; +/** + * sleep timer + * + * @param {number} sec + * @returns Promise + */ +declare const sleep: (sec: number) => Promise; +/** + * Node.js or Browser js + * + * @returns boolean + */ +declare const isBrowser: () => boolean; +/** + * Node.js or Browser js + * + * @returns boolean + */ +declare const isNode: () => boolean; +/** + * argument is promise or other + * + * @param {unknown} obj + * @returns boolean + */ +declare const isPromise: (obj: unknown) => obj is Promise; +/** + * Try async monad + * + * @returns Promise> + */ +declare function Try(asyncblock: () => Promise, finallyInput?: () => void): Promise>; +declare function Try(block: () => T): Result; +/** + * argument is promise or other + * + * @param {number|undefined} created_at + * @returns Date | undefined + */ +declare const convertTimestampToDateTime: (created_at: number | undefined) => Date | undefined; +/** + * Get unix timestamp + * + * @returns number + */ +declare const unixTimestamp: () => number; + +declare namespace Account$2 { + class Keypair { + secret: Secret; + pubkey: Pubkey; + constructor(params: { + pubkey?: Pubkey; + secret: Secret; + }); + toPublicKey(): PublicKey; + toKeypair(): Keypair; + static isPubkey: (value: string) => value is Pubkey; + static isSecret: (value: string) => value is Secret; + static create: () => Keypair; + static toKeyPair: (keypair: Keypair) => Keypair; + } +} + +declare namespace Account$1 { + namespace Pda { + const getMetadata: (address: Pubkey) => PublicKey; + const getMasterEdition: (address: Pubkey) => PublicKey; + const getTreeAuthority: (address: Pubkey) => PublicKey; + const getBgumSigner: () => PublicKey; + const getAssetId: (address: Pubkey, leafIndex: number) => Pubkey; + } +} + +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; +}; + +declare namespace Node { + const getConnection: () => Connection; + const changeConnection: (param: { + cluster?: string; + commitment?: Commitment; + customClusterUrl?: string[]; + }) => void; + const confirmedSig: (signature: string, commitment?: Commitment) => Promise, Error> | Result.Err<_solana_web3_js.RpcResponseAndContext<_solana_web3_js.SignatureResult>, Error> | Result.Ok | Result.Err>; +} + +type Condition = 'overMax' | 'underMin'; +interface Limit { + threshold: number; + condition: Condition; +} +interface Details { + key: string; + message: string; + actual: string | number; + limit?: Limit; +} + +type bignum = number | BN; +declare enum UseMethod { + Burn = 0, + Multiple = 1, + Single = 2 +} +type Uses = { + useMethod: UseMethod; + remaining: bignum; + total: bignum; +}; +type InputCreators = { + address: Pubkey; + secret: Secret; + share: number; +}; + +type FileType = string | File; + +type StorageType = 'nftStorage' | 'arweave' | string; +type Offchain = { + name?: string; + symbol?: string; + description?: string; + seller_fee_basis_points?: number; + image?: string; + external_url?: string; + attributes?: Attribute[]; + properties?: Properties; + collection?: { + name?: string; + family?: string; + [key: string]: unknown; + }; + collectionDetails?: { + kind: string; + size: number; + }; + created_at?: number; +}; +type Properties = { + creators?: { + address?: string; + share?: number; + [key: string]: unknown; + }[]; + files?: { + type?: string; + filePath?: FileType; + [key: string]: unknown; + }[]; + [key: string]: unknown; +}; +type Attribute = { + trait_type?: string; + value?: string; + [key: string]: unknown; +}; + +type InputCollection = Pubkey; +type Options = { + [key: string]: unknown; +}; +type InputNftMetadata = { + name: string; + symbol: string; + royalty?: number; + storageType?: StorageType; + filePath?: FileType; + uri?: string; + isMutable?: boolean; + description?: string; + external_url?: string; + attributes?: Attribute[]; + properties?: Properties; + maxSupply?: bignum; + creators?: InputCreators[]; + uses?: Uses; + collection?: InputCollection; + options?: Options; +}; + +declare namespace Validator { + export namespace Message { + const SUCCESS = "success"; + const SMALL_NUMBER = "too small"; + const BIG_NUMBER = "too big"; + const LONG_LENGTH = "too long"; + const EMPTY = "invalid empty value"; + const INVALID_URL = "invalid url"; + const ONLY_NODE_JS = "`string` type is only Node.js"; + } + export const NAME_LENGTH = 32; + export const SYMBOL_LENGTH = 10; + export const URL_LENGTH = 200; + export const ROYALTY_MAX = 100; + export const SELLER_FEE_BASIS_POINTS_MAX = 10000; + export const ROYALTY_MIN = 0; + export const isRoyalty: (royalty: number) => Result; + export const isSellerFeeBasisPoints: (royalty: number) => Result; + export const isName: (name: string) => Result; + export const isSymbol: (symbol: string) => Result; + export const isImageUrl: (image: string) => Result; + export const checkAll: (metadata: T) => Result; + type PickNftStorage = Pick; + type PickNftStorageMetaplex = Pick; + type PickMetaplex = Pick; + export {}; +} +declare class ValidatorError extends Error { + details: Details[]; + constructor(message: string, details: Details[]); +} + +export { Account, Constants, Explorer, ExplorerOptions, KeypairAccount, Node, OwnerInfo, Pubkey, Result, Secret, Try, Validator, ValidatorError, bufferToArray, convertTimestampToDateTime, debugLog, isBrowser, isNode, isPromise, overwriteObject, sleep, unixTimestamp }; diff --git a/packages/suite-utils/dist/index.d.ts b/packages/suite-utils/dist/index.d.ts index cdf2374fc..861f76c96 100644 --- a/packages/suite-utils/dist/index.d.ts +++ b/packages/suite-utils/dist/index.d.ts @@ -1,7 +1,7 @@ -import { PublicKey, Commitment } from '@solana/web3.js'; -export { A as Account, E as Explorer, g as ExplorerOptions, K as KeypairAccount, N as Node, O as OwnerInfo, P as Pubkey, R as Result, S as Secret, T as Try, V as Validator, f as ValidatorError, b as bufferToArray, e as convertTimestampToDateTime, d as debugLog, i as isBrowser, a as isNode, c as isPromise, o as overwriteObject, s as sleep, u as unixTimestamp } from './exports-c05c52f7.js'; -import 'bn.js'; -import '@metaplex-foundation/mpl-token-metadata'; +import * as _solana_web3_js from '@solana/web3.js'; +import { PublicKey, Commitment, TransactionSignature, Keypair, Connection } from '@solana/web3.js'; +import BN from 'bn.js'; +import { DataV2 } from '@metaplex-foundation/mpl-token-metadata'; declare namespace Constants { namespace WarnningMessage { @@ -63,4 +63,506 @@ declare namespace Constants { const EXPLORER_XRAY_URL = "https://xray.helius.xyz"; } -export { Constants }; +declare const pubKeyNominality: unique symbol; +declare const secretNominality: unique symbol; +type Pubkey = (string & { + [pubKeyNominality]: never; +}) | string; +type Secret = (string & { + [secretNominality]: never; +}) | string; +type KeypairAccount = { + pubkey: Pubkey; + secret: Secret; +}; +type OwnerInfo = { + sol: number; + lamports: number; + owner: string; +}; + +declare abstract class AbstractResult { + protected abstract _chain(ok: (value: T) => Result, err: (error: E) => Result): Result; + unwrap(): T; + unwrap(ok: (value: T) => U): U; + unwrap(ok: (value: T) => U, err: (error: E) => V): U | V; + unwrap(ok: (value: T) => U, err: (error: E) => U): U; + map(ok: (value: T) => U): Result; + map(ok: (value: T) => U, err: (error: E) => F): Result; + chain(ok: (value: T) => Result): Result; + chain(ok: (value: T) => Result): Result; + chain(ok: (value: T) => Result, err: (error: E) => Result): Result; + match(ok: (value: T) => U, err: (error: E) => F): void | Promise; + submit(feePayer?: Secret): Promise>; +} +declare global { + interface Array { + submit(feePayer?: Secret): Promise>; + } +} +declare class InternalOk extends AbstractResult { + readonly value: T; + readonly isOk = true; + readonly isErr = false; + constructor(value: T); + protected _chain(ok: (value: T) => Result, _err: (error: E) => Result): Result; +} +declare class InternalErr extends AbstractResult { + readonly error: E; + readonly isOk = false; + readonly isErr = true; + constructor(error: E); + protected _chain(_ok: (value: T) => Result, err: (error: E) => Result): Result; +} +declare namespace Result { + export type Ok = InternalOk; + export type Err = InternalErr; + export function ok(value: T): Result; + export function err(error?: E): Result; + type U = Result; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5, R6]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4, R5]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3, R4]): Result<[ + OkType, + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2, R3]): Result<[ + OkType, + OkType, + OkType, + OkType + ], ErrType>; + export function all(obj: [R0, R1, R2]): Result<[OkType, OkType, OkType], ErrType>; + export function all(obj: [R0, R1]): Result<[OkType, OkType], ErrType>; + export function all(obj: [R0]): Result<[OkType], ErrType>; + export function all(obj: []): Result<[]>; + export function all>(obj: T): Result<{ + [K in keyof T]: T[K] extends Result ? I : never; + }, { + [K in keyof T]: T[K] extends Result ? E : never; + }[keyof T]>; + export {}; +} +type Result = Result.Ok | Result.Err; +type OkType> = R extends Result ? O : never; +type ErrType> = R extends Result ? E : never; + +/** + * convert buffer to Array + * + * @param {Buffer} buffer + * @returns number[] + */ +declare const bufferToArray: (buffer: Buffer) => number[]; +/** + * Overwrite JS Object + * + * @param {unknown} object + * @param {OverwriteObject[]} targets + * @returns Object + */ +declare const overwriteObject: (object: unknown, targets: { + existsKey: string; + will: { + key: string; + value: unknown; + }; +}[]) => unknown; +/** + * Display log for solana-suite-config.js + * + * @param {unknown} data1 + * @param {unknown} data2 + * @param {unknown} data3 + * @param {unknown} data4 + * @returns void + */ +declare const debugLog: (data1: unknown, data2?: unknown, data3?: unknown, data4?: unknown) => void; +/** + * sleep timer + * + * @param {number} sec + * @returns Promise + */ +declare const sleep: (sec: number) => Promise; +/** + * Node.js or Browser js + * + * @returns boolean + */ +declare const isBrowser: () => boolean; +/** + * Node.js or Browser js + * + * @returns boolean + */ +declare const isNode: () => boolean; +/** + * argument is promise or other + * + * @param {unknown} obj + * @returns boolean + */ +declare const isPromise: (obj: unknown) => obj is Promise; +/** + * Try async monad + * + * @returns Promise> + */ +declare function Try(asyncblock: () => Promise, finallyInput?: () => void): Promise>; +declare function Try(block: () => T): Result; +/** + * argument is promise or other + * + * @param {number|undefined} created_at + * @returns Date | undefined + */ +declare const convertTimestampToDateTime: (created_at: number | undefined) => Date | undefined; +/** + * Get unix timestamp + * + * @returns number + */ +declare const unixTimestamp: () => number; + +declare namespace Account$2 { + class Keypair { + secret: Secret; + pubkey: Pubkey; + constructor(params: { + pubkey?: Pubkey; + secret: Secret; + }); + toPublicKey(): PublicKey; + toKeypair(): Keypair; + static isPubkey: (value: string) => value is Pubkey; + static isSecret: (value: string) => value is Secret; + static create: () => Keypair; + static toKeyPair: (keypair: Keypair) => Keypair; + } +} + +declare namespace Account$1 { + namespace Pda { + const getMetadata: (address: Pubkey) => PublicKey; + const getMasterEdition: (address: Pubkey) => PublicKey; + const getTreeAuthority: (address: Pubkey) => PublicKey; + const getBgumSigner: () => PublicKey; + const getAssetId: (address: Pubkey, leafIndex: number) => Pubkey; + } +} + +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; +}; + +declare namespace Node { + const getConnection: () => Connection; + const changeConnection: (param: { + cluster?: string; + commitment?: Commitment; + customClusterUrl?: string[]; + }) => void; + const confirmedSig: (signature: string, commitment?: Commitment) => Promise, Error> | Result.Err<_solana_web3_js.RpcResponseAndContext<_solana_web3_js.SignatureResult>, Error> | Result.Ok | Result.Err>; +} + +type Condition = 'overMax' | 'underMin'; +interface Limit { + threshold: number; + condition: Condition; +} +interface Details { + key: string; + message: string; + actual: string | number; + limit?: Limit; +} + +type bignum = number | BN; +declare enum UseMethod { + Burn = 0, + Multiple = 1, + Single = 2 +} +type Uses = { + useMethod: UseMethod; + remaining: bignum; + total: bignum; +}; +type InputCreators = { + address: Pubkey; + secret: Secret; + share: number; +}; + +type FileType = string | File; + +type StorageType = 'nftStorage' | 'arweave' | string; +type Offchain = { + name?: string; + symbol?: string; + description?: string; + seller_fee_basis_points?: number; + image?: string; + external_url?: string; + attributes?: Attribute[]; + properties?: Properties; + collection?: { + name?: string; + family?: string; + [key: string]: unknown; + }; + collectionDetails?: { + kind: string; + size: number; + }; + created_at?: number; +}; +type Properties = { + creators?: { + address?: string; + share?: number; + [key: string]: unknown; + }[]; + files?: { + type?: string; + filePath?: FileType; + [key: string]: unknown; + }[]; + [key: string]: unknown; +}; +type Attribute = { + trait_type?: string; + value?: string; + [key: string]: unknown; +}; + +type InputCollection = Pubkey; +type Options = { + [key: string]: unknown; +}; +type InputNftMetadata = { + name: string; + symbol: string; + royalty?: number; + storageType?: StorageType; + filePath?: FileType; + uri?: string; + isMutable?: boolean; + description?: string; + external_url?: string; + attributes?: Attribute[]; + properties?: Properties; + maxSupply?: bignum; + creators?: InputCreators[]; + uses?: Uses; + collection?: InputCollection; + options?: Options; +}; + +declare namespace Validator { + export namespace Message { + const SUCCESS = "success"; + const SMALL_NUMBER = "too small"; + const BIG_NUMBER = "too big"; + const LONG_LENGTH = "too long"; + const EMPTY = "invalid empty value"; + const INVALID_URL = "invalid url"; + const ONLY_NODE_JS = "`string` type is only Node.js"; + } + export const NAME_LENGTH = 32; + export const SYMBOL_LENGTH = 10; + export const URL_LENGTH = 200; + export const ROYALTY_MAX = 100; + export const SELLER_FEE_BASIS_POINTS_MAX = 10000; + export const ROYALTY_MIN = 0; + export const isRoyalty: (royalty: number) => Result; + export const isSellerFeeBasisPoints: (royalty: number) => Result; + export const isName: (name: string) => Result; + export const isSymbol: (symbol: string) => Result; + export const isImageUrl: (image: string) => Result; + export const checkAll: (metadata: T) => Result; + type PickNftStorage = Pick; + type PickNftStorageMetaplex = Pick; + type PickMetaplex = Pick; + export {}; +} +declare class ValidatorError extends Error { + details: Details[]; + constructor(message: string, details: Details[]); +} + +export { Account, Constants, Explorer, ExplorerOptions, KeypairAccount, Node, OwnerInfo, Pubkey, Result, Secret, Try, Validator, ValidatorError, bufferToArray, convertTimestampToDateTime, debugLog, isBrowser, isNode, isPromise, overwriteObject, sleep, unixTimestamp }; diff --git a/packages/suite-utils/dist/index.js b/packages/suite-utils/dist/index.js index 36be5aafd..202eef223 100644 --- a/packages/suite-utils/dist/index.js +++ b/packages/suite-utils/dist/index.js @@ -1483,4 +1483,4 @@ var ValidatorError = class extends Error { sleep, unixTimestamp }); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uL3NyYy9jb25zdGFudHMudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvYmF0Y2gudHMiLCAiLi4vLi4vbm9kZS9zcmMvaW5kZXgudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY29tbW9uLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL21pbnQudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvcGFydGlhbC1zaWdu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Vudikge1xuICAgICAgY2FzZSBDb25zdGFudHMuQ2x1c3Rlci5wcmQ6IHtcbiAgICAgICAgY29uc3QgdXJscyA9IENvbnN0YW50cy5CdW5kbHJVcmwucHJkLnNwbGl0KCcsJyk7XG4gICAgICAgIGNvbnN0IGluZGV4ID0gRGF0ZS5ub3coKSAlIHVybHMubGVuZ3RoO1xuICAgICAgICByZXR1cm4gdXJsc1tpbmRleF07XG4gICAgICB9XG4gICAgICBkZWZhdWx0OiB7XG4gICAgICAgIHJldHVybiBDb25zdGFudHMuQnVuZGxyVXJsLmRldjtcbiAgICAgIH1cbiAgICB9XG4gIH07XG5cbiAgZXhwb3J0IGNvbnN0IHN3aXRjaERhc0FwaSA9IChlbnY6IHN0cmluZyk6IHN0cmluZyA9PiB7XG4gICAgc3dpdGNoIChlbnYpIHtcbiAgICAgIGNhc2UgQ29uc3RhbnRzLkNsdXN0ZXIucHJkOiB7XG4gICAgICAgIGlmIChkYXNBcGlVcmwubGVuZ3RoIDwgMSkge1xuICAgICAgICAgIHRocm93IEVycm9yKENvbnN0YW50cy5XYXJubmluZ01lc3NhZ2UuREFTX0FQSV9VUkwpO1xuICAgICAgICB9XG4gICAgICAgIGNvbnN0IHVybHMgPSBDb25zdGFudHMuQnVuZGxyVXJsLnByZC5zcGxpdCgnLCcpO1xuICAgICAgICBjb25zdCBpbmRleCA9IERhdGUubm93KCkgJSB1cmxzLmxlbmd0aDtcbiAgICAgICAgcmV0dXJuIHVybHNbaW5kZXhdO1xuICAgICAgfVxuICAgICAgZGVmYXVsdDoge1xuICAgICAgICBjb25zdCB1cmxzID0gQ29uc3RhbnRzLkRhc0FwaVVybC5kZXYuc3BsaXQoJywnKTtcbiAgICAgICAgY29uc3QgaW5kZXggPSBEYXRlLm5vdygpICUgdXJscy5sZW5ndGg7XG4gICAgICAgIHJldHVybiB1cmxzW2luZGV4XTtcbiAgICAgIH1cbiAgICB9XG4gIH07XG5cbiAgZXhwb3J0IGNvbnN0IHN3aXRjaE5mdF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xuICAgICAgY29uc3QgW3B1YmxpY0tleV0gPSBQdWJsaWNLZXkuZmluZFByb2dyYW1BZGRyZXNzU3luYyhcbiAgICAgICAgW1xuICAgICAgICAgIEJ1ZmZlci5mcm9tKCdtZXRhZGF0YScpLFxuICAgICAgICAgIFBST0dSQU1fSUQudG9CdWZmZXIoKSxcbiAgICAgICAgICBhZGRyZXNzLnRvUHVibGljS2V5KCkudG9CdWZmZXIoKSxcbiAgICAgICAgICBCdWZmZXIuZnJvbSgnZWRpdGlvbicpLFxuICAgICAgICBdLFxuICAgICAgICBQUk9HUkFNX0lELFxuICAgICAgKTtcbiAgICAgIHJldHVybiBwdWJsaWNLZXk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBnZXRUcmVlQXV0aG9yaXR5ID0gKGFkZHJlc3M6IFB1YmtleSk6IFB1YmxpY0tleSA9PiB7XG4gICAgICBjb25zdCBbcHVibGljS2V5XSA9IFB1YmxpY0tleS5maW5kUHJvZ3JhbUFkZHJlc3NTeW5jKFxuICAgICAgICBbYWRkcmVzcy50b1B1YmxpY0tleSgpLnRvQnVmZmVyKCldLFxuICAgICAgICBNUExfQlVCQkxFR1VNX1BST0dSQU1fSUQudG9QdWJsaWNLZXkoKSxcbiAgICAgICk7XG4gICAgICByZXR1cm4gcHVibGljS2V5O1xuICAgIH07XG5cbiAgICBleHBvcnQgY29uc3QgZ2V0Qmd1bVNpZ25lciA9ICgpOiBQdWJsaWNLZXkgPT4ge1xuICAgICAgY29uc3QgW3B1YmxpY0tleV0gPSBQdWJsaWNLZXkuZmluZFByb2dyYW1BZGRyZXNzU3luYyhcbiAgICAgICAgW0J1ZmZlci5mcm9tKCdjb2xsZWN0aW9uX2NwaScsICd1dGY4JyldLFxuICAgICAgICBNUExfQlVCQkxFR1VNX1BST0dSQU1fSUQudG9QdWJsaWNLZXkoKSxcbiAgICAgICk7XG4gICAgICByZXR1cm4gcHVibGljS2V5O1xuICAgIH07XG5cbiAgICBleHBvcnQgY29uc3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AgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3JveWFsdHknOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5yb3lhbHR5KSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzUm95YWx0eShtZXRhZGF0YS5yb3lhbHR5KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlcl9mZWVfYmFzaXNfcG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJGZWVCYXNpc1BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0YWRhdGEubmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzeW1ib2wnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLnN5bWJvbCkge1xuICAgICAgICAgICAgICByZXMgPSBpc1N5bWJvbChtZXRhZGF0YS5zeW1ib2wpO1xuICAgICAgICAgICAgf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VibGljS2V5KCksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGdldEJndW1TaWduZXIgPSAoKTogUHVibGljS2V5ID0+IHtcbiAgICAgIGNvbnN0IFtwdWJsaWNLZXldID0gUHVibGljS2V5LmZpbmRQcm9ncmFtQWRkcmVzc1N5bmMoXG4gICAgICAgIFtCdWZmZXIuZnJvbSgnY29sbGVjdGlvbl9jcGknLCAndXRmOCcpXSxcbiAgICAgICAgTVBMX0JVQkJMRUdVTV9QUk9HUkFNX0lELnRvUHVibGljS2V5KCksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGdldEFzc2V0SWQgPSAoYWRkcmVzczogUHVia2V5LCBsZWFmSW5kZXg6IG51bWJlcik6IFB1YmtleSA9PiB7XG4gICAgICBjb25zdCBub2RlID0gbmV3IEJOLkJOKGxlYWZJbmRleCk7XG4gICAgICBjb25zdCBbYXNzZXRJZF0gPSBQdWJsaWNLZXkuZmluZFByb2dyYW1BZGRyZXNzU3luYyhcbiAgICAgICAgW1xuICAgICAgICAgIEJ1ZmZlci5mcm9tKCdhc3NldCcsICd1dGY4JyksXG4gICAgICAgICAgYWRkcmVzcy50b1B1YmxpY0tleSgpLnRvQnVmZmVyKCksXG4gICAgICAgICAgVWludDhBcnJheS5mcm9tKG5vZGUudG9BcnJheSgnbGUnLCA4KSksXG4gICAgICAgIF0sXG4gICAgICAgIE1QTF9CVUJCTEVHVU1fUFJPR1JBTV9JRC50b1B1YmxpY0tleSgpLFxuICAgICAgKTtcbiAgICAgIHJldHVybiBhc3NldElkLnRvU3RyaW5nKCk7XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IEFjY291bnQgYXMgS2V5cGFpciB9IGZyb20gJy4va2V5cGFpcic7XG5pbXBvcnQgeyBBY2NvdW50IGFzIFBkYSB9IGZy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Z1bmM6IChcbiAgICAgICAgZmlsZVBhdGg6IEZpbGVUeXBlLFxuICAgICAgICBzdG9yYWdlVHlwZTogU3RvcmFnZVR5cGUsXG4gICAgICAgIGZlZVBheWVyPzogU2VjcmV0LFxuICAgICAgKSA9PiBQcm9taXNlPFJlc3VsdDxzdHJpbmcsIEVycm9yPj4sXG4gICAgICBzdG9yYWdlVHlwZTogU3RvcmFnZVR5cGUsXG4gICAgICBmZWVQYXllcj86IFNlY3JldCxcbiAgICApOiBQcm9taXNlPFByb3BlcnRpZXM+ID0+IHtcbiAgICAgIGlmICghaW5wdXQgfHwgIWlucHV0LmZpbGVzKSB7XG4gICAgICAgIHJldHVybiB7fTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgZmlsZXMgPSBhd2FpdCBQcm9taXNlLmFsbChcbiAgICAgICAgaW5wdXQuZmlsZXMubWFwKGFzeW5jIChmaWxlKSA9PiB7XG4gICAgICAgICAgaWYgKCFmaWxlLmZpbGVQYXRoKSB7XG4gICAgICAgICAgICByZXR1cm4ge307XG4gICAgICAgICAgfVxuICAgICAgICAgIGNvbnN0IHJlcyA9IGF3YWl0IGNhbGxiYWNrRnVuYyhmaWxlLmZpbGVQYXRoLCBzdG9yYWdlVHlwZSwgZmVlUGF5ZXIpO1xuICAgICAgICAgIGlmIChyZXMuaXNFcnIpIHtcbiAgICAgICAgICAgIHRocm93IEVycm9yKHJlcy5lcnJvci5tZXNzYWdlKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgcmV0dXJuIG92ZXJ3cml0ZU9iamVjdChmaWxlLCBbXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGV4aXN0c0tleTogJ2ZpbGVQYXRoJyxcbiAgICAgICAgICAgICAgd2lsbDogeyBrZXk6ICd1cmknLCB2YWx1ZTogcmVzLnZhbHVlIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgIF0pO1xuICAgICAgICB9KSxcbiAgICAgICk7XG4gICAgICByZXR1cm4geyAuLi5pbn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0b3JFcnJvcj4gPT4ge1xuICAgIHJldHVybiBUcnkoKCkgPT4ge1xuICAgICAgY29uc3Qga2V5cyA9IE9iamVjdC5rZXlzKG1ldGFkYXRhKTtcbiAgICAgIGNvbnN0IHJlc3VsdHM6IERldGFpbHNbXSA9IFtdO1xuICAgICAga2V5cy5tYXAoKGtleSkgPT4ge1xuICAgICAgICBsZXQgcmVzITogUmVzdWx0PHN0cmluZywgVmFsaWRhdG9yRXJyb3I+O1xuICAgICAgICBzd2l0Y2ggKGtleSkge1xuICAgICAgICAgIGNhc2UgJ2ltYWdlJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuaW1hZ2UpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNJbWFnZVVybChtZXRhZGF0YS5pbWFnZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdyb3lhbHR5JzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEucm95YWx0eSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1JveWFsdHkobWV0YWRhdGEucm95YWx0eSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF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VydGVyIiwgIlRyYW5zZmVyIiwgIkNvbnZlcnRlciIsICJWYWxpZGF0b3IiLCAiTWVzc2FnZSIsICJDb252ZXJ0ZXIiXQp9Cg== \ No newline at end of file diff --git a/packages/suite-utils/package.json b/packages/suite-utils/package.json index b95255323..6fda0dc80 100644 --- a/packages/suite-utils/package.json +++ b/packages/suite-utils/package.json @@ -1,10 +1,38 @@ { "name": "@solana-suite/utils", "version": "0.7.2", - "private": true, + "description": "Uitlity functions", "main": "dist/index.js", "module": "dist/index.mjs", "types": "dist/index.d.ts", + "keywords": [ + "api", + "blockchain", + "solana", + "sdk", + "web3.js", + "nft" + ], + "engines": { + "node": ">=16.*" + }, + "files": [ + "dist", + "package.json" + ], + "license": "MIT", + "author": "fukaoi ", + "homepage": "https://atonoy.github.io/solana-suite", + "repository": { + "type": "git", + "url": "https://github.com/atonoy/solana-suite.git" + }, + "bugs": { + "url": "https://github.com/atonoy/solana-suite/issues" + }, + "publishConfig": { + "access": "public" + }, "scripts": { "build": "tsup --config tsup.config.ts", "clean": "rm -rf dist/ && rm -rf node_modules", diff --git a/packages/suite-utils/src/exports.ts b/packages/suite-utils/src/exports.ts deleted file mode 100644 index b26d7d53c..000000000 --- a/packages/suite-utils/src/exports.ts +++ /dev/null @@ -1,7 +0,0 @@ -export * from './shared'; -export * from '~/account'; -export * from '~/global'; -export * from '~/node'; -export * from '~/validator'; -export * from '~/types/account'; -export * from '~/types/global'; diff --git a/packages/suite-utils/src/index.ts b/packages/suite-utils/src/index.ts index 5aa75d6aa..b97b0dd3c 100644 --- a/packages/suite-utils/src/index.ts +++ b/packages/suite-utils/src/index.ts @@ -1,7 +1,13 @@ export * from './constants'; export * from './result'; export * from './shared'; -export * from './exports'; + +export * from '~/account'; +export * from '~/global'; +export * from '~/node'; +export * from '~/validator'; +export * from '~/types/account'; +export * from '~/types/global'; import '~/types/global'; import '~/global'; diff --git a/packages/suite-utils/tsconfig.json b/packages/suite-utils/tsconfig.json index 149fa4ee1..6693f9fe2 100644 --- a/packages/suite-utils/tsconfig.json +++ b/packages/suite-utils/tsconfig.json @@ -1,7 +1,6 @@ { "$schema": "https://json.schemastore.org/tsconfig", "extends": "build-configs/tsconfig/base.json", - "display": "shared", "compilerOptions": { "paths": { @@ -13,6 +12,12 @@ ] } }, - "include": ["src/**/*.ts", "test/**/*.ts"], - "exclude": ["node_modules", "dist"] + "include": [ + "src/**/*.ts", + "test/**/*.ts" + ], + "exclude": [ + "node_modules", + "dist" + ] } diff --git a/packages/suite-utils/tsup.config.ts b/packages/suite-utils/tsup.config.ts index a051ec063..5181c85a2 100644 --- a/packages/suite-utils/tsup.config.ts +++ b/packages/suite-utils/tsup.config.ts @@ -2,7 +2,6 @@ import defineConfig from '../build-configs/tsup/base'; const entry = { index: 'src/index.ts', - exports: 'src/exports.ts', }; defineConfig.entry = entry; diff --git a/packages/test-tools/dist/index.js b/packages/test-tools/dist/index.js index 56a3ee4de..271c7b44e 100644 --- a/packages/test-tools/dist/index.js +++ b/packages/test-tools/dist/index.js @@ -1,4 +1,4 @@ -'use strict'; +"use strict"; var __create = Object.create; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; @@ -10,46 +10,37 @@ var __export = (target, all) => { __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { - if ((from && typeof from === 'object') || typeof from === 'function') { + if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { - get: () => from[key], - enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable, - }); + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; -var __toESM = (mod, isNodeMode, target) => ( - (target = mod != null ? __create(__getProtoOf(mod)) : {}), - __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule - ? __defProp(target, 'default', { value: mod, enumerable: true }) - : target, - mod, - ) -); -var __toCommonJS = (mod) => - __copyProps(__defProp({}, '__esModule', { value: true }), mod); +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.ts var src_exports = {}; __export(src_exports, { - requestSol: () => requestSol, + requestSol: () => requestSol }); module.exports = __toCommonJS(src_exports); // src/request-sol.ts -var import_assert = __toESM(require('assert')); -var import_fs = __toESM(require('fs')); +var import_assert = __toESM(require("assert")); +var import_fs = __toESM(require("fs")); // ../suite-utils/src/constants.ts -var import_web3 = require('@solana/web3.js'); -var import_load = __toESM(require('@solana-suite/config/load')); +var import_web3 = require("@solana/web3.js"); +var import_load = __toESM(require("@solana-suite/config/load")); var Config = import_load.default; var Constants; ((Constants2) => { @@ -87,10 +78,7 @@ var Constants; } return false; }; - })( - (WarnningMessage = - Constants2.WarnningMessage || (Constants2.WarnningMessage = {})), - ); + })(WarnningMessage = Constants2.WarnningMessage || (Constants2.WarnningMessage = {})); })(Constants || (Constants = {})); ((Constants2) => { Constants2.currentCluster = Config.cluster.type; @@ -100,40 +88,35 @@ var Constants; Constants2.dasApiUrl = Config.dasApiUrl; let Cluster; ((Cluster2) => { - Cluster2['prd'] = 'mainnet-beta'; - Cluster2['prdMetaplex'] = 'mainnet-beta-metaplex'; - Cluster2['dev'] = 'devnet'; - Cluster2['test'] = 'testnet'; - Cluster2['localhost'] = 'localhost-devnet'; - })((Cluster = Constants2.Cluster || (Constants2.Cluster = {}))); + Cluster2["prd"] = "mainnet-beta"; + Cluster2["prdMetaplex"] = "mainnet-beta-metaplex"; + Cluster2["dev"] = "devnet"; + Cluster2["test"] = "testnet"; + Cluster2["localhost"] = "localhost-devnet"; + })(Cluster = Constants2.Cluster || (Constants2.Cluster = {})); let EndPointUrl; ((EndPointUrl2) => { - EndPointUrl2['prd'] = 'https://api.mainnet-beta.solana.com'; - EndPointUrl2['prdMetaplex'] = 'https://api.metaplex.solana.com'; - EndPointUrl2['dev'] = 'https://api.devnet.solana.com'; - EndPointUrl2['test'] = 'https://api.testnet.solana.com'; - EndPointUrl2['localhost'] = 'http://api.devnet.solana.com'; - })((EndPointUrl = Constants2.EndPointUrl || (Constants2.EndPointUrl = {}))); + EndPointUrl2["prd"] = "https://api.mainnet-beta.solana.com"; + EndPointUrl2["prdMetaplex"] = "https://api.metaplex.solana.com"; + EndPointUrl2["dev"] = "https://api.devnet.solana.com"; + EndPointUrl2["test"] = "https://api.testnet.solana.com"; + EndPointUrl2["localhost"] = "http://api.devnet.solana.com"; + })(EndPointUrl = Constants2.EndPointUrl || (Constants2.EndPointUrl = {})); let BundlrUrl; ((BundlrUrl2) => { - BundlrUrl2['prd'] = 'https://node1.irys.xyz,https://node2.irys.xyz'; - BundlrUrl2['dev'] = 'https://devnet.irys.xyz'; - })((BundlrUrl = Constants2.BundlrUrl || (Constants2.BundlrUrl = {}))); + BundlrUrl2["prd"] = "https://node1.irys.xyz,https://node2.irys.xyz"; + BundlrUrl2["dev"] = "https://devnet.irys.xyz"; + })(BundlrUrl = Constants2.BundlrUrl || (Constants2.BundlrUrl = {})); let DasApiUrl; ((DasApiUrl2) => { - DasApiUrl2['dev'] = - 'https://devnet.helius-rpc.com/?api-key=15319bf4-5b40-4958-ac8d-6313aa55eb92,https://rpc-devnet.helius.xyz?api-key=9f70a843-3274-4ffd-a0a9-323f8b7c0639'; - })((DasApiUrl = Constants2.DasApiUrl || (Constants2.DasApiUrl = {}))); + DasApiUrl2["dev"] = "https://devnet.helius-rpc.com/?api-key=15319bf4-5b40-4958-ac8d-6313aa55eb92,https://rpc-devnet.helius.xyz?api-key=9f70a843-3274-4ffd-a0a9-323f8b7c0639"; + })(DasApiUrl = Constants2.DasApiUrl || (Constants2.DasApiUrl = {})); let NftstorageApiKey; ((NftstorageApiKey2) => { - NftstorageApiKey2['dev'] = - 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJkaWQ6ZXRocjoweERGMjcyN2VkODZhRGU1RTMyZDZDZEJlODc0YzRFNDlEODY1OWZmOEMiLCJpc3MiOiJuZnQtc3RvcmFnZSIsImlhdCI6MTYyMDI2NDk0MzcwNiwibmFtZSI6ImRlbW8ifQ.d4J70mikxRB8a5vwNu6SO5HDA8JaueuseAj7Q_ytMCE'; - })( - (NftstorageApiKey = - Constants2.NftstorageApiKey || (Constants2.NftstorageApiKey = {})), - ); + NftstorageApiKey2["dev"] = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJkaWQ6ZXRocjoweERGMjcyN2VkODZhRGU1RTMyZDZDZEJlODc0YzRFNDlEODY1OWZmOEMiLCJpc3MiOiJuZnQtc3RvcmFnZSIsImlhdCI6MTYyMDI2NDk0MzcwNiwibmFtZSI6ImRlbW8ifQ.d4J70mikxRB8a5vwNu6SO5HDA8JaueuseAj7Q_ytMCE"; + })(NftstorageApiKey = Constants2.NftstorageApiKey || (Constants2.NftstorageApiKey = {})); Constants2.loadConfig = async () => { - Config = await import('@solana-suite/config/load'); + Config = await import("@solana-suite/config/load"); }; Constants2.switchCluster = (param) => { const { cluster: env, customClusterUrl: customClusterUrl2 } = param; @@ -142,46 +125,42 @@ var Constants; return customClusterUrl2[index]; } switch (env) { - case 'mainnet-beta' /* prd */: - return 'https://api.mainnet-beta.solana.com' /* prd */; - case 'mainnet-beta-metaplex' /* prdMetaplex */: - return 'https://api.metaplex.solana.com' /* prdMetaplex */; - case 'testnet' /* test */: - return 'https://api.testnet.solana.com' /* test */; - case 'devnet' /* dev */: - return 'https://api.devnet.solana.com' /* dev */; + case "mainnet-beta" /* prd */: + return "https://api.mainnet-beta.solana.com" /* prd */; + case "mainnet-beta-metaplex" /* prdMetaplex */: + return "https://api.metaplex.solana.com" /* prdMetaplex */; + case "testnet" /* test */: + return "https://api.testnet.solana.com" /* test */; + case "devnet" /* dev */: + return "https://api.devnet.solana.com" /* dev */; default: - return 'http://api.devnet.solana.com' /* localhost */; + return "http://api.devnet.solana.com" /* localhost */; } }; Constants2.switchBundlr = (env) => { switch (env) { - case 'mainnet-beta' /* prd */: { - const urls = 'https://node1.irys.xyz,https://node2.irys.xyz' /* prd */ - .split(','); + case "mainnet-beta" /* prd */: { + const urls = "https://node1.irys.xyz,https://node2.irys.xyz" /* prd */.split(","); const index = Date.now() % urls.length; return urls[index]; } default: { - return 'https://devnet.irys.xyz' /* dev */; + return "https://devnet.irys.xyz" /* dev */; } } }; Constants2.switchDasApi = (env) => { switch (env) { - case 'mainnet-beta' /* prd */: { + case "mainnet-beta" /* prd */: { if (Constants2.dasApiUrl.length < 1) { throw Error(Constants2.WarnningMessage.DAS_API_URL); } - const urls = 'https://node1.irys.xyz,https://node2.irys.xyz' /* prd */ - .split(','); + const urls = "https://node1.irys.xyz,https://node2.irys.xyz" /* prd */.split(","); const index = Date.now() % urls.length; return urls[index]; } default: { - const urls = - 'https://devnet.helius-rpc.com/?api-key=15319bf4-5b40-4958-ac8d-6313aa55eb92,https://rpc-devnet.helius.xyz?api-key=9f70a843-3274-4ffd-a0a9-323f8b7c0639' /* dev */ - .split(','); + const urls = "https://devnet.helius-rpc.com/?api-key=15319bf4-5b40-4958-ac8d-6313aa55eb92,https://rpc-devnet.helius.xyz?api-key=9f70a843-3274-4ffd-a0a9-323f8b7c0639" /* dev */.split(","); const index = Date.now() % urls.length; return urls[index]; } @@ -189,65 +168,61 @@ var Constants; }; Constants2.switchNftStorage = (env) => { switch (env) { - case 'mainnet-beta' /* prd */: + case "mainnet-beta" /* prd */: if (!Constants2.nftStorageApiKey) { throw Error(Constants2.WarnningMessage.NFT_STORAGE_API_KEY); } return Constants2.nftStorageApiKey; default: { - return 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJkaWQ6ZXRocjoweERGMjcyN2VkODZhRGU1RTMyZDZDZEJlODc0YzRFNDlEODY1OWZmOEMiLCJpc3MiOiJuZnQtc3RvcmFnZSIsImlhdCI6MTYyMDI2NDk0MzcwNiwibmFtZSI6ImRlbW8ifQ.d4J70mikxRB8a5vwNu6SO5HDA8JaueuseAj7Q_ytMCE' /* dev */; + return "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJkaWQ6ZXRocjoweERGMjcyN2VkODZhRGU1RTMyZDZDZEJlODc0YzRFNDlEODY1OWZmOEMiLCJpc3MiOiJuZnQtc3RvcmFnZSIsImlhdCI6MTYyMDI2NDk0MzcwNiwibmFtZSI6ImRlbW8ifQ.d4J70mikxRB8a5vwNu6SO5HDA8JaueuseAj7Q_ytMCE" /* dev */; } } }; Constants2.WRAPPED_TOKEN_PROGRAM_ID = new import_web3.PublicKey( - 'So11111111111111111111111111111111111111112', + "So11111111111111111111111111111111111111112" ); Constants2.MEMO_PROGRAM_ID = new import_web3.PublicKey( - 'Memo1UhkJRfHyvLMcVucJwxXeuD728EqVDDwQDxFMNo', + "Memo1UhkJRfHyvLMcVucJwxXeuD728EqVDDwQDxFMNo" ); Constants2.METAPLEX_PROGRAM_ID = new import_web3.PublicKey( - 'metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s', - ); - Constants2.COMMITMENT = 'confirmed'; - Constants2.NFT_STORAGE_GATEWAY_URL = 'https://ipfs.io/ipfs'; - Constants2.IRYS_GATEWAY_URL = 'https://gateway.irys.xyz'; - Constants2.BUNDLR_NETWORK_URL = (0, Constants2.switchBundlr)( - Config.cluster.type, + "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s" ); + Constants2.COMMITMENT = "confirmed"; + Constants2.NFT_STORAGE_GATEWAY_URL = "https://ipfs.io/ipfs"; + Constants2.IRYS_GATEWAY_URL = "https://gateway.irys.xyz"; + Constants2.BUNDLR_NETWORK_URL = (0, Constants2.switchBundlr)(Config.cluster.type); Constants2.DAS_API_URL = (0, Constants2.switchDasApi)(Config.cluster.type); - Constants2.NFT_STORAGE_API_KEY = (0, Constants2.switchNftStorage)( - Config.cluster.type, - ); - Constants2.EXPLORER_SOLSCAN_URL = 'https://solscan.io'; - Constants2.EXPLORER_SOLANAFM_URL = 'https://solana.fm'; - Constants2.EXPLORER_XRAY_URL = 'https://xray.helius.xyz'; + Constants2.NFT_STORAGE_API_KEY = (0, Constants2.switchNftStorage)(Config.cluster.type); + Constants2.EXPLORER_SOLSCAN_URL = "https://solscan.io"; + Constants2.EXPLORER_SOLANAFM_URL = "https://solana.fm"; + Constants2.EXPLORER_XRAY_URL = "https://xray.helius.xyz"; })(Constants || (Constants = {})); console.log(Constants.WarnningMessage.ANNOUNCE); // ../transaction-builder/src/batch.ts -var import_web34 = require('@solana/web3.js'); +var import_web34 = require("@solana/web3.js"); // ../node/src/index.ts -var import_web32 = require('@solana/web3.js'); +var import_web32 = require("@solana/web3.js"); var Node; ((Node2) => { const setted = { - clusterUrl: '', + clusterUrl: "", commitment: Constants.COMMITMENT, - customClusterUrl: [], + customClusterUrl: [] }; Node2.getConnection = () => { if (setted.customClusterUrl.length > 0) { setted.clusterUrl = Constants.switchCluster({ - customClusterUrl: setted.customClusterUrl, + customClusterUrl: setted.customClusterUrl }); } else if (Constants.customClusterUrl.length > 0) { setted.clusterUrl = Constants.switchCluster({ - customClusterUrl: Constants.customClusterUrl, + customClusterUrl: Constants.customClusterUrl }); } else if (!setted.clusterUrl) { setted.clusterUrl = Constants.switchCluster({ - cluster: Constants.currentCluster, + cluster: Constants.currentCluster }); } if (!setted.commitment) { @@ -256,47 +231,44 @@ var Node; return new import_web32.Connection(setted.clusterUrl, setted.commitment); }; Node2.changeConnection = (param) => { - setted.clusterUrl = ''; + setted.clusterUrl = ""; setted.customClusterUrl = []; setted.commitment = Constants.COMMITMENT; const { cluster, commitment, customClusterUrl } = param; if (commitment) { setted.commitment = commitment; - debugLog('# Node change commitment: ', setted.commitment); + debugLog("# Node change commitment: ", setted.commitment); } if (cluster) { setted.clusterUrl = Constants.switchCluster({ cluster }); - debugLog('# Node change clusterUrl: ', setted.clusterUrl); + debugLog("# Node change clusterUrl: ", setted.clusterUrl); } if (customClusterUrl) { - debugLog('# customClusterUrl: ', customClusterUrl); + debugLog("# customClusterUrl: ", customClusterUrl); setted.clusterUrl = Constants.switchCluster({ customClusterUrl }); setted.customClusterUrl = customClusterUrl; debugLog( - '# Node change cluster, custom cluster url: ', - setted.clusterUrl, + "# Node change cluster, custom cluster url: ", + setted.clusterUrl ); } }; Node2.confirmedSig = async (signature, commitment = Constants.COMMITMENT) => { const connection = Node2.getConnection(); const latestBlockhash = await connection.getLatestBlockhash(); - return await connection - .confirmTransaction( - { - blockhash: latestBlockhash.blockhash, - lastValidBlockHeight: latestBlockhash.lastValidBlockHeight, - signature, - }, - commitment, - ) - .then(Result.ok) - .catch(Result.err); + return await connection.confirmTransaction( + { + blockhash: latestBlockhash.blockhash, + lastValidBlockHeight: latestBlockhash.lastValidBlockHeight, + signature + }, + commitment + ).then(Result.ok).catch(Result.err); }; })(Node || (Node = {})); // ../transaction-builder/src/common.ts -var import_web33 = require('@solana/web3.js'); +var import_web33 = require("@solana/web3.js"); var MAX_RETRIES = 3; var TransactionBuilder; ((TransactionBuilder7) => { @@ -315,7 +287,7 @@ var TransactionBuilder; submit = async () => { return Try(async () => { if (!(this instanceof Common2)) { - throw Error('only Instruction object that can use this'); + throw Error("only Instruction object that can use this"); } const transaction = new import_web33.Transaction(); const blockhashObj = await Node.getConnection().getLatestBlockhash(); @@ -328,13 +300,13 @@ var TransactionBuilder; } this.instructions.forEach((inst) => transaction.add(inst)); const options = { - maxRetries: MAX_RETRIES, + maxRetries: MAX_RETRIES }; return await (0, import_web33.sendAndConfirmTransaction)( Node.getConnection(), transaction, finalSigners, - options, + options ); }); }; @@ -353,7 +325,7 @@ var TransactionBuilder2; if (!a.instructions && !a.signers) { throw Error( `only Instruction object that can use batchSubmit(). - Index: ${i}, Set value: ${JSON.stringify(a)}`, + Index: ${i}, Set value: ${JSON.stringify(a)}` ); } i++; @@ -373,13 +345,13 @@ var TransactionBuilder2; } instructions.map((inst) => transaction.add(inst)); const options = { - maxRetries: MAX_RETRIES, + maxRetries: MAX_RETRIES }; return await (0, import_web34.sendAndConfirmTransaction)( Node.getConnection(), transaction, finalSigners, - options, + options ); }); }; @@ -388,7 +360,7 @@ var TransactionBuilder2; })(TransactionBuilder2 || (TransactionBuilder2 = {})); // ../transaction-builder/src/mint.ts -var import_web35 = require('@solana/web3.js'); +var import_web35 = require("@solana/web3.js"); var TransactionBuilder3; ((TransactionBuilder7) => { class Mint { @@ -405,7 +377,7 @@ var TransactionBuilder3; submit = async () => { return Try(async () => { if (!(this instanceof Mint)) { - throw Error('only MintInstruction object that can use this'); + throw Error("only MintInstruction object that can use this"); } const transaction = new import_web35.Transaction(); const blockhashObj = await Node.getConnection().getLatestBlockhash(); @@ -418,17 +390,17 @@ var TransactionBuilder3; } this.instructions.forEach((inst) => transaction.add(inst)); const options = { - maxRetries: MAX_RETRIES, + maxRetries: MAX_RETRIES }; if (Node.getConnection().rpcEndpoint === Constants.EndPointUrl.prd) { - debugLog('# Change metaplex cluster on mainnet-beta'); + debugLog("# Change metaplex cluster on mainnet-beta"); Node.changeConnection({ cluster: Constants.Cluster.prdMetaplex }); } return await (0, import_web35.sendAndConfirmTransaction)( Node.getConnection(), transaction, finalSigners, - options, + options ); }); }; @@ -437,7 +409,7 @@ var TransactionBuilder3; })(TransactionBuilder3 || (TransactionBuilder3 = {})); // ../transaction-builder/src/partial-sign.ts -var import_web36 = require('@solana/web3.js'); +var import_web36 = require("@solana/web3.js"); var TransactionBuilder4; ((TransactionBuilder7) => { class PartialSign { @@ -452,18 +424,18 @@ var TransactionBuilder4; submit = async (feePayer) => { return Try(async () => { if (!(this instanceof PartialSign)) { - throw Error('only PartialSignInstruction object that can use this'); + throw Error("only PartialSignInstruction object that can use this"); } - const decode = Buffer.from(this.hexInstruction, 'hex'); + const decode = Buffer.from(this.hexInstruction, "hex"); const transactionFromJson = import_web36.Transaction.from(decode); transactionFromJson.partialSign(feePayer.toKeypair()); const options = { - maxRetries: MAX_RETRIES, + maxRetries: MAX_RETRIES }; const wireTransaction = transactionFromJson.serialize(); return await Node.getConnection().sendRawTransaction( wireTransaction, - options, + options ); }); }; @@ -477,7 +449,7 @@ var TransactionBuilder5; const LOW_VALUE = 127; const HIGH_VALUE = 16383; const MAX_TRANSACTION_SIZE = 1232; - const compactHeader = (n) => (n <= LOW_VALUE ? 1 : n <= HIGH_VALUE ? 2 : 3); + const compactHeader = (n) => n <= LOW_VALUE ? 1 : n <= HIGH_VALUE ? 2 : 3; const compactArraySize = (n, size) => compactHeader(n) + n * size; TransactionBuilder7.calculateTxSize = (transaction, feePayer) => { const feePayerPk = [feePayer.toBase58()]; @@ -486,42 +458,34 @@ var TransactionBuilder5; const ixsSize = transaction.instructions.reduce((acc, ix) => { ix.keys.forEach(({ pubkey, isSigner }) => { const pk = pubkey.toBase58(); - if (isSigner) signers.add(pk); + if (isSigner) + signers.add(pk); accounts.add(pk); }); accounts.add(ix.programId.toBase58()); const nIndexes = ix.keys.length; const opaqueData = ix.data.length; - return ( - acc + - 1 + // PID index - compactArraySize(nIndexes, 1) + - compactArraySize(opaqueData, 1) - ); + return acc + 1 + // PID index + compactArraySize(nIndexes, 1) + compactArraySize(opaqueData, 1); }, 0); - return ( - compactArraySize(signers.size, 64) + // signatures - 3 + // header - compactArraySize(accounts.size, 32) + // accounts - 32 + // blockhash - compactHeader(transaction.instructions.length) + // instructions - ixsSize - ); + return compactArraySize(signers.size, 64) + // signatures + 3 + // header + compactArraySize(accounts.size, 32) + // accounts + 32 + // blockhash + compactHeader(transaction.instructions.length) + // instructions + ixsSize; }; TransactionBuilder7.isOverTransactionSize = (transaction, feePayer) => { - return ( - (0, TransactionBuilder7.calculateTxSize)(transaction, feePayer) > - MAX_TRANSACTION_SIZE - ); + return (0, TransactionBuilder7.calculateTxSize)(transaction, feePayer) > MAX_TRANSACTION_SIZE; }; })(TransactionBuilder5 || (TransactionBuilder5 = {})); // ../global/src/index.ts -var import_web39 = require('@solana/web3.js'); +var import_web39 = require("@solana/web3.js"); // ../account/src/keypair.ts -var import_web37 = require('@solana/web3.js'); -var import_bs58 = __toESM(require('bs58')); +var import_web37 = require("@solana/web3.js"); +var import_bs58 = __toESM(require("bs58")); var Account; ((Account4) => { class Keypair4 { @@ -549,13 +513,13 @@ var Account; const keypair = import_web37.Keypair.generate(); return new Keypair4({ pubkey: keypair.publicKey.toString(), - secret: import_bs58.default.encode(keypair.secretKey), + secret: import_bs58.default.encode(keypair.secretKey) }); }; static toKeyPair = (keypair) => { return new Keypair4({ pubkey: keypair.publicKey.toString(), - secret: import_bs58.default.encode(keypair.secretKey), + secret: import_bs58.default.encode(keypair.secretKey) }); }; } @@ -563,10 +527,10 @@ var Account; })(Account || (Account = {})); // ../account/src/pda.ts -var import_web38 = require('@solana/web3.js'); -var import_mpl_token_metadata = require('@metaplex-foundation/mpl-token-metadata'); -var import_mpl_bubblegum = require('@metaplex-foundation/mpl-bubblegum'); -var import_bn = __toESM(require('bn.js')); +var import_web38 = require("@solana/web3.js"); +var import_mpl_token_metadata = require("@metaplex-foundation/mpl-token-metadata"); +var import_mpl_bubblegum = require("@metaplex-foundation/mpl-bubblegum"); +var import_bn = __toESM(require("bn.js")); var Account2; ((Account4) => { let Pda; @@ -574,37 +538,37 @@ var Account2; Pda2.getMetadata = (address) => { const [publicKey] = import_web38.PublicKey.findProgramAddressSync( [ - Buffer.from('metadata'), + Buffer.from("metadata"), import_mpl_token_metadata.PROGRAM_ID.toBuffer(), - address.toPublicKey().toBuffer(), + address.toPublicKey().toBuffer() ], - import_mpl_token_metadata.PROGRAM_ID, + import_mpl_token_metadata.PROGRAM_ID ); return publicKey; }; Pda2.getMasterEdition = (address) => { const [publicKey] = import_web38.PublicKey.findProgramAddressSync( [ - Buffer.from('metadata'), + Buffer.from("metadata"), import_mpl_token_metadata.PROGRAM_ID.toBuffer(), address.toPublicKey().toBuffer(), - Buffer.from('edition'), + Buffer.from("edition") ], - import_mpl_token_metadata.PROGRAM_ID, + import_mpl_token_metadata.PROGRAM_ID ); return publicKey; }; Pda2.getTreeAuthority = (address) => { const [publicKey] = import_web38.PublicKey.findProgramAddressSync( [address.toPublicKey().toBuffer()], - import_mpl_bubblegum.MPL_BUBBLEGUM_PROGRAM_ID.toPublicKey(), + import_mpl_bubblegum.MPL_BUBBLEGUM_PROGRAM_ID.toPublicKey() ); return publicKey; }; Pda2.getBgumSigner = () => { const [publicKey] = import_web38.PublicKey.findProgramAddressSync( - [Buffer.from('collection_cpi', 'utf8')], - import_mpl_bubblegum.MPL_BUBBLEGUM_PROGRAM_ID.toPublicKey(), + [Buffer.from("collection_cpi", "utf8")], + import_mpl_bubblegum.MPL_BUBBLEGUM_PROGRAM_ID.toPublicKey() ); return publicKey; }; @@ -612,33 +576,30 @@ var Account2; const node = new import_bn.default.BN(leafIndex); const [assetId] = import_web38.PublicKey.findProgramAddressSync( [ - Buffer.from('asset', 'utf8'), + Buffer.from("asset", "utf8"), address.toPublicKey().toBuffer(), - Uint8Array.from(node.toArray('le', 8)), + Uint8Array.from(node.toArray("le", 8)) ], - import_mpl_bubblegum.MPL_BUBBLEGUM_PROGRAM_ID.toPublicKey(), + import_mpl_bubblegum.MPL_BUBBLEGUM_PROGRAM_ID.toPublicKey() ); return assetId.toString(); }; - })((Pda = Account4.Pda || (Account4.Pda = {}))); + })(Pda = Account4.Pda || (Account4.Pda = {})); })(Account2 || (Account2 = {})); // ../account/src/index.ts var Account3 = { ...Account, - ...Account2, + ...Account2 }; // ../global/src/index.ts -var import_bignumber = require('bignumber.js'); -var import_bs582 = __toESM(require('bs58')); -String.prototype.toExplorerUrl = function ( - explorer = 'solscan' /* Solscan */, - options = {}, -) { +var import_bignumber = require("bignumber.js"); +var import_bs582 = __toESM(require("bs58")); +String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, options = {}) { const endPointUrl = Node.getConnection().rpcEndpoint; - debugLog('# toExplorerUrl rpcEndpoint:', endPointUrl); - let cluster = ''; + debugLog("# toExplorerUrl rpcEndpoint:", endPointUrl); + let cluster = ""; if (endPointUrl === Constants.EndPointUrl.prd) { cluster = Constants.Cluster.prd; } else if (endPointUrl === Constants.EndPointUrl.test) { @@ -649,11 +610,11 @@ String.prototype.toExplorerUrl = function ( cluster = Constants.Cluster.dev; } const addressOrSignature = this.toString(); - let url = ''; + let url = ""; if (options.replacePath) { - if (explorer === 'solanafm' /* SolanaFM */) { + if (explorer === "solanafm" /* SolanaFM */) { url = `${Constants.EXPLORER_SOLANAFM_URL}/${options.replacePath}/${addressOrSignature}?cluster=${cluster}`; - } else if (explorer === 'xray' /* Xray */) { + } else if (explorer === "xray" /* Xray */) { url = `${Constants.EXPLORER_XRAY_URL}/${options.replacePath}/${addressOrSignature}?network=${cluster}`; } else { url = `${Constants.EXPLORER_SOLSCAN_URL}/${options.replacePath}/${addressOrSignature}?cluster=${cluster}`; @@ -661,17 +622,17 @@ String.prototype.toExplorerUrl = function ( return url; } if (Account3.Keypair.isPubkey(addressOrSignature)) { - if (explorer === 'solanafm' /* SolanaFM */) { + if (explorer === "solanafm" /* SolanaFM */) { url = `${Constants.EXPLORER_SOLANAFM_URL}/address/${addressOrSignature}?cluster=${cluster}`; - } else if (explorer === 'xray' /* Xray */) { + } else if (explorer === "xray" /* Xray */) { url = `${Constants.EXPLORER_XRAY_URL}/account/${addressOrSignature}?network=${cluster}`; } else { url = `${Constants.EXPLORER_SOLSCAN_URL}/account/${addressOrSignature}?cluster=${cluster}`; } } else { - if (explorer === 'solanafm' /* SolanaFM */) { + if (explorer === "solanafm" /* SolanaFM */) { url = `${Constants.EXPLORER_SOLANAFM_URL}/tx/${addressOrSignature}?cluster=${cluster}`; - } else if (explorer === 'xray' /* Xray */) { + } else if (explorer === "xray" /* Xray */) { url = `${Constants.EXPLORER_XRAY_URL}/tx/${addressOrSignature}?network=${cluster}`; } else { url = `${Constants.EXPLORER_SOLSCAN_URL}/tx/${addressOrSignature}?cluster=${cluster}`; @@ -679,28 +640,24 @@ String.prototype.toExplorerUrl = function ( } return url; }; -String.prototype.toPublicKey = function () { +String.prototype.toPublicKey = function() { if (!Account3.Keypair.isPubkey(this.toString())) { throw Error(`No match KeyPair.PubKey: ${this.toString()}`); } return new import_web39.PublicKey(this.toString()); }; -String.prototype.toKeypair = function () { +String.prototype.toKeypair = function() { if (!Account3.Keypair.isSecret(this.toString())) { throw Error(`No match KeyPair.Secret: ${this.toString()}`); } const decoded = import_bs582.default.decode(this.toString()); return import_web39.Keypair.fromSecretKey(decoded); }; -Number.prototype.toSol = function () { - return (0, import_bignumber.BigNumber)(this) - .div(import_web39.LAMPORTS_PER_SOL) - .toNumber(); +Number.prototype.toSol = function() { + return (0, import_bignumber.BigNumber)(this).div(import_web39.LAMPORTS_PER_SOL).toNumber(); }; -Number.prototype.toLamports = function () { - return (0, import_bignumber.BigNumber)(this) - .times(import_web39.LAMPORTS_PER_SOL) - .toNumber(); +Number.prototype.toLamports = function() { + return (0, import_bignumber.BigNumber)(this).times(import_web39.LAMPORTS_PER_SOL).toNumber(); }; // ../transaction-builder/src/index.ts @@ -709,7 +666,7 @@ var TransactionBuilder6 = { ...TransactionBuilder5, ...TransactionBuilder3, ...TransactionBuilder, - ...TransactionBuilder4, + ...TransactionBuilder4 }; // ../suite-utils/src/shared.ts @@ -721,20 +678,16 @@ var overwriteObject = (object, targets) => { }); return that; }; -var debugLog = (data1, data2 = '', data3 = '', data4 = '') => { - if (Constants.isDebugging === 'true' || process.env.DEBUG === 'true') { - console.log('[DEBUG]', data1, data2, data3, data4); +var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { + if (Constants.isDebugging === "true" || process.env.DEBUG === "true") { + console.log("[DEBUG]", data1, data2, data3, data4); } }; var sleep = async (sec) => { return new Promise((r) => setTimeout(r, sec * 1e3)); }; var isPromise = (obj) => { - return ( - !!obj && - (typeof obj === 'object' || typeof obj === 'function') && - typeof obj.then === 'function' - ); + return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; }; function Try(input, finallyInput) { try { @@ -742,7 +695,7 @@ function Try(input, finallyInput) { if (isPromise(v)) { return v.then( (x) => Result.ok(x), - (err) => Result.err(err), + (err) => Result.err(err) ); } else { return Result.ok(v); @@ -754,7 +707,7 @@ function Try(input, finallyInput) { return Result.err(Error(e)); } finally { if (finallyInput) { - debugLog('# finally input:', finallyInput); + debugLog("# finally input:", finallyInput); finallyInput(); } } @@ -771,7 +724,7 @@ var AbstractResult = class { unwrap(ok, err) { const r = this._chain( (value) => Result.ok(ok ? ok(value) : value), - (error) => (err ? Result.ok(err(error)) : Result.err(error)), + (error) => err ? Result.ok(err(error)) : Result.err(error) ); if (r.isErr) { throw r.error; @@ -781,7 +734,7 @@ var AbstractResult = class { map(ok, err) { return this._chain( (value) => Result.ok(ok(value)), - (error) => Result.err(err ? err(error) : error), + (error) => Result.err(err ? err(error) : error) ); } chain(ok, err) { @@ -790,7 +743,7 @@ var AbstractResult = class { match(ok, err) { this._chain( (value) => Result.ok(ok(value)), - (error) => Result.err(err(error)), + (error) => Result.err(err(error)) ); } /// single TransactionBuilder //// @@ -798,7 +751,7 @@ var AbstractResult = class { async submit(feePayer) { const res = this.map( async (ok) => { - debugLog('# result single submit: ', ok); + debugLog("# result single submit: ", ok); if (feePayer) { const obj = ok; return await obj.submit(feePayer); @@ -809,7 +762,7 @@ var AbstractResult = class { }, (err) => { return err; - }, + } ); if (res.isErr) { return Result.err(res.error); @@ -817,21 +770,21 @@ var AbstractResult = class { return res.value; } }; -Array.prototype.submit = async function (feePayer) { +Array.prototype.submit = async function(feePayer) { if (feePayer) { let i = 1; for await (const obj of this) { if (obj.isErr) { return obj; } else if (obj.value.canSubmit) { - debugLog('# Result batch canSubmit'); + debugLog("# Result batch canSubmit"); const sig = await obj.submit(feePayer); if (sig.isErr) { return sig; } await Node.confirmedSig(sig.value); } else { - debugLog('# Result batch other than canSubmit'); + debugLog("# Result batch other than canSubmit"); if (this.length == i) { return obj.submit(feePayer); } @@ -847,10 +800,10 @@ Array.prototype.submit = async function (feePayer) { } else if (obj.isOk) { instructions.push(obj.value); } else { - return Result.err(Error('Only Array Instruction object')); + return Result.err(Error("Only Array Instruction object")); } } - debugLog('# Result batch submit: ', instructions); + debugLog("# Result batch submit: ", instructions); return new TransactionBuilder6.Batch().submit(instructions); } }; @@ -923,7 +876,7 @@ var Converter; } return { key: input.toPublicKey(), - verified: false, + verified: false }; }; Collection2.intoUser = (output) => { @@ -932,24 +885,21 @@ var Converter; } return { address: output.key.toString(), - verified: output.verified, + verified: output.verified }; }; - })((Collection = Converter15.Collection || (Converter15.Collection = {}))); + })(Collection = Converter15.Collection || (Converter15.Collection = {})); let CollectionMint; ((CollectionMint2) => { CollectionMint2.intoUser = (output) => { const res = output.find((value) => { - if (value.group_key === 'collection') { + if (value.group_key === "collection") { return value.group_value; } }); - return res ? res.group_value : ''; + return res ? res.group_value : ""; }; - })( - (CollectionMint = - Converter15.CollectionMint || (Converter15.CollectionMint = {})), - ); + })(CollectionMint = Converter15.CollectionMint || (Converter15.CollectionMint = {})); })(Converter || (Converter = {})); // ../converter/src/creators.ts @@ -965,7 +915,7 @@ var Converter2; return { address: data.address.toPublicKey(), share: data.share, - verified: false, + verified: false }; }); }; @@ -977,7 +927,7 @@ var Converter2; return { address: data.address.toPublicKey(), share: data.share, - verified: false, + verified: false }; }); }; @@ -989,15 +939,15 @@ var Converter2; return { address: data.address.toString(), share: data.share, - verified: data.verified, + verified: data.verified }; }); }; - })((Creators = Converter15.Creators || (Converter15.Creators = {}))); + })(Creators = Converter15.Creators || (Converter15.Creators = {})); })(Converter2 || (Converter2 = {})); // ../converter/src/compressed-nft-metadata.ts -var import_mpl_bubblegum_instruction = require('mpl-bubblegum-instruction'); +var import_mpl_bubblegum_instruction = require("mpl-bubblegum-instruction"); var Converter3; ((Converter15) => { let CompressedNftMetadata; @@ -1014,17 +964,11 @@ var Converter3; primarySaleHappened: false, isMutable: input.isMutable ?? false, editionNonce: 0, - tokenStandard: - import_mpl_bubblegum_instruction.TokenStandard.NonFungible, - tokenProgramVersion: - import_mpl_bubblegum_instruction.TokenProgramVersion.Original, + tokenStandard: import_mpl_bubblegum_instruction.TokenStandard.NonFungible, + tokenProgramVersion: import_mpl_bubblegum_instruction.TokenProgramVersion.Original }; }; - })( - (CompressedNftMetadata = - Converter15.CompressedNftMetadata || - (Converter15.CompressedNftMetadata = {})), - ); + })(CompressedNftMetadata = Converter15.CompressedNftMetadata || (Converter15.CompressedNftMetadata = {})); })(Converter3 || (Converter3 = {})); // ../converter/src/royalty.ts @@ -1039,7 +983,7 @@ var Converter4; Royalty2.intoUser = (percentage) => { return percentage * Royalty2.THRESHOLD; }; - })((Royalty = Converter15.Royalty || (Converter15.Royalty = {}))); + })(Royalty = Converter15.Royalty || (Converter15.Royalty = {})); })(Converter4 || (Converter4 = {})); // ../converter/src/nft.ts @@ -1051,7 +995,7 @@ var Converter5; return { mint: output.onchain.id.toString(), collectionMint: Converter.CollectionMint.intoUser( - output.onchain.grouping, + output.onchain.grouping ), authorities: output.onchain.authorities, royalty: Converter4.Royalty.intoUser(output.onchain.royalty.percent), @@ -1066,10 +1010,10 @@ var Converter5; editionNonce: output.onchain.supply.edition_nonce, primarySaleHappened: output.onchain.royalty.primary_sale_happened, dateTime: convertTimestampToDateTime(output.offchain.created_at), - offchain: output.offchain, + offchain: output.offchain }; }; - })((Nft = Converter15.Nft || (Converter15.Nft = {}))); + })(Nft = Converter15.Nft || (Converter15.Nft = {})); })(Converter5 || (Converter5 = {})); // ../converter/src/memo.ts @@ -1077,20 +1021,15 @@ var Converter6; ((Converter15) => { let Memo; ((Memo2) => { - Memo2.intoUserSide = ( - output, - meta, - outputTransfer, - mappingTokenAccount, - ) => { + Memo2.intoUserSide = (output, meta, outputTransfer, mappingTokenAccount) => { const history = {}; - if (outputTransfer && outputTransfer.program !== '') { - if (mappingTokenAccount && outputTransfer.program === 'spl-token') { + if (outputTransfer && outputTransfer.program !== "") { + if (mappingTokenAccount && outputTransfer.program === "spl-token") { const foundSource = mappingTokenAccount.find( - (m) => m.account === outputTransfer.parsed.info.source, + (m) => m.account === outputTransfer.parsed.info.source ); const foundDest = mappingTokenAccount.find( - (m) => m.account === outputTransfer.parsed.info.destination, + (m) => m.account === outputTransfer.parsed.info.destination ); history.mint = outputTransfer.parsed.info.mint; foundSource && (history.source = foundSource.owner); @@ -1105,15 +1044,12 @@ var Converter6; history.dateTime = convertTimestampToDateTime(meta.blockTime); history.sig = meta.transaction.signatures[0]; history.innerInstruction = false; - if ( - meta.meta?.innerInstructions && - meta.meta?.innerInstructions.length !== 0 - ) { + if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { history.innerInstruction = true; } return history; }; - })((Memo = Converter15.Memo || (Converter15.Memo = {}))); + })(Memo = Converter15.Memo || (Converter15.Memo = {})); })(Converter6 || (Converter6 = {})); // ../converter/src/mint.ts @@ -1131,15 +1067,12 @@ var Converter7; history.dateTime = convertTimestampToDateTime(meta.blockTime); history.sig = meta.transaction.signatures[0]; history.innerInstruction = false; - if ( - meta.meta?.innerInstructions && - meta.meta?.innerInstructions.length !== 0 - ) { + if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { history.innerInstruction = true; } return history; }; - })((Mint = Converter15.Mint || (Converter15.Mint = {}))); + })(Mint = Converter15.Mint || (Converter15.Mint = {})); })(Converter7 || (Converter7 = {})); // ../converter/src/regular-nft-metadata.ts @@ -1155,13 +1088,10 @@ var Converter8; sellerFeeBasisPoints, creators: Converter2.Creators.intoInfra(input.creators), collection: Converter.Collection.intoInfra(input.collection), - uses: input.uses || null, + uses: input.uses || null }; }; - })( - (RegularNftMetadata = - Converter15.RegularNftMetadata || (Converter15.RegularNftMetadata = {})), - ); + })(RegularNftMetadata = Converter15.RegularNftMetadata || (Converter15.RegularNftMetadata = {})); })(Converter8 || (Converter8 = {})); // ../converter/src/properties.ts @@ -1169,12 +1099,7 @@ var Converter9; ((Converter15) => { let Properties; ((Properties2) => { - Properties2.intoInfra = async ( - input, - callbackFunc, - storageType, - feePayer, - ) => { + Properties2.intoInfra = async (input, callbackFunc, storageType, feePayer) => { if (!input || !input.files) { return {}; } @@ -1189,15 +1114,15 @@ var Converter9; } return overwriteObject(file, [ { - existsKey: 'filePath', - will: { key: 'uri', value: res.value }, - }, + existsKey: "filePath", + will: { key: "uri", value: res.value } + } ]); - }), + }) ); return { ...input, files }; }; - })((Properties = Converter15.Properties || (Converter15.Properties = {}))); + })(Properties = Converter15.Properties || (Converter15.Properties = {})); })(Converter9 || (Converter9 = {})); // ../converter/src/uses.ts @@ -1211,7 +1136,7 @@ var Converter10; } return output; }; - })((Uses = Converter15.Uses || (Converter15.Uses = {}))); + })(Uses = Converter15.Uses || (Converter15.Uses = {})); })(Converter10 || (Converter10 = {})); // ../converter/src/token-metadata.ts @@ -1227,7 +1152,7 @@ var Converter11; sellerFeeBasisPoints, creators: Converter2.Creators.intoInfra(input.creators), collection: null, - uses: input.uses || null, + uses: input.uses || null }; }; TokenMetadata2.intoUser = (output, tokenAmount) => { @@ -1235,24 +1160,19 @@ var Converter11; mint: output.onchain.mint.toString(), royalty: output.onchain.data.sellerFeeBasisPoints, name: (0, TokenMetadata2.deleteNullStrings)(output.onchain.data.name), - symbol: (0, TokenMetadata2.deleteNullStrings)( - output.onchain.data.symbol, - ), + symbol: (0, TokenMetadata2.deleteNullStrings)(output.onchain.data.symbol), tokenAmount, uri: (0, TokenMetadata2.deleteNullStrings)(output.onchain.data.uri), creators: Converter2.Creators.intoUser(output.onchain.data.creators), uses: Converter10.Uses.intoUserSide(output.onchain.uses), dateTime: convertTimestampToDateTime(output.offchain.created_at), - offchain: output.offchain, + offchain: output.offchain }; }; TokenMetadata2.deleteNullStrings = (str) => { - return str.replace(/\0/g, ''); + return str.replace(/\0/g, ""); }; - })( - (TokenMetadata = - Converter15.TokenMetadata || (Converter15.TokenMetadata = {})), - ); + })(TokenMetadata = Converter15.TokenMetadata || (Converter15.TokenMetadata = {})); })(Converter11 || (Converter11 = {})); // ../converter/src/transfer-checked.ts @@ -1264,10 +1184,10 @@ var Converter12; const history = {}; if (mappingTokenAccount) { const foundSource = mappingTokenAccount.find( - (m) => m.account === output.parsed.info.source, + (m) => m.account === output.parsed.info.source ); const foundDest = mappingTokenAccount.find( - (m) => m.account === output.parsed.info.destination, + (m) => m.account === output.parsed.info.destination ); foundSource && (history.source = foundSource.owner); foundDest && (history.destination = foundDest.owner); @@ -1280,18 +1200,12 @@ var Converter12; history.dateTime = convertTimestampToDateTime(meta.blockTime); history.sig = meta.transaction.signatures[0]; history.innerInstruction = false; - if ( - meta.meta?.innerInstructions && - meta.meta?.innerInstructions.length !== 0 - ) { + if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { history.innerInstruction = true; } return history; }; - })( - (TransferChecked = - Converter15.TransferChecked || (Converter15.TransferChecked = {})), - ); + })(TransferChecked = Converter15.TransferChecked || (Converter15.TransferChecked = {})); })(Converter12 || (Converter12 = {})); // ../converter/src/transfer.ts @@ -1311,15 +1225,12 @@ var Converter13; history.dateTime = convertTimestampToDateTime(meta.blockTime); history.sig = meta.transaction.signatures[0]; history.innerInstruction = false; - if ( - meta.meta?.innerInstructions && - meta.meta?.innerInstructions.length !== 0 - ) { + if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { history.innerInstruction = true; } return history; }; - })((Transfer = Converter15.Transfer || (Converter15.Transfer = {}))); + })(Transfer = Converter15.Transfer || (Converter15.Transfer = {})); })(Converter13 || (Converter13 = {})); // ../converter/src/index.ts @@ -1336,7 +1247,7 @@ var Converter14 = { ...Converter11, ...Converter12, ...Converter13, - ...Converter10, + ...Converter10 }; // ../validator/src/index.ts @@ -1344,14 +1255,14 @@ var Validator; ((Validator2) => { let Message; ((Message2) => { - Message2.SUCCESS = 'success'; - Message2.SMALL_NUMBER = 'too small'; - Message2.BIG_NUMBER = 'too big'; - Message2.LONG_LENGTH = 'too long'; - Message2.EMPTY = 'invalid empty value'; - Message2.INVALID_URL = 'invalid url'; - Message2.ONLY_NODE_JS = '`string` type is only Node.js'; - })((Message = Validator2.Message || (Validator2.Message = {}))); + Message2.SUCCESS = "success"; + Message2.SMALL_NUMBER = "too small"; + Message2.BIG_NUMBER = "too big"; + Message2.LONG_LENGTH = "too long"; + Message2.EMPTY = "invalid empty value"; + Message2.INVALID_URL = "invalid url"; + Message2.ONLY_NODE_JS = "`string` type is only Node.js"; + })(Message = Validator2.Message || (Validator2.Message = {})); Validator2.NAME_LENGTH = 32; Validator2.SYMBOL_LENGTH = 10; Validator2.URL_LENGTH = 200; @@ -1360,19 +1271,19 @@ var Validator; Validator2.ROYALTY_MIN = 0; Validator2.isRoyalty = (royalty) => { return Try(() => { - const key = 'royalty'; + const key = "royalty"; if (royalty !== 0 && !royalty) { throw createError(key, Message.EMPTY, royalty); } if (royalty < Validator2.ROYALTY_MIN) { throw createError(key, Message.SMALL_NUMBER, royalty, { threshold: Validator2.ROYALTY_MIN, - condition: 'underMin', + condition: "underMin" }); } else if (royalty > Validator2.ROYALTY_MAX) { throw createError(key, Message.BIG_NUMBER, royalty, { threshold: Validator2.ROYALTY_MAX, - condition: 'overMax', + condition: "overMax" }); } return Message.SUCCESS; @@ -1380,22 +1291,19 @@ var Validator; }; Validator2.isSellerFeeBasisPoints = (royalty) => { return Try(() => { - const key = 'sellerFeeBasisPoints/seller_fee_basis_points'; + const key = "sellerFeeBasisPoints/seller_fee_basis_points"; if (royalty !== 0 && !royalty) { throw createError(key, Message.EMPTY, royalty); } if (royalty < Validator2.ROYALTY_MIN) { throw createError(key, Message.SMALL_NUMBER, royalty, { threshold: Validator2.ROYALTY_MIN, - condition: 'underMin', + condition: "underMin" }); - } else if ( - royalty > - Validator2.ROYALTY_MAX * Converter14.Royalty.THRESHOLD - ) { + } else if (royalty > Validator2.ROYALTY_MAX * Converter14.Royalty.THRESHOLD) { throw createError(key, Message.BIG_NUMBER, royalty, { threshold: Validator2.SELLER_FEE_BASIS_POINTS_MAX, - condition: 'overMax', + condition: "overMax" }); } return Message.SUCCESS; @@ -1403,14 +1311,14 @@ var Validator; }; Validator2.isName = (name) => { return Try(() => { - const key = 'name'; + const key = "name"; if (!name) { throw createError(key, Message.EMPTY, name); } if (byteLength(name) > Validator2.NAME_LENGTH) { throw createError(key, Message.LONG_LENGTH, name, { threshold: Validator2.NAME_LENGTH, - condition: 'overMax', + condition: "overMax" }); } return Message.SUCCESS; @@ -1418,20 +1326,20 @@ var Validator; }; Validator2.isSymbol = (symbol) => { return Try(() => { - const key = 'symbol'; + const key = "symbol"; if (!symbol) { throw createError(key, Message.EMPTY, symbol); } if (byteLength(symbol) > Validator2.SYMBOL_LENGTH) { throw createError(key, Message.LONG_LENGTH, symbol, { threshold: Validator2.SYMBOL_LENGTH, - condition: 'overMax', + condition: "overMax" }); } return Message.SUCCESS; }); }; - Validator2.isImageUrl = (image) => isUriOrImage(image, 'image'); + Validator2.isImageUrl = (image) => isUriOrImage(image, "image"); Validator2.checkAll = (metadata) => { return Try(() => { const keys = Object.keys(metadata); @@ -1439,36 +1347,32 @@ var Validator; keys.map((key) => { let res; switch (key) { - case 'image': + case "image": if (key in metadata && metadata.image) { res = (0, Validator2.isImageUrl)(metadata.image); } break; - case 'royalty': + case "royalty": if (key in metadata && metadata.royalty) { res = (0, Validator2.isRoyalty)(metadata.royalty); } break; - case 'seller_fee_basis_points': + case "seller_fee_basis_points": if (key in metadata && metadata.seller_fee_basis_points) { - res = (0, Validator2.isSellerFeeBasisPoints)( - metadata.seller_fee_basis_points, - ); + res = (0, Validator2.isSellerFeeBasisPoints)(metadata.seller_fee_basis_points); } break; - case 'sellerFeeBasisPoints': + case "sellerFeeBasisPoints": if (key in metadata) { - res = (0, Validator2.isSellerFeeBasisPoints)( - metadata.sellerFeeBasisPoints, - ); + res = (0, Validator2.isSellerFeeBasisPoints)(metadata.sellerFeeBasisPoints); } break; - case 'name': + case "name": if (metadata.name) { res = (0, Validator2.isName)(metadata.name); } break; - case 'symbol': + case "symbol": if (metadata.symbol) { res = (0, Validator2.isSymbol)(metadata.symbol); } @@ -1479,8 +1383,7 @@ var Validator; } }); if (results.length > 0) { - const message = - 'Caught in the validation errors. see information e.g: err.details'; + const message = "Caught in the validation errors. see information e.g: err.details"; throw new ValidatorError(message, results); } return Message.SUCCESS; @@ -1507,7 +1410,7 @@ var Validator; if (byteLength(imageOrUri) > Validator2.URL_LENGTH) { throw createError(key, Message.LONG_LENGTH, imageOrUri, { threshold: Validator2.URL_LENGTH, - condition: 'overMax', + condition: "overMax" }); } if (!/https?:\/\/[-_.!~*\\()a-zA-Z0-9;?:&=+,%#]+/g.test(imageOrUri)) { @@ -1535,32 +1438,24 @@ var Signatures; } return res; }; - Signatures2.getForAdress = async ( - pubkey, - parser, - callback, - options, - histories = [], - ) => { + Signatures2.getForAdress = async (pubkey, parser, callback, options, histories = []) => { try { - debugLog('# options: ', options); + debugLog("# options: ", options); const transactions = await Node.getConnection().getSignaturesForAddress( pubkey.toPublicKey(), { - limit: options.narrowDown, - }, + limit: options.narrowDown + } ); - debugLog('# transactions count:', transactions.length); + debugLog("# transactions count:", transactions.length); for (const transaction of transactions) { - parseForTransaction(transaction.signature) - .then((signature) => { - const history = parser(signature); - if (history) { - histories.push(history); - callback(Result.ok(histories)); - } - }) - .catch((e) => callback(Result.err(e))); + parseForTransaction(transaction.signature).then((signature) => { + const history = parser(signature); + if (history) { + histories.push(history); + callback(Result.ok(histories)); + } + }).catch((e) => callback(Result.err(e))); await sleep(options.waitTime); } } catch (e) { @@ -1574,17 +1469,17 @@ var Signatures; // ../types/src/transaction-filter/index.ts var FilterOptions = { Transfer: { - program: ['system', 'spl-token'], - action: ['transfer', 'transferChecked'], + program: ["system", "spl-token"], + action: ["transfer", "transferChecked"] }, Memo: { - program: ['spl-memo'], - action: ['*'], + program: ["spl-memo"], + action: ["*"] }, Mint: { - program: ['spl-token'], - action: ['mintTo', 'mintToChecked'], - }, + program: ["spl-token"], + action: ["mintTo", "mintToChecked"] + } }; // ../transaction-filter/src/transaction-filter.ts @@ -1595,14 +1490,14 @@ var TransactionFilter; if (Object.keys(transaction).length === 0) { return postTokenAccount; } - const accountKeys = transaction.transaction.message.accountKeys.map((t) => - t.pubkey.toString(), + const accountKeys = transaction.transaction.message.accountKeys.map( + (t) => t.pubkey.toString() ); transaction.meta?.postTokenBalances?.forEach((t) => { if (accountKeys[t.accountIndex] && t.owner) { const v = { account: accountKeys[t.accountIndex], - owner: t.owner, + owner: t.owner }; postTokenAccount.push(v); } @@ -1610,16 +1505,13 @@ var TransactionFilter; return postTokenAccount; }; TransactionFilter2.isParsedInstruction = (arg) => { - return arg !== null && typeof arg === 'object' && 'parsed' in arg; + return arg !== null && typeof arg === "object" && "parsed" in arg; }; TransactionFilter2.parse = (filterType, moduleName) => (txMeta) => { let history; - if ( - filterType === 'mint' /* Mint */ && - moduleName === 'system' /* SolNative */ - ) { + if (filterType === "mint" /* Mint */ && moduleName === "system" /* SolNative */) { throw Error( - "This filterType('FilterType.Mint') can not use from SolNative module", + "This filterType('FilterType.Mint') can not use from SolNative module" ); } if (!txMeta || !txMeta.transaction) { @@ -1629,28 +1521,22 @@ var TransactionFilter; txMeta.transaction.message.instructions.forEach((instruction) => { if ((0, TransactionFilter2.isParsedInstruction)(instruction)) { switch (filterType) { - case 'memo' /* Memo */: { + case "memo" /* Memo */: { if (FilterOptions.Memo.program.includes(instruction.program)) { let instructionTransfer; txMeta.transaction.message.instructions.forEach( (instruction2) => { - if ( - (0, TransactionFilter2.isParsedInstruction)(instruction2) && - FilterOptions.Transfer.program.includes( - instruction2.program, - ) - ) { + if ((0, TransactionFilter2.isParsedInstruction)(instruction2) && FilterOptions.Transfer.program.includes( + instruction2.program + )) { instructionTransfer = instruction2; } - }, + } ); - if ( - instructionTransfer && - moduleName !== instructionTransfer['program'] - ) { + if (instructionTransfer && moduleName !== instructionTransfer["program"]) { debugLog( - '# FilterType.Memo break instruction: ', - instructionTransfer, + "# FilterType.Memo break instruction: ", + instructionTransfer ); break; } @@ -1658,47 +1544,45 @@ var TransactionFilter; instruction, txMeta, instructionTransfer, - postTokenAccount, + postTokenAccount ); } break; } - case 'only-memo' /* OnlyMemo */: { + case "only-memo" /* OnlyMemo */: { if (FilterOptions.Memo.program.includes(instruction.program)) { let instructionTransfer; history = Converter14.Memo.intoUserSide( instruction, txMeta, instructionTransfer, - postTokenAccount, + postTokenAccount ); } break; } - case 'mint' /* Mint */: { - if ( - FilterOptions.Mint.program.includes(instruction.program) && - FilterOptions.Mint.action.includes(instruction.parsed.type) - ) { + case "mint" /* Mint */: { + if (FilterOptions.Mint.program.includes(instruction.program) && FilterOptions.Mint.action.includes( + instruction.parsed.type + )) { history = Converter14.Mint.intoUserSide(instruction, txMeta); } break; } - case 'transfer' /* Transfer */: - if ( - moduleName === instruction.program && - FilterOptions.Transfer.action.includes(instruction.parsed.type) - ) { - if (instruction.parsed.type === 'transferChecked') { + case "transfer" /* Transfer */: + if (moduleName === instruction.program && FilterOptions.Transfer.action.includes( + instruction.parsed.type + )) { + if (instruction.parsed.type === "transferChecked") { history = Converter14.TransferChecked.intoUserSide( instruction, txMeta, - postTokenAccount, + postTokenAccount ); } else { history = Converter14.Transfer.intoUserSide( instruction, - txMeta, + txMeta ); } } @@ -1715,12 +1599,12 @@ var SolNative; SolNative6.findByOwner = async (owner) => { return Try(async () => { const res = await Node.getConnection().getParsedAccountInfo( - owner.toPublicKey(), + owner.toPublicKey() ); const info = { sol: 0, lamports: 0, - owner: owner.toString(), + owner: owner.toString() }; if (TransactionFilter.isParsedInstruction(res.value?.data)) { const parsedAccountData = res.value?.data; @@ -1736,7 +1620,7 @@ var SolNative; })(SolNative || (SolNative = {})); // ../suite-sol-native/src/gas-less-transfer.ts -var import_web310 = require('@solana/web3.js'); +var import_web310 = require("@solana/web3.js"); var SolNative2; ((SolNative6) => { const RADIX = 10; @@ -1747,66 +1631,52 @@ var SolNative2; const tx = new import_web310.Transaction({ blockhash: blockHashObj.blockhash, lastValidBlockHeight: blockHashObj.lastValidBlockHeight, - feePayer: feePayer.toPublicKey(), + feePayer: feePayer.toPublicKey() }).add( import_web310.SystemProgram.transfer({ fromPubkey: ownerPublicKey, toPubkey: dest.toPublicKey(), - lamports: parseInt(`${amount.toLamports()}`, RADIX), - }), + lamports: parseInt(`${amount.toLamports()}`, RADIX) + }) ); tx.partialSign(owner.toKeypair()); const serializedTx = tx.serialize({ - requireAllSignatures: false, + requireAllSignatures: false }); - const hex = serializedTx.toString('hex'); + const hex = serializedTx.toString("hex"); return new TransactionBuilder6.PartialSign(hex); }); }; })(SolNative2 || (SolNative2 = {})); // ../suite-sol-native/src/transfer.ts -var import_web311 = require('@solana/web3.js'); +var import_web311 = require("@solana/web3.js"); var SolNative3; ((SolNative6) => { const RADIX = 10; - SolNative6.transfer = ( - owner, - dest, - ownerOrMultisig, - amount, - options = {}, - ) => { + SolNative6.transfer = (owner, dest, ownerOrMultisig, amount, options = {}) => { return Try(() => { const inst = import_web311.SystemProgram.transfer({ fromPubkey: owner.toPublicKey(), toPubkey: dest.toPublicKey(), - lamports: parseInt(`${amount.toLamports()}`, RADIX), + lamports: parseInt(`${amount.toLamports()}`, RADIX) }); - const payer = options.feePayer - ? options.feePayer.toKeypair() - : ownerOrMultisig[0].toKeypair(); + const payer = options.feePayer ? options.feePayer.toKeypair() : ownerOrMultisig[0].toKeypair(); return new TransactionBuilder6.Common( [inst], ownerOrMultisig.map((s) => s.toKeypair()), - payer, + payer ); }); }; })(SolNative3 || (SolNative3 = {})); // ../suite-sol-native/src/transfer-with-multisig.ts -var import_spl_token = require('@solana/spl-token'); +var import_spl_token = require("@solana/spl-token"); var SolNative4; ((SolNative6) => { const RADIX = 10; - SolNative6.transferWithMultisig = async ( - owner, - dest, - multisig, - amount, - options = {}, - ) => { + SolNative6.transferWithMultisig = async (owner, dest, multisig, amount, options = {}) => { return Try(async () => { const connection = Node.getConnection(); const payer = options.feePayer ? options.feePayer : multisig[0]; @@ -1815,29 +1685,29 @@ var SolNative4; connection, payer.toKeypair(), owner.toPublicKey(), - parseInt(`${amount.toLamports()}`, RADIX), + parseInt(`${amount.toLamports()}`, RADIX) ); - debugLog('# wrapped sol: ', wrapped.toBase58()); + debugLog("# wrapped sol: ", wrapped.toBase58()); const instructions = []; const token = await (0, import_spl_token.createMint)( connection, payer.toKeypair(), owner.toPublicKey(), owner.toPublicKey(), - 0, + 0 ); const sourceToken = await Account3.Associated.retryGetOrCreate( token.toString(), owner, - payer, + payer ); - debugLog('# sourceToken: ', sourceToken); + debugLog("# sourceToken: ", sourceToken); const destToken = await Account3.Associated.retryGetOrCreate( token.toString(), wrapped.toString(), - payer, + payer ); - debugLog('# destToken: ', destToken); + debugLog("# destToken: ", destToken); instructions.push( (0, import_spl_token.createTransferInstruction)( sourceToken.toPublicKey(), @@ -1845,21 +1715,21 @@ var SolNative4; owner.toPublicKey(), parseInt(`${amount}`, RADIX), // No lamports, its sol - keypairs, - ), + keypairs + ) ); instructions.push( (0, import_spl_token.createCloseAccountInstruction)( wrapped, dest.toPublicKey(), owner.toPublicKey(), - keypairs, - ), + keypairs + ) ); return new TransactionBuilder6.Common( instructions, multisig.map((s) => s.toKeypair()), - payer.toKeypair(), + payer.toKeypair() ); }); }; @@ -1870,44 +1740,32 @@ var SolNative5 = { ...SolNative, ...SolNative2, ...SolNative3, - ...SolNative4, + ...SolNative4 }; // src/request-sol.ts -var LOCAL_KEYPAIR_FILE = 'solana-localhost-devnet-keypair'; +var LOCAL_KEYPAIR_FILE = "solana-localhost-devnet-keypair"; var requestSol = async (pubkey, sol = 0.1) => { - let bufferStr = ''; + let bufferStr = ""; try { - bufferStr = import_fs.default.readFileSync( - `./${LOCAL_KEYPAIR_FILE}`, - 'utf8', - ); + bufferStr = import_fs.default.readFileSync(`./${LOCAL_KEYPAIR_FILE}`, "utf8"); } catch (_) { - console.log('_'); - bufferStr = import_fs.default.readFileSync( - `../../${LOCAL_KEYPAIR_FILE}`, - 'utf8', - ); + console.log("_"); + bufferStr = import_fs.default.readFileSync(`../../${LOCAL_KEYPAIR_FILE}`, "utf8"); } - console.log('Now load...please wait'); + console.log("Now load...please wait"); const keypair = JSON.parse(bufferStr).feePayer; - const sig = SolNative5.transfer( - keypair.pubkey, - pubkey, - [keypair.secret], - sol, - ); + const sig = SolNative5.transfer(keypair.pubkey, pubkey, [keypair.secret], sol); (await sig.submit()).match( (ok) => { Node.confirmedSig(ok); - console.log('Done transfer'); + console.log("Done transfer"); }, - (err) => import_assert.default.fail(err), + (err) => import_assert.default.fail(err) ); }; // Annotate the CommonJS export names for ESM import in node: -0 && - (module.exports = { - requestSol, - }); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uL3NyYy9yZXF1ZXN0LXNvbC50cyIsICIuLi8uLi9zdWl0ZS11dGlscy9zcmMvY29uc3RhbnRzLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2JhdGNoLnRzIiwgIi4uLy4uL25vZGUvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2NvbW1vbi50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9taW50LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL3BhcnRpYWwtc2lnbi50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jYWxjdWxhdGUtdHhzaXplLnRzIiwgIi4uLy4uL2dsb2JhbC9zcmMvaW5kZXgudHMiLCAiL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gcmVzID0gaXNSb3lhbHR5KG1ldGFkYXRhLnJveWFsdHkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEuc3ltYm9sKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU3ltYm9sKG1ldGFkYXRhLnN5bWJvbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAocmVzICYmIHJlcy5pc0Vycikge1xuICAgICAgICAgIHJlc3VsdHMucHVzaCguLi5yZXMuZXJyb3IuZGV0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9uLnByb2dyYW0pKSB7XG4gICAgICAgICAgICAgICAgbGV0IGluc3RydWN0aW9uVHJhbnNmZXI7XG5cbiAgICAgICAgICAgICAgICAvLyBmZXRjaCAgdHJhbnNmZXIgdHJhbnNhY3Rpb24gZm9yIHJlbGF0aW9uYWwgbWVtb1xuICAgICAgICAgICAgICAgIHR4TWV0YS50cmFuc2FjdGlvbi5tZXNzYWdlLmluc3RydWN0aW9ucy5mb3JFYWNoKFxuICAgICAgICAgICAgICAgICAgKGluc3RydWN0aW9uKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICBpc1BhcnNlZEluc3RydWN0aW9uKGluc3RydWN0aW9uKSAmJlxuICAgICAgICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuVHJhbnNmZXIucHJvZ3JhbS5pbmNsdWRlcyhcbiAgICAgICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLnByb2dyYW0sXG4gICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyID0gaW5zdHJ1Y3Rpb247XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgKTtcblxuICAgICAgICAgICAgICAgIC8vIHNwbC10b2tlbiBvciBzeXN0ZW1cbiAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyICYmXG4gICAgICAgICAgICAgICAgICBtb2R1bGVOYW1lICE9PSBpbnN0cnVjdGlvblRyYW5zZmVyWydwcm9ncmFtJ11cbiAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgIGRlYnVnTG9nKFxuICAgICAgICAgICAgICAgICAgICAnIyBGaWx0ZXJUeXBlLk1lbW8gYnJlYWsgaW5zdHJ1Y3Rpb246ICcsXG4gICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIsXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgLy8gZmV0Y2ggbWVtbyBvbmx5IHRyYW5zYWN0aW9uXG4gICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5NZW1vLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlcixcbiAgICAgICAgICAgICAgICAgIHBvc3RUb2tlbkFjY291bnQsXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5Pbmx5TWVtbzoge1xuICAgICAgICAgICAgICBpZiAoRmlsdGVyT3B0aW9ucy5NZW1vLnByb2dyYW0uaW5jbHVkZXMoaW5zdHJ1Y3Rpb24ucHJvZ3JhbSkpIHtcbiAgICAgICAgICAgICAgICBsZXQgaW5zdHJ1Y3Rpb25UcmFuc2ZlcjtcblxuICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuTWVtby5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIsXG4gICAgICAgICAgICAgICAgICBwb3N0VG9rZW5BY2NvdW50LFxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXNlIEZpbHRlclR5cGUuTWludDoge1xuICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5NaW50LnByb2dyYW0uaW5jbHVkZXMoaW5zdHJ1Y3Rpb24ucHJvZ3JhbSkgJiZcbiAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLk1pbnQuYWN0aW9uLmluY2x1ZGVzKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24ucGFyc2VkLnR5cGUgYXMgc3RyaW5nLFxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5NaW50LmludG9Vc2VyU2lkZShpbnN0cnVjdGlvbiwgdHhNZXRhKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5UcmFuc2ZlcjpcbiAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgIG1vZHVsZU5hbWUgPT09IGluc3RydWN0aW9uLnByb2dyYW0gJiZcbiAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLlRyYW5zZmVyLmFjdGlvbi5pbmNsdWRlcyhcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLnBhcnNlZC50eXBlIGFzIHN0cmluZyxcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgIGlmIChpbnN0cnVjdGlvbi5wYXJzZWQudHlwZSA9PT0gJ3RyYW5zZmVyQ2hlY2tlZCcpIHtcbiAgICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuVHJhbnNmZXJDaGVja2VkLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgICAgcG9zdFRva2VuQWNjb3VudCxcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuVHJhbnNmZXIuaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgICAgcmV0dXJuIGhpc3Rvcnk7XG4gICAgfTtcbn1cbiIsICJpbXBvcnQgeyBQYXJzZWRBY2NvdW50RGF0YSB9IGZyb20gJ0Bzb2xhbmEvd2ViMy5qcyc7XG5pbXBvcnQgeyBSZXN1bHQsIFRyeSB9IGZyb20gJ34vc3VpdGUtdXRpbHMnO1xuaW1wb3J0IHsgTm9kZSB9IGZyb20gJ34vbm9kZSc7XG5pbXBvcnQgeyBPd25lckluZm8sIFB1YmtleSB9IGZyb20gJ34vdHlwZXMvYWNjb3VudCc7XG5pbXBvcnQgeyBUcmFuc2FjdGlvbkZpbHRlciB9IGZyb20gJ34vdHJhbnNhY3Rpb24tZmlsdGVyJztcblxuZXhwb3J0IG5hbWVzcGFjZSBTb2xOYXRpdmUge1xuICAvKipcbiAgICogRmluZCBuZnQgYnkgb3duZXIgYWRkcmVzc1xuICAgKlxuICAgKiBAcGFyYW0ge1B1YmtleX0gb3duZXJcbiAgICogQHJldHVybiBQcm9taXNlPFJlc3VsdDxPd25lckluZm8sIEVycm9yPj5cbiAgICovXG4gIGV4cG9ydCBjb25zdCBmaW5kQnlPd25lciA9IGFzeW5jIChcbiAgICBvd25lcjogUHVia2V5LFxuICApOiBQcm9taXNlPFJlc3VsdDxPd25lckluZm8sIEVycm9yPj4gPT4ge1xuICA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CB0cmFuc2ZlcldpdGhNdWx0aXNpZyA9IGFzeW5jIChcbiAgICBvd25lcjogUHVia2V5LFxuICAgIGRlc3Q6IFB1YmtleSxcbiAgICBtdWx0aXNpZzogU2VjcmV0W10sXG4gICAgYW1vdW50OiBudW1iZXIsXG4gICAgb3B0aW9uczogUGFydGlhbDxUcmFuc2Zlck9wdGlvbnM+ID0ge30sXG4gICk6IFByb21pc2U8UmVzdWx0PENvbW1vblN0cnVjdHVyZSwgRXJyb3I+PiA9PiB7XG4gICAgcmV0dXJuIFRyeShhc3luYyAoKSA9PiB7XG4gICAgICBjb25zdCBjb25uZWN0aW9uID0gTm9kZS5nZXRDb25uZWN0aW9uKCk7XG4gICAgICBjb25zdCBwYXllciA9IG9wdGlvbnMuZmVlUGF5ZXIgPyBvcHRpb25zLmZlZVBheWVyIDogbXVsdGlzaWdbMF07XG4gICAgICBjb25zdCBrZXlwYWlycyA9IG11bHRpc2lnLm1hcCgocykgPT4gcy50b0tleXBhaXIoKSk7XG4gICAgICBjb25zdCB3cmFwcGVkID0gYXdhaXQgY3JlYXRlV3JhcHBlZE5hdGl2ZUFjY291bnQoXG4gICAgICAgIGNvbm5lY3Rpb24sXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICBwYXJzZUludChgJHthbW91bnQudG9MYW1wb3J0cygpfWAsIFJBRElYKSxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIHdyYXBwZWQgc29sOiAnLCB3cmFwcGVkLnRvQmFzZTU4KCkpO1xuXG4gICAgICBjb25zdCBpbnN0cnVjdGlvbnMgPSBbXTtcblxuICAgICAgY29uc3QgdG9rZW4gPSBhd2FpdCBjcmVhdGVNaW50KFxuICAgICAgICBjb25uZWN0aW9uLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgMCxcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IHNvdXJjZVRva2VuID0gYXdhaXQgQWNjb3VudC5Bc3NvY2lhdGVkLnJldHJ5R2V0T3JDcmVhdGUoXG4gICAgICAgIHRva2VuLnRvU3RyaW5nKCksXG4gICAgICAgIG93bmVyLFxuICAgICAgICBwYXllcixcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIHNvdXJjZVRva2VuOiAnLCBzb3VyY2VUb2tlbik7XG5cbiAgICAgIGNvbnN0IGRlc3RUb2tlbiA9IGF3YWl0IEFjY291bnQuQXNzb2NpYXRlZC5yZXRyeUdldE9yQ3JlYXRlKFxuICAgICAgICB0b2tlbi50b1N0cmluZygpLFxuICAgICAgICB3cmFwcGVkLnRvU3RyaW5nKCksXG4gICAgICAgIHBheWVyLFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgZGVzdFRva2VuOiAnLCBkZXN0VG9rZW4pO1xuXG4gICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgY3JlYXRlVHJhbnNmZXJJbnN0cnVjdGlvbihcbiAgICAgICAgICBzb3VyY2VUb2tlbi50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGRlc3RUb2tlbi50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgcGFyc2VJbnQoYCR7YW1vdW50fWAsIFJBRElYKSwgLy8gTm8gbGFtcG9ydHMsIGl0cyBzb2xcbiAgICAgICAgICBrZXlwYWlycyxcbiAgICAgICAgKSxcbiAgICAgICk7XG5cbiAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICBjcmVhdGVDbG9zZUFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgICB3cmFwcGVkLFxuICAgICAgICAgIGRlc3QudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBvd25lci50b1B1Ymxp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XQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IE9wdGlvbjxJbnRlcm5hbENyZWF0b3JzW10+ID0+IHtcbiAgICAgIGlmICghaW5wdXQpIHtcbiAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICB9XG4gICAgICByZXR1cm4gaW5wdXQubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvQ29tcHJlc3NlZE5mdEluZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IEludGVybmFsQ3JlYXRvcnNbXSA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBbXTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBpbnB1dCEubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlciA9IChcbiAgICAgIG91dHB1dDogT3B0aW9uPEludGVybmFsQ3JlYXRvcnNbXT4sXG4gICAgKTogQ3JlYXRvcnNbXSB8IHVuZGVmaW5lZCA9PiB7XG4gICAgICBpZiAoIW91dHB1dCkge1xuICAgICAgICByZXR1cm4gdW5kZ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AgIGZpbGVQYXRoOiBGaWxlVHlwZSxcbiAgICAgICAgc3RvcmFnZVR5cGU6IFN0b3JhZ2VUeXBlLFxuICAgICAgICBmZWVQYXllcj86IFNlY3JldCxcbiAgICAgICkgPT4gUHJvbWlzZTxSZXN1bHQ8c3RyaW5nLCBFcnJvcj4+LFxuICAgICAgc3RvcmFnZVR5cGU6IFN0b3JhZ2VUeXBlLFxuICAgICAgZmVlUGF5ZXI/OiBTZWNyZXQsXG4gICAgKTogUHJvbWlzZTxQcm9wZXJ0aWVzPiA9PiB7XG4gICAgICBpZiAoIWlucHV0IHx8ICFpbnB1dC5maWxlcykge1xuICAgICAgICByZXR1cm4ge307XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGZpbGVzID0gYXdhaXQgUHJvbWlzZS5hbGwoXG4gICAgICAgIGlucHV0LmZpbGVzLm1hcChhc3luYyAoZmlsZSkgPT4ge1xuICAgICAgICAgIGlmICghZmlsZS5maWxlUGF0aCkge1xuICAgICAgICAgICAgcmV0dXJuIHt9O1xuICAgICAgICAgIH1cbiAgICAgICAgICBjb25zdCByZXMgPSBhd2FpdCBjYWxsYmFja0Z1bmMoZmlsZS5maWxlUGF0aCwgc3RvcmFnZVR5cGUsIGZlZVBheWVyKTtcbiAgICAgICAgICBpZiAocmVzLmlzRXJyKSB7XG4gICAgICAgICAgICB0aHJvdyBFcnJvcihyZXMuZXJyb3IubWVzc2FnZSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBvdmVyd3JpdGVPYmplY3QoZmlsZSwgW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBleGlzdHNLZXk6ICdmaWxlUGF0aCcsXG4gICAgICAgICAgICAgIHdpbGw6IHsga2V5OiAndXJpJywgdmFsdWU6IHJlcy52YWx1ZSB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICBdKTtcbiAgICAgICAgfSksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHsgLi4uaW5wdXQsIGZpbGVzIH0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pIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEuc3ltYm9sKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU3ltYm9sKG1ldGFkYXRhLnN5bWJvbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAocmVzICYmIHJlcy5pc0Vycikge1xuICAgICAgICAgIHJlc3VsdHMucHVzaCguLi5yZXMuZXJyb3IuZGV0YWlscyk7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgICAgaWYgKHJlc3VsdHMubGVuZ3RoID4gMCkge1xuICAgICAgICBjb25zdCBtZXNzYWdlID1cbiAgICAgICAgICAnQ2F1Z2h0IGluIHRoZSB2YWxpZGF0aW9uIGVycm9ycy4gc2VlIGluZm9ybWF0aW9uIGUuZzogZXJyPFZhbGlkYXRvckVycm9yPi5kZXRhaWxzJztcbiAgICAgICAgdGhyb3cgbmV3IFZhbGlkYXRvckVycm9yKG1lc3NhZ2UsIHJlc3VsdHMpO1xuICAgICAgfVxuICAgICAgcmV0dXJuIE1lc3NhZ2UuU1VDQ0VTUztcbiAgICB9KTtcbiAgfTtcblxuICB0eXBlIFBpY2tOZnRTdG9yYWdlID0gUGljazxcbiAgICBPZmZjaGFpbixcbiAgICAnbmFtZScgfCAnc3ltYm9sJyB8ICdpbWFn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ICAgICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLnByb2dyYW0sXG4gICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyID0gaW5zdHJ1Y3Rpb247XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgKTtcblxuICAgICAgICAgICAgICAgIC8vIHNwbC10b2tlbiBvciBzeXN0ZW1cbiAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyICYmXG4gICAgICAgICAgICAgICAgICBtb2R1bGVOYW1lICE9PSBpbnN0cnVjdGlvblRyYW5zZmVyWydwcm9ncmFtJ11cbiAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgIGRlYnVnTG9nKFxuICAgICAgICAgICAgICAgICAgICAnIyBGaWx0ZXJUeXBlLk1lbW8gYnJlYWsgaW5zdHJ1Y3Rpb246ICcsXG4gICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIsXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgLy8gZmV0Y2ggbWVtbyBvbmx5IHRyYW5zYWN0aW9uXG4gICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5NZW1vLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlcixcbiAgICAgICAgICAgICAgICAgIHBvc3RUb2tlbkFjY291bnQsXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5Pbmx5TWVtbzoge1xuICAgICAgICAgICAgICBpZiAoRmlsdGVyT3B0aW9ucy5NZW1vLnByb2dyYW0uaW5jbHVkZXMoaW5zdHJ1Y3Rpb24ucHJvZ3JhbSkpIHtcbiAgICAgICAgICAgICAgICBsZXQgaW5zdHJ1Y3Rpb25UcmFuc2ZlcjtcblxuICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuTWVtby5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIsXG4gICAgICAgICAgICAgICAgICBwb3N0VG9rZW5BY2NvdW50LFxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXNlIEZpbHRlclR5cGUuTWludDoge1xuICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5NaW50LnByb2dyYW0uaW5jbHVkZXMoaW5zdHJ1Y3Rpb24ucHJvZ3JhbSkgJiZcbiAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLk1pbnQuYWN0aW9uLmluY2x1ZGVzKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24ucGFyc2VkLnR5cGUgYXMgc3RyaW5nLFxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5NaW50LmludG9Vc2VyU2lkZShpbnN0cnVjdGlvbiwgdHhNZXRhKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5UcmFuc2ZlcjpcbiAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgIG1vZHVsZU5hbWUgPT09IGluc3RydWN0aW9uLnByb2dyYW0gJiZcbiAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLlRyYW5zZmVyLmFjdGlvbi5pbmNsdWRlcyhcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLnBhcnNlZC50eXBlIGFzIHN0cmluZyxcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgIGlmIChpbnN0cnVjdGlvbi5wYXJzZWQudHlwZSA9PT0gJ3RyYW5zZmVyQ2hlY2tlZCcpIHtcbiAgICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuVHJhbnNmZXJDaGVja2VkLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgICAgcG9zdFRva2VuQWNjb3VudCxcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuVHJhbnNmZXIuaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgICAgcmV0dXJuIGhpc3Rvcnk7XG4gICAgfTtcbn1cbiIsICJpbXBvcnQgeyBQYXJzZWRBY2NvdW50RGF0YSB9IGZyb20gJ0Bzb2xhbmEvd2Vi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25zdCBrZXlwYWlycyA9IG11bHRpc2lnLm1hcCgocykgPT4gcy50b0tleXBhaXIoKSk7XG4gICAgICBjb25zdCB3cmFwcGVkID0gYXdhaXQgY3JlYXRlV3JhcHBlZE5hdGl2ZUFjY291bnQoXG4gICAgICAgIGNvbm5lY3Rpb24sXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICBwYXJzZUludChgJHthbW91bnQudG9MYW1wb3J0cygpfWAsIFJBRElYKSxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIHdyYXBwZWQgc29sOiAnLCB3cmFwcGVkLnRvQmFzZTU4KCkpO1xuXG4gICAgICBjb25zdCBpbnN0cnVjdGlvbnMgPSBbXTtcblxuICAgICAgY29uc3QgdG9rZW4gPSBhd2FpdCBjcmVhdGVNaW50KFxuICAgICAgICBjb25uZWN0aW9uLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgMCxcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IHNvdXJjZVRva2VuID0gYXdhaXQgQWNjb3VudC5Bc3NvY2lhdGVkLnJldHJ5R2V0T3JDcmVhdGUoXG4gICAgICAgIHRva2VuLnRvU3RyaW5nKCksXG4gICAgICAgIG93bmVyLFxuICAgICAgICBwYXllcixcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIHNvdXJjZVRva2VuOiAnLCBzb3VyY2VUb2tlbik7XG5cbiAgICAgIGNvbnN0IGRlc3RUb2tlbiA9IGF3YWl0IEFjY291bnQuQXNzb2NpYXRlZC5yZXRyeUdldE9yQ3JlYXRlKFxuICAgICAgICB0b2tlbi50b1N0cmluZygpLFxuICAgICAgICB3cmFwcGVkLnRvU3RyaW5nKCksXG4gICAgICAgIHBheWVyLFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgZGVzdFRva2VuOiAnLCBkZXN0VG9rZW4pO1xuXG4gICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgY3JlYXRlVHJhbnNmZXJJbnN0cnVjdGlvbihcbiAgICAgICAgICBzb3VyY2VUb2tlbi50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGRlc3RUb2tlbi50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgcGFyc2VJbnQoYCR7YW1vdW50fWAsIFJBRElYKSwgLy8gTm8gbGFtcG9ydHMsIGl0cyBzb2xcbiAgICAgICAgICBrZXlwYWlycyxcbiAgICAgICAgKSxcbiAgICAgICk7XG5cbiAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICBjcmVhdGVDbG9zZUFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgICB3cmFwcGVkLFxuICAgICAgICAgIGRlc3QudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGtleXBhaXJzLFxuICAgICAgICApLFxuICAgICAgKTtcblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uKFxuICAgICAgICBpbnN0cnVjdGlvbnMsXG4gICAgICAgIG11bHRpc2lnLm1hcCgocykgPT4gcy50b0tleXBhaXIoKSksXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgKTtcbiAgICB9KTtcbiAgfTtcbn1cbiIsICJpbXBvcnQgeyBTb2xOYXRpdmUgYXMgRmluZCB9IGZyb20gJy4vZmluZCc7XG5pbXBvcnQgeyBTb2xOYXRpdmUgYXMgR2FzTGVzcyB9IGZyb20gJy4vZ2FzLWxlc3MtdHJhbnNmZXInO1xuaW1wb3J0IHsgU29sTmF0aXZlIGFzIFRyYW5zZmVyIH0gZnJv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J0ZXIiLCAiUHJvcGVydGllcyIsICJDb252ZXJ0ZXIiLCAiVXNlcyIsICJDb252ZXJ0ZXIiLCAiVG9rZW5NZXRhZGF0YSIsICJDb252ZXJ0ZXIiLCAiVHJhbnNmZXJDaGVja2VkIiwgIkNvbnZlcnRlciIsICJUcmFuc2ZlciIsICJDb252ZXJ0ZXIiLCAiVmFsaWRhdG9yIiwgIk1lc3NhZ2UiLCAiQ29udmVydGVyIiwgIlNpZ25hdHVyZXMiLCAiVHJhbnNhY3Rpb25GaWx0ZXIiLCAiaW5zdHJ1Y3Rpb24iLCAiQ29udmVydGVyIiwgIlNvbE5hdGl2ZSIsICJpbXBvcnRfd2ViMyIsICJTb2xOYXRpdmUiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgImltcG9ydF93ZWIzIiwgIlNvbE5hdGl2ZSIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiU29sTmF0aXZlIiwgIkFjY291bnQiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlNvbE5hdGl2ZSIsICJmcyIsICJTb2xOYXRpdmUiLCAiYXNzZXJ0Il0KfQo= \ No newline at end of file diff --git a/packages/test-tools/dist/index.mjs b/packages/test-tools/dist/index.mjs index d43b3c7b3..3921073bb 100644 --- a/packages/test-tools/dist/index.mjs +++ b/packages/test-tools/dist/index.mjs @@ -1,10 +1,10 @@ // src/request-sol.ts -import assert from 'assert'; -import fs from 'fs'; +import assert from "assert"; +import fs from "fs"; // ../suite-utils/src/constants.ts -import { PublicKey } from '@solana/web3.js'; -import SolanaJsonConfig from '@solana-suite/config/load'; +import { PublicKey } from "@solana/web3.js"; +import SolanaJsonConfig from "@solana-suite/config/load"; var Config = SolanaJsonConfig; var Constants; ((Constants2) => { @@ -42,10 +42,7 @@ var Constants; } return false; }; - })( - (WarnningMessage = - Constants2.WarnningMessage || (Constants2.WarnningMessage = {})), - ); + })(WarnningMessage = Constants2.WarnningMessage || (Constants2.WarnningMessage = {})); })(Constants || (Constants = {})); ((Constants2) => { Constants2.currentCluster = Config.cluster.type; @@ -55,40 +52,35 @@ var Constants; Constants2.dasApiUrl = Config.dasApiUrl; let Cluster; ((Cluster2) => { - Cluster2['prd'] = 'mainnet-beta'; - Cluster2['prdMetaplex'] = 'mainnet-beta-metaplex'; - Cluster2['dev'] = 'devnet'; - Cluster2['test'] = 'testnet'; - Cluster2['localhost'] = 'localhost-devnet'; - })((Cluster = Constants2.Cluster || (Constants2.Cluster = {}))); + Cluster2["prd"] = "mainnet-beta"; + Cluster2["prdMetaplex"] = "mainnet-beta-metaplex"; + Cluster2["dev"] = "devnet"; + Cluster2["test"] = "testnet"; + Cluster2["localhost"] = "localhost-devnet"; + })(Cluster = Constants2.Cluster || (Constants2.Cluster = {})); let EndPointUrl; ((EndPointUrl2) => { - EndPointUrl2['prd'] = 'https://api.mainnet-beta.solana.com'; - EndPointUrl2['prdMetaplex'] = 'https://api.metaplex.solana.com'; - EndPointUrl2['dev'] = 'https://api.devnet.solana.com'; - EndPointUrl2['test'] = 'https://api.testnet.solana.com'; - EndPointUrl2['localhost'] = 'http://api.devnet.solana.com'; - })((EndPointUrl = Constants2.EndPointUrl || (Constants2.EndPointUrl = {}))); + EndPointUrl2["prd"] = "https://api.mainnet-beta.solana.com"; + EndPointUrl2["prdMetaplex"] = "https://api.metaplex.solana.com"; + EndPointUrl2["dev"] = "https://api.devnet.solana.com"; + EndPointUrl2["test"] = "https://api.testnet.solana.com"; + EndPointUrl2["localhost"] = "http://api.devnet.solana.com"; + })(EndPointUrl = Constants2.EndPointUrl || (Constants2.EndPointUrl = {})); let BundlrUrl; ((BundlrUrl2) => { - BundlrUrl2['prd'] = 'https://node1.irys.xyz,https://node2.irys.xyz'; - BundlrUrl2['dev'] = 'https://devnet.irys.xyz'; - })((BundlrUrl = Constants2.BundlrUrl || (Constants2.BundlrUrl = {}))); + BundlrUrl2["prd"] = "https://node1.irys.xyz,https://node2.irys.xyz"; + BundlrUrl2["dev"] = "https://devnet.irys.xyz"; + })(BundlrUrl = Constants2.BundlrUrl || (Constants2.BundlrUrl = {})); let DasApiUrl; ((DasApiUrl2) => { - DasApiUrl2['dev'] = - 'https://devnet.helius-rpc.com/?api-key=15319bf4-5b40-4958-ac8d-6313aa55eb92,https://rpc-devnet.helius.xyz?api-key=9f70a843-3274-4ffd-a0a9-323f8b7c0639'; - })((DasApiUrl = Constants2.DasApiUrl || (Constants2.DasApiUrl = {}))); + DasApiUrl2["dev"] = "https://devnet.helius-rpc.com/?api-key=15319bf4-5b40-4958-ac8d-6313aa55eb92,https://rpc-devnet.helius.xyz?api-key=9f70a843-3274-4ffd-a0a9-323f8b7c0639"; + })(DasApiUrl = Constants2.DasApiUrl || (Constants2.DasApiUrl = {})); let NftstorageApiKey; ((NftstorageApiKey2) => { - NftstorageApiKey2['dev'] = - 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJkaWQ6ZXRocjoweERGMjcyN2VkODZhRGU1RTMyZDZDZEJlODc0YzRFNDlEODY1OWZmOEMiLCJpc3MiOiJuZnQtc3RvcmFnZSIsImlhdCI6MTYyMDI2NDk0MzcwNiwibmFtZSI6ImRlbW8ifQ.d4J70mikxRB8a5vwNu6SO5HDA8JaueuseAj7Q_ytMCE'; - })( - (NftstorageApiKey = - Constants2.NftstorageApiKey || (Constants2.NftstorageApiKey = {})), - ); + NftstorageApiKey2["dev"] = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJkaWQ6ZXRocjoweERGMjcyN2VkODZhRGU1RTMyZDZDZEJlODc0YzRFNDlEODY1OWZmOEMiLCJpc3MiOiJuZnQtc3RvcmFnZSIsImlhdCI6MTYyMDI2NDk0MzcwNiwibmFtZSI6ImRlbW8ifQ.d4J70mikxRB8a5vwNu6SO5HDA8JaueuseAj7Q_ytMCE"; + })(NftstorageApiKey = Constants2.NftstorageApiKey || (Constants2.NftstorageApiKey = {})); Constants2.loadConfig = async () => { - Config = await import('@solana-suite/config/load'); + Config = await import("@solana-suite/config/load"); }; Constants2.switchCluster = (param) => { const { cluster: env, customClusterUrl: customClusterUrl2 } = param; @@ -97,46 +89,42 @@ var Constants; return customClusterUrl2[index]; } switch (env) { - case 'mainnet-beta' /* prd */: - return 'https://api.mainnet-beta.solana.com' /* prd */; - case 'mainnet-beta-metaplex' /* prdMetaplex */: - return 'https://api.metaplex.solana.com' /* prdMetaplex */; - case 'testnet' /* test */: - return 'https://api.testnet.solana.com' /* test */; - case 'devnet' /* dev */: - return 'https://api.devnet.solana.com' /* dev */; + case "mainnet-beta" /* prd */: + return "https://api.mainnet-beta.solana.com" /* prd */; + case "mainnet-beta-metaplex" /* prdMetaplex */: + return "https://api.metaplex.solana.com" /* prdMetaplex */; + case "testnet" /* test */: + return "https://api.testnet.solana.com" /* test */; + case "devnet" /* dev */: + return "https://api.devnet.solana.com" /* dev */; default: - return 'http://api.devnet.solana.com' /* localhost */; + return "http://api.devnet.solana.com" /* localhost */; } }; Constants2.switchBundlr = (env) => { switch (env) { - case 'mainnet-beta' /* prd */: { - const urls = 'https://node1.irys.xyz,https://node2.irys.xyz' /* prd */ - .split(','); + case "mainnet-beta" /* prd */: { + const urls = "https://node1.irys.xyz,https://node2.irys.xyz" /* prd */.split(","); const index = Date.now() % urls.length; return urls[index]; } default: { - return 'https://devnet.irys.xyz' /* dev */; + return "https://devnet.irys.xyz" /* dev */; } } }; Constants2.switchDasApi = (env) => { switch (env) { - case 'mainnet-beta' /* prd */: { + case "mainnet-beta" /* prd */: { if (Constants2.dasApiUrl.length < 1) { throw Error(Constants2.WarnningMessage.DAS_API_URL); } - const urls = 'https://node1.irys.xyz,https://node2.irys.xyz' /* prd */ - .split(','); + const urls = "https://node1.irys.xyz,https://node2.irys.xyz" /* prd */.split(","); const index = Date.now() % urls.length; return urls[index]; } default: { - const urls = - 'https://devnet.helius-rpc.com/?api-key=15319bf4-5b40-4958-ac8d-6313aa55eb92,https://rpc-devnet.helius.xyz?api-key=9f70a843-3274-4ffd-a0a9-323f8b7c0639' /* dev */ - .split(','); + const urls = "https://devnet.helius-rpc.com/?api-key=15319bf4-5b40-4958-ac8d-6313aa55eb92,https://rpc-devnet.helius.xyz?api-key=9f70a843-3274-4ffd-a0a9-323f8b7c0639" /* dev */.split(","); const index = Date.now() % urls.length; return urls[index]; } @@ -144,68 +132,64 @@ var Constants; }; Constants2.switchNftStorage = (env) => { switch (env) { - case 'mainnet-beta' /* prd */: + case "mainnet-beta" /* prd */: if (!Constants2.nftStorageApiKey) { throw Error(Constants2.WarnningMessage.NFT_STORAGE_API_KEY); } return Constants2.nftStorageApiKey; default: { - return 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJkaWQ6ZXRocjoweERGMjcyN2VkODZhRGU1RTMyZDZDZEJlODc0YzRFNDlEODY1OWZmOEMiLCJpc3MiOiJuZnQtc3RvcmFnZSIsImlhdCI6MTYyMDI2NDk0MzcwNiwibmFtZSI6ImRlbW8ifQ.d4J70mikxRB8a5vwNu6SO5HDA8JaueuseAj7Q_ytMCE' /* dev */; + return "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJkaWQ6ZXRocjoweERGMjcyN2VkODZhRGU1RTMyZDZDZEJlODc0YzRFNDlEODY1OWZmOEMiLCJpc3MiOiJuZnQtc3RvcmFnZSIsImlhdCI6MTYyMDI2NDk0MzcwNiwibmFtZSI6ImRlbW8ifQ.d4J70mikxRB8a5vwNu6SO5HDA8JaueuseAj7Q_ytMCE" /* dev */; } } }; Constants2.WRAPPED_TOKEN_PROGRAM_ID = new PublicKey( - 'So11111111111111111111111111111111111111112', + "So11111111111111111111111111111111111111112" ); Constants2.MEMO_PROGRAM_ID = new PublicKey( - 'Memo1UhkJRfHyvLMcVucJwxXeuD728EqVDDwQDxFMNo', + "Memo1UhkJRfHyvLMcVucJwxXeuD728EqVDDwQDxFMNo" ); Constants2.METAPLEX_PROGRAM_ID = new PublicKey( - 'metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s', - ); - Constants2.COMMITMENT = 'confirmed'; - Constants2.NFT_STORAGE_GATEWAY_URL = 'https://ipfs.io/ipfs'; - Constants2.IRYS_GATEWAY_URL = 'https://gateway.irys.xyz'; - Constants2.BUNDLR_NETWORK_URL = (0, Constants2.switchBundlr)( - Config.cluster.type, + "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s" ); + Constants2.COMMITMENT = "confirmed"; + Constants2.NFT_STORAGE_GATEWAY_URL = "https://ipfs.io/ipfs"; + Constants2.IRYS_GATEWAY_URL = "https://gateway.irys.xyz"; + Constants2.BUNDLR_NETWORK_URL = (0, Constants2.switchBundlr)(Config.cluster.type); Constants2.DAS_API_URL = (0, Constants2.switchDasApi)(Config.cluster.type); - Constants2.NFT_STORAGE_API_KEY = (0, Constants2.switchNftStorage)( - Config.cluster.type, - ); - Constants2.EXPLORER_SOLSCAN_URL = 'https://solscan.io'; - Constants2.EXPLORER_SOLANAFM_URL = 'https://solana.fm'; - Constants2.EXPLORER_XRAY_URL = 'https://xray.helius.xyz'; + Constants2.NFT_STORAGE_API_KEY = (0, Constants2.switchNftStorage)(Config.cluster.type); + Constants2.EXPLORER_SOLSCAN_URL = "https://solscan.io"; + Constants2.EXPLORER_SOLANAFM_URL = "https://solana.fm"; + Constants2.EXPLORER_XRAY_URL = "https://xray.helius.xyz"; })(Constants || (Constants = {})); console.log(Constants.WarnningMessage.ANNOUNCE); // ../transaction-builder/src/batch.ts import { sendAndConfirmTransaction as sendAndConfirmTransaction2, - Transaction as Transaction2, -} from '@solana/web3.js'; + Transaction as Transaction2 +} from "@solana/web3.js"; // ../node/src/index.ts -import { Connection } from '@solana/web3.js'; +import { Connection } from "@solana/web3.js"; var Node; ((Node2) => { const setted = { - clusterUrl: '', + clusterUrl: "", commitment: Constants.COMMITMENT, - customClusterUrl: [], + customClusterUrl: [] }; Node2.getConnection = () => { if (setted.customClusterUrl.length > 0) { setted.clusterUrl = Constants.switchCluster({ - customClusterUrl: setted.customClusterUrl, + customClusterUrl: setted.customClusterUrl }); } else if (Constants.customClusterUrl.length > 0) { setted.clusterUrl = Constants.switchCluster({ - customClusterUrl: Constants.customClusterUrl, + customClusterUrl: Constants.customClusterUrl }); } else if (!setted.clusterUrl) { setted.clusterUrl = Constants.switchCluster({ - cluster: Constants.currentCluster, + cluster: Constants.currentCluster }); } if (!setted.commitment) { @@ -214,47 +198,47 @@ var Node; return new Connection(setted.clusterUrl, setted.commitment); }; Node2.changeConnection = (param) => { - setted.clusterUrl = ''; + setted.clusterUrl = ""; setted.customClusterUrl = []; setted.commitment = Constants.COMMITMENT; const { cluster, commitment, customClusterUrl } = param; if (commitment) { setted.commitment = commitment; - debugLog('# Node change commitment: ', setted.commitment); + debugLog("# Node change commitment: ", setted.commitment); } if (cluster) { setted.clusterUrl = Constants.switchCluster({ cluster }); - debugLog('# Node change clusterUrl: ', setted.clusterUrl); + debugLog("# Node change clusterUrl: ", setted.clusterUrl); } if (customClusterUrl) { - debugLog('# customClusterUrl: ', customClusterUrl); + debugLog("# customClusterUrl: ", customClusterUrl); setted.clusterUrl = Constants.switchCluster({ customClusterUrl }); setted.customClusterUrl = customClusterUrl; debugLog( - '# Node change cluster, custom cluster url: ', - setted.clusterUrl, + "# Node change cluster, custom cluster url: ", + setted.clusterUrl ); } }; Node2.confirmedSig = async (signature, commitment = Constants.COMMITMENT) => { const connection = Node2.getConnection(); const latestBlockhash = await connection.getLatestBlockhash(); - return await connection - .confirmTransaction( - { - blockhash: latestBlockhash.blockhash, - lastValidBlockHeight: latestBlockhash.lastValidBlockHeight, - signature, - }, - commitment, - ) - .then(Result.ok) - .catch(Result.err); + return await connection.confirmTransaction( + { + blockhash: latestBlockhash.blockhash, + lastValidBlockHeight: latestBlockhash.lastValidBlockHeight, + signature + }, + commitment + ).then(Result.ok).catch(Result.err); }; })(Node || (Node = {})); // ../transaction-builder/src/common.ts -import { sendAndConfirmTransaction, Transaction } from '@solana/web3.js'; +import { + sendAndConfirmTransaction, + Transaction +} from "@solana/web3.js"; var MAX_RETRIES = 3; var TransactionBuilder; ((TransactionBuilder7) => { @@ -273,7 +257,7 @@ var TransactionBuilder; submit = async () => { return Try(async () => { if (!(this instanceof Common2)) { - throw Error('only Instruction object that can use this'); + throw Error("only Instruction object that can use this"); } const transaction = new Transaction(); const blockhashObj = await Node.getConnection().getLatestBlockhash(); @@ -286,13 +270,13 @@ var TransactionBuilder; } this.instructions.forEach((inst) => transaction.add(inst)); const options = { - maxRetries: MAX_RETRIES, + maxRetries: MAX_RETRIES }; return await sendAndConfirmTransaction( Node.getConnection(), transaction, finalSigners, - options, + options ); }); }; @@ -311,7 +295,7 @@ var TransactionBuilder2; if (!a.instructions && !a.signers) { throw Error( `only Instruction object that can use batchSubmit(). - Index: ${i}, Set value: ${JSON.stringify(a)}`, + Index: ${i}, Set value: ${JSON.stringify(a)}` ); } i++; @@ -331,13 +315,13 @@ var TransactionBuilder2; } instructions.map((inst) => transaction.add(inst)); const options = { - maxRetries: MAX_RETRIES, + maxRetries: MAX_RETRIES }; return await sendAndConfirmTransaction2( Node.getConnection(), transaction, finalSigners, - options, + options ); }); }; @@ -348,8 +332,8 @@ var TransactionBuilder2; // ../transaction-builder/src/mint.ts import { sendAndConfirmTransaction as sendAndConfirmTransaction3, - Transaction as Transaction3, -} from '@solana/web3.js'; + Transaction as Transaction3 +} from "@solana/web3.js"; var TransactionBuilder3; ((TransactionBuilder7) => { class Mint { @@ -366,7 +350,7 @@ var TransactionBuilder3; submit = async () => { return Try(async () => { if (!(this instanceof Mint)) { - throw Error('only MintInstruction object that can use this'); + throw Error("only MintInstruction object that can use this"); } const transaction = new Transaction3(); const blockhashObj = await Node.getConnection().getLatestBlockhash(); @@ -379,17 +363,17 @@ var TransactionBuilder3; } this.instructions.forEach((inst) => transaction.add(inst)); const options = { - maxRetries: MAX_RETRIES, + maxRetries: MAX_RETRIES }; if (Node.getConnection().rpcEndpoint === Constants.EndPointUrl.prd) { - debugLog('# Change metaplex cluster on mainnet-beta'); + debugLog("# Change metaplex cluster on mainnet-beta"); Node.changeConnection({ cluster: Constants.Cluster.prdMetaplex }); } return await sendAndConfirmTransaction3( Node.getConnection(), transaction, finalSigners, - options, + options ); }); }; @@ -398,7 +382,9 @@ var TransactionBuilder3; })(TransactionBuilder3 || (TransactionBuilder3 = {})); // ../transaction-builder/src/partial-sign.ts -import { Transaction as Transaction4 } from '@solana/web3.js'; +import { + Transaction as Transaction4 +} from "@solana/web3.js"; var TransactionBuilder4; ((TransactionBuilder7) => { class PartialSign { @@ -413,18 +399,18 @@ var TransactionBuilder4; submit = async (feePayer) => { return Try(async () => { if (!(this instanceof PartialSign)) { - throw Error('only PartialSignInstruction object that can use this'); + throw Error("only PartialSignInstruction object that can use this"); } - const decode = Buffer.from(this.hexInstruction, 'hex'); + const decode = Buffer.from(this.hexInstruction, "hex"); const transactionFromJson = Transaction4.from(decode); transactionFromJson.partialSign(feePayer.toKeypair()); const options = { - maxRetries: MAX_RETRIES, + maxRetries: MAX_RETRIES }; const wireTransaction = transactionFromJson.serialize(); return await Node.getConnection().sendRawTransaction( wireTransaction, - options, + options ); }); }; @@ -438,7 +424,7 @@ var TransactionBuilder5; const LOW_VALUE = 127; const HIGH_VALUE = 16383; const MAX_TRANSACTION_SIZE = 1232; - const compactHeader = (n) => (n <= LOW_VALUE ? 1 : n <= HIGH_VALUE ? 2 : 3); + const compactHeader = (n) => n <= LOW_VALUE ? 1 : n <= HIGH_VALUE ? 2 : 3; const compactArraySize = (n, size) => compactHeader(n) + n * size; TransactionBuilder7.calculateTxSize = (transaction, feePayer) => { const feePayerPk = [feePayer.toBase58()]; @@ -447,46 +433,34 @@ var TransactionBuilder5; const ixsSize = transaction.instructions.reduce((acc, ix) => { ix.keys.forEach(({ pubkey, isSigner }) => { const pk = pubkey.toBase58(); - if (isSigner) signers.add(pk); + if (isSigner) + signers.add(pk); accounts.add(pk); }); accounts.add(ix.programId.toBase58()); const nIndexes = ix.keys.length; const opaqueData = ix.data.length; - return ( - acc + - 1 + // PID index - compactArraySize(nIndexes, 1) + - compactArraySize(opaqueData, 1) - ); + return acc + 1 + // PID index + compactArraySize(nIndexes, 1) + compactArraySize(opaqueData, 1); }, 0); - return ( - compactArraySize(signers.size, 64) + // signatures - 3 + // header - compactArraySize(accounts.size, 32) + // accounts - 32 + // blockhash - compactHeader(transaction.instructions.length) + // instructions - ixsSize - ); + return compactArraySize(signers.size, 64) + // signatures + 3 + // header + compactArraySize(accounts.size, 32) + // accounts + 32 + // blockhash + compactHeader(transaction.instructions.length) + // instructions + ixsSize; }; TransactionBuilder7.isOverTransactionSize = (transaction, feePayer) => { - return ( - (0, TransactionBuilder7.calculateTxSize)(transaction, feePayer) > - MAX_TRANSACTION_SIZE - ); + return (0, TransactionBuilder7.calculateTxSize)(transaction, feePayer) > MAX_TRANSACTION_SIZE; }; })(TransactionBuilder5 || (TransactionBuilder5 = {})); // ../global/src/index.ts -import { - Keypair as Keypair3, - LAMPORTS_PER_SOL, - PublicKey as PublicKey4, -} from '@solana/web3.js'; +import { Keypair as Keypair3, LAMPORTS_PER_SOL, PublicKey as PublicKey4 } from "@solana/web3.js"; // ../account/src/keypair.ts -import { Keypair as Original, PublicKey as PublicKey2 } from '@solana/web3.js'; -import bs from 'bs58'; +import { Keypair as Original, PublicKey as PublicKey2 } from "@solana/web3.js"; +import bs from "bs58"; var Account; ((Account4) => { class Keypair4 { @@ -514,13 +488,13 @@ var Account; const keypair = Original.generate(); return new Keypair4({ pubkey: keypair.publicKey.toString(), - secret: bs.encode(keypair.secretKey), + secret: bs.encode(keypair.secretKey) }); }; static toKeyPair = (keypair) => { return new Keypair4({ pubkey: keypair.publicKey.toString(), - secret: bs.encode(keypair.secretKey), + secret: bs.encode(keypair.secretKey) }); }; } @@ -528,10 +502,10 @@ var Account; })(Account || (Account = {})); // ../account/src/pda.ts -import { PublicKey as PublicKey3 } from '@solana/web3.js'; -import { PROGRAM_ID } from '@metaplex-foundation/mpl-token-metadata'; -import { MPL_BUBBLEGUM_PROGRAM_ID } from '@metaplex-foundation/mpl-bubblegum'; -import BN from 'bn.js'; +import { PublicKey as PublicKey3 } from "@solana/web3.js"; +import { PROGRAM_ID } from "@metaplex-foundation/mpl-token-metadata"; +import { MPL_BUBBLEGUM_PROGRAM_ID } from "@metaplex-foundation/mpl-bubblegum"; +import BN from "bn.js"; var Account2; ((Account4) => { let Pda; @@ -539,37 +513,37 @@ var Account2; Pda2.getMetadata = (address) => { const [publicKey] = PublicKey3.findProgramAddressSync( [ - Buffer.from('metadata'), + Buffer.from("metadata"), PROGRAM_ID.toBuffer(), - address.toPublicKey().toBuffer(), + address.toPublicKey().toBuffer() ], - PROGRAM_ID, + PROGRAM_ID ); return publicKey; }; Pda2.getMasterEdition = (address) => { const [publicKey] = PublicKey3.findProgramAddressSync( [ - Buffer.from('metadata'), + Buffer.from("metadata"), PROGRAM_ID.toBuffer(), address.toPublicKey().toBuffer(), - Buffer.from('edition'), + Buffer.from("edition") ], - PROGRAM_ID, + PROGRAM_ID ); return publicKey; }; Pda2.getTreeAuthority = (address) => { const [publicKey] = PublicKey3.findProgramAddressSync( [address.toPublicKey().toBuffer()], - MPL_BUBBLEGUM_PROGRAM_ID.toPublicKey(), + MPL_BUBBLEGUM_PROGRAM_ID.toPublicKey() ); return publicKey; }; Pda2.getBgumSigner = () => { const [publicKey] = PublicKey3.findProgramAddressSync( - [Buffer.from('collection_cpi', 'utf8')], - MPL_BUBBLEGUM_PROGRAM_ID.toPublicKey(), + [Buffer.from("collection_cpi", "utf8")], + MPL_BUBBLEGUM_PROGRAM_ID.toPublicKey() ); return publicKey; }; @@ -577,33 +551,30 @@ var Account2; const node = new BN.BN(leafIndex); const [assetId] = PublicKey3.findProgramAddressSync( [ - Buffer.from('asset', 'utf8'), + Buffer.from("asset", "utf8"), address.toPublicKey().toBuffer(), - Uint8Array.from(node.toArray('le', 8)), + Uint8Array.from(node.toArray("le", 8)) ], - MPL_BUBBLEGUM_PROGRAM_ID.toPublicKey(), + MPL_BUBBLEGUM_PROGRAM_ID.toPublicKey() ); return assetId.toString(); }; - })((Pda = Account4.Pda || (Account4.Pda = {}))); + })(Pda = Account4.Pda || (Account4.Pda = {})); })(Account2 || (Account2 = {})); // ../account/src/index.ts var Account3 = { ...Account, - ...Account2, + ...Account2 }; // ../global/src/index.ts -import { BigNumber } from 'bignumber.js'; -import bs2 from 'bs58'; -String.prototype.toExplorerUrl = function ( - explorer = 'solscan' /* Solscan */, - options = {}, -) { +import { BigNumber } from "bignumber.js"; +import bs2 from "bs58"; +String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, options = {}) { const endPointUrl = Node.getConnection().rpcEndpoint; - debugLog('# toExplorerUrl rpcEndpoint:', endPointUrl); - let cluster = ''; + debugLog("# toExplorerUrl rpcEndpoint:", endPointUrl); + let cluster = ""; if (endPointUrl === Constants.EndPointUrl.prd) { cluster = Constants.Cluster.prd; } else if (endPointUrl === Constants.EndPointUrl.test) { @@ -614,11 +585,11 @@ String.prototype.toExplorerUrl = function ( cluster = Constants.Cluster.dev; } const addressOrSignature = this.toString(); - let url = ''; + let url = ""; if (options.replacePath) { - if (explorer === 'solanafm' /* SolanaFM */) { + if (explorer === "solanafm" /* SolanaFM */) { url = `${Constants.EXPLORER_SOLANAFM_URL}/${options.replacePath}/${addressOrSignature}?cluster=${cluster}`; - } else if (explorer === 'xray' /* Xray */) { + } else if (explorer === "xray" /* Xray */) { url = `${Constants.EXPLORER_XRAY_URL}/${options.replacePath}/${addressOrSignature}?network=${cluster}`; } else { url = `${Constants.EXPLORER_SOLSCAN_URL}/${options.replacePath}/${addressOrSignature}?cluster=${cluster}`; @@ -626,17 +597,17 @@ String.prototype.toExplorerUrl = function ( return url; } if (Account3.Keypair.isPubkey(addressOrSignature)) { - if (explorer === 'solanafm' /* SolanaFM */) { + if (explorer === "solanafm" /* SolanaFM */) { url = `${Constants.EXPLORER_SOLANAFM_URL}/address/${addressOrSignature}?cluster=${cluster}`; - } else if (explorer === 'xray' /* Xray */) { + } else if (explorer === "xray" /* Xray */) { url = `${Constants.EXPLORER_XRAY_URL}/account/${addressOrSignature}?network=${cluster}`; } else { url = `${Constants.EXPLORER_SOLSCAN_URL}/account/${addressOrSignature}?cluster=${cluster}`; } } else { - if (explorer === 'solanafm' /* SolanaFM */) { + if (explorer === "solanafm" /* SolanaFM */) { url = `${Constants.EXPLORER_SOLANAFM_URL}/tx/${addressOrSignature}?cluster=${cluster}`; - } else if (explorer === 'xray' /* Xray */) { + } else if (explorer === "xray" /* Xray */) { url = `${Constants.EXPLORER_XRAY_URL}/tx/${addressOrSignature}?network=${cluster}`; } else { url = `${Constants.EXPLORER_SOLSCAN_URL}/tx/${addressOrSignature}?cluster=${cluster}`; @@ -644,23 +615,23 @@ String.prototype.toExplorerUrl = function ( } return url; }; -String.prototype.toPublicKey = function () { +String.prototype.toPublicKey = function() { if (!Account3.Keypair.isPubkey(this.toString())) { throw Error(`No match KeyPair.PubKey: ${this.toString()}`); } return new PublicKey4(this.toString()); }; -String.prototype.toKeypair = function () { +String.prototype.toKeypair = function() { if (!Account3.Keypair.isSecret(this.toString())) { throw Error(`No match KeyPair.Secret: ${this.toString()}`); } const decoded = bs2.decode(this.toString()); return Keypair3.fromSecretKey(decoded); }; -Number.prototype.toSol = function () { +Number.prototype.toSol = function() { return BigNumber(this).div(LAMPORTS_PER_SOL).toNumber(); }; -Number.prototype.toLamports = function () { +Number.prototype.toLamports = function() { return BigNumber(this).times(LAMPORTS_PER_SOL).toNumber(); }; @@ -670,7 +641,7 @@ var TransactionBuilder6 = { ...TransactionBuilder5, ...TransactionBuilder3, ...TransactionBuilder, - ...TransactionBuilder4, + ...TransactionBuilder4 }; // ../suite-utils/src/shared.ts @@ -682,20 +653,16 @@ var overwriteObject = (object, targets) => { }); return that; }; -var debugLog = (data1, data2 = '', data3 = '', data4 = '') => { - if (Constants.isDebugging === 'true' || process.env.DEBUG === 'true') { - console.log('[DEBUG]', data1, data2, data3, data4); +var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { + if (Constants.isDebugging === "true" || process.env.DEBUG === "true") { + console.log("[DEBUG]", data1, data2, data3, data4); } }; var sleep = async (sec) => { return new Promise((r) => setTimeout(r, sec * 1e3)); }; var isPromise = (obj) => { - return ( - !!obj && - (typeof obj === 'object' || typeof obj === 'function') && - typeof obj.then === 'function' - ); + return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; }; function Try(input, finallyInput) { try { @@ -703,7 +670,7 @@ function Try(input, finallyInput) { if (isPromise(v)) { return v.then( (x) => Result.ok(x), - (err) => Result.err(err), + (err) => Result.err(err) ); } else { return Result.ok(v); @@ -715,7 +682,7 @@ function Try(input, finallyInput) { return Result.err(Error(e)); } finally { if (finallyInput) { - debugLog('# finally input:', finallyInput); + debugLog("# finally input:", finallyInput); finallyInput(); } } @@ -732,7 +699,7 @@ var AbstractResult = class { unwrap(ok, err) { const r = this._chain( (value) => Result.ok(ok ? ok(value) : value), - (error) => (err ? Result.ok(err(error)) : Result.err(error)), + (error) => err ? Result.ok(err(error)) : Result.err(error) ); if (r.isErr) { throw r.error; @@ -742,7 +709,7 @@ var AbstractResult = class { map(ok, err) { return this._chain( (value) => Result.ok(ok(value)), - (error) => Result.err(err ? err(error) : error), + (error) => Result.err(err ? err(error) : error) ); } chain(ok, err) { @@ -751,7 +718,7 @@ var AbstractResult = class { match(ok, err) { this._chain( (value) => Result.ok(ok(value)), - (error) => Result.err(err(error)), + (error) => Result.err(err(error)) ); } /// single TransactionBuilder //// @@ -759,7 +726,7 @@ var AbstractResult = class { async submit(feePayer) { const res = this.map( async (ok) => { - debugLog('# result single submit: ', ok); + debugLog("# result single submit: ", ok); if (feePayer) { const obj = ok; return await obj.submit(feePayer); @@ -770,7 +737,7 @@ var AbstractResult = class { }, (err) => { return err; - }, + } ); if (res.isErr) { return Result.err(res.error); @@ -778,21 +745,21 @@ var AbstractResult = class { return res.value; } }; -Array.prototype.submit = async function (feePayer) { +Array.prototype.submit = async function(feePayer) { if (feePayer) { let i = 1; for await (const obj of this) { if (obj.isErr) { return obj; } else if (obj.value.canSubmit) { - debugLog('# Result batch canSubmit'); + debugLog("# Result batch canSubmit"); const sig = await obj.submit(feePayer); if (sig.isErr) { return sig; } await Node.confirmedSig(sig.value); } else { - debugLog('# Result batch other than canSubmit'); + debugLog("# Result batch other than canSubmit"); if (this.length == i) { return obj.submit(feePayer); } @@ -808,10 +775,10 @@ Array.prototype.submit = async function (feePayer) { } else if (obj.isOk) { instructions.push(obj.value); } else { - return Result.err(Error('Only Array Instruction object')); + return Result.err(Error("Only Array Instruction object")); } } - debugLog('# Result batch submit: ', instructions); + debugLog("# Result batch submit: ", instructions); return new TransactionBuilder6.Batch().submit(instructions); } }; @@ -884,7 +851,7 @@ var Converter; } return { key: input.toPublicKey(), - verified: false, + verified: false }; }; Collection2.intoUser = (output) => { @@ -893,24 +860,21 @@ var Converter; } return { address: output.key.toString(), - verified: output.verified, + verified: output.verified }; }; - })((Collection = Converter15.Collection || (Converter15.Collection = {}))); + })(Collection = Converter15.Collection || (Converter15.Collection = {})); let CollectionMint; ((CollectionMint2) => { CollectionMint2.intoUser = (output) => { const res = output.find((value) => { - if (value.group_key === 'collection') { + if (value.group_key === "collection") { return value.group_value; } }); - return res ? res.group_value : ''; + return res ? res.group_value : ""; }; - })( - (CollectionMint = - Converter15.CollectionMint || (Converter15.CollectionMint = {})), - ); + })(CollectionMint = Converter15.CollectionMint || (Converter15.CollectionMint = {})); })(Converter || (Converter = {})); // ../converter/src/creators.ts @@ -926,7 +890,7 @@ var Converter2; return { address: data.address.toPublicKey(), share: data.share, - verified: false, + verified: false }; }); }; @@ -938,7 +902,7 @@ var Converter2; return { address: data.address.toPublicKey(), share: data.share, - verified: false, + verified: false }; }); }; @@ -950,15 +914,18 @@ var Converter2; return { address: data.address.toString(), share: data.share, - verified: data.verified, + verified: data.verified }; }); }; - })((Creators = Converter15.Creators || (Converter15.Creators = {}))); + })(Creators = Converter15.Creators || (Converter15.Creators = {})); })(Converter2 || (Converter2 = {})); // ../converter/src/compressed-nft-metadata.ts -import { TokenProgramVersion, TokenStandard } from 'mpl-bubblegum-instruction'; +import { + TokenProgramVersion, + TokenStandard +} from "mpl-bubblegum-instruction"; var Converter3; ((Converter15) => { let CompressedNftMetadata; @@ -976,14 +943,10 @@ var Converter3; isMutable: input.isMutable ?? false, editionNonce: 0, tokenStandard: TokenStandard.NonFungible, - tokenProgramVersion: TokenProgramVersion.Original, + tokenProgramVersion: TokenProgramVersion.Original }; }; - })( - (CompressedNftMetadata = - Converter15.CompressedNftMetadata || - (Converter15.CompressedNftMetadata = {})), - ); + })(CompressedNftMetadata = Converter15.CompressedNftMetadata || (Converter15.CompressedNftMetadata = {})); })(Converter3 || (Converter3 = {})); // ../converter/src/royalty.ts @@ -998,7 +961,7 @@ var Converter4; Royalty2.intoUser = (percentage) => { return percentage * Royalty2.THRESHOLD; }; - })((Royalty = Converter15.Royalty || (Converter15.Royalty = {}))); + })(Royalty = Converter15.Royalty || (Converter15.Royalty = {})); })(Converter4 || (Converter4 = {})); // ../converter/src/nft.ts @@ -1010,7 +973,7 @@ var Converter5; return { mint: output.onchain.id.toString(), collectionMint: Converter.CollectionMint.intoUser( - output.onchain.grouping, + output.onchain.grouping ), authorities: output.onchain.authorities, royalty: Converter4.Royalty.intoUser(output.onchain.royalty.percent), @@ -1025,10 +988,10 @@ var Converter5; editionNonce: output.onchain.supply.edition_nonce, primarySaleHappened: output.onchain.royalty.primary_sale_happened, dateTime: convertTimestampToDateTime(output.offchain.created_at), - offchain: output.offchain, + offchain: output.offchain }; }; - })((Nft = Converter15.Nft || (Converter15.Nft = {}))); + })(Nft = Converter15.Nft || (Converter15.Nft = {})); })(Converter5 || (Converter5 = {})); // ../converter/src/memo.ts @@ -1036,20 +999,15 @@ var Converter6; ((Converter15) => { let Memo; ((Memo2) => { - Memo2.intoUserSide = ( - output, - meta, - outputTransfer, - mappingTokenAccount, - ) => { + Memo2.intoUserSide = (output, meta, outputTransfer, mappingTokenAccount) => { const history = {}; - if (outputTransfer && outputTransfer.program !== '') { - if (mappingTokenAccount && outputTransfer.program === 'spl-token') { + if (outputTransfer && outputTransfer.program !== "") { + if (mappingTokenAccount && outputTransfer.program === "spl-token") { const foundSource = mappingTokenAccount.find( - (m) => m.account === outputTransfer.parsed.info.source, + (m) => m.account === outputTransfer.parsed.info.source ); const foundDest = mappingTokenAccount.find( - (m) => m.account === outputTransfer.parsed.info.destination, + (m) => m.account === outputTransfer.parsed.info.destination ); history.mint = outputTransfer.parsed.info.mint; foundSource && (history.source = foundSource.owner); @@ -1064,15 +1022,12 @@ var Converter6; history.dateTime = convertTimestampToDateTime(meta.blockTime); history.sig = meta.transaction.signatures[0]; history.innerInstruction = false; - if ( - meta.meta?.innerInstructions && - meta.meta?.innerInstructions.length !== 0 - ) { + if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { history.innerInstruction = true; } return history; }; - })((Memo = Converter15.Memo || (Converter15.Memo = {}))); + })(Memo = Converter15.Memo || (Converter15.Memo = {})); })(Converter6 || (Converter6 = {})); // ../converter/src/mint.ts @@ -1090,15 +1045,12 @@ var Converter7; history.dateTime = convertTimestampToDateTime(meta.blockTime); history.sig = meta.transaction.signatures[0]; history.innerInstruction = false; - if ( - meta.meta?.innerInstructions && - meta.meta?.innerInstructions.length !== 0 - ) { + if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { history.innerInstruction = true; } return history; }; - })((Mint = Converter15.Mint || (Converter15.Mint = {}))); + })(Mint = Converter15.Mint || (Converter15.Mint = {})); })(Converter7 || (Converter7 = {})); // ../converter/src/regular-nft-metadata.ts @@ -1114,13 +1066,10 @@ var Converter8; sellerFeeBasisPoints, creators: Converter2.Creators.intoInfra(input.creators), collection: Converter.Collection.intoInfra(input.collection), - uses: input.uses || null, + uses: input.uses || null }; }; - })( - (RegularNftMetadata = - Converter15.RegularNftMetadata || (Converter15.RegularNftMetadata = {})), - ); + })(RegularNftMetadata = Converter15.RegularNftMetadata || (Converter15.RegularNftMetadata = {})); })(Converter8 || (Converter8 = {})); // ../converter/src/properties.ts @@ -1128,12 +1077,7 @@ var Converter9; ((Converter15) => { let Properties; ((Properties2) => { - Properties2.intoInfra = async ( - input, - callbackFunc, - storageType, - feePayer, - ) => { + Properties2.intoInfra = async (input, callbackFunc, storageType, feePayer) => { if (!input || !input.files) { return {}; } @@ -1148,15 +1092,15 @@ var Converter9; } return overwriteObject(file, [ { - existsKey: 'filePath', - will: { key: 'uri', value: res.value }, - }, + existsKey: "filePath", + will: { key: "uri", value: res.value } + } ]); - }), + }) ); return { ...input, files }; }; - })((Properties = Converter15.Properties || (Converter15.Properties = {}))); + })(Properties = Converter15.Properties || (Converter15.Properties = {})); })(Converter9 || (Converter9 = {})); // ../converter/src/uses.ts @@ -1170,7 +1114,7 @@ var Converter10; } return output; }; - })((Uses = Converter15.Uses || (Converter15.Uses = {}))); + })(Uses = Converter15.Uses || (Converter15.Uses = {})); })(Converter10 || (Converter10 = {})); // ../converter/src/token-metadata.ts @@ -1186,7 +1130,7 @@ var Converter11; sellerFeeBasisPoints, creators: Converter2.Creators.intoInfra(input.creators), collection: null, - uses: input.uses || null, + uses: input.uses || null }; }; TokenMetadata2.intoUser = (output, tokenAmount) => { @@ -1194,24 +1138,19 @@ var Converter11; mint: output.onchain.mint.toString(), royalty: output.onchain.data.sellerFeeBasisPoints, name: (0, TokenMetadata2.deleteNullStrings)(output.onchain.data.name), - symbol: (0, TokenMetadata2.deleteNullStrings)( - output.onchain.data.symbol, - ), + symbol: (0, TokenMetadata2.deleteNullStrings)(output.onchain.data.symbol), tokenAmount, uri: (0, TokenMetadata2.deleteNullStrings)(output.onchain.data.uri), creators: Converter2.Creators.intoUser(output.onchain.data.creators), uses: Converter10.Uses.intoUserSide(output.onchain.uses), dateTime: convertTimestampToDateTime(output.offchain.created_at), - offchain: output.offchain, + offchain: output.offchain }; }; TokenMetadata2.deleteNullStrings = (str) => { - return str.replace(/\0/g, ''); + return str.replace(/\0/g, ""); }; - })( - (TokenMetadata = - Converter15.TokenMetadata || (Converter15.TokenMetadata = {})), - ); + })(TokenMetadata = Converter15.TokenMetadata || (Converter15.TokenMetadata = {})); })(Converter11 || (Converter11 = {})); // ../converter/src/transfer-checked.ts @@ -1223,10 +1162,10 @@ var Converter12; const history = {}; if (mappingTokenAccount) { const foundSource = mappingTokenAccount.find( - (m) => m.account === output.parsed.info.source, + (m) => m.account === output.parsed.info.source ); const foundDest = mappingTokenAccount.find( - (m) => m.account === output.parsed.info.destination, + (m) => m.account === output.parsed.info.destination ); foundSource && (history.source = foundSource.owner); foundDest && (history.destination = foundDest.owner); @@ -1239,18 +1178,12 @@ var Converter12; history.dateTime = convertTimestampToDateTime(meta.blockTime); history.sig = meta.transaction.signatures[0]; history.innerInstruction = false; - if ( - meta.meta?.innerInstructions && - meta.meta?.innerInstructions.length !== 0 - ) { + if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { history.innerInstruction = true; } return history; }; - })( - (TransferChecked = - Converter15.TransferChecked || (Converter15.TransferChecked = {})), - ); + })(TransferChecked = Converter15.TransferChecked || (Converter15.TransferChecked = {})); })(Converter12 || (Converter12 = {})); // ../converter/src/transfer.ts @@ -1270,15 +1203,12 @@ var Converter13; history.dateTime = convertTimestampToDateTime(meta.blockTime); history.sig = meta.transaction.signatures[0]; history.innerInstruction = false; - if ( - meta.meta?.innerInstructions && - meta.meta?.innerInstructions.length !== 0 - ) { + if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { history.innerInstruction = true; } return history; }; - })((Transfer = Converter15.Transfer || (Converter15.Transfer = {}))); + })(Transfer = Converter15.Transfer || (Converter15.Transfer = {})); })(Converter13 || (Converter13 = {})); // ../converter/src/index.ts @@ -1295,7 +1225,7 @@ var Converter14 = { ...Converter11, ...Converter12, ...Converter13, - ...Converter10, + ...Converter10 }; // ../validator/src/index.ts @@ -1303,14 +1233,14 @@ var Validator; ((Validator2) => { let Message; ((Message2) => { - Message2.SUCCESS = 'success'; - Message2.SMALL_NUMBER = 'too small'; - Message2.BIG_NUMBER = 'too big'; - Message2.LONG_LENGTH = 'too long'; - Message2.EMPTY = 'invalid empty value'; - Message2.INVALID_URL = 'invalid url'; - Message2.ONLY_NODE_JS = '`string` type is only Node.js'; - })((Message = Validator2.Message || (Validator2.Message = {}))); + Message2.SUCCESS = "success"; + Message2.SMALL_NUMBER = "too small"; + Message2.BIG_NUMBER = "too big"; + Message2.LONG_LENGTH = "too long"; + Message2.EMPTY = "invalid empty value"; + Message2.INVALID_URL = "invalid url"; + Message2.ONLY_NODE_JS = "`string` type is only Node.js"; + })(Message = Validator2.Message || (Validator2.Message = {})); Validator2.NAME_LENGTH = 32; Validator2.SYMBOL_LENGTH = 10; Validator2.URL_LENGTH = 200; @@ -1319,19 +1249,19 @@ var Validator; Validator2.ROYALTY_MIN = 0; Validator2.isRoyalty = (royalty) => { return Try(() => { - const key = 'royalty'; + const key = "royalty"; if (royalty !== 0 && !royalty) { throw createError(key, Message.EMPTY, royalty); } if (royalty < Validator2.ROYALTY_MIN) { throw createError(key, Message.SMALL_NUMBER, royalty, { threshold: Validator2.ROYALTY_MIN, - condition: 'underMin', + condition: "underMin" }); } else if (royalty > Validator2.ROYALTY_MAX) { throw createError(key, Message.BIG_NUMBER, royalty, { threshold: Validator2.ROYALTY_MAX, - condition: 'overMax', + condition: "overMax" }); } return Message.SUCCESS; @@ -1339,22 +1269,19 @@ var Validator; }; Validator2.isSellerFeeBasisPoints = (royalty) => { return Try(() => { - const key = 'sellerFeeBasisPoints/seller_fee_basis_points'; + const key = "sellerFeeBasisPoints/seller_fee_basis_points"; if (royalty !== 0 && !royalty) { throw createError(key, Message.EMPTY, royalty); } if (royalty < Validator2.ROYALTY_MIN) { throw createError(key, Message.SMALL_NUMBER, royalty, { threshold: Validator2.ROYALTY_MIN, - condition: 'underMin', + condition: "underMin" }); - } else if ( - royalty > - Validator2.ROYALTY_MAX * Converter14.Royalty.THRESHOLD - ) { + } else if (royalty > Validator2.ROYALTY_MAX * Converter14.Royalty.THRESHOLD) { throw createError(key, Message.BIG_NUMBER, royalty, { threshold: Validator2.SELLER_FEE_BASIS_POINTS_MAX, - condition: 'overMax', + condition: "overMax" }); } return Message.SUCCESS; @@ -1362,14 +1289,14 @@ var Validator; }; Validator2.isName = (name) => { return Try(() => { - const key = 'name'; + const key = "name"; if (!name) { throw createError(key, Message.EMPTY, name); } if (byteLength(name) > Validator2.NAME_LENGTH) { throw createError(key, Message.LONG_LENGTH, name, { threshold: Validator2.NAME_LENGTH, - condition: 'overMax', + condition: "overMax" }); } return Message.SUCCESS; @@ -1377,20 +1304,20 @@ var Validator; }; Validator2.isSymbol = (symbol) => { return Try(() => { - const key = 'symbol'; + const key = "symbol"; if (!symbol) { throw createError(key, Message.EMPTY, symbol); } if (byteLength(symbol) > Validator2.SYMBOL_LENGTH) { throw createError(key, Message.LONG_LENGTH, symbol, { threshold: Validator2.SYMBOL_LENGTH, - condition: 'overMax', + condition: "overMax" }); } return Message.SUCCESS; }); }; - Validator2.isImageUrl = (image) => isUriOrImage(image, 'image'); + Validator2.isImageUrl = (image) => isUriOrImage(image, "image"); Validator2.checkAll = (metadata) => { return Try(() => { const keys = Object.keys(metadata); @@ -1398,36 +1325,32 @@ var Validator; keys.map((key) => { let res; switch (key) { - case 'image': + case "image": if (key in metadata && metadata.image) { res = (0, Validator2.isImageUrl)(metadata.image); } break; - case 'royalty': + case "royalty": if (key in metadata && metadata.royalty) { res = (0, Validator2.isRoyalty)(metadata.royalty); } break; - case 'seller_fee_basis_points': + case "seller_fee_basis_points": if (key in metadata && metadata.seller_fee_basis_points) { - res = (0, Validator2.isSellerFeeBasisPoints)( - metadata.seller_fee_basis_points, - ); + res = (0, Validator2.isSellerFeeBasisPoints)(metadata.seller_fee_basis_points); } break; - case 'sellerFeeBasisPoints': + case "sellerFeeBasisPoints": if (key in metadata) { - res = (0, Validator2.isSellerFeeBasisPoints)( - metadata.sellerFeeBasisPoints, - ); + res = (0, Validator2.isSellerFeeBasisPoints)(metadata.sellerFeeBasisPoints); } break; - case 'name': + case "name": if (metadata.name) { res = (0, Validator2.isName)(metadata.name); } break; - case 'symbol': + case "symbol": if (metadata.symbol) { res = (0, Validator2.isSymbol)(metadata.symbol); } @@ -1438,8 +1361,7 @@ var Validator; } }); if (results.length > 0) { - const message = - 'Caught in the validation errors. see information e.g: err.details'; + const message = "Caught in the validation errors. see information e.g: err.details"; throw new ValidatorError(message, results); } return Message.SUCCESS; @@ -1466,7 +1388,7 @@ var Validator; if (byteLength(imageOrUri) > Validator2.URL_LENGTH) { throw createError(key, Message.LONG_LENGTH, imageOrUri, { threshold: Validator2.URL_LENGTH, - condition: 'overMax', + condition: "overMax" }); } if (!/https?:\/\/[-_.!~*\\()a-zA-Z0-9;?:&=+,%#]+/g.test(imageOrUri)) { @@ -1494,32 +1416,24 @@ var Signatures; } return res; }; - Signatures2.getForAdress = async ( - pubkey, - parser, - callback, - options, - histories = [], - ) => { + Signatures2.getForAdress = async (pubkey, parser, callback, options, histories = []) => { try { - debugLog('# options: ', options); + debugLog("# options: ", options); const transactions = await Node.getConnection().getSignaturesForAddress( pubkey.toPublicKey(), { - limit: options.narrowDown, - }, + limit: options.narrowDown + } ); - debugLog('# transactions count:', transactions.length); + debugLog("# transactions count:", transactions.length); for (const transaction of transactions) { - parseForTransaction(transaction.signature) - .then((signature) => { - const history = parser(signature); - if (history) { - histories.push(history); - callback(Result.ok(histories)); - } - }) - .catch((e) => callback(Result.err(e))); + parseForTransaction(transaction.signature).then((signature) => { + const history = parser(signature); + if (history) { + histories.push(history); + callback(Result.ok(histories)); + } + }).catch((e) => callback(Result.err(e))); await sleep(options.waitTime); } } catch (e) { @@ -1533,17 +1447,17 @@ var Signatures; // ../types/src/transaction-filter/index.ts var FilterOptions = { Transfer: { - program: ['system', 'spl-token'], - action: ['transfer', 'transferChecked'], + program: ["system", "spl-token"], + action: ["transfer", "transferChecked"] }, Memo: { - program: ['spl-memo'], - action: ['*'], + program: ["spl-memo"], + action: ["*"] }, Mint: { - program: ['spl-token'], - action: ['mintTo', 'mintToChecked'], - }, + program: ["spl-token"], + action: ["mintTo", "mintToChecked"] + } }; // ../transaction-filter/src/transaction-filter.ts @@ -1554,14 +1468,14 @@ var TransactionFilter; if (Object.keys(transaction).length === 0) { return postTokenAccount; } - const accountKeys = transaction.transaction.message.accountKeys.map((t) => - t.pubkey.toString(), + const accountKeys = transaction.transaction.message.accountKeys.map( + (t) => t.pubkey.toString() ); transaction.meta?.postTokenBalances?.forEach((t) => { if (accountKeys[t.accountIndex] && t.owner) { const v = { account: accountKeys[t.accountIndex], - owner: t.owner, + owner: t.owner }; postTokenAccount.push(v); } @@ -1569,16 +1483,13 @@ var TransactionFilter; return postTokenAccount; }; TransactionFilter2.isParsedInstruction = (arg) => { - return arg !== null && typeof arg === 'object' && 'parsed' in arg; + return arg !== null && typeof arg === "object" && "parsed" in arg; }; TransactionFilter2.parse = (filterType, moduleName) => (txMeta) => { let history; - if ( - filterType === 'mint' /* Mint */ && - moduleName === 'system' /* SolNative */ - ) { + if (filterType === "mint" /* Mint */ && moduleName === "system" /* SolNative */) { throw Error( - "This filterType('FilterType.Mint') can not use from SolNative module", + "This filterType('FilterType.Mint') can not use from SolNative module" ); } if (!txMeta || !txMeta.transaction) { @@ -1588,28 +1499,22 @@ var TransactionFilter; txMeta.transaction.message.instructions.forEach((instruction) => { if ((0, TransactionFilter2.isParsedInstruction)(instruction)) { switch (filterType) { - case 'memo' /* Memo */: { + case "memo" /* Memo */: { if (FilterOptions.Memo.program.includes(instruction.program)) { let instructionTransfer; txMeta.transaction.message.instructions.forEach( (instruction2) => { - if ( - (0, TransactionFilter2.isParsedInstruction)(instruction2) && - FilterOptions.Transfer.program.includes( - instruction2.program, - ) - ) { + if ((0, TransactionFilter2.isParsedInstruction)(instruction2) && FilterOptions.Transfer.program.includes( + instruction2.program + )) { instructionTransfer = instruction2; } - }, + } ); - if ( - instructionTransfer && - moduleName !== instructionTransfer['program'] - ) { + if (instructionTransfer && moduleName !== instructionTransfer["program"]) { debugLog( - '# FilterType.Memo break instruction: ', - instructionTransfer, + "# FilterType.Memo break instruction: ", + instructionTransfer ); break; } @@ -1617,47 +1522,45 @@ var TransactionFilter; instruction, txMeta, instructionTransfer, - postTokenAccount, + postTokenAccount ); } break; } - case 'only-memo' /* OnlyMemo */: { + case "only-memo" /* OnlyMemo */: { if (FilterOptions.Memo.program.includes(instruction.program)) { let instructionTransfer; history = Converter14.Memo.intoUserSide( instruction, txMeta, instructionTransfer, - postTokenAccount, + postTokenAccount ); } break; } - case 'mint' /* Mint */: { - if ( - FilterOptions.Mint.program.includes(instruction.program) && - FilterOptions.Mint.action.includes(instruction.parsed.type) - ) { + case "mint" /* Mint */: { + if (FilterOptions.Mint.program.includes(instruction.program) && FilterOptions.Mint.action.includes( + instruction.parsed.type + )) { history = Converter14.Mint.intoUserSide(instruction, txMeta); } break; } - case 'transfer' /* Transfer */: - if ( - moduleName === instruction.program && - FilterOptions.Transfer.action.includes(instruction.parsed.type) - ) { - if (instruction.parsed.type === 'transferChecked') { + case "transfer" /* Transfer */: + if (moduleName === instruction.program && FilterOptions.Transfer.action.includes( + instruction.parsed.type + )) { + if (instruction.parsed.type === "transferChecked") { history = Converter14.TransferChecked.intoUserSide( instruction, txMeta, - postTokenAccount, + postTokenAccount ); } else { history = Converter14.Transfer.intoUserSide( instruction, - txMeta, + txMeta ); } } @@ -1674,12 +1577,12 @@ var SolNative; SolNative6.findByOwner = async (owner) => { return Try(async () => { const res = await Node.getConnection().getParsedAccountInfo( - owner.toPublicKey(), + owner.toPublicKey() ); const info = { sol: 0, lamports: 0, - owner: owner.toString(), + owner: owner.toString() }; if (TransactionFilter.isParsedInstruction(res.value?.data)) { const parsedAccountData = res.value?.data; @@ -1695,7 +1598,7 @@ var SolNative; })(SolNative || (SolNative = {})); // ../suite-sol-native/src/gas-less-transfer.ts -import { SystemProgram, Transaction as Transaction5 } from '@solana/web3.js'; +import { SystemProgram, Transaction as Transaction5 } from "@solana/web3.js"; var SolNative2; ((SolNative6) => { const RADIX = 10; @@ -1706,49 +1609,41 @@ var SolNative2; const tx = new Transaction5({ blockhash: blockHashObj.blockhash, lastValidBlockHeight: blockHashObj.lastValidBlockHeight, - feePayer: feePayer.toPublicKey(), + feePayer: feePayer.toPublicKey() }).add( SystemProgram.transfer({ fromPubkey: ownerPublicKey, toPubkey: dest.toPublicKey(), - lamports: parseInt(`${amount.toLamports()}`, RADIX), - }), + lamports: parseInt(`${amount.toLamports()}`, RADIX) + }) ); tx.partialSign(owner.toKeypair()); const serializedTx = tx.serialize({ - requireAllSignatures: false, + requireAllSignatures: false }); - const hex = serializedTx.toString('hex'); + const hex = serializedTx.toString("hex"); return new TransactionBuilder6.PartialSign(hex); }); }; })(SolNative2 || (SolNative2 = {})); // ../suite-sol-native/src/transfer.ts -import { SystemProgram as SystemProgram2 } from '@solana/web3.js'; +import { SystemProgram as SystemProgram2 } from "@solana/web3.js"; var SolNative3; ((SolNative6) => { const RADIX = 10; - SolNative6.transfer = ( - owner, - dest, - ownerOrMultisig, - amount, - options = {}, - ) => { + SolNative6.transfer = (owner, dest, ownerOrMultisig, amount, options = {}) => { return Try(() => { const inst = SystemProgram2.transfer({ fromPubkey: owner.toPublicKey(), toPubkey: dest.toPublicKey(), - lamports: parseInt(`${amount.toLamports()}`, RADIX), + lamports: parseInt(`${amount.toLamports()}`, RADIX) }); - const payer = options.feePayer - ? options.feePayer.toKeypair() - : ownerOrMultisig[0].toKeypair(); + const payer = options.feePayer ? options.feePayer.toKeypair() : ownerOrMultisig[0].toKeypair(); return new TransactionBuilder6.Common( [inst], ownerOrMultisig.map((s) => s.toKeypair()), - payer, + payer ); }); }; @@ -1759,18 +1654,12 @@ import { createCloseAccountInstruction, createMint, createTransferInstruction, - createWrappedNativeAccount, -} from '@solana/spl-token'; + createWrappedNativeAccount +} from "@solana/spl-token"; var SolNative4; ((SolNative6) => { const RADIX = 10; - SolNative6.transferWithMultisig = async ( - owner, - dest, - multisig, - amount, - options = {}, - ) => { + SolNative6.transferWithMultisig = async (owner, dest, multisig, amount, options = {}) => { return Try(async () => { const connection = Node.getConnection(); const payer = options.feePayer ? options.feePayer : multisig[0]; @@ -1779,29 +1668,29 @@ var SolNative4; connection, payer.toKeypair(), owner.toPublicKey(), - parseInt(`${amount.toLamports()}`, RADIX), + parseInt(`${amount.toLamports()}`, RADIX) ); - debugLog('# wrapped sol: ', wrapped.toBase58()); + debugLog("# wrapped sol: ", wrapped.toBase58()); const instructions = []; const token = await createMint( connection, payer.toKeypair(), owner.toPublicKey(), owner.toPublicKey(), - 0, + 0 ); const sourceToken = await Account3.Associated.retryGetOrCreate( token.toString(), owner, - payer, + payer ); - debugLog('# sourceToken: ', sourceToken); + debugLog("# sourceToken: ", sourceToken); const destToken = await Account3.Associated.retryGetOrCreate( token.toString(), wrapped.toString(), - payer, + payer ); - debugLog('# destToken: ', destToken); + debugLog("# destToken: ", destToken); instructions.push( createTransferInstruction( sourceToken.toPublicKey(), @@ -1809,21 +1698,21 @@ var SolNative4; owner.toPublicKey(), parseInt(`${amount}`, RADIX), // No lamports, its sol - keypairs, - ), + keypairs + ) ); instructions.push( createCloseAccountInstruction( wrapped, dest.toPublicKey(), owner.toPublicKey(), - keypairs, - ), + keypairs + ) ); return new TransactionBuilder6.Common( instructions, multisig.map((s) => s.toKeypair()), - payer.toKeypair(), + payer.toKeypair() ); }); }; @@ -1834,34 +1723,31 @@ var SolNative5 = { ...SolNative, ...SolNative2, ...SolNative3, - ...SolNative4, + ...SolNative4 }; // src/request-sol.ts -var LOCAL_KEYPAIR_FILE = 'solana-localhost-devnet-keypair'; +var LOCAL_KEYPAIR_FILE = "solana-localhost-devnet-keypair"; var requestSol = async (pubkey, sol = 0.1) => { - let bufferStr = ''; + let bufferStr = ""; try { - bufferStr = fs.readFileSync(`./${LOCAL_KEYPAIR_FILE}`, 'utf8'); + bufferStr = fs.readFileSync(`./${LOCAL_KEYPAIR_FILE}`, "utf8"); } catch (_) { - console.log('_'); - bufferStr = fs.readFileSync(`../../${LOCAL_KEYPAIR_FILE}`, 'utf8'); + console.log("_"); + bufferStr = fs.readFileSync(`../../${LOCAL_KEYPAIR_FILE}`, "utf8"); } - console.log('Now load...please wait'); + console.log("Now load...please wait"); const keypair = JSON.parse(bufferStr).feePayer; - const sig = SolNative5.transfer( - keypair.pubkey, - pubkey, - [keypair.secret], - sol, - ); + const sig = SolNative5.transfer(keypair.pubkey, pubkey, [keypair.secret], sol); (await sig.submit()).match( (ok) => { Node.confirmedSig(ok); - console.log('Done transfer'); + console.log("Done transfer"); }, - (err) => assert.fail(err), + (err) => assert.fail(err) ); }; -export { requestSol }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL3JlcXVlc3Qtc29sLnRzIiwgIi4uLy4uL3N1aXRlLXV0aWxzL3NyYy9jb25zdGFudHMudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvYmF0Y2gudHMiLCAiLi4vLi4vbm9kZS9zcmMvaW5kZXgudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY29tbW9uLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL21pbnQudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvcGFydGlhbC1zaWduLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2NhbGN1bGF0ZS10eHNpemUudHMiLCAiLi4vLi4vZ2xvYmFsL3NyYy9pbmRleC50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9rZXlwYWlyLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL3BkYS50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9pbmRleC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3N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lZCxcbiAgICApOiBPcHRpb248SW50ZXJuYWxDb2xsZWN0aW9uPiA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBudWxsO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4ge1xuICAgICAgICBrZXk6IGlucHV0LnRvUHVibGljS2V5KCksXG4gICAgICAgIHZlcmlmaWVkOiBmYWxzZSxcbiAgICAgIH07XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlciA9IChcbiAgICAgIG91dHB1dDogT3B0aW9uPEludGVybmFsQ29sbGVjdGlvbj4sXG4gICAgKTogQ29sbGVjdGlvblR5cGUgfCB1bmRlZmluZWQgPT4ge1xuICAgICAgaWYgKCFvdXRwdXQpIHtcbiAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIHtcbiAgICAgICAgYWRkcmVzczogb3V0cHV0LmtleS50b1N0cmluZygpLFxuICAgICAgICB2ZXJpZmllZDogb3V0cHV0LnZlcmlmaWVkLFxuICAgICAgfTtcbiAgICB9O1xuICB9XG5cbiAgZXhwb3J0IG5hbWVzcGFjZSBDb2xsZWN0aW9uTWludCB7XG4gICAgZXhwb3J0IGNvbnN0IGludG9Vc2VyID0gKG91dHB1dDogR3JvdXBpbmdbXSk6IFB1YmtleSA9PiB7XG4gICAgICBjb25zdCByZXMgPSBvdXRwdXQuZmluZCgodmFsdWUpID0+IHtcbiAgICAgICAgaWYgKHZhbHVlLmdyb3VwX2tleSA9PT0gJ2NvbGxlY3Rpb24nKSB7XG4gICAgICAgICAgcmV0dXJuIHZhbHVlLmdyb3VwX3ZhbHVlO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIHJldHVybiByZXMgPyByZXMuZ3JvdXBfdmFsdWUgOiAnJztcbiAgICB9O1xuICB9XG59XG4iLCAiLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLXVudXNlZ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gICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ25hbWUnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLm5hbWUpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNOYW1lKG1ldGFkYXRhLm5hbWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc3ltYm9sJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5zeW1ib2wpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTeW1ib2wobWV0YWRhdGEuc3ltYm9sKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgICAgIGlmIChyZXMgJiYgcmVzLmlzRXJyKSB7XG4gICAgICAgICAgcmVzdWx0cy5wdXNoKC4uLnJlcy5lcnJvci5kZXRhaWxzKTtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgICBpZiAocmVzdWx0cy5sZW5ndGggPiAwKSB7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPVxuICAgICAgICAgICdDYXVnaHQgaW4gdGhlIHZh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W1vXG4gICAgICAgICAgICAgICAgdHhNZXRhLnRyYW5zYWN0aW9uLm1lc3NhZ2UuaW5zdHJ1Y3Rpb25zLmZvckVhY2goXG4gICAgICAgICAgICAgICAgICAoaW5zdHJ1Y3Rpb24pID0+IHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgIGlzUGFyc2VkSW5zdHJ1Y3Rpb24oaW5zdHJ1Y3Rpb24pICYmXG4gICAgICAgICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5UcmFuc2Zlci5wcm9ncmFtLmluY2x1ZGVzKFxuICAgICAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24ucHJvZ3JhbSxcbiAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIgPSBpbnN0cnVjdGlvbjtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICApO1xuXG4gICAgICAgICAgICAgICAgLy8gc3BsLXRva2VuIG9yIHN5c3RlbVxuICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIgJiZcbiAgICAgICAgICAgICAgICAgIG1vZHVsZU5hbWUgIT09IGluc3RydWN0aW9uVHJhbnNmZXJbJ3Byb2dyYW0nXVxuICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgZGVidWdMb2coXG4gICAgICAgICAgICAgICAgICAgICcjIEZpbHRlclR5cGUuTWVtbyBicmVhayBpbnN0cnVjdGlvbjogJyxcbiAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlcixcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAvLyBmZXRjaCBtZW1vIG9ubHkgdHJhbnNhY3Rpb25cbiAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLk1lbW8uaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyLFxuICAgICAgICAgICAgICAgICAgcG9zdFRva2VuQWNjb3VudCxcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLk9ubHlNZW1vOiB7XG4gICAgICAgICAgICAgIGlmIChGaWx0ZXJPcHRpb25zLk1lbW8ucHJvZ3JhbS5pbmNsdWRlcyhpbnN0cnVjdGlvbi5wcm9ncmFtKSkge1xuICAgICAgICAgICAgICAgIGxldCBpbnN0cnVjdGlvblRyYW5zZmVyO1xuXG4gICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5NZW1vLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlcixcbiAgICAgICAgICAgICAgICAgIHBvc3RUb2tlbkFjY291bnQsXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5NaW50OiB7XG4gICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLk1pbnQucHJvZ3JhbS5pbmNsdWRlcyhpbnN0cnVjdGlvbi5wcm9ncmFtKSAmJlxuICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuTWludC5hY3Rpb24uaW5jbHVkZXMoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbi5wYXJzZWQudHlwZSBhcyBzdHJpbmcsXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLk1pbnQuaW50b1VzZXJTaWRlKGluc3RydWN0aW9uLCB0eE1ldGEpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLlRyYW5zZmVyOlxuICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgbW9kdWxlTmFtZSA9PT0gaW5zdHJ1Y3Rpb24ucHJvZ3JhbSAmJlxuICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuVHJhbnNmZXIuYWN0aW9uLmluY2x1ZGVzKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24ucGFyc2VkLnR5cGUgYXMgc3RyaW5nLFxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgaWYgKGluc3RydWN0aW9uLnBhcnNlZC50eXBlID09PSAndHJhbnNmZXJDaGVja2VkJykge1xuICAgICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5UcmFuc2ZlckNoZWNrZWQuaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgICBwb3N0VG9rZW5BY2NvdW50LFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5UcmFuc2Zlci5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgICByZXR1cm4gaGlzdG9yeTtcbiAgICB9O1xufVxuIiwgImltcG9ydCB7IFBhcnNlZEFjY291bnREYXRhIH0gZnJvbSAnQHNvbGFuYS93ZWIzLmpzJztcbmltcG9ydCB7IFJlc3VsdCwgVHJ5IH0gZnJvbSAnfi9zdWl0ZS11dGlscyc7XG5pbXBvcnQgeyBOb2RlIH0gZnJvbSAnfi9ub2RlJztcbmltcG9ydCB7IE93bmVySW5mbywgUHVia2V5IH0gZnJvbSAnfi90eXBlcy9hY2NvdW50JztcbmltcG9ydCB7IFRyYW5zYWN0aW9uRmlsdGVyIH0gZnJvbSAnfi90cmFuc2FjdGlvbi1maWx0ZXInO1xuXG5leHBvcnQgbmFtZXNwYWNlIFNvbE5hdGl2ZSB7XG4gIC8qKlxuICAgKiBGaW5kIG5mdCBieSBvd25lciBhZGRyZXNzXG4gICAqXG4gICAqIEBwYXJhbSB7UHVia2V5fSBvd25lclxuICAgKiBAcmV0dXJuIFByb21pc2U8UmVzdWx0PE93bmVySW5mbywgRXJyb3I+PlxuICAgKi9cbiAgZXhwb3J0IGNvbnN0IGZpbmRCeU93bmVyID0gYXN5bmMgKFxuICAgIG93bmVyOiBQdWJrZXksXG4gICk6IFByb21pc2U8UmVzdWx0PE93bmVySW5mbywgRXJyb3I+PiA9PiB7XG4gICAgcmV0dXJuIFRyeShhc3luYyAoKSA9PiB7XG4gICAgICBjb25zdCByZXMgPSBhd2FpdCBOb2RlLmdldENvbm5lY3Rpb24oKS5nZXRQYXJzZWRBY2NvdW50SW5mbyhcbiAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAg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gICAgdG9rZW4udG9TdHJpbmcoKSxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIHBheWVyLFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgc291cmNlVG9rZW46ICcsIHNvdXJjZVRva2VuKTtcblxuICAgICAgY29uc3QgZGVzdFRva2VuID0gYXdhaXQgQWNjb3VudC5Bc3NvY2lhdGVkLnJldHJ5R2V0T3JDcmVhdGUoXG4gICAgICAgIHRva2VuLnRvU3RyaW5nKCksXG4gICAgICAgIHdyYXBwZWQudG9TdHJpbmcoKSxcbiAgICAgICAgcGF5ZXIsXG4gICAgICApO1xuXG4gICAgICBkZWJ1Z0xvZygnIyBkZXN0VG9rZW46ICcsIGRlc3RUb2tlbik7XG5cbiAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICBjcmVhdGVUcmFuc2Zlckluc3RydWN0aW9uKFxuICAgICAgICAgIHNvdXJjZVRva2VuLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgZGVzdFRva2VuLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBwYXJzZUludChgJHthbW91bnR9YCwgUkFESVgpLCAvLyBObyBsYW1wb3J0cywgaXRzIHNvbFxuICAgICAgICAgIGtleXBhaXJzLFxuICAgICAgICApLFxuICAgICAgKTtcblxuICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgIGNyZWF0ZUNsb3NlQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHdyYXBwZWQsXG4gICAgICAgICAgZGVzdC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAga2V5cGFpcnMsXG4gICAgICAgICksXG4gICAgICApO1xuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb24oXG4gICAgICAgIGluc3RydWN0aW9ucyxcbiAgICAgICAgbX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AgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgIGlzUGFyc2VkSW5zdHJ1Y3Rpb24oaW5zdHJ1Y3Rpb24pICYmXG4gICAgICAgICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5UcmFuc2Zlci5wcm9ncmFtLmluY2x1ZGVzKFxuICAgICAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24ucHJvZ3JhbSxcbiAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIgPSBpbnN0cnVjdGlvbjtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICApO1xuXG4gICAgICAgICAgICAgICAgLy8gc3BsLXRva2VuIG9yIHN5c3RlbVxuICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIgJiZcbiAgICAgICAgICAgICAgICAgIG1vZHVsZU5hbWUgIT09IGluc3RydWN0aW9uVHJhbnNmZXJbJ3Byb2dyYW0nXVxuICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgZGVidWdMb2coXG4gICAgICAgICAgICAgICAgICAgICcjIEZpbHRlclR5cGUuTWVtbyBicmVhayBpbnN0cnVjdGlvbjogJyxcbiAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlcixcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAvLyBmZXRjaCBtZW1vIG9ubHkgdHJhbnNhY3Rpb25cbiAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLk1lbW8uaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyLFxuICAgICAgICAgICAgICAgICAgcG9zdFRva2VuQWNjb3VudCxcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLk9ubHlNZW1vOiB7XG4gICAgICAgICAgICAgIGlmIChGaWx0ZXJPcHRpb25zLk1lbW8ucHJvZ3JhbS5pbmNsdWRlcyhpbnN0cnVjdGlvbi5wcm9ncmFtKSkge1xuICAgICAgICAgICAgICAgIGxldCBpbnN0cnVjdGlvblRyYW5zZmVyO1xuXG4gICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5NZW1vLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlcixcbiAgICAgICAgICAgICAgICAgIHBvc3RUb2tlbkFjY291bnQsXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5NaW50OiB7XG4gICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLk1pbnQucHJvZ3JhbS5pbmNsdWRlcyhpbnN0cnVjdGlvbi5wcm9ncmFtKSAmJlxuICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuTWludC5hY3Rpb24uaW5jbHVkZXMoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbi5wYXJzZWQudHlwZSBhcyBzdHJpbmcsXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLk1pbnQuaW50b1VzZXJTaWRlKGluc3RydWN0aW9uLCB0eE1ldGEpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLlRyYW5zZmVyOlxuICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgbW9kdWxlTmFtZSA9PT0gaW5zdHJ1Y3Rpb24ucHJvZ3JhbSAmJlxuICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuVHJhbnNmZXIuYWN0aW9uLmluY2x1ZGVzKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24ucGFyc2VkLnR5cGUgYXMgc3RyaW5nLFxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgaWYgKGluc3RydWN0aW9uLnBhcnNlZC50eXBlID09PSAndHJhbnNmZXJDaGVja2VkJykge1xuICAgICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5UcmFuc2ZlckNoZWNrZWQuaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgICBwb3N0VG9rZW5BY2NvdW50LFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5UcmFuc2Zlci5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuICAg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aVNpZyBhY2NvdW50XG4gICAqXG4gICAqIEBwYXJhbSB7UHVia2V5fSBvd25lciAgICAgICAgICAgICAgLy8gY3VycmVudCBtdWx0aXNpZyBvd25lclxuICAgKiBAcGFyYW0ge1B1YmtleX0gZGVzdCAgICAgICAgICAgICAgIC8vIG5ldyBvd25lclxuICAgKiBAcGFyYW0ge1NlY3JldFtdfSBvd25lck9yTXVsdGlzaWcgIC8vIG93bmVyIG9yIG11bHRpc2lnIGFjY291bnQgU2VjcmV0XG4gICAqIEBwYXJhbSB7bnVtYmVyfSBhbW91bnQgICAgICAgICAgICAgLy8gd2FudCB0byB0cmFuc2ZlciBTT0wgYW1vdW50XG4gICAqIEBwYXJhbSB7UGFydGlhbDxUcmFuc2Zlck9wdGlvbnM+fSBvcHRpb25zICAgICAgIC8vIG9wdGlvbnNcbiAgICogQHJldHVybiB7UmVzdWx0PENvbW1vblN0cnVjdHVyZTx1bmtub3duPiwgRXJyb3I+IH1cbiAgICovXG4gIGV4cG9ydCBjb25zdCB0cmFuc2ZlciA9IChcbiAgICBvd25lcjogUHVia2V5LFxuICAgIGRlc3Q6IFB1YmtleSxcbiAgICBvd25lck9yTXVsdGlzaWc6IFNlY3JldFtdLFxuICAgIGFtb3VudDogbnVtYmVyLFxuICAgIG9wdGlvbnM6IFBhcnRpYWw8VHJhbnNmZXJPcHRpb25zPiA9IHt9LFxuICApOiBSZXN1bHQ8Q29tbW9uU3RydWN0dXJlLCBFcnJvcj4gPT4ge1xuICAgIHJldHVybiBUcnkoKCkgPT4ge1xuICAgICAgY29uc3QgaW5zdCA9IFN5c3RlbVByb2dyYW0udHJhbnNmZXIoe1xuICAgICAgICBmcm9tUHVia2V5OiBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICB0b1B1YmtleTogZGVzdC50b1B1YmxpY0tleSgpLFxuICAgICAgICBsYW1wb3J0czogcGFyc2VJbnQoYCR7YW1vdW50LnRvTGFtcG9ydHMoKX1gLCBSQURJWCksXG4gICAgICB9K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iAgICAgIGNvbnN0IGNvbm5lY3Rpb24gPSBOb2RlLmdldENvbm5lY3Rpb24oKTtcbiAgICAgIGNvbnN0IHBheWVyID0gb3B0aW9ucy5mZWVQYXllciA/IG9wdGlvbnMuZmVlUGF5ZXIgOiBtdWx0aXNpZ1swXTtcbiAgICAgIGNvbnN0IGtleXBhaXJzID0gbXVsdGlzaWcubWFwKChzKSA9PiBzLnRvS2V5cGFpcigpKTtcbiAgICAgIGNvbnN0IHdyYXBwZWQgPSBhd2FpdCBjcmVhdGVXcmFwcGVkTmF0aXZlQWNjb3VudChcbiAgICAgICAgY29ubmVjdGlvbixcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIHBhcnNlSW50KGAke2Ftb3VudC50b0xhbXBvcnRzKCl9YCwgUkFESVgpLFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgd3JhcHBlZCBzb2w6ICcsIHdyYXBwZWQudG9CYXNlNTgoKSk7XG5cbiAgICAgIGNvbnN0IGluc3RydWN0aW9ucyA9IFtdO1xuXG4gICAgICBjb25zdCB0b2tlbiA9IGF3YWl0IGNyZWF0ZU1pbnQoXG4gICAgICAgIGNvbm5lY3Rpb24sXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAwLFxuICAgICAgKTtcblxuICAgICAgY29uc3Qgc291cmNlVG9rZW4gPSBhd2FpdCBBY2NvdW50LkFzc29jaWF0ZWQucmV0cnlHZXRPckNyZWF0ZShcbiAgICAgICAgdG9rZW4udG9TdHJpbmcoKSxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIHBheWVyLFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgc291cmNlVG9rZW46ICcsIHNvdXJjZVRva2VuKTtcblxuICAgICAgY29uc3QgZGVzdFRva2VuID0gYXdhaXQgQWNjb3VudC5Bc3NvY2lhdGVkLnJldHJ5R2V0T3JDcmVhdGUoXG4gICAgICAgIHRva2VuLnRvU3RyaW5nKCksXG4gICAgICAgIHdyYXBwZWQudG9TdHJpbmcoKSxcbiAgICAgICAgcGF5ZXIsXG4gICAgICApO1xuXG4gICAgICBkZWJ1Z0xvZygnIyBkZXN0VG9rZW46ICcsIGRlc3RUb2tlbik7XG5cbiAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICBjcmVhdGVUcmFuc2Zlckluc3RydWN0aW9uKFxuICAgICAgICAgIHNvdXJjZVRva2VuLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgZGVzdFRva2VuLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBwYXJzZUludChgJHthbW91bnR9YCwgUkFESVgpLCAvLyBObyBsYW1wb3J0cywgaXRzIHNvbFxuICAgICAgICAgIGtleXBhaXJzLFxuICAgICAgICApLFxuICAgICAgKTtcblxuICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgIGNyZWF0ZUNsb3NlQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHdyYXBwZWQsXG4gICAgICAgICAgZGVzdC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAga2V5cGFpcnMsXG4gICAgICAgICksXG4gICAgICApO1xuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb24oXG4gICAgICAgIGluc3RydWN0aW9ucyxcbiAgICAgICAgbXVsdGlzaWcubWFwKChzKSA9PiBzLnRvS2V5cGFpcigpKSxcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCksXG4gICAgICApO1xuICAgIH0pO1xuICB9O1xufVxuIiwgImltcG9ydCB7IFNvbE5hdGl2ZSBhcyBGaW5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lRyYW5zYWN0aW9uQnVpbGRlciIsICJTb2xOYXRpdmUiLCAiU29sTmF0aXZlIl0KfQo= \ No newline at end of file From f4422a17f0d5dce14ca2c2a21a2a4985026fe2f4 Mon Sep 17 00:00:00 2001 From: fukaoi Date: Sat, 3 Feb 2024 22:35:06 +0900 Subject: [PATCH 14/15] Updated show message --- packages/suite-config/src/config-script.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/suite-config/src/config-script.ts b/packages/suite-config/src/config-script.ts index b2ca6daad..3a208c1cc 100755 --- a/packages/suite-config/src/config-script.ts +++ b/packages/suite-config/src/config-script.ts @@ -76,7 +76,7 @@ const updateDasApiUrlConfigFile = (dasApiUrl: string[]): void => { const showCurrentConfigFile = (): void => { const cjs = readFileSync(Config.JSON_FILE_NAME); - showMessage(`Current cjs\n${cjs.toString()}\n`); + showMessage(`Current value\n${cjs.toString()}\n`); }; const clearCache = () => { From 8d6fcd6c63aa1763e9004ac30e56c907dd14af05 Mon Sep 17 00:00:00 2001 From: fukaoi Date: Sat, 3 Feb 2024 22:41:37 +0900 Subject: [PATCH 15/15] Fix version --- packages/suite-airdrop/package.json | 2 +- packages/suite-config/package.json | 3 +-- packages/suite-memo/package.json | 2 +- packages/suite-multisig/package.json | 2 +- packages/suite-phantom/package.json | 2 +- packages/suite-regular-nft/package.json | 2 +- packages/suite-sol-native/package.json | 2 +- packages/suite-spl-token/package.json | 2 +- pnpm-lock.yaml | 23 +++++++---------------- 9 files changed, 15 insertions(+), 25 deletions(-) diff --git a/packages/suite-airdrop/package.json b/packages/suite-airdrop/package.json index e28d71132..d99aeaaca 100644 --- a/packages/suite-airdrop/package.json +++ b/packages/suite-airdrop/package.json @@ -48,7 +48,7 @@ "@solana/web3.js": "^1.78.5", "@solana-suite/config": "workspace:^", "bignumber.js": "^9.1.2", - "@metaplex-foundation/mpl-bubblegum": "^3.0.0", + "@metaplex-foundation/mpl-bubblegum": "3.0.0", "mpl-bubblegum-instruction": "github:atonoy/mpl-bubblegum-instructions", "bn.js": "^5.2.1", "bs58": "^4.0.1" diff --git a/packages/suite-config/package.json b/packages/suite-config/package.json index 5b5494e1c..213be4738 100644 --- a/packages/suite-config/package.json +++ b/packages/suite-config/package.json @@ -48,11 +48,10 @@ "publish": "../../scripts/after-publish.mjs", "test": "ava --config node_modules/build-configs/ava/base.cjs" }, - "peerDependencies": { + "dependencies": { "@solana/web3.js": "^1.78.5", "commander": "9.3.0" }, - "dependencies": {}, "devDependencies": { "build-configs/ava": "workspace:*", "build-configs/tsup": "workspace:*", diff --git a/packages/suite-memo/package.json b/packages/suite-memo/package.json index 967299983..ced9cce54 100644 --- a/packages/suite-memo/package.json +++ b/packages/suite-memo/package.json @@ -49,7 +49,7 @@ "@metaplex-foundation/mpl-token-metadata": "^2.13.0", "@solana-suite/config": "workspace:^", "bignumber.js": "^9.1.2", - "@metaplex-foundation/mpl-bubblegum": "^3.0.0", + "@metaplex-foundation/mpl-bubblegum": "3.0.0", "mpl-bubblegum-instruction": "github:atonoy/mpl-bubblegum-instructions", "bn.js": "^5.2.1" }, diff --git a/packages/suite-multisig/package.json b/packages/suite-multisig/package.json index 985164d2f..5f48e02f4 100644 --- a/packages/suite-multisig/package.json +++ b/packages/suite-multisig/package.json @@ -51,7 +51,7 @@ "bs58": "^4.0.1", "@metaplex-foundation/mpl-token-metadata": "^2.13.0", "bignumber.js": "^9.1.2", - "@metaplex-foundation/mpl-bubblegum": "^3.0.0", + "@metaplex-foundation/mpl-bubblegum": "3.0.0", "mpl-bubblegum-instruction": "github:atonoy/mpl-bubblegum-instructions", "bn.js": "^5.2.1" }, diff --git a/packages/suite-phantom/package.json b/packages/suite-phantom/package.json index d15c9060f..c491dc2cf 100644 --- a/packages/suite-phantom/package.json +++ b/packages/suite-phantom/package.json @@ -52,7 +52,7 @@ "bn.js": "^5.2.1", "bs58": "^4.0.1", "@irys/sdk": "^0.0.3", - "@metaplex-foundation/mpl-bubblegum": "^3.0.0", + "@metaplex-foundation/mpl-bubblegum": "3.0.0", "mpl-bubblegum-instruction": "github:atonoy/mpl-bubblegum-instructions", "cross-fetch": "^4.0.0" }, diff --git a/packages/suite-regular-nft/package.json b/packages/suite-regular-nft/package.json index deec3cdd9..caf8bee66 100644 --- a/packages/suite-regular-nft/package.json +++ b/packages/suite-regular-nft/package.json @@ -52,7 +52,7 @@ "bs58": "^4.0.1", "@solana-suite/config": "workspace:*", "@irys/sdk": "^0.0.3", - "@metaplex-foundation/mpl-bubblegum": "^3.0.0", + "@metaplex-foundation/mpl-bubblegum": "3.0.0", "mpl-bubblegum-instruction": "github:atonoy/mpl-bubblegum-instructions", "cross-fetch": "^4.0.0", "bn.js": "^5.2.1" diff --git a/packages/suite-sol-native/package.json b/packages/suite-sol-native/package.json index dd180ec4e..a5653ca0b 100644 --- a/packages/suite-sol-native/package.json +++ b/packages/suite-sol-native/package.json @@ -50,7 +50,7 @@ "@solana-suite/config": "workspace:^", "bignumber.js": "^9.1.2", "bs58": "^4.0.1", - "@metaplex-foundation/mpl-bubblegum": "^3.0.0", + "@metaplex-foundation/mpl-bubblegum": "3.0.0", "mpl-bubblegum-instruction": "github:atonoy/mpl-bubblegum-instructions", "bn.js": "^5.2.1" }, diff --git a/packages/suite-spl-token/package.json b/packages/suite-spl-token/package.json index abfffc30c..864d8fdae 100644 --- a/packages/suite-spl-token/package.json +++ b/packages/suite-spl-token/package.json @@ -54,7 +54,7 @@ "bs58": "^4.0.1", "@irys/sdk": "^0.0.3", "bn.js": "^5.2.1", - "@metaplex-foundation/mpl-bubblegum": "^3.0.0", + "@metaplex-foundation/mpl-bubblegum": "3.0.0", "mpl-bubblegum-instruction": "github:atonoy/mpl-bubblegum-instructions" }, "devDependencies": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 75ed9f23e..c23beb679 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -60,9 +60,6 @@ importers: '@solana-suite/config': specifier: workspace:* version: link:../suite-config - '@solana/spl-token': - specifier: ^0.3.8 - version: 0.3.8(@solana/web3.js@1.87.1) '@solana/web3.js': specifier: ^1.78.5 version: 1.87.1 @@ -299,7 +296,7 @@ importers: packages/suite-airdrop: dependencies: '@metaplex-foundation/mpl-bubblegum': - specifier: ^3.0.0 + specifier: 3.0.0 version: 3.0.0(@metaplex-foundation/umi@0.8.10) '@metaplex-foundation/mpl-token-metadata': specifier: ^2.13.0 @@ -307,9 +304,6 @@ importers: '@solana-suite/config': specifier: workspace:^ version: link:../suite-config - '@solana/spl-token': - specifier: ^0.3.8 - version: 0.3.8(@solana/web3.js@1.87.1) '@solana/web3.js': specifier: ^1.78.5 version: 1.87.1 @@ -434,7 +428,7 @@ importers: packages/suite-memo: dependencies: '@metaplex-foundation/mpl-bubblegum': - specifier: ^3.0.0 + specifier: 3.0.0 version: 3.0.0(@metaplex-foundation/umi@0.8.10) '@metaplex-foundation/mpl-token-metadata': specifier: ^2.13.0 @@ -442,9 +436,6 @@ importers: '@solana-suite/config': specifier: workspace:^ version: link:../suite-config - '@solana/spl-token': - specifier: ^0.3.8 - version: 0.3.8(@solana/web3.js@1.87.1) '@solana/web3.js': specifier: ^1.78.5 version: 1.87.1 @@ -489,7 +480,7 @@ importers: packages/suite-multisig: dependencies: '@metaplex-foundation/mpl-bubblegum': - specifier: ^3.0.0 + specifier: 3.0.0 version: 3.0.0(@metaplex-foundation/umi@0.8.10) '@metaplex-foundation/mpl-token-metadata': specifier: ^2.13.0 @@ -547,7 +538,7 @@ importers: specifier: ^0.0.3 version: 0.0.3(arweave@1.14.4) '@metaplex-foundation/mpl-bubblegum': - specifier: ^3.0.0 + specifier: 3.0.0 version: 3.0.0(@metaplex-foundation/umi@0.8.10) '@metaplex-foundation/mpl-token-metadata': specifier: ^2.13.0 @@ -602,7 +593,7 @@ importers: specifier: ^0.0.3 version: 0.0.3(arweave@1.14.4) '@metaplex-foundation/mpl-bubblegum': - specifier: ^3.0.0 + specifier: 3.0.0 version: 3.0.0(@metaplex-foundation/umi@0.8.10) '@metaplex-foundation/mpl-token-metadata': specifier: ^2.13.0 @@ -663,7 +654,7 @@ importers: packages/suite-sol-native: dependencies: '@metaplex-foundation/mpl-bubblegum': - specifier: ^3.0.0 + specifier: 3.0.0 version: 3.0.0(@metaplex-foundation/umi@0.8.10) '@metaplex-foundation/mpl-token-metadata': specifier: ^2.13.0 @@ -718,7 +709,7 @@ importers: specifier: ^0.0.3 version: 0.0.3(arweave@1.14.4) '@metaplex-foundation/mpl-bubblegum': - specifier: ^3.0.0 + specifier: 3.0.0 version: 3.0.0(@metaplex-foundation/umi@0.8.10) '@metaplex-foundation/mpl-token-metadata': specifier: ^2.13.0