@callcium/sdk 0.11.1 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  TypeScript SDK for the [Callcium](https://callcium.dev) policy engine.
4
4
 
5
- Callcium defines type-safe constraints on ABI-encoded data, such as function arguments or a raw payload with no selector, using value ranges, set membership, array quantifiers, and transaction context. This SDK builds policies into canonical policy bytes and validates ABI-encoded data, such as transaction calldata, against a policy offchain, before it is signed.
5
+ Callcium defines type-safe constraints on ABI-encoded data, such as function arguments or a raw payload with no selector, using value ranges, set membership, array quantifiers, and transaction context. This SDK builds policies into canonical policy bytes, validates them, and enforces them offchain against ABI-encoded data such as transaction calldata.
6
6
 
7
7
  ## Install
8
8
 
@@ -53,7 +53,7 @@ const policy = PolicyBuilder.create("swap((address,address,uint256))")
53
53
  // struct Transfer { address to; uint256 value; }
54
54
  // function batch(Transfer[] transfers)
55
55
  const policy = PolicyBuilder.create("batch((address,uint256)[])")
56
- .add(arg(0).lengthBetween(1, 50)) // transfers.length
56
+ .add(arg(0).lengthBetween(1n, 50n)) // transfers.length
57
57
  .add(arg(0, Quantifier.ALL, 0).notIn(denied)) // transfers[*].to
58
58
  .add(arg(0, Quantifier.ALL, 1).lte(1n * 10n ** 18n)) // transfers[*].value
59
59
  .build();