forked from vechain/connex
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsigner.d.ts
34 lines (32 loc) · 1.03 KB
/
signer.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
declare namespace Connex {
/**
* signer defines the interfaces needs be to implemented of a wallet.
* it is the driver of vendor, exposing the interface for any possible
* wallet implementing a custom signer
*/
interface Signer {
signTx(msg: Vendor.TxMessage, options: Signer.TxOptions): Promise<Vendor.TxResponse>
signCert(msg: Vendor.CertMessage, options: Signer.CertOptions): Promise<Vendor.CertResponse>
}
namespace Signer {
type TxOptions = {
signer?: string;
gas?: number;
dependsOn?: string;
link?: string;
comment?: string;
delegator?: {
url: string;
signer?: string;
};
onAccepted?: () => void;
};
type CertOptions = {
signer?: string;
link?: string;
onAccepted?: () => void;
};
}
// NewSigner creates a singer with genesis id.
type NewSigner = (genesisId: string)=> Promise<Signer>
}