BunkerGateOptions
Defined in: judge.ts:132
Options for bunkerGate.
Extends
Section titled “Extends”Type Parameters
Section titled “Type Parameters”R extends BunkerRequest = BunkerRequest
Properties
Section titled “Properties”isFullSweep?
Section titled “isFullSweep?”
optionalisFullSweep?: (request) =>boolean|Promise<boolean>
Defined in: judge.ts:71
Does this send move the whole balance of its asset? A partial send exposes the key and leaves
the rest behind it. Without this check every send is a partial-spend.
Parameters
Section titled “Parameters”request
Section titled “request”R
Returns
Section titled “Returns”boolean | Promise<boolean>
Inherited from
Section titled “Inherited from”BunkerJudgeOptions.isFullSweep
isSealedDestination?
Section titled “isSealedDestination?”
optionalisSealedDestination?: (chain,address) =>boolean|Promise<boolean>
Defined in: judge.ts:66
Is address a sealed address of this wallet: derived from the same seed, never used on-chain
and absent from the ledger? Use nextSealedIndex to pick one, or a vault address.
Without it no address counts as sealed: every send of a protected account breaks
unsealed-destination (refused in enforce, reported in warn). An app that only warns can leave it out.
Parameters
Section titled “Parameters”string
address
Section titled “address”string
Returns
Section titled “Returns”boolean | Promise<boolean>
Inherited from
Section titled “Inherited from”BunkerJudgeOptions.isSealedDestination
ledgerFailure?
Section titled “ledgerFailure?”
optionalledgerFailure?:"refuse"|"continue"
Defined in: judge.ts:144
When the ledger cannot be saved for a request the rules do not guard (an account that is not protected, or
warn mode): refuse (default) signs nothing; continue tells BunkerGateOptions.onLedgerError and
lets it go on. A protected account in enforce mode is always refused.
optionalmode?:"enforce"|"warn"
Defined in: judge.ts:136
enforce (default) refuses. warn calls BunkerGateOptions.onWarning and lets the request go on.
optionalnow?: () =>number
Defined in: judge.ts:148
Clock, for tests.
Returns
Section titled “Returns”number
onLedgerError?
Section titled “onLedgerError?”
optionalonLedgerError?: (error,request) =>void|Promise<void>
Defined in: judge.ts:146
ledgerFailure: 'continue': told what the storage threw, before the request goes on.
Parameters
Section titled “Parameters”unknown
request
Section titled “request”R
Returns
Section titled “Returns”void | Promise<void>
onWarning?
Section titled “onWarning?”
optionalonWarning?: (rule,message,request) =>void|Promise<void>
Defined in: judge.ts:138
warn mode: told what enforce would have refused.
Parameters
Section titled “Parameters”message
Section titled “message”string
request
Section titled “request”R
Returns
Section titled “Returns”void | Promise<void>
protect
Section titled “protect”protect: (
request) =>boolean|Promise<boolean>
Defined in: judge.ts:134
Is the account behind this request in the bunker? The app decides who is (by balance, by user choice).
Parameters
Section titled “Parameters”request
Section titled “request”R
Returns
Section titled “Returns”boolean | Promise<boolean>