Skip to content

Commit 41d31c9

Browse files
committed
Add cosmwasm_2_1 cargo feature
1 parent 349dfb4 commit 41d31c9

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

packages/std/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ cosmwasm_1_4 = ["cosmwasm_1_3"]
4949
# This enables functionality that is only available on 2.0 chains.
5050
# It adds `CosmosMsg::Any`, replacing `CosmosMsg::Stargate`. It also adds `QueryRequest::Grpc`.
5151
cosmwasm_2_0 = ["cosmwasm_1_4"]
52+
# This enables functionality that is only available on 2.1 chains.
53+
# It adds verification and key recovery for the secp256r1 elliptic curve.
54+
cosmwasm_2_1 = ["cosmwasm_2_0"]
5255

5356
[dependencies]
5457
base64 = "0.21.0"

packages/std/src/imports.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,10 @@ extern "C" {
6262
/// secp256r1 ECDSA parametrization.
6363
/// Returns 0 on verification success, 1 on verification failure, and values
6464
/// greater than 1 in case of error.
65+
#[cfg(feature = "cosmwasm_2_1")]
6566
fn secp256r1_verify(message_hash_ptr: u32, signature_ptr: u32, public_key_ptr: u32) -> u32;
6667

68+
#[cfg(feature = "cosmwasm_2_1")]
6769
fn secp256r1_recover_pubkey(
6870
message_hash_ptr: u32,
6971
signature_ptr: u32,

0 commit comments

Comments
 (0)