Create Nullifier

Mainly used to create nullifier.

type Group = {
    x: bigint;
    y: bigint;
};

type Nullifier = {
    publicKey: Group;
    public: {
        nullifier: Group;
        s: bigint;
    };
    private: {
        c: bigint;
        g_r: Group;
        h_m_pk_r: Group;
    };
};

interface ProviderError extends Error {
    message: string;
    code: number;
    data?: unknown;
}

const signResult: Nullifier|ProviderError = await window.mina
    ?.createNullifier({
        message: [1,2,3] // or ["1", "2", "3"]
    }).catch((err: any) => err);

Last updated