·
24 commits
to main
since this release
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/[email protected]