Skip to content

Commit

Permalink
fix: rename KeyTypes (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterTheOne committed Mar 14, 2021
1 parent 7e74be7 commit e0fee56
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 18 deletions.
3 changes: 1 addition & 2 deletions dist/lib/contracts.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { IVaultedKeyProvider } from './vaultedKeyProvider';
interface ContractsGatewayInfo {
name: string;
chainId: number;
Expand All @@ -9,7 +8,7 @@ interface AddressInfo {
balance: number;
}
export interface IContractsAdapter {
assembleTxFromInteractionToken: (requestToken: ITransactionEncodable, from: string, nonce: number, vault: IVaultedKeyProvider, pass: string) => string;
assembleTxFromInteractionToken: (requestToken: ITransactionEncodable, from: string, nonce: number, vault: any, pass: string) => string;
}
export interface IContractsGateway {
getNetworkInfo: () => ContractsGatewayInfo | {};
Expand Down
8 changes: 4 additions & 4 deletions dist/lib/vaultedKeyProvider.d.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
/// <reference types="node" />
import { IDigestable } from './linkedDataSignature';
export declare enum KeyTypes {
export declare enum KeyPaths {
jolocomIdentityKey = "m/73'/0'/0'/0",
ethereumKey = "m/44'/60'/0'/0/0"
}
export declare enum SchemeTypes {
export declare enum KeyTypes {
secp256k1 = "EcdsaSecp256k1",
x25519 = "X25519"
}
export interface IVaultedKeyProvider {
getPublicKey: (derivationArgs: IKeyDerivationArgs, scheme?: SchemeTypes) => Buffer;
getPrivateKey: (derivationArgs: IKeyDerivationArgs, scheme?: SchemeTypes) => Buffer;
getPublicKey: (derivationArgs: IKeyDerivationArgs, scheme?: KeyTypes) => Buffer;
getPrivateKey: (derivationArgs: IKeyDerivationArgs, scheme?: KeyTypes) => Buffer;
sign: (derivationArgs: IKeyDerivationArgs, digest: Buffer) => Buffer;
signDigestable: (derivationArgs: IKeyDerivationArgs, toSign: IDigestable) => Promise<Buffer>;
asymEncrypt: (data: Buffer, pubKey: Buffer) => Promise<string>;
Expand Down
16 changes: 8 additions & 8 deletions dist/lib/vaultedKeyProvider.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions lib/vaultedKeyProvider.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import { IDigestable } from './linkedDataSignature'

export enum KeyTypes {
export enum KeyPaths {
jolocomIdentityKey = "m/73'/0'/0'/0",
ethereumKey = "m/44'/60'/0'/0/0",
}

export enum SchemeTypes {
export enum KeyTypes {
secp256k1 = "EcdsaSecp256k1",
x25519 = "X25519"
}

export interface IVaultedKeyProvider {
getPublicKey: (derivationArgs: IKeyDerivationArgs, scheme?: SchemeTypes) => Buffer
getPrivateKey: (derivationArgs: IKeyDerivationArgs, scheme?: SchemeTypes) => Buffer
getPublicKey: (derivationArgs: IKeyDerivationArgs, scheme?: KeyTypes) => Buffer
getPrivateKey: (derivationArgs: IKeyDerivationArgs, scheme?: KeyTypes) => Buffer
sign: (derivationArgs: IKeyDerivationArgs, digest: Buffer) => Buffer
signDigestable: (
derivationArgs: IKeyDerivationArgs,
Expand Down

0 comments on commit e0fee56

Please sign in to comment.