Wallet that loads a private key from 1Password via the op CLI.
The key is fetched once on first use and cached in a GenServer's state. No plaintext key ever touches disk.
Configuration
# Start the wallet process
{:ok, pid} = Raxol.Payments.Wallets.Op.start_link(
op_ref: "op://Employee/RaxolAgentKey/credential",
chain_id: 8453
)
# Use as wallet module (via pid)
Raxol.Payments.Wallets.Op.address(pid)
Raxol.Payments.Wallets.Op.sign_message(pid, message)
Summary
Functions
Returns a specification to start this module under a supervisor.
Callback implementation for Raxol.Core.Behaviours.BaseManager.handle_manager_cast/2.
Callback implementation for Raxol.Core.Behaviours.BaseManager.handle_manager_info/2.
Sign a precomputed 32-byte digest. Mirrors Raxol.Payments.Wallet.sign_hash/1
with a server argument; used by EIP-1559 transaction signing.
Functions
@spec address(GenServer.server()) :: String.t()
@spec chain_id(GenServer.server()) :: pos_integer()
Returns a specification to start this module under a supervisor.
See Supervisor.
Callback implementation for Raxol.Core.Behaviours.BaseManager.handle_manager_cast/2.
Callback implementation for Raxol.Core.Behaviours.BaseManager.handle_manager_info/2.
@spec sign_hash(GenServer.server(), <<_::256>>) :: {:ok, binary()} | {:error, term()}
Sign a precomputed 32-byte digest. Mirrors Raxol.Payments.Wallet.sign_hash/1
with a server argument; used by EIP-1559 transaction signing.
@spec sign_message(GenServer.server(), binary()) :: {:ok, binary()} | {:error, term()}