Arkiv Archive - Reassemble the Record
Difficulty: Beginner
The archive vault dropped its index cards—can you rebuild the phrase before the shelves close?
Objective
Restore your assigned archive by ordering its fragments exactly as instructed in the on-chain payload. A valid restoration pushes a completion note and triggers the Discord webhook.
How To Join
Install the Arkiv SDK and follow the quickstart at https://arkiv.network/#getting-started.
Choose and fund the wallet you will use, then export it as ARKIV_PRIVATE_KEY (the 0x prefix is optional). Use the Mendoza faucet at https://mendoza.hoodi.arkiv.network/faucet/ and watch entities via https://explorer.mendoza.hoodi.arkiv.network/.
Point your scripts at the Mendoza endpoints before running anything:
export ARKIV_RPC_URL=https://mendoza.hoodi.arkiv.network/rpc
export ARKIV_WS_URL=wss://mendoza.hoodi.arkiv.network/rpc/ws
Register on-chain by creating an entity with register_for="arkiv-archive" and team="<your team name>".
Example registration snippet:
#!/usr/bin/env bun
import { createWalletClient, http, type Hex } from "@arkiv-network/sdk"
import { privateKeyToAccount } from "@arkiv-network/sdk/accounts"
import { mendoza } from "@arkiv-network/sdk/chains"
import { ExpirationTime, jsonToPayload } from "@arkiv-network/sdk/utils"
const SLUG = "arkiv-archive"
const RPC_URL = process.env.ARKIV_RPC_URL ?? "https://mendoza.hoodi.arkiv.network/rpc"
async function register(team: string): Promise<void> {
const privateKey = (process.env.ARKIV_PRIVATE_KEY ?? "").trim() as Hex
if (!privateKey) {
throw new Error("Set ARKIV_PRIVATE_KEY before running this script")
}
const account = privateKeyToAccount(privateKey)
const walletClient = createWalletClient({ chain: mendoza, transport: http(RPC_URL), account })
const { entityKey, txHash } = await walletClient.createEntity({
payload: jsonToPayload({ intent: "register" }),
contentType: "application/json",
attributes: [
{ key: "register_for", value: SLUG },
{ key: "team", value: team },
],
expiresIn: ExpirationTime.fromMinutes(10),
})
console.log(`Registered ${team} entity=${entityKey} tx=${txHash}`)
}
register("your-team-name").catch((error) => {
console.error(error)
process.exit(1)
})
After registration the service provisions your archive entity annotated with ctf="arkiv-archive", archive_for="<registration>", and a JSON payload describing shuffled fragments.
To submit the restoration, publish an entity annotated with restore_for_archive="<archive id>" and team="<your team name>". The JSON body must include restored_phrase plus a sequence array of fragments in order, for example { "restored_phrase": "ledger-light-archive", "sequence": ["ledger", "light", "archive"] }.
Support
Drop a message in the #CTFs channel on Discord.