Feat/ts v4.11.0 - #963
Open
gummy789j wants to merge 16 commits into
Open
Conversation
Feat/ts signing commands
Feat/ts v0.3.0
Backfill reference pages for every command added since release_v4.11.0, verified against the command registry rather than the drafted command doc: all 66 registered commands now have a page. New pages: permission/ (index, show, update) multi-sig permission structure gasfree/ (index, info, transfer, trace) contact/ (index, add, list, remove) address/ (index, generate) encoding/ (index, convert) tx/approvals, tx/multisig account/activate, account/set Updated: commands/index, account/index, tx/index (multi-sig lifecycle), tx/broadcast (--hex/--file/--dry-run, threshold validation), tx/send (contact names), current (--qr), config (TronLink/GasFree credentials and secret masking), README, and the agent SKILL command map. Examples and error codes were taken from actual command output and the domain rules, so contact limits, the permission operation bitmaps, and the config masking behaviour match the implementation. Also included in this commit: - bump version to 4.11.0 (ts package, runner, java Utils) - name TRON contract types 3/20/32/51 and require unnamed operation bits to be declared via unknownOperationIds - add USDD to mainnet and seed the Nile builtin token book
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Brings the TypeScript CLI to the 4.11.0 release line: TRON multi-signature support end to end, gas-free token transfers, and local utilities (contacts, keypair generation, encoding conversion, account lifecycle, receive QR).
Command surface grows 52 → 66, and all 66 now have a reference page.
Scope is
ts/only, apart from a one-line version constant in Java.Base:
release_v4.11.0· 15 commits · 159 files, +12,991 / −216Multi-signature
The CLI can now participate in a multi-sig account for the whole lifecycle: configure permissions, collect signatures from several keys, broadcast once the threshold is met.
permission show/updatetx sign --hex/--file--checkverifies online)tx approvalstx multisig--create/--sign/--watch)tx broadcast --hex/--fileSignatures travel either offline as a hex artifact passed between signers, or through the TronLink service as a shared queue.
Safety properties worth review:
tx signon an artifact is offline by default; permission membership is only claimed with--check.tx broadcastrefuses a transaction below threshold (not_authorized) or expired (tx_expired) — itpermission updaterejects rather than normalizes (invalid_permission), emits lockout warnings, and re-reads after confirmation. A bitmap cannot silently widen a permission: unnamed set bits must be declared inunknownOperationIds.provider_error).--watchreceives a count only, never content.GasFree
gasfree info/transfer/trace— move USDT and other supported tokens with no TRX, by signing a TIP-712PermitTransferand letting the provider broadcast for a fee in the transferred token.Balance and fees are checked up front; the signed digest is recomputed and the recovered signer verified against the selected account (
signing_rejected); provider metadata is validated (gasfree_integrity).--dry-runprices without unlocking,--waitreports settled rather than estimated amounts. Mainnet and Nile only; Shasta returnsLocal utilities
contact add/list/removetx send --toand `gasfree transfer --toaddress generateencoding convert41…hex ⇄0xEVM, and hex / Base64 / Base58Checkaccount activate/setcurrent --qr0600); names resembling an to` can't be reinterpreted.address generatewrites the key to an exclusively created0600file and never overwrites; stdout requires explicit--print-secret.encoding convertrefuses any 32-byte input — indistinguishable from a private key, and argv is visiblcurrent --qrencodes exactly the address and never draws a partial QR (a truncated code could scan as a different address).Architecture & config
New ports keep hexagonal boundaries intact:
contact-repository,gasfree-provider,keypair-writer,qr-encoder,tronlink-collaboration. New pure-domain modules:contact,encoding,gasfree,permission.Five new optional config keys —
tronlinkSecretId/SecretKey/ChannelandgasfreeApiKey/ApiSecret. Both secrets are masked on read and write (********, including the echoedinput), so a config write is safe to log;unset keys are omitted entirely.
Documentation
19 new pages, 9 updated, following the existing layout. New groups
permission/,gasfree/,contact/,new pagestx/approvals,tx/multisig,account/activate,account/set; updatedtx/index(multi-siglifecycle),tx/broadcast,tx/send,current,config,README, and the agentSKILL.md.Written against the command registry and domain rules with examples taken from real output. Verified mechanically: all 66 commands have a page, and every relative link and anchor resolves.
Version
0.2.0→4.11.0for thetspackage, aligning it with the Java release line. JavaUtils.VERSIONmovesv4.10.0→v4.11.0.Verification
41 test files added or updated.
Behaviour changes
tx send --toaccepts a contact name; resolution is surfaced in the receipt anddata.toContact.tx sendauth is nowconditional—--build-onlybuilds unsigned without unlocking.tx broadcastvalidates before submitting, so some transactions now fail locally instead of on-chain.currenthonours--account, sodata.activeis no longer alwaystrue.--build-only,--permission-id,--expiration.