@calimero-network/mero-js 15.3.3 → 15.3.4
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.browser.mjs +2 -2
- package/dist/index.browser.mjs.map +3 -3
- package/dist/index.cjs +10 -2
- package/dist/index.cjs.map +2 -2
- package/dist/index.mjs +10 -2
- package/dist/index.mjs.map +2 -2
- package/dist/namespace-op/namespace-op.d.ts +10 -3
- package/dist/namespace-op/namespace-op.js +10 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -2843,8 +2843,16 @@ function encodeSignedInvitation(signed) {
|
|
|
2843
2843
|
async function signMemberJoinOp(input) {
|
|
2844
2844
|
const parents = input.parentOpHashes ?? [];
|
|
2845
2845
|
const credential = fromHex(input.credential, "credential", input.credential.length / 2);
|
|
2846
|
-
const
|
|
2847
|
-
|
|
2846
|
+
const expires = BigInt(input.invitation.invitation.expiration_timestamp ?? 0) !== 0n;
|
|
2847
|
+
const joinedAt = input.joinedAt ?? BigInt(Math.floor(Date.now() / 1e3));
|
|
2848
|
+
const rootOp = expires ? concat(
|
|
2849
|
+
new Uint8Array([ROOT_OP.MemberJoinedAt]),
|
|
2850
|
+
fromHex(input.member, "member", 32),
|
|
2851
|
+
encodeSignedInvitation(input.invitation),
|
|
2852
|
+
u64le(joinedAt),
|
|
2853
|
+
credential
|
|
2854
|
+
) : concat(
|
|
2855
|
+
new Uint8Array([ROOT_OP.MemberJoined]),
|
|
2848
2856
|
fromHex(input.member, "member", 32),
|
|
2849
2857
|
encodeSignedInvitation(input.invitation),
|
|
2850
2858
|
credential
|