@cardano-sdk/util-dev 0.5.0-nightly.14 → 0.5.0-nightly.16

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.
@@ -0,0 +1,6 @@
1
+ import { CML, Cardano } from '@cardano-sdk/core';
2
+ import { ManagedFreeableScope } from '@cardano-sdk/util';
3
+ export declare const createTxInput: (scope: ManagedFreeableScope, bech32TxHash?: string, index?: number) => CML.TransactionInput;
4
+ export declare const createUnspentTxOutput: (scope: ManagedFreeableScope, valueQuantities: Cardano.Value, bech32Addr?: string) => CML.TransactionUnspentOutput;
5
+ export declare const createOutput: (scope: ManagedFreeableScope, valueQuantities: Cardano.Value, bech32Addr?: string) => CML.TransactionOutput;
6
+ //# sourceMappingURL=cmlTestUtil.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cmlTestUtil.d.ts","sourceRoot":"","sources":["../../src/cmlTestUtil.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,OAAO,EAAa,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAEzD,eAAO,MAAM,aAAa,UAGf,oBAAoB,iCAEnB,MAAM,yBAQd,CAAC;AAEL,eAAO,MAAM,qBAAqB,UACzB,oBAAoB,mBACV,QAAQ,KAAK,0BAE7B,IAAI,wBAMN,CAAC;AAEF,eAAO,MAAM,YAAY,UAChB,oBAAoB,mBACV,QAAQ,KAAK,0BAE7B,IAAI,iBAMJ,CAAC"}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createOutput = exports.createUnspentTxOutput = exports.createTxInput = void 0;
4
+ const core_1 = require("@cardano-sdk/core");
5
+ exports.createTxInput = (() => {
6
+ let defaultIdx = 0;
7
+ return (scope, bech32TxHash = 'base16_1sw0vvt7mgxghdewkrsptd2n0twueg2a7q88t9cjhtqmpk7xwc07shpk2uq', index) => scope.manage(core_1.CML.TransactionInput.new(scope.manage(core_1.CML.TransactionHash.from_bech32(bech32TxHash)), scope.manage(core_1.CML.BigNum.from_str((index || defaultIdx++).toString()))));
8
+ })();
9
+ const createUnspentTxOutput = (scope, valueQuantities, bech32Addr = 'addr1vy36kffjf87vzkuyqc5g0ys3fe3pez5zvqg9r5z9q9kfrkg2cs093') => {
10
+ const address = scope.manage(core_1.CML.Address.from_bech32(bech32Addr));
11
+ const amount = core_1.coreToCml.value(scope, valueQuantities);
12
+ return scope.manage(core_1.CML.TransactionUnspentOutput.new((0, exports.createTxInput)(scope), scope.manage(core_1.CML.TransactionOutput.new(address, amount))));
13
+ };
14
+ exports.createUnspentTxOutput = createUnspentTxOutput;
15
+ const createOutput = (scope, valueQuantities, bech32Addr = 'addr1vyeljkh3vr4h9s3lyxe7g2meushk3m4nwyzdgtlg96e6mrgg8fnle') => scope.manage(core_1.CML.TransactionOutput.new(scope.manage(core_1.CML.Address.from_bech32(bech32Addr)), core_1.coreToCml.value(scope, valueQuantities)));
16
+ exports.createOutput = createOutput;
17
+ //# sourceMappingURL=cmlTestUtil.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cmlTestUtil.js","sourceRoot":"","sources":["../../src/cmlTestUtil.ts"],"names":[],"mappings":";;;AAAA,4CAA4D;AAG/C,QAAA,aAAa,GAAG,CAAC,GAAG,EAAE;IACjC,IAAI,UAAU,GAAG,CAAC,CAAC;IACnB,OAAO,CACL,KAA2B,EAC3B,YAAY,GAAG,oEAAoE,EACnF,KAAc,EACd,EAAE,CACF,KAAK,CAAC,MAAM,CACV,UAAG,CAAC,gBAAgB,CAAC,GAAG,CACtB,KAAK,CAAC,MAAM,CAAC,UAAG,CAAC,eAAe,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC,EAC3D,KAAK,CAAC,MAAM,CAAC,UAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,KAAK,IAAI,UAAU,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,CACtE,CACF,CAAC;AACN,CAAC,CAAC,EAAE,CAAC;AAEE,MAAM,qBAAqB,GAAG,CACnC,KAA2B,EAC3B,eAA8B,EAC9B,UAAU,GAAG,4DAA4D,EAC3C,EAAE;IAChC,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,CAAC,UAAG,CAAC,OAAO,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC,CAAC;IAClE,MAAM,MAAM,GAAG,gBAAS,CAAC,KAAK,CAAC,KAAK,EAAE,eAAe,CAAC,CAAC;IACvD,OAAO,KAAK,CAAC,MAAM,CACjB,UAAG,CAAC,wBAAwB,CAAC,GAAG,CAAC,IAAA,qBAAa,EAAC,KAAK,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,UAAG,CAAC,iBAAiB,CAAC,GAAG,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,CACjH,CAAC;AACJ,CAAC,CAAC;AAVW,QAAA,qBAAqB,yBAUhC;AAEK,MAAM,YAAY,GAAG,CAC1B,KAA2B,EAC3B,eAA8B,EAC9B,UAAU,GAAG,4DAA4D,EAClD,EAAE,CACzB,KAAK,CAAC,MAAM,CACV,UAAG,CAAC,iBAAiB,CAAC,GAAG,CACvB,KAAK,CAAC,MAAM,CAAC,UAAG,CAAC,OAAO,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC,EACjD,gBAAS,CAAC,KAAK,CAAC,KAAK,EAAE,eAAe,CAAC,CACxC,CACF,CAAC;AAVS,QAAA,YAAY,gBAUrB"}
@@ -1,5 +1,5 @@
1
1
  export * as AssetId from './assetId';
2
- export * as CslTestUtil from './cslTestUtil';
2
+ export * as CmlTestUtil from './cmlTestUtil';
3
3
  export * as TxTestUtil from './txTestUtil';
4
4
  export * from './TestLogger';
5
5
  export * from './util';
package/dist/cjs/index.js CHANGED
@@ -26,9 +26,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
26
26
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.TxTestUtil = exports.CslTestUtil = exports.AssetId = void 0;
29
+ exports.TxTestUtil = exports.CmlTestUtil = exports.AssetId = void 0;
30
30
  exports.AssetId = __importStar(require("./assetId"));
31
- exports.CslTestUtil = __importStar(require("./cslTestUtil"));
31
+ exports.CmlTestUtil = __importStar(require("./cmlTestUtil"));
32
32
  exports.TxTestUtil = __importStar(require("./txTestUtil"));
33
33
  __exportStar(require("./TestLogger"), exports);
34
34
  __exportStar(require("./util"), exports);