Skip to content

Commit

Permalink
fix(exp): document expirationTimestamp (#631)
Browse files Browse the repository at this point in the history
* fix(infura): replace config with ipfs daemon for initUser methods

* fix(exp): document expirationTimestamp

* fix(exp): remove change to role credential validation

* fix: build errors
  • Loading branch information
whitneypurdum committed Aug 15, 2022
1 parent af11164 commit 9595c34
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion docs/api/interfaces/modules_claims.IssueClaimOptions.md
Expand Up @@ -40,7 +40,7 @@ ___

`Optional` **expirationTimestamp**: `number`

Defines how long the claim is valid (milliseconds)
A Unix timestamp expressed in milliseconds of when the claim expires.

___

Expand Down
Expand Up @@ -28,7 +28,7 @@ ___

`Optional` **expirationTimestamp**: `number`

Defines how long the claim is valid.
A Unix timestamp expressed in milliseconds of when the claim expires.

___

Expand Down
Expand Up @@ -25,7 +25,7 @@ ___

`Optional` **expirationTimestamp**: `number`

Defines how long the claim is valid.
A Unix timestamp expressed in milliseconds of when the claim expires.

___

Expand Down
Expand Up @@ -45,7 +45,7 @@ ___

`Optional` **expirationTimestamp**: `number`

Defines how long the claim is valid (seconds).
A Unix timestamp expressed in seconds of when the claim expires.

___

Expand Down
Expand Up @@ -16,7 +16,7 @@

`Optional` **expirationTimestamp**: `number`

Defines how long the claim is valid.
A Unix timestamp expressed in milliseconds of when the claim expires.

___

Expand Down
2 changes: 1 addition & 1 deletion e2e/claims.service.e2e.ts
Expand Up @@ -838,7 +838,7 @@ describe('Сlaim tests', () => {
const waitForRegister = new Promise((resolve) =>
claimManager.once(
'RoleRegistered',
(subject, role, version, expiry: BigNumber, issuer) =>
(subject, role, version, expiry: BigNumber) =>
resolve(expiry.toNumber())
)
);
Expand Down
9 changes: 5 additions & 4 deletions src/modules/claims/claims.types.ts
Expand Up @@ -30,6 +30,7 @@ export interface IClaimIssuance extends IMessage {
claimTypeVersion?: string;
acceptedBy: string;
vp?: string;
// a Unix timestamp expressed in milliseconds of when the claim expires
expirationTimestamp?: number;
}

Expand Down Expand Up @@ -198,7 +199,7 @@ export interface IssueClaimRequestOptions {
*/
credentialStatusOverride?: StatusList2021Entry;

/** Defines how long the claim is valid. */
/** A Unix timestamp expressed in milliseconds of when the claim expires. */
expirationTimestamp?: number;
}

Expand All @@ -224,7 +225,7 @@ export interface RegisterOnchainOptions {
/** DID of the claim subject */
subject?: string;

/** Defines how long the claim is valid (seconds). */
/** A Unix timestamp expressed in seconds of when the claim expires. */
expirationTimestamp?: number;
}

Expand Down Expand Up @@ -269,7 +270,7 @@ export interface IssueClaimOptions {
*/
credentialStatusOverride?: StatusList2021Entry;

/** Defines how long the claim is valid (milliseconds) */
/** A Unix timestamp expressed in milliseconds of when the claim expires. */
expirationTimestamp?: number;
}

Expand Down Expand Up @@ -337,7 +338,7 @@ export interface IssueVerifiablePresentationOptions {
*/
credentialStatus?: StatusList2021Entry;

/** Defines how long the claim is valid. */
/** A Unix timestamp expressed in milliseconds of when the claim expires. */
expirationTimestamp?: number;
}

Expand Down
3 changes: 2 additions & 1 deletion src/modules/did-registry/did.types.ts
Expand Up @@ -16,6 +16,7 @@ export interface IpfsConfig {
host: string;
port?: number;
protocol?: string;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
headers?: Record<string, any>;
}

Expand Down Expand Up @@ -75,7 +76,7 @@ export interface IssuePublicClaimOptions {
/* Public claim data object */
publicClaim?: IPublicClaim;

/** Defines how long the claim is valid. */
/** A Unix timestamp expressed in milliseconds of when the claim expires. */
expirationTimestamp?: number;
}

Expand Down

0 comments on commit 9595c34

Please sign in to comment.