Properties

ed25519: KeyPair
ed25519_hex: {
    privateKey: string;
    publicKey: string;
}
rsa: KeyPair
rsa_hex: {
    privateKey: string;
    publicKey: string;
}

Methods

  • Parameters

    • privateKey: `0x${string}`

    Returns Promise<void>

  • Transfer native DEM tokens to a recipient address.

    P4 dual-input:

    • bigint (preferred, post-v3): OS amount. 1 DEM = 10^9 OS.
    • number (deprecated, v2 callers): DEM amount, auto-converted.

    Internal carrier is OS bigint; the serializerGate (run from demos.sign) chooses pre-fork vs post-fork wire encoding from the cached getNetworkInfo fork status. Sub-DEM precision against a pre-fork node throws SubDemPrecisionError from demos.pay before any tx construction happens — we delegate to demos.pay which carries the guard.

    Parameters

    • to: `0x${string}`

      Recipient address (0x-prefixed hex).

    • amount: number | bigint

      DEM number (legacy) or OS bigint.

    • demos: Demos

      Demos client used to sign and submit.

    Returns Promise<RPCResponseWithValidityData>

    import { denomination, websdk, wallet } from "@kynesyslabs/demosdk"
    const w = wallet.default.getInstance("alice")
    await w.transfer("0x...", denomination.demToOs(100), demos)
    await w.transfer("0x...", 100_000_000_000n, demos) // raw OS