@calimero-network/mero-js 15.3.3 → 16.0.0
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.cjs
CHANGED
|
@@ -2920,8 +2920,16 @@ function encodeSignedInvitation(signed) {
|
|
|
2920
2920
|
async function signMemberJoinOp(input) {
|
|
2921
2921
|
const parents = input.parentOpHashes ?? [];
|
|
2922
2922
|
const credential = fromHex(input.credential, "credential", input.credential.length / 2);
|
|
2923
|
-
const
|
|
2924
|
-
|
|
2923
|
+
const expires = BigInt(input.invitation.invitation.expiration_timestamp ?? 0) !== 0n;
|
|
2924
|
+
const joinedAt = input.joinedAt ?? BigInt(Math.floor(Date.now() / 1e3));
|
|
2925
|
+
const rootOp = expires ? concat(
|
|
2926
|
+
new Uint8Array([ROOT_OP.MemberJoinedAt]),
|
|
2927
|
+
fromHex(input.member, "member", 32),
|
|
2928
|
+
encodeSignedInvitation(input.invitation),
|
|
2929
|
+
u64le(joinedAt),
|
|
2930
|
+
credential
|
|
2931
|
+
) : concat(
|
|
2932
|
+
new Uint8Array([ROOT_OP.MemberJoined]),
|
|
2925
2933
|
fromHex(input.member, "member", 32),
|
|
2926
2934
|
encodeSignedInvitation(input.invitation),
|
|
2927
2935
|
credential
|