• Preparing search index...
  • The search index is not available
@kynesyslabs/demosdk
  • @kynesyslabs/demosdk
  • websdk
  • createAttestNamespace

Function createAttestNamespace

  • createAttestNamespace(ctx): {
        dahr: ((params: IStartProxyParams) => Promise<IWeb2Result>);
        discord: ((proof: DiscordProof, referralCode?: string, opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>);
        domain: ((hostname: string, referralCode?: string, opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>);
        ethos: ((payload: EthosWalletIdentity, opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>);
        github: ((proof: GithubProof, referralCode?: string, opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>);
        humanpassport: ((payload: HumanPassportIdentityData, opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>);
        nomis: ((payload: NomisWalletIdentity, opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>);
        pqc: ((algorithms?: PQCAlgorithm[] | "all", opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>);
        removeEthos: ((payload: EthosIdentityRemoveData, opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>);
        removeHumanpassport: ((address: string, opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>);
        removeNomis: ((payload: NomisWalletIdentity, opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>);
        removePqc: ((algorithms?: PQCAlgorithm[] | "all", opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>);
        removeTlsn: ((context: TLSNIdentityContext, username: string, opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>);
        removeUd: ((domain: string, opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>);
        removeWeb2: ((payload: {
            context: string;
            username: string;
        }, opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>);
        removeXm: ((payload: XMCoreTargetIdentityPayload, opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>);
        telegram: ((attestation: TelegramSignedAttestation, referralCode?: string, opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>);
        tlsn: ((context: TLSNIdentityContext, proof: TLSNotaryPresentation, recvHash: string, proofRanges: TLSNProofRanges, revealedRecv: number[], username: string, userId: string | number, referralCode?: string, opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>);
        twitter: ((proof: `https://x.com/${string}/${string}`, referralCode?: string, opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>);
        ud: ((signingAddress: string, signature: string, challenge: string, resolutionData: UnifiedDomainResolution, referralCode?: string, opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>);
        xm: ((payload: InferFromSignaturePayload, referralCode?: string, opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>);
    }
  • Identity-attestation transactions as one-call programmatic transactions.

    Groups the web2 identity proofs (GitHub, Twitter/X, Discord, Telegram, domain) and their removal into a single namespace. Each builder collapses the classic infer → confirm → broadcast flow into one call that auto-broadcasts within the configured fee ceiling: the Identities.* builders sign + confirm internally and return an already-confirmed RPCResponseWithValidityData, which the shared runner (via ctx.run) detects and forwards straight to broadcast without re-confirming.

    Also exposes dahr, the DAHR web2-proxy attestation. Unlike the identity builders, DAHR does its own sign + confirm + broadcast lifecycle server-side, so it bypasses ctx.run entirely and does not honour ProgrammaticTxOptions.

    Parameters

    • ctx: ProgrammaticContext

    Returns {
        dahr: ((params: IStartProxyParams) => Promise<IWeb2Result>);
        discord: ((proof: DiscordProof, referralCode?: string, opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>);
        domain: ((hostname: string, referralCode?: string, opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>);
        ethos: ((payload: EthosWalletIdentity, opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>);
        github: ((proof: GithubProof, referralCode?: string, opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>);
        humanpassport: ((payload: HumanPassportIdentityData, opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>);
        nomis: ((payload: NomisWalletIdentity, opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>);
        pqc: ((algorithms?: PQCAlgorithm[] | "all", opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>);
        removeEthos: ((payload: EthosIdentityRemoveData, opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>);
        removeHumanpassport: ((address: string, opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>);
        removeNomis: ((payload: NomisWalletIdentity, opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>);
        removePqc: ((algorithms?: PQCAlgorithm[] | "all", opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>);
        removeTlsn: ((context: TLSNIdentityContext, username: string, opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>);
        removeUd: ((domain: string, opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>);
        removeWeb2: ((payload: {
            context: string;
            username: string;
        }, opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>);
        removeXm: ((payload: XMCoreTargetIdentityPayload, opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>);
        telegram: ((attestation: TelegramSignedAttestation, referralCode?: string, opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>);
        tlsn: ((context: TLSNIdentityContext, proof: TLSNotaryPresentation, recvHash: string, proofRanges: TLSNProofRanges, revealedRecv: number[], username: string, userId: string | number, referralCode?: string, opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>);
        twitter: ((proof: `https://x.com/${string}/${string}`, referralCode?: string, opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>);
        ud: ((signingAddress: string, signature: string, challenge: string, resolutionData: UnifiedDomainResolution, referralCode?: string, opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>);
        xm: ((payload: InferFromSignaturePayload, referralCode?: string, opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>);
    }

    • dahr: ((params: IStartProxyParams) => Promise<IWeb2Result>)

      Run a DAHR web2-proxy attestation.

      Unlike the identity builders above, DAHR does not go through ctx.run: the web2 proxy performs its own sign + confirm + broadcast lifecycle server-side. As a result ProgrammaticTxOptions (e.g. maxFee, confirm) do not apply here — there is no local confirm/broadcast stage to govern.

      Example

      const result = await demos.run.attest.dahr({
      url: "https://api.example.com/me",
      method: "GET",
      })
        • (params): Promise<IWeb2Result>
        • Parameters

          • params: IStartProxyParams

            The proxy request parameters (url, method, options).

          Returns Promise<IWeb2Result>

          The web2 proxy result, including the attested response.

    • discord: ((proof: DiscordProof, referralCode?: string, opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>)

      Link a Discord identity to the connected wallet, end to end.

      Example

      await demos.run.attest.discord(
      "https://discord.com/channels/guild/chan/msg",
      )
        • (proof, referralCode?, opts?): Promise<ProgrammaticTxResult>
        • Parameters

          • proof: DiscordProof

            The Discord message proof URL.

          • OptionalreferralCode: string

            Optional referral code for incentive points.

          • Optionalopts: ProgrammaticTxOptions

            Fee ceiling / confirmation strategy / wait behaviour.

          Returns Promise<ProgrammaticTxResult>

    • domain: ((hostname: string, referralCode?: string, opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>)

      Link a domain identity (CCI) to the connected wallet, end to end.

      Requires the proof payload from Identities.createDomainProofPayload to already be hosted at https://<host>/.well-known/demos-cci.txt.

      Example

      await demos.run.attest.domain("example.com")
      
        • (hostname, referralCode?, opts?): Promise<ProgrammaticTxResult>
        • Parameters

          • hostname: string

            The domain being claimed (e.g. "example.com"). A full URL is also accepted; only the host is used.

          • OptionalreferralCode: string

            Optional referral code for incentive points.

          • Optionalopts: ProgrammaticTxOptions

            Fee ceiling / confirmation strategy / wait behaviour.

          Returns Promise<ProgrammaticTxResult>

    • ethos: ((payload: EthosWalletIdentity, opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>)

      Link an Ethos wallet identity to the connected wallet, end to end.

      Example

      await demos.run.attest.ethos({
      chain: "evm",
      subchain: "mainnet",
      address: "0x...",
      score: 1600,
      lastSyncedAt: new Date().toISOString(),
      })
        • (payload, opts?): Promise<ProgrammaticTxResult>
        • Parameters

          • payload: EthosWalletIdentity

            The Ethos wallet identity data to link.

          • Optionalopts: ProgrammaticTxOptions

            Fee ceiling / confirmation strategy / wait behaviour.

          Returns Promise<ProgrammaticTxResult>

    • github: ((proof: GithubProof, referralCode?: string, opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>)

      Link a GitHub identity to the connected wallet, end to end.

      Example

      await demos.run.attest.github(
      "https://gist.github.com/user/abc123",
      )
        • (proof, referralCode?, opts?): Promise<ProgrammaticTxResult>
        • Parameters

          • proof: GithubProof

            The GitHub gist/raw proof URL.

          • OptionalreferralCode: string

            Optional referral code for incentive points.

          • Optionalopts: ProgrammaticTxOptions

            Fee ceiling / confirmation strategy / wait behaviour.

          Returns Promise<ProgrammaticTxResult>

    • humanpassport: ((payload: HumanPassportIdentityData, opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>)

      Link a Human Passport identity to the connected wallet, end to end.

      Example

      await demos.run.attest.humanpassport({
      address: "0x...",
      verificationMethod: "api",
      })
        • (payload, opts?): Promise<ProgrammaticTxResult>
        • Parameters

          • payload: HumanPassportIdentityData

            The Human Passport identity data to link.

          • Optionalopts: ProgrammaticTxOptions

            Fee ceiling / confirmation strategy / wait behaviour.

          Returns Promise<ProgrammaticTxResult>

    • nomis: ((payload: NomisWalletIdentity, opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>)

      Link a Nomis wallet identity to the connected wallet, end to end.

      Example

      await demos.run.attest.nomis({
      walletAddress: "0x...",
      chain: "evm",
      subchain: "mainnet",
      score: 42,
      })
        • (payload, opts?): Promise<ProgrammaticTxResult>
        • Parameters

          • payload: NomisWalletIdentity

            The Nomis wallet identity data to link.

          • Optionalopts: ProgrammaticTxOptions

            Fee ceiling / confirmation strategy / wait behaviour.

          Returns Promise<ProgrammaticTxResult>

    • pqc: ((algorithms?: PQCAlgorithm[] | "all", opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>)

      Bind post-quantum (PQC) identities to the connected wallet, end to end.

      Generates the requested PQC keypairs, signs each address with the wallet's ed25519 key, and links them on the GCR.

      Example

      // Bind every supported PQC algorithm:
      await demos.run.attest.pqc()
      // Or a specific subset:
      await demos.run.attest.pqc(["ml-dsa-65"])
        • (algorithms?, opts?): Promise<ProgrammaticTxResult>
        • Parameters

          • algorithms: PQCAlgorithm[] | "all" = "all"

            The PQC algorithms to bind, or "all" (default) to bind every supported algorithm.

          • Optionalopts: ProgrammaticTxOptions

            Fee ceiling / confirmation strategy / wait behaviour.

          Returns Promise<ProgrammaticTxResult>

    • removeEthos: ((payload: EthosIdentityRemoveData, opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>)

      Remove an Ethos wallet identity from the connected wallet, end to end.

      Example

      await demos.run.attest.removeEthos({
      chain: "evm",
      subchain: "mainnet",
      address: "0x...",
      })
        • (payload, opts?): Promise<ProgrammaticTxResult>
        • Parameters

          • payload: EthosIdentityRemoveData

            The identifying data (chain, subchain, address) for the Ethos identity to remove.

          • Optionalopts: ProgrammaticTxOptions

            Fee ceiling / confirmation strategy / wait behaviour.

          Returns Promise<ProgrammaticTxResult>

    • removeHumanpassport: ((address: string, opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>)

      Remove a Human Passport identity from the connected wallet, end to end.

      Example

      await demos.run.attest.removeHumanpassport("0x...")
      
        • (address, opts?): Promise<ProgrammaticTxResult>
        • Parameters

          • address: string

            The EVM address of the Human Passport identity to remove.

          • Optionalopts: ProgrammaticTxOptions

            Fee ceiling / confirmation strategy / wait behaviour.

          Returns Promise<ProgrammaticTxResult>

    • removeNomis: ((payload: NomisWalletIdentity, opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>)

      Remove a Nomis wallet identity from the connected wallet, end to end.

      Example

      await demos.run.attest.removeNomis({
      walletAddress: "0x...",
      chain: "evm",
      subchain: "mainnet",
      })
        • (payload, opts?): Promise<ProgrammaticTxResult>
        • Parameters

          • payload: NomisWalletIdentity

            The Nomis wallet identity data identifying the identity to remove.

          • Optionalopts: ProgrammaticTxOptions

            Fee ceiling / confirmation strategy / wait behaviour.

          Returns Promise<ProgrammaticTxResult>

    • removePqc: ((algorithms?: PQCAlgorithm[] | "all", opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>)

      Remove post-quantum (PQC) identities from the connected wallet, end to end.

      Example

      await demos.run.attest.removePqc()
      
        • (algorithms?, opts?): Promise<ProgrammaticTxResult>
        • Parameters

          • algorithms: PQCAlgorithm[] | "all" = "all"

            The PQC algorithms to remove, or "all" (default) to remove every supported algorithm.

          • Optionalopts: ProgrammaticTxOptions

            Fee ceiling / confirmation strategy / wait behaviour.

          Returns Promise<ProgrammaticTxResult>

    • removeTlsn: ((context: TLSNIdentityContext, username: string, opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>)

      Remove a web2 identity that was added via TLSNotary, end to end.

      Example

      await demos.run.attest.removeTlsn("github", "octocat")
      
        • (context, username, opts?): Promise<ProgrammaticTxResult>
        • Parameters

          • context: TLSNIdentityContext

            The platform context ("github", "discord", or "telegram").

          • username: string

            The username to remove.

          • Optionalopts: ProgrammaticTxOptions

            Fee ceiling / confirmation strategy / wait behaviour.

          Returns Promise<ProgrammaticTxResult>

    • removeUd: ((domain: string, opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>)

      Remove an Unstoppable Domain identity from the connected wallet, end to end.

      Example

      await demos.run.attest.removeUd("brad.crypto")
      
        • (domain, opts?): Promise<ProgrammaticTxResult>
        • Parameters

          • domain: string

            The UD domain to unlink (e.g. "brad.crypto").

          • Optionalopts: ProgrammaticTxOptions

            Fee ceiling / confirmation strategy / wait behaviour.

          Returns Promise<ProgrammaticTxResult>

    • removeWeb2: ((payload: {
          context: string;
          username: string;
      }, opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>)

      Remove a web2 identity from the connected wallet, end to end.

      Example

      await demos.run.attest.removeWeb2({
      context: "github",
      username: "octocat",
      })
        • (payload, opts?): Promise<ProgrammaticTxResult>
        • Parameters

          • payload: {
                context: string;
                username: string;
            }

            The identity to unlink (context + username).

            • context: string
            • username: string
          • Optionalopts: ProgrammaticTxOptions

            Fee ceiling / confirmation strategy / wait behaviour.

          Returns Promise<ProgrammaticTxResult>

    • removeXm: ((payload: XMCoreTargetIdentityPayload, opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>)

      Remove a crosschain (XM) identity from the connected wallet, end to end.

      Example

      await demos.run.attest.removeXm({
      chain: "eth",
      subchain: "mainnet",
      targetAddress: "0x...",
      })
        • (payload, opts?): Promise<ProgrammaticTxResult>
        • Parameters

          • payload: XMCoreTargetIdentityPayload

            The crosschain identity to unlink.

          • Optionalopts: ProgrammaticTxOptions

            Fee ceiling / confirmation strategy / wait behaviour.

          Returns Promise<ProgrammaticTxResult>

    • telegram: ((attestation: TelegramSignedAttestation, referralCode?: string, opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>)

      Link a Telegram identity to the connected wallet, end to end.

      Example

      await demos.run.attest.telegram(signedAttestation)
      
        • (attestation, referralCode?, opts?): Promise<ProgrammaticTxResult>
        • Parameters

          • attestation: TelegramSignedAttestation

            The signed Telegram bot attestation.

          • OptionalreferralCode: string

            Optional referral code for incentive points.

          • Optionalopts: ProgrammaticTxOptions

            Fee ceiling / confirmation strategy / wait behaviour.

          Returns Promise<ProgrammaticTxResult>

    • tlsn: ((context: TLSNIdentityContext, proof: TLSNotaryPresentation, recvHash: string, proofRanges: TLSNProofRanges, revealedRecv: number[], username: string, userId: string | number, referralCode?: string, opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>)

      Link a web2 identity via a TLSNotary attestation, end to end.

      The proof and its associated fields come from a TLSNotary presentation over the platform's API (GitHub, Discord, or Telegram).

      Example

      await demos.run.attest.tlsn(
      "github",
      presentation,
      recvHash,
      proofRanges,
      revealedRecv,
      "octocat",
      583231,
      )
        • (context, proof, recvHash, proofRanges, revealedRecv, username, userId, referralCode?, opts?): Promise<ProgrammaticTxResult>
        • Parameters

          • context: TLSNIdentityContext

            The platform context ("github", "discord", or "telegram").

          • proof: TLSNotaryPresentation

            The TLSNotary presentation.

          • recvHash: string

            The hash of the proven received transcript.

          • proofRanges: TLSNProofRanges

            The revealed byte ranges of the transcript.

          • revealedRecv: number[]

            The revealed received transcript bytes.

          • username: string

            The username from the proven response.

          • userId: string | number

            The user id from the proven response.

          • OptionalreferralCode: string

            Optional referral code for incentive points.

          • Optionalopts: ProgrammaticTxOptions

            Fee ceiling / confirmation strategy / wait behaviour.

          Returns Promise<ProgrammaticTxResult>

    • twitter: ((proof: `https://x.com/${string}/${string}`, referralCode?: string, opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>)

      Link a Twitter/X identity to the connected wallet, end to end.

      Example

      await demos.run.attest.twitter("https://x.com/user/status/123")
      
        • (proof, referralCode?, opts?): Promise<ProgrammaticTxResult>
        • Parameters

          • proof: `https://x.com/${string}/${string}`

            The tweet proof URL.

          • OptionalreferralCode: string

            Optional referral code for incentive points.

          • Optionalopts: ProgrammaticTxOptions

            Fee ceiling / confirmation strategy / wait behaviour.

          Returns Promise<ProgrammaticTxResult>

    • ud: ((signingAddress: string, signature: string, challenge: string, resolutionData: UnifiedDomainResolution, referralCode?: string, opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>)

      Link an Unstoppable Domain identity to the connected wallet, end to end.

      The signing address must be the owner or an authorized address in the supplied UnifiedDomainResolution (resolve it first via Identities.resolveUDDomain), and must have signed the challenge.

      Example

      const resolution = await demos.abstraction.identities.resolveUDDomain(
      demos,
      "brad.crypto",
      )
      await demos.run.attest.ud(
      signingAddress,
      signature,
      challenge,
      resolution,
      )
        • (signingAddress, signature, challenge, resolutionData, referralCode?, opts?): Promise<ProgrammaticTxResult>
        • Parameters

          • signingAddress: string

            The address used to sign the challenge (owner or authorized on the domain).

          • signature: string

            The signature over the challenge message.

          • challenge: string

            The challenge message that was signed.

          • resolutionData: UnifiedDomainResolution

            The resolved domain data (owner, network, registry type, authorized addresses).

          • OptionalreferralCode: string

            Optional referral code for incentive points.

          • Optionalopts: ProgrammaticTxOptions

            Fee ceiling / confirmation strategy / wait behaviour.

          Returns Promise<ProgrammaticTxResult>

    • xm: ((payload: InferFromSignaturePayload, referralCode?: string, opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>)

      Link a crosschain (XM) identity from a signature, end to end.

      Example

      await demos.run.attest.xm({
      chain: "eth",
      subchain: "mainnet",
      targetAddress: "0x...",
      signature: "0x...",
      })
        • (payload, referralCode?, opts?): Promise<ProgrammaticTxResult>
        • Parameters

          • payload: InferFromSignaturePayload

            The signature-inference payload identifying the crosschain address to link.

          • OptionalreferralCode: string

            Optional referral code for incentive points.

          • Optionalopts: ProgrammaticTxOptions

            Fee ceiling / confirmation strategy / wait behaviour.

          Returns Promise<ProgrammaticTxResult>

    • Defined in src/websdk/programmatic/attest.ts:42

Settings

Member Visibility
@kynesyslabs/demosdk
  • Loading...

Generated using TypeDoc