Skip to content

keys-pub/tsclient

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Mar 26, 2021
d35d4ce · Mar 26, 2021

History

22 Commits
Mar 26, 2021
Mar 26, 2021
Mar 26, 2021
Oct 15, 2020
Oct 15, 2020
Oct 14, 2020
Jan 13, 2021
Nov 12, 2020
Nov 12, 2020
Mar 26, 2021
Nov 12, 2020
Mar 26, 2021

Repository files navigation

tsclient

yarn add @keys-pub/tsclient
import {Credentials, rpcService, RPCService, certPath, RPCError} from '@keys-pub/tsclient'

export const creds: Credentials = new Credentials(certPath('MyApp'))
export const rpc: RPCService = rpcService('localhost:22405', creds)

// Authenticate with service
const auth = await rpc.authUnlock({
  secret: 'mypassword',
  type: AuthType.PASSWORD_AUTH,
  client: 'myapp',
})
// Set auth token from unlock on the service auth
creds.token = auth.authToken

// Search
const search = await rpc.search({})
console.log('Search:', search)

Publishing

npm login
npm publish --access public

Releases

No releases published

Packages

No packages published