yarn add @keys-pub/tsclient
import{Credentials,rpcService,RPCService,certPath,RPCError}from'@keys-pub/tsclient'exportconstcreds: Credentials=newCredentials(certPath('MyApp'))exportconstrpc: RPCService=rpcService('localhost:22405',creds)// Authenticate with serviceconstauth=awaitrpc.authUnlock({secret: 'mypassword',type: AuthType.PASSWORD_AUTH,client: 'myapp',})// Set auth token from unlock on the service authcreds.token=auth.authToken// Searchconstsearch=awaitrpc.search({})console.log('Search:',search)npm login
npm publish --access public