@cardano-sdk/util-dev 0.5.0-nightly.13 → 0.5.0-nightly.15
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.
- package/dist/cjs/cslTestUtil.d.ts +4 -3
- package/dist/cjs/cslTestUtil.d.ts.map +1 -1
- package/dist/cjs/cslTestUtil.js +6 -6
- package/dist/cjs/cslTestUtil.js.map +1 -1
- package/dist/cjs/tsconfig.tsbuildinfo +1 -1
- package/dist/esm/cslTestUtil.d.ts +4 -3
- package/dist/esm/cslTestUtil.d.ts.map +1 -1
- package/dist/esm/cslTestUtil.js +6 -6
- package/dist/esm/cslTestUtil.js.map +1 -1
- package/dist/esm/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -3
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CSL, Cardano } from '@cardano-sdk/core';
|
|
2
|
-
|
|
3
|
-
export declare const
|
|
4
|
-
export declare const
|
|
2
|
+
import { ManagedFreeableScope } from '@cardano-sdk/util';
|
|
3
|
+
export declare const createTxInput: (scope: ManagedFreeableScope, bech32TxHash?: string, index?: number) => CSL.TransactionInput;
|
|
4
|
+
export declare const createUnspentTxOutput: (scope: ManagedFreeableScope, valueQuantities: Cardano.Value, bech32Addr?: string) => CSL.TransactionUnspentOutput;
|
|
5
|
+
export declare const createOutput: (scope: ManagedFreeableScope, valueQuantities: Cardano.Value, bech32Addr?: string) => CSL.TransactionOutput;
|
|
5
6
|
//# sourceMappingURL=cslTestUtil.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cslTestUtil.d.ts","sourceRoot":"","sources":["../../src/cslTestUtil.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,OAAO,EAAa,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"cslTestUtil.d.ts","sourceRoot":"","sources":["../../src/cslTestUtil.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,yBAKd,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"}
|
package/dist/cjs/cslTestUtil.js
CHANGED
|
@@ -4,14 +4,14 @@ exports.createOutput = exports.createUnspentTxOutput = exports.createTxInput = v
|
|
|
4
4
|
const core_1 = require("@cardano-sdk/core");
|
|
5
5
|
exports.createTxInput = (() => {
|
|
6
6
|
let defaultIdx = 0;
|
|
7
|
-
return (bech32TxHash = 'base16_1sw0vvt7mgxghdewkrsptd2n0twueg2a7q88t9cjhtqmpk7xwc07shpk2uq', index) => core_1.CSL.TransactionInput.new(core_1.CSL.TransactionHash.from_bech32(bech32TxHash), index || defaultIdx++);
|
|
7
|
+
return (scope, bech32TxHash = 'base16_1sw0vvt7mgxghdewkrsptd2n0twueg2a7q88t9cjhtqmpk7xwc07shpk2uq', index) => scope.manage(core_1.CSL.TransactionInput.new(scope.manage(core_1.CSL.TransactionHash.from_bech32(bech32TxHash)), index || defaultIdx++));
|
|
8
8
|
})();
|
|
9
|
-
const createUnspentTxOutput = (valueQuantities, bech32Addr = 'addr1vy36kffjf87vzkuyqc5g0ys3fe3pez5zvqg9r5z9q9kfrkg2cs093') => {
|
|
10
|
-
const address = core_1.CSL.Address.from_bech32(bech32Addr);
|
|
11
|
-
const amount = core_1.coreToCsl.value(valueQuantities);
|
|
12
|
-
return core_1.CSL.TransactionUnspentOutput.new((0, exports.createTxInput)(), core_1.CSL.TransactionOutput.new(address, amount));
|
|
9
|
+
const createUnspentTxOutput = (scope, valueQuantities, bech32Addr = 'addr1vy36kffjf87vzkuyqc5g0ys3fe3pez5zvqg9r5z9q9kfrkg2cs093') => {
|
|
10
|
+
const address = scope.manage(core_1.CSL.Address.from_bech32(bech32Addr));
|
|
11
|
+
const amount = core_1.coreToCsl.value(scope, valueQuantities);
|
|
12
|
+
return scope.manage(core_1.CSL.TransactionUnspentOutput.new((0, exports.createTxInput)(scope), scope.manage(core_1.CSL.TransactionOutput.new(address, amount))));
|
|
13
13
|
};
|
|
14
14
|
exports.createUnspentTxOutput = createUnspentTxOutput;
|
|
15
|
-
const createOutput = (valueQuantities, bech32Addr = 'addr1vyeljkh3vr4h9s3lyxe7g2meushk3m4nwyzdgtlg96e6mrgg8fnle') => core_1.CSL.TransactionOutput.new(core_1.CSL.Address.from_bech32(bech32Addr), core_1.coreToCsl.value(valueQuantities));
|
|
15
|
+
const createOutput = (scope, valueQuantities, bech32Addr = 'addr1vyeljkh3vr4h9s3lyxe7g2meushk3m4nwyzdgtlg96e6mrgg8fnle') => scope.manage(core_1.CSL.TransactionOutput.new(scope.manage(core_1.CSL.Address.from_bech32(bech32Addr)), core_1.coreToCsl.value(scope, valueQuantities)));
|
|
16
16
|
exports.createOutput = createOutput;
|
|
17
17
|
//# sourceMappingURL=cslTestUtil.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cslTestUtil.js","sourceRoot":"","sources":["../../src/cslTestUtil.ts"],"names":[],"mappings":";;;AAAA,4CAA4D;
|
|
1
|
+
{"version":3,"file":"cslTestUtil.js","sourceRoot":"","sources":["../../src/cslTestUtil.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,CAAC,KAAK,CAAC,MAAM,CAAC,UA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