Skip to content

Developer Documentation ​

Build applications that integrate with Stratos Vault.


Overview ​

Stratos Vault enables developers to build Dock Apps - applications that run within the Portal interface with access to user assets and signing capabilities.

┌─────────────────────────────────────────────────────────────────┐
│                       Stratos Vault                              │
│  ┌───────────────────────────────────────────────────────────┐  │
│  │                     Portal Interface                       │  │
│  │  ┌─────────────────────────────────────────────────────┐  │  │
│  │  │                    Your App                          │  │  │
│  │  │                    (iframe)                          │  │  │
│  │  │                                                      │  │  │
│  │  │   ┌──────────────────────────────────────────────┐  │  │  │
│  │  │   │           Stratos Portal SDK                  │  │  │  │
│  │  │   │                                               │  │  │  │
│  │  │   │  • User authentication                       │  │  │  │
│  │  │   │  • Asset balances                            │  │  │  │
│  │  │   │  • Transaction signing                       │  │  │  │
│  │  │   │  • Canton contract operations                │  │  │  │
│  │  │   └──────────────────────────────────────────────┘  │  │  │
│  │  └─────────────────────────────────────────────────────┘  │  │
│  └───────────────────────────────────────────────────────────┘  │
└─────────────────────────────────────────────────────────────────┘

What You Can Build ​

DeFi Applications ​

  • Token swaps (Jupiter, Uniswap integrations)
  • Lending and borrowing
  • Liquidity provision
  • Yield farming interfaces

Payment Solutions ​

  • Point-of-sale systems
  • Invoice payments
  • Subscription billing
  • Cross-border transfers

Asset Management ​

  • Portfolio dashboards
  • Multi-sig treasury tools
  • Investment interfaces
  • Reporting and analytics

Canton Applications ​

  • Regulated token operations
  • Compliant DeFi protocols
  • Enterprise workflows
  • Cross-institution settlements

The SDK ​

The Stratos Portal SDK (@stratos/wallet-sdk) provides a TypeScript API for Portal integration:

typescript
import { getSDK } from '@stratos/wallet-sdk';

const sdk = getSDK();

// Connect to Portal
const { user, addresses } = await sdk.connect();

// Get asset balances
const assets = await sdk.getAssets();

// Send a transaction
await sdk.sendEVMTransaction({
  transaction: {
    to: '0x...',
    value: '0x...',
    chainId: 1,
  }
});

// Work with Canton contracts
const contracts = await sdk.cantonQuery({
  templateId: 'pkg#Module:Template',
});

Quick Start ​

1. Create Your App ​

bash
npm create vite@latest my-dock-app -- --template react-ts
cd my-dock-app
npm install @stratos/wallet-sdk

2. Connect to Portal ​

typescript
import { getSDK } from '@stratos/wallet-sdk';

const sdk = getSDK();

async function init() {
  const { connected, user } = await sdk.connect();

  if (connected && user) {
    console.log('Welcome,', user.username);
    const assets = await sdk.getAssets();
    console.log('Assets:', assets);
  }
}

3. Deploy Your App ​

bash
npm run build
npx wrangler pages deploy dist

4. Add to Portal ​

Admin adds your app URL to the Dock Apps section in the Portal admin panel.


SDK Capabilities ​

Authentication ​

MethodDescription
connect()Connect to Portal, get user info
getUser()Get current authenticated user
isConnected()Check connection status

Assets & Balances ​

MethodDescription
getAssets()Get all assets with balances
getBalance(symbol)Get specific asset balance
getAddresses()Get user's chain addresses

Transactions ​

MethodDescription
sendEVMTransaction()Sign and send EVM transaction
signEVMTransaction()Sign without broadcasting
signTypedData()Sign EIP-712 typed data
transfer()Canton token transfer

Canton Operations ​

MethodDescription
cantonQuery()Query contracts by template
cantonCreate()Create new contract
cantonExercise()Exercise contract choice
getTransferOffers()Get pending transfers

Events ​

EventDescription
assetsChangedAsset balances updated
userChangedUser logged in/out
transactionsChangedNew transactions

Canton Integration ​

For apps using Canton Network smart contracts:

Distribute Your Package ​

Implement /api/package endpoint:

typescript
export const onRequestGet = async () => {
  return Response.json({
    name: 'My Protocol',
    packageId: 'abc123...',
    darUrl: '/api/package/download',
    templates: ['Module:Template'],
  });
};

Work with Contracts ​

typescript
// Query contracts
const positions = await sdk.cantonQuery({
  templateId: 'pkg#DeFi:Position',
  filter: { owner: user.partyId },
});

// Create contract
await sdk.cantonCreate({
  templateId: 'pkg#DeFi:Order',
  payload: {
    trader: user.partyId,
    amount: '100.0',
  },
});

// Exercise choice
await sdk.cantonExercise({
  contractId: position.contractId,
  templateId: 'pkg#DeFi:Position',
  choice: 'Withdraw',
  argument: { amount: '50.0' },
});

Documentation ​

ResourceDescription
App DevelopmentProject setup and full example
SDK ReferenceComplete API documentation
Transactions GuideMulti-chain transaction signing
Canton ContractsWorking with Daml contracts
Proxy APIServer-side Canton access for backends

Backend & Automation Access ​

For server-side integrations, bots, or automation workflows that need Canton ledger access outside the browser, request a Scoped API Key from your instance operator. The operator creates the key in the admin panel, binding it to a specific party with optional package and choice restrictions. You then use the Proxy API with that key.

Admin and Canton APIs (/api/admin, /api/superadmin, /api/canton) are internal to the portal and not available to third-party applications. Only the Scoped Proxy API (/api/proxy) is released for external use.


Requirements ​

Technical Requirements ​

  • Modern JavaScript framework (React, Vue, Svelte, etc.)
  • TypeScript recommended
  • Must be deployable as static site or Cloudflare Pages

Security Requirements ​

  • HTTPS only
  • No server-side key storage
  • All signing via SDK methods
  • Validate all user inputs

User Experience ​

  • Handle connection states gracefully
  • Show loading states during transactions
  • Display clear error messages
  • Refresh data after transactions

Support ​

  • SDK Issues: GitHub repository issues
  • Integration Help: Contact developer support
  • Enterprise: Dedicated integration support available

Next Steps ​

Enterprise-grade multi-chain wallet infrastructure.