Hi there,
I have an issuer with my Asset, and 4 distributors.
Once I have sent coins to each distributor, I need to lock issuer (w:0), for this, I try 2 methods:
1/ I lock my isssuer with this options:
let options = StellarSDK.Operation.setOptions({
masterWeight: 0,
lowThreshold: 1,
medThreshold: 1,
highThreshold: 1,
})
let result = submitOperation(issuingAccount, issuingSecret, options)
This method works
2/ I try another solution
let options = StellarSDK.Operation.setOptions({
signer: {
ed25519PublicKey: issuingAccount.accountId(),
weight: 0,
},
})
let result = submitOperation(issuingAccount, issuingSecret, options)
This method don't work (I have an error), I can't seem to lock myself
The problem with the 1st solution, now every time the distributor has to send payments to each new wallet, I need to establish a trustline between the new wallet and the issuer, the problem is the issuer (or the distributor) can't establish this trustline (I get a tx_bad_seq error), because my issuer account is locked.
let allowTrust = StellarSDK.Operation.setTrustLineFlags({
trustor: newWalletAccountId,
asset: asset,
flags: {
authorized: true,
},
})
/*let allowTrust = StellarSDK.Operation.allowTrust({
trustor: newWalletAccountId,
assetCode: asset.code,
authorize: authorize,
})*/
let result = await this._submitOperation(
allowTrust,
issuingAccount,
issuingSecret
)
I have been looking for several hours, but there is certainly something I have missed. If you have any suggestions?
Thanks