Fordefi API (0.2.0)

Download OpenAPI description
Languages
Servers
Production
https://api.fordefi.com/

Users

These endpoints allow you to get information about users in your Fordefi organization.

There are several types of users in the Fordefi platform:

Users can have one of three possible roles, which define the permissions that the user is given:

  • Admin: A user with high privileges in the organization. Only admins have permission to manage the policy, set up the backup, manage the address book, and add or remove users in the organization. Only a person can have an admin role.
  • Trader: A user who can create vaults and transactions.
  • Viewer: A user who has full view of the organization's users, addresses, and policies, as well as of the vaults and transactions, but does not have permissions to create or modify them.

The Users API is currently read-only. To add/remove users, visit the Fordefi web console.

Operations

Authorization Tokens

These endpoints allow you to manage end-user authorization tokens used for Fordefi's WaaS solution.

Authorization tokens allow end users to authenticate with Fordefi. Each end user can have a maximum of ten active authorization tokens at any time.

More information on authenticating end users is provided in the WaaS developer guide.

Operations

Blockchains

These endpoints allow you to get information about blockchains supported by Fordefi.

Operations

Webhooks

These endpoints allow you to manually trigger your pre-configured webhooks.

Use Webhooks describes how to configure webhooks, validate them, and resend them.

Operations

Address Book

These endpoints allow you to list the contacts in your address book.

To add/remove contacts, visit the Fordefi web console. See the user guide for more info.

Operations

Transactions

These endpoints allow you to manage transactions on the Fordefi platform.

A transaction represents an operation that can be one of the following:

  • An on-chain action that modifies blockchain state
  • An off-chain cryptographically signed message or data
Consult the developer guide for more information on creating, monitoring, and simulating tranasctions.
Operations

Export Transactions

Request

Start the export process for filtered transactions

Query
limitinteger

The amount of transactions to export, unlimited if not set.

created_beforestring(date-time)
created_afterstring(date-time)
modified_afterstring(date-time)
vault_idsArray of strings(uuid)

The filter applies both to transactions that have been signed by the vault and also to transactions that have interacted with the vault.

chainsArray of strings
initiator_idsArray of strings(uuid)
typesArray of strings
Items Enum"aptos_message""aptos_transaction""black_box_signature""cosmos_message""cosmos_transaction""evm_message""evm_transaction""solana_message""solana_transaction""starknet_message"
sub_typesArray of strings
Items Enum"transfer""allowance""cross_chain_bridge""transaction""contract_call""contract_deployment""message_signature""allowance_signature"
signer_typesArray of strings
Items Enum"initiator""api_signer""end_user""multiple_signers"
transaction_idsArray of strings(uuid)
end_user_idsArray of strings(uuid)
directionstring
Enum"outgoing""incoming"
curl -i -X GET \
  'https://api.fordefi.com/api/v1/transactions/export?chains=string&created_after=2019-08-24T14%3A15%3A22Z&created_before=2019-08-24T14%3A15%3A22Z&direction=outgoing&end_user_ids=497f6eca-6276-4993-bfeb-53cbbbba6f08&initiator_ids=497f6eca-6276-4993-bfeb-53cbbbba6f08&limit=0&modified_after=2019-08-24T14%3A15%3A22Z&signer_types=initiator&sub_types=transfer&transaction_ids=497f6eca-6276-4993-bfeb-53cbbbba6f08&types=aptos_message&vault_ids=497f6eca-6276-4993-bfeb-53cbbbba6f08' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Successful Response

Bodyapplication/json
idstring(uuid)required

ID of the export.

creation_timestring(date-time)required

The date and time when the object was created.

typestringrequired

Type of the export.

Value"csv"
statestringrequired

The current state of the export.

Enum"created""in_progress""aborted""ready""error"
organization_idstring(uuid)required

The id of the organization.

user_emailstringrequired

The email of the user.

resource_typestringrequired

The type of the resource being exported.

Enum"user""user_change_proposals""user_group""user_group_change_proposal""vault""vault_address""vault_group""address_group""transaction""batch_transaction"
successful_items_countintegerrequired

The number of items that were successfully exported.

failed_items_countintegerrequired

The number of items that failed to be exported.

total_items_countintegerrequired

The total number of items to be exported.

request_idstringrequired

The request id of the export.

download_urlstringrequired

The download url of the export.

expiration_timestring(date-time)required

The date and time when the object will expire.

