• Social-identity escrow as one-call programmatic transactions.

    Wraps the static EscrowTransaction builders so sending DEM to an unclaimed social identity, claiming it, or refunding an expired escrow collapses the classic build/sign → confirm → broadcast flow into a single call. Each builder here returns a SIGNED transaction; the method hands a thunk producing it to ctx.run(...), which confirms against the fee ceiling and auto-broadcasts — keeping fee-cap policy, confirmation strategy and result shape uniform with the rest of demos.run.*.

    Parameters

    Returns {
        claim: ((platform: "github" | "twitter" | "telegram", username: string, opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>);
        refund: ((platform: "github" | "twitter" | "telegram", username: string, opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>);
        send: ((platform: "github" | "twitter" | "telegram", username: string, amount: number | bigint, options?: {
            expiryDays?: number;
            message?: string;
        }, opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>);
    }

    • claim: ((platform: "github" | "twitter" | "telegram", username: string, opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>)

      Claim escrowed funds for a social identity you have linked, end to end.

      await demos.run.escrow.claim("twitter", "@bob")
      
        • (platform, username, opts?): Promise<ProgrammaticTxResult>
        • Parameters

          • platform: "github" | "twitter" | "telegram"

            Social platform ("twitter", "github", "telegram").

          • username: string

            Username to claim for.

          • Optionalopts: ProgrammaticTxOptions

            Fee ceiling / confirmation strategy / wait behaviour.

          Returns Promise<ProgrammaticTxResult>

    • refund: ((platform: "github" | "twitter" | "telegram", username: string, opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>)

      Refund an expired escrow back to the original depositor, end to end.

      await demos.run.escrow.refund("twitter", "@unclaimed_user")
      
        • (platform, username, opts?): Promise<ProgrammaticTxResult>
        • Parameters

          • platform: "github" | "twitter" | "telegram"

            Social platform ("twitter", "github", "telegram").

          • username: string

            Username whose expired escrow to refund.

          • Optionalopts: ProgrammaticTxOptions

            Fee ceiling / confirmation strategy / wait behaviour.

          Returns Promise<ProgrammaticTxResult>

    • send: ((platform: "github" | "twitter" | "telegram", username: string, amount: number | bigint, options?: {
          expiryDays?: number;
          message?: string;
      }, opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>)

      Send DEM to a social-identity escrow, end to end.

      P4 dual-input amount: bigint OS (preferred) or number DEM (legacy, auto-converted). Sub-DEM precision against a pre-fork node throws.

      import { denomination } from "@kynesyslabs/demosdk"
      // auto-broadcast within the 5 DEM fee cap:
      await demos.run.escrow.send(
      "twitter", "@bob", denomination.demToOs(100),
      { expiryDays: 30, message: "Welcome to Demos!" },
      )
      // build + confirm only, broadcast later yourself:
      const r = await demos.run.escrow.send(
      "twitter", "@bob", 100n, undefined, { confirm: "manual" },
      )
      await demos.broadcast(r.validityData)
        • (platform, username, amount, options?, opts?): Promise<ProgrammaticTxResult>
        • Parameters

          • platform: "github" | "twitter" | "telegram"

            Social platform ("twitter", "github", "telegram").

          • username: string

            Username on that platform (e.g., "@bob").

          • amount: number | bigint

            DEM number (legacy) or OS bigint (preferred).

          • Optionaloptions: {
                expiryDays?: number;
                message?: string;
            }

            Optional escrow parameters (expiry, memo).

            • OptionalexpiryDays?: number
            • Optionalmessage?: string
          • Optionalopts: ProgrammaticTxOptions

            Fee ceiling / confirmation strategy / wait behaviour.

          Returns Promise<ProgrammaticTxResult>