Expand description
Quai-native transaction encoding and signing; never Ethereum transaction envelopes.
Modules§
- document
- Bounded transaction interchange with explicit unsigned claims and verified signatures.
- proto
- Raw prost representation of the pinned transaction wire field numbers. Schema reference: quais.js 94e32c7 / src/encoding/protoc/proto_block.proto. Explicit optional scalar/byte presence is consensus-relevant, including zero. These DTOs are unvalidated. Prefer the bounded encode_proto_transaction and decode_proto_transaction entry points over prost’s unchecked allocation paths. Typed transaction decoding additionally verifies semantics and signatures.
Structs§
- Access
Tuple - An account and its ordered storage-key access list. Order is preserved.
- Conversion
Slippage - Explicit slippage in ten-thousandths, restricted to the pinned node’s clamp range.
- Denomination
- Validated Qi denomination index. Amounts are in Qits (1/1000 Qi).
- OutPoint
- Unique reference to an existing transaction output.
- QiConversion
Intent - Explicit Qi-to-Quai destination, refund and slippage intent.
- QiConversion
Transaction - Immutable unsigned Qi-to-Quai conversion with validated static semantics.
- QiInput
- An input with a validated public key; construction normalizes SEC1 encoding.
- QiOutput
- A user-created output. Arbitrary nonzero output locks are deliberately unsupported.
- QiTransaction
- Unsigned Qi transaction; serialization preserves input/output order.
- QiWrapping
Intent - Explicit Qi wrapping beneficiary and owner contract intent.
- QiWrapping
Transaction - Immutable unsigned Qi wrapping with validated static semantics.
- Quai
ToQi Transaction - Immutable explicit type-0 Quai-to-Qi request. Runtime activation and fee checks remain external.
- Quai
Transaction - Unsigned type-0 Quai transaction. Mutation requires a new signature.
- Signed
QiConversion Transaction - Immutable verified Qi-to-Quai conversion; not a node-acceptance guarantee.
- Signed
QiTransaction - Immutable signature-verified ordinary Qi transfer. UTXO acceptance still requires a node.
- Signed
QiWrapping Transaction - Immutable verified Qi wrapping; not a node-acceptance guarantee.
- Signed
Quai Transaction - Immutable signed transaction whose sender is recovered from the exact payload.
Enums§
- Signed
QiOperation - A verified signed operation. Classification never weakens ordinary signing.
- Transaction
Error - Transaction validation errors do not echo transaction data or secret material.
Constants§
- KAWPOW_
FORK_ BLOCK - Prime-block height at which go-quai v0.56.0 changed the k-Quai controller for the KawPow transition, and one of the two heights it holds conversions after.
- KQUAI_
CHANGE_ HOLD_ INTERVAL - Length of each of the two hold windows go-quai v0.56.0 implements, about six
to seven days of prime blocks. The pinned node’s
KQuaiChangeHoldInterval. - MAX_
POOL_ TRANSACTION_ BYTES - Largest signed Quai transaction the pinned node’s pool accepts, its
txMaxSizeof four 32 KiB slots. - MAX_
TRANSACTION_ BYTES - Encoded input/output byte ceiling, not a promise that a node accepts this size.
- MAX_
TRANSACTION_ MESSAGES - Total nested-message ceiling, checked before protobuf decoder allocation.
- MIN_
QUAI_ CONVERSION_ VALUE - Static minimum value for Quai-to-Qi conversion in the pinned node: 10^19 base units.
- SHA_
EQUIVALENT_ DIFFICULTY_ FORK_ BLOCK - Prime-block height at which it changed the controller again for SHA-equivalent
difficulty. This is also where
QiFeeProfile::V056ShaAnchoredstarts to apply.
Functions§
- conversion_
batch_ discount_ bps - Conservative basis points removed by the pinned node’s cubic flow discount from
every conversion in one prime-block batch.
batch_totalis the combined pre-discount Quai value (Its) of all conversions processed up to and including the one being evaluated;flow_amountis the block’s conversion flow amount. - conversion_
held - Whether the pinned node refuses conversions at this prime terminus height.
- decode_
proto_ transaction - Decode a bounded canonical protobuf object, preserving explicit field presence. This checks the wire format, not transaction semantics, signatures or spendability. Use document::TransactionDocument::from_proto or a concrete signed type to validate.
- encode_
proto_ transaction - Encode a raw protobuf object within the byte/message policy. This does not establish a valid transaction or authorize submission.
- has_
transaction_ inputs - Whether
bytescould be read as a transaction with inputs.