I am trying to check for various currencies, if they have set the master weight of the source account below the medium threshold of the source account.

According to the documentation that would mean that the source account can no longer issue currency. ( Example 5 here )

For example I would like to check the following issuer:


What are the steps that I need to follow?

Do i need first to find the source account of this issuer and then look for a set option operation, or how exactly does it work?

Thank you.

1 Answer 1


Here is sample code (for JavaScript SDK) to check the basic scenario.

//initialize Horizon server API wrapper
let horizon = new StellarSdk.Server('https://horizon.stellar.org');
//we are going to use Stellar Public network

//retrieve recent account information from Horizon
    .then(account => {
        const {high_threshold, med_threshold, low_threshold} = account.thresholds

        //calculate the sum of all signers weights
        let totalSignersWeight = account.signers.reduce((res, signer) => res + signer.weight, 0)

        //compare it with med_threshold and high_threshold
        if (totalSignersWeight >= med_threshold || totalSignersWeight >= high_threshold) {
            alert('Account is not locked')            
        } else if (totalSignersWeight >= low_threshold && account.flags.auth_required) {
            alert('Account is locked for issuing, but can authorize trustlines')
        } else {
            alert('Account is locked')
  • Thank you, I had not completely understood the concept, now it makes sense.
    – S tz
    Commented Jun 26, 2018 at 17:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.