cashscript 0.8.1 → 0.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,4 @@
1
+ import bip68 from 'bip68';
1
2
  import { hexToBin, binToHex, encodeTransaction, decodeTransaction, } from '@bitauth/libauth';
2
3
  import delay from 'delay';
3
4
  import { hash256, placeholder, scriptToBytecode, } from '@cashscript/utils';
@@ -6,7 +7,6 @@ import { isSignableUtxo, } from './interfaces.js';
6
7
  import { meep, createInputScript, getInputSize, createOpReturnOutput, getTxSizeWithoutInputs, getPreimageSize, buildError, createSighashPreimage, validateRecipient, utxoComparator, cashScriptOutputToLibauthOutput, calculateDust, getOutputSize, addressToLockScript, publicKeyToP2PKHLockingBytecode, utxoTokenComparator, } from './utils.js';
7
8
  import SignatureTemplate from './SignatureTemplate.js';
8
9
  import { P2PKH_INPUT_SIZE } from './constants.js';
9
- const bip68 = await import('bip68');
10
10
  export class Transaction {
11
11
  constructor(address, provider, redeemScript, abiFunction, args, selector) {
12
12
  this.address = address;
@@ -1,4 +1,4 @@
1
- const { default: RpcClientRetry } = await import('bitcoin-rpc-promise-retry');
1
+ import RpcClientRetry from 'bitcoin-rpc-promise-retry';
2
2
  export default class BitcoinRpcNetworkProvider {
3
3
  constructor(network, url, opts) {
4
4
  this.network = network;
@@ -1,4 +1,4 @@
1
- import { ElectrumCluster } from 'electrum-cash';
1
+ import { ElectrumCluster, RequestResponse } from 'electrum-cash';
2
2
  import { Utxo, Network } from '../interfaces.js';
3
3
  import NetworkProvider from './NetworkProvider.js';
4
4
  export default class ElectrumNetworkProvider implements NetworkProvider {
@@ -13,7 +13,7 @@ export default class ElectrumNetworkProvider implements NetworkProvider {
13
13
  sendRawTransaction(txHex: string): Promise<string>;
14
14
  connectCluster(): Promise<void[]>;
15
15
  disconnectCluster(): Promise<boolean[]>;
16
- private performRequest;
16
+ performRequest(name: string, ...parameters: (string | number | boolean)[]): Promise<RequestResponse>;
17
17
  private shouldConnect;
18
18
  private shouldDisconnect;
19
19
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cashscript",
3
- "version": "0.8.1",
3
+ "version": "0.8.2",
4
4
  "description": "Easily write and interact with Bitcoin Cash contracts",
5
5
  "keywords": [
6
6
  "bitcoin cash",
@@ -44,7 +44,7 @@
44
44
  },
45
45
  "dependencies": {
46
46
  "@bitauth/libauth": "^2.0.0-alpha.8",
47
- "@cashscript/utils": "^0.8.1",
47
+ "@cashscript/utils": "^0.8.2",
48
48
  "bip68": "^1.0.4",
49
49
  "bitcoin-rpc-promise-retry": "^1.3.0",
50
50
  "delay": "^5.0.0",
@@ -59,5 +59,5 @@
59
59
  "jest": "^29.4.1",
60
60
  "typescript": "^4.1.5"
61
61
  },
62
- "gitHead": "a70a5a57a938bc81fdf4180b1451cfcc0ff0214b"
62
+ "gitHead": "3a9c17952da919b523ff5b922a4724cb370fc83d"
63
63
  }