Response
application/json
{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "creation_time": "2019-08-24T14:15:22Z", "type": "csv", "state": "created", "organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6", "user_email": "string", "resource_type": "user", "successful_items_count": 0, "failed_items_count": 0, "total_items_count": 0, "request_id": "string", "download_url": "string", "expiration_time": "2019-08-24T14:15:22Z" }

Get Transaction

Request

Retrieve transaction details.

Path
idstring(uuid)required

ID of the transaction to retrieve.

curl -i -X GET \
  'https://api.fordefi.com/api/v1/transactions/{id}' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Successful Response

Bodyapplication/json
idstring(uuid)required

The unique identifier of the object in the Fordefi platform.

created_atstring(date-time)required

The date and time when the object was created.

modified_atstring(date-time)required

The date and time when the object was last modified. Any change to any field of the resource is considered a modification.

managed_transaction_dataobject

Managed transaction data. Presented if the transaction was initiated from the Fordefi system itself, in contrast to unmanaged transactions (which are, for example, transfers of funds into a vault visible to Fordefi).

signaturesArray of objectsrequired

The transaction signatures.

notestring

An optional transaction note.

spam_statestring

automatically_set if the transaction was automatically set as spam by Fordefi, manually_set if the transaction was manually set as spam by a user, and unset if the transaction was not set as spam.

Default "unset"
Enum"unset""manually_set""automatically_set"
directionstringrequired

The direction of the transaction.

Enum"outgoing""incoming"
statestringrequired

The state of the message.

Enum"waiting_for_approval""waiting_for_signing_trigger""approved""signed""completed""error_signing""aborted"
state_changesArray of objectsrequired

The state changes of the message.

typestringrequired

Aptos message type.

Discriminator
Value "aptos_message"
aptos_message_typestringrequired

The type of the Aptos message.

Value"personal_message_type"
raw_original_message_to_signstringrequired

The original message that was requested to be signed, encoded in base64.

Example: "SGVsbG8="
string_original_message_to_signstringrequired

The original message that was requested to be signed.

raw_full_message_to_signstringrequired

The full message to be signed, encoded in base64.

Example: "SGVsbG8="
string_full_message_to_signstringrequired

The full message to be signed.

chainobjectrequired

The details of the chain that this message is on.

senderobjectrequired

The sender of the message.

Response
application/json
{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "created_at": "2019-08-24T14:15:22Z", "modified_at": "2019-08-24T14:15:22Z", "managed_transaction_data": { "created_by": {}, "aborted_by": {}, "device_signing_request": {}, "approval_request": {}, "policy_match": {}, "signer_type": "initiator", "risks": [], "error_pushing_to_blockchain_message": "string", "original_error_pushing_to_blockchain_message": "string", "vault": {}, "idempotence_id": "20a3c79f-f547-44b3-bdfc-d8aea82ad496", "has_current_user_vault_permissions": true, "batch_data": {}, "push_mode": "auto", "last_pushed_at": "2019-08-24T14:15:22Z", "sign_mode": "auto" }, "signatures": [ {} ], "note": "string", "spam_state": "unset", "direction": "outgoing", "state": "waiting_for_approval", "state_changes": [ {} ], "type": "aptos_message", "aptos_message_type": "personal_message_type", "raw_original_message_to_sign": "SGVsbG8=", "string_original_message_to_sign": "string", "raw_full_message_to_sign": "SGVsbG8=", "string_full_message_to_sign": "string", "chain": { "chain_type": "aptos", "unique_id": "aptos_mainnet", "name": "string", "native_currency_symbol": "ETH", "native_currency_name": "Ether", "blockchain_explorer": {}, "logo_url": "http://example.com", "is_testnet": true, "is_enabled": true }, "sender": { "vault": {}, "explorer_url": "http://example.com", "contact": {}, "type": "aptos", "address": "0x3300c18e7b931bdfc73dccf3e2d043ad1c9d120c777fff5aeeb9956224e5247a" } }

List Transactions

Request

Get a list of all transactions in an organization.

Query
pageinteger>= 1

The page number to fetch.

Default 1
sizeinteger[ 0 .. 100 ]

The number of items per page.

Default 50
created_beforestring(date-time)
created_afterstring(date-time)
modified_afterstring(date-time)
vault_idsArray of strings(uuid)

The filter applies both to transactions that have been signed by the vault and also to transactions that have interacted with the vault.

