Function: explainApproveRefusal()
explainApproveRefusal(
client,tx,options):Promise<RefusalExplanation>
Defined in: @meddleware/sealed-storage-client/src/refusal.ts:85
Simulate the approve transaction tx as sender and say why a decrypt would be refused.
Call it AFTER a decrypt failed with NoAccessError / InvalidParameterError (or whenever the app wants the reason up front); it is one simulateTransaction RPC and is never called by the library on its own. It spends nothing and signs nothing. It does not throw: a refusal is a result, and an error while simulating (network, a node that rejects the build) is returned as kind: 'unknown' with the error as cause.
Pass policyPackageIds (the policy package's original id and published-at) so an abort from another package's module of the same name is not named as a sealed_storage abort.
Parameters
client
tx
Transaction
options
policyPackageIds?
readonly string[]
sender
string
Returns
Promise<RefusalExplanation>