Skip to main content

2. Implement this OpenAPI Spec

MMI Staking - Connector (0.0.1)

Download OpenAPI specification:Download

MMI Staking is a web service that "talks" with staking providers through a specific and common REST API, defined by MMI. In order for it to talk with your existing API, you need to implement and host a Connector: a REST web service that sits between MMI Staking and your existing API, and that stands as an adaptation layer. The Connector must support this OpenAPI specification.

Details

Get Details

Generic information about your system.

Authorizations:
BearerAuthApiKeyAuth

Responses

Response samples

Content type
application/json
{
  • "feeTiers": [
    ],
  • "fees": 5,
  • "tvl": 7060624149.296207
}

Stakes

Initiate a Stake

Inititate a stake by idempotently reserving a validator for the specific client. Requires an idempotent key.

It takes the supplied "type 1" withdrawal_pubkey ETH1 address, the amount which must be equal to 32,000,000,000 Gwei (32 ETH) and a fee_recipient ETH1 address.

It returns the deposit payload for the user to send.

Authorizations:
BearerAuthApiKeyAuth
header Parameters
Idempotency-Key
required
string <uuid>
Example: f1c971b4-7114-4c4b-8ad2-a6f9e33e2cd0

the unique idempotency key for this request

Request Body schema: application/json
required

Withdrawal Public Key, the pledged Amount of 32,000,000,000 Gwei (32 ETH).

amount
required
string (Gwei) ^[0-9]+$
fee_recipient
required
string (Eth1Address) ^0x[a-fA-F0-9]{40}$

An Ethereum 1 address, uniquely identifying them. 20-bytes, hex encoded with 0x prefix, case insensitive.

withdrawal_pubkey
required
string (WithdrawalPublickey) ^0x[a-fA-F0-9]{40}$

An Ethereum 1 address. MetaMask Institutional enforces "type 1" withdrawal credentials (based upon an Ethereum execution address), and prevents "type 0" withdrawal credentials (based upon a BLS private key). 20-bytes, hex encoded with 0x prefix, case insensitive.

Responses

Request samples

Content type
application/json
{
  • "withdrawal_pubkey": "0x93247f2209abcacf57b75a51dafae777f9dd38bc",
  • "amount": "32000000000",
  • "fee_recipient": "0x93247f2209abcacf57b75a51dafae777f9dd38bc"
}

Response samples

Content type
application/json
{
  • "chain_deposit_configuration": {
    },
  • "stake": {
    },
  • "fee_recipient": "0x93247f2209abcacf57b75a51dafae777f9dd38bc"
}

Withdrawals

Exit a validator

Exit a validator immediately by signing the exit transaction and broadcasting it to the Beacon chain.

Note: You can optionally support exits via a transaction made from the withdrawal address into a given smart contract. In that case, make this endpoint return a 501 Not Implemented error.

Authorizations:
BearerAuthApiKeyAuth

Responses

Response samples

Content type
application/json
{
  • "code": 400,
  • "message": "valPubKey must match /^0x[a-fA-F0-9]{96}$/ regular expression"
}

Request a signed voluntary exit message

Returns a signed voluntary exit message, but does not initiate the actual exit.

Authorizations:
BearerAuthApiKeyAuth

Responses

Response samples

Content type
application/json
{
  • "exit_transaction": {
    },
  • "fork_version": "0x00000000"
}