@calimero-network/mero-js 22.3.0 → 22.5.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/README.md +9 -0
- package/dist/index.browser.mjs +2 -2
- package/dist/index.browser.mjs.map +4 -4
- package/dist/index.cjs +570 -29
- package/dist/index.cjs.map +4 -4
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/index.mjs +570 -29
- package/dist/index.mjs.map +4 -4
- package/dist/namespace-op/namespace-op.d.ts +8 -4
- package/dist/namespace-op/namespace-op.js +8 -4
- package/dist/relay/index.d.ts +1 -1
- package/dist/relay/relay-client.d.ts +132 -0
- package/dist/relay/relay-client.js +132 -0
- package/dist/warrant/creation-warrant.d.ts +145 -0
- package/dist/warrant/creation-warrant.js +189 -0
- package/dist/warrant/governance-op.d.ts +81 -0
- package/dist/warrant/governance-op.js +125 -0
- package/dist/warrant/governance-warrant.d.ts +106 -0
- package/dist/warrant/governance-warrant.js +159 -0
- package/dist/warrant/index.d.ts +6 -0
- package/dist/warrant/index.js +3 -0
- package/dist/warrant/warrant.d.ts +5 -0
- package/dist/warrant/warrant.js +5 -2
- package/package.json +1 -1
|
@@ -121,6 +121,11 @@ export declare function intentHash(method: string, argsJson: unknown): Promise<U
|
|
|
121
121
|
* second spelling able to disagree with what was signed.
|
|
122
122
|
*/
|
|
123
123
|
export declare function signWarrant(input: WarrantInput): Promise<string>;
|
|
124
|
+
/**
|
|
125
|
+
* Decode a cited-head list, refusing one longer than a node will accept.
|
|
126
|
+
* Shared with `creation-warrant.ts`; internal, not exported from the package root.
|
|
127
|
+
*/
|
|
128
|
+
export declare function citedHeads(heads: string[] | undefined, label: string): Uint8Array[];
|
|
124
129
|
/** A warrant's fields, as hex, decoded from the wire encoding. */
|
|
125
130
|
export interface WarrantFields {
|
|
126
131
|
context: string;
|
package/dist/warrant/warrant.js
CHANGED
|
@@ -92,8 +92,11 @@ export async function signWarrant(input) {
|
|
|
92
92
|
// a u32 count then the elements. u32 HERE; u64 in the preimage above.
|
|
93
93
|
return hex(concat(context, authorAccount, publicKey, executor, appVersion, u32le(method.length), method, commitment, u32le(accountHeads.length), ...accountHeads, u32le(governanceFloor.length), ...governanceFloor, nonce, notAfter, signature));
|
|
94
94
|
}
|
|
95
|
-
/**
|
|
96
|
-
|
|
95
|
+
/**
|
|
96
|
+
* Decode a cited-head list, refusing one longer than a node will accept.
|
|
97
|
+
* Shared with `creation-warrant.ts`; internal, not exported from the package root.
|
|
98
|
+
*/
|
|
99
|
+
export function citedHeads(heads, label) {
|
|
97
100
|
const list = heads ?? [];
|
|
98
101
|
if (list.length > MAX_CITED_HEADS) {
|
|
99
102
|
throw new Error(`${label} cites ${list.length} heads, over the ${MAX_CITED_HEADS} a node accepts`);
|