@proto-kit/sequencer • Docs
Documentation / @proto-kit/sequencer / MinaSigner
Interface: MinaSigner
Interface for signing Mina blockchain transactions and managing cryptographic keys. Provides methods for signing transactions, managing contract addresses, and handling cryptographic signatures for the Mina protocol.
Methods
getContractAddresses()
getContractAddresses():
PublicKey[]
Retrieves the public keys of all managed smart contract addresses. These typically include settlement, dispatch, and bridge contract addresses.
Returns
PublicKey[]
Array of PublicKeys for the managed contracts.
Defined in
packages/sequencer/src/settlement/MinaSigner.ts:40
getFeepayerKey()
getFeepayerKey():
PublicKey
Retrieves the public key of the feepayer account. The feepayer is the account that pays transaction fees on the Mina blockchain.
Returns
PublicKey
The PublicKey of the feepayer account.
Defined in
packages/sequencer/src/settlement/MinaSigner.ts:32
getTokenAddresses()
getTokenAddresses():
PublicKey[]
Retrieves the public keys of all managed token bridge addresses. Token bridges facilitate cross-chain token transfers.
Returns
PublicKey[]
Array of public keys for token bridge contracts, or empty array if none configured.
Defined in
packages/sequencer/src/settlement/MinaSigner.ts:89
registerKey()
registerKey(
privateKey):PublicKey
Registers a new private key in the signer’s key management system.
Parameters
• privateKey: PrivateKey
The PrivateKey to register.
Returns
PublicKey
The corresponding public key of the registered private key.
Defined in
packages/sequencer/src/settlement/MinaSigner.ts:80
sign()
sign(
signatureData):Signature
Signs arbitrary data using the feepayer’s private key.
Parameters
• signatureData: Field[]
Array of Field elements representing the data to be signed.
Returns
Signature
A cryptographic Signature over the provided data.
Defined in
packages/sequencer/src/settlement/MinaSigner.ts:48
signTx()
signTx(
tx,options?):Transaction<false,true>
Signs a Mina transaction with the feepayer key and optionally additional keys.
Parameters
• tx: Transaction<false, false>
The unsigned Transaction to be signed.
• options?: SignTxOptions
Optional SignTxOptions specifying additional keys to use for signing.
Returns
Transaction<false, true>
The signed Transaction<false, true> ready for submission to the network.
Throws
An Error If any required private key is not found.
Defined in
packages/sequencer/src/settlement/MinaSigner.ts:69
signWithKey()
signWithKey(
publicKey,signatureData):Signature
Signs arbitrary data using a specific registered private key.
Parameters
• publicKey: PublicKey
The PublicKey whose corresponding private key will be used for signing.
• signatureData: Field[]
Array of Field elements representing the data to be signed.
Returns
Signature
A cryptographic Signature over the provided data.
Throws
An Error If the corresponding private key is not found in the key registry.