diff --git a/__tests__/hostApi/statementStore.spec.ts b/__tests__/hostApi/statementStore.spec.ts index 518c653a..ea65f44a 100644 --- a/__tests__/hostApi/statementStore.spec.ts +++ b/__tests__/hostApi/statementStore.spec.ts @@ -39,7 +39,7 @@ function createMockSignedStatement(topicSeed: number): SignedStatement { signer: new Uint8Array(32).fill(2), }), decryptionKey: undefined, - expiry: undefined, + expiry: BigInt(Math.floor(Date.now() / 1000) + 7 * 24 * 60 * 60) << 32n, channel: undefined, topics: [createTopic(topicSeed)], data: new Uint8Array([1, 2, 3]), @@ -51,7 +51,7 @@ function createMockStatement(topicSeed: number): Statement { return { proof: undefined, decryptionKey: undefined, - expiry: undefined, + expiry: BigInt(Math.floor(Date.now() / 1000) + 7 * 24 * 60 * 60) << 32n, channel: undefined, topics: [createTopic(topicSeed)], data: new Uint8Array([1, 2, 3]), diff --git a/docs/design/host-api-protocol.md b/docs/design/host-api-protocol.md index 1e710ae6..14096efa 100644 --- a/docs/design/host-api-protocol.md +++ b/docs/design/host-api-protocol.md @@ -1080,7 +1080,7 @@ enum StatementProof { struct Statement { proof: Option, decryption_key: Option, - priority: Option, + expiry: u64, channel: Option, topics: Vec, data: Option> @@ -1089,7 +1089,7 @@ struct Statement { struct SignedStatement { proof: StatementProof, decryption_key: Option, - priority: Option, + expiry: u64, channel: Option, topics: Vec, data: Option> diff --git a/packages/host-api/src/protocol/v1/statementStore.ts b/packages/host-api/src/protocol/v1/statementStore.ts index 26be921f..fcbe5f4d 100644 --- a/packages/host-api/src/protocol/v1/statementStore.ts +++ b/packages/host-api/src/protocol/v1/statementStore.ts @@ -43,7 +43,7 @@ const StatementProof = Enum({ export const Statement = Struct({ proof: Option(StatementProof), decryptionKey: Option(DecryptionKey), - expiry: Option(u64), + expiry: u64, channel: Option(Channel), topics: Vector(Topic), data: Option(Bytes()), @@ -52,7 +52,7 @@ export const Statement = Struct({ export const SignedStatement = Struct({ proof: StatementProof, decryptionKey: Option(DecryptionKey), - expiry: Option(u64), + expiry: u64, channel: Option(Channel), topics: Vector(Topic), data: Option(Bytes()),