Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Create and execute an account proposal with the SDK.
import { DenClient } from "@onchainden/mls-sdk-ts"; const client = new DenClient({ apiKey: process.env.DEN_API_KEY!, baseUrl: process.env.DEN_API_BASE_URL!, });
const { data: proposal } = await client.proposeAccountCreation({ items: [ { name: "Treasury", networkIds: [1, 137], }, ], });
await client.signAccountProposal(proposal.id, { type: "approve", signature: "0x...", }); const { data: executed } = await client.executeAccountProposal(proposal.id, { type: "approve", });
const { data: account } = await client.getAccount("acc_123");
import { DenClient } from "@onchainden/mls-sdk-ts"; // 1) Set up the client. const client = new DenClient({ apiKey: process.env.DEN_API_KEY!, baseUrl: process.env.DEN_API_BASE_URL!, }); // 2) Create an account proposal. const { data: proposal } = await client.proposeAccountCreation({ items: [ { name: "Treasury", networkIds: [1, 137], }, ], }); // 3) Sign and execute the proposal. await client.signAccountProposal(proposal.id, { type: "approve", signature: "0x...", }); const { data: executed } = await client.executeAccountProposal(proposal.id, { type: "approve", }); // 4) Get the account. const { data: account } = await client.getAccount("acc_123");