Releases: IntersectMBO/evolution-sdk
@evolution-sdk/evolution@0.3.11
Patch Changes
- #122
079fd98Thanks @solidsnakedev! - Add propose and vote APIs: introduce new operations for creating governance proposals and casting votes, including supporting types, procedures, and validators.
@evolution-sdk/devnet@1.1.11
Patch Changes
-
#122
079fd98Thanks @solidsnakedev! - Add propose and vote APIs: introduce new operations for creating governance proposals and casting votes, including supporting types, procedures, and validators. -
Updated dependencies [
079fd98]:- @evolution-sdk/evolution@0.3.11
- @evolution-sdk/aiken-uplc@0.0.3
@evolution-sdk/aiken-uplc@0.0.3
Patch Changes
- Updated dependencies [
079fd98]:- @evolution-sdk/evolution@0.3.11
@evolution-sdk/aiken-uplc@0.0.2
Patch Changes
-
#120
ed9bdc0Thanks @solidsnakedev! - Add governance and pool operation APIs to transaction builderThis release adds comprehensive support for Conway-era governance operations and stake pool management:
New Delegation APIs
delegateToPool: Delegate stake to a pool (with optional registration)delegateToDRep: Delegate voting power to a DRep (with optional registration)delegateToPoolAndDRep: Delegate to both pool and DRep simultaneously
DRep Operations
registerDRep: Register as a Delegated RepresentativeupdateDRep: Update DRep anchor/metadataderegisterDRep: Deregister DRep and reclaim deposit
Constitutional Committee Operations
authCommitteeHot: Authorize hot credential for committee memberresignCommitteeCold: Resign from constitutional committee
Stake Pool Operations
registerPool: Register a new stake pool with parametersretirePool: Retire a stake pool at specified epoch
Transaction Balance Improvements
- Proper accounting for certificate deposits and refunds
- Withdrawal balance calculations
- Minimum 1 input requirement enforcement (replay attack prevention)
-
Updated dependencies [
ed9bdc0]:- @evolution-sdk/evolution@0.3.10
@evolution-sdk/evolution@0.3.8
Patch Changes
-
#113
7905507Thanks @solidsnakedev! - AddattachMetadata()operation to TransactionBuilder for attaching transaction metadata according to CIP-10 standard.Changes:
- Added
attachMetadata()method to attach metadata with custom labels - Metadata labels are now bigint (unbounded positive integers) supporting CIP-20 messages (label 674) and custom labels
- Automatic computation of auxiliaryDataHash in transaction body when metadata is present
- Proper fee calculation accounting for auxiliary data size
- TransactionMetadatum refactored to simple union type:
string | bigint | Uint8Array | Map | Array - Added
NonNegativeIntegerschema to Numeric module for unbounded non-negative integers
Example:
await client .newTx() .attachMetadata({ label: 674n, // CIP-20 message label metadata: "Hello Cardano!" }) .payToAddress({ address, assets }) .build() .then((tx) => tx.sign().submit())
- Added
@evolution-sdk/devnet@1.1.8
Patch Changes
- Updated dependencies [
7905507]:- @evolution-sdk/evolution@0.3.8
@evolution-sdk/evolution@0.3.7
Patch Changes
-
#112
c59507eThanks @solidsnakedev! - Add transaction chaining support viaSignBuilder.chainResult()- Add
chainResult()method toSignBuilderfor building dependent transactions - Returns
ChainResultwithconsumed,availableUTxOs and pre-computedtxHash - Lazy evaluation with memoization - computed on first call, cached for subsequent calls
- Add
signAndSubmit()convenience method combining sign and submit in one call - Remove redundant
chain(),chainEffect(),chainEither()methods from TransactionBuilder
- Add
-
#110
9ddc79dThanks @solidsnakedev! - ### Native Scripts & Multi-Sig SupportaddSigneroperation: Add required signers to transactions for multi-sig and script validation- Native script minting: Full support for
ScriptAll,ScriptAny,ScriptNOfK,InvalidBefore,InvalidHereafter - Reference scripts: Use native scripts via
readFrominstead of attaching them to transactions - Multi-sig spending: Spend from native script addresses with multi-party signing
- Improved fee calculation: Accurate fee estimation for transactions with native scripts and reference scripts
API Changes
UTxO.scriptReftype changed fromScriptReftoScriptfor better type safetyPayToAddressParams.scriptRefrenamed toscriptfor consistency- Wallet
signTxnow acceptsreferenceUtxoscontext for native script signer detection - Client
signTxauto-fetches reference UTxOs when signing transactions with reference inputs
-
#109
0730f23Thanks @solidsnakedev! - ### TxBuilder setValidity APIAdd
setValidity()method to TxBuilder for setting transaction validity intervals:client.newTx() .setValidity({ from: Date.now(), // Valid after this Unix time (optional) to: Date.now() + 300_000 // Expires after this Unix time (optional) }) .payToAddress({ ... }) .build()
- Times are provided as Unix milliseconds and converted to slots during transaction assembly
- At least one of
fromortomust be specified - Validates that
from < towhen both are provided
slotConfig support for devnets
Add
slotConfigparameter tocreateClient()for custom slot configurations:const slotConfig = Cluster.getSlotConfig(devnetCluster) const client = createClient({ network: 0, slotConfig, // Custom slot config for devnet provider: { ... }, wallet: { ... } })
Priority chain for slot config resolution:
BuildOptions.slotConfig(per-transaction override)TxBuilderConfig.slotConfig(client default)SLOT_CONFIG_NETWORK[network](hardcoded fallback)
Cluster.getSlotConfig helper
Add
getSlotConfig()helper to derive slot configuration from devnet cluster genesis:const slotConfig = Cluster.getSlotConfig(cluster) // Returns: { zeroTime, zeroSlot, slotLength }
@evolution-sdk/devnet@1.1.7
Patch Changes
-
#109
0730f23Thanks @solidsnakedev! - ### TxBuilder setValidity APIAdd
setValidity()method to TxBuilder for setting transaction validity intervals:client.newTx() .setValidity({ from: Date.now(), // Valid after this Unix time (optional) to: Date.now() + 300_000 // Expires after this Unix time (optional) }) .payToAddress({ ... }) .build()
- Times are provided as Unix milliseconds and converted to slots during transaction assembly
- At least one of
fromortomust be specified - Validates that
from < towhen both are provided
slotConfig support for devnets
Add
slotConfigparameter tocreateClient()for custom slot configurations:const slotConfig = Cluster.getSlotConfig(devnetCluster) const client = createClient({ network: 0, slotConfig, // Custom slot config for devnet provider: { ... }, wallet: { ... } })
Priority chain for slot config resolution:
BuildOptions.slotConfig(per-transaction override)TxBuilderConfig.slotConfig(client default)SLOT_CONFIG_NETWORK[network](hardcoded fallback)
Cluster.getSlotConfig helper
Add
getSlotConfig()helper to derive slot configuration from devnet cluster genesis:const slotConfig = Cluster.getSlotConfig(cluster) // Returns: { zeroTime, zeroSlot, slotLength }
-
Updated dependencies [
c59507e,9ddc79d,0730f23]:- @evolution-sdk/evolution@0.3.7
@evolution-sdk/evolution@0.3.6
Patch Changes
-
#107
1e1aec8Thanks @solidsnakedev! - ### Added: Redeemer Labels for Script DebuggingAdded optional
labelproperty to redeemer operations (collectFrom,withdraw,mint, and stake operations) to help identify which script failed during evaluation.client .newTx() .collectFrom({ inputs: [utxo], redeemer: makeSpendRedeemer(999n), label: "coordinator-spend-utxo" // Shows in failure output }) .withdraw({ stakeCredential, amount: 0n, redeemer: makeWithdrawRedeemer([999n]), label: "coordinator-withdrawal" })
When scripts fail, the
EvaluationErrornow includes a structuredfailuresarray:interface ScriptFailure { purpose: "spend" | "mint" | "withdraw" | "cert" index: number label?: string // User-provided label redeemerKey: string // e.g., "spend:0", "withdraw:0" utxoRef?: string // For spend failures credential?: string // For withdraw/cert failures policyId?: string // For mint failures validationError: string traces: string[] }
Added: Stake Operations
Full support for Conway-era stake operations:
registerStake- Register stake credential (RegCert)deregisterStake- Deregister stake credential (UnregCert)delegateTo- Delegate to pool and/or DRep (StakeDelegation, VoteDelegCert, StakeVoteDelegCert)registerAndDelegateTo- Combined registration + delegation (StakeRegDelegCert, VoteRegDelegCert, StakeVoteRegDelegCert)withdraw- Withdraw staking rewards (supports coordinator pattern with amount: 0n)
All operations support script-controlled credentials with RedeemerBuilder for deferred redeemer resolution.
@evolution-sdk/devnet@1.1.6
Patch Changes
-
#107
1e1aec8Thanks @solidsnakedev! - ### Added: Redeemer Labels for Script DebuggingAdded optional
labelproperty to redeemer operations (collectFrom,withdraw,mint, and stake operations) to help identify which script failed during evaluation.client .newTx() .collectFrom({ inputs: [utxo], redeemer: makeSpendRedeemer(999n), label: "coordinator-spend-utxo" // Shows in failure output }) .withdraw({ stakeCredential, amount: 0n, redeemer: makeWithdrawRedeemer([999n]), label: "coordinator-withdrawal" })
When scripts fail, the
EvaluationErrornow includes a structuredfailuresarray:interface ScriptFailure { purpose: "spend" | "mint" | "withdraw" | "cert" index: number label?: string // User-provided label redeemerKey: string // e.g., "spend:0", "withdraw:0" utxoRef?: string // For spend failures credential?: string // For withdraw/cert failures policyId?: string // For mint failures validationError: string traces: string[] }
Added: Stake Operations
Full support for Conway-era stake operations:
registerStake- Register stake credential (RegCert)deregisterStake- Deregister stake credential (UnregCert)delegateTo- Delegate to pool and/or DRep (StakeDelegation, VoteDelegCert, StakeVoteDelegCert)registerAndDelegateTo- Combined registration + delegation (StakeRegDelegCert, VoteRegDelegCert, StakeVoteRegDelegCert)withdraw- Withdraw staking rewards (supports coordinator pattern with amount: 0n)
All operations support script-controlled credentials with RedeemerBuilder for deferred redeemer resolution.
-
Updated dependencies [
1e1aec8]:- @evolution-sdk/evolution@0.3.6