@calimero-network/mero-js 25.3.3 → 26.0.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.
@@ -164,13 +164,6 @@ export interface ContextStorageResponseData {
164
164
  sizeInBytes: number;
165
165
  }
166
166
  export type SyncContextResponseData = null;
167
- export interface InviteSpecializedNodeRequest {
168
- contextId: string;
169
- inviterId?: string;
170
- }
171
- export interface InviteSpecializedNodeResponseData {
172
- nonce: string;
173
- }
174
167
  export interface UpdateContextApplicationRequest {
175
168
  applicationId: string;
176
169
  executorPublicKey: string;
@@ -617,23 +610,6 @@ export interface RevokedFromEntry {
617
610
  /** The device that was withdrawn, 64 hex characters. */
618
611
  deviceId: string;
619
612
  }
620
- /**
621
- * @deprecated Use {@link AdminApiClient.getNodeIdentity} instead. Nothing here
622
- * varies by namespace, so the parameter could only ever be decoration.
623
- */
624
- export interface NamespaceIdentity {
625
- /** Echoed back from the argument; it does not describe the identity. */
626
- namespaceId: string;
627
- /** The key this node signs with, 64 hex. */
628
- publicKey: string;
629
- /**
630
- * The account this node writes as, 64 hex characters. This — not
631
- * `publicKey` — is what member-addressing endpoints take, and what
632
- * `listGroupMembers` entries are keyed by, so it is how a caller locates
633
- * itself in a member list.
634
- */
635
- account: string;
636
- }
637
613
  export interface CreateNamespaceRequest {
638
614
  applicationId: string;
639
615
  name?: string;
@@ -1889,23 +1865,6 @@ export interface TeeAttestResponseData {
1889
1865
  */
1890
1866
  collateral?: DcapCollateral;
1891
1867
  }
1892
- /**
1893
- * @deprecated Nodes no longer serve `/admin-api/tee/verify-quote` (removed in
1894
- * core#3262), so a request for it fails. Verify quotes with
1895
- * `createQuoteVerifier`.
1896
- */
1897
- export interface TeeVerifyQuoteRequest {
1898
- quoteB64: string;
1899
- nonce: string;
1900
- expectedApplicationHash?: string;
1901
- }
1902
- /** @deprecated See {@link TeeVerifyQuoteRequest}. */
1903
- export interface TeeVerifyQuoteResponseData {
1904
- quoteVerified: boolean;
1905
- nonceVerified: boolean;
1906
- applicationHashVerified?: boolean;
1907
- quote: Quote;
1908
- }
1909
1868
  export interface AdminApiClientConfig {
1910
1869
  baseUrl: string;
1911
1870
  getAuthToken?: () => Promise<string | undefined>;
@@ -1936,108 +1895,3 @@ export interface AdmitJoinResponseData {
1936
1895
  */
1937
1896
  readonly published: boolean;
1938
1897
  }
1939
- /**
1940
- * Where one author device stands in its warrant-nonce sequence on one node.
1941
- *
1942
- * # Why `bigint` and not `number`
1943
- *
1944
- * A nonce is a `u64` on the node. `JSON.parse` turns every number into an IEEE
1945
- * double, so any value past 2^53 arrives already rounded - and it rounds
1946
- * silently, producing a nonce that looks ordinary and is refused forever. The
1947
- * exhaustion rule this endpoint exists to report (`u64::MAX` spent -> no next
1948
- * nonce) lives precisely in the range a `number` cannot hold, so representing it
1949
- * as one would lose the very case the type is meant to make visible.
1950
- *
1951
- * `bigint` over a decimal `string` because callers do arithmetic with these:
1952
- * the documented recovery rule is `max(ownNext, nextNonce)`, and
1953
- * {@link NonceSource} already emits `bigint`. A string would make every caller
1954
- * convert first, and the ones that forget would compare `"10" < "9"`.
1955
- *
1956
- * The digits are recovered from the raw response text rather than from a parsed
1957
- * `number`, so nothing is routed through a double on the way in.
1958
- *
1959
- * # Why a union on `kind`
1960
- *
1961
- * `nextNonce` is absent in exactly one case, and a client that reads it as
1962
- * `undefined` and falls back to a guess burns nonces for real. Splitting the two
1963
- * cases makes the compiler ask which one this is before `nextNonce` can be read
1964
- * at all.
1965
- *
1966
- * The discriminant is a string rather than an `exhausted: boolean` because this
1967
- * package compiles with `strictNullChecks` off, and TypeScript declines to
1968
- * narrow a union on a boolean-literal discriminant in that mode. A flag that
1969
- * silently fails to narrow would be worse than no flag: it would read as a
1970
- * guard and admit `nextNonce` on both arms.
1971
- */
1972
- export type WarrantNonceState = WarrantNonceOpen | WarrantNonceExhausted;
1973
- /** Fields both arms carry, whatever the sequence's state. */
1974
- interface WarrantNonceCommon {
1975
- /** The context asked about, echoed - read it to reject a cached answer. */
1976
- readonly contextId: string;
1977
- /**
1978
- * The author device asked about, echoed. This is the device's SIGNING KEY,
1979
- * not its `deviceId` and not the account: two devices of one account hold two
1980
- * independent sequences, and a re-keyed device starts a fresh one.
1981
- *
1982
- * Echoed as the node spelled it, which is the spelling that was asked for -
1983
- * the route accepts base58 or hex and does not normalise between them.
1984
- */
1985
- readonly authorDeviceKey: string;
1986
- /**
1987
- * Whether this node has admitted any warrant from this device here.
1988
- *
1989
- * `false` is the ordinary state of a device that has not written yet - a fresh
1990
- * sequence, not an error and not a row worth retrying for.
1991
- */
1992
- readonly seen: boolean;
1993
- /**
1994
- * The highest nonce this node has accepted from this device here, absent when
1995
- * `seen` is `false`.
1996
- *
1997
- * Reported for auditability. Do NOT compute a nonce from it: the `+ 1` is the
1998
- * node's arithmetic, already done in {@link WarrantNonceOpen.nextNonce}, and
1999
- * doing it again here is how a client reintroduces the overflow this endpoint
2000
- * avoids.
2001
- */
2002
- readonly highWaterNonce?: bigint;
2003
- /**
2004
- * How far below `highWaterNonce` a late warrant may still be accepted.
2005
- *
2006
- * Constant (64 today), and useful for sizing an in-flight window: a warrant
2007
- * minted but not yet executed is refused once this many later ones have landed
2008
- * ahead of it. It is NOT an input to a nonce - which parts of the window below
2009
- * the mark are already spent is deliberately not reported.
2010
- */
2011
- readonly windowWidth: bigint;
2012
- }
2013
- /** The sequence has room: {@link nextNonce} is the number to mint at. */
2014
- export interface WarrantNonceOpen extends WarrantNonceCommon {
2015
- readonly kind: 'open';
2016
- /**
2017
- * The smallest nonce this node is guaranteed to accept. **The only actionable
2018
- * value here.**
2019
- *
2020
- * `0` on a fresh sequence (`seen: false`), which is a real answer, not a
2021
- * missing one.
2022
- *
2023
- * A client that still holds its own counter must mint at
2024
- * `max(ownNext, nextNonce)`, never at `nextNonce` alone: nonce state folds per
2025
- * peer, so this node can be BEHIND a client whose warrants it has not applied
2026
- * yet, and never ahead of the truth. An author spread across relays asks each
2027
- * and takes the highest answer.
2028
- */
2029
- readonly nextNonce: bigint;
2030
- }
2031
- /**
2032
- * `u64::MAX` is spent here: there is no next nonce and this device cannot write
2033
- * to this context again. It must re-key - a new signing key starts a fresh
2034
- * sequence.
2035
- *
2036
- * The node reports this by omitting `nextNonce` rather than by wrapping to `0`,
2037
- * because a wrapped `0` would look like a valid answer and be refused forever.
2038
- */
2039
- export interface WarrantNonceExhausted extends WarrantNonceCommon {
2040
- readonly kind: 'exhausted';
2041
- readonly seen: true;
2042
- readonly highWaterNonce: bigint;
2043
- }