@harmoniclabs/plu-ts-offchain
Advanced tools
Comparing version 0.1.16 to 0.1.17
@@ -57,3 +57,3 @@ "use strict"; | ||
purposeArgs = [ | ||
new cardano_ledger_ts_1.StakeCredentials("script", new cardano_ledger_ts_1.StakeValidatorHash(stakeAddr.credentials)) | ||
new cardano_ledger_ts_1.StakeCredentials(cardano_ledger_ts_1.StakeCredentialsType.Script, new cardano_ledger_ts_1.StakeValidatorHash(stakeAddr.credentials)) | ||
.toData(version) | ||
@@ -60,0 +60,0 @@ ]; |
@@ -34,2 +34,8 @@ import { Address, AddressStr, CanBeHash28, IProposalProcedure, IUTxO, IVotingProceduresEntry, PubKeyHash, TxMetadata, TxOut, UTxO } from "@harmoniclabs/cardano-ledger-ts"; | ||
withdrawals?: ITxBuildWithdrawal[]; | ||
/** | ||
* # metadata message following cip20 | ||
* | ||
* overwrites the metadata at label 674 if already present. | ||
**/ | ||
memo?: string; | ||
metadata?: TxMetadata; | ||
@@ -55,2 +61,8 @@ votingProcedures?: (IVotingProceduresEntry | ITxBuildVotingProcedure)[]; | ||
withdrawals?: NormalizedITxBuildWithdrawal[]; | ||
/** | ||
* # metadata message following cip20 | ||
* | ||
* overwrites the metadata at label 674 if already present. | ||
**/ | ||
memo?: string; | ||
metadata?: TxMetadata; | ||
@@ -62,4 +74,4 @@ votingProcedures?: NormalizedITxBuildVotingProcedure[]; | ||
} | ||
export declare function normalizeITxBuildArgs({ inputs, change, changeAddress, outputs, readonlyRefInputs, requiredSigners, collaterals, collateralReturn, mints, invalidBefore, invalidAfter, certificates, withdrawals, metadata, votingProcedures, proposalProcedures, currentTreasuryValue, paymentToTreasury }: ITxBuildArgs): NormalizedITxBuildArgs; | ||
export declare function normalizeITxBuildArgs({ inputs, change, changeAddress, outputs, readonlyRefInputs, requiredSigners, collaterals, collateralReturn, mints, invalidBefore, invalidAfter, certificates, withdrawals, memo, metadata, votingProcedures, proposalProcedures, currentTreasuryValue, paymentToTreasury }: ITxBuildArgs): NormalizedITxBuildArgs; | ||
/** @deprecated use `normalizeITxBuildArgs` instead */ | ||
export declare function cloneITxBuildArgs(args: ITxBuildArgs): ITxBuildArgs; |
@@ -14,3 +14,3 @@ "use strict"; | ||
function normalizeITxBuildArgs(_a) { | ||
var inputs = _a.inputs, change = _a.change, changeAddress = _a.changeAddress, outputs = _a.outputs, readonlyRefInputs = _a.readonlyRefInputs, requiredSigners = _a.requiredSigners, collaterals = _a.collaterals, collateralReturn = _a.collateralReturn, mints = _a.mints, invalidBefore = _a.invalidBefore, invalidAfter = _a.invalidAfter, certificates = _a.certificates, withdrawals = _a.withdrawals, metadata = _a.metadata, votingProcedures = _a.votingProcedures, proposalProcedures = _a.proposalProcedures, currentTreasuryValue = _a.currentTreasuryValue, paymentToTreasury = _a.paymentToTreasury; | ||
var inputs = _a.inputs, change = _a.change, changeAddress = _a.changeAddress, outputs = _a.outputs, readonlyRefInputs = _a.readonlyRefInputs, requiredSigners = _a.requiredSigners, collaterals = _a.collaterals, collateralReturn = _a.collateralReturn, mints = _a.mints, invalidBefore = _a.invalidBefore, invalidAfter = _a.invalidAfter, certificates = _a.certificates, withdrawals = _a.withdrawals, memo = _a.memo, metadata = _a.metadata, votingProcedures = _a.votingProcedures, proposalProcedures = _a.proposalProcedures, currentTreasuryValue = _a.currentTreasuryValue, paymentToTreasury = _a.paymentToTreasury; | ||
return { | ||
@@ -32,2 +32,3 @@ inputs: inputs.map(normalizeITxBuildArgsInputs), | ||
withdrawals: withdrawals === null || withdrawals === void 0 ? void 0 : withdrawals.map(ITxBuildWithdrawal_1.normalizeITxBuildWithdrawal), | ||
memo: memo ? String(memo) : undefined, | ||
metadata: metadata, | ||
@@ -34,0 +35,0 @@ votingProcedures: Array.isArray(votingProcedures) ? |
@@ -91,2 +91,17 @@ import { GenesisInfos, NormalizedGenesisInfos } from "./GenesisInfos.js"; | ||
export declare function getScriptDataHash(witnesses: TxWitnessSet, languageViews: Uint8Array): ScriptDataHash | undefined; | ||
/** | ||
* Claude prompt (yes I'm lazy): | ||
* | ||
* write a typescript function that given a string and a number, | ||
* returns an array of strings whose length IN BYTES is at most the second parameter, | ||
* if a utf 8 char is present at the intersection | ||
* of the two chunks IT MUST STAY INTACT and it will be part of the following chunk. | ||
* | ||
* @example | ||
* const exampleString = "Hello, 🌍! This is a test."; | ||
* const maxChunkBytes = 10; | ||
* const result = splitStringByByteLength(exampleString, maxChunkBytes); | ||
* console.log(result); // ["Hello, ", "🌍! This", " is a test", "."] | ||
*/ | ||
export declare function splitStringByByteLength(input: string, maxByteLength?: number): string[]; | ||
export {}; |
@@ -89,2 +89,4 @@ import type { ITxRunnerProvider } from "../IProvider/index.js"; | ||
readonly addRequiredSignerKey: (signerKey: Hash28) => TxBuilderRunner; | ||
/** adds a metadata message according to cip 20 */ | ||
readonly attachMemo: (memo: string) => TxBuilderRunner; | ||
/** alias for `attachValidator` */ | ||
@@ -91,0 +93,0 @@ readonly attachCertificateValidator: (validator: Script<PlutusScriptType>) => TxBuilderRunner; |
{ | ||
"name": "@harmoniclabs/plu-ts-offchain", | ||
"version": "0.1.16", | ||
"version": "0.1.17", | ||
"description": "An embedded DSL for Cardano smart contracts creation coupled with a library for Cardano transactions, all in Typescript", | ||
@@ -65,8 +65,8 @@ "main": "./dist/index.js", | ||
"@harmoniclabs/cardano-costmodels-ts": "^1.2.0", | ||
"@harmoniclabs/cardano-ledger-ts": "^0.2.6", | ||
"@harmoniclabs/cbor": "^1.3.0", | ||
"@harmoniclabs/cardano-ledger-ts": "^0.2.8", | ||
"@harmoniclabs/cbor": "^1.3.1", | ||
"@harmoniclabs/pair": "^1.0.0", | ||
"@harmoniclabs/plutus-data": "^1.2.4", | ||
"@harmoniclabs/plutus-machine": "^2.0.1", | ||
"@harmoniclabs/uplc": "^1.2.3" | ||
"@harmoniclabs/uplc": "^1.3.0" | ||
}, | ||
@@ -73,0 +73,0 @@ "devDependencies": { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
270878
5100