Repository navigation
1.2.0
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#'sNetworkClient.CreateorNetworkClient.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
finalizePayouttimer insrc/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.WithConnectOptionsis removed. It is the only exported identifier that was removed from thenetwork,provider,cryptoandcommonpackages.network.WithHTTPTransportis still exported. ReplaceWithConnectOptionsas follows:- Replace
connect.WithGRPC()withnetwork.WithProtocol(network.ProtocolGRPC). On anhttp://base URL, the SDK then uses an HTTP/2 transport without TLS, which a plainconnect.WithGRPC()would not get. - Replace
connect.WithProtoJSON()withnetwork.WithWireFormat(network.WireFormatJSON). - For other connect client options, such as your own interceptors, add them inside the factory you pass to
NewServiceClient, for examplefunc(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.
- Replace
- The generated interfaces
payment_intentconnect.PaymentIntentServiceClientandpayment_intentconnect.PaymentIntentServiceHandlerhave 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 aGetQuotesmethod or embedsUnimplementedPaymentIntentServiceHandler.
These inputs used to be accepted and now fail when the server or client is created:
provider.NewHttpHandlerandprovider.NewHttpHandlerWithOptionsreturnErrNetworkPublicKeyIsRequired("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.NewSignerFromHexorcrypto.GetPrivateKeyFromHex, must now be exactly 64 hex characters with an optional0xor0Xprefix, 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.NewServiceClientreturnsErrInvalidBaseURL("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 ranurl.Parse, so it accepted all of these. A base URL without://is now read ashttps://followed by the value. 1.1.45 passed such a value on unchanged, so every call failed.network.WithStreamTimeoutis new, and a value of zero or less returnsErrInvalidStreamTimeout.
Node
These changes break the build or the install:
createResponseValidation, deprecated since 1.1.14, is removed. UsecreateValidationInterceptor, which takes the same arguments.@connectrpc/connect-webis no longer a dependency of the SDK. If your code imports it, add it to your ownpackage.json.- The package now declares
"engines": { "node": ">=20.19.0" }. The SDK usesAbortSignal.anyandURL.canParse. @connectrpc/connectand@connectrpc/connect-nodeare now pinned to exactly2.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.signatureValidationnow setsreq.bodyHashesinstead ofreq.hasher, andcreateServicereadsreq.bodyHashes. This was never documented, but custom middleware that setreq.hasheritself in front ofcreateServiceno longer works.
These inputs used to be accepted and now throw when the client or server is created:
createClientthrows "base URL is not set" when the endpoint is""ornull. In 1.1.45 these values silently selected the production URLhttps://api.t-0.network. Passundefinedto get the default URL.createClientthrows "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 ashttps://followed by the value.createClientthrows "private key must not be null or empty" when the key isnullorundefined. 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]". A0Xprefix is now accepted.createServiceandcreateHandlercheck 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.createRequestVerifierandcreateRequestDecoderthrow "toleranceMs must be a finite number greater than 0 and at most 60000" for any othertoleranceMs. In 1.1.45 a value above 60000 widened the timestamp window, andNaNorInfinityturned 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:".createClienthas a new optional fourth argument,ClientOptions. ItstimeoutMsandstreamTimeoutMsmust be greater than 0 and at most 2147483647, orcreateClientthrows aRangeError.
Python
These changes break imports or the install:
- The module
t0_provider_sdk.network.validate_requestis removed, withRequestValidationInterceptorandRequestValidationInterceptorSync. They were not exported fromt0_provider_sdk.network, andnew_service_clientnever used them. To keep checking requests before you send them, callprotovalidate.Validator().validate(request)yourself. - The default value of
t0_provider_sdk.provider.middleware.signature_error_varis now the sentinelNOT_VERIFIEDinstead ofNone. Only code that reads this variable is affected. - The package now depends on
pyqwest>=0.11.0directly. 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_appandnew_wsgi_appraiseNetworkPublicKeyRequiredError("network public key is not set") for an empty,Noneor 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 raisesValueError("invalid network public key: ..."), and a key with whitespace inside it, which 1.1.45 accepted, is now malformed. Surrounding whitespace is stripped, and a0Xprefix is accepted.- You can no longer serve unary calls without signature verification. A
HandlerOptionthat removedSignatureErrorInterceptorno longer removes the check, because the SDK always puts the check first. An app built withhandler()orhandler_sync()that receives a unary call which did not pass through the signature middleware now fails the call withINTERNAL"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 throughhandler()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
0xor0Xprefix 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 areValueErrorwith 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_clientandnew_service_client_syncraiseValueError("base URL is not set")forbase_url="", andValueError("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 ashttps://followed by the value. Forbase_url=None, see "A missing base URL now selects production".timeoutand the newstream_timeoutmust be greater than zero, or the client factory raisesValueError("timeout must be a positive duration")orValueError("stream_timeout must be a positive duration"). 1.1.45 accepted zero or a negativetimeout, and every call then failed withDEADLINE_EXCEEDED.
Java
These changes break the build:
- The class
network.t0.sdk.network.RequestValidationInterceptoris removed. The SDK clients never installed it. To keep checking requests before you send them, callnetwork.t0.sdk.provider.Validate.check(message), which throwsResponseValidationExceptionon failure, or copy the old class into your code. - For subclasses of
NetworkClient, the protected constantDEFAULT_TIMEOUT_SECONDS(30) is removed, andcreateChannel(String, Signer, int)is replaced bycreateChannel(String, DigestSigner, Duration, Duration). UseDEFAULT_TIMEOUTandDEFAULT_STREAM_TIMEOUTinstead. create(String, Signer, Function, int)onBlockingNetworkClient,AsyncNetworkClientandFutureNetworkClientis deprecated, so a build with-Werrorand deprecation warnings turned on fails. Usecreate(String, DigestSigner, Function, Duration timeout, Duration streamTimeout).- The three-argument
create(String, Signer, Function)now takes the new interfaceDigestSigner, whichSignerimplements, so source code that passes aSignerstill 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)andnew 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 increate()and parsed the key inbuild(), 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 asgrpc://), 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 anullendpoint, 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 newDurationoverload throws for a null, zero or negative timeout. Signer.fromHexrejects 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
stubFactorythrows "stubFactory must not be null" before a channel is created. 1.1.45 threw aNullPointerExceptionafter it created the channel.
C#
These changes break the build:
NetworkClient.Create(NetworkClientOptions, Signer, TimeProvider?), which returned aGrpcChannel, is removed. UseNetworkClient.Create(options, signer, invoker => new NetworkService.NetworkServiceClient(invoker)).NetworkClient.CreateChannel(string privateKeyHex, NetworkClientOptions?, TimeProvider?)is removed. UseNetworkClient.Create(options, Signer.FromHex(privateKeyHex), invoker => new ...Client(invoker)).CreateNetworkServiceClientandCreatePaymentIntentNetworkServiceClientno longer take aTimeProvider, and their signer parameter is nowISigner. Each has a new overload that takesNetworkClientOptions. A call that passes a literalnullas the first argument is now ambiguous (CS0121), so cast it tostringorNetworkClientOptions.RequestValidationInterceptoris removed. To keep checking requests before you send them, run a ProtoValidateValidatoryourself; see also "Changes in behavior".- The
SigningDelegatingHandlerconstructor now takesISignerinstead ofSigner. Source code still compiles. It is now the only public type that accepts aTimeProvider.
These inputs used to be accepted and now throw when the server or client is created:
- The
T0ProviderServerconstructor now checks the network public key. A missing or blank key throwsArgumentException("network public key is not set"), and a malformed key throwsArgumentException("invalid network public key: ..."). 1.1.45 threw "network public key is required" only whenRunAsync()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. TheSignatureVerificationMiddlewareconstructor applies the same rules. T0Config.FromEnvironment()throwsInvalidOperationExceptionwhenPORTis 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-onlyNETWORK_PUBLIC_KEYnow throws "NETWORK_PUBLIC_KEY is not set. Check your .env file."- Setting
NetworkClientOptions.BaseUrlthrowsArgumentExceptionwith "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 withhttps://in front of it. Fornull, see "A missing base URL now selects production". - Setting
NetworkClientOptions.Timeoutor the newStreamTimeoutto zero or less throwsArgumentOutOfRangeException("... must be a positive duration"). This includesTimeout.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.FromHexthrowsArgumentException("private key must be 32 bytes (64 hex characters)")for 64 characters that are not all hex. 1.1.45 threwFormatException.
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=0on a call now means no deadline, where 1.1.45 used the 15 second default. In Node,timeoutMsof 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
UNAVAILABLEbefore 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.Handleris 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, andWithMaxBodySizelimits each message of a stream.provider.SignatureVerification(ctx)tells a handler which part of the body was signed. - Go:
provider.WithVerifySignatureFnnow 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.Handlermust 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 aspaymentconnect.NewProviderServiceHandlerdo this. Add your own options withWithConnectHandlerOptions. - An
X-Public-Keyheader that is not valid hex is nowUNAUTHENTICATEDin Go, Python, Java and C#, where it wasINVALID_ARGUMENTin 1.1.45. A header that is valid hex but not the network key was alreadyUNAUTHENTICATEDin 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 nowUNAUTHENTICATEDtoo. In Node,createRequestVerifierandcreateRequestDecodernow report a malformed key asunknown_public_key(401) instead ofinvalid_public_key(400). - A body over the size limit (10 MiB by default) is now
RESOURCE_EXHAUSTEDin Go, Python and C#. It wasINVALID_ARGUMENTin 1.1.45. Node and Java already returnedRESOURCE_EXHAUSTED. X-Signature-Timestampmust 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 usedparseInt, so it accepted trailing text and read0x1Fas a hex number. Such values are nowINVALID_ARGUMENT.- The timestamp window is ±60 seconds in every SDK, as it was in 1.1.45, and it cannot be configured. In Node,
toleranceMsofcreateRequestVerifierandcreateRequestDecodercan only make it narrower. - Keys are compared as points, so a request whose
X-Public-Keyholds 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_LENGTHis now read only when the server setswsgi.input_terminated. Otherwise its body counts as empty and the signature check fails. Check that your WSGI server sendsContent-Lengthor 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#
CreateNetworkServiceClientandCreatePaymentIntentNetworkServiceClientno longer validate requests before sending them. In 1.1.45 an invalid unary request failed locally withINVALID_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
SigningTransportand the PythonSigningClientrefuse GET requests withUNIMPLEMENTED"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 withuse_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.
ErrEmptyPrivateKeynow reads "private key must not be null or empty", andErrInvalidTimeOutreads "WithTimeout must be a positive duration".NewServiceClientno longer wraps errors with "validating client options:" or "creating signer from hexed private key:", andErrInvalidBaseURLno longer includes the parser error.errors.Isstill 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 withDEADLINE_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)onBlockingNetworkClient,AsyncNetworkClientandFutureNetworkClientnow takesDigestSigner, so old binaries getNoSuchMethodError. The Java starter'sMain.javacalls 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 getNoSuchMethodError. A reference to the removedRequestValidationInterceptorgivesNoClassDefFoundError.create(String, Signer, Function, int)keeps its old signature, so old binaries that call it still link.
C#:
CreateNetworkServiceClient(string, Signer, TimeProvider)andCreatePaymentIntentNetworkServiceClient(string, Signer, TimeProvider)became(string, ISigner), so old binaries getMissingMethodException. This includes two-argument calls, because the compiler bound them to the three-parameter method. The C# starter'sProgram.csmakes 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 getMissingMethodException. - Old binaries that call the removed
NetworkClient.CreateorNetworkClient.CreateChannel, or useRequestValidationInterceptor, getMissingMethodExceptionorTypeLoadException. T0Config,Signer,T0ProviderServer,SignatureVerificationMiddleware,ProviderServerOptionsand theBaseUrlandTimeoutproperties ofNetworkClientOptionskeep their signatures.
Deprecated
These still work in 1.2.0 and will be removed in a future release.
- Go:
provider.WithVerifySignatureFnnow does nothing. Every handler verifies requests against the network public key that you give toNewHttpHandler, and there is no way to replace or turn off that check. If you passed your own verification function, it is no longer called. Theprovider.VerifySignaturetype, which it took, is deprecated too. - Go:
crypto.GetPublicKeyFromBytesandcrypto.GetPublicKeyFromHex. The SDK no longer uses them. - Node:
parsePublicKey. It now also accepts a0Xprefix 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_hexandpublic_key_from_bytes. They emit aDeprecationWarningwhen called, andpublic_key_from_hexnow rejects whitespace. - Java:
SignatureVerifier.parsePublicKeyHex, andcreate(String, Signer, Function, int)on the three network clients.parsePublicKeyHexnow 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 throwsFormatExceptionfor null, empty or non-hex input.
Other
- API: the network service
tzero.v1.payment_intent.PaymentIntentServicehas a new unary RPC,GetQuotes, which lists the pay-in quotes that the caller can collect against.PaymentIntentUpdateRequest.FundsReceivedhas a new field,pay_in_provider_id. - New client options: Go
WithStreamTimeout,WithWireFormatandWithProtocol; NodeClientOptionswithtimeoutMs,streamTimeoutMsandwireFormat; Pythonstream_timeout,wire_format,protocolandsign_fn; Java thecreate(..., Duration, Duration)overload and theDigestSignerinterface; C#NetworkClient.Create<TClient>, theNetworkClientOptionsoverloads andStreamTimeout. Go also addscrypto.LegacyKeccak256Concat, and Python addsNetworkPublicKeyRequiredError. - Node starter: projects created before 1.2.0 call
finalizePayoutevery 2 seconds for as long as the process runs, for each payout, becausesrc/service.tsusedsetInterval. Change it tosetTimeout, as the template now does, and add a.catchto the call. The template'sDockerfileno longer has aHEALTHCHECKonGET /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_KEYis empty, and the Go starter falls back tohttps://api-sandbox.t-0.networkand port 8080 whenTZERO_ENDPOINTorPORTis not set. The Java starter treats a blankNETWORK_PUBLIC_KEYas missing, the Node starter checks thatQUOTE_PUBLISHING_INTERVALis 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, andinittakes exactly one name, with flags before or after it. Files that are not valid UTF-8 are copied without changes, andinitfails when.env.examplehas noPROVIDER_PRIVATE_KEYline. The install scripts checkPATHentries exactly. - Docs: new pages
docs/CROSS_SDK_RULES.md(the shared rules and error codes),docs/STREAMING.mdanddocs/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.jsonhas new sectionsstream_signing_cases,public_key_parsing,timestamp_parsing,base_url_parsingandprivate_key_parsing, and all five SDKs test against them. The Go helper incross_test/go_helperserves 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/connectandgolang.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/backendby @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/backendby @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