Skip to content

Gas keys #50

Description

@r-near

Background. Gas keys are access keys with their own prepaid gas balance and multiple independent nonce slots (up to 1024), enabling parallel transaction signing. This is a two-part protocol change — new actions and new access-key permission variants.

Current behavior. Both halves are rejected today:

  • The actions TransferToGasKey and WithdrawFromGasKey are rejected by the action parser.
  • The AddKey permission parser accepts only FunctionCall and FullAccess; the protocol now also defines GasKeyFunctionCall and GasKeyFullAccess. So even creating a gas key via AddKey fails on-device.

Work.

  • Extend access-key permission parsing to the two gas-key variants, including the gas-key info (prepaid balance + nonce-slot count, max 1024). Reuse the existing function-call permission parsing for the restricted variant.
  • Add TransferToGasKey (public key + deposit) and WithdrawFromGasKey (public key + amount).
  • Display: label a gas-key AddKey distinctly (prepaid balance + nonce-slot count); show key + amount for fund/withdraw.

Acceptance. Both new permission variants parse with their gas-key info; both new actions parse and display; tests cover gas-key AddKey, fund, and withdraw.

Status note: gated behind a nightly protocol feature — not yet on mainnet, so lower urgency, but kept in the audit batch. Support for this landed to mainnet 2.13 recently.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions