@solana/spl-governance
Advanced tools
Comparing version 0.0.4 to 0.0.5
@@ -54,5 +54,5 @@ "use strict"; | ||
var bs58_1 = __importDefault(require("bs58")); | ||
var wallet_adapter_base_1 = require("@solana/wallet-adapter-base"); | ||
var script_1 = require("../tools/script"); | ||
var borsh_1 = require("../tools/borsh"); | ||
var walletAdapter_1 = require("../tools/walletAdapter"); | ||
// Context to make RPC calls for given clone programId, current connection, endpoint and wallet | ||
@@ -71,3 +71,3 @@ var RpcContext = /** @class */ (function () { | ||
if (!((_a = this.wallet) === null || _a === void 0 ? void 0 : _a.publicKey)) { | ||
throw new wallet_adapter_base_1.WalletNotConnectedError(); | ||
throw new walletAdapter_1.WalletNotConnectedError(); | ||
} | ||
@@ -74,0 +74,0 @@ return this.wallet.publicKey; |
@@ -1,3 +0,3 @@ | ||
import { WalletNotConnectedError } from '@solana/wallet-adapter-base'; | ||
import { SendTransactionError } from '../tools/sdk/runtime'; | ||
import { WalletNotConnectedError } from '../tools/walletAdapter'; | ||
export declare const GovernanceError: Record<number, string>; | ||
@@ -4,0 +4,0 @@ export declare const TokenError: Record<number, string>; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.isWalletNotConnectedError = exports.getTransactionErrorMsg = exports.GovernanceToolsError = exports.TokenError = exports.GovernanceError = void 0; | ||
var wallet_adapter_base_1 = require("@solana/wallet-adapter-base"); | ||
var walletAdapter_1 = require("../tools/walletAdapter"); | ||
exports.GovernanceError = [ | ||
@@ -150,5 +150,5 @@ 'Invalid instruction passed to program', | ||
function isWalletNotConnectedError(error) { | ||
return error instanceof wallet_adapter_base_1.WalletNotConnectedError; | ||
return error instanceof walletAdapter_1.WalletNotConnectedError; | ||
} | ||
exports.isWalletNotConnectedError = isWalletNotConnectedError; | ||
//# sourceMappingURL=errors.js.map |
@@ -1,3 +0,14 @@ | ||
import { SignerWalletAdapter } from '@solana/wallet-adapter-base'; | ||
export declare type WalletSigner = Pick<SignerWalletAdapter, 'publicKey' | 'signTransaction' | 'signAllTransactions'>; | ||
import { PublicKey, Transaction } from '@solana/web3.js'; | ||
export declare type WalletSigner = { | ||
publicKey: PublicKey | null; | ||
signTransaction(transaction: Transaction): Promise<Transaction>; | ||
signAllTransactions(transaction: Transaction[]): Promise<Transaction[]>; | ||
}; | ||
export declare class WalletError extends Error { | ||
error: any; | ||
constructor(message?: string, error?: any); | ||
} | ||
export declare class WalletNotConnectedError extends WalletError { | ||
name: string; | ||
} | ||
//# sourceMappingURL=walletAdapter.d.ts.map |
{ | ||
"name": "@solana/spl-governance", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"description": "SPL Governance Client API", | ||
@@ -34,3 +34,4 @@ "author": "Solana Maintainers <maintainers@solana.foundation>", | ||
"bn.js": "^5.1.3", | ||
"bs58": "^4.0.1" | ||
"bs58": "^4.0.1", | ||
"borsh": "^0.3.1" | ||
}, | ||
@@ -37,0 +38,0 @@ "devDependencies": { |
@@ -7,3 +7,3 @@ # `spl-governance SDK` | ||
`(npm|pnpm|yarn) add @solana/spl-governance` | ||
`(npm|pnpm|yarn) add @solana/spl-governance @solana/web3.js` | ||
@@ -14,2 +14,3 @@ ## Usage | ||
import { getRealms } from '@solana/spl-governance'; | ||
import { PublicKey } from '@solana/web3.js'; | ||
@@ -16,0 +17,0 @@ const programId = new PublicKey('GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw'); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
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
423589
6218
20
5
+ Addedborsh@^0.3.1
+ Added@types/bn.js@4.11.6(transitive)
+ Added@types/node@22.9.0(transitive)
+ Addedborsh@0.3.1(transitive)
+ Addedundici-types@6.19.8(transitive)