This format is based on Keep A Changelog.
- Renamed
withDatum -> withHashDatum
- Changed signatures of functions that take data-encodable arguments to require
ToData
rather than Plutarch equivalents - Switched to
plutus-core
version 1.7.0.0 as the only one supported
- Added
dcert
- Bump to liqwid-nix 2.0 and Plutarch 1.3.0.
- Made
buildTxInInfo
returnTxOutRef
with default value instead of Nothing when given no TxId or TxIdx.
Added builders for Rewarding
and Certifying
contexts.
-
Added
RewardingBuilder
,withRewarding
, andbuildRewarding'
. -
Added
CertifyingBuilder
,withCertifying
, andbuildCertifying'
.
Added "withdrawal" capabilities.
- Added a
withdrawal :: Builder a => StakingCredential -> Integer -> a
function toPlutarch.Context
.
- Added a
withdrawals
field to the base builder, along with updating the relevant optics.
checkMints
fixed
continuing
andcontinuingWith
, allowing easy continuing of 'Value'.
normalizeValue
now has the correct behavior of:- adding a 0 Ada entry to the underlying map if the entry would otherwise be missing.
- removing entries with the Ada currency symbol, but a non-Ada token name
- Labelled optics for
BaseBuilder
,MintingBuilder
,SpendingBuilder
,UTXO
andMint
. These follow the names of the old field selectors, but without disambiguation prefixes: for example,bbMints
is now#mints
.
BaseBuilder
,MintingBuilder
,SpendingBuilder
,UTXO
andMint
no longer export their constructors.runChecker
is now a regular function, not a field selector.checkBSLength
replaced oldcheckByteString
. It checks ifByteString
is at given length.
- Field selectors for
BaseBuilder
,MintingBuilder
,SpendingBuilder
,UTXO
andMint
.
checkTxId
is fixed to follow the new ledger spec and will now look for 32 bytes longByteString
.
normalizePair
,normalizeMap
,normalizeValue
,normalizeUTXO
, andnormalizeMint
added for normalizing the data. It will combine elements with the same "key" with given concatenation function.sortMap
sortsAssocMap.Map
by the key.mkNormalized
added for normalizing allValue
s andMint
s inBuilder
.checkNormalized
checks if values in the builder are normalized.checkValueNormalized
checks if the given value is normalized.
- Redeemer map support in general.
withRedeemer
attaches a redeemer to a UTxO.mintWith
andmintSingletonWith
allow minting with a given redeemercheckValidatorRedeemer
ensures that given UTxO have redeemer, if owned by any validator.
mint
sets the redeemer used for minting to()
by default.
address
is similar tocredential
,script
, andpubKey
but takesAddress
instead. It will takeStakingCredential
if the address is provided with one.withStakeCredential
is for addingStakingCredential
to an UTXO.
Checker
is in charge of composing and constructing checks overScriptContext
. It is composed with thecontravariant
typeclasses.referenceInput
is added for reference inputs in V2ScriptContext
. It act similarly toinput
andoutput
.withInlineDatum
is for new inline-datum feature in V2. It acts similarly towithDatum
, but it doesn't add datum toScriptContext
.mkOutRefIndices
modifies given builder to have "correct" indices.check[Spending|Minting]
are checkers for each context builder.build[Spending|Minting]'
are builder that never fails. If given information is insufficient it will use dummy values. Thus, it is advisable tobuild[Spending|Minting]
which comes with minimum checks to ensure not to use dummy values.tryBuild[Spending|Minting]
first runcheck[Spending|Minting]
and checkers given in argument. Then, it returns eitherScriptContext
or list of errors.CheckerError
is sum ofCheckerPos
andCheckerErrorType
CheckerPos
is possible positions of the errors.CheckerErrorType
is possible errors from checkers.basicError
constructs most general error from given error type.checkAt
updates/overrides checker position.checkFoldable
applies checker of typea
to foldablet a
.checkIf
makes checker from predicate and error. It returns given error if predicate is false.checkIfWith
is a combination ofcheckIf
andCheckWith
checkBool
checker forBool
. It returns given error when false.checkWith
builds checker via CPS computation.checkByteString
checks if givenByteString
is valid.checkPositiveValue
checks if givenValue
only contains Positive value.checkTxId
checks if givenTxId
is valid.handleErrors
runs givenChecker a
with givena
, returnsa
if checker succeeds, throws error if not.checkSignatures
checks if signatures are correct in given builder.checkZeroSum
checks if builder have equal inflow and outflow of tokens.checkInputs
checks if builder have a valid inputs. It checks credentials, values, and output references.checkReferenceInputs
checks i builder have a valid reference inputs. It checks credentials and values.checkFail
is a checker that always fail with given error.checkMints
checks if builder have a valid mints. It ensures there are no Ada minted.checkFee
checks if builder have a valid fee. It ensures fee only contains Ada value.checkOutputs
checks if builder have a valid outputs. It checks credentials and values.checkDatumPairs
checks if builder have any extra datum-datumhash pair.checkPhase1
is a list of all subcheckers that is required to call aScriptContext
phase-1 valid.renderErrors
prettifies given foldable structure ofCheckerError
.flattenValue
flattens given Value into list of tuples.
Builder
typeclass now requiresLens' a BaseBuilder
instead ofunpack
to provide setter functionalities--used bymkOutRefIndices
.unpack
is now a separate function.
withTxId
is renamed towithRefTxId
since it can be confused withTxId
ofTxInfo
.withOutRef
is renamed towithRef
in order to follow rest ofwithRef*
interfaces.build[Spending|Minting]
are now identical totryBuild[Spending|Minting]
but it throws error when checker fails.
build[Spending|Building|TxInfo]Unsafe
is deprecated in favor of new builders that use checkers.
UTXO
is now properly exposed to the users.Semigroup
andMonoid
instances forUTXO
SubBuilder
provides minor builders that produces context smaller thanTxInfo
.buildTxOut
builds a singleTxOut
from givenUTXO
.buildTxOuts
builds a list ofTxOut
s from givenSubBuilder
.buildTxInInfo
builds a singleTxInInfo
from givenUTXO
.buildTxInInfos
builds a list ofTxInInfo
s from givenSubBuilder
.buildDatumHashPairs
builds a list of Datum-Hash pair from all inputs, outputs, extra data of given builder.
TxInfoBuilder
provides builder for builderTxInfo
; it is anewtype
wrapper ofBaseBuilder
.buildTxInfo
buildsTxInfo
from givenTxInfoBuilder
.
withSpendingUTXO
sets input validator from givenUTXO
.withSpendingOutRef
sets input validator from givenTxOutRef
.withSpendingOutRefId
sets input validator from givenTxOutRefId
.withSpendingOutRefId
sets input validator from givenTxId
.withSpendingOutRefIdx
sets input validator from given reference index, which isInteger
.
UTXO
is now constructed with Monoidal interfaces similar toBaseBuilder
.- Multiple
withValue
s will now combine values instead of replacing them. withSpendingUTXO
is updated to use updatedUTXO
.
- First release