@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.
@@ -1,5 +1,6 @@
1
1
  import { CSL, Cardano } from '@cardano-sdk/core';
2
- export declare const createTxInput: (bech32TxHash?: string, index?: number) => CSL.TransactionInput;
3
- export declare const createUnspentTxOutput: (valueQuantities: Cardano.Value, bech32Addr?: string) => CSL.TransactionUnspentOutput;
4
- export declare const createOutput: (valueQuantities: Cardano.Value, bech32Addr?: string) => CSL.TransactionOutput;
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;AAE5D,eAAO,MAAM,aAAa,kCAE6E,MAAM,yBAEzG,CAAC;AAEL,eAAO,MAAM,qBAAqB,oBACf,QAAQ,KAAK,0BAE7B,IAAI,wBAIN,CAAC;AAEF,eAAO,MAAM,YAAY,oBACN,QAAQ,KAAK,0BAE7B,IAAI,iBAC2F,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"}
@@ -1,12 +1,12 @@
1
1
  import { CSL, coreToCsl } from '@cardano-sdk/core';
2
2
  export const createTxInput = (() => {
3
3
  let defaultIdx = 0;
4
- return (bech32TxHash = 'base16_1sw0vvt7mgxghdewkrsptd2n0twueg2a7q88t9cjhtqmpk7xwc07shpk2uq', index) => CSL.TransactionInput.new(CSL.TransactionHash.from_bech32(bech32TxHash), index || defaultIdx++);
4
+ return (scope, bech32TxHash = 'base16_1sw0vvt7mgxghdewkrsptd2n0twueg2a7q88t9cjhtqmpk7xwc07shpk2uq', index) => scope.manage(CSL.TransactionInput.new(scope.manage(CSL.TransactionHash.from_bech32(bech32TxHash)), index || defaultIdx++));
5
5
  })();
6
- export const createUnspentTxOutput = (valueQuantities, bech32Addr = 'addr1vy36kffjf87vzkuyqc5g0ys3fe3pez5zvqg9r5z9q9kfrkg2cs093') => {
7
- const address = CSL.Address.from_bech32(bech32Addr);
8
- const amount = coreToCsl.value(valueQuantities);
9
- return CSL.TransactionUnspentOutput.new(createTxInput(), CSL.TransactionOutput.new(address, amount));
6
+ export const createUnspentTxOutput = (scope, valueQuantities, bech32Addr = 'addr1vy36kffjf87vzkuyqc5g0ys3fe3pez5zvqg9r5z9q9kfrkg2cs093') => {
7
+ const address = scope.manage(CSL.Address.from_bech32(bech32Addr));
8
+ const amount = coreToCsl.value(scope, valueQuantities);
9
+ return scope.manage(CSL.TransactionUnspentOutput.new(createTxInput(scope), scope.manage(CSL.TransactionOutput.new(address, amount))));
10
10
  };
11
- export const createOutput = (valueQuantities, bech32Addr = 'addr1vyeljkh3vr4h9s3lyxe7g2meushk3m4nwyzdgtlg96e6mrgg8fnle') => CSL.TransactionOutput.new(CSL.Address.from_bech32(bech32Addr), coreToCsl.value(valueQuantities));
11
+ export const createOutput = (scope, valueQuantities, bech32Addr = 'addr1vyeljkh3vr4h9s3lyxe7g2meushk3m4nwyzdgtlg96e6mrgg8fnle') => scope.manage(CSL.TransactionOutput.new(scope.manage(CSL.Address.from_bech32(bech32Addr)), coreToCsl.value(scope, valueQuantities)));
12
12
  //# sourceMappingURL=cslTestUtil.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"cslTestUtil.js","sourceRoot":"","sources":["../../src/cslTestUtil.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAW,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE5D,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,GAAG,EAAE;IACjC,IAAI,UAAU,GAAG,CAAC,CAAC;IACnB,OAAO,CAAC,YAAY,GAAG,oEAAoE,EAAE,KAAc,EAAE,EAAE,CAC7G,GAAG,CAAC,gBAAgB,CAAC,GAAG,CAAC,GAAG,CAAC,eAAe,CAAC,WAAW,CAAC,YAAY,CAAC,EAAE,KAAK,IAAI,UAAU,EAAE,CAAC,CAAC;AACnG,CAAC,CAAC,EAAE,CAAC;AAEL,MAAM,CAAC,MAAM,qBAAqB,GAAG,CACnC,eAA8B,EAC9B,UAAU,GAAG,4DAA4D,EAC3C,EAAE;IAChC,MAAM,OAAO,GAAG,GAAG,CAAC,OAAO,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;IACpD,MAAM,MAAM,GAAG,SAAS,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;IAChD,OAAO,GAAG,CAAC,wBAAwB,CAAC,GAAG,CAAC,aAAa,EAAE,EAAE,GAAG,CAAC,iBAAiB,CAAC,GAAG,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC;AACvG,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG,CAC1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