Search
⌃K
Comment on page

Platform

Instructions for the ferum::platform module

Public Functions

register_protocol

Registers a protocol to place orders on behalf of users. Returns a ProtocolCapability which should be stored in a top level struct owned by the protocol. See Taking Actions on Behalf of Users for more details.
The ProtocolCapability is then used to fetch a UserIdentifier via get_user_identifier.

Parameters:

  • owner: &signer Signer for the protocol that is registering.

gen_account_identifier

Returns an AccountIdentifier object, which is passed into methods to perform actions on behalf of users. See Taking Actions on Behalf of Users for more details.

Parameters:

  • user: &signer Signer for the user the protocol is placing an order on behalf of.
  • protocolCap: &ProtocolCapability Capability for the protocol returned by register_protocol.

Returns:

  • AccountIdentifier Object representing a user.