chainsArray of strings
initiator_idsArray of strings(uuid)
typesArray of strings
Items Enum"aptos_message""aptos_transaction""black_box_signature""cosmos_message""cosmos_transaction""evm_message""evm_transaction""solana_message""solana_transaction""starknet_message"
sub_typesArray of strings
Items Enum"transfer""allowance""cross_chain_bridge""transaction""contract_call""contract_deployment""message_signature""allowance_signature"
signer_typesArray of strings
Items Enum"initiator""api_signer""end_user""multiple_signers"
transaction_idsArray of strings(uuid)
end_user_idsArray of strings(uuid)
directionstring
Enum"outgoing""incoming"
statesArray of strings

State of the transaction. Can be one of:

  • pending
  • error, which can be one of:
    • error_pushing_to_blockchain
    • completed_reverted
    • error_signing
    • insufficient_funds
    • dropped
  • finalized, which can be one of:
    • completed
    • completed_reverted
    • aborted
    • error_pushing_to_blockchain
    • reverted
    • accelerated
    • canceled
    • dropped
    • error_signing
    • insufficient_funds
  • approved

Items Enum"pending""finalized""approved""waiting_for_signing_trigger""stuck""completed""completed_reverted""error"
is_hiddenboolean
include_full_responseboolean
Default true
batch_idsArray of strings(uuid)
include_blackboxboolean
sort_byArray of strings
Items Enum"created_at_asc""created_at_desc""modified_at_asc""modified_at_desc""type_asc""type_desc""chains_asc""chains_desc""initiators_asc""initiators_desc"
curl -i -X GET \
  'https://api.fordefi.com/api/v1/transactions?batch_ids=497f6eca-6276-4993-bfeb-53cbbbba6f08&chains=string&created_after=2019-08-24T14%3A15%3A22Z&created_before=2019-08-24T14%3A15%3A22Z&direction=outgoing&end_user_ids=497f6eca-6276-4993-bfeb-53cbbbba6f08&include_blackbox=true&include_full_response=true&initiator_ids=497f6eca-6276-4993-bfeb-53cbbbba6f08&is_hidden=true&modified_after=2019-08-24T14%3A15%3A22Z&page=1&signer_types=initiator&size=50&sort_by=created_at_asc&states=pending&sub_types=transfer&transaction_ids=497f6eca-6276-4993-bfeb-53cbbbba6f08&types=aptos_message&vault_ids=497f6eca-6276-4993-bfeb-53cbbbba6f08' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Successful Response

Bodyapplication/json
totalintegerrequired
pageintegerrequired
sizeintegerrequired
transactionsArray of anyrequired
Response
application/json
{ "total": 0, "page": 0, "size": 0, "transactions": [ {} ] }

Create Transaction

Request

Create a new transaction.

Headers
x-signaturestring

Signature of the body. Base64 encoded string. If the request is made programatically by an API user, signing of the request is required and is intended to protect you from malicious backends.

Example: SGVsbG8=
x-timestampinteger

Timestamp of the signature. Integer. Specify an Epoch date. If the request is made programatically by an API user, the timestamp of the request is required and is intended to protect you from replay attacks.

x-idempotence-idstring(uuid)

Optional idempotence ID of a transaction.

Bodyapplication/jsonrequired
vault_idstring(uuid)required

The unique identifier of the vault.

notestring

An optional transaction note.

signer_typestring

The signer of the transaction. Can be:

  • initiator: The creator of the transaction (default).
  • api_signer: A service that you run on your own network or cloud environment.
  • end_user: A mobile device using Fordefi's SDK.

Default "initiator"
Enum"initiator""api_signer""end_user""multiple_signers"
sign_modestring

The sign mode of the transaction determines when the transaction will transition to the signing phase. It can be one of the following:

  • auto: The transaction will move to signing automatically after approval.
  • triggered: The transaction will be in the waiting_for_signing_trigger state until "Trigger Transaction Signing" is called. Currently supported only for API Signer signer type.

Default "auto"
Enum"auto""triggered"
dapp_infoobject

The dapp info.

typestringrequired

Aptos message type.

