@entros/pulse-sdk 3.3.0 → 3.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +7 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5555,19 +5555,19 @@ async function fetchIdentityState(walletPubkey, connection) {
|
|
|
5555
5555
|
const accountInfo = await connection.getAccountInfo(identityPda);
|
|
5556
5556
|
if (!accountInfo) return null;
|
|
5557
5557
|
const coder = new anchor.BorshAccountsCoder(entros_anchor_default);
|
|
5558
|
-
const decoded = coder.decode("
|
|
5558
|
+
const decoded = coder.decode("IdentityState", accountInfo.data);
|
|
5559
5559
|
return {
|
|
5560
5560
|
owner: decoded.owner.toBase58(),
|
|
5561
|
-
creationTimestamp: decoded.
|
|
5562
|
-
lastVerificationTimestamp: decoded.
|
|
5563
|
-
verificationCount: decoded.
|
|
5564
|
-
trustScore: decoded.
|
|
5565
|
-
currentCommitment: new Uint8Array(decoded.
|
|
5561
|
+
creationTimestamp: decoded.creation_timestamp.toNumber(),
|
|
5562
|
+
lastVerificationTimestamp: decoded.last_verification_timestamp.toNumber(),
|
|
5563
|
+
verificationCount: decoded.verification_count,
|
|
5564
|
+
trustScore: decoded.trust_score,
|
|
5565
|
+
currentCommitment: new Uint8Array(decoded.current_commitment),
|
|
5566
5566
|
mint: decoded.mint.toBase58(),
|
|
5567
5567
|
// Anchor's Borsh coder returns the raw BN for i64 fields; .toNumber()
|
|
5568
5568
|
// is safe here because Unix timestamps fit in Number.MAX_SAFE_INTEGER
|
|
5569
5569
|
// until year 275760.
|
|
5570
|
-
lastResetTimestamp: decoded.
|
|
5570
|
+
lastResetTimestamp: decoded.last_reset_timestamp?.toNumber?.() ?? 0
|
|
5571
5571
|
};
|
|
5572
5572
|
} catch {
|
|
5573
5573
|
return null;
|