This library provides:
- The OpenRPC typing and controller code generated from api-specs/openrpc-signing-api.json
- A standard
interfacefor signing drivers to implement:
export interface SigningDriverInterface {
partyMode: PartyMode
signingProvider: SigningProvider
controller: (authContext: AuthContext | undefined) => Methods
}The controller function should be an implementation of buildController from ./src/rpc-gen/index.ts which takes an optional AuthContext.
To see a simple example of a signing driver, see core/singing-internal.
Other than the optional internalTxId parameter in signTransaction, ALL instances of txId refer to the TransactionID given by the signing provider, not the Wallet Gateway.
While some signing providers allow an external transaction to be stored with the transaction, this cannot be relied upon, therefore in order to lookup specific transactions, the Wallet Gateway must store and use the transaction ID given by the signing provider (which is returned by the signTransaction method).