nostra.sh$NOSTRA

Contract reference

The functions planned for the first version of Limen.

Planned. You can’t use this yet.

This comes from the build plan. Names and details can change until the contract is published.

Payments#

function pay(
    address to,
    uint256 value,
    bytes calldata data,
    uint256 deadline,
    Proof[2] calldata proofs
) external returns (bytes memory)

Checks both proofs, then sends value and data to to. Anyone can call it.

function paymentDigest(
    address to,
    uint256 value,
    bytes calldata data,
    uint256 deadline
) public view returns (bytes32)

Returns the 32 bytes both keys must sign.

struct Proof {
    bytes publicKey;
    bytes signature;
}

Reading an account#

function nonce() external view returns (uint256)
function lockAt(uint256 index) external view returns (Lock memory)

Replacing a lock#

uint256 public constant WAIT = 2 days;

function requestReplacement(
    uint256 index,
    Lock calldata next,
    uint256 deadline,
    Proof[2] calldata proofs,
    Proof calldata nextProof
) external

function finishReplacement() external

function cancelReplacement(
    uint256 deadline,
    Proof[2] calldata proofs
) external

Both current keys and the new key sign the result of replacementDigest. Cancelling uses cancelDigest. Anyone can call finishReplacement after the wait.