sui 0.4.6
sui: ^0.4.6 copied to clipboard
A cross-platform SDK for Sui blockchain, supporting Mobile, Web and Desktop.
0.0.1 #
- Initial version, created by Mofa Labs.
0.0.3 #
-
SuiNS
-
Websocket
-
Secp256r1
-
Programmable Transactions Block
0.0.4 #
- Add requestSuiFromFaucetV1
- Fix TransactionBlock decode json data
0.1.0 #
- Refactor JsonRpcProvider
- Add more rpc methods
- Update readme
0.1.1 #
- Add Events API
0.1.2 #
- Add Web Support
0.1.3 #
- Fix query gas object
- Fix setSigner
- Add Web Demo
0.1.4 #
- Fix TransactionBlock
- Rename ED25519 to Ed25519
0.1.5 #
- Fix TransactionBlock Input Type, Estimate Gas
0.1.6 #
- Add zkLogin
0.1.7 #
- Fix hex pad
0.2.0 #
- Add MultiSig
- Add zkLogin Test
0.2.1 #
- export bech32 private key
0.3.0 #
- Refactor Transaction & BCS
0.3.1 #
- Fix dio use default transformer
0.3.2 #
- Fix bugs
0.3.3 #
- Fix example
- Clean code
0.3.4 #
- Perf: resolve move modules
- Bump BCS
0.3.5 #
- Fix map equality in transaction arguments
0.3.6 #
- Fix parse subIndex failed
0.3.7 #
- Config request options
0.4.1 #
- Support a custom gRPC-web endpoint:
SuiGrpcClient,GrpcCoreClientandSuiGrpcCompataccept an optionalendpointto point reads/writes at a self-hosted or third-party full node.networkstill selects the GraphQL / MVR endpoints and chain semantics. Backward compatible (defaults to the public endpoint for the network). SuiGrpcCompatobject reads now map the object's Display output and parsed Move fields into the legacydisplay.data/content.fieldsshapes (fixes empty NFT lists in wallets that classify objects by their Display).- Fix
SuiGrpcCompat.getOwnedObjectsclient-side filters (StructType/Package/MoveModule) comparing short-form addresses against gRPC's fully-normalized types —MatchNonecoin exclusion silently failed, so pages filled with coins and NFT lists came back empty. Addresses are now normalized on both sides (normalizeTypeAddresses). - Fix
SuiGrpcCompat.getDynamicFields: for a dynamic object field, report the wrapped child object id (matching JSON-RPC), not theField<…>wrapper — amultiGetObjectson it previously returned a display-less wrapper, leaving kiosk-held NFTs blank in wallet lists. SuiGrpcCompat.getStakesnow resolves each stake'svalidatorAddress(via its staking pool id), which wallets match against the validator list — stakes were previously dropped for having an empty address — and estimatesestimatedRewardfrom the validator APY and stake age (the legacy RPC returned it directly).SuiGrpcCompat.dryRunTransactionBlocknow returns balance changes, object changes and the effects' created/mutated/deleted sets from the simulated transaction — dApp sign previews were blank and could crash iterating a null objectChanges list.SuiGrpcCompat.getTransactionsnow returns each transaction's timestamp, execution status and balance changes (amount / coin / owner), not just the digest — wallet activity lists were showing rows with no date, amount or direction.SuiGrpcCompat.dryRunTransactionBlocknow returns balance changes, object changes and the effects' created/mutated/deleted sets from the simulated transaction — dApp sign previews were blank and could crash iterating a null objectChanges list.SuiGrpcCompat.getValidatorsApynow estimates real APY from each pool's token exchange rate instead of returning 0 (unreliable young-pool estimates are filtered).ValidatorInfoexposesstakingPoolIdandactivationEpoch.
0.4.0 #
Major transport migration ahead of Sui's JSON-RPC decommission (fully off 2026-07-31).
- Add gRPC-web transport (
SuiGrpcClient) — works on Mobile/Web/Desktop with no proxy:- Reads:
getObject(s),listOwnedObjects,getBalance/listBalances/listCoins,getCoinInfo,getTransaction,getCheckpoint,getEpoch,getCurrentSystemState,getPackage/getFunction,listDynamicFields,getDynamicFieldObject/getDynamicObjectField, name service. - Writes:
simulateTransaction,executeTransaction, and one-callsignAndExecuteTransactionwith automatic gas price / coin selection / budget estimation. moveCallwith object arguments now resolves objects and Move signatures over gRPC.waitForTransaction,subscribeCheckpoints(server-streaming, replaces WebSocket),verifySignature.
- Reads:
- Add GraphQL client (
SuiGraphQLClient) for advanced queries: filtered transactions, events, active validators, stakes, epoch summary. - Add Move Registry (MVR) resolution (
@org/appnames) wired intomoveCall,listCoinsand dynamic-field lookups. - Add transport-neutral models (
SuiBalance,SuiCoin,SuiObjectInfo,SuiExecutionResult, …) andderiveDynamicFieldID. - Deprecate the JSON-RPC stack (
JsonRpcProvider,SuiClientJSON-RPC methods,WebsocketClient). Kept for compatibility; will stop working when Sui removes JSON-RPC. - Add
SuiGrpcCompat— a drop-in-ish bridge exposing the legacySuiClientAPI over gRPC-web/GraphQL, so apps migrate by swapping the client construction only. - Vendor
bip32/bip39(intolib/cryptography) to drop the git dependencies and make the package publishable; add hostedcryptoandbs58check. - Deps: add
protobufandfixnum; bumpbcs,dio,pointycastle(4.0),freezed/freezed_annotation(3.0),web_socket_channel(3.0).
0.4.2 #
- Migrate to
bcs0.2.0 (full rewrite of the BCS package). Breaking for apps that importedpackage:bcs/...internals through this SDK: the legacy registry API (LegacyBCS),fromB64/toB64,fromHEX/toHEX,fromB58/toB58and split libraries (bcs/utils.dart,bcs/hex.dart, ...) are gone. Usedart:convertfor base64 andpackage:bcs/bcs.dart(hexEncode/hexDecode,base58Encode/base58Decode) instead. SuiObjectRef.version/SharedObjectRef.initialSharedVersionnow parse back from BCS asint, matching the SDK's object-ref types.- Deprecate
Transactionsin favor ofCommands; its methods now delegate toCommandsand produce the$kind-style command maps the serialization pipeline expects (the old flatkindmaps no longer serialized correctly). Transaction.pureIntnow honors itstypeargument (previously always serialized asu64).SenderTransactionPage.digestsconvenience getter (GraphQL client).
0.4.3 #
- Breaking: faucet migrated to the
/v2/gasroute. The/gas(V0) and/v1/gas(V1) routes are deprecated upstream — devnet already rejects them withRoute deprecated. Use /v2/gas instead.— sorequestSuiFromFaucetV0,requestSuiFromFaucetV1andgetFaucetRequestStatusare removed in favor of a singlerequestSuiFromFaucetV2, which throws when the faucet reports a non-success status.FaucetResponsenow mirrors the v2 payload (coinsSent+isSuccess/error);BatchFaucetResponse,BatchSendStatus,BatchSendStatusTypeandBatchStatusFaucetResponseare gone.
0.4.4 #
- Breaking:
SuiGraphQLClient.queryTransactionsBySenderis renamed toqueryTransactionsByAddressand now filters byaffectedAddressinstead ofsentAddress, so an account's transaction history includes both sent and received transactions (the old query dropped every incoming transfer). ThegetTransactionscompatibility helper keeps the same signature and gains the received transactions automatically.
0.4.5 #
- Restore
SuiGraphQLClient.queryTransactionsBySender(thesentAddresssender-only primitive) alongsidequeryTransactionsByAddress(affectedAddress, sent + received). 0.4.4 replaced the former with the latter, which removed a valid query; both now coexist.getTransactionscontinues to useaffectedAddressfor a complete wallet history. Additive over 0.4.4 — no breaking changes.
0.4.6 #
- Transaction history now pages from the newest end. The
transactionsconnection is ordered oldest-first, so the previousfirst/afterreturned an account's oldest transactions (e.g. its 2023 history); the query now useslast/beforeto return the most recent ones. queryTransactionsByAddress/queryTransactionsBySendergain an optionalTransactionHistoryOptions(showBalanceChanges/showObjectChanges) so callers select only the per-transaction detail they need.showObjectChanges(off by default) fetches object ownership changes, surfacing NFT / owned-object transfers that produce no balance change;SenderTransactiongains anobjectChangeslist (TxObjectChange).getTransactionsrequests object changes and maps them intoSuiTransactionBlockResponse.objectChanges. Additive over 0.4.5 — no breaking changes.