Vesting · Flows

The vesting flows.

Every confidential vesting integration boils down to these paths. Each one carries the hooks that ship it, the recipe that walks it, and the story chapter that demos it on Sepolia.

  1. 1

    Deploy a manager

    Aria's wallet creates a per-user manager clone via the factory. The clone owns Aria's vestings; she keeps DEFAULT_ADMIN_ROLE.

    1. factory.createManager({ token, userSalt }) — CREATE2 deterministic clone
    2. Pass splitEnabled / pausableEnabled to route through createManagerWithOptions when a clone should ship without split or pause
    3. Receipt contains the ManagerCreated event with the clone address
    4. Grant manager roles (VESTING_CREATOR, REVOKER, PAUSER, DISCLOSURE_ADMIN) as needed - FEE_MANAGER_ROLE lives on the factory, not the manager
  2. 2

    Open a vesting

    Encrypt the plaintext amount client-side, submit it with the {start, end, cliff, interval} schedule. Recipient gets read ACL on the handle.

    1. Resolve an encryptor — lazy in React, eager in Node
    2. manager.createVesting({ params: { recipient, startTimestamp, endTimestamp, ... }, amount, encryptor }) - SDK wraps the encrypt+proof
    3. Receipt's VestingCreated event carries the vestingId (branded VestingId)
  3. 3

    Claim what's vested

    Recipient (or admin on their behalf) pulls the vested portion. ClaimArgs branches on the manager's feeType — useManagerFeeInfo resolves it once.

    1. Read fee config: useManagerFeeInfo({ address })
    2. Build the correct ClaimArgs variant: { vestingId, feeType: FeeType.Gas, value } | { vestingId, feeType: FeeType.DistributionToken }
    3. useClaim.mutate(args) — receipt grants recipient ACL on the new handle
  4. 4

    Disclose to a third party

    Add a tax authority, auditor, or finance team as a viewer on specific handles. ACL is append-only — disclosure doesn't unlock the funds.

    1. Pick the handles to disclose (vesting handles, claim handles, fee handles)
    2. useDiscloseToParty({ vestingId, party, disclosureType }) - single grant
    3. useBatchDiscloseHandlesToParty for N grants in one tx
  5. 5

    Transfer + recover

    Handoff a vesting to a new recipient (two-step accept), revoke a vesting, or recover from a stale subwallet.

    1. useInitiateVestingTransfer({ vestingId, newRecipient, transferDurationSeconds }) - old recipient signs the intent
    2. New recipient picks it up via useAcceptVestingTransfer
    3. Either side can usePendingVestingTransfer to poll status
    4. Operator side: useRevokeVesting claws back a revocable schedule; useWithdrawAdmin pulls the recovered balance out of the manager