-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
78 changed files
with
510 additions
and
1,952 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,8 +6,6 @@ | |
|
||
# base | ||
|
||
## Index | ||
|
||
### Classes | ||
## Classes | ||
|
||
- [BaseEthersClient](classes/BaseEthersClient.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,8 @@ | |
|
||
# Class: EncryptionUtils | ||
|
||
Defined in: [encryption.ts:290](https://github.com/humanprotocol/human-protocol/blob/06afdec15d4185a13ccdd98fd231f6651db0e480/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L290) | ||
|
||
## Introduction | ||
|
||
Utility class for encryption-related operations. | ||
|
@@ -46,6 +48,8 @@ const keyPair = await EncryptionUtils.generateKeyPair('Human', '[email protected]'); | |
|
||
> `static` **encrypt**(`message`, `publicKeys`): `Promise`\<`string`\> | ||
Defined in: [encryption.ts:444](https://github.com/humanprotocol/human-protocol/blob/06afdec15d4185a13ccdd98fd231f6651db0e480/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L444) | ||
|
||
This function encrypts a message using the specified public keys. | ||
|
||
#### Parameters | ||
|
@@ -101,20 +105,14 @@ const publicKeys = [publicKey1, publicKey2] | |
const result = await EncryptionUtils.encrypt('message', publicKeys); | ||
``` | ||
|
||
#### Defined in | ||
|
||
<<<<<<< HEAD | ||
[encryption.ts:444](https://github.com/humanprotocol/human-protocol/blob/9a36dcc76397ebaf05988194a5c5bf379999302c/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L444) | ||
======= | ||
[encryption.ts:444](https://github.com/humanprotocol/human-protocol/blob/b718aa9d178d605c5b27fec98a4e6afa6f1db599/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L444) | ||
>>>>>>> develop | ||
*** | ||
|
||
### generateKeyPair() | ||
|
||
> `static` **generateKeyPair**(`name`, `email`, `passphrase`): `Promise`\<[`IKeyPair`](../../interfaces/interfaces/IKeyPair.md)\> | ||
Defined in: [encryption.ts:382](https://github.com/humanprotocol/human-protocol/blob/06afdec15d4185a13ccdd98fd231f6651db0e480/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L382) | ||
|
||
This function generates a key pair for encryption and decryption. | ||
|
||
#### Parameters | ||
|
@@ -154,20 +152,14 @@ const passphrase = 'YOUR_PASSPHRASE'; | |
const result = await EncryptionUtils.generateKeyPair(name, email, passphrase); | ||
``` | ||
|
||
#### Defined in | ||
|
||
<<<<<<< HEAD | ||
[encryption.ts:382](https://github.com/humanprotocol/human-protocol/blob/9a36dcc76397ebaf05988194a5c5bf379999302c/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L382) | ||
======= | ||
[encryption.ts:382](https://github.com/humanprotocol/human-protocol/blob/b718aa9d178d605c5b27fec98a4e6afa6f1db599/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L382) | ||
>>>>>>> develop | ||
*** | ||
|
||
### getSignedData() | ||
|
||
> `static` **getSignedData**(`message`): `Promise`\<`string`\> | ||
Defined in: [encryption.ts:351](https://github.com/humanprotocol/human-protocol/blob/06afdec15d4185a13ccdd98fd231f6651db0e480/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L351) | ||
|
||
This function gets signed data from a signed message. | ||
|
||
#### Parameters | ||
|
@@ -192,20 +184,14 @@ import { EncryptionUtils } from '@human-protocol/sdk'; | |
const signedData = await EncryptionUtils.getSignedData('message'); | ||
``` | ||
|
||
#### Defined in | ||
|
||
<<<<<<< HEAD | ||
[encryption.ts:351](https://github.com/humanprotocol/human-protocol/blob/9a36dcc76397ebaf05988194a5c5bf379999302c/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L351) | ||
======= | ||
[encryption.ts:351](https://github.com/humanprotocol/human-protocol/blob/b718aa9d178d605c5b27fec98a4e6afa6f1db599/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L351) | ||
>>>>>>> develop | ||
*** | ||
|
||
### isEncrypted() | ||
|
||
> `static` **isEncrypted**(`message`): `boolean` | ||
Defined in: [encryption.ts:494](https://github.com/humanprotocol/human-protocol/blob/06afdec15d4185a13ccdd98fd231f6651db0e480/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L494) | ||
|
||
Verifies if a message appears to be encrypted with OpenPGP. | ||
|
||
#### Parameters | ||
|
@@ -246,20 +232,14 @@ if (isEncrypted) { | |
} | ||
``` | ||
|
||
#### Defined in | ||
|
||
<<<<<<< HEAD | ||
[encryption.ts:494](https://github.com/humanprotocol/human-protocol/blob/9a36dcc76397ebaf05988194a5c5bf379999302c/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L494) | ||
======= | ||
[encryption.ts:494](https://github.com/humanprotocol/human-protocol/blob/b718aa9d178d605c5b27fec98a4e6afa6f1db599/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L494) | ||
>>>>>>> develop | ||
*** | ||
|
||
### verify() | ||
|
||
> `static` **verify**(`message`, `publicKey`): `Promise`\<`boolean`\> | ||
Defined in: [encryption.ts:318](https://github.com/humanprotocol/human-protocol/blob/06afdec15d4185a13ccdd98fd231f6651db0e480/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L318) | ||
|
||
This function verifies the signature of a signed message using the public key. | ||
|
||
#### Parameters | ||
|
@@ -301,11 +281,3 @@ UYLqAQDfdym4kiUvKO1+REKASt0Gwykndl7hra9txqlUL5DXBQ===Vwgv | |
|
||
const result = await EncryptionUtils.verify('message', publicKey); | ||
``` | ||
|
||
#### Defined in | ||
|
||
<<<<<<< HEAD | ||
[encryption.ts:318](https://github.com/humanprotocol/human-protocol/blob/9a36dcc76397ebaf05988194a5c5bf379999302c/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L318) | ||
======= | ||
[encryption.ts:318](https://github.com/humanprotocol/human-protocol/blob/b718aa9d178d605c5b27fec98a4e6afa6f1db599/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L318) | ||
>>>>>>> develop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.