UNPKG

@neardefi/shade-agent-js

Version:

This library is intended to be used in conjunction with the [shade agent template](https://github.com/NearDeFi/shade-agent-template/).

15 lines (13 loc) 695 B
/** * Derives a worker account using TEE-based entropy * @param {Buffer | undefined} hash - User provided hash for seed phrase generation. When undefined, it will try to use TEE hardware entropy or JS crypto. * @returns {Promise<string>} The derived account ID */ declare function deriveAgentAccount(hash: Buffer | undefined): Promise<string>; /** * Registers a worker with the contract * @param {String | undefined} codehash - User provided codehash for proxy contract, running locally and NOT in a TEE * @returns {Promise<boolean>} Result of the registration */ declare function registerAgent(codehash: String | undefined): Promise<any>; export { deriveAgentAccount, registerAgent };