UNPKG

@jagad/icsi

Version:

Internet Computer Subaccount Indexer Library - TypeScript SDK for ICP multi-token subaccount management, transaction tracking, and automated sweeping with webhook support

14 lines (13 loc) 615 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.addHttpAgentFromSeed = addHttpAgentFromSeed; exports.addHttpAgentAndExecute = addHttpAgentAndExecute; const utils_1 = require("./utils"); async function addHttpAgentFromSeed(action, args, seedPhrase) { (0, utils_1.isNotEmptyOrError)(seedPhrase, 'User vault authenticated seed phrase is undefined.'); const agent = (0, utils_1.createHostAgentAndIdentityFromSeed)(seedPhrase); return await action(agent, ...args); } async function addHttpAgentAndExecute(action, args, agent) { return await action(agent, ...args); }