Discriminator
Value "aptos_message"
detailsobjectrequired
curl -i -X POST \
  https://api.fordefi.com/api/v1/transactions \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'x-idempotence-id: 497f6eca-6276-4993-bfeb-53cbbbba6f08' \
  -H 'x-signature: SGVsbG8=' \
  -H 'x-timestamp: 0' \
  -d '{
    "vault_id": "432b199b-1f71-42bf-ba0b-33d512afa9de",
    "note": "string",
    "signer_type": "initiator",
    "sign_mode": "auto",
    "dapp_info": {
      "url": "string",
      "name": "string"
    },
    "type": "aptos_message",
    "details": {
      "type": "personal_message_type",
      "should_include_address": true,
      "application": "string",
      "should_include_application": true,
      "chain": "aptos_mainnet",
      "should_include_chain": true,
      "message_to_sign": "SGVsbG8=",
      "nonce": "string"
    }
  }'

Responses

Successful Response

Bodyapplication/json
idstring(uuid)required

The unique identifier of the object in the Fordefi platform.

created_atstring(date-time)required

The date and time when the object was created.

modified_atstring(date-time)required

The date and time when the object was last modified. Any change to any field of the resource is considered a modification.

managed_transaction_dataobject

Managed transaction data. Presented if the transaction was initiated from the Fordefi system itself, in contrast to unmanaged transactions (which are, for example, transfers of funds into a vault visible to Fordefi).

signaturesArray of objectsrequired

The transaction signatures.

notestring

An optional transaction note.

spam_statestring

automatically_set if the transaction was automatically set as spam by Fordefi, manually_set if the transaction was manually set as spam by a user, and unset if the transaction was not set as spam.

Default "unset"
Enum"unset""manually_set""automatically_set"
directionstringrequired

The direction of the transaction.

Enum"outgoing""incoming"
statestringrequired

The state of the message.

Enum"waiting_for_approval""waiting_for_signing_trigger""approved""signed""completed""error_signing""aborted"
state_changesArray of objectsrequired

The state changes of the message.

typestringrequired

Aptos message type.

Discriminator
Value "aptos_message"
aptos_message_typestringrequired

The type of the Aptos message.

Value"personal_message_type"
raw_original_message_to_signstringrequired

The original message that was requested to be signed, encoded in base64.

Example: "SGVsbG8="
string_original_message_to_signstringrequired

The original message that was requested to be signed.

raw_full_message_to_signstringrequired

The full message to be signed, encoded in base64.

Example: "SGVsbG8="
string_full_message_to_signstringrequired

The full message to be signed.

chainobjectrequired

The details of the chain that this message is on.

senderobjectrequired

The sender of the message.

Response
application/json
{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "created_at": "2019-08-24T14:15:22Z", "modified_at": "2019-08-24T14:15:22Z", "managed_transaction_data": { "created_by": {}, "aborted_by": {}, "device_signing_request": {}, "approval_request": {}, "policy_match": {}, "signer_type": "initiator", "risks": [], "error_pushing_to_blockchain_message": "string", "original_error_pushing_to_blockchain_message": "string", "vault": {}, "idempotence_id": "20a3c79f-f547-44b3-bdfc-d8aea82ad496", "has_current_user_vault_permissions": true, "batch_data": {}, "push_mode": "auto", "last_pushed_at": "2019-08-24T14:15:22Z", "sign_mode": "auto" }, "signatures": [ {} ], "note": "string", "spam_state": "unset", "direction": "outgoing", "state": "waiting_for_approval", "state_changes": [ {} ], "type": "aptos_message", "aptos_message_type": "personal_message_type", "raw_original_message_to_sign": "SGVsbG8=", "string_original_message_to_sign": "string", "raw_full_message_to_sign": "SGVsbG8=", "string_full_message_to_sign": "string", "chain": { "chain_type": "aptos", "unique_id": "aptos_mainnet", "name": "string", "native_currency_symbol": "ETH", "native_currency_name": "Ether", "blockchain_explorer": {}, "logo_url": "http://example.com", "is_testnet": true, "is_enabled": true }, "sender": { "vault": {}, "explorer_url": "http://example.com", "contact": {}, "type": "aptos", "address": "0x3300c18e7b931bdfc73dccf3e2d043ad1c9d120c777fff5aeeb9956224e5247a" } }

Create Transaction And Wait

Request

Create a new transaction and wait until transaction reaches given state.

Headers
x-signaturestring

Signature of the body. Base64 encoded string. If the request is made programatically by an API user, signing of the request is required and is intended to protect you from malicious backends.

Example: SGVsbG8=
x-timestampinteger

Timestamp of the signature. Integer. Specify an Epoch date. If the request is made programatically by an API user, the timestamp of the request is required and is intended to protect you from replay attacks.

x-idempotence-idstring(uuid)

Optional idempotence ID of a transaction.

