swivel.vendors.signer

Classes

Class Signer

class Signer

Methods

Method prepare_data

def prepare_data(
    self
)

Get the initial EIP712 compliant data dictionary to sign

Method prepare_domain

def prepare_domain(
    self,
    d,
    i,
    a
)

Update the data dictionary with the 'domain' entry

Method prepare_message

def prepare_message(
    self,
    d,
    o
)

Update the data dictionary with the 'message' entry (Order)

Method sign_order

def sign_order(
    self,
    o,
    i,
    a,
    k
)

Sign an order, producing an EIP712 compliant signature

Parameters

o (dict) Swivel Order object

i (int) ChainId

a (string) Address of the deployed verifying contract

k (bytes) Private key as bytes

Returns

The signature hex with 0x prefix normalized