Skip to content

chore(contract): sync ocp protos to ea6418c5 and add a changelog - #4

Merged
bmc08gt merged 2 commits into
mainfrom
chore/sync-ocp-ea6418c5
Aug 26, 2026
Merged

chore(contract): sync ocp protos to ea6418c5 and add a changelog#4
bmc08gt merged 2 commits into
mainfrom
chore/sync-ocp-ea6418c5

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

Picks up ocp-protobuf-api@ea6418c5 — "Add the Balance RPC service (#63)".

The change

One new file, proto/balance/v1/ocp_balance_service.proto. Nothing pre-existing moved, so no message, field, or result enum was renumbered.

service Balance {
    rpc GetBalance(GetBalanceRequest) returns (GetBalanceResponse);
}

message GetBalanceRequest {
    common.v1.SolanaAccountId owner = 1 [(validate.rules).message.required = true];
}

message GetBalanceResponse {
    Result result = 1;
    enum Result { OK = 0; DENIED = 1; NOT_FOUND = 2; }
    uint64 core_mint_value = 2;
}

GetBalanceRequest carries no auth or signature field, unlike every other OCP endpoint. Both app scaffolds implement it that way rather than pattern-matching the neighbours, but if reading any owner's balance unauthenticated was not the intent, this is the moment to catch it.

The generated Swift is committed alongside the proto, produced by the generators pinned in scripts/toolchain.env. No generator version moved, so the Sources/ diff is only the two new Balance files.

Release

Needs publishing at 0.2.0: additive API surface over 0.1.0, which is the only release so far.

Release notes

publish.yml created the release with --generate-notes, which lists merged PR titles. That is why 0.1.0 released with a body containing nothing but a "Full Changelog" link: a consumer reading it cannot tell what is in the API.

Notes now come from the CHANGELOG.md section matching the version being published, written here in the sync PR while the contract diff is still at hand. A version with no section fails the publish, and it fails in an early step, before anything is uploaded, because Maven Central will not accept a version number twice.

flipcash2-client-protocol had the same gap and the same workflow. code-payments/flipcash2-client-protocol#4 mirrors this half, so the two publish workflows stay identical apart from names and coordinates.

Both consumer PRs already pin 0.2.0 and are drafts until it exists:

Adds the Balance service: ocp.balance.v1.Balance, one unary RPC GetBalance.
Nothing existing changed — the other nine generated Swift files are untouched,
so no enum case was renumbered and the toolchain did not move.
publish.yml created the GitHub release with --generate-notes, which lists merged PR
titles. For a contract package that says nothing useful: 0.1.0 released with a body
that was only a "Full Changelog" link, so a consumer reading it could not tell what
was in the API.

Release notes now come from a CHANGELOG.md section matching the published version,
written in the PR that syncs the contract while the diff is still at hand. A version
with no section fails the publish, and it fails before the upload, since Maven Central
will not take a version number twice.
@bmc08gt bmc08gt changed the title chore(contract): sync ocp protos to ea6418c5 chore(contract): sync ocp protos to ea6418c5 and add a changelog Aug 26, 2026
@bmc08gt
bmc08gt merged commit b08adb9 into main Aug 26, 2026
0 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant