[SNIP] Deployment interface between DApps and wallets

In line with the StarkNet community’s discussions on standardizing wallet connections with Write API and JSON-RPC integration, the interface might be more suitably defined as a request method, similar to the request function in Ethereum’s API. This could look something like:

interface StarkNetDeploymentInterface {
    request(method: 'wallet_deploymentData', params?: never): Promise<GetDeploymentDataResult>;
}

interface GetDeploymentDataResult {
    address: string; // Represented as 'felt252'
    class_hash: string; // Represented as 'felt252'
    salt: string; // Represented as 'felt252'
    calldata: string[]; // Array of 'felt252', length := calldata_len
}

// possible errors:
Error("No account selected")

Additionally to moving the method into request, I would also suggest to drop the calldata_len field, and rely on the calldata array length.I would also add a field called address containing the expected address where the account should be deployed. This can be used to double check calculated addresses, or to make sure that these are the deployment parameters for the expected account.