import { KeystoneClient } from "@keystoneos/sdk";
const client = new KeystoneClient({
clientId: process.env.KEYSTONE_CLIENT_ID!,
clientSecret: process.env.KEYSTONE_CLIENT_SECRET!,
});
const instruction = await client.instructions.submit({
templateSlug: "cross_platform_dvp",
role: "seller",
party: {
externalReference: "SELLER-001",
walletAddress: "0x1234...abcd",
chainId: 11155111,
},
legs: [{ instrumentId: "BOND-A", quantity: "1000000", direction: "deliver" }],
timeoutAt: new Date(Date.now() + 24 * 60 * 60 * 1000).toISOString(),
idempotencyKey: client.generateIdempotencyKey(),
});