Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(exp): document expirationTimestamp #631

Merged
merged 5 commits into from
Aug 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/api/interfaces/modules_claims.IssueClaimOptions.md
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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