Skip to main content

Filecoin (FIL)

Sign Filecoin Lotus Messages. The app builds a complete message (nonce, gas, value in attoFIL) and the device signs it with its BLS or secp256k1 key by keyPath.

FieldValue
FamilyFilecoin
coinType461
keyPathm/44'/461'/<accountIdx>'/0/0
amount unitattoFIL (1 FIL = 1e18)
chainIdfil:f/slip44:461

Supported Methods

MethodSupported
getAddress
signTransaction
signMessage
signTypedData

Requirements

Minimum firmware for each method. The two models are on different version lines, so DCENT Biometric Wallet and DCENT X are listed separately (the numbers are not comparable across models). Below this the request returns the firmware-update error (5005) and the bridge prompts to update.

MethodDCENT Biometric WalletDCENT X
getAddress2.33.0 or higher1.0.0 or higher
signTransaction2.33.0 or higher1.0.0 or higher

getAddress — account address

Retrieves the Filecoin account address for a chainId + keyPath. Returns an f1 (secp256k1) or f3 (BLS) address matching the key type derived at the keyPath. Call this before building a message so from matches the device account.

FieldTypeRequiredSourceNotes
chainIdstringRequiredAppAlways fil:f/slip44:461
keyPathstringRequiredAppBIP-44 path; default m/44'/461'/0'/0/0

Request

await dcent.getAddress({
chainId: 'fil:f/slip44:461',
keyPath: "m/44'/461'/0'/0/0"
})

Response

FieldTypeNotes
body.parameter.addressstringFilecoin address — f1 (secp256k1) or f3 (BLS), matching the key derived at keyPath
body.commandstring"getAddress"
header.statusstring"success" on completion
{
"header": {
"version": "1.0",
"status": "success"
},
"body": {
"command": "getAddress",
"parameter": {
"address": "f1…"
}
}
}

signTransaction — Lotus Message

payload.transaction:

{
"to": "f1aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaahaui6xa",
"from": "f1aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaahaui6xa",
"nonce": 0,
"value": "1000000000000000000",
"gasLimit": 500000,
"gasFeeCap": "100000",
"gasPremium": "100000",
"method": 0,
"params": ""
}
FieldTypeRequiredSourceNotes
tostringRequired-RealAppRecipient address (f1/f3)
fromstringRequired-RealWalletMust be the device account for this keyPath
noncenumberRequired-RealAppReal, current account nonce — the app must supply it; not auto-filled
valuestringRequiredAppattoFIL; "1000000000000000000" = 1 FIL
gasLimitnumberRequiredRPCFrom GasEstimateMessageGas
gasFeeCapstringRequiredRPCattoFIL per gas unit (max)
gasPremiumstringRequiredRPCattoFIL tip per gas unit
methodnumberRequiredApp0 = plain transfer
paramsstringOptionalAppbase64 actor params; "" for method 0

Request

await dcent.sign({
method: 'signTransaction',
chainId: 'fil:f/slip44:461',
payload: {
keyPath: "m/44'/461'/0'/0/0",
transaction: {
to: 'f1aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaahaui6xa',
from: 'f1aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaahaui6xa',
nonce: 0,
value: '1000000000000000000',
gasLimit: 500000,
gasFeeCap: '100000',
gasPremium: '100000',
method: 0,
params: ''
}
}
})

Response

FieldTypeNotes
body.parameter.signaturestringBroadcast-ready signed Lotus Message for Filecoin — the CBOR-serialized message plus its signature envelope (f1 secp256k1 or f3 BLS), not a bare signature. Submit it via MpoolPush.
body.commandstring"signTransaction"
header.statusstring"success" on completion
{
"header": {
"version": "1.0",
"status": "success"
},
"body": {
"command": "signTransaction",
"parameter": {
"signature": "<signed Lotus Message + signature>"
}
}
}
info

The device signs the CBOR-serialized message body. The from address kind (f1 = secp256k1, f3 = BLS) must match the key derived at keyPath.

Common Mistakes

danger

Amounts not in attoFILvalue/gasFeeCap/gasPremium are attoFIL strings; 1 FIL = 1e18. Wrong address kind for keyPath — an f3 (BLS) from needs the BLS key; mixing with a secp256k1 path is rejected. Stale nonce / underestimated gas — refresh nonce and the gas* fields from a live node right before signing. Non-empty params with method: 0 — plain transfers must use method 0 and params "".