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/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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;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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/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,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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/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; }; }