@marinade.finance/cli-common
Advanced tools
Comparing version 1.0.1 to 1.0.2
{ | ||
"name": "@marinade.finance/cli-common", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "CLI tooling", | ||
@@ -5,0 +5,0 @@ "repository": { |
import { Logger } from 'pino'; | ||
import { Wallet } from './wallet'; | ||
import { Transaction, VersionedTransaction, PublicKey } from '@solana/web3.js'; | ||
export declare function getContext(): Context; | ||
@@ -13,3 +14,3 @@ export declare function setContext(newContext: Context): void; | ||
constructor({ wallet, logger, skipPreflight, simulate, printOnly, commandName, }: { | ||
wallet: Wallet; | ||
wallet?: Wallet; | ||
logger: Logger; | ||
@@ -22,1 +23,6 @@ skipPreflight: boolean; | ||
} | ||
export declare class NullWallet implements Wallet { | ||
readonly publicKey: PublicKey; | ||
signTransaction<T extends Transaction | VersionedTransaction>(tx: T): Promise<T>; | ||
signAllTransactions<T extends Transaction | VersionedTransaction>(txs: T[]): Promise<T[]>; | ||
} |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Context = exports.setContext = exports.getContext = void 0; | ||
exports.NullWallet = exports.Context = exports.setContext = exports.getContext = void 0; | ||
const web3_js_1 = require("@solana/web3.js"); | ||
let context; | ||
@@ -20,3 +21,3 @@ function getContext() { | ||
class Context { | ||
constructor({ wallet, logger, skipPreflight, simulate, printOnly, commandName, }) { | ||
constructor({ wallet = new NullWallet(), logger, skipPreflight, simulate, printOnly, commandName, }) { | ||
this.commandName = commandName; | ||
@@ -31,2 +32,14 @@ this.wallet = wallet; | ||
exports.Context = Context; | ||
class NullWallet { | ||
constructor() { | ||
this.publicKey = web3_js_1.PublicKey.default; | ||
} | ||
async signTransaction(tx) { | ||
return tx; | ||
} | ||
async signAllTransactions(txs) { | ||
return txs; | ||
} | ||
} | ||
exports.NullWallet = NullWallet; | ||
//# sourceMappingURL=context.js.map |
@@ -9,1 +9,2 @@ export * from './parsers'; | ||
export * from './createTempFileKeypair'; | ||
export * from './pinoLogging'; |
@@ -25,2 +25,3 @@ "use strict"; | ||
__exportStar(require("./createTempFileKeypair"), exports); | ||
__exportStar(require("./pinoLogging"), exports); | ||
//# sourceMappingURL=index.js.map |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
35730
31
590
4