@thru/chain-interfaces is the shared type contract used by Thru wallet-adjacent SDKs. It defines the common shapes for connection state, wallet accounts, app metadata, and signing results without tying you to a concrete provider.
Install
Use it when
Use@thru/chain-interfaces when you are building a custom wallet adapter, an embedded provider, or another SDK that needs to agree on Thru account and signing types.
It is also the package to import from when you want to share these types across multiple web packages without depending on a browser-specific implementation.
Use @thru/helpers if you only need address and signature encoding utilities, and use @thru/browser-sdk or @thru/embedded-provider when you need a concrete runtime implementation instead of shared types.
Core types
| Type | What it represents |
|---|---|
IThruChain | The minimal wallet chain interface used by SDK consumers. |
WalletAccount | A connected wallet account with address, label, and account type. |
ConnectResult | The result shape returned by connect flows. |
ConnectedApp | Metadata about an app connected to a wallet account. |
AppMetadata | Shared app identity metadata used during connection. |
SignMessageParams / SignMessageResult | Message signing request and response shapes. |
AddressType | The address type enum used across connection flows. |
IThruChain
The minimal chain interface exposed to SDK consumers.
It provides:
connected: whether the wallet has approved a Thru connectionconnect(): starts the connection flow and resolves with the connected public keydisconnect(): disconnects the current accountsignTransaction(serializedTransaction): signs a base64-encoded transaction payload and returns the signed payload
WalletAccount
Represents a wallet account exposed through Thru connection flows.
It includes:
accountTypeaddresslabel
ConnectResult
Returned by connect flows. It includes:
accountswalletId?status?metadata?
ConnectedApp
Represents an app connected to a wallet account. It includes:
accountIdappIdoriginmetadataconnectedAtupdatedAt
AppMetadata
Shared app identity metadata used during connect flows:
appIdappNameappUrlimageUrl?
Signing types
SignMessageParamscarries amessageandnetworkIdSignMessageResultreturns asignatureandpublicKey
AddressType
The current address type enum includes THRU.