> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.clossir.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.clossir.com/_mcp/server.

# Deploy a Gated Asset

GUIDES · DEPLOY A GATED ASSET

This guide walks you through the full asset lifecycle — creating a tokenized asset, deploying
it to a chain, allocating tokens to users, and optionally bridging cross-chain.

## Prerequisites

* An organization registered as an issuer ([Onboard an Organization](/guides/onboard-org), step 7)
* Chains enabled ([Onboard an Organization](/guides/onboard-org), step 6)
* A compliance policy defined ([Define a Compliance Policy](/guides/define-policy)) — this can
  happen after asset creation but must be set before deployment

## 1. Install and authenticate

```ts title="client.ts"
import { SignumClient } from "@signum-tech/sdk";

const signum = new SignumClient({
  apiKey: process.env.SIGNUM_API_KEY,
});
```

## 2. Create the asset

Create a new tokenized asset. The `asset_type` field accepts: `cre`, `equity`, `bond`, `debt`,
`fund`, `commodity`, or `other`.

```ts title="create-asset.ts"
const result = await signum.orgs.assets.create(orgId, {
  name: "Acme Fund I",
  symbol: "ACME",
  asset_type: "fund",
  regulation_type: "reg_d",
  total_supply: 1000000,
  decimals: 18,
});

console.log(result.accepted);   // true
console.log(result.assetId);    // "ast_abc123"
console.log(result.status);     // "pending"
console.log(result.requestId);  // For webhook correlation
```

The API returns `202 Accepted`. The asset is registered in the system but not yet deployed
on-chain.

## 3. Attach a compliance policy

Before deploying, attach a compliance policy to define the transfer rules the smart contract
will enforce. See [Define a Compliance Policy](/guides/define-policy) for the full walkthrough.

```ts title="set-policy.ts"
await signum.orgs.assets.compliancePolicy.set(orgId, result.assetId, {
  regulation_type: "reg_d",
  min_kyc_level: 2,
  accredited_investor_required: true,
  blocked_countries: ["IRN", "PRK", "CUB"],
  max_holders: 2000,
  lockup_period_days: 365,
  chain_eid: 30101,
});
```

## 4. Deploy to a chain

Deploy the asset as an OFT (Omnichain Fungible Token) smart contract on the target chain:

```ts title="deploy-asset.ts"
const deploy = await signum.orgs.assets.deploy(orgId, assetId, {
  chain_eid: 30101,
});

console.log(deploy.accepted);   // true
console.log(deploy.assetId);    // "ast_abc123"
console.log(deploy.chainEid);   // 30101
console.log(deploy.status);     // "pending"
console.log(deploy.requestId);  // For webhook correlation
```

The API returns `202 Accepted`. The deployment is processed asynchronously — the system
compiles the contract, deploys it, and registers the compliance policy on-chain.

Deployment can take 30-120 seconds depending on chain congestion. Use the `requestId` for
webhook correlation rather than polling in production integrations.

## 5. Poll for deployment status

Check the asset status until deployment completes, or use webhook correlation with the
`requestId` from step 4:

```ts title="poll-deploy.ts"
async function waitForDeploy(orgId: string, assetId: string): Promise<void> {
  const maxAttempts = 60;
  const intervalMs = 5000;

  for (let i = 0; i < maxAttempts; i++) {
    const asset = await signum.orgs.assets.get(orgId, assetId);

    if (asset.status === "deployed") {
      console.log("Asset deployed:", asset);
      return;
    }

    if (asset.status === "failed") {
      throw new Error("Deployment failed");
    }

    await new Promise((r) => setTimeout(r, intervalMs));
  }

  throw new Error("Deployment did not complete within timeout");
}
```

See [Async Operations](/getting-started/sdk/async-operations) for the webhook correlation
pattern using `requestId`.

## 6. Allocate tokens

Distribute tokens to users. Each allocation is compliance-checked before execution — the
recipient must satisfy the asset's compliance policy.

```ts title="allocate-tokens.ts"
const allocation = await signum.orgs.assets.allocate(orgId, assetId, {
  allocations: [
    { userId: "usr_alice", amount: "50000" },
    { userId: "usr_bob", amount: "25000" },
  ],
  chainEid: 30101,
});

console.log(allocation.accepted);     // true
console.log(allocation.transferIds);  // Array of transfer IDs
console.log(allocation.requestId);    // For webhook correlation
```

The API returns `202 Accepted`. Each allocation triggers an individual compliance check
and on-chain transfer.

## 7. Bridge cross-chain (optional)

Bridge tokens to another chain using LayerZero OFT messaging:

```ts title="bridge-asset.ts"
const bridge = await signum.orgs.assets.bridge(orgId, assetId, {
  dst_chain_eid: 30110,
  amount: "100000",
});

console.log(bridge.accepted);     // true
console.log(bridge.bridgeId);     // Bridge operation ID
console.log(bridge.srcChainEid);  // Source chain
console.log(bridge.dstChainEid);  // 30110
console.log(bridge.status);       // "pending"
console.log(bridge.requestId);    // For webhook correlation
```

The API returns `202 Accepted`. The bridge operation executes through LayerZero's cross-chain
messaging layer.

## What you built

You now have a fully deployed, compliance-gated token on-chain. Every transfer is
automatically checked against your compliance policy — blocked countries, KYC level,
accreditation status, holder limits, and lockup periods are all enforced at the smart
contract level.

## Reference

* [API Reference](/api/overview)
* [Asset Issuance](/products/asset-issuance/overview) — deep-dive into the asset model
* [Async Operations](/getting-started/sdk/async-operations) — polling and webhook correlation

## Next steps

* [Subscribe to Webhooks](/guides/subscribe-webhooks) — receive real-time notifications
* [Define a Compliance Policy](/guides/define-policy) — modify your policy post-deployment