def test_wireup(self): """ Verify that the command is wired up correctly. """ self.assertIsInstance( MultisigIota(self.adapter).getDigests, GetDigestsCommand, )
def test_wireup(self): """ Verify that the command is wired up correctly. """ self.assertIsInstance( MultisigIota(self.adapter).createMultisigAddress, CreateMultisigAddressCommand, )
def test_wireup(self): """ Verifies the command is wired up correctly. """ self.assertIsInstance( MultisigIota(self.adapter).prepareMultisigTransfer, PrepareMultisigTransferCommand, )
def test_wireup(self): """ Verify that the command is wired up correctly. The API method indeed calls the appropiate command. """ with patch( 'iota.multisig.commands.get_digests.GetDigestsCommand.__call__', MagicMock(return_value='You found me!')) as mocked_command: api = MultisigIota(self.adapter) # Don't need to call with proper args here. response = api.get_digests() self.assertTrue(mocked_command.called) self.assertEqual(response, 'You found me!')
def test_wireup(self): """ Verify that the command is wired up correctly. (sync) The API method indeed calls the appropiate command. """ with patch( 'iota.multisig.commands.create_multisig_address.CreateMultisigAddressCommand.__call__', MagicMock(return_value=async_return( 'You found me!'))) as mocked_command: api = MultisigIota(self.adapter) # Don't need to call with proper args here. response = api.create_multisig_address('digests') self.assertTrue(mocked_command.called) self.assertEqual(response, 'You found me!')
def test_wireup(self): """ Verify that the command is wired up correctly. The API method indeed calls the appropiate command. """ with patch( 'iota.multisig.commands.prepare_multisig_transfer.PrepareMultisigTransferCommand.__call__', MagicMock(return_value='You found me!')) as mocked_command: api = MultisigIota(self.adapter) # Don't need to call with proper args here. response = api.prepare_multisig_transfer('transfer', 'multisig_input') self.assertTrue(mocked_command.called) self.assertEqual(response, 'You found me!')
trans = list() trans.append(bundle_trans) trans.append(bundle_trans_2) trans.append(bundle_trans_3) trans.append(bundle_trans_4) print('\n in processing bundle') bundle = Bundle(transactions=trans) print(bundle.transactions[1].signature_message_fragment) print('bundle creation is finished\n') ## # Create digest 1 of 3. # # noinspection SpellCheckingInspection api_1 = MultisigIota( adapter='http://localhost:14265', seed=Seed( b'TESTVALUE9DONTUSEINPRODUCTION99999XKMYQP' b'OIFGQSMIIWCQVMBSOKZASRQOFSIUSSHNDKVL9PJVS', ), ) gd_result = api_1.get_digests( # Starting key index. index=0, # Number of digests to generate. count=1, # Security level of the resulting digests. # Must be a value between 1 (faster) and 3 (more secure). security_level=3, )
For this example, we will create digests from 3 different private keys, each owned by a different seed. Note that this part normally happens on separate computers, so that participants don't have to share their seeds. """ ## # Create digest 1 of 3. # # noinspection SpellCheckingInspection api_1 =\ MultisigIota( adapter = 'http://localhost:14265', seed = Seed( b'TESTVALUE9DONTUSEINPRODUCTION99999XKMYQP' b'OIFGQSMIIWCQVMBSOKZASRQOFSIUSSHNDKVL9PJVS', ), ) gd_result =\ api_1.get_digests( # Starting key index. index = 0, # Number of digests to generate. count = 1, # Security level of the resulting digests. # Must be a value between 1 (faster) and 3 (more secure).
For this example, we will create digests from 3 different private keys, each owned by a different seed. Note that this part normally happens on separate computers, so that participants don't have to share their seeds. """ ## # Create digest 1 of 3. # # noinspection SpellCheckingInspection api_1 =\ MultisigIota( adapter = 'http://localhost:14265', seed = Seed( b'TESTVALUE9DONTUSEINPRODUCTION99999XKMYQP' b'OIFGQSMIIWCQVMBSOKZASRQOFSIUSSHNDKVL9PJVS', ), ) gd_result =\ api_1.get_digests( # Starting key index. index = 0, # Number of digests to generate. count = 1, # Security level of the resulting digests. # Must be a value between 1 (faster) and 3 (more secure).