Skip to content

Commit

Permalink
Merge pull request #11 from hypersign-protocol/Pratap2018-patch-1
Browse files Browse the repository at this point in the history
Update Readme.md
  • Loading branch information
Pratap2018 authored Aug 4, 2023
2 parents 41ae9f5 + 4aa1eed commit a880527
Showing 1 changed file with 67 additions and 0 deletions.
67 changes: 67 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,73 @@ npm i https://github.com/hypersign-protocol/EthereumEip712Signature2021Suite.git

## Usage

```js
const vector1 = {
"privateKey": "0x149195a4059ac8cafe2d56fc612f613b6b18b9265a73143c9f6d7cfbbed76b7e",
"inputDocument": {
"@context": ["https://schema.org", "https://w3id.org/security/v2"],
"@type": "Person",
"firstName": "Jane",
"lastName": "Does",
"jobTitle": "Professor",
"telephone": "(425) 123-4567",
"email": "[email protected]"
},
"inputOptions": {
"date": "2021-08-30T13:28:02Z",
"verificationMethod": "did:hid:testnet:0xAED7EA8035eEc47E657B34eF5D020c7005487443#key-1",
"domain": {
"name": "Test"
}
},
"proof": {
"created": "2021-08-30T13:28:02Z",
"proofPurpose": "assertionMethod",
"type": "EthereumEip712Signature2021",
"verificationMethod": "did:hid:testnet:0xAED7EA8035eEc47E657B34eF5D020c7005487443#key-1",
"proofValue": "0xd8ced27b921866a9cb6fb859503714ad4be03ae70706237d05c9f113da7f4a1d7f74f9f9df4301571f5c4f253c09e1b5119a85f00760f33924d72a07d31881ec1b",
"eip712": {
"domain": {
"name": "Test"
},
"types": {
"Document": [
{
"name": "@context",
"type": "string[]"
},
{
"name": "@type",
"type": "string"
},
{
"name": "email",
"type": "string"
},
{
"name": "firstName",
"type": "string"
},
{
"name": "jobTitle",
"type": "string"
},
{
"name": "lastName",
"type": "string"
},
{
"name": "telephone",
"type": "string"
}
]
},
"primaryType": "Document"
}
}
}
```

```js
import {EthereumEip712Signature2021Suite} from 'EthereumEip712Signature2021Suite';
import { purposes } from 'jsonld-signatures'
Expand Down

0 comments on commit a880527

Please sign in to comment.