From da5a7207feb813315227204ca056412613bde42c Mon Sep 17 00:00:00 2001 From: fukaoi Date: Thu, 26 Oct 2023 16:51:52 +0900 Subject: [PATCH] Fix lint & recompiled --- packages/core/dist/cjs/memo/history.d.ts | 4 ++-- packages/core/dist/cjs/signatures.js | 4 ++-- .../core/dist/cjs/sol-native/history.d.ts | 4 ++-- packages/core/dist/cjs/spl-token/history.d.ts | 4 ++-- packages/core/dist/cjs/spl-token/history.js | 2 +- packages/core/dist/cjs/types/find.d.ts | 2 +- packages/core/dist/cjs/types/index.d.ts | 16 ++++++------- packages/core/dist/esm/memo/history.d.ts | 4 ++-- packages/core/dist/esm/memo/history.js | 6 ++--- packages/core/dist/esm/signatures.js | 6 ++--- .../core/dist/esm/sol-native/history.d.ts | 4 ++-- packages/core/dist/esm/sol-native/history.js | 6 ++--- packages/core/dist/esm/spl-token/history.d.ts | 4 ++-- packages/core/dist/esm/spl-token/history.js | 12 +++++----- packages/core/dist/esm/types/find.d.ts | 2 +- packages/core/dist/esm/types/index.d.ts | 16 ++++++------- packages/core/dist/esm/types/index.js | 12 +++++----- packages/core/src/memo/history.ts | 8 +++---- packages/core/src/signatures.ts | 10 ++++---- packages/core/src/sol-native/history.ts | 8 +++---- packages/core/src/spl-token/history.ts | 12 +++++----- packages/core/src/types/find.ts | 2 +- packages/core/src/types/index.ts | 16 ++++++------- packages/shared/dist/cjs/node.d.ts | 4 ++-- packages/shared/dist/cjs/node.js | 12 +++++----- packages/shared/dist/esm/node.d.ts | 4 ++-- packages/shared/dist/esm/node.js | 20 ++++++++-------- packages/shared/src/node.ts | 20 ++++++++-------- packages/storage/dist/cjs/nft-storage.d.ts | 4 ++-- .../storage/dist/cjs/nft-storage.d.ts.map | 2 +- packages/storage/dist/cjs/nft-storage.js | 8 +++---- packages/storage/dist/cjs/nft-storage.js.map | 2 +- packages/storage/dist/cjs/provenance-layer.js | 8 +++---- .../storage/dist/cjs/provenance-layer.js.map | 2 +- packages/storage/dist/cjs/storage.d.ts | 4 ++-- packages/storage/dist/cjs/storage.js | 20 ++++++++-------- .../storage/dist/cjs/types/bundlr.d.ts.map | 2 +- packages/storage/dist/esm/nft-storage.d.ts | 4 ++-- .../storage/dist/esm/nft-storage.d.ts.map | 2 +- packages/storage/dist/esm/nft-storage.js | 14 +++++------ packages/storage/dist/esm/nft-storage.js.map | 2 +- packages/storage/dist/esm/provenance-layer.js | 8 +++---- .../storage/dist/esm/provenance-layer.js.map | 2 +- packages/storage/dist/esm/storage.d.ts | 4 ++-- packages/storage/dist/esm/storage.js | 24 +++++++++---------- .../storage/dist/esm/types/bundlr.d.ts.map | 2 +- packages/storage/src/provenance-layer.ts | 8 +++---- 47 files changed, 173 insertions(+), 173 deletions(-) diff --git a/packages/core/dist/cjs/memo/history.d.ts b/packages/core/dist/cjs/memo/history.d.ts index 5a172c336..f7c90d94c 100644 --- a/packages/core/dist/cjs/memo/history.d.ts +++ b/packages/core/dist/cjs/memo/history.d.ts @@ -1,5 +1,5 @@ -import { Pubkey } from "@solana-suite/shared"; -import { History, HistoryOptions, OnErr, OnOk } from "../types/"; +import { Pubkey } from '@solana-suite/shared'; +import { History, HistoryOptions, OnErr, OnOk } from '../types/'; export declare namespace Memo { const getHistory: (target: Pubkey, onOk: OnOk, onErr: OnErr, options?: Partial) => Promise; } diff --git a/packages/core/dist/cjs/signatures.js b/packages/core/dist/cjs/signatures.js index 0f1e37575..a219c9de1 100644 --- a/packages/core/dist/cjs/signatures.js +++ b/packages/core/dist/cjs/signatures.js @@ -23,11 +23,11 @@ var Signatures; }); Signatures.getForAdress = (pubkey, parser, callback, options, histories = []) => __awaiter(this, void 0, void 0, function* () { try { - (0, shared_1.debugLog)("# options: ", options); + (0, shared_1.debugLog)('# options: ', options); const transactions = yield shared_1.Node.getConnection().getSignaturesForAddress(pubkey.toPublicKey(), { limit: options.narrowDown, }); - (0, shared_1.debugLog)("# transactions count:", transactions.length); + (0, shared_1.debugLog)('# transactions count:', transactions.length); for (const transaction of transactions) { parseForTransaction(transaction.signature) .then((signature) => { diff --git a/packages/core/dist/cjs/sol-native/history.d.ts b/packages/core/dist/cjs/sol-native/history.d.ts index 7e52ca8e0..ac8adb946 100644 --- a/packages/core/dist/cjs/sol-native/history.d.ts +++ b/packages/core/dist/cjs/sol-native/history.d.ts @@ -1,5 +1,5 @@ -import { Pubkey } from "@solana-suite/shared"; -import { FilterType, History, HistoryOptions, OnErr, OnOk } from "../types/"; +import { Pubkey } from '@solana-suite/shared'; +import { FilterType, History, HistoryOptions, OnErr, OnOk } from '../types/'; export declare namespace SolNative { const getHistory: (target: Pubkey, filterType: FilterType, onOk: OnOk, onErr: OnErr, options?: Partial) => Promise; } diff --git a/packages/core/dist/cjs/spl-token/history.d.ts b/packages/core/dist/cjs/spl-token/history.d.ts index 7502812ea..052ec97f3 100644 --- a/packages/core/dist/cjs/spl-token/history.d.ts +++ b/packages/core/dist/cjs/spl-token/history.d.ts @@ -1,5 +1,5 @@ -import { Pubkey } from "@solana-suite/shared"; -import { FilterType, History, HistoryOptions, OnErr, OnOk } from "../types/"; +import { Pubkey } from '@solana-suite/shared'; +import { FilterType, History, HistoryOptions, OnErr, OnOk } from '../types/'; export declare namespace SplToken { const getHistory: (target: Pubkey, filterType: FilterType, onOk: OnOk, onErr: OnErr, options?: Partial) => Promise; } diff --git a/packages/core/dist/cjs/spl-token/history.js b/packages/core/dist/cjs/spl-token/history.js index 99a1a50f3..af6fe72ce 100644 --- a/packages/core/dist/cjs/spl-token/history.js +++ b/packages/core/dist/cjs/spl-token/history.js @@ -33,7 +33,7 @@ var SplToken; programId: spl_token_1.TOKEN_PROGRAM_ID, }); const storedHistories = []; - (0, shared_1.debugLog)("# tokenAccounts size: ", tokenAccounts.value.length); + (0, shared_1.debugLog)('# tokenAccounts size: ', tokenAccounts.value.length); for (const account of tokenAccounts.value) { const parser = transaction_filter_1.TransactionFilter.parse(filterType, types_1.ModuleName.SplToken); yield signatures_1.Signatures.getForAdress(account.pubkey.toString(), parser, (result) => result.match(onOk, onErr), mergedOptions, storedHistories); diff --git a/packages/core/dist/cjs/types/find.d.ts b/packages/core/dist/cjs/types/find.d.ts index aa46963f2..83504ea42 100644 --- a/packages/core/dist/cjs/types/find.d.ts +++ b/packages/core/dist/cjs/types/find.d.ts @@ -1,4 +1,4 @@ -import { UserSideOutput } from "@solana-suite/shared-metaplex"; +import { UserSideOutput } from '@solana-suite/shared-metaplex'; export declare enum Sortable { Asc = "asc", Desc = "desc" diff --git a/packages/core/dist/cjs/types/index.d.ts b/packages/core/dist/cjs/types/index.d.ts index 7cb89dee8..30942baa5 100644 --- a/packages/core/dist/cjs/types/index.d.ts +++ b/packages/core/dist/cjs/types/index.d.ts @@ -1,11 +1,11 @@ -import { UserSideOutput as SharendMetaplex } from "@solana-suite/shared-metaplex"; -import { UserSideOutput as Internal } from "./user-side/output"; -export * from "./find"; -export * from "./infra-side/output"; -export * from "./user-side/output"; -export * from "./sol-native"; -export * from "./spl-token"; -export * from "./transaction-filter"; +import { UserSideOutput as SharendMetaplex } from '@solana-suite/shared-metaplex'; +import { UserSideOutput as Internal } from './user-side/output'; +export * from './find'; +export * from './infra-side/output'; +export * from './user-side/output'; +export * from './sol-native'; +export * from './spl-token'; +export * from './transaction-filter'; export type Find = SharendMetaplex.TokenMetadata; export type History = Internal.History; export type OnOk = (ok: T[]) => void; diff --git a/packages/core/dist/esm/memo/history.d.ts b/packages/core/dist/esm/memo/history.d.ts index 5a172c336..f7c90d94c 100644 --- a/packages/core/dist/esm/memo/history.d.ts +++ b/packages/core/dist/esm/memo/history.d.ts @@ -1,5 +1,5 @@ -import { Pubkey } from "@solana-suite/shared"; -import { History, HistoryOptions, OnErr, OnOk } from "../types/"; +import { Pubkey } from '@solana-suite/shared'; +import { History, HistoryOptions, OnErr, OnOk } from '../types/'; export declare namespace Memo { const getHistory: (target: Pubkey, onOk: OnOk, onErr: OnErr, options?: Partial) => Promise; } diff --git a/packages/core/dist/esm/memo/history.js b/packages/core/dist/esm/memo/history.js index 4357b5987..bf7d3c19b 100644 --- a/packages/core/dist/esm/memo/history.js +++ b/packages/core/dist/esm/memo/history.js @@ -7,9 +7,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; -import { FilterType, ModuleName, } from "../types/"; -import { TransactionFilter } from "../transaction-filter"; -import { Signatures } from "../signatures"; +import { FilterType, ModuleName, } from '../types/'; +import { TransactionFilter } from '../transaction-filter'; +import { Signatures } from '../signatures'; export var Memo; (function (Memo) { Memo.getHistory = (target, onOk, onErr, options = {}) => __awaiter(this, void 0, void 0, function* () { diff --git a/packages/core/dist/esm/signatures.js b/packages/core/dist/esm/signatures.js index 4f25f5851..3f9b7869e 100644 --- a/packages/core/dist/esm/signatures.js +++ b/packages/core/dist/esm/signatures.js @@ -7,7 +7,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; -import { debugLog, Node, Result, sleep } from "@solana-suite/shared"; +import { debugLog, Node, Result, sleep } from '@solana-suite/shared'; //@internal export var Signatures; (function (Signatures) { @@ -20,11 +20,11 @@ export var Signatures; }); Signatures.getForAdress = (pubkey, parser, callback, options, histories = []) => __awaiter(this, void 0, void 0, function* () { try { - debugLog("# options: ", options); + debugLog('# options: ', options); const transactions = yield Node.getConnection().getSignaturesForAddress(pubkey.toPublicKey(), { limit: options.narrowDown, }); - debugLog("# transactions count:", transactions.length); + debugLog('# transactions count:', transactions.length); for (const transaction of transactions) { parseForTransaction(transaction.signature) .then((signature) => { diff --git a/packages/core/dist/esm/sol-native/history.d.ts b/packages/core/dist/esm/sol-native/history.d.ts index 7e52ca8e0..ac8adb946 100644 --- a/packages/core/dist/esm/sol-native/history.d.ts +++ b/packages/core/dist/esm/sol-native/history.d.ts @@ -1,5 +1,5 @@ -import { Pubkey } from "@solana-suite/shared"; -import { FilterType, History, HistoryOptions, OnErr, OnOk } from "../types/"; +import { Pubkey } from '@solana-suite/shared'; +import { FilterType, History, HistoryOptions, OnErr, OnOk } from '../types/'; export declare namespace SolNative { const getHistory: (target: Pubkey, filterType: FilterType, onOk: OnOk, onErr: OnErr, options?: Partial) => Promise; } diff --git a/packages/core/dist/esm/sol-native/history.js b/packages/core/dist/esm/sol-native/history.js index ac9052f3e..6ec62c730 100644 --- a/packages/core/dist/esm/sol-native/history.js +++ b/packages/core/dist/esm/sol-native/history.js @@ -7,9 +7,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; -import { ModuleName, } from "../types/"; -import { TransactionFilter } from "../transaction-filter"; -import { Signatures } from "../signatures"; +import { ModuleName, } from '../types/'; +import { TransactionFilter } from '../transaction-filter'; +import { Signatures } from '../signatures'; export var SolNative; (function (SolNative) { SolNative.getHistory = (target, filterType, onOk, onErr, options = {}) => __awaiter(this, void 0, void 0, function* () { diff --git a/packages/core/dist/esm/spl-token/history.d.ts b/packages/core/dist/esm/spl-token/history.d.ts index 7502812ea..052ec97f3 100644 --- a/packages/core/dist/esm/spl-token/history.d.ts +++ b/packages/core/dist/esm/spl-token/history.d.ts @@ -1,5 +1,5 @@ -import { Pubkey } from "@solana-suite/shared"; -import { FilterType, History, HistoryOptions, OnErr, OnOk } from "../types/"; +import { Pubkey } from '@solana-suite/shared'; +import { FilterType, History, HistoryOptions, OnErr, OnOk } from '../types/'; export declare namespace SplToken { const getHistory: (target: Pubkey, filterType: FilterType, onOk: OnOk, onErr: OnErr, options?: Partial) => Promise; } diff --git a/packages/core/dist/esm/spl-token/history.js b/packages/core/dist/esm/spl-token/history.js index e410d4d4f..4d4f6b64d 100644 --- a/packages/core/dist/esm/spl-token/history.js +++ b/packages/core/dist/esm/spl-token/history.js @@ -7,11 +7,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; -import { TOKEN_PROGRAM_ID } from "@solana/spl-token"; -import { debugLog, Node } from "@solana-suite/shared"; -import { FilterType, ModuleName, } from "../types/"; -import { Signatures } from "../signatures"; -import { TransactionFilter } from "../transaction-filter"; +import { TOKEN_PROGRAM_ID } from '@solana/spl-token'; +import { debugLog, Node } from '@solana-suite/shared'; +import { FilterType, ModuleName, } from '../types/'; +import { Signatures } from '../signatures'; +import { TransactionFilter } from '../transaction-filter'; export var SplToken; (function (SplToken) { SplToken.getHistory = (target, filterType, onOk, onErr, options = {}) => __awaiter(this, void 0, void 0, function* () { @@ -30,7 +30,7 @@ export var SplToken; programId: TOKEN_PROGRAM_ID, }); const storedHistories = []; - debugLog("# tokenAccounts size: ", tokenAccounts.value.length); + debugLog('# tokenAccounts size: ', tokenAccounts.value.length); for (const account of tokenAccounts.value) { const parser = TransactionFilter.parse(filterType, ModuleName.SplToken); yield Signatures.getForAdress(account.pubkey.toString(), parser, (result) => result.match(onOk, onErr), mergedOptions, storedHistories); diff --git a/packages/core/dist/esm/types/find.d.ts b/packages/core/dist/esm/types/find.d.ts index aa46963f2..83504ea42 100644 --- a/packages/core/dist/esm/types/find.d.ts +++ b/packages/core/dist/esm/types/find.d.ts @@ -1,4 +1,4 @@ -import { UserSideOutput } from "@solana-suite/shared-metaplex"; +import { UserSideOutput } from '@solana-suite/shared-metaplex'; export declare enum Sortable { Asc = "asc", Desc = "desc" diff --git a/packages/core/dist/esm/types/index.d.ts b/packages/core/dist/esm/types/index.d.ts index 7cb89dee8..30942baa5 100644 --- a/packages/core/dist/esm/types/index.d.ts +++ b/packages/core/dist/esm/types/index.d.ts @@ -1,11 +1,11 @@ -import { UserSideOutput as SharendMetaplex } from "@solana-suite/shared-metaplex"; -import { UserSideOutput as Internal } from "./user-side/output"; -export * from "./find"; -export * from "./infra-side/output"; -export * from "./user-side/output"; -export * from "./sol-native"; -export * from "./spl-token"; -export * from "./transaction-filter"; +import { UserSideOutput as SharendMetaplex } from '@solana-suite/shared-metaplex'; +import { UserSideOutput as Internal } from './user-side/output'; +export * from './find'; +export * from './infra-side/output'; +export * from './user-side/output'; +export * from './sol-native'; +export * from './spl-token'; +export * from './transaction-filter'; export type Find = SharendMetaplex.TokenMetadata; export type History = Internal.History; export type OnOk = (ok: T[]) => void; diff --git a/packages/core/dist/esm/types/index.js b/packages/core/dist/esm/types/index.js index 1b4edf6c2..b2409f802 100644 --- a/packages/core/dist/esm/types/index.js +++ b/packages/core/dist/esm/types/index.js @@ -1,7 +1,7 @@ -export * from "./find"; -export * from "./infra-side/output"; -export * from "./user-side/output"; -export * from "./sol-native"; -export * from "./spl-token"; -export * from "./transaction-filter"; +export * from './find'; +export * from './infra-side/output'; +export * from './user-side/output'; +export * from './sol-native'; +export * from './spl-token'; +export * from './transaction-filter'; //# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/packages/core/src/memo/history.ts b/packages/core/src/memo/history.ts index 544a3493d..d6f52a59c 100644 --- a/packages/core/src/memo/history.ts +++ b/packages/core/src/memo/history.ts @@ -1,4 +1,4 @@ -import { Pubkey } from "@solana-suite/shared"; +import { Pubkey } from '@solana-suite/shared'; import { FilterType, History, @@ -6,9 +6,9 @@ import { ModuleName, OnErr, OnOk, -} from "../types/"; -import { TransactionFilter } from "../transaction-filter"; -import { Signatures } from "../signatures"; +} from '../types/'; +import { TransactionFilter } from '../transaction-filter'; +import { Signatures } from '../signatures'; export namespace Memo { export const getHistory = async ( diff --git a/packages/core/src/signatures.ts b/packages/core/src/signatures.ts index e3cb81838..7c513cffe 100644 --- a/packages/core/src/signatures.ts +++ b/packages/core/src/signatures.ts @@ -1,6 +1,6 @@ -import { ParsedTransactionWithMeta } from "@solana/web3.js"; -import { debugLog, Node, Pubkey, Result, sleep } from "@solana-suite/shared"; -import { UserSideOutput } from "./types/"; +import { ParsedTransactionWithMeta } from '@solana/web3.js'; +import { debugLog, Node, Pubkey, Result, sleep } from '@solana-suite/shared'; +import { UserSideOutput } from './types/'; //@internal export namespace Signatures { @@ -27,7 +27,7 @@ export namespace Signatures { histories: UserSideOutput.History[] = [], ): Promise => { try { - debugLog("# options: ", options); + debugLog('# options: ', options); const transactions = await Node.getConnection().getSignaturesForAddress( pubkey.toPublicKey(), { @@ -35,7 +35,7 @@ export namespace Signatures { }, ); - debugLog("# transactions count:", transactions.length); + debugLog('# transactions count:', transactions.length); for (const transaction of transactions) { parseForTransaction(transaction.signature) diff --git a/packages/core/src/sol-native/history.ts b/packages/core/src/sol-native/history.ts index 1905687d8..ea43650c8 100644 --- a/packages/core/src/sol-native/history.ts +++ b/packages/core/src/sol-native/history.ts @@ -1,4 +1,4 @@ -import { Pubkey } from "@solana-suite/shared"; +import { Pubkey } from '@solana-suite/shared'; import { FilterType, History, @@ -6,9 +6,9 @@ import { ModuleName, OnErr, OnOk, -} from "../types/"; -import { TransactionFilter } from "../transaction-filter"; -import { Signatures } from "../signatures"; +} from '../types/'; +import { TransactionFilter } from '../transaction-filter'; +import { Signatures } from '../signatures'; export namespace SolNative { export const getHistory = async ( diff --git a/packages/core/src/spl-token/history.ts b/packages/core/src/spl-token/history.ts index a6bdbfbe0..8eac52a88 100644 --- a/packages/core/src/spl-token/history.ts +++ b/packages/core/src/spl-token/history.ts @@ -1,5 +1,5 @@ -import { TOKEN_PROGRAM_ID } from "@solana/spl-token"; -import { debugLog, Node, Pubkey } from "@solana-suite/shared"; +import { TOKEN_PROGRAM_ID } from '@solana/spl-token'; +import { debugLog, Node, Pubkey } from '@solana-suite/shared'; import { FilterType, History, @@ -8,9 +8,9 @@ import { OnErr, OnOk, UserSideOutput, -} from "../types/"; -import { Signatures } from "../signatures"; -import { TransactionFilter } from "../transaction-filter"; +} from '../types/'; +import { Signatures } from '../signatures'; +import { TransactionFilter } from '../transaction-filter'; export namespace SplToken { export const getHistory = async ( @@ -44,7 +44,7 @@ export namespace SplToken { ); const storedHistories: UserSideOutput.History[] = []; - debugLog("# tokenAccounts size: ", tokenAccounts.value.length); + debugLog('# tokenAccounts size: ', tokenAccounts.value.length); for (const account of tokenAccounts.value) { const parser = TransactionFilter.parse( filterType, diff --git a/packages/core/src/types/find.ts b/packages/core/src/types/find.ts index 9e6a75ee0..a30e3fca5 100644 --- a/packages/core/src/types/find.ts +++ b/packages/core/src/types/find.ts @@ -1,4 +1,4 @@ -import { UserSideOutput } from "@solana-suite/shared-metaplex"; +import { UserSideOutput } from '@solana-suite/shared-metaplex'; export enum Sortable { Asc = 'asc', diff --git a/packages/core/src/types/index.ts b/packages/core/src/types/index.ts index 95939685d..3322d6535 100644 --- a/packages/core/src/types/index.ts +++ b/packages/core/src/types/index.ts @@ -1,12 +1,12 @@ -import { UserSideOutput as SharendMetaplex } from "@solana-suite/shared-metaplex"; -import { UserSideOutput as Internal } from "./user-side/output"; +import { UserSideOutput as SharendMetaplex } from '@solana-suite/shared-metaplex'; +import { UserSideOutput as Internal } from './user-side/output'; -export * from "./find"; -export * from "./infra-side/output"; -export * from "./user-side/output"; -export * from "./sol-native"; -export * from "./spl-token"; -export * from "./transaction-filter"; +export * from './find'; +export * from './infra-side/output'; +export * from './user-side/output'; +export * from './sol-native'; +export * from './spl-token'; +export * from './transaction-filter'; export type Find = SharendMetaplex.TokenMetadata; export type History = Internal.History; diff --git a/packages/shared/dist/cjs/node.d.ts b/packages/shared/dist/cjs/node.d.ts index f9b029f48..b69aae334 100644 --- a/packages/shared/dist/cjs/node.d.ts +++ b/packages/shared/dist/cjs/node.d.ts @@ -1,5 +1,5 @@ -import { Result } from "./result"; -import { Commitment, Connection } from "@solana/web3.js"; +import { Result } from './result'; +import { Commitment, Connection } from '@solana/web3.js'; export declare namespace Node { const getConnection: () => Connection; const changeConnection: (param: { diff --git a/packages/shared/dist/cjs/node.js b/packages/shared/dist/cjs/node.js index e71b7dbf6..0e333973f 100644 --- a/packages/shared/dist/cjs/node.js +++ b/packages/shared/dist/cjs/node.js @@ -17,7 +17,7 @@ const web3_js_1 = require("@solana/web3.js"); var Node; (function (Node) { const setted = { - clusterUrl: "", + clusterUrl: '', commitment: constants_1.Constants.COMMITMENT, customClusterUrl: [], }; @@ -47,23 +47,23 @@ var Node; }; Node.changeConnection = (param) => { // initialize - setted.clusterUrl = ""; + setted.clusterUrl = ''; setted.customClusterUrl = []; setted.commitment = constants_1.Constants.COMMITMENT; const { cluster, commitment, customClusterUrl } = param; if (commitment) { setted.commitment = commitment; - (0, global_1.debugLog)("# Node change commitment: ", setted.commitment); + (0, global_1.debugLog)('# Node change commitment: ', setted.commitment); } if (cluster) { setted.clusterUrl = constants_1.Constants.switchCluster({ cluster: cluster }); - (0, global_1.debugLog)("# Node change clusterUrl: ", setted.clusterUrl); + (0, global_1.debugLog)('# Node change clusterUrl: ', setted.clusterUrl); } if (customClusterUrl) { - (0, global_1.debugLog)("# customClusterUrl: ", customClusterUrl); + (0, global_1.debugLog)('# customClusterUrl: ', customClusterUrl); setted.clusterUrl = constants_1.Constants.switchCluster({ customClusterUrl }); setted.customClusterUrl = customClusterUrl; - (0, global_1.debugLog)("# Node change cluster, custom cluster url: ", setted.clusterUrl); + (0, global_1.debugLog)('# Node change cluster, custom cluster url: ', setted.clusterUrl); } }; Node.confirmedSig = (signature, commitment = constants_1.Constants.COMMITMENT) => __awaiter(this, void 0, void 0, function* () { diff --git a/packages/shared/dist/esm/node.d.ts b/packages/shared/dist/esm/node.d.ts index f9b029f48..b69aae334 100644 --- a/packages/shared/dist/esm/node.d.ts +++ b/packages/shared/dist/esm/node.d.ts @@ -1,5 +1,5 @@ -import { Result } from "./result"; -import { Commitment, Connection } from "@solana/web3.js"; +import { Result } from './result'; +import { Commitment, Connection } from '@solana/web3.js'; export declare namespace Node { const getConnection: () => Connection; const changeConnection: (param: { diff --git a/packages/shared/dist/esm/node.js b/packages/shared/dist/esm/node.js index 488c381c0..5f268f57f 100644 --- a/packages/shared/dist/esm/node.js +++ b/packages/shared/dist/esm/node.js @@ -7,14 +7,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; -import { debugLog } from "./global"; -import { Result } from "./result"; -import { Constants } from "./constants"; -import { Connection } from "@solana/web3.js"; +import { debugLog } from './global'; +import { Result } from './result'; +import { Constants } from './constants'; +import { Connection } from '@solana/web3.js'; export var Node; (function (Node) { const setted = { - clusterUrl: "", + clusterUrl: '', commitment: Constants.COMMITMENT, customClusterUrl: [], }; @@ -44,23 +44,23 @@ export var Node; }; Node.changeConnection = (param) => { // initialize - 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: 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); + debugLog('# Node change cluster, custom cluster url: ', setted.clusterUrl); } }; Node.confirmedSig = (signature, commitment = Constants.COMMITMENT) => __awaiter(this, void 0, void 0, function* () { diff --git a/packages/shared/src/node.ts b/packages/shared/src/node.ts index 3741440e8..6b6f1ca1c 100644 --- a/packages/shared/src/node.ts +++ b/packages/shared/src/node.ts @@ -1,12 +1,12 @@ -import { debugLog } from "./global"; -import { Result } from "./result"; -import { Constants } from "./constants"; +import { debugLog } from './global'; +import { Result } from './result'; +import { Constants } from './constants'; -import { Commitment, Connection } from "@solana/web3.js"; +import { Commitment, Connection } from '@solana/web3.js'; export namespace Node { const setted = { - clusterUrl: "", + clusterUrl: '', commitment: Constants.COMMITMENT, customClusterUrl: [] as string[], }; @@ -41,27 +41,27 @@ export namespace Node { customClusterUrl?: string[]; }): void => { // initialize - 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: 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: ", + '# Node change cluster, custom cluster url: ', setted.clusterUrl, ); } diff --git a/packages/storage/dist/cjs/nft-storage.d.ts b/packages/storage/dist/cjs/nft-storage.d.ts index 8f2c693b9..a7ea9c837 100644 --- a/packages/storage/dist/cjs/nft-storage.d.ts +++ b/packages/storage/dist/cjs/nft-storage.d.ts @@ -1,5 +1,5 @@ -import { Result } from "@solana-suite/shared"; -import { FileContent, InfraSideInput } from "@solana-suite/shared-metaplex"; +import { Result } from '@solana-suite/shared'; +import { FileContent, InfraSideInput } from '@solana-suite/shared-metaplex'; export declare namespace NftStorage { const uploadContent: (filePath: FileContent) => Promise>; /** diff --git a/packages/storage/dist/cjs/nft-storage.d.ts.map b/packages/storage/dist/cjs/nft-storage.d.ts.map index e6b7b1825..b739c8e2f 100644 --- a/packages/storage/dist/cjs/nft-storage.d.ts.map +++ b/packages/storage/dist/cjs/nft-storage.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"nft-storage.d.ts","sourceRoot":"","sources":["../../src/nft-storage.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,MAAM,EAEP,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAE5E,yBAAiB,UAAU,CAAC;IA4BnB,MAAM,aAAa,aACd,WAAW,KACpB,QAAQ,OAAO,MAAM,EAAE,KAAK,CAAC,CAgB/B,CAAC;IAEF;;;;;;;;;;;;;;;;;OAiBG;IACI,MAAM,cAAc,aACf,eAAe,QAAQ,KAChC,QAAQ,OAAO,MAAM,EAAE,KAAK,CAAC,CAQ/B,CAAC;CACH"} \ No newline at end of file +{"version":3,"file":"nft-storage.d.ts","sourceRoot":"","sources":["../../src/nft-storage.ts"],"names":[],"mappings":"AACA,OAAO,EAAuB,MAAM,EAAO,MAAM,sBAAsB,CAAC;AAExE,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAE5E,yBAAiB,UAAU,CAAC;IA4BnB,MAAM,aAAa,aACd,WAAW,KACpB,QAAQ,OAAO,MAAM,EAAE,KAAK,CAAC,CAgB/B,CAAC;IAEF;;;;;;;;;;;;;;;;;OAiBG;IACI,MAAM,cAAc,aACf,eAAe,QAAQ,KAChC,QAAQ,OAAO,MAAM,EAAE,KAAK,CAAC,CAQ/B,CAAC;CACH"} \ No newline at end of file diff --git a/packages/storage/dist/cjs/nft-storage.js b/packages/storage/dist/cjs/nft-storage.js index 426e6daa2..1f53541e0 100644 --- a/packages/storage/dist/cjs/nft-storage.js +++ b/packages/storage/dist/cjs/nft-storage.js @@ -62,16 +62,16 @@ var NftStorage; const connect = () => new nft_storage_1.NFTStorage({ token: getNftStorageApiKey() }); NftStorage.uploadContent = (filePath) => __awaiter(this, void 0, void 0, function* () { return (0, shared_1.Try)(() => __awaiter(this, void 0, void 0, function* () { - (0, shared_1.debugLog)("# upload content: ", filePath); + (0, shared_1.debugLog)('# upload content: ', filePath); let file; if (provenance_layer_1.ProvenanceLayer.isNodeable(filePath)) { - file = (yield Promise.resolve().then(() => __importStar(require("fs")))).readFileSync(filePath); + file = (yield Promise.resolve().then(() => __importStar(require('fs')))).readFileSync(filePath); } else if (provenance_layer_1.ProvenanceLayer.isBrowserable(filePath)) { file = Buffer.from(yield filePath.arrayBuffer()); } else { - throw Error("Supported environment: only Node.js and Browser js"); + throw Error('Supported environment: only Node.js and Browser js'); } const blobImage = new nft_storage_1.Blob([file]); const res = yield connect().storeBlob(blobImage); @@ -98,7 +98,7 @@ var NftStorage; */ NftStorage.uploadMetadata = (metadata) => __awaiter(this, void 0, void 0, function* () { return (0, shared_1.Try)(() => __awaiter(this, void 0, void 0, function* () { - (0, shared_1.debugLog)("# upload metadata: ", metadata); + (0, shared_1.debugLog)('# upload metadata: ', metadata); const blobJson = new nft_storage_1.Blob([JSON.stringify(metadata)]); const res = yield connect().storeBlob(blobJson); return createGatewayUrl(res); diff --git a/packages/storage/dist/cjs/nft-storage.js.map b/packages/storage/dist/cjs/nft-storage.js.map index a1e60889f..504be5198 100644 --- a/packages/storage/dist/cjs/nft-storage.js.map +++ b/packages/storage/dist/cjs/nft-storage.js.map @@ -1 +1 @@ -{"version":3,"file":"nft-storage.js","sourceRoot":"","sources":["../../src/nft-storage.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA+C;AAC/C,iDAK8B;AAC9B,yDAAqD;AAGrD,IAAiB,UAAU,CA6E1B;AA7ED,WAAiB,UAAU;IACzB,IAAI,gBAAgB,GAAG,KAAK,CAAC;IAC7B,MAAM,mBAAmB,GAAG,GAAW,EAAE;QACvC,IAAI,CAAC,kBAAS,CAAC,gBAAgB,EAAE;YAC/B,IAAI,CAAC,gBAAgB,EAAE;gBACrB,OAAO,CAAC,IAAI,CACV;;;;;;;SAOD,CACA,CAAC;gBACF,gBAAgB,GAAG,IAAI,CAAC;aACzB;YACD,OAAO,kBAAS,CAAC,mBAAmB,CAAC;SACtC;aAAM;YACL,OAAO,kBAAS,CAAC,gBAAgB,CAAC;SACnC;IACH,CAAC,CAAC;IAEF,MAAM,gBAAgB,GAAG,CAAC,GAAW,EAAU,EAAE,CAC/C,GAAG,kBAAS,CAAC,uBAAuB,IAAI,GAAG,EAAE,CAAC;IAEhD,MAAM,OAAO,GAAG,GAAG,E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CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;aACpD;iBAAM,IAAI,kCAAe,CAAC,aAAa,CAAC,QAAQ,CAAC,EAAE;gBAClD,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,QAAQ,CAAC,WAAW,EAAE,CAAC,CAAC;aAClD;iBAAM;gBACL,MAAM,KAAK,CAAC,oDAAoD,CAAC,CAAC;aACnE;YAED,MAAM,SAAS,GAAG,IAAI,kBAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;YACnC,MAAM,GAAG,GAAG,MAAM,OAAO,EAAE,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;YACjD,OAAO,gBAAgB,CAAC,GAAG,CAAC,CAAC;QAC/B,CAAC,CAAA,CAAC,CAAC;IACL,CAAC,CAAA,CAAC;IAEF;;;;;;;;;;;;;;;;;OAiBG;IACU,yBAAc,GAAG,CAC5B,QAAiC,EACD,EAAE;QAClC,OAAO,IAAA,YAAG,EAAC,GAAS,EAAE;YACpB,IAAA,iBAAQ,EAAC,qBAAqB,EAAE,QAAQ,CAAC,CAAC;YAE1C,MAAM,QAAQ,GAAG,IAAI,kBAAI,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;YACtD,MAAM,GAAG,GAAG,MAAM,OAAO,EAAE,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;YAChD,OAAO,gBAAgB,CAAC,GAAG,CAAC,CAAC;QAC/B,CAAC,CAAA,CAAC,CAAC;IACL,CAAC,CAAA,CAAC;AACJ,CAAC,EA7EgB,UAAU,GAAV,kBAAU,KAAV,kBAAU,QA6E1B"} \ No newline at end of file diff --git a/packages/storage/dist/cjs/provenance-layer.js b/packages/storage/dist/cjs/provenance-layer.js index 4fc8772d6..05da7603a 100644 --- a/packages/storage/dist/cjs/provenance-layer.js +++ b/packages/storage/dist/cjs/provenance-layer.js @@ -100,7 +100,7 @@ var ProvenanceLayer; // @internal ProvenanceLayer.getIrys = (identity) => __awaiter(this, void 0, void 0, function* () { if ((0, shared_1.isNode)()) { - return (yield ProvenanceLayer.getNodeIrys(identity)); + return ProvenanceLayer.getNodeIrys(identity); } else if ((0, shared_1.isBrowser)()) { return (yield ProvenanceLayer.getBrowserIrys(identity)); @@ -110,7 +110,7 @@ var ProvenanceLayer; } }); // @internal - ProvenanceLayer.getNodeIrys = (secret) => __awaiter(this, void 0, void 0, function* () { + ProvenanceLayer.getNodeIrys = (secret) => { const clusterUrl = shared_1.Constants.switchCluster({ cluster: shared_1.Constants.currentCluster, }); @@ -124,7 +124,7 @@ var ProvenanceLayer; config: { providerUrl: clusterUrl }, }); return irys; - }); + }; // @internal ProvenanceLayer.getBrowserIrys = (provider) => __awaiter(this, void 0, void 0, function* () { const clusterUrl = shared_1.Constants.switchCluster({ @@ -142,7 +142,7 @@ var ProvenanceLayer; const priceAtomic = yield irys.getPrice(size); const priceConverted = irys.utils.fromAtomic(priceAtomic); (0, shared_1.debugLog)('# size: ', size); - (0, shared_1.debugLog)(`# price: ${priceConverted}`); + (0, shared_1.debugLog)('# price: ', priceConverted); return priceConverted; }); })(ProvenanceLayer = exports.ProvenanceLayer || (exports.ProvenanceLayer = {})); diff --git a/packages/storage/dist/cjs/provenance-layer.js.map b/packages/storage/dist/cjs/provenance-layer.js.map index d0cb6a826..65c617ecc 100644 --- a/packages/storage/dist/cjs/provenance-layer.js.map +++ b/packages/storage/dist/cjs/provenance-layer.js.map @@ -1 +1 @@ -{"version":3,"file":"provenance-layer.js","sourceRoot":"","sources":["../../src/provenance-layer.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iDAM8B;AAI9B,iDAA0C;AAG1C,IAAiB,eAAe,CA+H/B;AA/HD,WAAiB,eAAe;IAC9B,MAAM,KAAK,GAAG,QAAQ,CAAC;IAEV,0BAAU,GAAG,CACxB,UAAuB,EACvB,QAAkB,EAClB,IAAW,EACM,EAAE;QACnB,MAAM,IAAI,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pC,CAAC,CAAC;QACH,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;IAEF,YAAY;IACC,8BAAc,GAAG,CAAO,QAAiB,EAAoB,EAAE;QAC1E,MAAM,UAAU,GAAG,kBAAS,CAAC,aAAa,CAAC;YACzC,OAAO,EAAE,kBAAS,CAAC,cAAc;SAClC,CAAC,CAAC;QACH,MAAM,GAAG,GAAG,kBAAS,CAAC,kBAAkB,CAAC;QACzC,MAAM,KAAK,GAAG,KAAK,CAAC;QACpB,MAAM,MAAM,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC;QACvE,MAAM,OAAO,GAAG,IAAI,aAAO,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC;QACpD,MAAM,OAAO,CAAC,KAAK,EAAE,CAAC;QACtB,OAAO,OAAO,CAAC;IACjB,CAAC,CAAA,CAAC;IAEF,MAAM,aAAa,GAAG,CAAO,IAAY,EAAE,QAAkB,EAAE,EAAE;QAC/D,MAAM,IAAI,GAAG,MAAM,gBAAA,OAAO,CAAC,QAAQ,CAAC,CAAC;QACrC,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QAC9C,MAAM,cAAc,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;QAC1D,IAAA,iBAAQ,EAAC,UAAU,EAAE,IAAI,CAAC,CAAC;QAC3B,IAAA,iBAAQ,EAAC,WAAW,EAAE,cAAc,CAAC,CAAC;QACtC,OAAO,cAAc,CAAC;IACxB,CAAC,CAAA,CAAC;AACJ,CAAC,EA/HgB,eAAe,GAAf,uBAAe,KAAf,uBAAe,QA+H/B"} \ No newline at end of file diff --git a/packages/storage/dist/cjs/storage.d.ts b/packages/storage/dist/cjs/storage.d.ts index 295d7ce32..4b3cbc79d 100644 --- a/packages/storage/dist/cjs/storage.d.ts +++ b/packages/storage/dist/cjs/storage.d.ts @@ -1,5 +1,5 @@ -import { Result, Secret } from "@solana-suite/shared"; -import { FileContent, InfraSideInput, StorageType, UserSideInput } from "@solana-suite/shared-metaplex"; +import { Result, Secret } from '@solana-suite/shared'; +import { FileContent, InfraSideInput, StorageType, UserSideInput } from '@solana-suite/shared-metaplex'; export declare namespace Storage { const toConvertOffchaindata: (input: UserSideInput.NftMetadata, sellerFeeBasisPoints: number) => InfraSideInput.Offchain; const uploadContent: (filePath: FileContent, storageType: StorageType, feePayer?: Secret) => Promise>; diff --git a/packages/storage/dist/cjs/storage.js b/packages/storage/dist/cjs/storage.js index e5cfd32ca..98ab11e92 100644 --- a/packages/storage/dist/cjs/storage.js +++ b/packages/storage/dist/cjs/storage.js @@ -23,30 +23,30 @@ var Storage; external_url: input.external_url, attributes: input.attributes, properties: input.properties, - image: "", + image: '', options: input.options, }; return data; }; Storage.uploadContent = (filePath, storageType, feePayer) => __awaiter(this, void 0, void 0, function* () { - if (storageType === "arweave") { + if (storageType === 'arweave') { if (!feePayer) { - throw Error("Arweave needs to have feepayer"); + throw Error('Arweave needs to have feepayer'); } return yield arweave_1.Arweave.uploadFile(filePath, feePayer); } - else if (storageType === "nftStorage") { + else if (storageType === 'nftStorage') { return yield nft_storage_1.NftStorage.uploadContent(filePath); } else { - throw Error("Not found storageType"); + throw Error('Not found storageType'); } }); Storage.uploadMetaAndContent = (input, filePath, storageType, feePayer) => __awaiter(this, void 0, void 0, function* () { let storage; - if (storageType === "arweave") { + if (storageType === 'arweave') { if (!feePayer) { - throw Error("Arweave needs to have feepayer"); + throw Error('Arweave needs to have feepayer'); } storage = yield (yield arweave_1.Arweave.uploadFile(filePath, feePayer)).unwrap((ok) => __awaiter(this, void 0, void 0, function* () { input.image = ok; @@ -55,7 +55,7 @@ var Storage; throw err; }); } - else if (storageType === "nftStorage") { + else if (storageType === 'nftStorage') { storage = yield (yield nft_storage_1.NftStorage.uploadContent(filePath)).unwrap((ok) => __awaiter(this, void 0, void 0, function* () { input.image = ok; return yield nft_storage_1.NftStorage.uploadMetadata(input); @@ -64,10 +64,10 @@ var Storage; }); } else { - throw Error("No match storageType"); + throw Error('No match storageType'); } if (!storage) { - throw Error("Empty storage object"); + throw Error('Empty storage object'); } return storage; }); diff --git a/packages/storage/dist/cjs/types/bundlr.d.ts.map b/packages/storage/dist/cjs/types/bundlr.d.ts.map index 560cff963..980af1df9 100644 --- a/packages/storage/dist/cjs/types/bundlr.d.ts.map +++ b/packages/storage/dist/cjs/types/bundlr.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"bundlr.d.ts","sourceRoot":"","sources":["../../../src/types/bundlr.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAErD,MAAM,MAAM,OAAO,GAAG;IACpB,SAAS,EAAE,SAAS,CAAA;CAErB,CAAC"} \ No newline at end of file +{"version":3,"file":"bundlr.d.ts","sourceRoot":"","sources":["../../../src/types/bundlr.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,MAAM,MAAM,OAAO,GAAG;IACpB,SAAS,EAAE,SAAS,CAAC;CAEtB,CAAC"} \ No newline at end of file diff --git a/packages/storage/dist/esm/nft-storage.d.ts b/packages/storage/dist/esm/nft-storage.d.ts index 8f2c693b9..a7ea9c837 100644 --- a/packages/storage/dist/esm/nft-storage.d.ts +++ b/packages/storage/dist/esm/nft-storage.d.ts @@ -1,5 +1,5 @@ -import { Result } from "@solana-suite/shared"; -import { FileContent, InfraSideInput } from "@solana-suite/shared-metaplex"; +import { Result } from '@solana-suite/shared'; +import { FileContent, InfraSideInput } from '@solana-suite/shared-metaplex'; export declare namespace NftStorage { const uploadContent: (filePath: FileContent) => Promise>; /** diff --git a/packages/storage/dist/esm/nft-storage.d.ts.map b/packages/storage/dist/esm/nft-storage.d.ts.map index e6b7b1825..b739c8e2f 100644 --- a/packages/storage/dist/esm/nft-storage.d.ts.map +++ b/packages/storage/dist/esm/nft-storage.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"nft-storage.d.ts","sourceRoot":"","sources":["../../src/nft-storage.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,MAAM,EAEP,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAE5E,yBAAiB,UAAU,CAAC;IA4BnB,MAAM,aAAa,aACd,WAAW,KACpB,QAAQ,OAAO,MAAM,EAAE,KAAK,CAAC,CAgB/B,CAAC;IAEF;;;;;;;;;;;;;;;;;OAiBG;IACI,MAAM,cAAc,aACf,eAAe,QAAQ,KAChC,QAAQ,OAAO,MAAM,EAAE,KAAK,CAAC,CAQ/B,CAAC;CACH"} \ No newline at end of file +{"version":3,"file":"nft-storage.d.ts","sourceRoot":"","sources":["../../src/nft-storage.ts"],"names":[],"mappings":"AACA,OAAO,EAAuB,MAAM,EAAO,MAAM,sBAAsB,CAAC;AAExE,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAE5E,yBAAiB,UAAU,CAAC;IA4BnB,MAAM,aAAa,aACd,WAAW,KACpB,QAAQ,OAAO,MAAM,EAAE,KAAK,CAAC,CAgB/B,CAAC;IAEF;;;;;;;;;;;;;;;;;OAiBG;IACI,MAAM,cAAc,aACf,eAAe,QAAQ,KAChC,QAAQ,OAAO,MAAM,EAAE,KAAK,CAAC,CAQ/B,CAAC;CACH"} \ No newline at end of file diff --git a/packages/storage/dist/esm/nft-storage.js b/packages/storage/dist/esm/nft-storage.js index ec75b95b0..0c7c5f9c7 100644 --- a/packages/storage/dist/esm/nft-storage.js +++ b/packages/storage/dist/esm/nft-storage.js @@ -7,9 +7,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; -import { Blob, NFTStorage } from "nft.storage"; -import { Constants, debugLog, Try, } from "@solana-suite/shared"; -import { ProvenanceLayer } from "./provenance-layer"; +import { Blob, NFTStorage } from 'nft.storage'; +import { Constants, debugLog, Try } from '@solana-suite/shared'; +import { ProvenanceLayer } from './provenance-layer'; export var NftStorage; (function (NftStorage) { let isDisplayWarning = false; @@ -36,16 +36,16 @@ export var NftStorage; const connect = () => new NFTStorage({ token: getNftStorageApiKey() }); NftStorage.uploadContent = (filePath) => __awaiter(this, void 0, void 0, function* () { return Try(() => __awaiter(this, void 0, void 0, function* () { - debugLog("# upload content: ", filePath); + debugLog('# upload content: ', filePath); let file; if (ProvenanceLayer.isNodeable(filePath)) { - file = (yield import("fs")).readFileSync(filePath); + file = (yield import('fs')).readFileSync(filePath); } else if (ProvenanceLayer.isBrowserable(filePath)) { file = Buffer.from(yield filePath.arrayBuffer()); } else { - throw Error("Supported environment: only Node.js and Browser js"); + throw Error('Supported environment: only Node.js and Browser js'); } const blobImage = new Blob([file]); const res = yield connect().storeBlob(blobImage); @@ -72,7 +72,7 @@ export var NftStorage; */ NftStorage.uploadMetadata = (metadata) => __awaiter(this, void 0, void 0, function* () { return Try(() => __awaiter(this, void 0, void 0, function* () { - debugLog("# upload metadata: ", metadata); + debugLog('# upload metadata: ', metadata); const blobJson = new Blob([JSON.stringify(metadata)]); const res = yield connect().storeBlob(blobJson); return createGatewayUrl(res); diff --git a/packages/storage/dist/esm/nft-storage.js.map b/packages/storage/dist/esm/nft-storage.js.map index 5ec36b061..f5445cac7 100644 --- a/packages/storage/dist/esm/nft-storage.js.map +++ b/packages/storage/dist/esm/nft-storage.js.map @@ -1 +1 @@ -{"version":3,"file":"nft-storage.js","sourceRoot":"","sources":["../../src/nft-storage.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EACL,SAAS,EACT,QAAQ,EAER,GAAG,GACJ,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,eAAe,EAAE,MAAM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CAAC,GAAS,EAAE;YACpB,QAAQ,CAAC,qBAAqB,EAAE,QAAQ,CAAC,CAAC;YAE1C,MAAM,QAAQ,GAAG,IAAI,IAAI,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;YACtD,MAAM,GAAG,GAAG,MAAM,OAAO,EAAE,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;YAChD,OAAO,gBAAgB,CAAC,GAAG,CAAC,CAAC;QAC/B,CAAC,CAAA,CAAC,CAAC;IACL,CAAC,CAAA,CAAC;AACJ,CAAC,EA7EgB,UAAU,KAAV,UAAU,QA6E1B"} \ No newline at end of file diff --git a/packages/storage/dist/esm/provenance-layer.js b/packages/storage/dist/esm/provenance-layer.js index b1287e412..f5d95119d 100644 --- a/packages/storage/dist/esm/provenance-layer.js +++ b/packages/storage/dist/esm/provenance-layer.js @@ -74,7 +74,7 @@ export var ProvenanceLayer; // @internal ProvenanceLayer.getIrys = (identity) => __awaiter(this, void 0, void 0, function* () { if (isNode()) { - return (yield ProvenanceLayer.getNodeIrys(identity)); + return ProvenanceLayer.getNodeIrys(identity); } else if (isBrowser()) { return (yield ProvenanceLayer.getBrowserIrys(identity)); @@ -84,7 +84,7 @@ export var ProvenanceLayer; } }); // @internal - ProvenanceLayer.getNodeIrys = (secret) => __awaiter(this, void 0, void 0, function* () { + ProvenanceLayer.getNodeIrys = (secret) => { const clusterUrl = Constants.switchCluster({ cluster: Constants.currentCluster, }); @@ -98,7 +98,7 @@ export var ProvenanceLayer; config: { providerUrl: clusterUrl }, }); return irys; - }); + }; // @internal ProvenanceLayer.getBrowserIrys = (provider) => __awaiter(this, void 0, void 0, function* () { const clusterUrl = Constants.switchCluster({ @@ -116,7 +116,7 @@ export var ProvenanceLayer; const priceAtomic = yield irys.getPrice(size); const priceConverted = irys.utils.fromAtomic(priceAtomic); debugLog('# size: ', size); - debugLog(`# price: ${priceConverted}`); + debugLog('# price: ', priceConverted); return priceConverted; }); })(ProvenanceLayer || (ProvenanceLayer = {})); diff --git a/packages/storage/dist/esm/provenance-layer.js.map b/packages/storage/dist/esm/provenance-layer.js.map index e64c969df..e14e67624 100644 --- a/packages/storage/dist/esm/provenance-layer.js.map +++ b/packages/storage/dist/esm/provenance-layer.js.map @@ -1 +1 @@ -{"version":3,"file":"provenance-layer.js","sourceRoot":"","sources":["../../src/provenance-layer.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EACL,SAAS,EACT,QAAQ,EACR,SAAS,EACT,MAAM,GAEP,MAAM,sBAAsB,CAAC;AAI9B,OAAO,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAG1C,MAAM,KAAW,eAAe,CA+H/B;AA/HD,WAAiB,eAAe;IAC9B,MAAM,KAAK,GAAG,QAAQ,CAAC;IAEV,0BAAU,GAAG,CACxB,UAAuB,EACvB,QAAkB,EAClB,IAAW,EACM,EAAE;QACnB,MAAM,IAAI,GAAG,MAAM,gBAAA,OAAO,CAAC,QAAQ,CAAC,CAAC;QACrC,IAAI,OAAwB,CAAC;QAC7B,IAAI,gBAAA,YAAY,CAAC,UAAU,CAAC,EAAE;YAC5B,OAAO,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,UAAU,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;SACvD;aAAM;YACL,MAAM,KAAK,CAAC,kCAAkC,CAAC,CAAC;SACjD;QACD,OAAO,GAAG,SAAS,CAAC,gBAAgB,IAAI,OAAO,CAAC,EAAE,EAAE,CAAC;IACvD,CAAC,CAAA,CAAC;IAEW,0BAAU,GAAG,CACxB,IAAY,EACZ,QAAkB,EAClB,IAAW,EACM,EAAE;QACnB,MAAM,IAAI,GAAG,MAAM,gBAAA,OAAO,CAAC,QAAQ,CAAC,CAAC;QACrC,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;QAClD,OAAO,GAAG,SAAS,CAAC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MAAM,IAAI,GAAG,MAAM,gBAAA,OAAO,CAAC,QAAQ,CAAC,CAAC;QACrC,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QAC9C,MAAM,cAAc,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;QAC1D,QAAQ,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;QAC3B,QAAQ,CAAC,WAAW,EAAE,cAAc,CAAC,CAAC;QACtC,OAAO,cAAc,CAAC;IACxB,CAAC,CAAA,CAAC;AACJ,CAAC,EA/HgB,eAAe,KAAf,eAAe,QA+H/B"} \ No newline at end of file diff --git a/packages/storage/dist/esm/storage.d.ts b/packages/storage/dist/esm/storage.d.ts index 295d7ce32..4b3cbc79d 100644 --- a/packages/storage/dist/esm/storage.d.ts +++ b/packages/storage/dist/esm/storage.d.ts @@ -1,5 +1,5 @@ -import { Result, Secret } from "@solana-suite/shared"; -import { FileContent, InfraSideInput, StorageType, UserSideInput } from "@solana-suite/shared-metaplex"; +import { Result, Secret } from '@solana-suite/shared'; +import { FileContent, InfraSideInput, StorageType, UserSideInput } from '@solana-suite/shared-metaplex'; export declare namespace Storage { const toConvertOffchaindata: (input: UserSideInput.NftMetadata, sellerFeeBasisPoints: number) => InfraSideInput.Offchain; const uploadContent: (filePath: FileContent, storageType: StorageType, feePayer?: Secret) => Promise>; diff --git a/packages/storage/dist/esm/storage.js b/packages/storage/dist/esm/storage.js index 058450961..fd90ef2b6 100644 --- a/packages/storage/dist/esm/storage.js +++ b/packages/storage/dist/esm/storage.js @@ -7,8 +7,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; -import { Arweave } from "./arweave"; -import { NftStorage } from "./nft-storage"; +import { Arweave } from './arweave'; +import { NftStorage } from './nft-storage'; export var Storage; (function (Storage) { Storage.toConvertOffchaindata = (input, sellerFeeBasisPoints) => { @@ -20,30 +20,30 @@ export var Storage; external_url: input.external_url, attributes: input.attributes, properties: input.properties, - image: "", + image: '', options: input.options, }; return data; }; Storage.uploadContent = (filePath, storageType, feePayer) => __awaiter(this, void 0, void 0, function* () { - if (storageType === "arweave") { + if (storageType === 'arweave') { if (!feePayer) { - throw Error("Arweave needs to have feepayer"); + throw Error('Arweave needs to have feepayer'); } return yield Arweave.uploadFile(filePath, feePayer); } - else if (storageType === "nftStorage") { + else if (storageType === 'nftStorage') { return yield NftStorage.uploadContent(filePath); } else { - throw Error("Not found storageType"); + throw Error('Not found storageType'); } }); Storage.uploadMetaAndContent = (input, filePath, storageType, feePayer) => __awaiter(this, void 0, void 0, function* () { let storage; - if (storageType === "arweave") { + if (storageType === 'arweave') { if (!feePayer) { - throw Error("Arweave needs to have feepayer"); + throw Error('Arweave needs to have feepayer'); } storage = yield (yield Arweave.uploadFile(filePath, feePayer)).unwrap((ok) => __awaiter(this, void 0, void 0, function* () { input.image = ok; @@ -52,7 +52,7 @@ export var Storage; throw err; }); } - else if (storageType === "nftStorage") { + else if (storageType === 'nftStorage') { storage = yield (yield NftStorage.uploadContent(filePath)).unwrap((ok) => __awaiter(this, void 0, void 0, function* () { input.image = ok; return yield NftStorage.uploadMetadata(input); @@ -61,10 +61,10 @@ export var Storage; }); } else { - throw Error("No match storageType"); + throw Error('No match storageType'); } if (!storage) { - throw Error("Empty storage object"); + throw Error('Empty storage object'); } return storage; }); diff --git a/packages/storage/dist/esm/types/bundlr.d.ts.map b/packages/storage/dist/esm/types/bundlr.d.ts.map index 560cff963..980af1df9 100644 --- a/packages/storage/dist/esm/types/bundlr.d.ts.map +++ b/packages/storage/dist/esm/types/bundlr.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"bundlr.d.ts","sourceRoot":"","sources":["../../../src/types/bundlr.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAErD,MAAM,MAAM,OAAO,GAAG;IACpB,SAAS,EAAE,SAAS,CAAA;CAErB,CAAC"} \ No newline at end of file +{"version":3,"file":"bundlr.d.ts","sourceRoot":"","sources":["../../../src/types/bundlr.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,MAAM,MAAM,OAAO,GAAG;IACpB,SAAS,EAAE,SAAS,CAAC;CAEtB,CAAC"} \ No newline at end of file diff --git a/packages/storage/src/provenance-layer.ts b/packages/storage/src/provenance-layer.ts index d11001a33..36232502f 100644 --- a/packages/storage/src/provenance-layer.ts +++ b/packages/storage/src/provenance-layer.ts @@ -76,7 +76,7 @@ export namespace ProvenanceLayer { // @internal export const toByteLength = async (content: FileContent): Promise => { - let length: number = 100; + let length = 100; if (isNodeable(content)) { length = (await import('fs')).readFileSync(content).length; } else if (isBrowserable(content)) { @@ -92,7 +92,7 @@ export namespace ProvenanceLayer { identity: Identity, ) => { if (isNode()) { - return (await getNodeIrys(identity as Secret)) as T; + return getNodeIrys(identity as Secret) as T; } else if (isBrowser()) { return (await getBrowserIrys(identity as Phantom)) as T; } else { @@ -101,7 +101,7 @@ export namespace ProvenanceLayer { }; // @internal - export const getNodeIrys = async (secret: Secret) => { + export const getNodeIrys = (secret: Secret) => { const clusterUrl = Constants.switchCluster({ cluster: Constants.currentCluster, }); @@ -135,7 +135,7 @@ export namespace ProvenanceLayer { const priceAtomic = await irys.getPrice(size); const priceConverted = irys.utils.fromAtomic(priceAtomic); debugLog('# size: ', size); - debugLog(`# price: ${priceConverted}`); + debugLog('# price: ', priceConverted); return priceConverted; }; }