https://api.fordefi.com/
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:
The Users API is currently read-only. To add/remove users, visit the Fordefi web console.
These endpoints allow you to manually trigger your pre-configured webhooks.
Use Webhooks describes how to configure webhooks, validate them, and resend them.
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.
These endpoints allow you to manage transactions on the Fordefi platform.
A transaction represents an operation that can be one of the following:
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.
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.
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.
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.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.https://api.fordefi.com/api/v1/batch-transactions
curl -i -X POST \
https://api.fordefi.com/api/v1/batch-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": "solana_transaction",
"details": {
"type": "solana_raw_transaction",
"fail_on_prediction_failure": true,
"push_mode": "auto",
"fee": {
"type": "custom",
"priority_fee": "1000000000000000000"
},
"skip_prediction": false,
"chain": "solana_mainnet",
"transactions": [
{
"version": "legacy",
"instructions": [
{
"program_index": 0,
"data": "SGVsbG8=",
"account_indexes": [
0
]
}
],
"accounts": [
{
"address": "4fYNw3dojWmQ4dXtSGE9epjRGy9pFSx62YypT7avPYvA",
"writable": true,
"signer": true,
"ephemeral_key": "lnNyP8kFPEaVpvUo/SIlhdZlzhPU8r7yT/h0gG5ajzQ="
}
],
"address_table_lookups": [
{
"account_key": "4fYNw3dojWmQ4dXtSGE9epjRGy9pFSx62YypT7avPYvA",
"writable_indexes": [
0
],
"readonly_indexes": [
0
]
}
],
"signatures": [
{
"data": "SGVsbG8="
}
],
"recent_blockhash": "4sGjMW1sUnHzSxGspuhpqLDx6wiyjNtZAMdL4VZHirAn"
}
]
}
}'
{ "batch_id": "4da22c97-b7d5-4e31-8c3a-03870ebc7b20", "transactions": [ { … } ] }
https://api.fordefi.com/api/v1/batch-transactions/predict
curl -i -X POST \
https://api.fordefi.com/api/v1/batch-transactions/predict \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"vault_id": "432b199b-1f71-42bf-ba0b-33d512afa9de",
"note": "string",
"type": "solana_transaction",
"details": {
"type": "solana_raw_transaction",
"fail_on_prediction_failure": true,
"skip_simulation": false,
"fee": {
"type": "custom",
"priority_fee": "1000000000000000000"
},
"chain": "solana_mainnet",
"transactions": [
{
"version": "legacy",
"instructions": [
{
"program_index": 0,
"data": "SGVsbG8=",
"account_indexes": [
0
]
}
],
"accounts": [
{
"address": "4fYNw3dojWmQ4dXtSGE9epjRGy9pFSx62YypT7avPYvA",
"writable": true,
"signer": true,
"ephemeral_key": "lnNyP8kFPEaVpvUo/SIlhdZlzhPU8r7yT/h0gG5ajzQ="
}
],
"address_table_lookups": [
{
"account_key": "4fYNw3dojWmQ4dXtSGE9epjRGy9pFSx62YypT7avPYvA",
"writable_indexes": [
0
],
"readonly_indexes": [
0
]
}
],
"signatures": [
{
"data": "SGVsbG8="
}
],
"recent_blockhash": "4sGjMW1sUnHzSxGspuhpqLDx6wiyjNtZAMdL4VZHirAn"
}
]
}
}'
{ "aml_policy_match": { "is_default": true, "rule_id": "728c1541-d6d1-4290-9a53-cdf01dd32d60", "rule_name": "string", "action_type": "allow" }, "policy_match": { "is_default": true, "rule_id": "728c1541-d6d1-4290-9a53-cdf01dd32d60", "rule_name": "string", "action_type": "allow" }, "approval_request": { "state": "created", "required_groups": 0, "approval_groups": [ … ], "error_message": "string" }, "risks": [ { … } ], "note": "string", "aml_results": { "scan_status": "error", "error_message": "string", "scan_results": { … } }, "type": "solana_transaction", "expected_result": { "reversion": { … }, "transaction_error": "string", "fee": "1000000000000000000", "enriched_fee": { … }, "effects": { … }, "instruction_error": { … } }, "chain": { "chain_type": "solana", "unique_id": "solana_mainnet", "name": "string", "native_currency_symbol": "ETH", "native_currency_name": "Ether", "blockchain_explorer": { … }, "logo_url": "http://example.com", "is_testnet": true, "is_enabled": true }, "simulation_status_result": { "simulation_status": "success", "details": "string" }, "solana_transaction_type_details": { "type": "native_transfer", "direction": "outgoing", "sender": { … }, "recipient": { … }, "is_internal": true }, "sender": { "vault": { … }, "explorer_url": "http://example.com", "contact": { … }, "type": "solana", "address": "4fYNw3dojWmQ4dXtSGE9epjRGy9pFSx62YypT7avPYvA", "contract": { … } }, "suggested_fees": { "type": "solana", "chain_unique_id": "solana_mainnet", "base_fee": "1000000000000000000", "low": "1000000000000000000", "medium": "1000000000000000000", "high": "1000000000000000000" }, "instructions": [ { … } ], "raw_transaction": "SGVsbG8=", "was_fee_set_in_request": true }
https://api.fordefi.com/api/v1/batch-transactions/{batch_id}/abort
curl -i -X POST \
'https://api.fordefi.com/api/v1/batch-transactions/{batch_id}/abort' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'
https://api.fordefi.com/api/v1/batch-transactions/{batch_id}/approve
curl -i -X POST \
'https://api.fordefi.com/api/v1/batch-transactions/{batch_id}/approve' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'
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).
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.
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.
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.