Skip to content

1.2.0

Choose a tag to compare

@t-0-ci t-0-ci released this 06 Oct 17:23
· 47 commits to master since this release

Version 1.2.0 is a minor release, and it has breaking changes. All five SDKs (Go, Node, Python, Java and C#) now follow one set of rules for signing requests, calling the network and checking calls from the network. The rules are listed in docs/CROSS_SDK_RULES.md. Some of these rules reject input that 1.1.45 accepted, and some public APIs changed.

You need to act if any of the following applies to you:

  • You start a provider server with an empty network public key. In Go and Python, 1.1.45 accepted an empty key, and the server now refuses to start. A malformed key now fails at startup in every SDK. The Node server accepted any key at startup in 1.1.45.
  • You use Go's network.WithConnectOptions, which is removed, or C#'s NetworkClient.Create or NetworkClient.CreateChannel, which are removed.
  • You use the Java or C# SDK. You must recompile your code against 1.2.0, because some method signatures changed in ways that make old binaries fail at run time. See "Rebuild required".
  • Your calls to the network can take longer than 15 seconds. Every SDK now gives a unary call a 15 second deadline, unless you set your own. Node and Java had no default deadline before.
  • Your configuration can leave the network base URL unset. In Java, C# and Python a missing base URL now selects production, and in Node an empty one now throws. See "A missing base URL now selects production".
  • Your project was created from the Node starter. Fix the finalizePayout timer in src/service.ts, as described under "Other".

The Go module path stays github.com/t-0-network/provider-sdk/go (v1), so go get -u moves a Go project to 1.2.0 and the Go changes below can break its build. Projects created from the Node starter ("@t-0/provider-sdk": "^1.1.x") and the Python starter (t0-provider-sdk>=0.1.0) also accept 1.2.0 within their version ranges, so a dependency update moves them to it. Go, Java and C# starter projects pin an exact version.

Changes that break the build or startup

Go

These changes break the build:

  • network.WithConnectOptions is removed. It is the only exported identifier that was removed from the network, provider, crypto and common packages. network.WithHTTPTransport is still exported. Replace WithConnectOptions as follows:
    • Replace connect.WithGRPC() with network.WithProtocol(network.ProtocolGRPC). On an http:// base URL, the SDK then uses an HTTP/2 transport without TLS, which a plain connect.WithGRPC() would not get.
    • Replace connect.WithProtoJSON() with network.WithWireFormat(network.WireFormatJSON).
    • For other connect client options, such as your own interceptors, add them inside the factory you pass to NewServiceClient, for example func(c connect.HTTPClient, url string, opts ...connect.ClientOption) T { return paymentconnect.NewNetworkServiceClient(c, url, append(opts, myOpts...)...) }. Keep the options the SDK passes in, because they set the default deadlines and refuse bidirectional streams.
  • The generated interfaces payment_intentconnect.PaymentIntentServiceClient and payment_intentconnect.PaymentIntentServiceHandler have a new method, GetQuotes. A type of your own that implements one of them, such as a test fake, no longer compiles until it has a GetQuotes method or embeds UnimplementedPaymentIntentServiceHandler.

These inputs used to be accepted and now fail when the server or client is created:

  • provider.NewHttpHandler and provider.NewHttpHandlerWithOptions return ErrNetworkPublicKeyIsRequired ("network public key is not set") for an empty or whitespace-only network public key. In 1.1.45 an empty key was accepted, and the doc comment said that it disabled verification. Pass the network public key. Surrounding whitespace is now trimmed.
  • A private key, given to network.NewServiceClient, crypto.NewSignerFromHex or crypto.GetPrivateKeyFromHex, must now be exactly 64 hex characters with an optional 0x or 0X prefix, and its value must be in [1, n-1]. In 1.1.45 a shorter key was padded with zeros on the left, a longer key was cut to 32 bytes, and the values 0 and n were accepted, so the SDK signed with a different key than the one you meant. The new errors are "private key must not be null or empty", "private key must be 32 bytes (64 hex characters)" and "private key must be in range [1, n-1]". Check that your key has 64 hex characters.
  • network.NewServiceClient returns ErrInvalidBaseURL ("base URL is not valid") for a base URL with a scheme other than http or https, no host, user info, a query, a fragment, port 0 or a port above 65535. 1.1.45 only ran url.Parse, so it accepted all of these. A base URL without :// is now read as https:// followed by the value. 1.1.45 passed such a value on unchanged, so every call failed.
  • network.WithStreamTimeout is new, and a value of zero or less returns ErrInvalidStreamTimeout.

Node

These changes break the build or the install:

  • createResponseValidation, deprecated since 1.1.14, is removed. Use createValidationInterceptor, which takes the same arguments.
  • @connectrpc/connect-web is no longer a dependency of the SDK. If your code imports it, add it to your own package.json.
  • The package now declares "engines": { "node": ">=20.19.0" }. The SDK uses AbortSignal.any and URL.canParse.
  • @connectrpc/connect and @connectrpc/connect-node are now pinned to exactly 2.1.2 (they were ^2.1.2), because the client uses connect internals. If your app depends on another 2.x version of these packages, npm installs a second copy.
  • signatureValidation now sets req.bodyHashes instead of req.hasher, and createService reads req.bodyHashes. This was never documented, but custom middleware that set req.hasher itself in front of createService no longer works.

These inputs used to be accepted and now throw when the client or server is created:

  • createClient throws "base URL is not set" when the endpoint is "" or null. In 1.1.45 these values silently selected the production URL https://api.t-0.network. Pass undefined to get the default URL.
  • createClient throws "base URL is not valid" for a base URL with a scheme other than http or https, no host, user info, a ? or #, port 0 or a port above 65535. 1.1.45 did not check the URL until a call was made. A value without :// is now read as https:// followed by the value.
  • createClient throws "private key must not be null or empty" when the key is null or undefined. 1.1.45 treated such a value as a signer function and failed on the first call. The other private key errors now read "private key must be 32 bytes (64 hex characters)" and "private key must be in range [1, n-1]". A 0X prefix is now accepted.
  • createService and createHandler check the network public key at startup. A missing or blank key throws "network public key is not set", and a malformed key throws "invalid network public key: ...". 1.1.45 accepted any value and decoded it leniently, so a key followed by other text, such as <key> # comment, worked then and throws now. Surrounding whitespace is trimmed.
  • createRequestVerifier and createRequestDecoder throw "toleranceMs must be a finite number greater than 0 and at most 60000" for any other toleranceMs. In 1.1.45 a value above 60000 widened the timestamp window, and NaN or Infinity turned the timestamp check off. These two functions also reject a 65-byte network key that is not a point on the curve, and their key errors now start with "invalid network public key:".
  • createClient has a new optional fourth argument, ClientOptions. Its timeoutMs and streamTimeoutMs must be greater than 0 and at most 2147483647, or createClient throws a RangeError.

Python

These changes break imports or the install:

  • The module t0_provider_sdk.network.validate_request is removed, with RequestValidationInterceptor and RequestValidationInterceptorSync. They were not exported from t0_provider_sdk.network, and new_service_client never used them. To keep checking requests before you send them, call protovalidate.Validator().validate(request) yourself.
  • The default value of t0_provider_sdk.provider.middleware.signature_error_var is now the sentinel NOT_VERIFIED instead of None. Only code that reads this variable is affected.
  • The package now depends on pyqwest>=0.11.0 directly. Before, pyqwest came only through connectrpc, and the 1.1.45 lockfile had 0.5.1. If another package in your project needs an older pyqwest, the install fails.

These inputs used to be accepted and now raise when the server or client is created:

  • new_asgi_app and new_wsgi_app raise NetworkPublicKeyRequiredError ("network public key is not set") for an empty, None or whitespace-only network public key. In 1.1.45 an empty key returned the app without the signature middleware, so the server answered calls without checking them. A malformed key raises ValueError("invalid network public key: ..."), and a key with whitespace inside it, which 1.1.45 accepted, is now malformed. Surrounding whitespace is stripped, and a 0X prefix is accepted.
  • You can no longer serve unary calls without signature verification. A HandlerOption that removed SignatureErrorInterceptor no longer removes the check, because the SDK always puts the check first. An app built with handler() or handler_sync() that receives a unary call which did not pass through the signature middleware now fails the call with INTERNAL "no signature result in context". Tests that turned verification off must now sign their requests or call the service implementation directly. The check still covers unary calls only, as in 1.1.45, so a streaming method served through handler() is not refused when its signature fails. The provider services in the T-0 API have unary methods only.
  • A private key must now be exactly 64 hex characters with an optional 0x or 0X prefix and a value in [1, n-1]. 1.1.45 accepted whitespace anywhere in the key, and it padded a shorter key with zeros on the left, which gave a different key. Strip whitespace from a key that you read from a file or an environment variable. The errors are ValueError with the messages "private key must not be null or empty", "private key must be 32 bytes (64 hex characters)" and "private key must be in range [1, n-1]".
  • new_service_client and new_service_client_sync raise ValueError("base URL is not set") for base_url="", and ValueError("base URL is not valid") for a scheme other than http or https, no host, user info, a ? or #, or a port of 0, above 65535 or not a number. 1.1.45 did not check the URL. A value without :// is read as https:// followed by the value. For base_url=None, see "A missing base URL now selects production".
  • timeout and the new stream_timeout must be greater than zero, or the client factory raises ValueError("timeout must be a positive duration") or ValueError("stream_timeout must be a positive duration"). 1.1.45 accepted zero or a negative timeout, and every call then failed with DEADLINE_EXCEEDED.

Java

These changes break the build:

  • The class network.t0.sdk.network.RequestValidationInterceptor is removed. The SDK clients never installed it. To keep checking requests before you send them, call network.t0.sdk.provider.Validate.check(message), which throws ResponseValidationException on failure, or copy the old class into your code.
  • For subclasses of NetworkClient, the protected constant DEFAULT_TIMEOUT_SECONDS (30) is removed, and createChannel(String, Signer, int) is replaced by createChannel(String, DigestSigner, Duration, Duration). Use DEFAULT_TIMEOUT and DEFAULT_STREAM_TIMEOUT instead.
  • create(String, Signer, Function, int) on BlockingNetworkClient, AsyncNetworkClient and FutureNetworkClient is deprecated, so a build with -Werror and deprecation warnings turned on fails. Use create(String, DigestSigner, Function, Duration timeout, Duration streamTimeout).
  • The three-argument create(String, Signer, Function) now takes the new interface DigestSigner, which Signer implements, so source code that passes a Signer still compiles. Compiled code does not; see "Rebuild required".

These inputs used to be accepted and now throw IllegalArgumentException when the server or client is created:

  • ProviderServer.create(port, networkPublicKey) and new SignatureVerificationInterceptor(networkPublicKey) now parse the key at once. A missing or blank key throws "network public key is not set", and a malformed key throws "invalid network public key: ...". 1.1.45 checked only for null or empty in create() and parsed the key in build(), and it accepted a 65-byte key that is not a point on the curve, so every request was refused later. Surrounding whitespace is now stripped, and the 33-byte compressed key, which 1.1.45 rejected, is accepted.
  • The endpoint passed to create(...) throws "base URL is not set" when empty, and "base URL is not valid" for a scheme other than http or https (such as grpc://), user info, a query, a fragment, port 0 or a port above 65535. 1.1.45 accepted these, ignored the query, fragment and user info, and treated any other scheme as TLS. For a null endpoint, see "A missing base URL now selects production".
  • The deprecated create(..., int timeoutSeconds) throws "timeout must be a positive duration" for a value of zero or less. 1.1.45 ignored the value completely. The new Duration overload throws for a null, zero or negative timeout.
  • Signer.fromHex rejects a 64-character key that contains non-ASCII Unicode digits, which 1.1.45 accepted. The message for a value of 0 or at least n changed from "invalid hex encoding: private key must be in range [1, n-1]" to "private key must be in range [1, n-1]".
  • A null stubFactory throws "stubFactory must not be null" before a channel is created. 1.1.45 threw a NullPointerException after it created the channel.

C#

These changes break the build:

  • NetworkClient.Create(NetworkClientOptions, Signer, TimeProvider?), which returned a GrpcChannel, is removed. Use NetworkClient.Create(options, signer, invoker => new NetworkService.NetworkServiceClient(invoker)).
  • NetworkClient.CreateChannel(string privateKeyHex, NetworkClientOptions?, TimeProvider?) is removed. Use NetworkClient.Create(options, Signer.FromHex(privateKeyHex), invoker => new ...Client(invoker)).
  • CreateNetworkServiceClient and CreatePaymentIntentNetworkServiceClient no longer take a TimeProvider, and their signer parameter is now ISigner. Each has a new overload that takes NetworkClientOptions. A call that passes a literal null as the first argument is now ambiguous (CS0121), so cast it to string or NetworkClientOptions.
  • RequestValidationInterceptor is removed. To keep checking requests before you send them, run a ProtoValidate Validator yourself; see also "Changes in behavior".
  • The SigningDelegatingHandler constructor now takes ISigner instead of Signer. Source code still compiles. It is now the only public type that accepts a TimeProvider.

These inputs used to be accepted and now throw when the server or client is created:

  • The T0ProviderServer constructor now checks the network public key. A missing or blank key throws ArgumentException("network public key is not set"), and a malformed key throws ArgumentException("invalid network public key: ..."). 1.1.45 threw "network public key is required" only when RunAsync() built the pipeline, and it accepted a 65-byte key that is not a point on the curve. Surrounding whitespace is now trimmed, and the 33-byte compressed key, which 1.1.45 rejected, is accepted. The SignatureVerificationMiddleware constructor applies the same rules.
  • T0Config.FromEnvironment() throws InvalidOperationException when PORT is set but is not a whole number from 1 to 65535. 1.1.45 used 8080 for a value it could not parse, and it passed 0, negative and too-large values on. A whitespace-only NETWORK_PUBLIC_KEY now throws "NETWORK_PUBLIC_KEY is not set. Check your .env file."
  • Setting NetworkClientOptions.BaseUrl throws ArgumentException with "base URL is not set" for "", or "base URL is not valid" for a scheme other than http or https, no host, user info, a ? or #, or port 0. 1.1.45 did not check the value. A value without :// is stored with https:// in front of it. For null, see "A missing base URL now selects production".
  • Setting NetworkClientOptions.Timeout or the new StreamTimeout to zero or less throws ArgumentOutOfRangeException ("... must be a positive duration"). This includes Timeout.InfiniteTimeSpan, which 1.1.45 accepted to mean no timeout. To allow long calls, set a long timeout or pass a deadline on each call.
  • Signer.FromHex throws ArgumentException("private key must be 32 bytes (64 hex characters)") for 64 characters that are not all hex. 1.1.45 threw FormatException.

Changes in behavior that do not break the build

Default deadlines

Every SDK now gives a call a default deadline and sends it to the server. A unary call gets 15 seconds, and a client-streaming or server-streaming call gets 5 minutes. A deadline that you set on the call replaces the default, whether it is shorter or longer. The deadline is sent as Connect-Timeout-Ms over the Connect protocol and as grpc-timeout over gRPC.

SDK 1.1.45 1.2.0 settings Your own deadline for one call
Go http.Client.Timeout of 15 s for every call, streams included. It was not sent to the server, and it also cut short a call whose context had a longer deadline. WithTimeout, WithStreamTimeout the context deadline
Node No default deadline. ClientOptions.timeoutMs, streamTimeoutMs timeoutMs in the call options
Python 15 s for every call, streams included, sent to the server. timeout, stream_timeout (seconds) timeout_ms
Java No default deadline. The timeoutSeconds argument and the documented 30 s default were never applied. create(..., Duration timeout, Duration streamTimeout) stub(timeout, unit) or a Context deadline
C# HttpClient.Timeout of 15 s, on the client only. It also cut short a call with a longer deadline. NetworkClientOptions.Timeout, StreamTimeout deadline in the call options
  • In Node and Java, a unary call that runs longer than 15 seconds without a deadline of your own now fails with DEADLINE_EXCEEDED. In Go, Python and C#, 1.1.45 applied the 15 second timeout to streams as well, and streams now get 5 minutes.
  • In Python, timeout_ms=0 on a call now means no deadline, where 1.1.45 used the 15 second default. In Node, timeoutMs of 0 or less on a call removes the deadline.

A missing base URL now selects production

In Java, C# and Python, a null or None base URL now selects the production URL https://api.t-0.network. Java 1.1.45 threw "endpoint must not be null or empty" for a null endpoint. If your configuration can leave the base URL unset, check it yourself at startup, so that a sandbox setup does not call production.

Node changed the other way. createClient now throws "base URL is not set" for "" or null, where 1.1.45 used the production URL, and undefined still selects production. In Go, WithBaseURL("") returned ErrEmptyBaseURL in both versions, and leaving out WithBaseURL selects production in both.

Redirects are no longer followed

Every SDK client now returns an HTTP redirect as an error instead of following it, because following it would send the signed request to another URL, or turn it into a GET. The Go and C# clients followed redirects in 1.1.45, and the Node and Java clients did not.

Streaming calls are signed over their first message

A client-streaming or server-streaming call is now signed over its first request message, exactly as sent, and later messages are not signed. The client sends the request as soon as it has the first message, and it does not buffer the rest of the stream. A bidirectional streaming call fails with UNIMPLEMENTED "bidirectional streams are not supported" before anything is sent. The details are in docs/STREAMING.md.

No RPC in the current T-0 API streams, so this matters only for clients that you build for other services. In 1.1.45, streaming calls did not work the same way in each SDK:

  • The Go client and the C# client read the whole stream before they signed it and sent it.
  • The Node client could not send a client stream, because the fetch API cannot stream a request body.
  • The Python client failed every streaming call, and every call made over gRPC, with UNAVAILABLE before sending anything.
  • The Java client signed every message again and added another set of signature headers.

Changes in how provider servers check signatures

  • Go: a streaming handler built with provider.Handler is now refused when its request fails the signature check. In 1.1.45 the check ran only for unary handlers, so a streaming handler ran even when the signature did not verify. The server now reads only the first message of a stream before it decides, and WithMaxBodySize limits each message of a stream. provider.SignatureVerification(ctx) tells a handler which part of the body was signed.
  • Go: provider.WithVerifySignatureFn now does nothing. If you passed a function that let every request through, the server now checks every request against the network public key, and the build gives no warning about it.
  • Go, a clarification of existing behavior: the factory you pass to provider.Handler must pass the connect options it receives to every connect handler it builds, because the check that refuses an unverified request is one of those options. This was already the case in 1.1.45, and it is now documented. Generated factories such as paymentconnect.NewProviderServiceHandler do this. Add your own options with WithConnectHandlerOptions.
  • An X-Public-Key header that is not valid hex is now UNAUTHENTICATED in Go, Python, Java and C#, where it was INVALID_ARGUMENT in 1.1.45. A header that is valid hex but not the network key was already UNAUTHENTICATED in Go, Java and C#. In Python such a header, when it was not a key at all, caused an HTTP 500 in 1.1.45, and it is now UNAUTHENTICATED too. In Node, createRequestVerifier and createRequestDecoder now report a malformed key as unknown_public_key (401) instead of invalid_public_key (400).
  • A body over the size limit (10 MiB by default) is now RESOURCE_EXHAUSTED in Go, Python and C#. It was INVALID_ARGUMENT in 1.1.45. Node and Java already returned RESOURCE_EXHAUSTED.
  • X-Signature-Timestamp must now be ASCII digits only and fit a signed 64-bit integer. 1.1.45 accepted a leading + in Go, Python, Java and C#, and surrounding spaces in Python and C#. Node used parseInt, so it accepted trailing text and read 0x1F as a hex number. Such values are now INVALID_ARGUMENT.
  • The timestamp window is ±60 seconds in every SDK, as it was in 1.1.45, and it cannot be configured. In Node, toleranceMs of createRequestVerifier and createRequestDecoder can only make it narrower.
  • Keys are compared as points, so a request whose X-Public-Key holds the compressed form of the network key is accepted. Java, C# and Node rejected it in 1.1.45, and Go and Python already accepted it.
  • Node, Python and C# servers now also verify a gRPC request over its message without the 5-byte gRPC prefix, when the check over the whole body fails and the body is one uncompressed frame. The Java client signs that way. Go and Java servers already did this.
  • Python WSGI: a request without CONTENT_LENGTH is now read only when the server sets wsgi.input_terminated. Otherwise its body counts as empty and the signature check fails. Check that your WSGI server sends Content-Length or sets this flag (unverified which servers set it).

Node client uses binary protobuf and Node's HTTP module

The Node client now sends binary protobuf (application/proto) by default. 1.1.45 sent JSON, because the connect-web transport defaults to JSON. To keep JSON, pass { wireFormat: WireFormat.Json } to createClient. The client also now uses Node's own HTTP module (HTTP/1.1) instead of the global fetch, so a replaced globalThis.fetch or an undici dispatcher, such as a proxy agent or a mock agent, no longer affects SDK calls.

Other behavior changes

  • The Python client no longer compresses requests with gzip. 1.1.45 used the gzip default of the generated clients.
  • The Java and C# clients now put a path from the base URL, such as https://host/v1, in front of every call path. 1.1.45 ignored the path. The Python client now removes one trailing / from the base URL, where 1.1.45 sent a double slash.
  • The C# CreateNetworkServiceClient and CreatePaymentIntentNetworkServiceClient no longer validate requests before sending them. In 1.1.45 an invalid unary request failed locally with INVALID_ARGUMENT "request validation failed: ...". It now reaches the network, which rejects it.
  • A signature header that you set on a call is now replaced by the SDK. In Node, Java and C#, 1.1.45 added a second value next to yours.
  • The Go SigningTransport and the Python SigningClient refuse GET requests with UNIMPLEMENTED "GET requests are not supported", because a GET request carries its message in the URL, which the signature does not cover. In Python this includes generated methods called with use_get=True. 1.1.45 sent them signed over an empty body.
  • The Java client refuses a call that uses a request compressor with UNIMPLEMENTED "compressed requests are not supported".
  • Go client errors changed. ErrEmptyPrivateKey now reads "private key must not be null or empty", and ErrInvalidTimeOut reads "WithTimeout must be a positive duration". NewServiceClient no longer wraps errors with "validating client options:" or "creating signer from hexed private key:", and ErrInvalidBaseURL no longer includes the parser error. errors.Is still works, but code that compares error text must change.
  • All C# clients now share one SocketsHttpHandler, which does not follow redirects and sends HTTP/2 keepalive pings (every 5 minutes, 10 second timeout) while a call is active. You no longer need to dispose a client. The Java client's keepalive time changed from 30 seconds to 5 minutes.
  • Java stub(long timeout, TimeUnit unit) no longer checks its arguments. A timeout of zero or less now gives a deadline that has already passed, so the call fails with DEADLINE_EXCEEDED, where 1.1.45 threw "timeout must be positive".

Rebuild required

Java and C# code compiled against 1.1.45 can fail at run time against 1.2.0, even where its source compiles without changes. Recompile every module that calls the SDK, including shared libraries that you build once and reuse. An application that recompiles all of its code against 1.2.0 only needs the source changes listed above.

Java:

  • create(String, Signer, Function) on BlockingNetworkClient, AsyncNetworkClient and FutureNetworkClient now takes DigestSigner, so old binaries get NoSuchMethodError. The Java starter's Main.java calls this method, so a starter project needs a rebuild but no source change.
  • NetworkClient.createChannel(String, Signer, int), used only by subclasses, is gone, so old binaries get NoSuchMethodError. A reference to the removed RequestValidationInterceptor gives NoClassDefFoundError.
  • create(String, Signer, Function, int) keeps its old signature, so old binaries that call it still link.

C#:

  • CreateNetworkServiceClient(string, Signer, TimeProvider) and CreatePaymentIntentNetworkServiceClient(string, Signer, TimeProvider) became (string, ISigner), so old binaries get MissingMethodException. This includes two-argument calls, because the compiler bound them to the three-parameter method. The C# starter's Program.cs makes such a call, so a starter project needs a rebuild but no source change.
  • The SigningDelegatingHandler(Signer, TimeProvider) constructor became (ISigner, TimeProvider), so old binaries get MissingMethodException.
  • Old binaries that call the removed NetworkClient.Create or NetworkClient.CreateChannel, or use RequestValidationInterceptor, get MissingMethodException or TypeLoadException.
  • T0Config, Signer, T0ProviderServer, SignatureVerificationMiddleware, ProviderServerOptions and the BaseUrl and Timeout properties of NetworkClientOptions keep their signatures.

Deprecated

These still work in 1.2.0 and will be removed in a future release.

  • Go: provider.WithVerifySignatureFn now does nothing. Every handler verifies requests against the network public key that you give to NewHttpHandler, and there is no way to replace or turn off that check. If you passed your own verification function, it is no longer called. The provider.VerifySignature type, which it took, is deprecated too.
  • Go: crypto.GetPublicKeyFromBytes and crypto.GetPublicKeyFromHex. The SDK no longer uses them.
  • Node: parsePublicKey. It now also accepts a 0X prefix and compressed keys, returns the 65-byte form, and rejects keys that are not on the curve.
  • Python: t0_provider_sdk.crypto.public_key_from_hex and public_key_from_bytes. They emit a DeprecationWarning when called, and public_key_from_hex now rejects whitespace.
  • Java: SignatureVerifier.parsePublicKeyHex, and create(String, Signer, Function, int) on the three network clients. parsePublicKeyHex now returns the 65-byte form for a compressed key and rejects keys that are not on the curve.
  • C#: SignatureVerifier.ParsePublicKeyHex. It now accepts compressed keys, returns the 65-byte form, and throws FormatException for null, empty or non-hex input.

Other

  • API: the network service tzero.v1.payment_intent.PaymentIntentService has a new unary RPC, GetQuotes, which lists the pay-in quotes that the caller can collect against. PaymentIntentUpdateRequest.FundsReceived has a new field, pay_in_provider_id.
  • New client options: Go WithStreamTimeout, WithWireFormat and WithProtocol; Node ClientOptions with timeoutMs, streamTimeoutMs and wireFormat; Python stream_timeout, wire_format, protocol and sign_fn; Java the create(..., Duration, Duration) overload and the DigestSigner interface; C# NetworkClient.Create<TClient>, the NetworkClientOptions overloads and StreamTimeout. Go also adds crypto.LegacyKeccak256Concat, and Python adds NetworkPublicKeyRequiredError.
  • Node starter: projects created before 1.2.0 call finalizePayout every 2 seconds for as long as the process runs, for each payout, because src/service.ts used setInterval. Change it to setTimeout, as the template now does, and add a .catch to the call. The template's Dockerfile no longer has a HEALTHCHECK on GET /health, because the template has no such route, so the check could not pass. Remove it from your copy too.
  • Other starter changes: the Python starter exits with an error when NETWORK_PUBLIC_KEY is empty, and the Go starter falls back to https://api-sandbox.t-0.network and port 8080 when TZERO_ENDPOINT or PORT is not set. The Java starter treats a blank NETWORK_PUBLIC_KEY as missing, the Node starter checks that QUOTE_PUBLISHING_INTERVAL is a whole number from 1 to 2147483647, and the C# starter parses it with the invariant culture.
  • CLI (t0-init): a project name must start with a letter and end with a letter or digit, and init takes exactly one name, with flags before or after it. Files that are not valid UTF-8 are copied without changes, and init fails when .env.example has no PROVIDER_PRIVATE_KEY line. The install scripts check PATH entries exactly.
  • Docs: new pages docs/CROSS_SDK_RULES.md (the shared rules and error codes), docs/STREAMING.md and docs/DEPENDENCY_UPDATES.md. Several READMEs had wrong values that are now fixed, for example the Java README's 30 second default timeout, which was never applied, and its 4 MB message limit, which was 10 MiB.
  • Test vectors: cross_test/test_vectors.json has new sections stream_signing_cases, public_key_parsing, timestamp_parsing, base_url_parsing and private_key_parsing, and all five SDKs test against them. The Go helper in cross_test/go_helper serves a streaming test service behind the Go SDK's own verifier.
  • CI: the Node and Python test suites also run nightly against the newest releases of their dependencies, without lockfiles. The Go tests run with the race detector.
  • Dependabot: dependencies that CI can check are updated in one weekly pull request across all ecosystems. Libraries on the signing path, now including @connectrpc/connect, @connectrpc/connect-node, connectrpc.com/connect and golang.org/x/net, get their own pull requests.
  • Generated protobuf code is marked as generated in .gitattributes, so GitHub collapses it in diffs.

Pull requests

Other Changes

  • Add .gitattributes to exclude generated protobuf code from language stats by @stepan-romankov in #371
  • Sync files with t-0-network/backend by @t-0-ci[bot] in #375
  • feat!: sign only the first request message of streaming RPCs (all SDKs) by @stepan-romankov in #372
  • fix: apply the drop-in swaps from the parsing audit by @stepan-romankov in #378
  • fix!: same signature verification rules in every SDK, never serve unverified; simpler client rules; finalize a payout once in the Node starter by @stepan-romankov in #379
  • fix: verify streaming requests in the Go SDK server; go_helper uses the SDK verifier by @stepan-romankov in #383
  • Sync files with t-0-network/backend by @t-0-ci[bot] in #380
  • docs: a provider.Handler factory must pass its opts on (#385) by @stepan-romankov in #387
  • ci: test the Node SDK against unlocked latest deps; run both latest-deps jobs nightly by @stepan-romankov in #388
  • chore!: cleanups before 1.2.0 by @stepan-romankov in #389

Full Changelog: v1.1.45...v1.2.0