Skip to content
This repository has been archived by the owner on Jul 23, 2024. It is now read-only.

Commit

Permalink
Merge pull request #561 from jimni1222/typeModules
Browse files Browse the repository at this point in the history
Added wallet layer type testing
  • Loading branch information
jimni1222 authored Nov 10, 2021
2 parents acffb5c + 17c790a commit 3bc630a
Show file tree
Hide file tree
Showing 4 changed files with 542 additions and 18 deletions.
20 changes: 10 additions & 10 deletions types/packages/caver-core/src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -276,14 +276,14 @@ export interface EncryptedKey {
mac: string
}
export interface EncryptionOptions {
salt: any
iv: any
kdf: any
dklen: any
c: any
n: any
r: any
p: any
cipher: any
uuid: any
salt?: any
iv?: any
kdf?: any
dklen?: any
c?: any
n?: any
r?: any
p?: any
cipher?: any
uuid?: any
}
16 changes: 13 additions & 3 deletions types/packages/caver-wallet/src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,17 +55,27 @@ export class KeyringContainer implements IWallet {
isExisted(address: string): boolean
add(keyring: Keyring): Keyring
remove(address: string): boolean
signMessage(address: string, data: string, role?: number, index?: number): SignedMessage
signMessage(address: string, data: string, role: number, index?: number): SignedMessage
sign(
address: string,
transaction: AbstractTransaction,
index?: number,
hasher?: (transaction: AbstractTransaction) => string
): Promise<AbstractTransaction>
sign(
address: string,
transaction: AbstractTransaction,
index: number,
hasher?: (transaction: AbstractTransaction) => string
): Promise<AbstractTransaction>
signAsFeePayer(
address: string,
transaction: AbstractFeeDelegatedTransaction,
hasher?: (transaction: AbstractFeeDelegatedTransaction) => string
): Promise<AbstractFeeDelegatedTransaction>
signAsFeePayer(
address: string,
transaction: AbstractFeeDelegatedTransaction,
index?: number,
index: number,
hasher?: (transaction: AbstractFeeDelegatedTransaction) => string
): Promise<AbstractFeeDelegatedTransaction>
}
10 changes: 5 additions & 5 deletions types/packages/caver-wallet/src/keyring/keyringFactory.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ import { Keystore } from '../../../caver-core/src'
export type Keyring = SingleKeyring | MultipleKeyring | RoleBasedKeyring

export interface KeyringFactory {
privateKey: PrivateKey
singleKeyring: SingleKeyring
multipleKeyring: MultipleKeyring
roleBasedKeyring: RoleBasedKeyring
privateKey: typeof PrivateKey
singleKeyring: typeof SingleKeyring
multipleKeyring: typeof MultipleKeyring
roleBasedKeyring: typeof RoleBasedKeyring
role: typeof KEY_ROLE
signatureData: SignatureData
signatureData: typeof SignatureData

generate(entropy?: string): SingleKeyring
generateSingleKey(entropy?: string): string
Expand Down
Loading

0 comments on commit 3bc630a

Please sign in to comment.