Skip to main content

Create Node Setup

Opens a new setup on the wallet and network you select and starts deploying its contracts — the node's diamond and facets. This is the only way to deploy a node's contracts. Every call creates a new setup, even for a wallet and network that already have one; to retry a setup whose deploy stalled, use Deploy Setup Contracts instead.

Setups belong to account nodes. The platform node has no setups and is refused (10015); its KYC tokens are created through POST /v2/admin/kyc-tokens.

Before the setup is created the server checks that:

  • the wallet belongs to the node and is on the network's chain (10021);
  • the owner and platform-owner payout wallets are configured for the network (10024, 10025; the owner wallet is not required on an on-premise installation);
  • a KYC token is deployed on the network (10022), and the one you name in kyc_token_id is one of them (10026).

The deploy is asynchronous: the response is the new setup with completed: false, and the contracts are deployed one after another in the background. Poll Get Setup Contract Status until every step is 3 (Done), or Get Node Setup until completed is true.

Required permission: contract:deploy

Request​

POST /v2/admin/nodes/{node_id}/setups

Parameters​

NameTypeInDescription
node_idstringpathRequired. The account node's id

Headers​

NameDescription
AuthorizationRequired. Bearer <access_token>
Content-TypeRequired. application/json

Body​

FieldTypeRequiredDescription
wallet_idstringYesThe node's custody wallet that deploys and signs the setup's contracts (List Node Wallets)
network_idstringYesThe network to deploy on. Must be on the wallet's chain
namestringNoA name for the setup
kyc_token_idstringNoWhich of the network's deployed KYC tokens the diamond is wired to. Empty or omitted: the network's oldest deployed KYC token
valueobjectNoThe setup's own node fee. When omitted, the setup keeps the node fee resolved for the node at creation. See Fee value
categoriesarrayNoPer-category node fees for this setup
categories[].idstringYes, in each entryCategory id
categories[].valueobjectYes, in each entryFee values for that category, same shape as value

Fee value​

Every leaf is an object with one field, value: a percentage as a decimal string ("2.5"). Any leaf may be omitted. See Amounts and Percentages.

FieldDescription
tokenization.asset_tokenization.valueAsset tokenization fee
tokenization.tokenized_asset_sales.valueTokenized asset sales fee
tokenization.management.valueManagement fee
secondary_market.buy_order.valueSecondary-market buy order fee
secondary_market.sell_order.valueSecondary-market sell order fee
secondary_market.otc_sale.valueOTC sale fee
lending.borrower.valueBorrower fee
lending.lending.valueLending fee
lending.liquidation.valueLiquidation fee

Example​

curl --request POST \
--url '{{baseUrl}}/v2/admin/nodes/6a4bef2b1e781b11c22e9707/setups' \
--header 'Authorization: Bearer <access_token>' \
--header 'Content-Type: application/json' \
--data '{
"wallet_id": "6a53f3dfad48accdb46eaf9e",
"network_id": "6740e0a20000000000000101",
"name": "My Setup API",
"kyc_token_id": "",
"value": {
"tokenization": {
"asset_tokenization": { "value": "5" },
"tokenized_asset_sales": { "value": "6.8" },
"management": { "value": "7" }
},
"secondary_market": {
"buy_order": { "value": "8.5" },
"sell_order": { "value": "0.5" },
"otc_sale": { "value": "1" }
},
"lending": {
"borrower": { "value": "0.7" },
"lending": { "value": "0.5" },
"liquidation": { "value": "2" }
}
}
}'

Response​

200 OK with the new setup:

{
"setup_id": "6a552db09c6088e126a4be87",
"name": "My Setup API",
"wallet_id": "6a53f3dfad48accdb46eaf9e",
"wallet_label": "Safe-Main-Wallet",
"wallet_address": "0xAF4bf547c4d354266449dB91fe0c4d8861cFfc0E",
"chain_id": "6740e0a10000000000000101",
"chain_name": "EVM",
"network_id": "6740e0a20000000000000101",
"network_name": "Ethereum",
"node_address": "0xAF4bf547c4d354266449dB91fe0c4d8861cFfc0E",
"owner_address": "0x5B38Da6a701c568545dCfcB03FcB875f56beddC4",
"platform_owner_address": "0x86123D7398a5a2C8b847b37B34eB499e07dE3A76",
"platform_owner_wallet_label": "Platform Treasury",
"completed": false,
"status": "pending",
"kyc_token_id": "6a51e0c2d4f1a2b3c4d5e6f7",
"kyc_token_address": "0x1C0777276B13c56d416c41D4186744b9ba0a0D3a",
"is_api": true
}

Response Fields​

The response is one setup row, documented field by field on List Node Setups.

Errors​

StatusCodeDescription
40010015Validation failed (missing wallet_id or network_id, an invalid fee percentage), the network does not exist, or the node is the platform node — see message / details
40010016node_id, wallet_id or network_id is not a valid id
40010001Node not found (node domain 2)
40010021The wallet does not belong to this node or is not on the network's chain (node domain 2)
40010022No KYC token is deployed on the network (node domain 2)
40010024The owner payout wallet is not configured for the network (node domain 2)
40010025The platform-owner payout wallet is not configured for the network; set it with PUT /v2/admin/platform-owner-wallets/networks/{network_id} (node domain 2)
40010026kyc_token_id is not one of the network's deployed KYC tokens (node domain 2)
40310005The node is outside your part of the hierarchy (node domain 2)

See Errors for the error format and common codes.