vasku-keys
Version:
Methods of working with key pair
36 lines (25 loc) • 880 B
Markdown
# Vasku keys

Use key pair in [Vasku](https://github.com/savonarolagirolamo/vasku) scripts


## Read key pair from JSON file
```typescript
import { readKeys } from 'vasku-keys'
// ...
const keys: KeyPair = readKeys('/home/user/keys/GiverV2.keys.json')
```
## Generate random key pair if key file does not exist
```typescript
import { generateOrReadKeys } from 'vasku-keys'
// ...
const keys: KeyPair = await generateOrReadKeys('/home/user/keys/GiverV3.keys.json')
```
## Generate JSON file with random key pair in keys directory if key file does not exist
```typescript
import { namedKeys } from 'vasku-keys'
// ...
const keys: KeyPair = await namedKeys('giver')
```
## Development
[CONTRIBUTING.md](./CONTRIBUTING.md)