Fordefi API (0.2.0)
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:
- Person: A human user of the platform.
- API User, also commonly known as a service account. See Create an API user.
- API Signer: Used to auto-sign transactions. See Automate Signing with API Signer.
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.
Webhooks
These endpoints allow you to manually trigger your pre-configured webhooks.
Use Webhooks describes how to configure webhooks, validate them, and resend them.
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.
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
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.
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).
- Production
https://api.fordefi.com/api/v1/vaults
- curl
- Python
- JavaScript
- Go
- C#
- Payload
curl -i -X GET \
https://api.fordefi.com/api/v1/vaults \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'
{ "total": 0, "page": 0, "size": 0, "vaults": [ { … } ] }
The end user id to create a vault for.This field is required for end-user vault creation, otherwise, it's optional. If not provided, the organization's default keyset will be used.
The group to add this vault to. If not provided, the vault will be created in the Default vault group.
Additional information when creating a vault from an imported key. This field is relevant only for organizations using imported keys.
- Production
https://api.fordefi.com/api/v1/vaults
- curl
- Python
- JavaScript
- Go
- C#
- Payload
curl -i -X POST \
https://api.fordefi.com/api/v1/vaults \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"name": "string",
"end_user_id": "c5ac076e-1e7a-4f0d-9ad4-cae618230def",
"vault_group_id": "948d8050-0dde-409f-985b-6d7b133fc9e8",
"import_vault": {
"derivation_path": "m/44/60/0/0/0",
"key_id": "1e779c8a-6786-4c89-b7c3-a6666f5fd6b5"
},
"type": "aptos"
}'
Successful Response
The date and time when the object was last modified. Any change to any field of the resource is considered a modification.
Details of the vault creator.
The public key of the vault in its compressed form:
- For ECDSA and Schnorr keys, the public key is represented as 33 bytes (0x02 or 0x03 followed by the x-coordinate) according to the SEC1 standard.
- For EdDSA, the public key is represented as a 32-byte value, as defined by RFC 8032.
The user who owns the keyset of the vault. If not provided, the vault is owned by the organization.
Aptos vault type.
- aptos
- black_box
- cosmos
- evm
- exchange
- solana
- stacks
- starknet
- sui
- ton
- tron
- utxo
{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "created_at": "2019-08-24T14:15:22Z", "modified_at": "2019-08-24T14:15:22Z", "metadata": { "property1": [ … ], "property2": [ … ] }, "name": "string", "created_by": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "user_type": "person", "name": "John Doe", "email": "string", "state": "active", "role": "admin" }, "vault_group": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "vault_count": 0, "can_current_user_create_or_edit_vaults": true }, "pending_vault_group_action": { "type": "add", "vault_group_id": "948d8050-0dde-409f-985b-6d7b133fc9e8", "vault_group_name": "string" }, "state": "active", "public_key_compressed": "SGVsbG8=", "derivation_info": { "derivation_path": "m/44/60/0/0/0", "master_public_key": { … } }, "key_holder": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "user_type": "end_user", "external_id": "user|1234", "state": "active" }, "origin_type": "native", "type": "aptos", "address": "0x3300c18e7b931bdfc73dccf3e2d043ad1c9d120c777fff5aeeb9956224e5247a" }
- Production
https://api.fordefi.com/api/v1/vaults/export
- curl
- Python
- JavaScript
- Go
- C#
- Payload
curl -i -X GET \
https://api.fordefi.com/api/v1/vaults/export \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'
- Production
https://api.fordefi.com/api/v1/vaults/{id}
- curl
- Python
- JavaScript
- Go
- C#
- Payload
curl -i -X GET \
'https://api.fordefi.com/api/v1/vaults/{id}' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'
Successful Response
The date and time when the object was last modified. Any change to any field of the resource is considered a modification.
Details of the vault creator.
The public key of the vault in its compressed form:
- For ECDSA and Schnorr keys, the public key is represented as 33 bytes (0x02 or 0x03 followed by the x-coordinate) according to the SEC1 standard.
- For EdDSA, the public key is represented as a 32-byte value, as defined by RFC 8032.
The user who owns the keyset of the vault. If not provided, the vault is owned by the organization.
Aptos vault type.
- aptos
- black_box
- cosmos
- evm
- exchange
- solana
- stacks
- starknet
- sui
- ton
- tron
- utxo
{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "created_at": "2019-08-24T14:15:22Z", "modified_at": "2019-08-24T14:15:22Z", "metadata": { "property1": [ … ], "property2": [ … ] }, "name": "string", "created_by": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "user_type": "person", "name": "John Doe", "email": "string", "state": "active", "role": "admin" }, "vault_group": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "vault_count": 0, "can_current_user_create_or_edit_vaults": true }, "pending_vault_group_action": { "type": "add", "vault_group_id": "948d8050-0dde-409f-985b-6d7b133fc9e8", "vault_group_name": "string" }, "state": "active", "public_key_compressed": "SGVsbG8=", "derivation_info": { "derivation_path": "m/44/60/0/0/0", "master_public_key": { … } }, "key_holder": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "user_type": "end_user", "external_id": "user|1234", "state": "active" }, "origin_type": "native", "type": "aptos", "address": "0x3300c18e7b931bdfc73dccf3e2d043ad1c9d120c777fff5aeeb9956224e5247a" }
- Production
https://api.fordefi.com/api/v1/vaults/{id}/assets/{asset_id}
- curl
- Python
- JavaScript
- Go
- C#
- Payload
curl -i -X GET \
'https://api.fordefi.com/api/v1/vaults/{id}/assets/{asset_id}' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'
{ "priced_asset": { "type": "asset_price", "asset_info": { … }, "price": { … } }, "balances": { "total_mined": "1000000000000000000", "total_pending_incoming": "1000000000000000000", "mined": "1000000000000000000", "pending_incoming": "1000000000000000000", "frozen_mined": "1000000000000000000", "frozen_pending_incoming": "1000000000000000000" } }
- Production
https://api.fordefi.com/api/v1/vaults/{id}/assets
- curl
- Python
- JavaScript
- Go
- C#
- Payload
curl -i -X GET \
'https://api.fordefi.com/api/v1/vaults/{id}/assets' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'
{ "total": 0, "page": 0, "size": 0, "owned_assets": [ { … } ] }
- Production
https://api.fordefi.com/api/v1/vaults/{id}/archive
- curl
- Python
- JavaScript
- Go
- C#
- Payload
curl -i -X POST \
'https://api.fordefi.com/api/v1/vaults/{id}/archive' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'
- Production
https://api.fordefi.com/api/v1/vaults/{id}/restore
- curl
- Python
- JavaScript
- Go
- C#
- Payload
curl -i -X POST \
'https://api.fordefi.com/api/v1/vaults/{id}/restore' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'
- Production
https://api.fordefi.com/api/v1/vaults/{id}/addresses
- curl
- Python
- JavaScript
- Go
- C#
- Payload
curl -i -X POST \
'https://api.fordefi.com/api/v1/vaults/{id}/addresses' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"name": "string",
"address_type": "legacy",
"import_address": {
"derivation_path": "m/44/60/0/0/0"
}
}'
{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "created_at": "2019-08-24T14:15:22Z", "modified_at": "2019-08-24T14:15:22Z", "vault": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "vault_group_id": "948d8050-0dde-409f-985b-6d7b133fc9e8", "name": "string", "address": "string", "state": "active", "type": "aptos", "logo_url": "http://example.com", "end_user": { … } }, "name": "string", "public_key_compressed": "SGVsbG8=", "derivation_path": "m/44/60/0/0/0", "type": "utxo", "address": { "address": "bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq", "address_type": "legacy", "chain": { … } } }
- Production
https://api.fordefi.com/api/v1/vaults/addresses/{id}/name
- curl
- Python
- JavaScript
- Go
- C#
- Payload
curl -i -X PUT \
'https://api.fordefi.com/api/v1/vaults/addresses/{id}/name' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"name": "string"
}'
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.
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.
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.