Skip to content

Commit

Permalink
v2.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
kostysh committed Oct 14, 2021
2 parents 68b43c2 + c6ff7d9 commit 4998d74
Show file tree
Hide file tree
Showing 15 changed files with 7,741 additions and 8,813 deletions.
42 changes: 39 additions & 3 deletions README.md
Expand Up @@ -31,14 +31,30 @@ npm i @windingtree/org.id-resolver

```javascript
const Web3 = require('web3');
const { OrgIdResolver, httpFetchMethod } = require('@windingtree/org.id-resolver');
const {
OrgIdResolver,
httpFetchMethod,
linkedInFetchMethod,
twitterFetchMethod,
whoisService
} = require('@windingtree/org.id-resolver');

const web3 = new Web3('<WEB3_PROVIDER>'); // HTTP(s) or WS(s)
const resolver = new OrgIdResolver({
web3,
orgId: '<ORGID_ADDRESS>' // TODO: #3
orgId: '<ORGID_ADDRESS>', // TODO: #3
authorizedTrustProofsIssuers: [
'did:orgid:0x52f750...' // These DIDs will be allowed to be used as issuers and verifiers for the Trust proofs issuing in form of Verifiable Credentials
]
});
resolver.registerSocialFetchMethod(linkedInFetchMethod, {
key: '<LINKEDIN_API_KEY>'
});
resolver.registerSocialFetchMethod(twitterFetchMethod, {
key: '<TWITTER_API_KEY>'
});
resolver.registerFetchMethod(httpFetchMethod);
resolver.registerService(whoisService);

const result = await resolver.resolve('did:orgid:0x62a7502f4c44d8147b8f7b2a1dbeb8503e8446e77355bb2e4ebf999c7ecc5808');
```
Expand Down Expand Up @@ -94,6 +110,10 @@ The response of the resolver contains the following information
"passed": true,
"errors": [],
"warnings": []
},
{
"type": "TRUST_ASSERTIONS",
"passed": true
}
],

Expand All @@ -110,7 +130,23 @@ The response of the resolver contains the following information
"type": "domain",
"claim": "test2.com",
"proof": "http://test2.com/orgid.txt",
"verified": true
"verified": true,
"whois": {
"domainName": "TEST2.COM",
"registryDomainId": "1234567_DOMAIN_COM-VRSN",
"registrarWhoisServer": "whois.server.net",
"registrarUrl": "http://www.whois.net",
"updatedDate": "2021-03-22T05:01:08Z",
"creationDate": "2011-05-09T18:58:13Z",
"expiryDate": "2024-05-09T18:58:13Z",
"registrar": "Cool Domain",
"registrarIanaId": "345",
"registrarAbuseContactEmail": "abuse@support.server.net",
"registrarAbuseContactPhone": "+33.1234567",
"domainStatus": "clientTransferProhibited",
"nameServer": "NS.SERVER.COM",
"DNSSEC": "unsigned"
}
},
{
"type": "domain",
Expand Down
98 changes: 5 additions & 93 deletions assets/legalEntity.json
Expand Up @@ -6,100 +6,12 @@
"id": "did:orgid:0x94bf5a57b850a35b4d1d7b59f663ce3a8a76fd9928ef2067cc772fc97fb0ad75",
"created": "2019-01-01T13:10:02.251Z",
"updated": "2019-06-03T13:20:06.398Z",
"publicKey": [
{
"id": "did:orgid:0x94bf5a57b850a35b4d1d7b59f663ce3a8a76fd9928ef2067cc772fc97fb0ad75#webserver",
"type": "secp256k1",
"controller": "did:orgid:0x94bf5a57b850a35b4d1d7b59f663ce3a8a76fd9928ef2067cc772fc97fb0ad75",
"publicKeyPem": "MFYwEAYHKoZIzj0CAQYFK4EEAAoDQgAE/7GpAW4+se9gZOFPtwk63ZhV1nX6M0UobMYO6FMAnON6vCbglyOaRzEltugkp6GrM8LZ6is0rMBMAXCvb9FH2g==",
"note": "B2C Webserver Key"
}
],
"service": [
{
"id": "did:orgid:0x94bf5a57b850a35b4d1d7b59f663ce3a8a76fd9928ef2067cc772fc97fb0ad75#oidc",
"type": "ORGiD Authentication",
"serviceEndpoint": "https://example.com/orgid-auth/"
}
],
"payment": [
{
"type": "crypto",
"currency": [
"btc"
],
"address": "bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq",
"description": "General donation channel"
},
{
"type": "bank",
"currency": [
"usd",
"eur"
],
"iban": "DE75512108001245126199",
"swift": "UBSWUS33XXX"
},
{
"type": "simard",
"currency": [
"usd",
"eur"
],
"description": "Bookings and service payments"
}
],
"publicKey": [],
"service": [],
"payment": [],
"trust": {
"assertions": [
{
"type": "dns",
"claim": "test.com",
"proof": "TXT"
},
{
"type": "domain",
"claim": "test2.com",
"proof": "http://test2.com/orgid.txt"
},
{
"type": "domain",
"claim": "test3.com",
"proof": "http://test3.com/orgid.txt"
},
{
"type": "social",
"claim": "twitter.com/jack",
"proof": "https://twitter.com/jack/status/123456789/"
}
],
"credentials": [
{
"@context": [
"https://www.w3.org/2018/credentials/v1",
"https://www.w3.org/2018/credentials/examples/v1"
],
"id": "did:orgid:0xf4234470E33A4cE899C16e6C7E125eA039564321#credential-129438",
"type": [
"VerifiableCredential",
"FranchiseCredential"
],
"issuanceDate": "2010-01-01T19:53:24Z",
"credentialSubject": {
"id": "did:orgid:0x94bf5a57b850a35b4d1d7b59f663ce3a8a76fd9928ef2067cc772fc97fb0ad75",
"franchiseLicense": {
"brand": "Hilton Garden Inn",
"validUntil": "2020-01-01T19:53:24Z"
}
},
"proof": {
"type": "RsaSignature2018",
"created": "2017-06-18T21:19:10Z",
"proofPurpose": "assertionMethod",
"verificationMethod": "did:orgid:0xf4234470E33A4cE899C16e6C7E125eA039564321#key-454312",
"jws": "eyJhbGciOiJSUzI1NiIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..."
}
}
]
"assertions": [],
"credentials": []
},
"legalEntity": {
"legalName": "Acme, Corp.",
Expand Down

0 comments on commit 4998d74

Please sign in to comment.