Bodyapplication/jsonrequired
vault_idstring(uuid)required

The unique identifier of the vault.

notestring

An optional transaction note.

signer_typestring

The signer of the transaction. Can be:

  • initiator: The creator of the transaction (default).
  • api_signer: A service that you run on your own network or cloud environment.
  • end_user: A mobile device using Fordefi's SDK.

Default "initiator"
Enum"initiator""api_signer""end_user""multiple_signers"
sign_modestring

The sign mode of the transaction determines when the transaction will transition to the signing phase. It can be one of the following:

  • auto: The transaction will move to signing automatically after approval.
  • triggered: The transaction will be in the waiting_for_signing_trigger state until "Trigger Transaction Signing" is called. Currently supported only for API Signer signer type.

Default "auto"
Enum"auto""triggered"
dapp_infoobject

The dapp info.

typestringrequired

Aptos message type.

Discriminator
Value "aptos_message"
detailsobjectrequired
timeoutinteger[ 1 .. 50 ]

The maximum time in seconds to wait for the transaction to reach the specified state. For states that require more than 50 seconds, using webhooks or polling is preferable.

Default 10
wait_for_statestringrequired

The state to wait for.

Enum"waiting_for_approval""waiting_for_signing_trigger""approved""signed""completed""error_signing""aborted"
curl -i -X POST \
  https://api.fordefi.com/api/v1/transactions/create-and-wait \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'x-idempotence-id: 497f6eca-6276-4993-bfeb-53cbbbba6f08' \
  -H 'x-signature: SGVsbG8=' \
  -H 'x-timestamp: 0' \
  -d '{
    "vault_id": "432b199b-1f71-42bf-ba0b-33d512afa9de",
    "note": "string",
    "signer_type": "initiator",
    "sign_mode": "auto",
    "dapp_info": {
      "url": "string",
      "name": "string"
    },
    "type": "aptos_message",
    "details": {
      "type": "personal_message_type",
      "should_include_address": true,
      "application": "string",
      "should_include_application": true,
      "chain": "aptos_mainnet",
      "should_include_chain": true,
      "message_to_sign": "SGVsbG8=",
      "nonce": "string"
    },
    "timeout": 10,
    "wait_for_state": "waiting_for_approval"
  }'

Responses

Successful Response

Bodyapplication/json
idstring(uuid)required

The unique identifier of the object in the Fordefi platform.

created_atstring(date-time)required

The date and time when the object was created.

modified_atstring(date-time)required

The date and time when the object was last modified. Any change to any field of the resource is considered a modification.

signaturesArray of stringsrequired

The transaction signatures.

Example: ["SGVsbG8="]
statePushableTransactionState (string) or NonPushableTransactionState (string)required

The state of the transaction.

Any of:

The state of the transaction.

string

The state of the transaction.

Enum"waiting_for_approval""waiting_for_signing_trigger""approved""signed""pushed_to_blockchain""mined""completed""aborted""error_pushing_to_blockchain""mined_reverted"
has_timed_outbooleanrequired

Whether the transaction has timed out while waiting for the requested state.

Response
application/json
{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "created_at": "2019-08-24T14:15:22Z", "modified_at": "2019-08-24T14:15:22Z", "signatures": [ "SGVsbG8=" ], "state": "waiting_for_approval", "has_timed_out": true }

Approve Transaction

Request

Approve a transaction.

A transaction awaits approval when the caller API user has been specified as a potential approver in the policy and the transaction is in the waiting_for_approval state.

Path
idstring(uuid)required

ID of the transaction to approve.

curl -i -X POST \
  'https://api.fordefi.com/api/v1/transactions/{id}/approve' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Successful Response

Response
No content

Abort Transaction

Request

Abort a transaction.

Abort is possible only for a transaction that is in one of the following states:

  • Waiting for approval
  • Approved

The aborting user must be one of the following:

  • The user who created the transaction
  • An admin
  • A legitimate approver

API users can abort only the transactions they created.

Path
idstring(uuid)required

ID of the transaction to abort.

curl -i -X POST \
  'https://api.fordefi.com/api/v1/transactions/{id}/abort' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Successful Response

Response
No content

Release Transaction

Request

Release a transaction.

Path
idstring(uuid)required

ID of the transaction to release.

Headers
x-signaturestring

Signature of the body. Base64 encoded string. If the request is made programatically by an API user, signing of the request is required and is intended to protect you from malicious backends.

