Skip to content

Releases

0.11.0

Choose a tag to compare

@github-actions github-actions released this 17 Nov 03:20

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) and heap_size (4). A v1 transaction takes its compute budget
    from this message instead of ComputeBudget instructions.

  • transaction_version (uint32, at most 1) on StatefulSwapRequest.Initiate (field 13) and
    StatelessSwapRequest.Initiate (field 5). 0 or unset is v0 with ALTs, and 1 is v1. A client
    that sends 1 must still handle v0 server parameters. Set it before signing: the Initiate
    signature covers it.

  • transaction_config on 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, alts is empty, and
    compute_unit_limit and compute_unit_price are 0.

  • On ReserveNewCurrencyServerParameter:

    • memory_accounts (field 18, at most 8): VmMemoryAccountInitialization entries with
      address, name, num_accounts, account_size, resize_sizes and rent_top_up_lamports.
      The v1 transaction initializes, funds and resizes each one, in order.
    • fee_account_owner (field 19, required): owner of the to_mint fee account, which the v1
      transaction opens with AssociatedTokenAccount::CreateIdempotent.

Changed

  • Transaction.value allows 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_authority must 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

Choose a tag to compare

@github-actions github-actions released this 11 Nov 17:11

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
    ByteCompatibilityTest checks 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-protocol now apis dev.bmcreations:protovalidate-runtime 0.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

Choose a tag to compare

@github-actions github-actions released this 22 Oct 16:31

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) and StatelessSwapRequest (field 4). Only 2 selects swap_v2.
    Unset, 0 and 1 keep the legacy swap instruction.
  • The server builds the swap instruction from this field, and the client rebuilds and signs the
    same transaction locally. A client that sends 2 has to build swap_v2 itself: discriminator
    [43, 4, 237, 11, 26, 201, 30, 98], the same amount_in and min_amount_out args, and swap'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 StatefulSwapResponse and
    StatelessSwapResponse now list the swap step as Swap or SwapV2, per swap_version.

Unchanged

Nothing was renumbered, and nothing existing changed type or meaning. No service, RPC, message or
enum case was removed.

0.8.0

Choose a tag to compare

@github-actions github-actions released this 16 Oct 21:40

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 as Metadata.send_public_multi_payment (oneof field 5).
    It holds a source, a mint, and 2 to 10 payments, each one a destination, an optional
    destination_owner, and either server_exchange_data or client_exchange_data. The intent emits
    one NoPrivacyTransferAction from 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, and destination_owner is 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

Choose a tag to compare

@github-actions github-actions released this 14 Oct 20:57

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), a uint64 holding the balance of that mint in quarks.
  • GetBalancesRequest.exclude_per_mint_balances (field 4), a bool. When true,
    OwnerBalance.balances_by_mint comes back empty. Owner totals are unaffected and still count
    every mint matching the mints filter. 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

Choose a tag to compare

@github-actions github-actions released this 25 Sep 17:04

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), a repeated string of 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), a map<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

Choose a tag to compare

@github-actions github-actions released this 16 Sep 20:32

No contract change. Still synced to
ocp-protobuf-api@82202912.

Added

  • OcpContractInfo (Kotlin) and OCPContractInfo (Swift), carrying VERSION /
    version and PROTO_COMMIT / protoCommit for the upstream commit this package was
    generated from, plus shortProtoCommit and isLocal. A package built from
    sync-protos.sh --local reports LOCAL as its commit, so a consumer can tell a local
    contract build from a pinned one at runtime.

0.4.0

Choose a tag to compare

@github-actions github-actions released this 14 Sep 19:02
15ce331

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 with GetBalanceRequest and GetBalanceResponse.

  • GetBalancesResponse.Result.NOT_FOUND. OK and DENIED keep 0 and 1, 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 on NOT_FOUND needs to branch on a missing map entry
    instead, and code that treated a non-OK result as a hard failure will now see OK where it used
    to see NOT_FOUND.

Added

  • GetBalances, a unary RPC that batches what GetBalance did one owner at a time.

    GetBalancesRequest takes repeated owners (1 to 1024) where the old request took a single
    owner, plus an optional repeated mints filter (up to 1024). Leaving mints empty returns
    every mint each owner holds, which is the closest thing to the old behaviour.

    GetBalancesResponse returns map<string, OwnerBalance> balances_by_owner, keyed by owner
    address. Each OwnerBalance carries the core_mint_value total in quarks that the old flat
    response returned directly, plus map<string, MintBalance> balances_by_mint keyed by mint
    address for the per-mint breakdown. So the scalar total still exists, one level further down.

    Like GetBalance before it, GetBalancesRequest carries 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

Choose a tag to compare

@github-actions github-actions released this 31 Aug 02:02
7c37ecc

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
    newMessageInfo looks up java.lang.reflect.Field by the generated <name>_ field — while
    builders and message methods are reached from ordinary call sites, so R8 traces those without
    help. -keepclassmembers also 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 from code-android-app cut 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

Choose a tag to compare

@github-actions github-actions released this 26 Aug 15:57
b08adb9

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 returns core_mint_value, a uint64 in quarks, alongside a result enum of OK, DENIED, and
    NOT_FOUND.

    GetBalanceRequest carries 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.