Blockstream Enterprise Custody SDK
Introduction

Architecture

AMP2 operates as a Rust service between client applications and Liquid Network infrastructure. The page explains system components, COSE encryption, and integration modes.

AMP2 is a Rust service that sits between client applications and Liquid Network infrastructure. It manages wallet state, enforces transfer policies, constructs and cosigns transactions, and broadcasts them to the network.

System overview

Issuer Backend JS SDK (COSE) AMP2 Cosigner Investor / Venue LWK (Rust) Proxy Service HSM Liquid Network

COSE encryption flow

All authenticated request and response bodies are wrapped in COSE (RFC 9052) with CBOR serialization. The encryption is layered:

Request (client → server):

  1. JSON → CBOR encode
  2. Sign CBOR with client ECDSA private key → COSE_Sign1
  3. Generate ephemeral AES-256-GCM key
  4. Encrypt signed payload → COSE_Encrypt0
  5. Encrypt ephemeral key with server RSA public key (RSA-OAEP)
  6. Pack encrypted key into KID header field
  7. Send as application/octet-stream

Response (server → client):

  1. JSON → CBOR encode
  2. Sign CBOR with server ECDSA private key (via HSM)
  3. Generate ephemeral AES-256-GCM key
  4. Encrypt signed payload → COSE_Encrypt0
  5. Encrypt ephemeral key with client RSA public key
  6. Send as application/octet-stream

This ensures that even if TLS is terminated at a load balancer, payloads remain encrypted and authenticated.

Integration modes

ModeClientTransportTypical user
Issuer SDK@blockstream/cryptic + @blockstream/amp-registryCOSE wrapped HTTPAsset issuers
LWK + ProxyLWK (Rust) + Proxy ServiceHTTP → Proxy translates to COSEInvestors, venues

Next steps

On this page