import QurasLib, {settings} from 'quras-js' // Semantic access const newNet = new QurasLib.rpc.Network({name:'NewNet'}) QurasLib.add.network(newNet) // Direct access QurasLib.settings.httpsOnly = true
import QurasLib, {settings} from 'quras-js' // Semantic access const newNet = new QurasLib.rpc.Network({name:'NewNet'}) QurasLib.add.network(newNet) // Direct access QurasLib.settings.httpsOnly = true
boolean
Affects the results of getRPCEndpoint
from qurasDB and qurasIO. If set to true
, getRPCEndpoint
will only return https nodes. If there are no available nodes, it will cause the method to throw an error instead.
{[network:string]: Network}
quras-js
モジュールが提供する標準networkは MainNet
と TestNet
がある。
またaddNetworkとremoveNetwork関数を利用してNetworkを追加することもできるし、削除することもできる。
const customMainNet = Network('MainNet') // This overrides the existing MainNet with your custom configuration settings.addNetwork(customMainNet, ) settings.removeNetwork('TestNet')
{[category: string]: number}
This contains the timeouts set for the different network categories. There are currently 2 categories available: ping
and rpc
.
(assetBalance: AssetBalance, requiredAmt: Fixed8) => Coin[]
The default strategy to use when calculating the inputs used. You can find the different strategies available at tx.calculationStrategy
. The default setting is balancedApproach
which naively tries to find a good mix of inputs.