Example: SGVsbG8=
x-timestampinteger

Timestamp of the signature. Integer. Specify an Epoch date. If the request is made programatically by an API user, the timestamp of the request is required and is intended to protect you from replay attacks.

Bodyapplication/jsonrequired
typestringrequired

The type of the transaction.

Discriminator
Value "evm_transaction"
release_typestringrequired

The type of the release.

Enum"cancel""accelerate"
signer_typestring

Set who should sign the transaction.

Default "initiator"
Enum"initiator""api_signer""end_user""multiple_signers"
fail_on_prediction_failureboolean

True if transaction creation should fail in case prediction failed, False otherwise.
In case simulation has failed upon continuation, the expected result of the transaction will be partial and policy will be applied on information that can be extracted statically from the transaction only. This might result in falling back to the default policy rule.

Default true
notestring

An optional transaction note.

curl -i -X POST \
  'https://api.fordefi.com/api/v1/transactions/{id}/release' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'x-signature: SGVsbG8=' \
  -H 'x-timestamp: 0' \
  -d '{
    "type": "evm_transaction",
    "release_type": "cancel",
    "signer_type": "initiator",
    "fail_on_prediction_failure": true,
    "note": "string"
  }'

Responses

Successful Response

Bodyapplication/json
idstring(uuid)required

The unique identifier of the object in the Fordefi platform.

created_atstring(date-time)required

The date and time when the object was created.

modified_atstring(date-time)required

The date and time when the object was last modified. Any change to any field of the resource is considered a modification.

managed_transaction_dataobject

Managed transaction data. Presented if the transaction was initiated from the Fordefi system itself, in contrast to unmanaged transactions (which are, for example, transfers of funds into a vault visible to Fordefi).

signaturesArray of objectsrequired

The transaction signatures.

notestring

An optional transaction note.

spam_statestring

automatically_set if the transaction was automatically set as spam by Fordefi, manually_set if the transaction was manually set as spam by a user, and unset if the transaction was not set as spam.

Default "unset"
Enum"unset""manually_set""automatically_set"
directionstringrequired

The direction of the transaction.

Enum"outgoing""incoming"
statestringrequired

The state of the message.

Enum"waiting_for_approval""waiting_for_signing_trigger""approved""signed""completed""error_signing""aborted"
state_changesArray of objectsrequired

The state changes of the message.

typestringrequired

Aptos message type.

Discriminator
Value "aptos_message"
aptos_message_typestringrequired

The type of the Aptos message.

Value"personal_message_type"
raw_original_message_to_signstringrequired

The original message that was requested to be signed, encoded in base64.

Example: "SGVsbG8="
string_original_message_to_signstringrequired

The original message that was requested to be signed.

raw_full_message_to_signstringrequired

The full message to be signed, encoded in base64.

Example: "SGVsbG8="
string_full_message_to_signstringrequired

The full message to be signed.

chainobjectrequired

The details of the chain that this message is on.

senderobjectrequired

The sender of the message.

Response
application/json
{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "created_at": "2019-08-24T14:15:22Z", "modified_at": "2019-08-24T14:15:22Z", "managed_transaction_data": { "created_by": {}, "aborted_by": {}, "device_signing_request": {}, "approval_request": {}, "policy_match": {}, "signer_type": "initiator", "risks": [], "error_pushing_to_blockchain_message": "string", "original_error_pushing_to_blockchain_message": "string", "vault": {}, "idempotence_id": "20a3c79f-f547-44b3-bdfc-d8aea82ad496", "has_current_user_vault_permissions": true, "batch_data": {}, "push_mode": "auto", "last_pushed_at": "2019-08-24T14:15:22Z", "sign_mode": "auto" }, "signatures": [ {} ], "note": "string", "spam_state": "unset", "direction": "outgoing", "state": "waiting_for_approval", "state_changes": [ {} ], "type": "aptos_message", "aptos_message_type": "personal_message_type", "raw_original_message_to_sign": "SGVsbG8=", "string_original_message_to_sign": "string", "raw_full_message_to_sign": "SGVsbG8=", "string_full_message_to_sign": "string", "chain": { "chain_type": "aptos", "unique_id": "aptos_mainnet", "name": "string", "native_currency_symbol": "ETH", "native_currency_name": "Ether", "blockchain_explorer": {}, "logo_url": "http://example.com", "is_testnet": true, "is_enabled": true }, "sender": { "vault": {}, "explorer_url": "http://example.com", "contact": {}, "type": "aptos", "address": "0x3300c18e7b931bdfc73dccf3e2d043ad1c9d120c777fff5aeeb9956224e5247a" } }

