polkadot_signTransaction
This method returns a signature for the provided transaction payload. It will be signed by a keypair corresponding to the requested signer address.Parameters
Object- Request parameters:address:string- SS58 encoded address of the signertransactionPayload:Object- As per Polkadot typeSignerPayloadJSONcontaining:address:string- The SS58 encoded address (must match outer address)assetId:HexString | null- (optional) The id of the asset used to pay feesblockHash:HexString- The checkpoint hash of the block, 32 bytesblockNumber:HexString- The checkpoint block number (hex encoded)era:HexString- The mortality period of this transactiongenesisHash:HexString- The genesis hash of the chain, 32 bytesmetadataHash:HexString | null- (optional) The hash of the metadata for verificationmethod:string- The SCALE encoded method data (hex encoded)mode:number- (optional) The mode for metadata verification (0=none, 1=exact, 2=partial)nonce:HexString- The nonce for this transaction (hex encoded)specVersion:HexString- The current specification version (hex encoded)tip:HexString- The tip for this transaction (hex encoded amount)transactionVersion:HexString- The current transaction version (hex encoded)signedExtensions:string[]- The array of signed extension identifiersversion:number- The extrinsic version numberwithSignedTransaction:boolean- (optional) Request signed transaction bytes
Returns
Object- Signature result:signature:string- Hex-encoded signature
Example
The
method field in the transaction payload contains the SCALE encoded call data specific to the
transaction being signed. This typically includes the pallet name, function name and any
parameters required for that specific transaction.polkadot_signMessage
This method returns a signature for the provided message payload. It will be signed by a keypair corresponding to the requested signer address.Parameters
Object- As per Polkadot typeSignerPayloadRawcontaining:address:string- SS58 encoded addressdata:string- The hex-encoded data for this requesttype:'bytes' | 'payload'- (optional) Identifies if the message is arbitrary bytes or a transaction payload
Returns
Object- Signature result:signature:string- Hex-encoded signature