Skip to content

Commit

Permalink
[type definition] use keypair for user.auth (#1085)
Browse files Browse the repository at this point in the history
  • Loading branch information
egihasdi authored Jul 1, 2021
1 parent b1b0432 commit fdedf8e
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions types/chain.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,27 @@ export interface IGunChainReference<DataType = Record<string, any>, ReferenceKey
} | {
err: string;
}) => void, opt?: {}): IGunChainReference;
/**
* Authenticates a user, previously created via User.create.
* @param pair Public/Private Key Pair
* @param cb Callback that is to be called upon authentication of the user.
* @param opt Option Object containing options for authentiaction. (In gun options are added at end of syntax. opt is rarely used, hence is added at the end.)
*/
auth(pair: CryptoKeyPair, cb?: (ack: {
ack: 2;
get: string;
on: (...args: [unknown, unknown, unknown]) => unknown;
put: {
alias: string;
auth: any;
epub: string;
pub: string;
};
sea: IGunCryptoKeyPair;
soul: string;
} | {
err: string;
}) => void, opt?: {}): IGunChainReference;
/**
* Returns the key pair in the form of an object as below.
*/
Expand Down

0 comments on commit fdedf8e

Please sign in to comment.