BSV blockchainBSV blockchain

SDK default values

Look up what @bsv/sdk, @bsv/simple and @bsv/wallet-toolbox do when you leave a setting out. This page was written against @bsv/sdk 4.0.1, @bsv/simple 0.7.2 and @bsv/wallet-toolbox 2.15.1, so check the values against your installed versions.

Default fee rate

The fee() method of a transaction takes a fee model, or a number to pay a fixed fee in satoshis (1 satoshi is 0.00000001 BSV). The table shows what @bsv/sdk uses when you pass neither.

SettingDefaultNotes
Fee model of tx.fee()LivePolicyReads the rate from the policy of the ARCThe service that receives your transaction and passes it to miners at GorillaPool, https://arc.gorillapool.io/v1/policy. @bsv/sdk 1.8.0 and later. In 1.7.7 and earlier the default was new SatoshisPerKilobyte(1), 1 satoshi per kilobyte
Rate cache5 minutesPass new LivePolicy(cacheValidityMs) to fee() to change it
Rate when the request fails100 satoshis per kilobyteUsed only when the request fails and no earlier rate is cached. The SDK logs a warning
new SatoshisPerKilobyte(value)noneThe constructor throws without a value

Input sequence number

An input added to a transaction without a sequence gets 0xffffffff (4294967295), the final value. Set sequence on the input when your script depends on it.

Network and storage

@bsv/simple and the wallet-toolbox choose a network and a storage server for you.

With @bsv/simple, the defaults describe a Mainnet wallet. For testnet, pass the network and a storage URL for testnet in the code you run, as the examples in this documentation do. The SDK overview shows both for a ServerWallet.

PackageSettingDefault
@bsv/simplenetworkmain
@bsv/simplestorageUrl of ServerWallethttps://storage.babbage.systems
@bsv/simplemessageBoxHosthttps://messagebox.babbage.systems
@bsv/simpletokenBasket, tokenProtocolID, tokenKeyIDtokens, [0, "token"], "1"
@bsv/wallet-toolboxstorageUrl of Setup on mainhttps://storage.babbage.systems
@bsv/wallet-toolboxstorageUrl of Setup on any other chainhttps://staging-storage.babbage.systems

Broadcasting

The wallet-toolbox Services class sends a transaction to its broadcasters in order and stops at the first one that accepts it. The order depends on the chain:

ChainBroadcasters, in orderARC URL
mainGorillaPool ARC, Taal ARC, Bitails, WhatsOnChainhttps://arc.taal.com and https://arc.gorillapool.io
testTaal ARC, Bitails, WhatsOnChainhttps://arc-test.taal.com
ttnBSV Broadcaster onlynone

On main and test, BSV Broadcaster is not set, and it goes first when you pass its URL.

SettingDefault
Broadcast modeUntilSuccess
Time limit for each broadcaster5000 ms, plus 50 ms for each KiB of data sent, up to 30000 ms
Update of the BitcoinSV (BSV) priceevery 15 minutes
Update of fiat exchange ratesevery 24 hours

To learn more about fees, networks and broadcasting on the BSV blockchain, review these articles: