Repository navigation
Releases
0.11.0
Synced to ocp-protobuf-api@1600673e,
picking up #72 and #73 (docs only).
common.v1 and transaction.v1 moved.
Swaps can now be built as v1 Solana transactions. The client opts in per swap through
transaction_version. The server returns v1 parameters only to a client that asked for them, so an
upgrade that leaves transaction_version unset changes nothing on the wire, and the signed
Initiate bytes stay the same.
Added
-
common.v1.SolanaTransactionConfig:compute_unit_limit(1),loaded_accounts_data_size_limit
(2),priority_fee_lamports(3) andheap_size(4). A v1 transaction takes its compute budget
from this message instead of ComputeBudget instructions. -
transaction_version(uint32, at most 1) onStatefulSwapRequest.Initiate(field 13) and
StatelessSwapRequest.Initiate(field 5).0or unset is v0 with ALTs, and1is v1. A client
that sends1must still handle v0 server parameters. Set it before signing: theInitiate
signature covers it. -
transaction_configon the swap server parameters:StatefulSwapResponse.ServerParameters.ReserveExistingCurrencyServerParameters(field 11)StatefulSwapResponse.ServerParameters.ReserveNewCurrencyServerParameter(field 17)StatefulSwapResponse.ServerParameters.CoinbaseStableSwapperServerParameter(field 10)StatelessSwapResponse.ServerParameters.CoinbaseStableSwapperServerParameter(field 8)
When it is set, the transaction is built as v1 without ALTs,
altsis empty, and
compute_unit_limitandcompute_unit_priceare 0. -
On
ReserveNewCurrencyServerParameter:memory_accounts(field 18, at most 8):VmMemoryAccountInitializationentries with
address,name,num_accounts,account_size,resize_sizesandrent_top_up_lamports.
The v1 transaction initializes, funds and resizes each one, in order.fee_account_owner(field 19, required): owner of theto_mintfee account, which the v1
transaction opens withAssociatedTokenAccount::CreateIdempotent.
Changed
Transaction.valueallows up to 4096 bytes, up from 1232. Legacy and v0 transactions are still
limited to 1232.- Comments only:
- The swap instruction lists now cover v1.
- On a v1 new-currency buy paid with Core Mint,
swap_authoritymust be a random one-time account
other than the owner.
Unchanged
Nothing was renumbered, and nothing existing changed type or meaning. No service, RPC, message or
enum case was removed.
0.10.0
No contract change: the messages and services are the same as 0.9.0. This release adds a second
artifact and moves the existing one's toolchain.
Added
com.flipcash:ocp-client-protocol-wire, the same messages as Wire 7.1.2 classes for
Kotlin Multiplatform (jvm, android, js for Node, iosArm64, iosSimulatorArm64), in
com.codeinc.opencode.wire.*. It has messages and protovalidate validators only, no gRPC stubs. Its
ByteCompatibilityTestchecks that Wire and protobuf-java encode a message with every field set
to the same bytes, and decode each other's output.
Changed
com.flipcash:ocp-client-protocolnowapisdev.bmcreations:protovalidate-runtime0.2.0
(was 0.1.1) and is built with Kotlin 2.3.21 (was 2.2.20). A consumer that pins an older
protovalidate-runtime resolves to 0.2.0 on upgrade.
Unchanged
Nothing was renumbered. No service, RPC, field or enum case was added, removed or changed type.
0.9.0
Synced to ocp-protobuf-api@98cf14de,
picking up #71. Only transaction.v1 moved.
Stablecoin swaps can now use CoinbaseStableSwapper's swap_v2 instruction, which is swap without
the deprecated whitelist account. The field is additive, so upgrading changes nothing until a client
sets it.
Added
swap_version(uint32, at most 2) on the CoinbaseStableSwapper initiate parameters of
StatefulSwapRequest(field 9) andStatelessSwapRequest(field 4). Only2selectsswap_v2.
Unset,0and1keep the legacyswapinstruction.- The server builds the swap instruction from this field, and the client rebuilds and signs the
same transaction locally. A client that sends2has to buildswap_v2itself: discriminator
[43, 4, 237, 11, 26, 201, 30, 98], the sameamount_inandmin_amount_outargs, andswap's
accounts with the whitelist (index 12) removed. If the field and the local instruction disagree,
the swap fails.
Changed
- Comments only: the CoinbaseStableSwapper server parameters on
StatefulSwapResponseand
StatelessSwapResponsenow list the swap step asSwaporSwapV2, perswap_version.
Unchanged
Nothing was renumbered, and nothing existing changed type or meaning. No service, RPC, message or
enum case was removed.
0.8.0
Synced to ocp-protobuf-api@6f70c0d8,
picking up #70. Only transaction.v1 moved.
A new intent type pays several OCP primary accounts from one intent. It is additive, so the upgrade
is free. A client that switches over Metadata.type exhaustively gets one more case to handle.
Added
SendPublicMultiPaymentMetadata, carried asMetadata.send_public_multi_payment(oneof field 5).
It holds asource, amint, and 2 to 10payments, each one adestination, an optional
destination_owner, and eitherserver_exchange_dataorclient_exchange_data. The intent emits
oneNoPrivacyTransferActionfrom the source primary account per payment.- Every destination has to be an OCP-managed primary account for the intent's mint. Destinations
and their owners must be unique and must differ from the source. Every payment has to share the
same currency, the same verified core-mint rate and, for launchpad currencies, the same verified
reserve state. When a destination's owner is an existing OCP user with no primary account on the
mint yet, the server opens it, anddestination_owneris required for that payment. The server
may cap the payment count below 10.
Unchanged
Nothing was renumbered, and nothing existing changed type or meaning. No service, RPC, message or
enum case was removed.
0.7.0
Synced to ocp-protobuf-api@00ea80d0,
picking up #69. Only balance.v1 moved.
GetBalances now reports each mint's balance in quarks, and can skip the per-mint breakdown when a
caller only needs owner totals. Both are additive, so the upgrade is free.
Added
MintBalance.quarks(field 4), auint64holding the balance of that mint in quarks.GetBalancesRequest.exclude_per_mint_balances(field 4), abool. When true,
OwnerBalance.balances_by_mintcomes back empty. Owner totals are unaffected and still count
every mint matching themintsfilter. The default, false, keeps today's response.
Unchanged
Nothing was renumbered, and nothing existing changed type or meaning. No service, RPC, message or
enum case was removed. Everything else in the diff is comments.
0.6.0
Synced to ocp-protobuf-api@e3d25a85,
picking up #67 (docs only) and
#68. Only balance.v1 moved.
GetBalances can now report fiat values alongside core-mint values. The change is opt-in per
request, so the upgrade is free: a caller that sends no currency codes gets exactly what it got
before.
Added
GetBalancesRequest.currency_codes(field 3), arepeated stringof lowercase ISO 4217 codes
such as"usd". At most 256, no duplicates, each matching^[a-z]{3,4}$. Empty means core-mint
values only.OwnerBalance.fiat_values_by_currency(field 4), amap<string, double>holding the owner's
total across all balances, keyed by currency code.MintBalance.fiat_values_by_currency(field 3), the same map for a single mint's balance.
Both maps are populated only for the codes the request asked for. A code the caller did not request
is absent, not zero.
Unchanged
Nothing was renumbered, and nothing existing changed type or meaning. The new fields take the next
free number in each message. No service, RPC, message or enum case was removed. Everything else in
the diff is comments.
0.5.0
No contract change. Still synced to
ocp-protobuf-api@82202912.
Added
OcpContractInfo(Kotlin) andOCPContractInfo(Swift), carryingVERSION/
versionandPROTO_COMMIT/protoCommitfor the upstream commit this package was
generated from, plusshortProtoCommitandisLocal. A package built from
sync-protos.sh --localreportsLOCALas its commit, so a consumer can tell a local
contract build from a pinned one at runtime.
0.4.0
Synced to ocp-protobuf-api@82202912.
Breaking. ocp.balance.v1.Balance had exactly one RPC and it has been replaced, so every
consumer of the service has work to do. There is no deprecation window: GetBalance is gone in the
same release that adds GetBalances.
Removed
-
GetBalance, along withGetBalanceRequestandGetBalanceResponse. -
GetBalancesResponse.Result.NOT_FOUND.OKandDENIEDkeep0and1, so no surviving case
renumbers and no positional mapping shifts underneath you. What changes is that "this owner has no
balance" no longer has a result code: an owner with nothing to report is simply absent from
balances_by_owner. Code that branched onNOT_FOUNDneeds to branch on a missing map entry
instead, and code that treated a non-OKresult as a hard failure will now seeOKwhere it used
to seeNOT_FOUND.
Added
-
GetBalances, a unary RPC that batches whatGetBalancedid one owner at a time.GetBalancesRequesttakesrepeated owners(1 to 1024) where the old request took a single
owner, plus an optionalrepeated mintsfilter (up to 1024). Leavingmintsempty returns
every mint each owner holds, which is the closest thing to the old behaviour.GetBalancesResponsereturnsmap<string, OwnerBalance> balances_by_owner, keyed by owner
address. EachOwnerBalancecarries thecore_mint_valuetotal in quarks that the old flat
response returned directly, plusmap<string, MintBalance> balances_by_mintkeyed by mint
address for the per-mint breakdown. So the scalar total still exists, one level further down.Like
GetBalancebefore it,GetBalancesRequestcarries no auth or signature field. It reads
balances for arbitrary owner accounts rather than the caller's own, so there is nothing to sign.
Migrating
A single-owner call maps across mechanically: wrap the owner in owners, leave mints empty, and
read balances_by_owner[owner]?.core_mint_value where you read core_mint_value before. Treat a
missing entry as the old NOT_FOUND. The per-mint breakdown and the multi-owner batch are new
capability, not something the old shape expressed, so nothing forces you to use either.
0.3.0
No contract change. ocp.lock points at the same upstream commit as 0.2.0, and the generated
Kotlin and Swift are unchanged. Swift consumers have nothing to gain from this release.
Added
-
The Kotlin artifact now ships R8 keep rules, at
META-INF/proguard/ocp-client-protocol.pro:-keepclassmembers class * extends com.google.protobuf.GeneratedMessageLite { <fields>; }protobuf-javalite ships no keep rules of its own, so until now every Android consumer had to
write one, and the obvious-keep class * extends GeneratedMessageLite { *; }is far wider
than javalite needs. javalite resolves fields reflectively — the schema built from
newMessageInfolooks upjava.lang.reflect.Fieldby the generated<name>_field — while
builders and message methods are reached from ordinary call sites, so R8 traces those without
help.-keepclassmembersalso does not keep the class, so a message type nothing references is
still removed entirely.On upgrading, an Android consumer can delete its own protobuf keep rules. Dropping the wide
pair fromcode-android-appcut 25,542 live methods and 568 live classes, and moved its R8
optimization score from 89.3% to 96.3%.The rule is deliberately not scoped to
com.codeinc.opencode.gen.**. The well-known types (Any,Timestamp,
Duration,Struct) come from protobuf-javalite itself, and other dependencies ship generated
messages with no rules of their own, so a package-scoped rule would leave those broken under R8
full mode. Both contract packages ship identical rule text; R8 collapses them into one entry.
0.2.0
Synced to ocp-protobuf-api@ea6418c5.
Added
-
ocp.balance.v1.Balance, a new service with one unary RPC,GetBalance. It takes an owner account
and returnscore_mint_value, auint64in quarks, alongside a result enum ofOK,DENIED, and
NOT_FOUND.GetBalanceRequestcarries no auth or signature field, unlike every other OCP request. It reads
balance for any owner account rather than the caller's own, so there is nothing to sign.
Nothing existing changed. No field number or enum value moved, so upgrading from 0.1.0 needs no
consumer changes.