Instantiates the extension wallet proxy.
The adapter according your environment. See ExtensionAdapterFactory. It uses the default ExtensionAdapterFactory to determine the correct adapter.
the current connection, iff exists
Requests a confirmation, i.e. cryptographic signing, of a transaction.
The unsignedTransaction byte sequence is being returned by any of the SignumJS operations as long as no private key is passed as parameter to the operation
The hexadecimal byte string of an unsigned transaction.
The confirmed transaction, in case of success
Tries to connect to the extension wallet. Each recurring call tries overwrites current connection
The argument object
The connection if successful, or null, if not available
Requests to send an encrypted P2P message via the extension
The send parameters
The confirmed transaction, in case of success
This wallet (proxy) allows interacting with the CIPXX compatible extension wallets.
const wallet = new GenericExtensionWallet() wallet .connect({appName: 'MySuperDApp', networkName: NetworkName.SignumMainnet}) .then( connection => { console.log('Successfully connected', connection) const ledger = LedgerClientFactory.createClient({ nodeHost: connection.currentNodeHost }); console.log('Sending some money...') return ledger.transaction.sendAmountToSingleRecipient({ senderPublicKey: connection.publicKey, recipientId: Address.fromReedSolomonAddress('TS-K37B-9V85-FB95-793HN').getNumericId(), feePlanck: String(FeeQuantPlanck), amountPlanck: Amount.fromSigna(1).getPlanck() }) }) .then( unsignedTransaction => { return wallet.confirm(unsignedTransaction.unsignedTransactionBytes) }) .then( confirmedTransaction => { console.log('Successfully sent money:', confirmedTransaction) }).catch(console.error)
At this time, this wallet does only work in the browser