stawi_finance_sdk 0.5.1 copy "stawi_finance_sdk: ^0.5.1" to clipboard
stawi_finance_sdk: ^0.5.1 copied to clipboard

Stawi client SDK: canonical FinancialIntent encoding, intent digests, account derivation, policy hashes, manifest verification, exact money arithmetic and device signing. Pure Dart; no Flutter, no transport.

0.5.1 #

  • Breaking fix: payoffTopUp(payoff, {required credit, required penaltiesOwed, required duesPayable}) returns max(0, payoff + penaltiesOwed + duesPayable
    • credit), from finance MemberBook.credit, penalties_owed and dues_payable. 0.5.0's payoffTopUp(payoff, creditAvailable) returned max(0, payoff - credit_available), which understates the top-up whenever the penalties and dues a settle takes first exceed credit (credit_available floors at zero), so the payoff would be refused InsufficientCredit. Held to Go rules.CreditClaims.TopUp by test/vectors/go_payoff_topups.json (make vectors-dart). Released alongside stawi_api 0.5.1.

0.5.0 #

  • payoffTopUp(payoff, creditAvailable): what a member must pay in before a loan payoff succeeds, from finance MemberBook.credit_available (credit less the penalties and the dues a settle takes first; in a share-out room the rest of the cycle's dues). Released alongside stawi_api 0.5.0.

0.4.0 #

  • Engine targets: RoomEngineTargets (finance Room.engines: the room's RulesEngine and LoanEngine and whether each is callable) and verifyEngineTarget, which refuses an engine call whose target is not the room's own engine for the action (the LoanEngine for loan actions, the RulesEngine otherwise) or whose grant is not active, with the new EngineCallError.notTheRoomsEngine. verifyEngineCallIntent takes the room's engines as an optional engines: argument and makes the same check.

0.3.0 #

  • Engine calls (StawiAccount.executeEngineCall): IntentType.engineCall (24); EngineAction and EngineCall, the nine member actions an account may make on the rules engines, decoded and encoded exactly as the account admits them; engineCallHash (the intent's authorization_id); and verifyEngineCallIntent, which checks that settlement's prepared intent binds exactly the engine call it returned (type, mode, payload hash, room, committed value) and returns the call to show before signing. Replays Go-generated vectors (test/vectors/go_engine_calls.json).
  • Secret ballots: voteCommitment, GovernanceModule's commitment keccak256(abi.encode(uint8 choice, bytes32 salt, uint256 proposalId, address member)) as Go stawi.Commitment computes it, so a device commits a COMMIT_VOTE without the choice leaving it; newVoteSalt; and the voteChoiceFor, voteChoiceAgainst and voteChoiceAbstain constants. Replays Go-generated vectors (test/vectors/go_vote_commitments.json).

0.2.0 #

  • Account genesis: AccountPolicy (AccountPolicyLib.PolicyParams) with hash / accountPolicyHash, devicePubkeyHash, genesisDeviceDigest and deployAccountDigest, so a client can rebuild settlement's PrepareDeployAccount genesis_digest from the policy it was shown, its own device key, its identity salt hash and the account address before signing. Replays Go-generated vectors (test/vectors/go_genesis.json).
  • allowlistModeProtocol and allowlistModeExplicit constants.

0.1.0 #

  • First release: FinancialIntent encoding and digest, account derivation, policy hashes, manifest verification, money arithmetic, secp256k1 and P-256 device signing.
  • DeviceKey.generate, signPreparedCall and accountWrappedHash for settlement's PrepareRoomCall / SubmitRoomCall and account calls.
0
likes
130
points
--
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Stawi client SDK: canonical FinancialIntent encoding, intent digests, account derivation, policy hashes, manifest verification, exact money arithmetic and device signing. Pure Dart; no Flutter, no transport.

Homepage
Repository (GitHub)
View/report issues

Topics

#cryptography #ethereum #fintech

License

unknown (license)

Dependencies

cryptography, pointycastle

More

Packages that depend on stawi_finance_sdk