@xyo-network/payload-builder
Advanced tools
Comparing version
{ | ||
"name": "@xyo-network/payload-builder", | ||
"version": "3.6.0-rc.16", | ||
"version": "3.6.0-rc.17", | ||
"description": "Primary SDK for using XYO Protocol 2.0", | ||
@@ -37,4 +37,4 @@ "homepage": "https://xyo.network", | ||
"@xylabs/promise": "^4.4.25", | ||
"@xyo-network/hash": "^3.6.0-rc.16", | ||
"@xyo-network/payload-model": "^3.6.0-rc.16" | ||
"@xyo-network/hash": "^3.6.0-rc.17", | ||
"@xyo-network/payload-model": "^3.6.0-rc.17" | ||
}, | ||
@@ -41,0 +41,0 @@ "devDependencies": { |
@@ -50,4 +50,6 @@ import { assertEx } from '@xylabs/assert' | ||
? await (async () => { | ||
const timestamp = Date.now() | ||
return await Promise.all(payloads.map(async (payload, i) => await this.addSequencedStorageMeta( | ||
payload, | ||
timestamp, | ||
i, | ||
@@ -246,5 +248,5 @@ ))) | ||
private static async addSequencedStorageMeta<T extends Payload = Payload>(payload: T, index = 0): Promise<WithStorageMeta<T>> { | ||
private static async addSequencedStorageMeta<T extends Payload = Payload>(payload: T, timestamp: number, index = 0): Promise<WithStorageMeta<T>> { | ||
const withHashMeta = await this.addHashMeta(payload) | ||
const _sequence = SequenceParser.from(Date.now(), withHashMeta._hash, index).localSequence | ||
const _sequence = SequenceParser.from(timestamp, withHashMeta._hash, index).localSequence | ||
return { | ||
@@ -251,0 +253,0 @@ ...withHashMeta, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
117092
0.52%1076
0.75%31
-3.12%