authorization Required
Checks whether the issuer of a regulated asset has the auth_required and auth_revocable flags set on their account.
Both flags must be set for an asset to be properly configured as a regulated asset per SEP-8. The auth_required flag ensures all trustlines must be approved, and the auth_revocable flag allows the issuer to revoke authorization when needed.
Return
true if both auth_required and auth_revocable are set, false otherwise
Parameters
asset
The regulated asset to check
Throws
If the issuer account does not exist on the network
On network errors
Example:
val asset = sep08.regulatedAssets.first()
if (sep08.authorizationRequired(asset)) {
println("${asset.code} requires transaction approval")
} else {
println("${asset.code} issuer flags not properly configured for SEP-8")
}Content copied to clipboard