The Demos instance the facade is bound to.
Identity attestations (web2 proofs) + the DAHR web2-proxy.
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.
The proxy request parameters (url, method, options).
The web2 proxy result, including the attested response.
Link a Discord identity to the connected wallet, end to end.
The Discord message proof URL.
OptionalreferralCode: stringOptional referral code for incentive points.
Optionalopts: ProgrammaticTxOptionsFee ceiling / confirmation strategy / wait behaviour.
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.
The domain being claimed (e.g. "example.com"). A full URL is also accepted; only the host is used.
OptionalreferralCode: stringOptional referral code for incentive points.
Optionalopts: ProgrammaticTxOptionsFee ceiling / confirmation strategy / wait behaviour.
Link an Ethos wallet identity to the connected wallet, end to end.
The Ethos wallet identity data to link.
Optionalopts: ProgrammaticTxOptionsFee ceiling / confirmation strategy / wait behaviour.
Link a GitHub identity to the connected wallet, end to end.
The GitHub gist/raw proof URL.
OptionalreferralCode: stringOptional referral code for incentive points.
Optionalopts: ProgrammaticTxOptionsFee ceiling / confirmation strategy / wait behaviour.
Link a Human Passport identity to the connected wallet, end to end.
The Human Passport identity data to link.
Optionalopts: ProgrammaticTxOptionsFee ceiling / confirmation strategy / wait behaviour.
Link a Nomis wallet identity to the connected wallet, end to end.
The Nomis wallet identity data to link.
Optionalopts: ProgrammaticTxOptionsFee ceiling / confirmation strategy / wait behaviour.
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.
The PQC algorithms to bind, or "all" (default)
to bind every supported algorithm.
Optionalopts: ProgrammaticTxOptionsFee ceiling / confirmation strategy / wait behaviour.
Remove an Ethos wallet identity from the connected wallet, end to end.
The identifying data (chain, subchain, address) for the Ethos identity to remove.
Optionalopts: ProgrammaticTxOptionsFee ceiling / confirmation strategy / wait behaviour.
Remove a Human Passport identity from the connected wallet, end to end.
The EVM address of the Human Passport identity to remove.
Optionalopts: ProgrammaticTxOptionsFee ceiling / confirmation strategy / wait behaviour.
Remove a Nomis wallet identity from the connected wallet, end to end.
The Nomis wallet identity data identifying the identity to remove.
Optionalopts: ProgrammaticTxOptionsFee ceiling / confirmation strategy / wait behaviour.
Remove post-quantum (PQC) identities from the connected wallet, end to end.
The PQC algorithms to remove, or "all"
(default) to remove every supported algorithm.
Optionalopts: ProgrammaticTxOptionsFee ceiling / confirmation strategy / wait behaviour.
Remove a web2 identity that was added via TLSNotary, end to end.
The platform context ("github", "discord", or "telegram").
The username to remove.
Optionalopts: ProgrammaticTxOptionsFee ceiling / confirmation strategy / wait behaviour.
Remove an Unstoppable Domain identity from the connected wallet, end to end.
The UD domain to unlink (e.g. "brad.crypto").
Optionalopts: ProgrammaticTxOptionsFee ceiling / confirmation strategy / wait behaviour.
Remove a web2 identity from the connected wallet, end to end.
The identity to unlink (context + username).
Optionalopts: ProgrammaticTxOptionsFee ceiling / confirmation strategy / wait behaviour.
Remove a crosschain (XM) identity from the connected wallet, end to end.
The crosschain identity to unlink.
Optionalopts: ProgrammaticTxOptionsFee ceiling / confirmation strategy / wait behaviour.
Link a Telegram identity to the connected wallet, end to end.
The signed Telegram bot attestation.
OptionalreferralCode: stringOptional referral code for incentive points.
Optionalopts: ProgrammaticTxOptionsFee ceiling / confirmation strategy / wait behaviour.
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).
The platform context ("github", "discord", or "telegram").
The TLSNotary presentation.
The hash of the proven received transcript.
The revealed byte ranges of the transcript.
The revealed received transcript bytes.
The username from the proven response.
The user id from the proven response.
OptionalreferralCode: stringOptional referral code for incentive points.
Optionalopts: ProgrammaticTxOptionsFee ceiling / confirmation strategy / wait behaviour.
Link a Twitter/X identity to the connected wallet, end to end.
The tweet proof URL.
OptionalreferralCode: stringOptional referral code for incentive points.
Optionalopts: ProgrammaticTxOptionsFee ceiling / confirmation strategy / wait behaviour.
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.
The address used to sign the challenge (owner or authorized on the domain).
The signature over the challenge message.
The challenge message that was signed.
The resolved domain data (owner, network, registry type, authorized addresses).
OptionalreferralCode: stringOptional referral code for incentive points.
Optionalopts: ProgrammaticTxOptionsFee ceiling / confirmation strategy / wait behaviour.
Link a crosschain (XM) identity from a signature, end to end.
The signature-inference payload identifying the crosschain address to link.
OptionalreferralCode: stringOptional referral code for incentive points.
Optionalopts: ProgrammaticTxOptionsFee ceiling / confirmation strategy / wait behaviour.
Native bridge operation submission.
Submit a compiled bridge operation as a nativeBridge transaction,
end to end.
NativeBridgeMethods.generateOperationTx signs the transaction
(deriving nonce from the Demos instance); the shared runner then
confirms it and (in "auto" mode) broadcasts it within the fee cap.
The compiled bridge operation returned by the RPC.
Optionalopts: ProgrammaticTxOptionsFee ceiling / confirmation strategy / wait behaviour.
Smart contracts — RPC-native, NOT fee-capped (see namespace docs).
Get a handle to an already-deployed contract. Read-only; no tx.
Start a batch of deploy/call operations (see DemosContracts.batch).
Call a method on an existing contract by address.
RPC-native (not fee-capped). Returns the raw
ContractCallResult, not a ProgrammaticTxResult.
Target contract address.
Method name to invoke.
Optionalargs: unknown[]Method arguments (default []).
Optionaloptions: ContractCallOptionsCall options (gas, etc.).
Deploy a smart contract from source. Requires a connected wallet.
RPC-native (not fee-capped). Returns the deployed
ContractInstance, not a ProgrammaticTxResult.
Contract source code.
OptionalconstructorArgs: unknown[]Constructor arguments (default []).
Optionaloptions: ContractDeployOptionsDeploy options (gas, etc.).
Deploy a contract from a named template.
Registered template name.
Optionalparams: Record<string, unknown>Template parameters.
Estimate gas for a contract call. Read-only; no tx.
Target contract address.
Method name.
Optionalargs: unknown[]Method arguments (default []).
List the available contract template names.
d402 payments.
Settle an HTTP 402 payment requirement, end to end.
Payment requirements from the 402 response (amount, recipient, resourceId, description).
Optionalopts: ProgrammaticTxOptionsFee ceiling / confirmation strategy / wait behaviour.
Demoswork workflow submission.
Submit an assembled DemosWork script as a demoswork
transaction, end to end.
prepareDemosWorkPayload serialises and signs the work; the shared
runner then confirms it and (in "auto" mode) broadcasts it within
the fee cap.
import { DemosWork } from "@kynesyslabs/demosdk"
const work = new DemosWork()
// ... push steps / operations onto `work` ...
// auto-broadcast within the fee cap:
await demos.run.demoswork.submit(work)
// build + confirm only, broadcast later yourself:
const r = await demos.run.demoswork.submit(work, { confirm: "manual" })
await demos.broadcast(r.validityData)
The assembled DemosWork script to execute.
Optionalopts: ProgrammaticTxOptionsFee ceiling / confirmation strategy / wait behaviour.
Escrow to social identities (send / claim / refund).
Claim escrowed funds for a social identity you have linked, end to end.
Social platform ("twitter", "github", "telegram").
Username to claim for.
Optionalopts: ProgrammaticTxOptionsFee ceiling / confirmation strategy / wait behaviour.
Refund an expired escrow back to the original depositor, end to end.
Social platform ("twitter", "github", "telegram").
Username whose expired escrow to refund.
Optionalopts: ProgrammaticTxOptionsFee ceiling / confirmation strategy / wait behaviour.
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)
Social platform ("twitter", "github", "telegram").
Username on that platform (e.g., "@bob").
DEM number (legacy) or OS bigint (preferred).
Optionaloptions: { Optional escrow parameters (expiry, memo).
OptionalexpiryOptionalmessage?: stringOptionalopts: ProgrammaticTxOptionsFee ceiling / confirmation strategy / wait behaviour.
Network-upgrade governance (propose / vote).
Submit a network-upgrade proposal, end to end.
Proposal fields (id, parameters, rationale, activation block).
Optionalopts: ProgrammaticTxOptionsFee ceiling / confirmation strategy / wait behaviour.
Cast a vote on a pending network-upgrade proposal, end to end. The vote is final and non-revocable.
The proposal to vote on.
true to approve, false to reject.
Optionalopts: ProgrammaticTxOptionsFee ceiling / confirmation strategy / wait behaviour.
IPFS storage (add / pin / unpin).
Upload content to IPFS (and auto-pin it), end to end.
// auto-broadcast within the 5 DEM fee cap:
await demos.run.ipfs.add("hello world", { filename: "hello.txt" })
// with a signed cost ceiling from a quote:
const quote = await demos.ipfs.quote(bytes.length, "IPFS_ADD")
await demos.run.ipfs.add(bytes, {
customCharges: IPFSOperations.quoteToCustomCharges(quote),
})
Content to upload (Buffer, Uint8Array or string).
OptionaladdOptions: AddOptionsWithChargesFilename, metadata and optional custom charges.
Optionalopts: ProgrammaticTxOptionsFee ceiling / confirmation strategy / wait behaviour.
Pin an existing CID to the sender's account, end to end.
The Content Identifier to pin (CIDv0 or CIDv1).
OptionalpinOptions: PinOptionsWithChargesDuration, metadata, fileSize and optional
custom charges.
Optionalopts: ProgrammaticTxOptionsFee ceiling / confirmation strategy / wait behaviour.
Remove a pin from the sender's account, end to end.
The Content Identifier to unpin (CIDv0 or CIDv1).
Optionalopts: ProgrammaticTxOptionsFee ceiling / confirmation strategy / wait behaviour.
Send native DEMOS tokens to an address, end to end.
import { denomination } from "@kynesyslabs/demosdk"
// auto-broadcast within the 5 DEM fee cap:
await demos.run.pay("0x...", denomination.demToOs(100))
// build + confirm only, broadcast later yourself:
const r = await demos.run.pay("0x...", 100n, { confirm: "manual" })
await demos.broadcast(r.validityData)
Receiver address (0x-prefixed hex).
DEM number (legacy) or OS bigint (preferred).
Optionalopts: ProgrammaticTxOptionsFee ceiling / confirmation strategy / wait behaviour.
Binary storage and storage programs.
Sign and submit a storage program, end to end.
The storage program payload to sign (must carry a
storageAddress).
Optionalopts: ProgrammaticTxOptionsFee ceiling / confirmation strategy / wait behaviour.
Store binary data on the blockchain, end to end.
The binary data to store in the sender's account.
Optionalopts: ProgrammaticTxOptionsFee ceiling / confirmation strategy / wait behaviour.
Token creation and execution.
Approve a spender to move tokens on your behalf, end to end.
Token contract address.
Spender address being granted the allowance.
Amount to approve (bigint-valued decimal string).
Optionalopts: ProgrammaticTxOptionsFee ceiling / confirmation strategy / wait behaviour.
Burn tokens from an address, end to end.
Token contract address.
Address to burn tokens from.
Amount to burn (bigint-valued decimal string).
Optionalopts: ProgrammaticTxOptionsFee ceiling / confirmation strategy / wait behaviour.
Call a custom script method on the token, end to end.
Token contract address.
Method name to invoke.
Method parameters.
Optionalopts: ProgrammaticTxOptionsFee ceiling / confirmation strategy / wait behaviour.
Deploy a new token, end to end.
Token creation parameters (name, ticker, decimals, initial supply, optional script/ACL).
Optionalopts: ProgrammaticTxOptionsFee ceiling / confirmation strategy / wait behaviour.
Grant ACL permissions to an address, end to end.
Token contract address.
Address being granted the permissions.
Permissions to grant.
Optionalopts: ProgrammaticTxOptionsFee ceiling / confirmation strategy / wait behaviour.
Mint new tokens to an address, end to end.
Token contract address.
Recipient of the minted tokens.
Amount to mint (bigint-valued decimal string).
Optionalopts: ProgrammaticTxOptionsFee ceiling / confirmation strategy / wait behaviour.
Pause all token operations, end to end.
Token contract address.
Optionalopts: ProgrammaticTxOptionsFee ceiling / confirmation strategy / wait behaviour.
Revoke ACL permissions from an address, end to end.
Token contract address.
Address the permissions are revoked from.
Permissions to revoke.
Optionalopts: ProgrammaticTxOptionsFee ceiling / confirmation strategy / wait behaviour.
Transfer tokens to another address, end to end.
// auto-broadcast within the 5 DEM fee cap:
await demos.run.tokens.transfer("0xToken...", "0xTo...", "1000")
// build + confirm only, broadcast later yourself:
const r = await demos.run.tokens.transfer(
"0xToken...", "0xTo...", "1000", { confirm: "manual" },
)
await demos.broadcast(r.validityData)
Token contract address.
Recipient address.
Amount to transfer (bigint-valued decimal string).
Optionalopts: ProgrammaticTxOptionsFee ceiling / confirmation strategy / wait behaviour.
Transfer tokens from one address to another using an existing allowance, end to end.
Token contract address.
Owner address the tokens are moved from.
Recipient address.
Amount to transfer (bigint-valued decimal string).
Optionalopts: ProgrammaticTxOptionsFee ceiling / confirmation strategy / wait behaviour.
Transfer ownership of the token to a new owner, end to end.
Token contract address.
Address of the new owner.
Optionalopts: ProgrammaticTxOptionsFee ceiling / confirmation strategy / wait behaviour.
Resume a paused token, end to end.
Token contract address.
Optionalopts: ProgrammaticTxOptionsFee ceiling / confirmation strategy / wait behaviour.
Upgrade the token's on-chain script, end to end.
Token contract address.
New script code.
New method definitions to install.
New hooks to activate.
Optionalopts: ProgrammaticTxOptionsFee ceiling / confirmation strategy / wait behaviour.
Alias of pay. Same dual-input amount semantics.
Receiver address (0x-prefixed hex).
DEM number (legacy) or OS bigint (preferred).
Optionalopts: ProgrammaticTxOptionsFee ceiling / confirmation strategy / wait behaviour.
Validator staking (stake / unstake / exit).
Complete validator exit, end to end. Only accepted by the network
once the unstake timelock has elapsed
(unstake_available_at <= currentBlock).
Optionalopts: ProgrammaticTxOptionsFee ceiling / confirmation strategy / wait behaviour.
Stake toward validator registration, or top up an existing stake, end to end.
import { denomination } from "@kynesyslabs/demosdk"
// register + auto-broadcast within the 5 DEM fee cap:
await demos.run.validator.stake(
denomination.demToOs(1000).toString(),
"https://my-validator.example",
)
// build + confirm only, broadcast later yourself:
const r = await demos.run.validator.stake(
"1000000000",
"https://my-validator.example",
{ confirm: "manual" },
)
await demos.broadcast(r.validityData)
Stake amount as a non-negative bigint-encoded string (OS).
Validator's public endpoint (required on first stake; used to reach the node).
Optionalopts: ProgrammaticTxOptionsFee ceiling / confirmation strategy / wait behaviour.
Arm the unstake lock, end to end. Starts the timelock after which exit becomes accepted by the network.
Optionalopts: ProgrammaticTxOptionsFee ceiling / confirmation strategy / wait behaviour.
Cross-chain (XM) operation submission.
Submit a fully-built XMScript as a crosschainOperation
transaction, end to end.
prepareXMPayload signs the transaction; the shared runner then
confirms it and (in "auto" mode) broadcasts it within the fee cap.
import { prepareXMScript } from "@kynesyslabs/demosdk"
const xmScript = prepareXMScript({ chain: "eth", ... })
// auto-broadcast within the fee cap:
await demos.run.xm.submit(xmScript)
// build + confirm only, broadcast later yourself:
const r = await demos.run.xm.submit(xmScript, { confirm: "manual" })
await demos.broadcast(r.validityData)
The assembled cross-chain script to execute.
Optionalopts: ProgrammaticTxOptionsFee ceiling / confirmation strategy / wait behaviour.
Build the
demos.runprogrammatic-transaction facade for a Demos instance.Composes the typed one-call namespaces (
pay/transfer,attest.*,tokens.*) over a single shared context, so every method routes through the sameconfirm → broadcastrunner with uniform fee-cap policy and result shape. Additive — the classicdemos.pay/confirm/broadcastmethods are untouched.