Target Canisters
3rd party application MUST set an array of target canisters to which delegation identity will make authenticated calls without user approvals. These canisters SHOULD be under the 3rd party application’s control, otherwise the developer opens a trust assumption that other canister controllers won’t carry out drain attacks on their shared pool of users.
Rust Implementation
Each target canister that wallet providers will query (as an update call for secure consensus)
should have method icrc28_trusted_origins()
:
#[derive(Clone, Debug, CandidType, Deserialize)]
pub struct Icrc28TrustedOriginsResponse {
pub trusted_origins: Vec<String>
}
#[update]
fn icrc28_trusted_origins() -> Icrc28TrustedOriginsResponse {
let trusted_origins = vec![
String::from("dscvr.one") // to be replaced with application's frontend origin(s)
];
return Icrc28TrustedOriginsResponse { trusted_origins }
}
Note: ICRC-1, ICRC-7, and other asset canister smart contracts are discouraged from implementing this method. Wallets may mark application as a scam if they do.