← Market

Adjacent Swap Permutation Tour

For 0 to 5 labels starting at zero, construct the whole Steinhaus-Johnson-Trotter permutation tour from identity. Each transition swaps the largest mobile value with its adjacent smaller neighbor, then reverses directions of greater values. Own direction convention stores -1 or +1 by value, initially all -1; blocked values retain direction. Return every permutation, direction vector, incoming pair of zero-based adjacent positions and moved value.

POST https://datenvertrag.halowerk.com/v1/adjacent-swap-permutation-tour

0.003 USDC on Base · payTo 0x2880EdfFF13100677Bf97A3CBdF3Bc34771C4E5E

Status: verified · payable

Operator badge: embed this endpoint's live status badge — it reads "Verified Payable" only while the probe record backs it.

Settlement: direct to the seller's payTo — 0% HIVE402 take

Payment routes

Base · 0.003 USDC · payTo 0x2880EdfFF13100677Bf97A3CBdF3Bc34771C4E5E · via cdp · settles direct
{
  "claimed_permutations": [
    [
      0,
      1,
      2
    ],
    [
      0,
      2,
      1
    ],
    [
      2,
      0,
      1
    ],
    [
      2,
      1,
      0
    ],
    [
      1,
      2,
      0
    ],
    [
      1,
      0,
      2
    ]
  ],
  "size": 3
}
{
  "data": {
    "state": "observed",
    "value": {
      "claimed_matches": true,
      "closing_swap": [
        0,
        1
      ],
      "complete": true,
      "missing": [],
      "permutation_count": 6,
      "states": [
        {
          "directions_by_value": [
            -1,
            -1,
            -1
          ],
          "incoming_swap": null,
          "moved_value": null,
          "permutation": [
            0,
            1,
            2
          ]
        },
        {
          "directions_by_value": [
            -1,
            -1,
            -1
          ],
          "incoming_swap": [
            1,
            2
          ],
          "moved_value": 2,
          "permutation": [
            0,
            2,
            1
          ]
        },
        {
          "directions_by_value": [
            -1,
            -1,
            -1
          ],
          "incoming_swap": [
            0,
            1
          ],
          "moved_value": 2,
          "permutation": [
            2,
            0,
            1
          ]
        },
        {
          "directions_by_value": [
            -1,
            -1,
            1
          ],
          "incoming_swap": [
            1,
            2
          ],
          "moved_value": 1,
          "permutation": [
            2,
            1,
            0
          ]
        },
        {
          "directions_by_value": [
            -1,
            -1,
            1
          ],
          "incoming_swap": [
            0,
            1
          ],
          "moved_value": 2,
          "permutation": [
            1,
            2,
            0
          ]
        },
        {
          "directions_by_value": [
            -1,
            -1,
            1
          ],
          "incoming_swap": [
            1,
            2
          ],
          "moved_value": 2,
          "permutation": [
            1,
            0,
            2
          ]
        }
      ]
    }
  }
}

Script Master Labs LLC · SDVOSB · Kinston, NC · Terms · Refunds · Privacy · Contact

SML network: ScriptMasterLabs — the main site · SML Dual Market — the human storefront · VA Ratings — VA disability ratings, free for veterans

Agent intel trust badge

Trust scorepending / 100 · breakdown
Probe uptime (30d)— over 0 probes · daily
Avg 402 latency— ms
Paid calls (30d, on-chain)0 calls · 0 buyers

How to call

POST https://datenvertrag.halowerk.com/v1/adjacent-swap-permutation-tour · input in body · spec from live-challenge

Input schema
{
  "type": "object",
  "$schema": "http://json-schema.org/draft-07/schema#",
  "additionalProperties": false,
  "required": [
    "size",
    "claimed_permutations"
  ],
  "properties": {
    "size": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 0,
          "maximum": 5
        },
        {
          "type": "null"
        }
      ]
    },
    "claimed_permutations": {
      "anyOf": [
        {
          "type": "array",
          "maxItems": 120,
          "items": {
            "type": "array",
            "maxItems": 5,
            "items": {
              "type": "integer",
              "minimum": 0,
              "maximum": 4
            }
          }
        },
        {
          "type": "null"
        }
      ]
    }
  }
}
Output schema
{}
curl -i -X POST 'https://datenvertrag.halowerk.com/v1/adjacent-swap-permutation-tour' \
  -H 'content-type: application/json' -d '{"size":3,"claimed_permutations":[[0,1,2],[0,2,1],[2,0,1],[2,1,0],[1,2,0],[1,0,2]]}'

Agents: POST https://hive402.scriptmasterlabs.com/mcp → route_task / proxy_call · SDK /sdk/hive402.mjs

Try it (your wallet signs; HIVE402 never holds funds)