Predict Transaction

Request

Simulate the transaction and changes in token balances, in addition to the fee estimation.

Bodyapplication/jsonrequired
vault_idstring(uuid)required

The unique identifier of the vault.

notestring

An optional transaction note.

typestringrequired

Aptos message type.

Discriminator
Value "aptos_message"
detailsobjectrequired
curl -i -X POST \
  https://api.fordefi.com/api/v1/transactions/predict \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "vault_id": "432b199b-1f71-42bf-ba0b-33d512afa9de",
    "note": "string",
    "type": "aptos_message",
    "details": {
      "type": "personal_message_type",
      "should_include_address": true,
      "application": "string",
      "should_include_application": true,
      "chain": "aptos_mainnet",
      "should_include_chain": true,
      "message_to_sign": "SGVsbG8=",
      "nonce": "string"
    }
  }'

Responses

Successful Response

Bodyapplication/json
policy_matchobjectrequired

The policy match.

approval_requestobject

The approval request.

risksArray of objectsrequired

The list of risks associated with this transaction.

notestring

An optional transaction note.

typestringrequired

Aptos message type.

Discriminator
Value "aptos_message"
chainobjectrequired

The details of the chain that this message is on.

senderobjectrequired

The sender of the message.

aptos_message_typestringrequired

The type of the Aptos message.

Value"personal_message_type"
message_to_displaystringrequired

User-friendly formatting of the message to be signed.

Response
application/json
{ "policy_match": { "is_default": true, "rule_id": "728c1541-d6d1-4290-9a53-cdf01dd32d60", "rule_name": "string", "action_type": "allow" }, "approval_request": { "state": "created", "quorum_size": 0, "approvers": [], "approval_groups": [], "error_message": "string" }, "risks": [ {} ], "note": "string", "type": "aptos_message", "chain": { "chain_type": "aptos", "unique_id": "aptos_mainnet", "name": "string", "native_currency_symbol": "ETH", "native_currency_name": "Ether", "blockchain_explorer": {}, "logo_url": "http://example.com", "is_testnet": true, "is_enabled": true }, "sender": { "vault": {}, "explorer_url": "http://example.com", "contact": {}, "type": "aptos", "address": "0x3300c18e7b931bdfc73dccf3e2d043ad1c9d120c777fff5aeeb9956224e5247a" }, "aptos_message_type": "personal_message_type", "message_to_display": "string" }

Push Transaction

Request

Push a transaction to the chain.

Path
idstring(uuid)required

ID of the transaction to be pushed to chain.

Bodyapplication/jsonrequired
push_dataobject
curl -i -X POST \
  'https://api.fordefi.com/api/v1/transactions/{id}/push' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "push_data": {
      "type": "cosmos_transaction",
      "transaction_body": "SGVsbG8="
    }
  }'

Responses

Successful Response

Bodyapplication/json
idstring(uuid)required

The unique identifier of the object in the Fordefi platform.

created_atstring(date-time)required

The date and time when the object was created.

modified_atstring(date-time)required

The date and time when the object was last modified. Any change to any field of the resource is considered a modification.

managed_transaction_dataobject

Managed transaction data. Presented if the transaction was initiated from the Fordefi system itself, in contrast to unmanaged transactions (which are, for example, transfers of funds into a vault visible to Fordefi).

signaturesArray of objectsrequired

The transaction signatures.

notestring

An optional transaction note.

spam_statestring

automatically_set if the transaction was automatically set as spam by Fordefi, manually_set if the transaction was manually set as spam by a user, and unset if the transaction was not set as spam.

Default "unset"
Enum"unset""manually_set""automatically_set"
directionstringrequired

The direction of the transaction.

Enum"outgoing""incoming"
statestringrequired

The state of the message.

Enum"waiting_for_approval""waiting_for_signing_trigger""approved""signed""completed""error_signing""aborted"
state_changesArray of objectsrequired

The state changes of the message.

typestringrequired

Aptos message type.

Discriminator
Value "aptos_message"
aptos_message_typestringrequired

The type of the Aptos message.

Value"personal_message_type"
raw_original_message_to_signstringrequired

The original message that was requested to be signed, encoded in base64.

Example: "SGVsbG8="
string_original_message_to_signstringrequired

