@caravan/sdk API - v0.0.0
    Preparing search index...

    Interface TypedDataSigner

    Sign a commitment with a viem-style account (anything exposing signTypedData). Returns a 65-byte signature hex.

    interface TypedDataSigner {
        signTypedData(
            args: {
                domain: TypedDataDomain;
                message: PurchaseCommitment;
                primaryType: "PurchaseCommitment";
                types: {
                    PurchaseCommitment: readonly [
                        { name: "manifestHash"; type: "bytes32" },
                        { name: "poolId"; type: "string" },
                        { name: "buyer"; type: "address" },
                        { name: "seller"; type: "address" },
                        { name: "productId"; type: "string" },
                        { name: "qty"; type: "uint256" },
                        { name: "unitPrice"; type: "uint256" },
                        { name: "settlementMethod"; type: "string" },
                        { name: "expiry"; type: "uint256" },
                        { name: "termsHash"; type: "bytes32" },
                    ];
                };
            },
        ): Promise<`0x${string}`>;
    }
    Index
    • Parameters

      • args: {
            domain: TypedDataDomain;
            message: PurchaseCommitment;
            primaryType: "PurchaseCommitment";
            types: {
                PurchaseCommitment: readonly [
                    { name: "manifestHash"; type: "bytes32" },
                    { name: "poolId"; type: "string" },
                    { name: "buyer"; type: "address" },
                    { name: "seller"; type: "address" },
                    { name: "productId"; type: "string" },
                    { name: "qty"; type: "uint256" },
                    { name: "unitPrice"; type: "uint256" },
                    { name: "settlementMethod"; type: "string" },
                    { name: "expiry"; type: "uint256" },
                    { name: "termsHash"; type: "bytes32" },
                ];
            };
        }

      Returns Promise<`0x${string}`>