Releases: scrtlabs/secret-toolkit
secret-toolkit-storage v0.4.2
- Simplified implementation of
.clone
method - Added
.add_suffix
and.clone
methods tosecret-toolkit::storage::Item
- Minor performance updates to
secret-toolkit::storage::Keymap
Contributor: @srdtrk
secret-toolkit-storage v0.4.1
BUGFIX: Item::is_empty
was returning the opposite value from what you'd expect.
v0.4.0 - Better Storage
This release mostly includes the work of @srdtrk in #53. Thanks Srdtrk!
It revamps the secret-toolkit-storage
package to make it more similar to cw-storage-plus
and much easier
to use. It also removes the Cashmap
type from the incubator in favor of KeyMap
in secret-toolkit-storage
.
This is a summary of the changes and additions in this release:
- Minimum Rust version is bumped to the latest v1.63. This is because we want to use
Mutex::new
in aconst fn
. - No more distinction between
Readonly*
and*Mut
types. Instead, methods take references or mutable references to the storage every time. - Usage of
PrefixedStore
is made mostly unnecessary. - Storage type's constructors are const functions, which means they can be initialized as global static variables.
- Added
secret-toolkit::storage::Item
which is similar toItem
fromcw-storage-plus
orTypedStore
fromcosmwasm_storage
v0.10. - Added
secret-toolkit::storage::KeyMap
which is similar toCashmap
. Cashmap
is completely removed.
A full guide to using the new storage
types can be found
in the package's readme file.
v0.3.0 - Shockwave
This release includes new features and utilities, bugfixes, and replaces secp256k signing and validation with the pre-compiled functions in the new crypto APIs introduced in the Shockwave Alpha update which should improve performance significantly.
New features
- Added
clear
method toAppendStore
andDequeStore
to quickly reset the collections (#34) - docs.rs documentation now includes all sub-crates.
- BUGFIX:
secret-toolkit::snip721::Metadata
was severely out of date with the SNIP-721 specification, and not useful.
It is now compatible with deployed SNIP-721 contracts. - Added
types
module under theutil
package, to standardize often used types. - Added
secret-toolkit::viewing_key
, which can be imported by enabling theviewing-key
feature. - Added
secret-toolkit::permit::PubKey::canonical_address()
. - Types in
secret-toolkit::permit::Permit
are now generic over the type of permissions they accept. - Added the
maxheap
type to the incubator. - Added
secret-toolkit::utils::feature_toggle
which allow managing feature flags in your contract.
Breaking
secret-toolkit::permit::validate()
Now supports validating any type of Cosmos address.
Interface changes: Now takes a reference to the current token address instead
of taking it by value and an optional hrp string.
In addition, it returns a String and not HumanAddr.- Renamed
secret-toolkit::permit::Permission
tosecret-toolkit::permit::TokenPermission
. secret-toolkit-crypto
now has features["hash", "rng" and "ecc-secp256k1"]
which are all off by default - enable those you need.secret-toolkit-crypto::secp256k1::PublicKey::parse
now returnsStdResult<Self>
.- Changes to
secret-toolkit::crypto::secp256k1::PrivateKey::sign
:- The
data
argument is now any slice of bytes, and not the hash of a slice of data. - the
Api
fromdeps.api
is now required as the second argument as we now use the precompiled implementation.
- The
- Changes to
secret-toolkit::crypto::secp256k1::PublicKey::verify
:- the
Api
fromdeps.api
is now required as the third argument as we now use the precompiled implementation.
- the
secret-toolkit-incubator
now has features["cashmap", "generational-store"]
which are all off by default.
v0.2.0
This release includes a ton of new features, and a few breaking changes in various interfaces.
This version is also the first released to crates.io!
- Change: when a query fails because of a bad viewing key, this now correctly fails with
StdError::Unauthorized
- Added support for some missing SNIP-20 functionality, such as
CreateViewingKey
- Added support for SNIP-21 queries (memos and improved history) which broke some interfaces
- Added support for SNIP-22 messages (batch operations)
- Added support for SNIP-23 messages (improved Send operations) which broke some interfaces
- Added support for SNIP-24 permits
- Added
Base64Of<S: Serde, T>
,Base64JsonOf<T>
, andBase64Bincode2Of<T>
,
which are wrappers that automatically deserializes base64 strings toT
.
It can be used in message types' fields instead ofBinary
when the contents of the string
should have more specific contents. - Added
storage::DequeStore
- Similar toAppendStore
but allows pushing and popping on both ends - Added the
secret-toolkit::incubator
package intended for experimental features. It contains:CashMap
- A hashmap like storage abstractionGenerationalIndex
- A generational index storage abstraction
- The various subpackages can now be selected using feature flags. The default flags are
["serialization", "snip20", "snip721", "storage", "utils"]
while["crypto", "permit", "incubator"]
are left disabled by default.
V0.1.1
v0.1.0
This is the first release of secret-toolkit
. It supports:
secret-toolkit::snip20
- Helper types and functions for interaction with
SNIP-20 contracts.secret-toolkit::snip721
- Helper types and functions for interaction with
SNIP-721 contracts.secret-toolkit::crypto
- Wrappers for known-to-work crypto primitives from
ecosystem libraries. We include implementations for Sha256, Secp256k1 keys,
and ChaChaRng.secret-toolkit::storage
- Types implementing useful storage managements
techniques:AppendStore
andTypedStore
, usingbincode2
by default.secret-toolkit::serialization
- marker types for overriding the storage
format used by types insecret-toolkit::storage
.Json
andBincode2
.secret-toolkit::utils
- General utilities for writing contract code.padding
- tools for padding queries and responses.calls
- Tools for marking types as messages in queries and callbacks
to other contracts.