The original message that was requested to be signed.

raw_full_message_to_signstringrequired

The full message to be signed, encoded in base64.

Example: "SGVsbG8="
string_full_message_to_signstringrequired

The full message to be signed.

chainobjectrequired

The details of the chain that this message is on.

senderobjectrequired

The sender of the message.

Response
application/json
{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "created_at": "2019-08-24T14:15:22Z", "modified_at": "2019-08-24T14:15:22Z", "managed_transaction_data": { "created_by": {}, "aborted_by": {}, "device_signing_request": {}, "approval_request": {}, "policy_match": {}, "signer_type": "initiator", "risks": [], "error_pushing_to_blockchain_message": "string", "original_error_pushing_to_blockchain_message": "string", "vault": {}, "idempotence_id": "20a3c79f-f547-44b3-bdfc-d8aea82ad496", "has_current_user_vault_permissions": true, "batch_data": {}, "push_mode": "auto", "last_pushed_at": "2019-08-24T14:15:22Z", "sign_mode": "auto" }, "signatures": [ {} ], "note": "string", "spam_state": "unset", "direction": "outgoing", "state": "waiting_for_approval", "state_changes": [ {} ], "type": "aptos_message", "aptos_message_type": "personal_message_type", "raw_original_message_to_sign": "SGVsbG8=", "string_original_message_to_sign": "string", "raw_full_message_to_sign": "SGVsbG8=", "string_full_message_to_sign": "string", "chain": { "chain_type": "aptos", "unique_id": "aptos_mainnet", "name": "string", "native_currency_symbol": "ETH", "native_currency_name": "Ether", "blockchain_explorer": {}, "logo_url": "http://example.com", "is_testnet": true, "is_enabled": true }, "sender": { "vault": {}, "explorer_url": "http://example.com", "contact": {}, "type": "aptos", "address": "0x3300c18e7b931bdfc73dccf3e2d043ad1c9d120c777fff5aeeb9956224e5247a" } }

Update Transaction Spam State

Request

Update transaction's spam state.

Path
idstring(uuid)required

ID of the transaction to update spam state for.

Bodyapplication/jsonrequired
is_spambooleanrequired
curl -i -X PUT \
  'https://api.fordefi.com/api/v1/transactions/{id}/update-spam-state' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "is_spam": true
  }'

Responses

Successful Response

Response
No content

Trigger Transaction Signing

Request

Trigger transaction signing.

Path
idstring(uuid)required

ID of the transaction to trigger.

curl -i -X POST \
  'https://api.fordefi.com/api/v1/transactions/{id}/trigger-signing' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Successful Response

Response
No content

Batch Transactions

These endpoints allow you to manage batch transactions on the Fordefi platform.

Batch transactions are currently supported only on Solana, for the purpose of supporting the signAllTransactions flow used by certain Solana DApps. Batch transactions undergo policy evaluation as a whole: the policy is applied to a “virtual transaction” whose list of instructions is the union of the instructions of the individual transactions in the batch, and whose balance changes are the aggregation of balance changes of the individual transactions.

Operations

Vaults

These endpoints allow you to manage vaults.

A vault is the basic unit to manage funds. Each vault supports a single "chain family", such as EVM, Bitcoin, Solana, Cosmos, etc., determined by the vault's type. A vault supports all the chains within the chain family (e.g., an EVM vault supports all EVM chains).

Operations

Vault Groups

These endpoints allow you to view your vault groups.

Vault Groups are used to collectively manage policies and view permissions for a group of vaults.

The API is read-only. To manage vault groups, visit the Fordefi web console. See more info in the user guide.

Operations

Assets

These endpoints allow you to get information about the assets in your organization, including metadata, balances, and prices.

Fordefi supports native assets and fungible tokens on each of the supported blockchains, and on many chains also non-fungible tokens.

Assets are chain-specific, meaning that USDC on Ethereum is different from USDC on Polygon.

Operations

End Users

These endpoints allow you to manage WaaS end-users.

End users correspond to users of the platform who has integrated the Fordefi WaaS solution. For example, in the case of a retail platform, these would be the retail consumers of the platform.

Operations

User Groups

These endpoints allow you to view your user groups.

User Groups are used to collectively manage policies and view permissions for a group of users.

The API is read-only. To manage user groups, visit the Fordefi web console. See more info in the user guide.

Operations

Exports

These endpoints allow you to manage asynchronous actions such as data exports.

Operations

Organizations

Operations