agledger-api 2a38f4e1 (unreleased, on main; ships in the next tag) changes three federation wire shapes the SDK types and calls.
1. Peering tokens are bound at mint (agledger-api#1994).
POST /federation/v1/admin/peering-tokens now requires { "peerHubId": "<the calling Server's instanceId>", "boundOrgId": "<local org uuid>", "label"?: string }. The 201 adds peerHubId and boundOrgId. An unknown org answers 404; a hub id already registered answers 409.
POST /federation/v1/peer no longer takes boundOrgId (the body is additionalProperties: false, so sending it is a 400). The body is { peerHubId, peerUrl, signingPublicKey, peeringToken }, and peerHubId must be the id the token was minted for (else 422, token unconsumed).
- An unknown, consumed or expired token now answers 401 (was 422), before any other check.
2. Settlement Signal reason (agledger-api#1985). Free text no longer crosses the federation wire. POST /federation/v1/signals still accepts reason (so 1.8.0 peers validate) and ignores it. A record's settlementSignal.reason is always null when source is inbound.
3. Co-sign (agledger-api#1986). A signal without counterSignature for a record whose type the receiver registered with coSignRequired: true is refused with 422, retryable: false, reason: co_sign_required.
What to change:
- The peering-token create method takes and sends
peerHubId and boundOrgId (required).
- The handshake params type drops
boundOrgId.
- The docs for the handshake's token errors say 401, not 422.
- The signal relay params'
reason doc says the receiver ignores it (or drop the field). The SettlementSignalSummary.reason doc notes it is null for inbound signals.
No state is left in this repo's tree for you.
agledger-api 2a38f4e1 (unreleased, on main; ships in the next tag) changes three federation wire shapes the SDK types and calls.
1. Peering tokens are bound at mint (agledger-api#1994).
POST /federation/v1/admin/peering-tokensnow requires{ "peerHubId": "<the calling Server's instanceId>", "boundOrgId": "<local org uuid>", "label"?: string }. The 201 addspeerHubIdandboundOrgId. An unknown org answers 404; a hub id already registered answers 409.POST /federation/v1/peerno longer takesboundOrgId(the body isadditionalProperties: false, so sending it is a 400). The body is{ peerHubId, peerUrl, signingPublicKey, peeringToken }, andpeerHubIdmust be the id the token was minted for (else 422, token unconsumed).2. Settlement Signal
reason(agledger-api#1985). Free text no longer crosses the federation wire.POST /federation/v1/signalsstill acceptsreason(so 1.8.0 peers validate) and ignores it. A record'ssettlementSignal.reasonis always null whensourceisinbound.3. Co-sign (agledger-api#1986). A signal without
counterSignaturefor a record whose type the receiver registered withcoSignRequired: trueis refused with 422,retryable: false,reason: co_sign_required.What to change:
peerHubIdandboundOrgId(required).boundOrgId.reasondoc says the receiver ignores it (or drop the field). TheSettlementSignalSummary.reasondoc notes it is null for inbound signals.No state is left in this repo's tree for you.