UNPKG

@dbricks/dbricks-ts

Version:

## Introduction

14 lines (13 loc) 566 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.loadKeypairSync = void 0; const web3_js_1 = require("@solana/web3.js"); const fs_1 = __importDefault(require("fs")); function loadKeypairSync(path) { const secretKey = JSON.parse(fs_1.default.readFileSync(path, 'utf8')); return web3_js_1.Keypair.fromSecretKey(Uint8Array.from(secretKey)); } exports.loadKeypairSync = loadKeypairSync;