Skip to content

Commit

Permalink
Merge pull request #651 from energywebfoundation/develop
Browse files Browse the repository at this point in the history
Publish Latest
  • Loading branch information
JGiter authored Sep 6, 2022
2 parents da433e5 + 25b579f commit 00a8061
Show file tree
Hide file tree
Showing 9 changed files with 1,795 additions and 558 deletions.
7 changes: 7 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## [6.2.0-alpha.1](https://github.com/energywebfoundation/iam-client-lib/compare/v6.1.0...v6.2.0-alpha.1) (2022-09-06)


### Features

* set roleeip191jwt expiration in seconds ([270778c](https://github.com/energywebfoundation/iam-client-lib/commit/270778cf3b462c6304c9fa401a0b3b344f2077e0))

## [6.1.0](https://github.com/energywebfoundation/iam-client-lib/compare/v6.0.1...v6.1.0) (2022-09-05)


Expand Down
25 changes: 25 additions & 0 deletions docs/api/classes/modules_did_registry.DidRegistry.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ didRegistry.getDidDocument();
- [getDidPublicKeys](modules_did_registry.DidRegistry.md#getdidpublickeys)
- [getServices](modules_did_registry.DidRegistry.md#getservices)
- [init](modules_did_registry.DidRegistry.md#init)
- [isClaim](modules_did_registry.DidRegistry.md#isclaim)
- [issuePublicClaim](modules_did_registry.DidRegistry.md#issuepublicclaim)
- [revokeDidDocument](modules_did_registry.DidRegistry.md#revokediddocument)
- [updateDocument](modules_did_registry.DidRegistry.md#updatedocument)
Expand Down Expand Up @@ -290,6 +291,30 @@ ___

___

### isClaim

**isClaim**(`claim`): claim is Object

Validate that claim contains issuer and claimData.

```typescript
didRegistry.isClaim(token: Record<string, string | number | object>);
```

#### Parameters

| Name | Type |
| :------ | :------ |
| `claim` | `any` |

#### Returns

claim is Object

boolean

___

### issuePublicClaim

**issuePublicClaim**(`options`): `Promise`<`string`\>
Expand Down
4 changes: 2 additions & 2 deletions e2e/claims.service.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ describe('Сlaim tests', () => {
requestorFields,
});

expirationTimestamp && expect(exp).toEqual(expirationTimestamp);
expirationTimestamp && expect(exp).toEqual(Math.floor(expirationTimestamp / 1000));

expect(claimData).not.toContain({
fields: [{ key: 'temperature', value: 36 }],
Expand Down Expand Up @@ -1030,7 +1030,7 @@ describe('Сlaim tests', () => {
await claimsService.hasOnChainRole(rootOwnerDID, claimType, version)
).toBe(true);
expect(expiry).toBe(Math.floor(expirationTimestamp / 1000));
expect(expiry).toBe(Math.floor(exp / 1000));
expect(expiry).toBe(exp);
});
});

Expand Down
Loading

0 comments on commit 00a8061

Please sign in to comment.