Using the SDK and making very basic payments from one wallet to another with a digital asset. The issue is that every transaction that is made takes 6 seconds from call to response from the SDK. Anyone have some insight as to why this could be? The network can process 1000-5000 transactions per second so really confused on why we are encountering the long response times. Code example below.
async transfer(asset: StellarSDK.Asset, fromPubKey: string, fromSecretKey: string, toPubKey: string, amount: string): Promise<StellarSDK.Horizon.SubmitTransactionResponse> {
const server = this._createServer()
const res = await server.loadAccount(fromPubKey)
const seqId = res.sequenceNumber().toString()
const issuer = new StellarSDK.Account(fromPubKey, seqId)
const tx = new StellarSDK.TransactionBuilder(issuer, {
fee: StellarSDK.BASE_FEE,
networkPassphrase: this.networkPassphrase
})
.addOperation(StellarSDK.Operation.payment({
destination: toPubKey,
asset: asset,
amount
}))
.setTimeout(WAITING_TIME)
.build()
tx.sign(StellarSDK.Keypair.fromSecret(fromSecretKey))
return this._submitTx(tx)
}