(network: string)
| 340 | } |
| 341 | |
| 342 | export function getNetworkPrefix(network: string): 'bitcoincash' | 'bchtest' | 'bchreg' { |
| 343 | switch (network) { |
| 344 | case Network.MAINNET: |
| 345 | return 'bitcoincash'; |
| 346 | case Network.TESTNET4: |
| 347 | case Network.TESTNET3: |
| 348 | case Network.CHIPNET: |
| 349 | case Network.MOCKNET: |
| 350 | return 'bchtest'; |
| 351 | case Network.REGTEST: |
| 352 | return 'bchreg'; |
| 353 | default: |
| 354 | return 'bitcoincash'; |
| 355 | } |
| 356 | } |
| 357 | |
| 358 | const randomInt = (): bigint => BigInt(Math.floor(Math.random() * 10000)); |
| 359 |
no outgoing calls
no test coverage detected